Added more checks to burrow
This commit is contained in:
parent
52a7f15a8f
commit
9d316ba160
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue