diff --git a/kfc/build.gradle b/kfc/build.gradle index beea62e2..6a9d5a23 100644 --- a/kfc/build.gradle +++ b/kfc/build.gradle @@ -87,10 +87,10 @@ dependencies { // and can be found on CurseForge, check the file name of the version you want. // // compile against the JEI API -deobfCompile "mezz.jei:jei_${mc_version}:${jei_version}:api" + deobfCompile "nmd.primal.core:PrimalCore:${mc_version}-${primal_version}:dev" //runtime "mezz.jei:jei_${mc_version}:${jei_version}" -deobfCompile "nmd.primal.core:PrimalCore:${primal_version}:dev" + deobfCompile "nmd.primal.core:PrimalCore:${mc_version}-${primal_version}:dev" //runtime "nmd.primal.core:PrimalCore:${primal_version}" } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileBloomery.java b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileBloomery.java index 735d5e98..949ec6a5 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileBloomery.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileBloomery.java @@ -41,6 +41,18 @@ public class TileBloomery extends TileBaseSlot implements ITickable { this.setHeat(100); } this.iteration++; + if (this.iteration == 100) { + RecipeHelper.fuelManger(world, this, this.getSlotStack(0)); + if(CommonUtils.randomCheck(1000)) { + makeSmoke(world, pos); + } + } + if (this.iteration == 200) { + RecipeHelper.fuelManger(world, this, this.getSlotStack(0)); + if(CommonUtils.randomCheck(1000)) { + makeSmoke(world, pos); + } + } if (this.iteration == 300) { this.iteration = 0; //IBlockState state = world.getBlockState(this.pos); @@ -51,9 +63,11 @@ public class TileBloomery extends TileBaseSlot implements ITickable { world.notifyBlockUpdate(pos, state, state, 2); } this.heatManager(this.getHeat(), state, this.getSlotStack(0), world, pos); - + RecipeHelper.fuelManger(world, this, this.getSlotStack(0)); + if(CommonUtils.randomCheck(1000)) { + makeSmoke(world, pos); + } } - slotZeroManager(world); slotOneManager(); } } 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 39565be6..bd01fe4f 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; @@ -46,6 +47,18 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{ IBlockState aboveState = world.getBlockState(abovePos); Block block = world.getBlockState(abovePos).getBlock(); if (world.getBlockState(this.getPos()).getValue(PrimalStates.ACTIVE)) { + if (this.iteration == 100) { + RecipeHelper.fuelManger(world, this, this.getSlotStack(0)); + if(CommonUtils.randomCheck(1000)) { + makeSmoke(world, pos); + } + } + if (this.iteration == 200) { + RecipeHelper.fuelManger(world, this, this.getSlotStack(0)); + if(CommonUtils.randomCheck(1000)) { + makeSmoke(world, pos); + } + } if (this.iteration == 300) { this.iteration = 0; @@ -57,9 +70,13 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{ } this.heatManager(this.getHeat(), state, this.getSlotStack(0), world, pos); + RecipeHelper.fuelManger(world, this, this.getSlotStack(0)); + if(CommonUtils.randomCheck(1000)) { + makeSmoke(world, pos); + } } - slotZeroManager(world); + //slotZeroManager(world); craftingManager(); } } @@ -165,7 +182,10 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{ ItemStack stack = this.getSlotStack(i); 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++; @@ -174,11 +194,14 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{ cookCounter2--; } if (cookCounter2 >= recipe.getIdealTime()) { + ItemStack outputStack = recipe.getOutput(); + outputStack.setItemDamage(stack.getItemDamage()); + if(outputStack.getItem() instanceof ToolPart) { + outputStack.setTagCompound(stackCompound); - if (NBTHelper.hasTag(stack, "tags")) { - NBTHelper.setBoolean(stack, "hot", true); - } else this.setSlotStack(i, recipe.getOutput()); - + outputStack.getSubCompound("tags").setBoolean("hot", true); + } + this.setSlotStack(i, outputStack); cookCounter2 = 0; } }