pick 97420a31d The big reformat of 2020
This commit is contained in:
@@ -23,50 +23,46 @@
|
||||
|
||||
package appeng.api.movable;
|
||||
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IMovableHandler {
|
||||
|
||||
public interface IMovableHandler
|
||||
{
|
||||
/**
|
||||
* if you return true from this, your saying you can handle the class, not that
|
||||
* single entity, you cannot opt out of single entities.
|
||||
*
|
||||
* @param myClass tile entity class
|
||||
* @param tile tile entity
|
||||
*
|
||||
* @return true if it can handle moving
|
||||
*/
|
||||
boolean canHandle(Class<? extends TileEntity> myClass, 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.
|
||||
*
|
||||
* @param myClass tile entity class
|
||||
* @param tile tile entity
|
||||
*
|
||||
* @return true if it can handle moving
|
||||
*/
|
||||
boolean canHandle( Class<? extends TileEntity> myClass, TileEntity tile );
|
||||
|
||||
/**
|
||||
* request that the handler move the the tile from its current location to
|
||||
* the new one. the tile has already been invalidated, and the blocks have
|
||||
* already been fully moved.
|
||||
*
|
||||
* Potential Example:
|
||||
*
|
||||
* <pre>
|
||||
* {
|
||||
* @code
|
||||
* Chunk c = world.getChunkAt( x, z );
|
||||
* c.setChunkBlockTileEntity( x & 0xF, y + y, z & 0xF, tile );
|
||||
*
|
||||
* if( c.isChunkLoaded )
|
||||
* {
|
||||
* world.addTileEntity( tile );
|
||||
* world.markBlockForUpdate( x, y, z );
|
||||
* }
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @param tile to be moved tile
|
||||
* @param world world of tile
|
||||
* @param newPosition the new location
|
||||
*/
|
||||
void moveTile( TileEntity tile, World world, BlockPos newPosition );
|
||||
/**
|
||||
* request that the handler move the the tile from its current location to the
|
||||
* new one. the tile has already been invalidated, and the blocks have already
|
||||
* been fully moved.
|
||||
*
|
||||
* Potential Example:
|
||||
*
|
||||
* <pre>
|
||||
* {
|
||||
* @code
|
||||
* Chunk c = world.getChunkAt(x, z);
|
||||
* c.setChunkBlockTileEntity(x & 0xF, y + y, z & 0xF, tile);
|
||||
*
|
||||
* if (c.isChunkLoaded) {
|
||||
* world.addTileEntity(tile);
|
||||
* world.markBlockForUpdate(x, y, z);
|
||||
* }
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @param tile to be moved tile
|
||||
* @param world world of tile
|
||||
* @param newPosition the new location
|
||||
*/
|
||||
void moveTile(TileEntity tile, World world, BlockPos newPosition);
|
||||
}
|
||||
Reference in New Issue
Block a user