Package net.minecraft.block
Class LeavesBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.LeavesBlock
- All Implemented Interfaces:
ItemConvertible
public class LeavesBlock extends Block
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroup
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
-
Field Summary
Fields Modifier and Type Field Description static IntProperty
DISTANCE
static BooleanProperty
PERSISTENT
Fields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManager
Fields inherited from class net.minecraft.block.AbstractBlock
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
-
Constructor Summary
Constructors Constructor Description LeavesBlock(AbstractBlock.Settings settings)
-
Method Summary
Modifier and Type Method Description protected void
appendProperties(StateManager.Builder<Block,BlockState> builder)
private static int
getDistanceFromLog(BlockState state)
int
getOpacity(BlockState state, BlockView world, BlockPos pos)
BlockState
getPlacementState(ItemPlacementContext ctx)
VoxelShape
getSidesShape(BlockState state, BlockView world, BlockPos pos)
BlockState
getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)
boolean
hasRandomTicks(BlockState state)
void
randomDisplayTick(BlockState state, World world, BlockPos pos, Random random)
void
randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random)
void
scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random)
private static BlockState
updateDistanceFromLogs(BlockState state, WorldAccess world, BlockPos pos)
Methods inherited from class net.minecraft.block.Block
addStacksForDisplay, afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasTopRim, is, isFaceFullSquare, isIn, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toString
Methods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOutlineShape, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, isSideInvisible, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, onUse, prepare, rotate
-
Field Details
-
DISTANCE
-
PERSISTENT
-
-
Constructor Details
-
LeavesBlock
-
-
Method Details
-
getSidesShape
- Overrides:
getSidesShape
in classAbstractBlock
-
hasRandomTicks
- Overrides:
hasRandomTicks
in classBlock
-
randomTick
- Overrides:
randomTick
in classAbstractBlock
-
scheduledTick
- Overrides:
scheduledTick
in classAbstractBlock
-
getOpacity
- Overrides:
getOpacity
in classAbstractBlock
-
getStateForNeighborUpdate
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)- Overrides:
getStateForNeighborUpdate
in classAbstractBlock
-
updateDistanceFromLogs
private static BlockState updateDistanceFromLogs(BlockState state, WorldAccess world, BlockPos pos) -
getDistanceFromLog
-
randomDisplayTick
@Environment(CLIENT) public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random)- Overrides:
randomDisplayTick
in classBlock
-
appendProperties
- Overrides:
appendProperties
in classBlock
-
getPlacementState
- Overrides:
getPlacementState
in classBlock
-