Class MartianStrawberryBushBlock

java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.BushBlock
com.lightning.northstar.block.crops.MartianStrawberryBushBlock
All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.block.BonemealableBlock, net.minecraft.world.level.ItemLike, net.neoforged.neoforge.common.extensions.IBlockExtension

public class MartianStrawberryBushBlock extends net.minecraft.world.level.block.BushBlock 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

    Nested classes/interfaces inherited from interface net.minecraft.world.level.block.BonemealableBlock

    net.minecraft.world.level.block.BonemealableBlock.Type
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.world.level.block.state.properties.IntegerProperty
     
    static final com.mojang.serialization.MapCodec<MartianStrawberryBushBlock>
     
    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
    MartianStrawberryBushBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties pProperties)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canSurvive(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.LevelReader pLevel, net.minecraft.core.BlockPos pPos)
     
    protected com.mojang.serialization.MapCodec<? extends net.minecraft.world.level.block.BushBlock>
     
    protected void
    createBlockStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.block.Block,net.minecraft.world.level.block.state.BlockState> pBuilder)
     
    void
    entityInside(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.entity.Entity pEntity)
     
    protected int
    getAge(net.minecraft.world.level.block.state.BlockState pState)
     
    net.minecraft.world.level.block.state.properties.IntegerProperty
     
    protected net.minecraft.world.level.ItemLike
     
    protected int
    getBonemealAgeIncrease(net.minecraft.world.level.Level pLevel)
     
    protected static float
    getGrowthSpeed(net.minecraft.world.level.block.Block pBlock, net.minecraft.world.level.BlockGetter pLevel, net.minecraft.core.BlockPos pPos)
     
    int
     
    net.minecraft.world.phys.shapes.VoxelShape
    getShape(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.BlockGetter pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.phys.shapes.CollisionContext pContext)
     
    net.minecraft.world.level.block.state.BlockState
    getStateForAge(int pAge)
     
    void
    growCrops(net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.block.state.BlockState pState)
     
    boolean
    isBonemealSuccess(net.minecraft.world.level.Level pLevel, net.minecraft.util.RandomSource pRandom, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.block.state.BlockState pState)
     
    boolean
    isMaxAge(net.minecraft.world.level.block.state.BlockState pState)
     
    boolean
    isRandomlyTicking(net.minecraft.world.level.block.state.BlockState pState)
     
    boolean
    isValidBonemealTarget(net.minecraft.world.level.LevelReader pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.block.state.BlockState pState)
     
    protected boolean
    mayPlaceOn(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.BlockGetter pLevel, net.minecraft.core.BlockPos pPos)
     
    void
    performBonemeal(net.minecraft.server.level.ServerLevel pLevel, net.minecraft.util.RandomSource pRandom, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.block.state.BlockState pState)
     
    void
    randomTick(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.server.level.ServerLevel pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.util.RandomSource pRandom)
    Performs a random tick on a block.
    protected net.minecraft.world.ItemInteractionResult
    useItemOn(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult hit)
     

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

    isPathfindable, 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, fallOn, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getSpeedFactor, getStateDefinition, getStateForPlacement, handlePrecipitation, hasDynamicShape, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, 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, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isSignalSource, mirror, neighborChanged, onExplosionHit, onPlace, onProjectileHit, onRemove, properties, propertiesCodec, requiredFeatures, rotate, simpleCodec, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, useShapeForLightOcclusion, useWithoutItem

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

    getParticlePos, getType

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

    isEnabled

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockExtension

    addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, canSustainPlant, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getBubbleColumnDirection, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasDynamicLightEmission, hidesNeighborFace, isBed, isBurning, isConduitFrame, isEmpty, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onDestroyedByPushReaction, onNeighborChange, onTreeGrow, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHiding
  • Field Details

    • CODEC

      public static final com.mojang.serialization.MapCodec<MartianStrawberryBushBlock> CODEC
    • MAX_AGE

      public static final int MAX_AGE
      See Also:
    • AGE

      public static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE
  • Constructor Details

    • MartianStrawberryBushBlock

      public MartianStrawberryBushBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties pProperties)
  • Method Details

    • codec

      protected com.mojang.serialization.MapCodec<? extends net.minecraft.world.level.block.BushBlock> codec()
      Specified by:
      codec in class net.minecraft.world.level.block.BushBlock
    • getShape

      public net.minecraft.world.phys.shapes.VoxelShape getShape(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.BlockGetter pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.phys.shapes.CollisionContext pContext)
      Overrides:
      getShape in class net.minecraft.world.level.block.state.BlockBehaviour
    • mayPlaceOn

      protected boolean mayPlaceOn(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.BlockGetter pLevel, net.minecraft.core.BlockPos pPos)
      Overrides:
      mayPlaceOn in class net.minecraft.world.level.block.BushBlock
    • getAgeProperty

      public net.minecraft.world.level.block.state.properties.IntegerProperty getAgeProperty()
    • getMaxAge

      public int getMaxAge()
    • getAge

      protected int getAge(net.minecraft.world.level.block.state.BlockState pState)
    • getStateForAge

      public net.minecraft.world.level.block.state.BlockState getStateForAge(int pAge)
    • isMaxAge

      public boolean isMaxAge(net.minecraft.world.level.block.state.BlockState pState)
    • isRandomlyTicking

      public boolean isRandomlyTicking(net.minecraft.world.level.block.state.BlockState pState)
      Overrides:
      isRandomlyTicking in class net.minecraft.world.level.block.state.BlockBehaviour
      Returns:
      whether this block needs random ticking.
    • randomTick

      public void randomTick(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.server.level.ServerLevel pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.util.RandomSource pRandom)
      Performs a random tick on a block.
      Overrides:
      randomTick in class net.minecraft.world.level.block.state.BlockBehaviour
    • useItemOn

      protected net.minecraft.world.ItemInteractionResult useItemOn(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult hit)
      Overrides:
      useItemOn in class net.minecraft.world.level.block.state.BlockBehaviour
    • growCrops

      public void growCrops(net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.block.state.BlockState pState)
    • getBonemealAgeIncrease

      protected int getBonemealAgeIncrease(net.minecraft.world.level.Level pLevel)
    • getGrowthSpeed

      protected static float getGrowthSpeed(net.minecraft.world.level.block.Block pBlock, net.minecraft.world.level.BlockGetter pLevel, net.minecraft.core.BlockPos pPos)
    • canSurvive

      public boolean canSurvive(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.LevelReader pLevel, net.minecraft.core.BlockPos pPos)
      Overrides:
      canSurvive in class net.minecraft.world.level.block.BushBlock
    • entityInside

      public void entityInside(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.entity.Entity pEntity)
      Overrides:
      entityInside in class net.minecraft.world.level.block.state.BlockBehaviour
    • getBaseSeedId

      protected net.minecraft.world.level.ItemLike getBaseSeedId()
    • isValidBonemealTarget

      public boolean isValidBonemealTarget(net.minecraft.world.level.LevelReader pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.block.state.BlockState pState)
      Specified by:
      isValidBonemealTarget in interface net.minecraft.world.level.block.BonemealableBlock
      Returns:
      whether bonemeal can be used on this block
    • isBonemealSuccess

      public boolean isBonemealSuccess(net.minecraft.world.level.Level pLevel, net.minecraft.util.RandomSource pRandom, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.block.state.BlockState pState)
      Specified by:
      isBonemealSuccess in interface net.minecraft.world.level.block.BonemealableBlock
    • performBonemeal

      public void performBonemeal(net.minecraft.server.level.ServerLevel pLevel, net.minecraft.util.RandomSource pRandom, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.block.state.BlockState pState)
      Specified by:
      performBonemeal in interface net.minecraft.world.level.block.BonemealableBlock
    • 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> pBuilder)
      Overrides:
      createBlockStateDefinition in class net.minecraft.world.level.block.Block