Complete me senpai (#1810)

This commit is contained in:
Patrick 'Quezler' Mounier
2020-04-03 16:48:51 +02:00
committed by GitHub
parent 4c9b034153
commit 68c20ae728

View File

@ -87,7 +87,7 @@ public class Build{
if(tile == null) return false;
if(type.isMultiblock()){
if(type.canReplace(tile.block()) && tile.block().size == type.size && type.canPlaceOn(tile) && tile.interactable(team)){
if((type.canReplace(tile.block()) || (tile.block instanceof BuildBlock && tile.<BuildEntity>ent().cblock == type)) && tile.block().size == type.size && type.canPlaceOn(tile) && tile.interactable(team)){
return true;
}
@ -117,7 +117,7 @@ public class Build{
&& contactsGround(tile.x, tile.y, type)
&& (!tile.floor().isDeep() || type.floating)
&& tile.floor().placeableOn
&& ((type.canReplace(tile.block())
&& (((type.canReplace(tile.block()) || (tile.block instanceof BuildBlock && tile.<BuildEntity>ent().cblock == type))
&& !(type == tile.block() && rotation == tile.rotation() && type.rotate)) || tile.block().alwaysReplace || tile.block() == Blocks.air)
&& tile.block().isMultiblock() == type.isMultiblock() && type.canPlaceOn(tile);
}