Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.minecraft.src
Class BlockBed

    java.lang.Object
      net.minecraft.src.Block
          net.minecraft.src.BlockDirectional
              net.minecraft.src.BlockBed

    public class BlockBed

extends BlockDirectional

Field Summary
`static int[][]` | `footBlockToHeadBlockMap` Maps the foot-of-bed block to the head-of-bed block.

Fields inherited from class net.minecraft.src.Block
`bed, bedrock, blockClay, blockDiamond, blockEmerald, blockGold, blockID, blockIndexInTexture, blockLapis, blockMaterial, blockParticleGravity, blocksList, blockSnow, blockSteel, bookShelf, brewingStand, brick, button, cactus, cake, canBlockGrass, cauldron, chest, cloth, cobblestone, cobblestoneMossy, cocoaPlant, crops, deadBush, dirt, dispenser, doorSteel, doorWood, dragonEgg, enchantmentTable, enderChest, endPortal, endPortalFrame, fence, fenceGate, fenceIron, fire, glass, glowStone, grass, gravel, ice, isDefaultTexture, jukebox, ladder, lavaMoving, lavaStill, leaves, lever, lightOpacity, lightValue, lockedChest, maxX, maxY, maxZ, melon, melonStem, minX, minY, minZ, mobSpawner, mushroomBrown, mushroomCapBrown, mushroomCapRed, mushroomRed, music, mycelium, netherBrick, netherFence, netherrack, netherStalk, obsidian, opaqueCubeLookup, oreCoal, oreDiamond, oreEmerald, oreGold, oreIron, oreLapis, oreRedstone, oreRedstoneGlowing, pistonBase, pistonExtension, pistonMoving, pistonStickyBase, planks, plantRed, plantYellow, portal, pressurePlatePlanks, pressurePlateStone, pumpkin, pumpkinLantern, pumpkinStem, rail, railDetector, railPowered, redstoneLampActive, redstoneLampIdle, redstoneRepeaterActive, redstoneRepeaterIdle, redstoneWire, reed, requiresSelfNotify, sand, sandStone, sapling, signPost, signWall, silverfish, slipperiness, slowSand, snow, soundClothFootstep, soundGlassFootstep, soundGrassFootstep, soundGravelFootstep, soundMetalFootstep, soundPowderFootstep, soundSandFootstep, soundStoneFootstep, soundWoodFootstep, sponge, stairCompactCobblestone, stairCompactPlanks, stairsBrick, stairsNetherBrick, stairsSandStone, stairsStoneBrickSmooth, stairsWoodBirch, stairsWoodJungle, stairsWoodSpruce, stepSound, stone, stoneBrick, stoneDoubleSlab, stoneOvenActive, stoneOvenIdle, stoneSingleSlab, tallGrass, thinGlass, tilledField, tnt, torchRedstoneActive, torchRedstoneIdle, torchWood, trapdoor, tripWire, tripWireSource, useNeighborBrightness, vine, waterlily, waterMoving, waterStill, web, whiteStone, wood, woodDoubleSlab, woodSingleSlab, workbench`

Constructor Summary
`BlockBed(int par1)`

Method Summary
`void` | `dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)` Drops the block items with a specified chance of dropping the specified items
`int` | `getBlockTextureFromSideAndMetadata(int par1, int par2)` From the specified side and block metadata retrieves the blocks texture.
`int` | `getMobilityFlag()` Returns the mobility information of the block, 0 = free, 1 = can't push but can move over, 2 = total immobility and stop pistons
`static ChunkCoordinates` | `getNearestEmptyChunkCoordinates(World par0World, int par1, int par2, int par3, int par4)` Gets the nearest empty chunk coordinates for the player to wake up from a bed into.
`int` | `getRenderType()` The type of render function that is called for this block
`int` | `idDropped(int par1, Random par2Random, int par3)` Returns the ID of the items to drop on destruction.
`int` | `idPicked(World par1World, int par2, int par3, int par4)`
`static boolean` | `isBedOccupied(int par0)` Return whether or not the bed is occupied.
`static boolean` | `isBlockHeadOfBed(int par0)` Returns whether or not this bed block is the head of the bed.
`boolean` | `isOpaqueCube()` Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
`boolean` | `onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)` Called upon block activation (right click on the block.)
`void` | `onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)` Lets the block know when one of its neighbor changes.
`boolean` | `renderAsNormalBlock()` If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
`static void` | `setBedOccupied(World par0World, int par1, int par2, int par3, boolean par4)` Sets whether or not the bed is occupied.
`void` | `setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)` Updates the blocks bounds based on its current state.

Methods inherited from class net.minecraft.src.BlockDirectional
`getDirection`

Methods inherited from class net.minecraft.src.Block
`addBlockDestroyEffects, addBlockHitEffects, addCollidingBlockToList, addCreativeItems, beginLeavesDecay, breakBlock, canBeReplacedByLeaves, canBlockStay, canCollideCheck, canConnectRedstone, canCreatureSpawn, canDragonDestroy, canHarvestBlock, canPlaceBlockAt, canPlaceBlockOnSide, canPlaceTorchOnTop, canProvidePower, canRenderInPass, canSilkHarvest, canSustainLeaves, canSustainPlant, collisionRayTrace, colorMultiplier, createTileEntity, dropBlockAsItem, fillWithRain, getAmbientOcclusionLightValue, getBedDirection, getBedSpawnPosition, getBlockBrightness, getBlockColor, getBlockDropped, getBlockHardness, getBlockName, getBlocksMovement, getBlockTexture, getBlockTextureFromSide, getCollisionBoundingBoxFromPool, getCreativeTabToDisplayOn, getDamageValue, getEnableStats, getExplosionResistance, getExplosionResistance, getFireSpreadSpeed, getFlammability, getLightOpacity, getLightValue, getMixedBrightnessForBlock, getPickBlock, getPlayerRelativeBlockHardness, getRenderBlockPass, getRenderColor, getSelectedBoundingBoxFromPool, getSubBlocks, getTextureFile, getTickRandomly, harvestBlock, hasTileEntity, hasTileEntity, isAirBlock, isBed, isBedFoot, isBlockBurning, isBlockFoliage, isBlockNormalCube, isBlockReplaceable, isBlockSolid, isBlockSolidOnSide, isCollidable, isFertile, isFireSource, isFlammable, isGenMineableReplaceable, isIndirectlyPoweringTo, isLadder, isLeaves, isNormalCube, isPoweringTo, isWood, onBlockAdded, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockEventReceived, onBlockHarvested, onBlockPlacedBy, onEntityCollidedWithBlock, onEntityWalking, onFallenUpon, onSetBlockIDWithMetaData, onTimeChanged, quantityDropped, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, removeBlockByPlayer, setBedOccupied, setBlockBounds, setBlockBoundsForItemRender, setBlockName, setBlockUnbreakable, setBurnProperties, setCreativeTab, setHardness, setLightOpacity, setLightValue, setResistance, setStepSound, setTextureFile, setTickRandomly, shouldSideBeRendered, tickRate, translateBlockName, updateBlockMetadata, updateTick, velocityToAddToEntity`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### footBlockToHeadBlockMap

    public static final int[][] footBlockToHeadBlockMap

  Maps the foot-of-bed block to the head-of-bed block.

Constructor Detail

### BlockBed

    public BlockBed(int par1)

Method Detail

### onBlockActivated

    public boolean onBlockActivated(World par1World,
                                    int par2,
                                    int par3,
                                    int par4,
                                    EntityPlayer par5EntityPlayer,
                                    int par6,
                                    float par7,
                                    float par8,
                                    float par9)

  Called upon block activation (right click on the block.)

  Overrides:
    `onBlockActivated` in class `Block`

### getBlockTextureFromSideAndMetadata

    public int getBlockTextureFromSideAndMetadata(int par1,
                                                  int par2)

  From the specified side and block metadata retrieves the blocks texture. Args: side, metadata

  Overrides:
    `getBlockTextureFromSideAndMetadata` in class `Block`

### getRenderType

    public int getRenderType()

  The type of render function that is called for this block

  Overrides:
    `getRenderType` in class `Block`

### renderAsNormalBlock

    public boolean renderAsNormalBlock()

  If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)

  Overrides:
    `renderAsNormalBlock` in class `Block`

### isOpaqueCube

    public boolean isOpaqueCube()

  Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.

  Overrides:
    `isOpaqueCube` in class `Block`

### setBlockBoundsBasedOnState

    public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess,
                                           int par2,
                                           int par3,
                                           int par4)

  Updates the blocks bounds based on its current state. Args: world, x, y, z

  Overrides:
    `setBlockBoundsBasedOnState` in class `Block`

### onNeighborBlockChange

    public void onNeighborBlockChange(World par1World,
                                      int par2,
                                      int par3,
                                      int par4,
                                      int par5)

  Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor blockID

  Overrides:
    `onNeighborBlockChange` in class `Block`

### idDropped

    public int idDropped(int par1,
                         Random par2Random,
                         int par3)

  Returns the ID of the items to drop on destruction.

  Overrides:
    `idDropped` in class `Block`

### isBlockHeadOfBed

    public static boolean isBlockHeadOfBed(int par0)

  Returns whether or not this bed block is the head of the bed.

### isBedOccupied

    public static boolean isBedOccupied(int par0)

  Return whether or not the bed is occupied.

### setBedOccupied

    public static void setBedOccupied(World par0World,
                                      int par1,
                                      int par2,
                                      int par3,
                                      boolean par4)

  Sets whether or not the bed is occupied.

### getNearestEmptyChunkCoordinates

    public static ChunkCoordinates getNearestEmptyChunkCoordinates(World par0World,
                                                                   int par1,
                                                                   int par2,
                                                                   int par3,
                                                                   int par4)

  Gets the nearest empty chunk coordinates for the player to wake up from a bed into.

### dropBlockAsItemWithChance

    public void dropBlockAsItemWithChance(World par1World,
                                          int par2,
                                          int par3,
                                          int par4,
                                          int par5,
                                          float par6,
                                          int par7)

  Drops the block items with a specified chance of dropping the specified items

  Overrides:
    `dropBlockAsItemWithChance` in class `Block`

### getMobilityFlag

    public int getMobilityFlag()

  Returns the mobility information of the block, 0 = free, 1 = can't push but can move over, 2 = total immobility and stop pistons

  Overrides:
    `getMobilityFlag` in class `Block`

### idPicked

    public int idPicked(World par1World,
                        int par2,
                        int par3,
                        int par4)

  Overrides:
    `idPicked` in class `Block`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD