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.BlockStatePairKey

    Nested 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

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.world.level.block.state.properties.IntegerProperty
     
    static final float
     
    static final double
     
    static final net.minecraft.world.level.block.state.properties.BooleanProperty
     
    static final int
     
    static final int
     
    static final net.minecraft.world.level.block.state.properties.IntegerProperty
     
    static final int
     

    Fields 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_DROPS

    Fields inherited from class net.minecraft.world.level.block.state.BlockBehaviour

    drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDER

    Fields inherited from interface net.minecraft.world.flag.FeatureElement

    FILTERED_REGISTRIES
  • Constructor Summary

    Constructors
    Constructor
    Description
    CoconutBlock(net.minecraft.world.level.block.grower.AbstractTreeGrower treeGrower, @NotNull net.minecraft.world.level.block.state.BlockBehaviour.Properties settings)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    advanceTree(@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)
     
    void
    animateTick(@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)
     
    boolean
    canSurvive(@NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull net.minecraft.world.level.LevelReader level, @NotNull net.minecraft.core.BlockPos pos)
     
    protected void
    createBlockStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.block.Block,net.minecraft.world.level.block.state.BlockState> builder)
     
    protected void
    falling(@NotNull net.minecraft.world.entity.item.FallingBlockEntity entity)
     
    @NotNull net.minecraft.world.phys.shapes.VoxelShape
    getCollisionShape(@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.BlockState
     
    static @NotNull net.minecraft.world.level.block.state.BlockState
    getHangingState(int age)
     
    @NotNull net.minecraft.world.phys.shapes.VoxelShape
    getShape(@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.BlockState
    getStateForPlacement(@NotNull net.minecraft.world.item.context.BlockPlaceContext ctx)
     
    boolean
    isBonemealSuccess(@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)
     
    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)
     
    boolean
    isValidBonemealTarget(@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 boolean
    mayPlaceOn(@NotNull net.minecraft.world.level.block.state.BlockState state)
     
    void
    onBrokenAfterFall(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.core.BlockPos pos, @NotNull net.minecraft.world.entity.item.FallingBlockEntity fallingBlock)
     
    void
    onLand(@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)
     
    void
    onProjectileHit(@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)
     
    void
    performBonemeal(@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)
     
    boolean
    propagatesSkylightDown(@NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull net.minecraft.world.level.BlockGetter level, @NotNull net.minecraft.core.BlockPos pos)
     
    void
    randomTick(@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)
     
    void
    tick(@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.BlockState
    updateShape(@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, onPlace

    Methods 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, withPropertiesOf

    Methods 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, useShapeForLightOcclusion

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.minecraft.world.level.block.Fallable

    getFallDamageSource

    Methods 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:
      getCollisionShape in class net.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:
      createBlockStateDefinition in class net.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:
      getStateForPlacement in class net.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:
      updateShape in class net.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:
      getShape in class net.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:
      canSurvive in class net.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:
      randomTick in class net.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:
      isValidBonemealTarget in interface net.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:
      isBonemealSuccess in interface net.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:
      performBonemeal in interface net.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:
      propagatesSkylightDown in class net.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:
      isPathfindable in class net.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:
      onProjectileHit in class net.minecraft.world.level.block.state.BlockBehaviour
    • falling

      protected void falling(@NotNull @NotNull net.minecraft.world.entity.item.FallingBlockEntity entity)
      Overrides:
      falling in class net.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:
      tick in class net.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:
      onLand in interface net.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:
      onBrokenAfterFall in interface net.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:
      animateTick in class net.minecraft.world.level.block.FallingBlock