public static class ITickableComponent.PeriodicTickableComponent extends java.lang.Object implements IBlockComponent
MalisisBlock allows the block to tick periodically.| Constructor and Description |
|---|
PeriodicTickableComponent(ITickableComponent tickable)
Instantiates a new
ITickableComponent.PeriodicTickableComponent that will not start ticking automatically. |
PeriodicTickableComponent(ITickableComponent tickable,
int firstTickDelay)
Instantiates a new
ITickableComponent.PeriodicTickableComponent with the speicified delay before the first tick. |
| Modifier and Type | Method and Description |
|---|---|
void |
onBlockAdded(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state)
Called when the block is added to the
World |
int |
update(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
java.util.Random rand)
Updates this component and calls the
ITickableComponent callback. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbreakBlock, canPlaceBlockAt, canPlaceBlockOnSide, canProvidePower, damageDropped, getBoundingBox, getBoundingBoxes, getHasSubtypes, getItem, getItemDropped, getLightOpacity, getMapColor, getMetaFromState, getPackedLightmapCoords, getProperties, getProperty, getStateForPlacement, getStateFromMeta, getSubBlocks, getUnlocalizedName, isFullBlock, isFullCube, isOpaqueCube, onBlockActivated, onBlockPlacedBy, onNeighborBlockChange, quantityDropped, setDefaultState, shouldSideBeRenderedgetComponent, getDependencies, isClientComponent, onComponentAddedpublic PeriodicTickableComponent(ITickableComponent tickable, int firstTickDelay)
ITickableComponent.PeriodicTickableComponent with the speicified delay before the first tick.tickable - the tickablefirstTickDelay - delay before the first tick, 0 to not start ticking automatically.public PeriodicTickableComponent(ITickableComponent tickable)
ITickableComponent.PeriodicTickableComponent that will not start ticking automatically.tickable - the tickablepublic void onBlockAdded(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state)
IBlockComponentWorldonBlockAdded in interface IBlockComponentblock - the blockworld - the worldpos - the posstate - the statepublic int update(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
java.util.Random rand)
ITickableComponent callback.MalisisBlock.randomTick(World, BlockPos, IBlockState, Random).block - the blockworld - the worldpos - the posstate - the staterand - the rand