use of net.minecraft.server.v1_8_R3.TileEntityEnderChest in project UltraCosmetics by iSach.
the class EntityUtil method playChestAnimation.
@Override
public void playChestAnimation(Block b, boolean open, TreasureChestDesign design) {
Location location = b.getLocation();
World world = ((CraftWorld) location.getWorld()).getHandle();
BlockPosition position = new BlockPosition(location.getX(), location.getY(), location.getZ());
if (design.getChestType() == ChestType.ENDER) {
TileEntityEnderChest tileChest = (TileEntityEnderChest) world.getTileEntity(position);
world.playBlockAction(position, tileChest.w(), 1, open ? 1 : 0);
} else {
TileEntityChest tileChest = (TileEntityChest) world.getTileEntity(position);
world.playBlockAction(position, tileChest.w(), 1, open ? 1 : 0);
}
}
Aggregations