diff --git a/src/main/java/com/cricketcraft/chisel/api/carving/CarvingUtils.java b/src/main/java/com/cricketcraft/chisel/api/carving/CarvingUtils.java index 2074b512..317c75b8 100644 --- a/src/main/java/com/cricketcraft/chisel/api/carving/CarvingUtils.java +++ b/src/main/java/com/cricketcraft/chisel/api/carving/CarvingUtils.java @@ -5,12 +5,12 @@ import net.minecraft.item.ItemStack; public class CarvingUtils { /** - * The default implementation of {@link ICarvingVariation#compareTo(ICarvingVariation)} + * A simple way to compare two {@link ICarvingVariation} objects based on the {@link ICarvingVariation#getOrder() getOrder()} method. * * @param v1 - * The first {@link ICarvingVariation variation}. Usually 'this'. + * The first {@link ICarvingVariation variation}. * @param v2 - * The second {@link ICarvingVariation variation}. Usually the parameter to the {@code comapreTo} method. + * The second {@link ICarvingVariation variation}. * @return A positive integer if the first's order is greater, a negative integer if the second's is greater, and 0 if they are equal. */ public static int compare(ICarvingVariation v1, ICarvingVariation v2) { diff --git a/src/main/java/com/cricketcraft/chisel/compat/nei/NEIChiselConfig.java b/src/main/java/com/cricketcraft/chisel/compat/nei/NEIChiselConfig.java index feed3b85..f67a892f 100644 --- a/src/main/java/com/cricketcraft/chisel/compat/nei/NEIChiselConfig.java +++ b/src/main/java/com/cricketcraft/chisel/compat/nei/NEIChiselConfig.java @@ -1,11 +1,12 @@ package com.cricketcraft.chisel.compat.nei; import net.minecraft.item.ItemStack; - -import com.cricketcraft.chisel.Chisel; - import codechicken.nei.api.API; import codechicken.nei.api.IConfigureNEI; + +import com.cricketcraft.chisel.Chisel; +import com.cricketcraft.chisel.client.gui.GuiChisel; + import cpw.mods.fml.common.registry.GameRegistry; public class NEIChiselConfig implements IConfigureNEI { @@ -25,10 +26,10 @@ public class NEIChiselConfig implements IConfigureNEI { API.hideItem(new ItemStack(GameRegistry.findBlock("chisel", "limestone_slab_top"))); API.hideItem(new ItemStack(GameRegistry.findBlock("chisel", "marble_slab_top"))); API.hideItem(new ItemStack(GameRegistry.findBlock("chisel", "marble_pillar_slab_top"))); - + RecipeHandlerChisel handler = new RecipeHandlerChisel(); API.registerRecipeHandler(handler); API.registerUsageHandler(handler); + API.setGuiOffset(GuiChisel.class, -50, 40); } - } diff --git a/src/main/java/com/cricketcraft/chisel/compat/nei/RecipeHandlerChisel.java b/src/main/java/com/cricketcraft/chisel/compat/nei/RecipeHandlerChisel.java index 4a61a751..d8a31c5d 100644 --- a/src/main/java/com/cricketcraft/chisel/compat/nei/RecipeHandlerChisel.java +++ b/src/main/java/com/cricketcraft/chisel/compat/nei/RecipeHandlerChisel.java @@ -5,6 +5,7 @@ import java.awt.Rectangle; import java.util.ArrayList; import java.util.List; +import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; @@ -19,6 +20,7 @@ import com.cricketcraft.chisel.api.carving.CarvingUtils; import com.cricketcraft.chisel.api.carving.ICarvingGroup; import com.cricketcraft.chisel.api.carving.ICarvingVariation; import com.cricketcraft.chisel.carving.Carving; +import com.cricketcraft.chisel.client.gui.GuiChisel; public class RecipeHandlerChisel extends TemplateRecipeHandler { @@ -82,6 +84,11 @@ public class RecipeHandlerChisel extends TemplateRecipeHandler { public String getGuiTexture() { return "Chisel:textures/chiselNEI.png"; } + + @Override + public Class getGuiClass() { + return GuiChisel.class; + } @Override public void drawBackground(int recipeIndex) {