Crash fix
This commit is contained in:
@@ -38,6 +38,11 @@ public class EditorTile extends Tile{
|
|||||||
super.setFloor(type);
|
super.setFloor(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEditorTile(){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setBlock(Block type, Team team, int rotation, Prov<Building> entityprov){
|
public void setBlock(Block type, Team team, int rotation, Prov<Building> entityprov){
|
||||||
if(skip()){
|
if(skip()){
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ public class Tile implements Position, QuadTreeObject, Displayable{
|
|||||||
this.floor = type;
|
this.floor = type;
|
||||||
this.overlay = (Floor)Blocks.air;
|
this.overlay = (Floor)Blocks.air;
|
||||||
|
|
||||||
if(!headless && !world.isGenerating()){
|
if(!headless && !world.isGenerating() && !isEditorTile()){
|
||||||
renderer.blocks.removeFloorIndex(this);
|
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.*/
|
/** Sets the floor, preserving overlay.*/
|
||||||
public void setFloorUnder(Floor floor){
|
public void setFloorUnder(Floor floor){
|
||||||
Block overlay = this.overlay;
|
Block overlay = this.overlay;
|
||||||
|
|||||||
Reference in New Issue
Block a user