Moved rotation to Building

This commit is contained in:
Anuken
2020-07-29 10:19:07 -04:00
parent 749b9f5b30
commit 8729410cd8
49 changed files with 154 additions and 202 deletions
+3 -3
View File
@@ -22,7 +22,7 @@ public class Build{
return;
}
Tile tile = world.Building(x, y);
Tile tile = world.tileBuilding(x, y);
//this should never happen, but it doesn't hurt to check for links
float prevPercent = 1f;
@@ -30,7 +30,7 @@ public class Build{
prevPercent = tile.build.healthf();
}
int rotation = tile.rotation();
int rotation = tile.build != null ? tile.build.rotation : 0;
Block previous = tile.block();
Block sub = BuildBlock.get(previous.size);
@@ -146,7 +146,7 @@ public class Build{
&& tile.floor().placeableOn
&& (!type.requiresWater || tile.floor().liquidDrop == Liquids.water)
&& (((type.canReplace(tile.block()) || (tile.block instanceof BuildBlock && tile.<BuildEntity>bc().cblock == type))
&& !(type == tile.block() && rotation == tile.rotation() && type.rotate)) || tile.block().alwaysReplace || tile.block() == Blocks.air)
&& !(type == tile.block() && (tile.build != null && rotation == tile.build.rotation) && type.rotate)) || tile.block().alwaysReplace || tile.block() == Blocks.air)
&& tile.block().isMultiblock() == type.isMultiblock() && type.canPlaceOn(tile, team);
}
}