From 4102c380d291b6a161ed5d8facbac0f41b11e6f7 Mon Sep 17 00:00:00 2001 From: Patrick 'Quezler' Mounier Date: Mon, 30 Nov 2020 22:47:26 +0100 Subject: [PATCH 1/2] Update BlockForge.java --- core/src/mindustry/world/blocks/experimental/BlockForge.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/world/blocks/experimental/BlockForge.java b/core/src/mindustry/world/blocks/experimental/BlockForge.java index 251c6820a0..6f2d569644 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.payload != null ? 1f : 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{ From 1ed2b2eb2eeae504c153a8e4b1d97f1f5894a380 Mon Sep 17 00:00:00 2001 From: Patrick 'Quezler' Mounier Date: Tue, 1 Dec 2020 09:28:22 +0100 Subject: [PATCH 2/2] Update core/src/mindustry/world/blocks/experimental/BlockForge.java --- core/src/mindustry/world/blocks/experimental/BlockForge.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/mindustry/world/blocks/experimental/BlockForge.java b/core/src/mindustry/world/blocks/experimental/BlockForge.java index 6f2d569644..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", (BlockForgeBuild entity) -> new Bar("bar.progress", Pal.ammo, () -> entity.payload != null ? 1f : entity.recipe == null ? 0f : (float)(entity.progress / entity.recipe.buildCost))); + bars.add("progress", (BlockForgeBuild entity) -> new Bar("bar.progress", Pal.ammo, () -> entity.recipe == null ? 0f : (float)(entity.progress / entity.recipe.buildCost))); } @Override