Package net.minecraft.block
Class BedBlock
- All Implemented Interfaces:
ITileEntityProvider
,IItemProvider
,IForgeBlock
,IForgeRegistryEntry<Block>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.RenderSideCacheKey
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.IExtendedPositionPredicate<A>, AbstractBlock.IPositionPredicate, AbstractBlock.OffsetType, AbstractBlock.Properties
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final VoxelShape
private final DyeColor
protected static final VoxelShape
protected static final VoxelShape
protected static final VoxelShape
protected static final VoxelShape
protected static final VoxelShape
protected static final VoxelShape
static final BooleanProperty
static final EnumProperty<BedPart>
protected static final VoxelShape
protected static final VoxelShape
Fields inherited from class net.minecraft.block.HorizontalBlock
FACING
Fields inherited from class net.minecraft.block.Block
BLOCK_STATE_REGISTRY, LOGGER, RANDOM, stateDefinition
Fields inherited from class net.minecraft.block.AbstractBlock
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, material, properties, soundType, speedFactor, UPDATE_SHAPE_ORDER
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static int[][]
bedAboveStandUpOffsets
(Direction p_242655_0_) private static int[][]
bedStandUpOffsets
(Direction p_242656_0_, Direction p_242656_1_) private static int[][]
bedSurroundStandUpOffsets
(Direction p_242658_0_, Direction p_242658_1_) private void
static boolean
canSetSpawn
(World p_235330_0_) protected void
createBlockStateDefinition
(StateContainer.Builder<Block, BlockState> p_206840_1_) void
findBunkBedStandUpPosition
(EntityType<?> p_242653_0_, ICollisionReader p_242653_1_, BlockPos p_242653_2_, Direction p_242653_3_, Direction p_242653_4_) findStandUpPosition
(EntityType<?> p_242652_0_, ICollisionReader p_242652_1_, BlockPos p_242652_2_, float p_242652_3_) findStandUpPositionAtOffset
(EntityType<?> p_242654_0_, ICollisionReader p_242654_1_, BlockPos p_242654_2_, int[][] p_242654_3_, boolean p_242654_4_) static Direction
getBedOrientation
(IBlockReader p_220174_0_, BlockPos p_220174_1_) static TileEntityMerger.Type
getBlockType
(BlockState p_226863_0_) getColor()
static Direction
getConnectedDirection
(BlockState p_226862_0_) private static Direction
getNeighbourDirection
(BedPart p_208070_0_, Direction p_208070_1_) getPistonPushReaction
(BlockState p_149656_1_) getRenderShape
(BlockState p_149645_1_) long
getSeed
(BlockState p_209900_1_, BlockPos p_209900_2_) getShape
(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) getStateForPlacement
(BlockItemUseContext p_196258_1_) private static boolean
isBunkBed
(IBlockReader p_242657_0_, BlockPos p_242657_1_) boolean
isPathfindable
(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) private boolean
kickVillagerOutOfBed
(World p_226861_1_, BlockPos p_226861_2_) newBlockEntity
(IBlockReader p_196283_1_) void
playerWillDestroy
(World p_176208_1_, BlockPos p_176208_2_, BlockState p_176208_3_, PlayerEntity p_176208_4_) void
setPlacedBy
(World p_180633_1_, BlockPos p_180633_2_, BlockState p_180633_3_, LivingEntity p_180633_4_, ItemStack p_180633_5_) void
updateEntityAfterFallOn
(IBlockReader p_176216_1_, Entity p_176216_2_) updateShape
(BlockState p_196271_1_, Direction p_196271_2_, BlockState p_196271_3_, IWorld p_196271_4_, BlockPos p_196271_5_, BlockPos p_196271_6_) use
(BlockState p_225533_1_, World p_225533_2_, BlockPos p_225533_3_, PlayerEntity p_225533_4_, Hand p_225533_5_, BlockRayTraceResult p_225533_6_) Methods inherited from class net.minecraft.block.HorizontalBlock
mirror, rotate
Methods inherited from class net.minecraft.block.Block
animateTick, appendHoverText, asBlock, asItem, box, byItem, canSupportCenter, canSupportRigidBlock, canSustainPlant, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fillItemCategory, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getHarvestLevel, getHarvestTool, getId, getJumpFactor, getName, getSoundType, getSpeedFactor, getStateDefinition, getTags, handleRain, hasDynamicShape, is, is, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isRandomlyTicking, isShapeFullBlock, playerDestroy, popExperience, popResource, propagatesSkylightDown, pushEntitiesUp, registerDefaultState, shouldRenderFace, stateById, stepOn, toString, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded
Methods inherited from class net.minecraft.block.AbstractBlock
attack, canBeReplaced, canBeReplaced, canSurvive, defaultMaterialColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMenuProvider, getOcclusionShape, getOffsetType, getShadeBrightness, getSignal, getVisualShape, hasAnalogOutputSignal, isAir, isEntityBlock, isSignalSource, neighborChanged, onPlace, onProjectileHit, onRemove, randomTick, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, useShapeForLightOcclusion
Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlock
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, canBeReplacedByLeaves, canBeReplacedByLogs, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, catchFire, collisionExtendsVertically, createTileEntity, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlock, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFogColor, getLightValue, getPickBlock, getRespawnPosition, getSlipperiness, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasTileEntity, isAir, isBed, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, isToolEffective, makesOpenTrapdoorAboveClimbable, observedNeighborChange, onBlockExploded, onNeighborChange, onPlantGrow, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay
-
Field Details
-
PART
-
OCCUPIED
-
BASE
-
LEG_NORTH_WEST
-
LEG_SOUTH_WEST
-
LEG_NORTH_EAST
-
LEG_SOUTH_EAST
-
NORTH_SHAPE
-
SOUTH_SHAPE
-
WEST_SHAPE
-
EAST_SHAPE
-
color
-
-
Constructor Details
-
BedBlock
-
-
Method Details
-
getBedOrientation
-
use
public ActionResultType use(BlockState p_225533_1_, World p_225533_2_, BlockPos p_225533_3_, PlayerEntity p_225533_4_, Hand p_225533_5_, BlockRayTraceResult p_225533_6_) - Overrides:
use
in classAbstractBlock
-
canSetSpawn
-
kickVillagerOutOfBed
-
fallOn
-
updateEntityAfterFallOn
- Overrides:
updateEntityAfterFallOn
in classBlock
-
bounceUp
-
updateShape
public BlockState updateShape(BlockState p_196271_1_, Direction p_196271_2_, BlockState p_196271_3_, IWorld p_196271_4_, BlockPos p_196271_5_, BlockPos p_196271_6_) - Overrides:
updateShape
in classAbstractBlock
-
getNeighbourDirection
-
playerWillDestroy
public void playerWillDestroy(World p_176208_1_, BlockPos p_176208_2_, BlockState p_176208_3_, PlayerEntity p_176208_4_) - Overrides:
playerWillDestroy
in classBlock
-
getStateForPlacement
- Overrides:
getStateForPlacement
in classBlock
-
getShape
public VoxelShape getShape(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) - Overrides:
getShape
in classAbstractBlock
-
getConnectedDirection
-
getBlockType
-
isBunkBed
-
findStandUpPosition
public static Optional<Vector3d> findStandUpPosition(EntityType<?> p_242652_0_, ICollisionReader p_242652_1_, BlockPos p_242652_2_, float p_242652_3_) -
findBunkBedStandUpPosition
private static Optional<Vector3d> findBunkBedStandUpPosition(EntityType<?> p_242653_0_, ICollisionReader p_242653_1_, BlockPos p_242653_2_, Direction p_242653_3_, Direction p_242653_4_) -
findStandUpPositionAtOffset
private static Optional<Vector3d> findStandUpPositionAtOffset(EntityType<?> p_242654_0_, ICollisionReader p_242654_1_, BlockPos p_242654_2_, int[][] p_242654_3_, boolean p_242654_4_) -
getPistonPushReaction
- Overrides:
getPistonPushReaction
in classAbstractBlock
-
getRenderShape
- Overrides:
getRenderShape
in classAbstractBlock
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinition
in classBlock
-
newBlockEntity
- Specified by:
newBlockEntity
in interfaceITileEntityProvider
-
setPlacedBy
public void setPlacedBy(World p_180633_1_, BlockPos p_180633_2_, BlockState p_180633_3_, @Nullable LivingEntity p_180633_4_, ItemStack p_180633_5_) - Overrides:
setPlacedBy
in classBlock
-
getColor
-
getSeed
- Overrides:
getSeed
in classAbstractBlock
-
isPathfindable
public boolean isPathfindable(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) - Overrides:
isPathfindable
in classAbstractBlock
-
bedStandUpOffsets
-
bedSurroundStandUpOffsets
-
bedAboveStandUpOffsets
-