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.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.StatePredicateNested classes/interfaces inherited from interface net.minecraft.world.level.block.BonemealableBlock
net.minecraft.world.level.block.BonemealableBlock.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.world.level.block.state.properties.IntegerPropertystatic final com.mojang.serialization.MapCodec<MartianStrawberryBushBlock> static 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
ConstructorsConstructorDescriptionMartianStrawberryBushBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties pProperties) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanSurvive(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> codec()protected voidcreateBlockStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.block.Block, net.minecraft.world.level.block.state.BlockState> pBuilder) voidentityInside(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 intgetAge(net.minecraft.world.level.block.state.BlockState pState) net.minecraft.world.level.block.state.properties.IntegerPropertyprotected net.minecraft.world.level.ItemLikeprotected intgetBonemealAgeIncrease(net.minecraft.world.level.Level pLevel) protected static floatgetGrowthSpeed(net.minecraft.world.level.block.Block pBlock, net.minecraft.world.level.BlockGetter pLevel, net.minecraft.core.BlockPos pPos) intnet.minecraft.world.phys.shapes.VoxelShapegetShape(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.BlockStategetStateForAge(int pAge) voidgrowCrops(net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.block.state.BlockState pState) booleanisBonemealSuccess(net.minecraft.world.level.Level pLevel, net.minecraft.util.RandomSource pRandom, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.block.state.BlockState pState) booleanisMaxAge(net.minecraft.world.level.block.state.BlockState pState) booleanisRandomlyTicking(net.minecraft.world.level.block.state.BlockState pState) booleanisValidBonemealTarget(net.minecraft.world.level.LevelReader pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.block.state.BlockState pState) protected booleanmayPlaceOn(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.BlockGetter pLevel, net.minecraft.core.BlockPos pPos) voidperformBonemeal(net.minecraft.server.level.ServerLevel pLevel, net.minecraft.util.RandomSource pRandom, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.block.state.BlockState pState) voidrandomTick(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.ItemInteractionResultuseItemOn(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, updateShapeMethods 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, withPropertiesOfMethods 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, useWithoutItemMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.block.BonemealableBlock
getParticlePos, getTypeMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods 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
-
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:
codecin classnet.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:
getShapein classnet.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:
mayPlaceOnin classnet.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:
isRandomlyTickingin classnet.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:
randomTickin classnet.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:
useItemOnin classnet.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:
canSurvivein classnet.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:
entityInsidein classnet.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:
isValidBonemealTargetin interfacenet.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:
isBonemealSuccessin interfacenet.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:
performBonemealin interfacenet.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:
createBlockStateDefinitionin classnet.minecraft.world.level.block.Block
-