Fixed core deconstruction crash

This commit is contained in:
Anuken 2018-09-17 09:57:58 -04:00
parent 6c32ab4711
commit 9aa4219bf0
2 changed files with 11 additions and 5 deletions

View File

@ -109,6 +109,10 @@ public class Bullet extends BulletEntity<BulletType> implements TeamTrait, SyncT
remove();
}
public BulletType getBulletType(){
return type;
}
public void resetOwner(Entity entity, Team team){
this.owner = entity;
this.team = team;

View File

@ -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();