Possible crash fix

This commit is contained in:
Anuken
2025-10-03 08:31:43 +09:00
parent a1a880a208
commit 74b8c6d184
2 changed files with 5 additions and 2 deletions

View File

@@ -502,8 +502,10 @@ public class Control implements ApplicationListener, Loadable{
}
});
//blocks placed after WorldLoadEvent didn't queue an update, so fix that.
renderer.minimap.updateAll();
Core.app.post(() -> {
//blocks placed after WorldLoadEvent didn't queue an update, so fix that.
renderer.minimap.updateAll();
});
}
}else{
state.set(State.playing);

View File

@@ -309,6 +309,7 @@ public class MinimapRenderer{
}
public void updateAll(){
if(pixmap.isDisposed() || texture.isDisposed()) return;
for(Tile tile : world.tiles){
pixmap.set(tile.x, pixmap.height - 1 - tile.y, colorFor(tile));
}