public class BlockBed extends BlockDirectional
Modifier and Type | Class and Description |
---|---|
static class |
BlockBed.EnumPartType |
Block.EnumOffsetType, Block.SoundType
Modifier and Type | Field and Description |
---|---|
static PropertyBool |
OCCUPIED |
static PropertyEnum<BlockBed.EnumPartType> |
PART |
FACING
BLOCK_STATE_IDS, blockHardness, blockMaterial, blockParticleGravity, blockRegistry, blockResistance, blockState, capturedDrops, captureDrops, delegate, enableStats, field_181083_K, fullBlock, harvesters, isBlockContainer, lightOpacity, lightValue, maxX, maxY, maxZ, minX, minY, minZ, needsRandomTick, RANDOM, SLIME_SOUND, slipperiness, soundTypeAnvil, soundTypeCloth, soundTypeGlass, soundTypeGrass, soundTypeGravel, soundTypeLadder, soundTypeMetal, soundTypePiston, soundTypeSand, soundTypeSnow, soundTypeStone, soundTypeWood, stepSound, translucent, useNeighborBrightness
Constructor and Description |
---|
BlockBed() |
Modifier and Type | Method and Description |
---|---|
protected BlockState |
createBlockState() |
void |
dropBlockAsItemWithChance(World worldIn,
BlockPos pos,
IBlockState state,
float chance,
int fortune)
Spawns this Block's drops into the World as EntityItems.
|
IBlockState |
getActualState(IBlockState state,
IBlockAccess worldIn,
BlockPos pos)
Get the actual Block state of this Block at the given position.
|
EnumWorldBlockLayer |
getBlockLayer() |
Item |
getItem(World worldIn,
BlockPos pos) |
Item |
getItemDropped(IBlockState state,
java.util.Random rand,
int fortune)
Get the Item that this Block should drop when harvested.
|
int |
getMetaFromState(IBlockState state)
Convert the BlockState into the correct metadata value
|
int |
getMobilityFlag() |
static BlockPos |
getSafeExitLocation(World worldIn,
BlockPos pos,
int tries)
Returns a safe BlockPos to disembark the bed
|
IBlockState |
getStateFromMeta(int meta)
Convert the given metadata into a BlockState for this Block
|
protected static boolean |
hasRoomForPlayer(World worldIn,
BlockPos pos) |
boolean |
isFullCube() |
boolean |
isOpaqueCube()
Used to determine ambient occlusion and culling when rebuilding chunks for render
|
boolean |
onBlockActivated(World worldIn,
BlockPos pos,
IBlockState state,
EntityPlayer playerIn,
EnumFacing side,
float hitX,
float hitY,
float hitZ) |
void |
onBlockHarvested(World worldIn,
BlockPos pos,
IBlockState state,
EntityPlayer player) |
void |
onNeighborBlockChange(World worldIn,
BlockPos pos,
IBlockState state,
Block neighborBlock)
Called when a neighboring block changes.
|
void |
setBlockBoundsBasedOnState(IBlockAccess worldIn,
BlockPos pos) |
addCollisionBoxesToList, addDestroyEffects, addHitEffects, addLandingEffects, beginLeavesDecay, breakBlock, canBeReplacedByLeaves, canCollideCheck, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canPlaceBlockAt, canPlaceBlockOnSide, canPlaceTorchOnTop, canProvidePower, canRenderInLayer, canReplace, canSilkHarvest, canSilkHarvest, canSustainLeaves, canSustainPlant, captureDrops, collisionRayTrace, colorMultiplier, colorMultiplier, createStackedBlock, createTileEntity, damageDropped, disableStats, doesSideBlockRendering, dropBlockAsItem, dropXpOnBlockBreak, fillWithRain, func_181623_g, getAmbientOcclusionLightValue, getBedDirection, getBedSpawnPosition, getBlockBoundsMaxX, getBlockBoundsMaxY, getBlockBoundsMaxZ, getBlockBoundsMinX, getBlockBoundsMinY, getBlockBoundsMinZ, getBlockById, getBlockColor, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockState, getCollisionBoundingBox, getComparatorInputOverride, getCreativeTabToDisplayOn, getDamageValue, getDefaultState, getDrops, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getHarvestLevel, getHarvestTool, getIdFromBlock, getLightOpacity, getLightOpacity, getLightValue, getLightValue, getLocalizedName, getMapColor, getMaterial, getMixedBrightnessForBlock, getOffsetType, getPickBlock, getPickBlock, getPlayerRelativeBlockHardness, getRegistryName, getRenderColor, getRenderType, getSelectedBoundingBox, getStateById, getStateForEntityRender, getStateId, getStrongPower, getSubBlocks, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getValidRotations, getWeakChanges, getWeakPower, harvestBlock, hasComparatorInputOverride, hasTileEntity, hasTileEntity, isAABBInsideMaterial, isAir, isAssociatedBlock, isBeaconBase, isBed, isBedFoot, isBlockNormalCube, isBlockSolid, isBurning, isCollidable, isEntityInsideMaterial, isEqualTo, isFertile, isFireSource, isFlammable, isFlowerPot, isFoliage, isFullBlock, isLadder, isLeaves, isNormalCube, isNormalCube, isPassable, isReplaceable, isReplaceableOreGen, isSideSolid, isToolEffective, isTranslucent, isVisuallyOpaque, isWood, modifyAcceleration, onBlockAdded, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockEventReceived, onBlockExploded, onBlockPlaced, onBlockPlacedBy, onEntityCollidedWithBlock, onEntityCollidedWithBlock, onFallenUpon, onLanded, onNeighborChange, onPlantGrow, quantityDropped, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, randomTick, recolorBlock, registerBlocks, removedByPlayer, requiresUpdates, rotateBlock, setBedOccupied, setBlockBounds, setBlockBoundsForItemRender, setBlockUnbreakable, setCreativeTab, setDefaultState, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setRegistryName, setRegistryName, setRegistryName, setResistance, setStepSound, setTickRandomly, setUnlocalizedName, shouldCheckWeakPower, shouldSideBeRendered, spawnAsEntity, tickRate, toString, updateTick
public static final PropertyEnum<BlockBed.EnumPartType> PART
public static final PropertyBool OCCUPIED
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
onBlockActivated
in class Block
public boolean isFullCube()
isFullCube
in class Block
public boolean isOpaqueCube()
isOpaqueCube
in class Block
public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos)
setBlockBoundsBasedOnState
in class Block
public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock)
onNeighborBlockChange
in class Block
public Item getItemDropped(IBlockState state, java.util.Random rand, int fortune)
getItemDropped
in class Block
public static BlockPos getSafeExitLocation(World worldIn, BlockPos pos, int tries)
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
dropBlockAsItemWithChance
in class Block
public int getMobilityFlag()
getMobilityFlag
in class Block
public EnumWorldBlockLayer getBlockLayer()
getBlockLayer
in class Block
public void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player)
onBlockHarvested
in class Block
public IBlockState getStateFromMeta(int meta)
getStateFromMeta
in class Block
public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos)
getActualState
in class Block
public int getMetaFromState(IBlockState state)
getMetaFromState
in class Block
protected BlockState createBlockState()
createBlockState
in class Block