public class TurtleEggBlock extends Block
Block.NeighborGroup
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
Modifier and Type | Field and Description |
---|---|
static IntProperty |
EGGS |
static IntProperty |
HATCH |
private static VoxelShape |
LARGE_SHAPE |
private static VoxelShape |
SMALL_SHAPE |
LOGGER, STATE_IDS, stateManager
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
Constructor and Description |
---|
TurtleEggBlock(AbstractBlock.Settings settings) |
Modifier and Type | Method and 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 blockView,
BlockPos blockPos) |
static boolean |
method_29952(BlockView blockView,
BlockPos blockPos) |
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 blockPos,
Entity entity,
int inverseChance) |
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, is, isFaceFullSquare, isIn, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onPlaced, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toString
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, isSideInvisible, mirror, neighborUpdate, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, onUse, prepare, rotate, scheduledTick
private static final VoxelShape SMALL_SHAPE
private static final VoxelShape LARGE_SHAPE
public static final IntProperty HATCH
public static final IntProperty EGGS
public TurtleEggBlock(AbstractBlock.Settings settings)
public void onSteppedOn(World world, BlockPos pos, Entity entity)
onSteppedOn
in class Block
public void onLandedUpon(World world, BlockPos pos, Entity entity, float distance)
onLandedUpon
in class Block
private void tryBreakEgg(World world, BlockPos blockPos, Entity entity, int inverseChance)
private void breakEgg(World world, BlockPos pos, BlockState state)
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random)
randomTick
in class AbstractBlock
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)
onBlockAdded
in class AbstractBlock
private boolean shouldHatchProgress(World world)
public void afterBreak(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack stack)
afterBreak
in class Block
public boolean canReplace(BlockState state, ItemPlacementContext context)
canReplace
in class AbstractBlock
@Nullable public BlockState getPlacementState(ItemPlacementContext ctx)
getPlacementState
in class Block
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape
in class AbstractBlock
protected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties
in class Block