Allow break-blacklisted blocks inside the arena (#2908)

This commit is contained in:
quaternary authored and Vincent Lee committed 2019-05-10 17:57:10 -05:00
1 parent 2b0233f771
commit 71bc77e406
1 file changed
+4 -2
@@ -281,8 +281,10 @@ public class EntityDoppleganger extends EntityLiving implements IBotaniaBoss, IE
pos = beaconPos.add(x, y, z);
IBlockState state = world.getBlockState(pos);
boolean allowBlockHere = y < 0;
boolean isBlockHere = world.getBlockState(pos).getCollisionBoundingBox(world, pos) != null;
boolean isBlockHere = state.getCollisionBoundingBox(world, pos) != null;
if(allowBlockHere && isBlockHere) //floor is here! good
hasFloor = true;
@@ -290,7 +292,7 @@ public class EntityDoppleganger extends EntityLiving implements IBotaniaBoss, IE
if(y == 0 && !hasFloor) //column is entirely missing floor
trippedPositions.add(pos.down());
if(!allowBlockHere && isBlockHere) //ceiling is obstructed in this column
if(!allowBlockHere && isBlockHere && !BotaniaAPI.gaiaBreakBlacklist.contains(state.getBlock())) //ceiling is obstructed in this column
trippedPositions.add(pos);
}
}