From f3b6f0a29b91732f6983368cfdef4efeca4e7ce8 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 25 Jul 2021 20:17:18 -0400 Subject: [PATCH] Fixed #5647 --- core/src/mindustry/type/AmmoTypes.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/mindustry/type/AmmoTypes.java b/core/src/mindustry/type/AmmoTypes.java index 491167ab1e..fb50fcaa17 100644 --- a/core/src/mindustry/type/AmmoTypes.java +++ b/core/src/mindustry/type/AmmoTypes.java @@ -44,7 +44,7 @@ public class AmmoTypes implements ContentList{ public void resupply(Unit unit){ float range = unit.hitSize + this.range; - Building build = Units.closestBuilding(unit.team, unit.x, unit.y, range, u -> u.block.hasPower && u.block.consumes.getPower().buffered); + Building build = Units.closestBuilding(unit.team, unit.x, unit.y, range, u -> u.block.consumes.hasPower() && u.block.consumes.getPower().buffered); if(build != null){ float amount = build.power.status * build.block.consumes.getPower().capacity;