Sublimate collision fix

This commit is contained in:
Anuken
2025-06-17 11:20:21 -04:00
parent 1465916bed
commit 536f4db5fe
6 changed files with 16 additions and 13 deletions

View File

@@ -172,7 +172,7 @@ public class MapIO{
for(Tile tile : tiles){
//while synthetic blocks are possible, most of their data is lost, so in order to avoid questions like
//"why is there air under my drill" and "why are all my conveyors facing right", they are disabled
int color = tile.block().hasColor && !tile.block().synthetic() ? tile.block().mapColor.rgba() : tile.floor().mapColor.rgba();
int color = tile.block().hasColor && !tile.block().hasBuilding() ? tile.block().mapColor.rgba() : tile.floor().mapColor.rgba();
pix.set(tile.x, tiles.height - 1 - tile.y, color);
}
return pix;
@@ -183,6 +183,9 @@ public class MapIO{
int color = pixmap.get(tile.x, pixmap.height - 1 - tile.y);
Block block = ColorMapper.get(color);
//ignore buildings; reading images is only intended for environment tiles
if(block.hasBuilding()) continue;
if(block.isOverlay()){
tile.setOverlay(block.asFloor());
}else if(block.isFloor()){
@@ -194,7 +197,6 @@ public class MapIO{
}
}
//guess at floors by grabbing a random adjacent floor
for(Tile tile : tiles){
//default to stone floor
if(tile.floor() == Blocks.air){