diff --git a/gradle.properties b/gradle.properties index 7455861..c10c91b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ modName = NotEnoughEnergistics # This is a case-sensitive string to identify your mod. Convention is to use lower case. modId = neenergistics -modVersion=1.4.1 +modVersion=1.4.2 modGroup = com.github.vfyjxf.nee diff --git a/src/main/java/com/github/vfyjxf/nee/client/GuiEventHandler.java b/src/main/java/com/github/vfyjxf/nee/client/GuiEventHandler.java index 148533d..fbe0611 100644 --- a/src/main/java/com/github/vfyjxf/nee/client/GuiEventHandler.java +++ b/src/main/java/com/github/vfyjxf/nee/client/GuiEventHandler.java @@ -176,7 +176,7 @@ public class GuiEventHandler implements INEIGuiHandler { return false; } - if (NEEConfig.enableNEIDragNDrop) { + if (NEEConfig.enableNEIDragDrop) { if (gui instanceof AEBaseGui) { if (draggedStack != null) { Slot currentSlot = gui.getSlotAtPosition(mouseX, mouseY); diff --git a/src/main/java/com/github/vfyjxf/nee/config/NEEConfig.java b/src/main/java/com/github/vfyjxf/nee/config/NEEConfig.java index 242cb35..7bb7509 100644 --- a/src/main/java/com/github/vfyjxf/nee/config/NEEConfig.java +++ b/src/main/java/com/github/vfyjxf/nee/config/NEEConfig.java @@ -29,7 +29,7 @@ public class NEEConfig { public static boolean drawHighlight = true; public static boolean allowSynchronousSwitchIngredient = true; public static boolean useNEIDragFromNEIAddons = false; - public static boolean enableNEIDragNDrop = true; + public static boolean enableNEIDragDrop = true; public static boolean useStackSizeFromNEI = true; public static boolean keepGhostitems = true; @@ -75,7 +75,7 @@ public class NEEConfig { useNEIDragFromNEIAddons = config.get(CATEGORY_OTHER_SETTINGS, "useNEIDragFromNEIAddons", false, "Use the NEI Drag from NEI Addons").getBoolean(); - enableNEIDragNDrop = config.get(CATEGORY_OTHER_SETTINGS, "enableNEIDragNDrop", true, "").getBoolean(); + enableNEIDragDrop = config.get(CATEGORY_OTHER_SETTINGS, "enableNEIDragDrop", true, "").getBoolean(); useStackSizeFromNEI = config.get(CATEGORY_OTHER_SETTINGS, "useStackSizeFromNEI", true, "Use the StackSize set by NEI").getBoolean(); @@ -128,7 +128,7 @@ public class NEEConfig { allowSynchronousSwitchIngredient = config.get(CATEGORY_OTHER_SETTINGS, "allowSynchronousSwitchIngredient", true, "If true, it will make all similar ingredient switch at the same time").getBoolean(true); - enableNEIDragNDrop = config.get(CATEGORY_OTHER_SETTINGS, "enableNEIDragNDrop", true, "").getBoolean(); + enableNEIDragDrop = config.get(CATEGORY_OTHER_SETTINGS, "enableNEIDragNDrop", true, "").getBoolean(); useStackSizeFromNEI = config.get(CATEGORY_OTHER_SETTINGS, "useStackSizeFromNEI", true, "Use the StackSize set by NEI").getBoolean(); diff --git a/src/main/java/com/github/vfyjxf/nee/nei/NEECraftingHandler.java b/src/main/java/com/github/vfyjxf/nee/nei/NEECraftingHandler.java index c39520c..15d2065 100644 --- a/src/main/java/com/github/vfyjxf/nee/nei/NEECraftingHandler.java +++ b/src/main/java/com/github/vfyjxf/nee/nei/NEECraftingHandler.java @@ -23,6 +23,8 @@ import net.minecraftforge.oredict.OreDictionary; import java.util.*; +import static com.github.vfyjxf.nee.processor.RecipeProcessor.NULL_IDENTIFIER; + /** * @author vfyjxf */ @@ -65,7 +67,10 @@ public class NEECraftingHandler implements IOverlayHandler { private PacketNEIPatternRecipe packProcessRecipe(IRecipeHandler recipe, int recipeIndex) { final NBTTagCompound recipeInputs = new NBTTagCompound(); NBTTagCompound recipeOutputs = new NBTTagCompound(); - String identifier = recipe instanceof TemplateRecipeHandler ? ((TemplateRecipeHandler) recipe).getOverlayIdentifier() : ""; + String identifier = recipe instanceof TemplateRecipeHandler ? ((TemplateRecipeHandler) recipe).getOverlayIdentifier() : NULL_IDENTIFIER; + if (identifier == null){ + identifier = NULL_IDENTIFIER; + } int inputIndex = 0; int outputIndex = 0; //get all recipe inputs and other stacks,use first item diff --git a/src/main/java/com/github/vfyjxf/nee/processor/ForestryRecipeProcessor.java b/src/main/java/com/github/vfyjxf/nee/processor/ForestryRecipeProcessor.java index 7b78be7..e72c56a 100644 --- a/src/main/java/com/github/vfyjxf/nee/processor/ForestryRecipeProcessor.java +++ b/src/main/java/com/github/vfyjxf/nee/processor/ForestryRecipeProcessor.java @@ -4,15 +4,17 @@ import codechicken.nei.PositionedStack; import codechicken.nei.recipe.IRecipeHandler; import javax.annotation.Nonnull; + import java.util.*; + public class ForestryRecipeProcessor implements IRecipeProcessor { @Nonnull @Override public Set getAllOverlayIdentifier() { return new HashSet<>(Arrays.asList( - "forestry.bottler", "forestry.carpenter", "forestry.centrifuge", "forestry.fabricator", "forestry.fermenter", "forestry.moistener", "forestry.squeezer", "forestry.still" + "forestry.bottler", "forestry.carpenter", "forestry.centrifuge", "forestry.fabricator", "forestry.fermenter", "forestry.moistener", "forestry.squeezer", "forestry.still",RecipeProcessor.NULL_IDENTIFIER )); } diff --git a/src/main/java/com/github/vfyjxf/nee/processor/RecipeProcessor.java b/src/main/java/com/github/vfyjxf/nee/processor/RecipeProcessor.java index 0a7b17c..07bb1b1 100644 --- a/src/main/java/com/github/vfyjxf/nee/processor/RecipeProcessor.java +++ b/src/main/java/com/github/vfyjxf/nee/processor/RecipeProcessor.java @@ -7,6 +7,8 @@ import java.util.ArrayList; import java.util.List; public class RecipeProcessor { + + public static final String NULL_IDENTIFIER = "null"; public static List recipeProcessors = new ArrayList<>(); public static void init() {