This commit is contained in:
Anuken
2021-09-23 19:44:42 -04:00
parent c8ab2bd1ba
commit 29242249bd
2 changed files with 26 additions and 0 deletions

View File

@@ -269,6 +269,10 @@ public class Tile implements Position, QuadTreeObject, Displayable{
this.floor = type;
this.overlay = (Floor)Blocks.air;
if(!headless && !world.isGenerating()){
renderer.blocks.removeFloorIndex(this);
}
recache();
if(build != null){
build.onProximityUpdate();
@@ -305,6 +309,8 @@ public class Tile implements Position, QuadTreeObject, Displayable{
if(!headless && !world.isGenerating()){
renderer.blocks.floor.recacheTile(this);
renderer.minimap.update(this);
renderer.blocks.invalidateTile(this);
renderer.blocks.addFloorIndex(this);
//update neighbor tiles as well
for(int i = 0; i < 8; i++){
Tile other = world.tile(x + Geometry.d8[i].x, y + Geometry.d8[i].y);