public interface IMovableHandler
Modifier and Type | Method and Description |
---|---|
boolean |
canHandle(java.lang.Class<? extends net.minecraft.tileentity.TileEntity> myClass,
net.minecraft.tileentity.TileEntity tile)
if you return true from this, your saying you can handle the class, not
that single entity, you cannot opt out of single entities.
|
void |
moveTile(net.minecraft.tileentity.TileEntity tile,
net.minecraft.world.World world,
int x,
int y,
int z)
request that the handler move the the tile from its current location to
the new one.
|
boolean canHandle(java.lang.Class<? extends net.minecraft.tileentity.TileEntity> myClass, net.minecraft.tileentity.TileEntity tile)
myClass
- tile entity classtile
- tile entityvoid moveTile(net.minecraft.tileentity.TileEntity tile, net.minecraft.world.World world, int x, int y, int z)
Potential Example:
Chunk c = world.getChunkFromBlockCoords( x, z ); c.setChunkBlockTileEntity( x
& 0xF, y + y, z & 0xF, tile );
if ( c.isChunkLoaded ) { world.addTileEntity( tile ); world.markBlockForUpdate( x,
y, z ); }
tile
- to be moved tileworld
- world of tilex
- x coord of tiley
- y coord of tilez
- z coord of tile