public interface IMovableRegistry
1. The Tile or its super classes have been white listed with whiteListTileEntity.
2. The Tile has been register with the IMC ( which basically calls whiteListTileEntity. )
3. The Tile implements IMovableTile 4. A IMovableHandler is register that returns canHandle = true for the Tile Entity Class
IMC Example: FMLInterModComms.sendMessage( "appliedenergistics2", "movabletile", "appeng.common.AppEngTile" );
The movement process is as follows,
1. IMovableTile.prepareToMove() or TileEntity.invalidate() depending on your opt-in method. 2. The tile will be removed from the world. 3. Its world, coordinates will be changed. *** this can be overridden with a IMovableHandler *** 4. It will then be re-added to the world, or a new world. 5. TileEntity.validate() 6. IMovableTile.doneMoving ( if you implemented IMovableTile )
Please note, this is a 100% white list only feature, I will never opt in any non-vanilla, non-AE blocks. If you do not want to support your tiles being moved, you don't have to do anything.
I appreciate anyone that takes the effort to get their tiles to work with this system to create a better use experience.
If you need a build of deobf build of AE for testing, do not hesitate to ask.
Modifier and Type | Method and Description |
---|---|
void |
addHandler(IMovableHandler handler)
add a new handler movable handler.
|
boolean |
askToMove(net.minecraft.tileentity.TileEntity te) |
void |
blacklistBlock(net.minecraft.block.Block blk)
Black list a block from movement, please only use this to prevent exploits.
|
void |
doneMoving(net.minecraft.tileentity.TileEntity te)
tells the tile you are done moving it.
|
IMovableHandler |
getDefaultHandler() |
IMovableHandler |
getHandler(net.minecraft.tileentity.TileEntity te)
handlers are used to perform movement, this allows you to override AE's internal version.
|
boolean |
isBlacklisted(net.minecraft.block.Block blk) |
void |
whiteListTileEntity(java.lang.Class<? extends net.minecraft.tileentity.TileEntity> c)
White list your tile entity with the registry.
|
void blacklistBlock(net.minecraft.block.Block blk)
You can also use the IMC, FMLInterModComms.sendMessage( "appliedenergistics2", "whitelist-spatial", "appeng.common.AppEngTile" );
blk
- blockvoid whiteListTileEntity(java.lang.Class<? extends net.minecraft.tileentity.TileEntity> c)
You can also use the IMC, FMLInterModComms.sendMessage( "appliedenergistics2", "blacklist-block-spatial", new ItemStack(...) );
If you tile is handled with IMovableHandler or IMovableTile you do not need to white list it.
boolean askToMove(net.minecraft.tileentity.TileEntity te)
te
- to be moved tile entityvoid doneMoving(net.minecraft.tileentity.TileEntity te)
te
- moved tile entityvoid addHandler(IMovableHandler handler)
handler
- moving handlerIMovableHandler getHandler(net.minecraft.tileentity.TileEntity te)
only valid after askToMove(...) = true
te
- tile entityIMovableHandler getDefaultHandler()
boolean isBlacklisted(net.minecraft.block.Block blk)
blk
- block