Fixed multiblock minimap shadows

This commit is contained in:
Anuken
2022-02-20 11:55:35 -05:00
parent 989249e7dc
commit 02966a0911
3 changed files with 16 additions and 22 deletions

View File

@@ -36,16 +36,17 @@ public class MinimapRenderer{
});
Events.on(TileChangeEvent.class, event -> {
//TODO don't update when the minimap is off?
if(!ui.editor.isShown()){
update(event.tile);
//update floor below block.
if(event.tile.block().solid && event.tile.y > 0){
Tile tile = world.tile(event.tile.x, event.tile.y - 1);
if(tile.block() == Blocks.air){
update(tile);
}
if(event.tile.block().solid && event.tile.y > 0 && event.tile.isCenter()){
event.tile.getLinkedTiles(t -> {
Tile tile = world.tile(t.x, t.y - 1);
if(tile.block() == Blocks.air){
update(tile);
}
});
}
}
});