From a606d9d85ce5c67711c868143c20dde6f49a3a6a Mon Sep 17 00:00:00 2001 From: Sunny Kim <58885089+sk7725@users.noreply.github.com> Date: Mon, 28 Dec 2020 00:04:19 +0900 Subject: [PATCH] bugfixes, call me the mother of the block forge (#4135) (anuke is the father) --- .../mindustry/world/blocks/experimental/BlockForge.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/mindustry/world/blocks/experimental/BlockForge.java b/core/src/mindustry/world/blocks/experimental/BlockForge.java index ea2879a3d9..83f9bc032a 100644 --- a/core/src/mindustry/world/blocks/experimental/BlockForge.java +++ b/core/src/mindustry/world/blocks/experimental/BlockForge.java @@ -36,7 +36,10 @@ public class BlockForge extends PayloadAcceptor{ hasPower = 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)); } @@ -95,8 +98,6 @@ public class BlockForge extends PayloadAcceptor{ payVector.setZero(); progress = 0f; } - }else{ - progress = 0; } heat = Mathf.lerpDelta(heat, Mathf.num(produce), 0.3f);