public abstract class TileUtil
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
TileUtil.ITileAction<T> |
static interface |
TileUtil.ITileGetResult<T,R> |
| Constructor and Description |
|---|
TileUtil() |
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
actOnTile(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
java.lang.Class<T> tileClass,
TileUtil.ITileAction<T> tileAction)
Performs an
TileUtil.ITileAction on a tile if the tile exists. |
static <T> T |
getInterface(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraftforge.common.capabilities.Capability<T> capability,
net.minecraft.util.EnumFacing facing) |
static net.minecraftforge.items.IItemHandler |
getInventoryFromTile(net.minecraft.tileentity.TileEntity tile,
net.minecraft.util.EnumFacing side) |
static <T,R> R |
getResultFromTile(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
java.lang.Class<T> tileClass,
TileUtil.ITileGetResult<T,R> tileGetResult)
Performs an
TileUtil.ITileGetResult on a tile if the tile exists. |
static net.minecraft.tileentity.TileEntity |
getTile(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos)
Returns the tile at the specified position, returns null if it is the wrong type or does not exist.
|
static <T> T |
getTile(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
java.lang.Class<T> tileClass)
Returns the tile of the specified class, returns null if it is the wrong type or does not exist.
|
static boolean |
isUsableByPlayer(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.tileentity.TileEntity tile) |
static void |
registerTile(java.lang.Class<? extends net.minecraft.tileentity.TileEntity> tileClass,
java.lang.String key) |
public static void registerTile(java.lang.Class<? extends net.minecraft.tileentity.TileEntity> tileClass,
java.lang.String key)
public static boolean isUsableByPlayer(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.tileentity.TileEntity tile)
@Nullable
public static net.minecraft.tileentity.TileEntity getTile(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos)
BlockFlowerPot.getActualState(IBlockState, IBlockAccess, BlockPos)@Nullable
public static <T> T getTile(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
java.lang.Class<T> tileClass)
BlockFlowerPot.getActualState(IBlockState, IBlockAccess, BlockPos)@Nullable
public static <T,R> R getResultFromTile(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
java.lang.Class<T> tileClass,
TileUtil.ITileGetResult<T,R> tileGetResult)
TileUtil.ITileGetResult on a tile if the tile exists.public static <T> void actOnTile(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
java.lang.Class<T> tileClass,
TileUtil.ITileAction<T> tileAction)
TileUtil.ITileAction on a tile if the tile exists.@Nullable
public static net.minecraftforge.items.IItemHandler getInventoryFromTile(@Nullable
net.minecraft.tileentity.TileEntity tile,
@Nullable
net.minecraft.util.EnumFacing side)
@Nullable
public static <T> T getInterface(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraftforge.common.capabilities.Capability<T> capability,
@Nullable
net.minecraft.util.EnumFacing facing)