Package net.minecraft.world.level.block
Class TurtleEggBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.TurtleEggBlock
- All Implemented Interfaces:
FeatureElement
,ItemLike
,IBlockExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block
Block.BlockStatePairKey
Nested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<TurtleEggBlock> static final IntegerProperty
static final IntegerProperty
static final int
static final int
static final int
private static final VoxelShape
private static final VoxelShape
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canBeReplaced
(BlockState state, BlockPlaceContext useContext) private boolean
canDestroyEgg
(Level level, Entity entity) com.mojang.serialization.MapCodec
<TurtleEggBlock> codec()
protected void
private void
decreaseEggs
(Level level, BlockPos pos, BlockState state) private void
destroyEgg
(Level level, BlockState state, BlockPos pos, Entity entity, int chance) void
fallOn
(Level level, BlockState state, BlockPos pos, Entity entity, float fallDistance) protected VoxelShape
getShape
(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) getStateForPlacement
(BlockPlaceContext context) static boolean
isSand
(BlockGetter reader, BlockPos pos) protected void
onPlace
(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean isMoving) static boolean
onSand
(BlockGetter level, BlockPos pos) void
playerDestroy
(Level level, Player player, BlockPos pos, BlockState state, BlockEntity te, ItemStack stack) Called after a player has successfully harvested this block.protected void
randomTick
(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) Performs a random tick on a block.private boolean
shouldUpdateHatchLevel
(Level level) void
stepOn
(Level level, BlockPos pos, BlockState state, Entity entity) 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, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, spawnDestroyParticles, stateById, toString, tryDropExperience, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOf
Methods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isPathfindable, isRandomlyTicking, isSignalSource, mirror, neighborChanged, onExplosionHit, onProjectileHit, onRemove, propagatesSkylightDown, properties, propertiesCodec, requiredFeatures, rotate, simpleCodec, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, updateShape, useItemOn, 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.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
-
MAX_HATCH_LEVEL
public static final int MAX_HATCH_LEVEL- See Also:
-
MIN_EGGS
public static final int MIN_EGGS- See Also:
-
MAX_EGGS
public static final int MAX_EGGS- See Also:
-
ONE_EGG_AABB
-
MULTIPLE_EGGS_AABB
-
HATCH
-
EGGS
-
-
Constructor Details
-
TurtleEggBlock
-
-
Method Details
-
codec
-
stepOn
-
fallOn
-
destroyEgg
-
decreaseEggs
-
randomTick
Performs a random tick on a block.- Overrides:
randomTick
in classBlockBehaviour
-
onSand
-
isSand
-
onPlace
protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean isMoving) - Overrides:
onPlace
in classBlockBehaviour
-
shouldUpdateHatchLevel
-
playerDestroy
public void playerDestroy(Level level, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity te, ItemStack stack) Called after a player has successfully harvested this block. This method will only be called if the player has used the correct tool and drops should be spawned.- Overrides:
playerDestroy
in classBlock
-
canBeReplaced
- Overrides:
canBeReplaced
in classBlockBehaviour
-
getStateForPlacement
- Overrides:
getStateForPlacement
in classBlock
-
getShape
protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) - Overrides:
getShape
in classBlockBehaviour
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinition
in classBlock
-
canDestroyEgg
-