From 71bc77e40659c3d9194d38ef0c06545c027f32f4 Mon Sep 17 00:00:00 2001 From: quaternary Date: Fri, 10 May 2019 18:57:10 -0400 Subject: [PATCH] Allow break-blacklisted blocks inside the arena (#2908) --- .../vazkii/botania/common/entity/EntityDoppleganger.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/vazkii/botania/common/entity/EntityDoppleganger.java b/src/main/java/vazkii/botania/common/entity/EntityDoppleganger.java index 96dde4164..3917d151c 100644 --- a/src/main/java/vazkii/botania/common/entity/EntityDoppleganger.java +++ b/src/main/java/vazkii/botania/common/entity/EntityDoppleganger.java @@ -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); } }