Class TurtleEggBlock
- All Implemented Interfaces:
ItemConvertible,ToggleableFeature
- Mappings:
Namespace Name official cybintermediary net/minecraft/class_2542named net/minecraft/block/TurtleEggBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroupNested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.Offsetter, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntPropertystatic final intstatic final intstatic final intstatic final IntPropertyprivate static final VoxelShapeprivate static final VoxelShapeFields inherited from class net.minecraft.block.Block
field_31022, field_31023, field_31024, field_31025, field_31035, FORCE_STATE, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, velocityMultiplierFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterBreak(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack tool) Called server-side when the block is broken by the player using correct tool.protected voidappendProperties(StateManager.Builder<Block, BlockState> builder) Appends block state properties to this block.private voidbreakEgg(World world, BlockPos pos, BlockState state) private booleanbooleancanReplace(BlockState state, ItemPlacementContext context) Returns whether the item can replace the block.getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) static booleanstatic booleanisSandBelow(BlockView world, BlockPos pos) voidonBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify) Called server-side on the new block when the block state is changed.voidonLandedUpon(World world, BlockState state, BlockPos pos, Entity entity, float fallDistance) Called when the entity lands on the block.voidonSteppedOn(World world, BlockPos pos, BlockState state, Entity entity) Called when an entity steps on this block.voidrandomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) Called server-side when a block gets ticked randomly.private booleanshouldHatchProgress(World world) private voidtryBreakEgg(World world, BlockState state, BlockPos pos, Entity entity, int inverseChance) Methods inherited from class net.minecraft.block.Block
appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTransparent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onPlaced, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getLootTableId, getMaxHorizontalModelOffset, getOpacity, getRaycastShape, getRenderingSeed, getRenderType, getRequiredFeatures, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, mirror, neighborUpdate, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, onUse, prepare, rotate, scheduledTickMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
field_31272
public static final int field_31272- See Also:
- Mappings:
Namespace Name Mixin selector official aLcyb;a:Iintermediary field_31272Lnet/minecraft/class_2542;field_31272:Inamed field_31272Lnet/minecraft/block/TurtleEggBlock;field_31272:I
-
field_31273
public static final int field_31273- See Also:
- Mappings:
Namespace Name Mixin selector official bLcyb;b:Iintermediary field_31273Lnet/minecraft/class_2542;field_31273:Inamed field_31273Lnet/minecraft/block/TurtleEggBlock;field_31273:I
-
field_31274
public static final int field_31274- See Also:
- Mappings:
Namespace Name Mixin selector official cLcyb;c:Iintermediary field_31274Lnet/minecraft/class_2542;field_31274:Inamed field_31274Lnet/minecraft/block/TurtleEggBlock;field_31274:I
-
SMALL_SHAPE
- Mappings:
Namespace Name Mixin selector official fLcyb;f:Leet;intermediary field_11712Lnet/minecraft/class_2542;field_11712:Lnet/minecraft/class_265;named SMALL_SHAPELnet/minecraft/block/TurtleEggBlock;SMALL_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
LARGE_SHAPE
- Mappings:
Namespace Name Mixin selector official gLcyb;g:Leet;intermediary field_11709Lnet/minecraft/class_2542;field_11709:Lnet/minecraft/class_265;named LARGE_SHAPELnet/minecraft/block/TurtleEggBlock;LARGE_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
HATCH
- Mappings:
Namespace Name Mixin selector official dLcyb;d:Ldcy;intermediary field_11711Lnet/minecraft/class_2542;field_11711:Lnet/minecraft/class_2758;named HATCHLnet/minecraft/block/TurtleEggBlock;HATCH:Lnet/minecraft/state/property/IntProperty;
-
EGGS
- Mappings:
Namespace Name Mixin selector official eLcyb;e:Ldcy;intermediary field_11710Lnet/minecraft/class_2542;field_11710:Lnet/minecraft/class_2758;named EGGSLnet/minecraft/block/TurtleEggBlock;EGGS:Lnet/minecraft/state/property/IntProperty;
-
-
Constructor Details
-
TurtleEggBlock
- Mappings:
Namespace Name Mixin selector official <init>Ldbx;<init>(Ldbx$d;)Vintermediary <init>Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)Vnamed <init>Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
-
-
Method Details
-
onSteppedOn
Called when an entity steps on this block.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
World.isClient.- Overrides:
onSteppedOnin classBlock- Mappings:
Namespace Name Mixin selector official aLcpl;a(Lcmk;Lgu;Ldby;Lbfh;)Vintermediary method_9591Lnet/minecraft/class_2248;method_9591(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_1297;)Vnamed onSteppedOnLnet/minecraft/block/Block;onSteppedOn(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/Entity;)V
-
onLandedUpon
public void onLandedUpon(World world, BlockState state, BlockPos pos, Entity entity, float fallDistance) Called when the entity lands on the block.Default implementation deals fall damage to the entity. Blocks that increase or reduce fall damage (like
HayBlock) should override this.FarmlandBlockoverrides this method to convert the block to dirt.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
World.isClient.- Overrides:
onLandedUponin classBlock- Mappings:
Namespace Name Mixin selector official aLcpl;a(Lcmk;Ldby;Lgu;Lbfh;F)Vintermediary method_9554Lnet/minecraft/class_2248;method_9554(Lnet/minecraft/class_1937;Lnet/minecraft/class_2680;Lnet/minecraft/class_2338;Lnet/minecraft/class_1297;F)Vnamed onLandedUponLnet/minecraft/block/Block;onLandedUpon(Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/Entity;F)V
-
tryBreakEgg
private void tryBreakEgg(World world, BlockState state, BlockPos pos, Entity entity, int inverseChance) - Mappings:
Namespace Name Mixin selector official aLcyb;a(Lcmk;Ldby;Lgu;Lbfh;I)Vintermediary method_10834Lnet/minecraft/class_2542;method_10834(Lnet/minecraft/class_1937;Lnet/minecraft/class_2680;Lnet/minecraft/class_2338;Lnet/minecraft/class_1297;I)Vnamed tryBreakEggLnet/minecraft/block/TurtleEggBlock;tryBreakEgg(Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/Entity;I)V
-
breakEgg
- Mappings:
Namespace Name Mixin selector official aLcyb;a(Lcmk;Lgu;Ldby;)Vintermediary method_10833Lnet/minecraft/class_2542;method_10833(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vnamed breakEggLnet/minecraft/block/TurtleEggBlock;breakEgg(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
randomTick
Called server-side when a block gets ticked randomly. This can be overridden to implement various logics, most commonly plant growth. Default implementation callsAbstractBlock.scheduledTick(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.util.math.random.Random). To control the rate of the action, userandom.Random tick speed is controlled by the game rule
randomTickSpeedand can be disabled. Only blocks within 128-block cylinder (i.e. ignoring Y coordinates) around players receive random ticks.Blocks overriding this must use
AbstractBlock.Settings.ticksRandomly()block settings.Here are some examples:
SugarCaneBlockuses this to grow sugar cane.OxidizableBlockuses this to oxidize.NetherPortalBlockuses this to spawn zombified piglins.LeavesBlockuses this to decay when far from logs.
- Overrides:
randomTickin classAbstractBlock- See Also:
- Mappings:
Namespace Name Mixin selector official bLdbx;b(Ldby;Laif;Lgu;Lapf;)Vintermediary method_9514Lnet/minecraft/class_4970;method_9514(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)Vnamed randomTickLnet/minecraft/block/AbstractBlock;randomTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)V
-
isSandBelow
- Mappings:
Namespace Name Mixin selector official aLcyb;a(Lclq;Lgu;)Zintermediary method_10831Lnet/minecraft/class_2542;method_10831(Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Znamed isSandBelowLnet/minecraft/block/TurtleEggBlock;isSandBelow(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Z
-
isSand
- Mappings:
Namespace Name Mixin selector official bLcyb;b(Lclq;Lgu;)Zintermediary method_29952Lnet/minecraft/class_2542;method_29952(Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Znamed isSandLnet/minecraft/block/TurtleEggBlock;isSand(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Z
-
onBlockAdded
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify) Called server-side on the new block when the block state is changed. This includes block placement. When overriding this method,AbstractBlock.getStateForNeighborUpdate(net.minecraft.block.BlockState, net.minecraft.util.math.Direction, net.minecraft.block.BlockState, net.minecraft.world.WorldAccess, net.minecraft.util.math.BlockPos, net.minecraft.util.math.BlockPos)orAbstractBlock.neighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.Block, net.minecraft.util.math.BlockPos, boolean)should also be overridden. The method is used in the following cases:- When activating a redstone component on placement (used along with
AbstractBlock.neighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.Block, net.minecraft.util.math.BlockPos, boolean) - When resetting a position-dependent state (see
TargetBlock) - When converting a block on placement (see
WetSpongeBlock) - When fire lights a portal
- Overrides:
onBlockAddedin classAbstractBlock- See Also:
- Mappings:
Namespace Name Mixin selector official bLdbx;b(Ldby;Lcmk;Lgu;Ldby;Z)Vintermediary method_9615Lnet/minecraft/class_4970;method_9615(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)Vnamed onBlockAddedLnet/minecraft/block/AbstractBlock;onBlockAdded(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)V
- When activating a redstone component on placement (used along with
-
shouldHatchProgress
- Mappings:
Namespace Name Mixin selector official aLcyb;a(Lcmk;)Zintermediary method_10832Lnet/minecraft/class_2542;method_10832(Lnet/minecraft/class_1937;)Znamed shouldHatchProgressLnet/minecraft/block/TurtleEggBlock;shouldHatchProgress(Lnet/minecraft/world/World;)Z
-
afterBreak
public void afterBreak(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable @Nullable BlockEntity blockEntity, ItemStack tool) Called server-side when the block is broken by the player using correct tool. This is called afterBlock.onBroken(net.minecraft.world.WorldAccess, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState)but has the tool requirement. By default, this incrementsStats.MINED, adds exhaustion to the player, and drops the block's item stacks.Subclasses should override this if breaking the block causes another block to be placed (like
IceBlock) or if the block can break multiple times (likeTurtleEggBlock).BeehiveBlockuses this to anger the bees if the hive is mined without silk touch.- Overrides:
afterBreakin classBlock- See Also:
- Mappings:
Namespace Name Mixin selector official aLcpl;a(Lcmk;Lbym;Lgu;Ldby;Lczk;Lcfx;)Vintermediary method_9556Lnet/minecraft/class_2248;method_9556(Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2586;Lnet/minecraft/class_1799;)Vnamed afterBreakLnet/minecraft/block/Block;afterBreak(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/BlockEntity;Lnet/minecraft/item/ItemStack;)V
-
canReplace
Returns whether the item can replace the block.By default, this checks if the block allows replacing and whether the item differs from the block's item. Items composed of multiple blocks, such as candles, vines, or snow layers, should override this to implement additional checks.
This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
World.isClient.- Overrides:
canReplacein classAbstractBlock- Returns:
- whether the item can replace the block
- See Also:
- Mappings:
Namespace Name Mixin selector official aLdbx;a(Ldby;Lcif;)Zintermediary method_9616Lnet/minecraft/class_4970;method_9616(Lnet/minecraft/class_2680;Lnet/minecraft/class_1750;)Znamed canReplaceLnet/minecraft/block/AbstractBlock;canReplace(Lnet/minecraft/block/BlockState;Lnet/minecraft/item/ItemPlacementContext;)Z
-
getPlacementState
- Overrides:
getPlacementStatein classBlock- Mappings:
Namespace Name Mixin selector official aLcpl;a(Lcif;)Ldby;intermediary method_9605Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;named getPlacementStateLnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
getOutlineShapein classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLdbx;a(Ldby;Lclq;Lgu;Leef;)Leet;intermediary method_9530Lnet/minecraft/class_4970;method_9530(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;named getOutlineShapeLnet/minecraft/block/AbstractBlock;getOutlineShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;
-
appendProperties
Appends block state properties to this block. To use this, override and callStateManager.Builder.add(net.minecraft.state.property.Property<?>[])inside the method. SeePropertiesfor the list of pre-defined properties.- Overrides:
appendPropertiesin classBlock- Mappings:
Namespace Name Mixin selector official aLcpl;a(Ldbz$a;)Vintermediary method_9515Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)Vnamed appendPropertiesLnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V
-
breaksEgg
- Mappings:
Namespace Name Mixin selector official aLcyb;a(Lcmk;Lbfh;)Zintermediary method_10835Lnet/minecraft/class_2542;method_10835(Lnet/minecraft/class_1937;Lnet/minecraft/class_1297;)Znamed breaksEggLnet/minecraft/block/TurtleEggBlock;breaksEgg(Lnet/minecraft/world/World;Lnet/minecraft/entity/Entity;)Z
-