diff --git a/core/src/io/anuke/mindustry/entities/bullet/Bullet.java b/core/src/io/anuke/mindustry/entities/bullet/Bullet.java index 09a37e1960..637727827f 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/Bullet.java +++ b/core/src/io/anuke/mindustry/entities/bullet/Bullet.java @@ -109,6 +109,10 @@ public class Bullet extends BulletEntity implements TeamTrait, SyncT remove(); } + public BulletType getBulletType(){ + return type; + } + public void resetOwner(Entity entity, Team team){ this.owner = entity; this.team = team; diff --git a/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java b/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java index c8ca675c5e..1edf7165b6 100644 --- a/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java +++ b/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java @@ -181,12 +181,7 @@ public interface BuilderTrait extends Entity{ setMineTile(null); } - TileEntity core = unit.getClosestCore(); - //if there is no core to build with, stop building! - if(core == null){ - return; - } Tile tile = world.tile(current.x, current.y); @@ -205,6 +200,13 @@ public interface BuilderTrait extends Entity{ } } + TileEntity core = unit.getClosestCore(); + + //if there is no core to build with, stop building! + if(core == null){ + return; + } + //otherwise, update it. BuildEntity entity = tile.entity();