Class FlowerPatchBlock

java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.BushBlock
net.minecraft.world.level.block.FlowerBlock
com.mrbysco.flowerpatch.block.FlowerPatchBlock
All Implemented Interfaces:
PatchBlock, net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.block.BonemealableBlock, net.minecraft.world.level.block.SuspiciousEffectHolder, net.minecraft.world.level.ItemLike
Direct Known Subclasses:
WitherRosePatchBlock

public class FlowerPatchBlock extends net.minecraft.world.level.block.FlowerBlock implements net.minecraft.world.level.block.BonemealableBlock, PatchBlock
  • 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 extends Object>, 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
     
    protected static final net.minecraft.world.phys.shapes.VoxelShape
     
    static final int
     
    protected static final net.minecraft.world.phys.shapes.VoxelShape
     
    protected static final net.minecraft.world.phys.shapes.VoxelShape
     
    protected static final net.minecraft.world.phys.shapes.VoxelShape
     

    Fields inherited from class net.minecraft.world.level.block.FlowerBlock

    AABB_OFFSET, SHAPE

    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, UPDATE_SUPPRESS_LIGHT

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

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

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

    FILTERED_REGISTRIES
  • Constructor Summary

    Constructors
    Constructor
    Description
    FlowerPatchBlock(net.minecraft.world.effect.MobEffect mobEffect, int effectsDuration, Supplier<net.minecraft.world.level.block.Block> flowerSupplier, net.minecraft.world.level.block.state.BlockBehaviour.Properties properties)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canBeReplaced(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.item.context.BlockPlaceContext placeContext)
     
    protected void
    createBlockStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.block.Block,net.minecraft.world.level.block.state.BlockState> blockStateBuilder)
     
    net.minecraft.world.item.ItemStack
    getCloneItemStack(net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
    int
     
    Supplier<net.minecraft.world.level.block.Block>
     
    net.minecraft.world.level.block.state.properties.IntegerProperty
     
    net.minecraft.world.phys.shapes.VoxelShape
    getShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter blockGetter, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext collisionContext)
     
    boolean
    isBonemealSuccess(net.minecraft.world.level.Level level, net.minecraft.util.RandomSource randomSource, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
    boolean
    isValidBonemealTarget(net.minecraft.world.level.LevelReader levelReader, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, boolean isClient)
     
    void
    performBonemeal(net.minecraft.server.level.ServerLevel level, net.minecraft.util.RandomSource randomSource, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     

    Methods inherited from class net.minecraft.world.level.block.FlowerBlock

    getEffectDuration, getSuspiciousEffect

    Methods inherited from class net.minecraft.world.level.block.BushBlock

    canSurvive, isPathfindable, mayPlaceOn, propagatesSkylightDown, updateShape

    Methods inherited from class net.minecraft.world.level.block.Block

    animateTick, appendHoverText, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, dropResources, fallOn, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getSoundType, getSpeedFactor, getStateDefinition, getStateForPlacement, 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, defaultDestroyTime, defaultMaterialColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getPistonPushReaction, getRenderShape, getSeed, getShadeBrightness, getSignal, getVisualShape, hasAnalogOutputSignal, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isSignalSource, mirror, neighborChanged, onPlace, onProjectileHit, onRemove, randomTick, requiredFeatures, rotate, skipRendering, spawnAfterBreak, tick, 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.flag.FeatureElement

    isEnabled
  • Field Details

    • MAX_FLOWERS

      public static final int MAX_FLOWERS
      See Also:
    • FLOWERS

      public static final net.minecraft.world.level.block.state.properties.IntegerProperty FLOWERS
    • ONE_AABB

      protected static final net.minecraft.world.phys.shapes.VoxelShape ONE_AABB
    • TWO_AABB

      protected static final net.minecraft.world.phys.shapes.VoxelShape TWO_AABB
    • THREE_AABB

      protected static final net.minecraft.world.phys.shapes.VoxelShape THREE_AABB
    • FOUR_AABB

      protected static final net.minecraft.world.phys.shapes.VoxelShape FOUR_AABB
  • Constructor Details

    • FlowerPatchBlock

      public FlowerPatchBlock(net.minecraft.world.effect.MobEffect mobEffect, int effectsDuration, Supplier<net.minecraft.world.level.block.Block> flowerSupplier, net.minecraft.world.level.block.state.BlockBehaviour.Properties properties)
  • Method Details

    • canBeReplaced

      public boolean canBeReplaced(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.item.context.BlockPlaceContext placeContext)
      Overrides:
      canBeReplaced in class net.minecraft.world.level.block.state.BlockBehaviour
    • getPatchDelegate

      public Supplier<net.minecraft.world.level.block.Block> getPatchDelegate()
      Specified by:
      getPatchDelegate in interface PatchBlock
    • getProperty

      public net.minecraft.world.level.block.state.properties.IntegerProperty getProperty()
      Specified by:
      getProperty in interface PatchBlock
    • getMaxAmount

      public int getMaxAmount()
      Specified by:
      getMaxAmount in interface PatchBlock
    • getShape

      public net.minecraft.world.phys.shapes.VoxelShape getShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter blockGetter, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext collisionContext)
      Overrides:
      getShape in class net.minecraft.world.level.block.FlowerBlock
    • createBlockStateDefinition

      protected void createBlockStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.block.Block,net.minecraft.world.level.block.state.BlockState> blockStateBuilder)
      Overrides:
      createBlockStateDefinition in class net.minecraft.world.level.block.Block
    • getCloneItemStack

      public net.minecraft.world.item.ItemStack getCloneItemStack(net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
      Overrides:
      getCloneItemStack in class net.minecraft.world.level.block.Block
    • isValidBonemealTarget

      public boolean isValidBonemealTarget(net.minecraft.world.level.LevelReader levelReader, net.minecraft.core.BlockPos pos, 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(net.minecraft.world.level.Level level, net.minecraft.util.RandomSource randomSource, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
      Specified by:
      isBonemealSuccess in interface net.minecraft.world.level.block.BonemealableBlock
    • performBonemeal

      public void performBonemeal(net.minecraft.server.level.ServerLevel level, net.minecraft.util.RandomSource randomSource, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
      Specified by:
      performBonemeal in interface net.minecraft.world.level.block.BonemealableBlock