You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.2 KiB
Java
37 lines
1.2 KiB
Java
package net.minecraft.block;
|
|
|
|
import net.minecraft.block.material.Material;
|
|
import net.minecraft.tileentity.TileEntity;
|
|
import net.minecraft.world.World;
|
|
|
|
public abstract class BlockContainer extends Block implements ITileEntityProvider
|
|
{
|
|
private static final String __OBFID = "CL_00000193";
|
|
|
|
protected BlockContainer(Material p_i45386_1_)
|
|
{
|
|
super(p_i45386_1_);
|
|
this.isBlockContainer = true;
|
|
}
|
|
|
|
/**
|
|
* Called whenever the block is added into the world. Args: world, x, y, z
|
|
*/
|
|
public void onBlockAdded(World worldIn, int x, int y, int z)
|
|
{
|
|
super.onBlockAdded(worldIn, x, y, z);
|
|
}
|
|
|
|
public void breakBlock(World worldIn, int x, int y, int z, Block blockBroken, int meta)
|
|
{
|
|
super.breakBlock(worldIn, x, y, z, blockBroken, meta);
|
|
worldIn.removeTileEntity(x, y, z);
|
|
}
|
|
|
|
public boolean onBlockEventReceived(World worldIn, int x, int y, int z, int eventId, int eventData)
|
|
{
|
|
super.onBlockEventReceived(worldIn, x, y, z, eventId, eventData);
|
|
TileEntity tileentity = worldIn.getTileEntity(x, y, z);
|
|
return tileentity != null ? tileentity.receiveClientEvent(eventId, eventData) : false;
|
|
}
|
|
} |