public class BedBlock extends HorizontalFacingBlock implements BlockEntityProvider
Block.NeighborGroup
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
Modifier and Type | Field and Description |
---|---|
private DyeColor |
color |
protected static VoxelShape |
EAST_SHAPE |
protected static VoxelShape |
LEG_1_SHAPE |
protected static VoxelShape |
LEG_2_SHAPE |
protected static VoxelShape |
LEG_3_SHAPE |
protected static VoxelShape |
LEG_4_SHAPE |
protected static VoxelShape |
NORTH_SHAPE |
static BooleanProperty |
OCCUPIED |
static EnumProperty<BedPart> |
PART |
protected static VoxelShape |
SOUTH_SHAPE |
protected static VoxelShape |
TOP_SHAPE |
protected static VoxelShape |
WEST_SHAPE |
FACING
LOGGER, STATE_IDS, stateManager
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
Constructor and Description |
---|
BedBlock(DyeColor color,
AbstractBlock.Settings settings) |
mirror, rotate
addStacksForDisplay, asBlock, asItem, buildTooltip, 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, isIn, isShapeFullCube, isSideSolidFullSquare, isTranslucent, onBroken, onDestroyedByExplosion, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replaceBlock, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toString
calcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getRayTraceShape, getSidesShape, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, isSideInvisible, neighborUpdate, onBlockAction, onBlockAdded, onBlockBreakStart, onBlockRemoved, onEntityCollision, onProjectileHit, onStacksDropped, prepare, randomTick, scheduledTick
public static final EnumProperty<BedPart> PART
public static final BooleanProperty OCCUPIED
protected static final VoxelShape TOP_SHAPE
protected static final VoxelShape LEG_1_SHAPE
protected static final VoxelShape LEG_2_SHAPE
protected static final VoxelShape LEG_3_SHAPE
protected static final VoxelShape LEG_4_SHAPE
protected static final VoxelShape NORTH_SHAPE
protected static final VoxelShape SOUTH_SHAPE
protected static final VoxelShape WEST_SHAPE
protected static final VoxelShape EAST_SHAPE
private final DyeColor color
public BedBlock(DyeColor color, AbstractBlock.Settings settings)
@Environment(value=CLIENT) @Nullable public static Direction getDirection(BlockView world, BlockPos pos)
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)
onUse
in class AbstractBlock
public void onLandedUpon(World world, BlockPos pos, Entity entity, float distance)
onLandedUpon
in class Block
public void onEntityLand(BlockView world, Entity entity)
onEntityLand
in class Block
private void method_21838(Entity entity)
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, IWorld world, BlockPos pos, BlockPos posFrom)
getStateForNeighborUpdate
in class AbstractBlock
private static Direction getDirectionTowardsOtherPart(BedPart part, Direction direction)
public void afterBreak(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack stack)
afterBreak
in class Block
public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player)
@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
public static Direction getOppositePartDirection(BlockState blockState)
@Environment(value=CLIENT) public static DoubleBlockProperties.Type method_24164(BlockState blockState)
public static Optional<Vec3d> findWakeUpPosition(EntityType<?> type, WorldView worldView, BlockPos pos, int index)
public static Optional<Vec3d> canWakeUpAt(EntityType<?> type, WorldView worldView, BlockPos pos)
public PistonBehavior getPistonBehavior(BlockState state)
getPistonBehavior
in class AbstractBlock
public BlockRenderType getRenderType(BlockState state)
getRenderType
in class AbstractBlock
protected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties
in class Block
public BlockEntity createBlockEntity(BlockView world)
createBlockEntity
in interface BlockEntityProvider
public void onPlaced(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack)
@Environment(value=CLIENT) public DyeColor getColor()
@Environment(value=CLIENT) public long getRenderingSeed(BlockState state, BlockPos pos)
getRenderingSeed
in class AbstractBlock
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type)
canPathfindThrough
in class AbstractBlock