public class BedBlock extends HorizontalFacingBlock implements BlockEntityProvider
Block.NeighborGroupAbstractBlock.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 |
FACINGLOGGER, STATE_IDS, stateManagercollidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier| Constructor and Description |
|---|
BedBlock(DyeColor color,
AbstractBlock.Settings settings) |
mirror, rotateaddStacksForDisplay, 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, toStringcalcBlockBreakingDelta, 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, scheduledTickpublic 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 AbstractBlockpublic void onLandedUpon(World world, BlockPos pos, Entity entity, float distance)
onLandedUpon in class Blockpublic void onEntityLand(BlockView world, Entity entity)
onEntityLand in class Blockprivate void method_21838(Entity entity)
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, IWorld world, BlockPos pos, BlockPos posFrom)
getStateForNeighborUpdate in class AbstractBlockprivate 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 Blockpublic void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player)
@Nullable public BlockState getPlacementState(ItemPlacementContext ctx)
getPlacementState in class Blockpublic VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape in class AbstractBlockpublic 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 AbstractBlockpublic BlockRenderType getRenderType(BlockState state)
getRenderType in class AbstractBlockprotected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties in class Blockpublic BlockEntity createBlockEntity(BlockView world)
createBlockEntity in interface BlockEntityProviderpublic 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 AbstractBlockpublic boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type)
canPathfindThrough in class AbstractBlock