public class PowerComponent extends java.lang.Object implements IBlockComponent
| Modifier and Type | Class and Description |
|---|---|
static class |
PowerComponent.Type |
| Modifier and Type | Field and Description |
|---|---|
static net.minecraft.block.properties.PropertyBool |
POWER |
| Constructor and Description |
|---|
PowerComponent(PowerComponent.Type type) |
| Modifier and Type | Method and Description |
|---|---|
int |
getMetaFromState(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Gets the metadata from the
IBlockState. |
net.minecraft.block.properties.PropertyBool |
getProperty()
Gets the
IProperty used by this IBlockComponent. |
static net.minecraft.block.properties.PropertyBool |
getProperty(net.minecraft.block.Block block) |
net.minecraft.block.state.IBlockState |
getStateFromMeta(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state,
int meta)
Gets the
IBlockState from meta. |
static boolean |
isPowered(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos) |
static boolean |
isPowered(net.minecraft.block.state.IBlockState state) |
static boolean |
isRemotelyPowered(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos) |
static boolean |
isRemotelyPowered(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
boolean strongPower) |
boolean |
onBlockActivated(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.entity.player.EntityPlayer player,
net.minecraft.util.EnumHand hand,
net.minecraft.util.EnumFacing side,
float hitX,
float hitY,
float hitZ)
Called when the
Block is right-clicked by the player. |
void |
onNeighborBlockChange(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.block.Block neighborBlock)
Called when a neighboring
Block changes. |
net.minecraft.block.state.IBlockState |
setDefaultState(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Sets the default values for the
IBlockState. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbreakBlock, canPlaceBlockAt, canPlaceBlockOnSide, damageDropped, getBoundingBox, getBoundingBoxes, getItem, getItemDropped, getLightOpacity, getMapColor, getPackedLightmapCoords, getProperties, getSubBlocks, getUnlocalizedName, isFullBlock, isFullCube, isOpaqueCube, onBlockAdded, onBlockPlaced, onBlockPlacedBy, quantityDropped, shouldSideBeRenderedgetComponent, getDependencies, isClientComponentpublic PowerComponent(PowerComponent.Type type)
public net.minecraft.block.properties.PropertyBool getProperty()
IBlockComponentIProperty used by this IBlockComponent.getProperty in interface IBlockComponentpublic net.minecraft.block.state.IBlockState setDefaultState(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
IBlockComponentIBlockState.setDefaultState in interface IBlockComponentblock - the blockstate - the statepublic boolean onBlockActivated(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.entity.player.EntityPlayer player,
net.minecraft.util.EnumHand hand,
net.minecraft.util.EnumFacing side,
float hitX,
float hitY,
float hitZ)
IBlockComponentBlock is right-clicked by the player.onBlockActivated in interface IBlockComponentblock - the blockworld - the worldpos - the posstate - the stateplayer - the playerside - the sidehitX - the hit xhitY - the hit yhitZ - the hit zpublic void onNeighborBlockChange(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.block.Block neighborBlock)
IBlockComponentBlock changes.onNeighborBlockChange in interface IBlockComponentblock - the blockworld - the worldpos - the posstate - the stateneighborBlock - the neighbor blockpublic net.minecraft.block.state.IBlockState getStateFromMeta(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state,
int meta)
IBlockComponentIBlockState from meta.getStateFromMeta in interface IBlockComponentblock - the blockmeta - the metapublic int getMetaFromState(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
IBlockComponentIBlockState.getMetaFromState in interface IBlockComponentblock - the blockstate - the statepublic static boolean isPowered(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos)
public static boolean isPowered(net.minecraft.block.state.IBlockState state)
public static boolean isRemotelyPowered(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
public static boolean isRemotelyPowered(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
boolean strongPower)
public static net.minecraft.block.properties.PropertyBool getProperty(net.minecraft.block.Block block)