diff --git a/src/lishid/openinv/OpenInvPlayerListener.java b/src/lishid/openinv/OpenInvPlayerListener.java index 5e37f55..0729889 100644 --- a/src/lishid/openinv/OpenInvPlayerListener.java +++ b/src/lishid/openinv/OpenInvPlayerListener.java @@ -96,21 +96,25 @@ public class OpenInvPlayerListener implements Listener { try { + + + + // FOR REFERENCE, LOOK AT net.minecraft.server.BlockChest EntityPlayer player = ((CraftPlayer) event.getPlayer()).getHandle(); World world = player.world; // If block on top - if (world.e(x, y + 1, z)) + if (world.s(x, y + 1, z)) anychest = true; // If block next to chest is chest and has a block on top - if ((world.getTypeId(x - 1, y, z) == Block.CHEST.id) && (world.e(x - 1, y + 1, z))) + if ((world.getTypeId(x - 1, y, z) == Block.CHEST.id) && (world.s(x - 1, y + 1, z))) anychest = true; - if ((world.getTypeId(x + 1, y, z) == Block.CHEST.id) && (world.e(x + 1, y + 1, z))) + if ((world.getTypeId(x + 1, y, z) == Block.CHEST.id) && (world.s(x + 1, y + 1, z))) anychest = true; - if ((world.getTypeId(x, y, z - 1) == Block.CHEST.id) && (world.e(x, y + 1, z - 1))) + if ((world.getTypeId(x, y, z - 1) == Block.CHEST.id) && (world.s(x, y + 1, z - 1))) anychest = true; - if ((world.getTypeId(x, y, z + 1) == Block.CHEST.id) && (world.e(x, y + 1, z + 1))) + if ((world.getTypeId(x, y, z + 1) == Block.CHEST.id) && (world.s(x, y + 1, z + 1))) anychest = true; } catch (Exception e) @@ -131,15 +135,15 @@ public class OpenInvPlayerListener implements Listener if (!anychest) { - if (world.e(x, y + 1, z)) + if (world.s(x, y + 1, z)) return; - if ((world.getTypeId(x - 1, y, z) == Block.CHEST.id) && (world.e(x - 1, y + 1, z))) + if ((world.getTypeId(x - 1, y, z) == Block.CHEST.id) && (world.s(x - 1, y + 1, z))) return; - if ((world.getTypeId(x + 1, y, z) == Block.CHEST.id) && (world.e(x + 1, y + 1, z))) + if ((world.getTypeId(x + 1, y, z) == Block.CHEST.id) && (world.s(x + 1, y + 1, z))) return; - if ((world.getTypeId(x, y, z - 1) == Block.CHEST.id) && (world.e(x, y + 1, z - 1))) + if ((world.getTypeId(x, y, z - 1) == Block.CHEST.id) && (world.s(x, y + 1, z - 1))) return; - if ((world.getTypeId(x, y, z + 1) == Block.CHEST.id) && (world.e(x, y + 1, z + 1))) + if ((world.getTypeId(x, y, z + 1) == Block.CHEST.id) && (world.s(x, y + 1, z + 1))) return; } diff --git a/src/lishid/openinv/utils/SilentContainerChest.java b/src/lishid/openinv/utils/SilentContainerChest.java index 8072a0f..cc7c914 100644 --- a/src/lishid/openinv/utils/SilentContainerChest.java +++ b/src/lishid/openinv/utils/SilentContainerChest.java @@ -29,7 +29,7 @@ public class SilentContainerChest extends ContainerChest super(i1, i2); inv = i2; // close signal - inv.g(); + inv.f(); } @Override @@ -37,6 +37,6 @@ public class SilentContainerChest extends ContainerChest { super.a(paramEntityHuman); // open signal - inv.f(); + inv.startOpen(); } } \ No newline at end of file diff --git a/src/plugin.yml b/src/plugin.yml index 3fc252d..5bc5f2d 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: OpenInv main: lishid.openinv.OpenInv -version: 1.8.5 +version: 1.8.6 author: lishid website: http://forums.bukkit.org/threads/15379/ description: >