mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-11-28 16:06:07 +00:00
More 1.7.2 stuff
This commit is contained in:
1 parent
777ad58305
commit
cccc40ccdf
469 files changed
+11277
-7405
No files matched your search
Executable → Regular
+52
-44
@@ -3,80 +3,88 @@ package appeng.api.movable;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
/**
|
||||
* Used to determine if a tile is marked as movable, a block will be considered
|
||||
* movable, if...
|
||||
*
|
||||
* 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. )
|
||||
*
|
||||
* Used to determine if a tile is marked as movable, a block will be considered movable, if...
|
||||
*
|
||||
* 1. The Tile or its super classes have been white listed with whiteListTileEntity.
|
||||
* 2. The Tile has been register with the ICM ( which basically calls whiteListTileEntity. )
|
||||
* 3. The Tile implements IMovableTile
|
||||
* 4. A IMovableHandler is register that returns canHandle = true for the Tile Entity Class
|
||||
*
|
||||
* ICM Example:
|
||||
* FMLInterModComms.sendMessage( "AppliedEnergistics", "movabletile", "appeng.common.AppEngTile" );
|
||||
*
|
||||
* 3. The Tile implements IMovableTile 4.
|
||||
* A IMovableHandler is register that returns canHandle = true for the Tile
|
||||
* Entity Class
|
||||
*
|
||||
* IMC Example: FMLInterModComms.sendMessage( "AppliedEnergistics",
|
||||
* "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.
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
public interface IMovableRegistry {
|
||||
|
||||
public interface IMovableRegistry
|
||||
{
|
||||
|
||||
/**
|
||||
* White list your tile entity with the registry.
|
||||
*
|
||||
* You can also use the ICM,
|
||||
* FMLInterModComms.sendMessage( "AppliedEnergistics", "movabletile", "appeng.common.AppEngTile" );
|
||||
*
|
||||
* If you tile is handled with IMovableHandler or IMovableTile you do not need to white list it.
|
||||
*
|
||||
*
|
||||
* You can also use the IMC, FMLInterModComms.sendMessage(
|
||||
* "AppliedEnergistics", "movabletile", "appeng.common.AppEngTile" );
|
||||
*
|
||||
* If you tile is handled with IMovableHandler or IMovableTile you do not
|
||||
* need to white list it.
|
||||
*/
|
||||
void whiteListTileEntity( Class<? extends TileEntity> c );
|
||||
void whiteListTileEntity(Class<? extends TileEntity> c);
|
||||
|
||||
/**
|
||||
* returns true if the tile has accepted your request to move it.
|
||||
* @param te
|
||||
* @return
|
||||
* @return true if the tile has accepted your request to move it
|
||||
*/
|
||||
boolean askToMove( TileEntity te );
|
||||
boolean askToMove(TileEntity te);
|
||||
|
||||
/**
|
||||
* tells the tile you are done moving it.
|
||||
*
|
||||
* @param te
|
||||
*/
|
||||
void doneMoveing( TileEntity te );
|
||||
void doneMoving(TileEntity te);
|
||||
|
||||
/**
|
||||
* add a new handler movable handler.
|
||||
* @param han
|
||||
*
|
||||
* @param handler
|
||||
*/
|
||||
void addHandler( IMovableHandler han );
|
||||
void addHandler(IMovableHandler handler);
|
||||
|
||||
/**
|
||||
* handlers are used to perform movement, this allows you to override AE's internal version.
|
||||
*
|
||||
* handlers are used to perform movement, this allows you to override AE's
|
||||
* internal version.
|
||||
*
|
||||
* only valid after askToMove(...) = true
|
||||
*
|
||||
* @param te
|
||||
* @return
|
||||
*/
|
||||
IMovableHandler getHandler(TileEntity te);
|
||||
|
||||
/**
|
||||
* returns a copy of the default handler
|
||||
* @return
|
||||
* @return a copy of the default handler
|
||||
*/
|
||||
IMovableHandler getDefaultHandler();
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user