Crash fix

This commit is contained in:
Anuken
2022-05-07 21:20:12 -04:00
parent 471504090a
commit a9d4e56e66
2 changed files with 10 additions and 1 deletions

View File

@@ -38,6 +38,11 @@ public class EditorTile extends Tile{
super.setFloor(type);
}
@Override
public boolean isEditorTile(){
return true;
}
@Override
public void setBlock(Block type, Team team, int rotation, Prov<Building> entityprov){
if(skip()){

View File

@@ -285,7 +285,7 @@ public class Tile implements Position, QuadTreeObject, Displayable{
this.floor = type;
this.overlay = (Floor)Blocks.air;
if(!headless && !world.isGenerating()){
if(!headless && !world.isGenerating() && !isEditorTile()){
renderer.blocks.removeFloorIndex(this);
}
@@ -295,6 +295,10 @@ public class Tile implements Position, QuadTreeObject, Displayable{
}
}
public boolean isEditorTile(){
return false;
}
/** Sets the floor, preserving overlay.*/
public void setFloorUnder(Floor floor){
Block overlay = this.overlay;