Fixed core deconstruction crash
This commit is contained in:
@@ -109,6 +109,10 @@ public class Bullet extends BulletEntity<BulletType> implements TeamTrait, SyncT
|
|||||||
remove();
|
remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BulletType getBulletType(){
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
public void resetOwner(Entity entity, Team team){
|
public void resetOwner(Entity entity, Team team){
|
||||||
this.owner = entity;
|
this.owner = entity;
|
||||||
this.team = team;
|
this.team = team;
|
||||||
|
|||||||
@@ -181,12 +181,7 @@ public interface BuilderTrait extends Entity{
|
|||||||
setMineTile(null);
|
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);
|
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.
|
//otherwise, update it.
|
||||||
BuildEntity entity = tile.entity();
|
BuildEntity entity = tile.entity();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user