diff --git a/src/main/java/me/rigamortis/seppuku/impl/module/combat/BurrowModule.java b/src/main/java/me/rigamortis/seppuku/impl/module/combat/BurrowModule.java index 8aa2559..b261c52 100644 --- a/src/main/java/me/rigamortis/seppuku/impl/module/combat/BurrowModule.java +++ b/src/main/java/me/rigamortis/seppuku/impl/module/combat/BurrowModule.java @@ -62,7 +62,7 @@ public final class BurrowModule extends Module { final Minecraft mc = Minecraft.getMinecraft(); burrowPos = new BlockPos(mc.player.posX, Math.ceil(mc.player.posY), mc.player.posZ); - // ceil so you can burrow ontop of echests, path blocks etc (minor detail) + // ceil so you can burrow while standing on an echest if (doChecks()) { // attempt to center @@ -197,6 +197,11 @@ public final class BurrowModule extends Module { return false; } + if (!mc.world.isAirBlock(burrowPos.offset(EnumFacing.UP, 2))) { // is the player trapped + Seppuku.INSTANCE.getNotificationManager().addNotification("", "Not enough space to use " + this.getDisplayName(), Notification.Type.WARNING, 3000); + return false; + } + for (final Entity entity : mc.world.loadedEntityList) { if (!(entity instanceof EntityItem) && !entity.equals(mc.player)) { if (new AxisAlignedBB(burrowPos).intersects(entity.getEntityBoundingBox())) { // is there another player in the hole