2014-11-27 07:55:04 -05:00
|
|
|
package WayofTime.alchemicalWizardry.common.demonVillage.tileEntity;
|
|
|
|
|
2014-11-27 15:55:14 -05:00
|
|
|
import net.minecraft.block.Block;
|
2014-11-27 07:55:04 -05:00
|
|
|
import net.minecraft.block.BlockChest;
|
|
|
|
import net.minecraft.inventory.IInventory;
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
import net.minecraft.world.World;
|
|
|
|
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
|
|
|
|
|
|
|
public class BlockDemonChest extends BlockChest implements IBlockPortalNode
|
|
|
|
{
|
|
|
|
public BlockDemonChest()
|
|
|
|
{
|
|
|
|
super(0);
|
|
|
|
this.setHardness(2.5F).setStepSound(soundTypeWood).setBlockName("demonChest");
|
|
|
|
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
|
|
|
}
|
|
|
|
|
|
|
|
public IInventory func_149951_m(World world, int x, int y, int z)
|
|
|
|
{
|
|
|
|
IInventory object = (IInventory)world.getTileEntity(x, y, z);
|
|
|
|
|
|
|
|
return object;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public TileEntity createNewTileEntity(World var1, int var2)
|
|
|
|
{
|
|
|
|
return new TEDemonChest();
|
|
|
|
}
|
|
|
|
|
2014-11-27 15:55:14 -05:00
|
|
|
@Override
|
|
|
|
public void breakBlock(World world, int x, int y, int z, Block block, int meta)
|
|
|
|
{
|
|
|
|
super.breakBlock(world, x, y, z, block, meta);
|
|
|
|
TileEntity tile = world.getTileEntity(x, y, z);
|
|
|
|
if(tile instanceof TEDemonChest)
|
|
|
|
{
|
|
|
|
((TEDemonChest) tile).notifyPortalOfInteraction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-11-27 07:55:04 -05:00
|
|
|
// @Override
|
|
|
|
// public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
|
|
|
|
// {
|
|
|
|
// return true;
|
|
|
|
// }
|
|
|
|
}
|