diff --git a/core/src/mindustry/world/blocks/experimental/BlockForge.java b/core/src/mindustry/world/blocks/experimental/BlockForge.java index 251c6820a0..a123a19054 100644 --- a/core/src/mindustry/world/blocks/experimental/BlockForge.java +++ b/core/src/mindustry/world/blocks/experimental/BlockForge.java @@ -41,7 +41,7 @@ public class BlockForge extends PayloadAcceptor{ public void setBars(){ super.setBars(); - bars.add("progress", entity -> new Bar("bar.progress", Pal.ammo, () -> ((BlockForgeBuild)entity).progress)); + bars.add("progress", (BlockForgeBuild entity) -> new Bar("bar.progress", Pal.ammo, () -> entity.recipe == null ? 0f : (float)(entity.progress / entity.recipe.buildCost))); } @Override @@ -83,6 +83,7 @@ public class BlockForge extends PayloadAcceptor{ if(progress >= recipe.buildCost){ consume(); payload = new BuildPayload(recipe, team); + payVector.setZero(); progress = 0f; } }else{