bugfixes, call me the mother of the block forge (#4135)

(anuke is the father)
This commit is contained in:
Sunny Kim
2020-12-28 00:04:19 +09:00
committed by GitHub
parent 8d18649323
commit a606d9d85c

View File

@@ -36,7 +36,10 @@ public class BlockForge extends PayloadAcceptor{
hasPower = true; hasPower = true;
rotate = true; rotate = true;
config(Block.class, (BlockForgeBuild tile, Block block) -> tile.recipe = block); config(Block.class, (BlockForgeBuild tile, Block block) -> {
if(tile.recipe != block) tile.progress = 0f;
tile.recipe = block;
});
consumes.add(new ConsumeItemDynamic((BlockForgeBuild e) -> e.recipe != null ? e.recipe.requirements : ItemStack.empty)); consumes.add(new ConsumeItemDynamic((BlockForgeBuild e) -> e.recipe != null ? e.recipe.requirements : ItemStack.empty));
} }
@@ -95,8 +98,6 @@ public class BlockForge extends PayloadAcceptor{
payVector.setZero(); payVector.setZero();
progress = 0f; progress = 0f;
} }
}else{
progress = 0;
} }
heat = Mathf.lerpDelta(heat, Mathf.num(produce), 0.3f); heat = Mathf.lerpDelta(heat, Mathf.num(produce), 0.3f);