Fixed a crash

This commit is contained in:
Anuken
2020-08-26 14:50:43 -04:00
parent 8a36b3e590
commit 5bf7401139
2 changed files with 5 additions and 2 deletions

View File

@@ -160,7 +160,10 @@ public class BaseAI{
private void tryWalls(){
Block wall = Blocks.copperWall;
Tile spawn = state.rules.defaultTeam.core() != null ? state.rules.defaultTeam.core().tile : data.team.core().tile;
Building spawnt = state.rules.defaultTeam.core() != null ? state.rules.defaultTeam.core() : data.team.core();
Tile spawn = spawnt == null ? null : spawnt.tile;
if(spawn == null) return;
for(int wx = lastX; wx <= lastX + lastW; wx++){
for(int wy = lastY; wy <= lastY + lastH; wy++){