diff --git a/kfc/gradle.properties b/kfc/gradle.properties index d99fe0d1..655ebf1b 100644 --- a/kfc/gradle.properties +++ b/kfc/gradle.properties @@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx3G mod_group=nmd.primal.forgecraft mod_name=ForgeCraft -mod_version=1.3.2 +mod_version=1.3.21 forge_version=14.22.0.2463 mcp_mappings=snapshot_20170624 diff --git a/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java b/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java index 066e87f1..95e165b6 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java @@ -17,7 +17,7 @@ public class ModInfo { public static final String MOD_CONFIG = "primal/" + MOD_ID; //public static final String MOD_PREFIX = MOD_ID + ":"; public static final String MOD_CHANNEL = MOD_ID; - public static final String MOD_VERSION = "1.3.2"; + public static final String MOD_VERSION = "1.3.21"; public static final String MC_VERSIONS = "[1.12.0, 1.13.0)"; public static final String DEPENDENCIES = "required-after:forge@[14.21.0,2344,);" + "required-after:primal@[0.5,);"; diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java index 6ca5daf2..d184004e 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java @@ -739,7 +739,7 @@ public class ModCrafting { /***Makes a Hot Iron PickaxeHead***/ ForgeCrafting.addRecipe( ModItems.pickaxehead, - new ItemStack(ModItems.pickaxehead, 1 ), + new ItemStack(ModItems.pickaxehead, 1), 800, 160, 400, @@ -750,7 +750,7 @@ public class ModCrafting { /***Makes a Hot Clean Iron PickaxeHead***/ ForgeCrafting.addRecipe( ModItems.cleanironpickaxehead, - new ItemStack(ModItems.cleanironpickaxehead, 1 ), + new ItemStack(ModItems.cleanironpickaxehead, 1), 800, 160, 400, @@ -761,7 +761,7 @@ public class ModCrafting { /***Makes a Hot Steel PickaxeHead***/ ForgeCrafting.addRecipe( ModItems.steelpickaxehead, - new ItemStack(ModItems.steelpickaxehead, 1 ), + new ItemStack(ModItems.steelpickaxehead, 1), 1000, 160, 400, @@ -774,7 +774,7 @@ public class ModCrafting { /***Makes a Hot Iron AxeHead***/ ForgeCrafting.addRecipe( ModItems.ironaxehead, - new ItemStack(ModItems.ironaxehead, 1 ), + new ItemStack(ModItems.ironaxehead, 1), 800, 160, 400, @@ -784,7 +784,7 @@ public class ModCrafting { /***Makes a Hot Clean Iron AxeHead***/ ForgeCrafting.addRecipe( ModItems.cleanironaxehead, - new ItemStack(ModItems.cleanironaxehead, 1 ), + new ItemStack(ModItems.cleanironaxehead, 1), 800, 160, 400, @@ -794,7 +794,7 @@ public class ModCrafting { /***Makes a Hot Steel AxeHead***/ ForgeCrafting.addRecipe( ModItems.steelaxehead, - new ItemStack(ModItems.steelaxehead, 1 ), + new ItemStack(ModItems.steelaxehead, 1), 800, 160, 400, @@ -806,7 +806,7 @@ public class ModCrafting { /***Makes a Hot Iron ShovelHead***/ ForgeCrafting.addRecipe( ModItems.ironshovelhead, - new ItemStack(ModItems.ironshovelhead, 1 ), + new ItemStack(ModItems.ironshovelhead, 1), 800, 160, 400, @@ -816,7 +816,7 @@ public class ModCrafting { /***Makes a Hot Clean Iron ShovelHead***/ ForgeCrafting.addRecipe( ModItems.cleanironshovelhead, - new ItemStack(ModItems.cleanironshovelhead, 1 ), + new ItemStack(ModItems.cleanironshovelhead, 1), 800, 160, 400, @@ -826,7 +826,7 @@ public class ModCrafting { /***Makes a Hot Steel ShovelHead***/ ForgeCrafting.addRecipe( ModItems.steelshovelhead, - new ItemStack(ModItems.steelshovelhead, 1 ), + new ItemStack(ModItems.steelshovelhead, 1), 800, 160, 400, @@ -838,7 +838,7 @@ public class ModCrafting { /***Makes a Hot Iron HoeHead***/ ForgeCrafting.addRecipe( ModItems.ironhoehead, - new ItemStack(ModItems.ironhoehead, 1 ), + new ItemStack(ModItems.ironhoehead, 1), 800, 160, 400, @@ -848,7 +848,7 @@ public class ModCrafting { /***Makes a Hot Clean Iron HoeHead***/ ForgeCrafting.addRecipe( ModItems.cleanironhoehead, - new ItemStack(ModItems.cleanironhoehead, 1 ), + new ItemStack(ModItems.cleanironhoehead, 1), 800, 160, 400, @@ -858,7 +858,7 @@ public class ModCrafting { /***Makes a Hot Steel HoeHead***/ ForgeCrafting.addRecipe( ModItems.steelhoehead, - new ItemStack(ModItems.steelhoehead, 1 ), + new ItemStack(ModItems.steelhoehead, 1), 800, 160, 400, diff --git a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileForge.java b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileForge.java index 62970350..6a41143a 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileForge.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileForge.java @@ -19,6 +19,7 @@ import nmd.primal.core.common.helper.NBTHelper; import nmd.primal.core.common.helper.RecipeHelper; import nmd.primal.forgecraft.blocks.Forge; import nmd.primal.forgecraft.crafting.ForgeCrafting; +import nmd.primal.forgecraft.items.parts.ToolPart; import nmd.primal.forgecraft.util.ToolNBT; import static nmd.primal.core.common.helper.FireHelper.makeSmoke; @@ -179,10 +180,14 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{ private void craftingManager() { for (int i = 2; i < this.getSlotListSize(); i++) { - ItemStack stack = this.getSlotStack(i); + ItemStack stack = this.getSlotStack(i).copy(); + ForgeCrafting recipe = ForgeCrafting.getRecipe(stack.getItem()); if (recipe != null) { - + NBTTagCompound stackCompound = null; + if(stack.hasTagCompound()){ + stackCompound=stack.getTagCompound().copy(); + } if(i == 2){ if (this.getHeat() >= recipe.getHeatThreshold()) { cookCounter2++; @@ -191,11 +196,13 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{ cookCounter2--; } if (cookCounter2 >= recipe.getIdealTime()) { - - if (NBTHelper.hasTag(stack, "tags")) { - NBTHelper.setBoolean(stack, "hot", true); - } else this.setSlotStack(i, recipe.getOutput()); - + ItemStack outputStack = recipe.getOutput(); + outputStack.setItemDamage(stack.getItemDamage()); + if(outputStack.getItem() instanceof ToolPart) { + outputStack.setTagCompound(stackCompound); + outputStack.getSubCompound("tags").setBoolean("hot", true); + } + this.setSlotStack(i, outputStack); cookCounter2 = 0; } } @@ -207,10 +214,13 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{ cookCounter3--; } if (cookCounter3 >= recipe.getIdealTime()) { - - if (NBTHelper.hasTag(stack, "tags")) { - NBTHelper.setBoolean(stack, "hot", true); - } else this.setSlotStack(i, recipe.getOutput()); + ItemStack outputStack = recipe.getOutput(); + outputStack.setItemDamage(stack.getItemDamage()); + if(outputStack.getItem() instanceof ToolPart) { + outputStack.setTagCompound(stackCompound); + outputStack.getSubCompound("tags").setBoolean("hot", true); + } + this.setSlotStack(i, outputStack); cookCounter3 = 0; } @@ -223,12 +233,14 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{ cookCounter4--; } if (cookCounter4 >= recipe.getIdealTime()) { - - if (NBTHelper.hasTag(stack, "tags")) { - NBTHelper.setBoolean(stack, "hot", true); - cookCounter4 = 0; - } else this.setSlotStack(i, recipe.getOutput()); - + ItemStack outputStack = recipe.getOutput(); + outputStack.setItemDamage(stack.getItemDamage()); + //System.out.println(stackCompound.getCompoundTag("tags")); + if(outputStack.getItem() instanceof ToolPart) { + outputStack.setTagCompound(stackCompound); + outputStack.getSubCompound("tags").setBoolean("hot", true); + } + this.setSlotStack(i, outputStack); cookCounter4 = 0; } } @@ -240,11 +252,13 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{ cookCounter5--; } if (cookCounter5 >= recipe.getIdealTime()) { - - if (NBTHelper.hasTag(stack, "tags")) { - NBTHelper.setBoolean(stack, "hot", true); - } else this.setSlotStack(i, recipe.getOutput()); - + ItemStack outputStack = recipe.getOutput(); + outputStack.setItemDamage(stack.getItemDamage()); + if(outputStack.getItem() instanceof ToolPart) { + outputStack.setTagCompound(stackCompound); + outputStack.getSubCompound("tags").setBoolean("hot", true); + } + this.setSlotStack(i, outputStack); cookCounter5 = 0; } } @@ -256,21 +270,16 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{ cookCounter6--; } if (cookCounter6 >= recipe.getIdealTime()) { - - if (NBTHelper.hasTag(stack, "tags")) { - NBTHelper.setBoolean(stack, "hot", true); - } else this.setSlotStack(i, recipe.getOutput()); - + ItemStack outputStack = recipe.getOutput(); + outputStack.setItemDamage(stack.getItemDamage()); + if(outputStack.getItem() instanceof ToolPart) { + outputStack.setTagCompound(stackCompound); + outputStack.getSubCompound("tags").setBoolean("hot", true); + } + this.setSlotStack(i, outputStack); cookCounter6 = 0; } } - - /* - System.out.println(state.getValue(IngotBall.ACTIVE) + " : " + recipe.getStartState()); - System.out.println(cookCounter + " : " + recipe.getIdealTime()); - System.out.println(this.heat + " : " + recipe.getHeatThreshold()); - System.out.println("========"); - */ } } } diff --git a/kfc/src/main/resources/mcmod.info b/kfc/src/main/resources/mcmod.info index a847393d..4c1c2a83 100644 --- a/kfc/src/main/resources/mcmod.info +++ b/kfc/src/main/resources/mcmod.info @@ -2,7 +2,7 @@ "modid": "forgecraft", "name": "Kitsu's Forgecraft", "description": "Forged with sweat and blood", - "version": "1.3.2", + "version": "1.3.21", "mcversion": "1.12.0", "url": "", "updateUrl": "",