Package net.frozenblock.wilderwild.block
Class CoconutBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.FallingBlock
net.frozenblock.wilderwild.block.CoconutBlock
- All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement,net.minecraft.world.level.block.BonemealableBlock,net.minecraft.world.level.block.Fallable,net.minecraft.world.level.ItemLike
public class CoconutBlock
extends net.minecraft.world.level.block.FallingBlock
implements net.minecraft.world.level.block.BonemealableBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block
net.minecraft.world.level.block.Block.BlockStatePairKeyNested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.state.BlockBehaviour.BlockStateBase, net.minecraft.world.level.block.state.BlockBehaviour.OffsetFunction, net.minecraft.world.level.block.state.BlockBehaviour.OffsetType, net.minecraft.world.level.block.state.BlockBehaviour.Properties, net.minecraft.world.level.block.state.BlockBehaviour.StateArgumentPredicate<A>, net.minecraft.world.level.block.state.BlockBehaviour.StatePredicate -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.world.level.block.state.properties.IntegerPropertystatic final floatstatic final doublestatic final net.minecraft.world.level.block.state.properties.BooleanPropertystatic final intstatic final intstatic final net.minecraft.world.level.block.state.properties.IntegerPropertystatic final intFields inherited from class net.minecraft.world.level.block.Block
BLOCK_STATE_REGISTRY, INDESTRUCTIBLE, INSTANT, stateDefinition, UPDATE_ALL, UPDATE_ALL_IMMEDIATE, UPDATE_CLIENTS, UPDATE_IMMEDIATE, UPDATE_INVISIBLE, UPDATE_KNOWN_SHAPE, UPDATE_LIMIT, UPDATE_MOVE_BY_PISTON, UPDATE_NEIGHBORS, UPDATE_NONE, UPDATE_SUPPRESS_DROPSFields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
ConstructorsConstructorDescriptionCoconutBlock(net.minecraft.world.level.block.grower.AbstractTreeGrower treeGrower, @NotNull net.minecraft.world.level.block.state.BlockBehaviour.Properties settings) -
Method Summary
Modifier and TypeMethodDescriptionvoidadvanceTree(@NotNull net.minecraft.server.level.ServerLevel level, @NotNull net.minecraft.core.BlockPos pos, @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull net.minecraft.util.RandomSource random) voidanimateTick(@NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.core.BlockPos pos, @NotNull net.minecraft.util.RandomSource random) booleancanSurvive(@NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull net.minecraft.world.level.LevelReader level, @NotNull net.minecraft.core.BlockPos pos) protected voidcreateBlockStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.block.Block, net.minecraft.world.level.block.state.BlockState> builder) protected voidfalling(@NotNull net.minecraft.world.entity.item.FallingBlockEntity entity) @NotNull net.minecraft.world.phys.shapes.VoxelShapegetCollisionShape(@NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull net.minecraft.world.level.BlockGetter level, @NotNull net.minecraft.core.BlockPos pos, @NotNull net.minecraft.world.phys.shapes.CollisionContext context) static @NotNull net.minecraft.world.level.block.state.BlockStatestatic @NotNull net.minecraft.world.level.block.state.BlockStategetHangingState(int age) @NotNull net.minecraft.world.phys.shapes.VoxelShapegetShape(@NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull net.minecraft.world.level.BlockGetter level, @NotNull net.minecraft.core.BlockPos pos, @NotNull net.minecraft.world.phys.shapes.CollisionContext context) @Nullable net.minecraft.world.level.block.state.BlockStategetStateForPlacement(@NotNull net.minecraft.world.item.context.BlockPlaceContext ctx) booleanisBonemealSuccess(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.util.RandomSource random, @NotNull net.minecraft.core.BlockPos pos, @NotNull net.minecraft.world.level.block.state.BlockState state) booleanisPathfindable(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.pathfinder.PathComputationType type) booleanisValidBonemealTarget(@NotNull net.minecraft.world.level.LevelReader world, @NotNull net.minecraft.core.BlockPos pos, @NotNull net.minecraft.world.level.block.state.BlockState state, boolean isClient) protected booleanmayPlaceOn(@NotNull net.minecraft.world.level.block.state.BlockState state) voidonBrokenAfterFall(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.core.BlockPos pos, @NotNull net.minecraft.world.entity.item.FallingBlockEntity fallingBlock) voidonLand(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.core.BlockPos pos, @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull net.minecraft.world.level.block.state.BlockState replaceableState, @NotNull net.minecraft.world.entity.item.FallingBlockEntity fallingBlock) voidonProjectileHit(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull net.minecraft.world.phys.BlockHitResult hit, @NotNull net.minecraft.world.entity.projectile.Projectile projectile) voidperformBonemeal(@NotNull net.minecraft.server.level.ServerLevel level, @NotNull net.minecraft.util.RandomSource random, @NotNull net.minecraft.core.BlockPos pos, @NotNull net.minecraft.world.level.block.state.BlockState state) booleanpropagatesSkylightDown(@NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull net.minecraft.world.level.BlockGetter level, @NotNull net.minecraft.core.BlockPos pos) voidrandomTick(@NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull net.minecraft.server.level.ServerLevel level, @NotNull net.minecraft.core.BlockPos pos, @NotNull net.minecraft.util.RandomSource random) voidtick(@NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull net.minecraft.server.level.ServerLevel level, @NotNull net.minecraft.core.BlockPos pos, @NotNull net.minecraft.util.RandomSource random) @NotNull net.minecraft.world.level.block.state.BlockStateupdateShape(@NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull net.minecraft.core.Direction direction, @NotNull net.minecraft.world.level.block.state.BlockState neighborState, @NotNull net.minecraft.world.level.LevelAccessor level, @NotNull net.minecraft.core.BlockPos currentPos, @NotNull net.minecraft.core.BlockPos neighborPos) Methods inherited from class net.minecraft.world.level.block.FallingBlock
getDelayAfterPlace, getDustColor, isFree, onPlaceMethods inherited from class net.minecraft.world.level.block.Block
appendHoverText, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getSoundType, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isRandomlyTicking, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOfMethods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getDestroyProgress, getDirectSignal, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getSignal, getVisualShape, hasAnalogOutputSignal, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isSignalSource, mirror, neighborChanged, onRemove, requiredFeatures, rotate, skipRendering, spawnAfterBreak, triggerEvent, updateIndirectNeighbourShapes, use, useShapeForLightOcclusionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.block.Fallable
getFallDamageSourceMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
-
Field Details
-
GROWTH_CHANCE_HANGING
public static final double GROWTH_CHANCE_HANGING- See Also:
-
VALID_FROND_DISTANCE
public static final int VALID_FROND_DISTANCE- See Also:
-
MAX_AGE
public static final int MAX_AGE- See Also:
-
FALL_DAMAGE_PER_DISTANCE
public static final float FALL_DAMAGE_PER_DISTANCE- See Also:
-
MAX_FALL_DAMAGE
public static final int MAX_FALL_DAMAGE- See Also:
-
STAGE
public static final net.minecraft.world.level.block.state.properties.IntegerProperty STAGE -
AGE
public static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE -
HANGING
public static final net.minecraft.world.level.block.state.properties.BooleanProperty HANGING
-
-
Constructor Details
-
CoconutBlock
public CoconutBlock(net.minecraft.world.level.block.grower.AbstractTreeGrower treeGrower, @NotNull @NotNull net.minecraft.world.level.block.state.BlockBehaviour.Properties settings)
-
-
Method Details
-
getDefaultHangingState
@NotNull public static @NotNull net.minecraft.world.level.block.state.BlockState getDefaultHangingState() -
getHangingState
@NotNull public static @NotNull net.minecraft.world.level.block.state.BlockState getHangingState(int age) -
advanceTree
public void advanceTree(@NotNull @NotNull net.minecraft.server.level.ServerLevel level, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull @NotNull net.minecraft.util.RandomSource random) -
getCollisionShape
@NotNull public @NotNull net.minecraft.world.phys.shapes.VoxelShape getCollisionShape(@NotNull @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull @NotNull net.minecraft.world.level.BlockGetter level, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull net.minecraft.world.phys.shapes.CollisionContext context) - Overrides:
getCollisionShapein classnet.minecraft.world.level.block.state.BlockBehaviour
-
createBlockStateDefinition
protected void createBlockStateDefinition(@NotNull net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.block.Block, net.minecraft.world.level.block.state.BlockState> builder) - Overrides:
createBlockStateDefinitionin classnet.minecraft.world.level.block.Block
-
getStateForPlacement
@Nullable public @Nullable net.minecraft.world.level.block.state.BlockState getStateForPlacement(@NotNull @NotNull net.minecraft.world.item.context.BlockPlaceContext ctx) - Overrides:
getStateForPlacementin classnet.minecraft.world.level.block.Block
-
updateShape
@NotNull public @NotNull net.minecraft.world.level.block.state.BlockState updateShape(@NotNull @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull @NotNull net.minecraft.core.Direction direction, @NotNull @NotNull net.minecraft.world.level.block.state.BlockState neighborState, @NotNull @NotNull net.minecraft.world.level.LevelAccessor level, @NotNull @NotNull net.minecraft.core.BlockPos currentPos, @NotNull @NotNull net.minecraft.core.BlockPos neighborPos) - Overrides:
updateShapein classnet.minecraft.world.level.block.FallingBlock
-
getShape
@NotNull public @NotNull net.minecraft.world.phys.shapes.VoxelShape getShape(@NotNull @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull @NotNull net.minecraft.world.level.BlockGetter level, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull net.minecraft.world.phys.shapes.CollisionContext context) - Overrides:
getShapein classnet.minecraft.world.level.block.state.BlockBehaviour
-
canSurvive
public boolean canSurvive(@NotNull @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull @NotNull net.minecraft.world.level.LevelReader level, @NotNull @NotNull net.minecraft.core.BlockPos pos) - Overrides:
canSurvivein classnet.minecraft.world.level.block.state.BlockBehaviour
-
mayPlaceOn
protected boolean mayPlaceOn(@NotNull @NotNull net.minecraft.world.level.block.state.BlockState state) -
randomTick
public void randomTick(@NotNull @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull @NotNull net.minecraft.server.level.ServerLevel level, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull net.minecraft.util.RandomSource random) - Overrides:
randomTickin classnet.minecraft.world.level.block.state.BlockBehaviour
-
isValidBonemealTarget
public boolean isValidBonemealTarget(@NotNull @NotNull net.minecraft.world.level.LevelReader world, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull net.minecraft.world.level.block.state.BlockState state, boolean isClient) - Specified by:
isValidBonemealTargetin interfacenet.minecraft.world.level.block.BonemealableBlock
-
isBonemealSuccess
public boolean isBonemealSuccess(@NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.util.RandomSource random, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull net.minecraft.world.level.block.state.BlockState state) - Specified by:
isBonemealSuccessin interfacenet.minecraft.world.level.block.BonemealableBlock
-
performBonemeal
public void performBonemeal(@NotNull @NotNull net.minecraft.server.level.ServerLevel level, @NotNull @NotNull net.minecraft.util.RandomSource random, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull net.minecraft.world.level.block.state.BlockState state) - Specified by:
performBonemealin interfacenet.minecraft.world.level.block.BonemealableBlock
-
propagatesSkylightDown
public boolean propagatesSkylightDown(@NotNull @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull @NotNull net.minecraft.world.level.BlockGetter level, @NotNull @NotNull net.minecraft.core.BlockPos pos) - Overrides:
propagatesSkylightDownin classnet.minecraft.world.level.block.Block
-
isPathfindable
public boolean isPathfindable(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.pathfinder.PathComputationType type) - Overrides:
isPathfindablein classnet.minecraft.world.level.block.state.BlockBehaviour
-
onProjectileHit
public void onProjectileHit(@NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull @NotNull net.minecraft.world.phys.BlockHitResult hit, @NotNull @NotNull net.minecraft.world.entity.projectile.Projectile projectile) - Overrides:
onProjectileHitin classnet.minecraft.world.level.block.state.BlockBehaviour
-
falling
protected void falling(@NotNull @NotNull net.minecraft.world.entity.item.FallingBlockEntity entity) - Overrides:
fallingin classnet.minecraft.world.level.block.FallingBlock
-
tick
public void tick(@NotNull @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull @NotNull net.minecraft.server.level.ServerLevel level, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull net.minecraft.util.RandomSource random) - Overrides:
tickin classnet.minecraft.world.level.block.FallingBlock
-
onLand
public void onLand(@NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull @NotNull net.minecraft.world.level.block.state.BlockState replaceableState, @NotNull @NotNull net.minecraft.world.entity.item.FallingBlockEntity fallingBlock) - Specified by:
onLandin interfacenet.minecraft.world.level.block.Fallable
-
onBrokenAfterFall
public void onBrokenAfterFall(@NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull net.minecraft.world.entity.item.FallingBlockEntity fallingBlock) - Specified by:
onBrokenAfterFallin interfacenet.minecraft.world.level.block.Fallable
-
animateTick
public void animateTick(@NotNull @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull net.minecraft.util.RandomSource random) - Overrides:
animateTickin classnet.minecraft.world.level.block.FallingBlock
-