mirror of
https://github.com/TotalFreedomMC/OpenInv.git
synced 2025-02-05 14:22:52 +00:00
Merge pull request #17 from Hummer12007/master
Fix trapped chests linking with ordinary chests, instead of trapped ones
This commit is contained in:
commit
f6554a2a51
1 changed files with 4 additions and 2 deletions
|
@ -35,7 +35,8 @@ public class AnySilentChest implements IAnySilentChest {
|
|||
BlockPosition position = new BlockPosition(x, y, z);
|
||||
EntityPlayer player = ((CraftPlayer) p).getHandle();
|
||||
World world = player.world;
|
||||
BlockChest chest = (BlockChest) Block.getByName("chest");
|
||||
BlockChest chest = (BlockChest) (((BlockChest) world.getType(position).getBlock()).b == 1 ?
|
||||
Block.getByName("trapped_chest") : Block.getByName("chest"));
|
||||
|
||||
// If block on top
|
||||
if (topBlocking(world, position)) {
|
||||
|
@ -90,7 +91,8 @@ public class AnySilentChest implements IAnySilentChest {
|
|||
return true;
|
||||
}
|
||||
|
||||
BlockChest chest = (BlockChest) Block.getByName("chest");
|
||||
BlockChest chest = (BlockChest) (((BlockChest) world.getType(position).getBlock()).b == 1 ?
|
||||
Block.getByName("trapped_chest") : Block.getByName("chest"));
|
||||
|
||||
TileEntity tileEntity = world.getTileEntity(position);
|
||||
if (!(tileEntity instanceof TileEntityChest)) {
|
||||
|
|
Loading…
Reference in a new issue