Package net.minecraft.block
Class TurtleEggBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.TurtleEggBlock
- All Implemented Interfaces:
ItemConvertible
public class TurtleEggBlock extends Block
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroup
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
-
Field Summary
Fields Modifier and Type Field Description static IntProperty
EGGS
static IntProperty
HATCH
private static VoxelShape
LARGE_SHAPE
private static VoxelShape
SMALL_SHAPE
Fields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManager
Fields inherited from class net.minecraft.block.AbstractBlock
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
-
Constructor Summary
Constructors Constructor Description TurtleEggBlock(AbstractBlock.Settings settings)
-
Method Summary
Modifier and Type Method Description void
afterBreak(World world, PlayerEntity player, BlockPos pos, BlockState state, BlockEntity blockEntity, ItemStack stack)
protected void
appendProperties(StateManager.Builder<Block,BlockState> builder)
private void
breakEgg(World world, BlockPos pos, BlockState state)
private boolean
breaksEgg(World world, Entity entity)
boolean
canReplace(BlockState state, ItemPlacementContext context)
VoxelShape
getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
BlockState
getPlacementState(ItemPlacementContext ctx)
static boolean
isSand(BlockView world, BlockPos pos)
static boolean
isSandBelow(BlockView world, BlockPos pos)
void
onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)
void
onLandedUpon(World world, BlockPos pos, Entity entity, float distance)
void
onSteppedOn(World world, BlockPos pos, Entity entity)
Called when an entity steps on this block.void
randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random)
private boolean
shouldHatchProgress(World world)
private void
tryBreakEgg(World world, BlockPos pos, Entity entity, int inverseChance)
Methods inherited from class net.minecraft.block.Block
addStacksForDisplay, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onPlaced, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toString
Methods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getLootTableId, getMaxModelOffset, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isSideInvisible, mirror, neighborUpdate, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, onUse, prepare, rotate, scheduledTick
-
Field Details
-
SMALL_SHAPE
-
LARGE_SHAPE
-
HATCH
-
EGGS
-
-
Constructor Details
-
TurtleEggBlock
-
-
Method Details
-
onSteppedOn
Called when an entity steps on this block.- Overrides:
onSteppedOn
in classBlock
-
onLandedUpon
- Overrides:
onLandedUpon
in classBlock
-
tryBreakEgg
-
breakEgg
-
randomTick
- Overrides:
randomTick
in classAbstractBlock
-
isSandBelow
-
isSand
-
onBlockAdded
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)- Overrides:
onBlockAdded
in classAbstractBlock
-
shouldHatchProgress
-
afterBreak
public void afterBreak(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack stack)- Overrides:
afterBreak
in classBlock
-
canReplace
- Overrides:
canReplace
in classAbstractBlock
-
getPlacementState
- Overrides:
getPlacementState
in classBlock
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getOutlineShape
in classAbstractBlock
-
appendProperties
- Overrides:
appendProperties
in classBlock
-
breaksEgg
-