Package net.minecraft.block
Class BedBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.HorizontalFacingBlock
net.minecraft.block.BedBlock
- All Implemented Interfaces:
BlockEntityProvider,ItemConvertible
public class BedBlock extends HorizontalFacingBlock implements BlockEntityProvider
-
Nested Class Summary
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 private DyeColorcolorprotected static VoxelShapeEAST_SHAPEprotected static VoxelShapeLEG_1_SHAPEprotected static VoxelShapeLEG_2_SHAPEprotected static VoxelShapeLEG_3_SHAPEprotected static VoxelShapeLEG_4_SHAPEprotected static VoxelShapeNORTH_SHAPEstatic BooleanPropertyOCCUPIEDstatic EnumProperty<BedPart>PARTprotected static VoxelShapeSOUTH_SHAPEprotected static VoxelShapeTOP_SHAPEprotected static VoxelShapeWEST_SHAPEFields inherited from class net.minecraft.block.AbstractBlock
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier -
Constructor Summary
Constructors Constructor Description BedBlock(DyeColor color, AbstractBlock.Settings settings) -
Method Summary
Methods inherited from class net.minecraft.block.Block
addStacksForDisplay, afterBreak, 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, is, isFaceFullSquare, isIn, isShapeFullCube, isSideSolidFullSquare, isTranslucent, method_30094, onBroken, onDestroyedByExplosion, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replaceBlock, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringMethods inherited from class net.minecraft.block.AbstractBlock
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, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, prepare, randomTick, scheduledTick
-
Field Details
-
Constructor Details
-
Method Details
-
getDirection
-
onUse
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)- Overrides:
onUsein classAbstractBlock
-
isOverworld
-
isFree
-
onLandedUpon
- Overrides:
onLandedUponin classBlock
-
onEntityLand
- Overrides:
onEntityLandin classBlock
-
bounceEntity
-
getStateForNeighborUpdate
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)- Overrides:
getStateForNeighborUpdatein classAbstractBlock
-
getDirectionTowardsOtherPart
-
onBreak
-
getPlacementState
- Overrides:
getPlacementStatein classBlock
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getOutlineShapein classAbstractBlock
-
getOppositePartDirection
-
getBedPart
-
findWakeUpPosition
public static Optional<Vec3d> findWakeUpPosition(EntityType<?> type, WorldView world, BlockPos pos, int index) -
canWakeUpAt
-
getPistonBehavior
- Overrides:
getPistonBehaviorin classAbstractBlock
-
getRenderType
- Overrides:
getRenderTypein classAbstractBlock
-
appendProperties
- Overrides:
appendPropertiesin classBlock
-
createBlockEntity
- Specified by:
createBlockEntityin interfaceBlockEntityProvider
-
onPlaced
public void onPlaced(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) -
getColor
-
getRenderingSeed
- Overrides:
getRenderingSeedin classAbstractBlock
-
canPathfindThrough
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type)- Overrides:
canPathfindThroughin classAbstractBlock
-