Allow placing floors (for mods)

This commit is contained in:
Anuken
2023-05-10 12:37:25 -04:00
parent 778e7d5f3f
commit 0acb112f29
5 changed files with 18 additions and 4 deletions

View File

@@ -53,7 +53,9 @@ abstract class BuilderComp implements Posc, Statusc, Teamc, Rotc{
while(it.hasNext()){
BuildPlan plan = it.next();
Tile tile = world.tile(plan.x, plan.y);
if(tile == null || (plan.breaking && tile.block() == Blocks.air) || (!plan.breaking && ((tile.build != null && tile.build.rotation == plan.rotation) || !plan.block.rotate) && tile.block() == plan.block)){
if(tile == null || (plan.breaking && tile.block() == Blocks.air) || (!plan.breaking && ((tile.build != null && tile.build.rotation == plan.rotation) || !plan.block.rotate) &&
(tile.block() == plan.block || (plan.block != null && plan.block.isFloor() && plan.block == tile.floor())))){
it.remove();
}
}