Crash fix
This commit is contained in:
@@ -213,8 +213,8 @@ public interface BuilderTrait extends Entity, TeamTrait{
|
||||
|
||||
TileEntity core = unit.getClosestCore();
|
||||
|
||||
//if there is no core to build with, stop building!
|
||||
if(core == null){
|
||||
//if there is no core to build with or no build entity, stop building!
|
||||
if(core == null || !(tile.entity instanceof BuildEntity)){
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -280,7 +280,9 @@ public class TileEntity extends BaseEntity implements TargetTrait, HealthTrait{
|
||||
|
||||
if(health <= 0){
|
||||
onDeath();
|
||||
return; //no need to update anymore
|
||||
}
|
||||
|
||||
Block previous = block;
|
||||
block.update(tile);
|
||||
if(block == previous && cons != null){
|
||||
|
||||
@@ -199,7 +199,6 @@ public class Conveyor extends Block{
|
||||
|
||||
@Override
|
||||
public void update(Tile tile){
|
||||
|
||||
ConveyorEntity entity = tile.entity();
|
||||
entity.minitem = 1f;
|
||||
Tile next = tile.getNearby(tile.getRotation());
|
||||
|
||||
Reference in New Issue
Block a user