YATS/Forge Documentation
 All Classes Namespaces Files Functions Variables Enumerator Pages
net.minecraft.block.BlockBed Class Reference
Inheritance diagram for net.minecraft.block.BlockBed:
net.minecraft.block.BlockDirectional net.minecraft.block.Block

Public Member Functions

 BlockBed (int par1)
 
boolean onBlockActivated (World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
 
Icon getIcon (int par1, int par2)
 
void registerIcons (IconRegister par1IconRegister)
 
int getRenderType ()
 
boolean renderAsNormalBlock ()
 
boolean isOpaqueCube ()
 
void setBlockBoundsBasedOnState (IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
 
void onNeighborBlockChange (World par1World, int par2, int par3, int par4, int par5)
 
int idDropped (int par1, Random par2Random, int par3)
 
void dropBlockAsItemWithChance (World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
 
int getMobilityFlag ()
 
int idPicked (World par1World, int par2, int par3, int par4)
 
void onBlockHarvested (World par1World, int par2, int par3, int par4, int par5, EntityPlayer par6EntityPlayer)
 

Static Public Member Functions

static boolean isBlockHeadOfBed (int par0)
 
static boolean isBedOccupied (int par0)
 
static void setBedOccupied (World par0World, int par1, int par2, int par3, boolean par4)
 
static ChunkCoordinates getNearestEmptyChunkCoordinates (World par0World, int par1, int par2, int par3, int par4)
 
- Static Public Member Functions inherited from net.minecraft.block.BlockDirectional
static int getDirection (int par0)
 
- Static Public Member Functions inherited from net.minecraft.block.Block
static boolean isNormalCube (int par0)
 
static boolean isAssociatedBlockID (int par0, int par1)
 
static void setBurnProperties (int id, int encouragement, int flammability)
 

Static Public Attributes

static final int[][] footBlockToHeadBlockMap = new int[][] {{0, 1}, { -1, 0}, {0, -1}, {1, 0}}
 

Additional Inherited Members

- Public Attributes inherited from net.minecraft.block.Block
final int blockID
 
float blockHardness
 
float blockResistance
 
StepSound stepSound
 
float blockParticleGravity
 
final Material blockMaterial
 
float slipperiness
 
- Protected Member Functions inherited from net.minecraft.block.BlockDirectional
 BlockDirectional (int par1, Material par2Material)
 
- Protected Attributes inherited from net.minecraft.block.Block
boolean blockConstructorCalled = true
 
boolean enableStats = true
 
boolean needsRandomTick
 
boolean isBlockContainer
 
double minX
 
double minY
 
double minZ
 
double maxX
 
double maxY
 
double maxZ
 
Icon blockIcon
 
- Static Protected Attributes inherited from net.minecraft.block.Block
static int[] blockFireSpreadSpeed = new int[4096]
 
static int[] blockFlammability = new int[4096]
 

Constructor & Destructor Documentation

net.minecraft.block.BlockBed.BlockBed ( int  par1)

Member Function Documentation

void net.minecraft.block.BlockBed.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

Icon net.minecraft.block.BlockBed.getIcon ( int  par1,
int  par2 
)

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

int net.minecraft.block.BlockBed.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 net.minecraft.block.BlockBed.getNearestEmptyChunkCoordinates ( World  par0World,
int  par1,
int  par2,
int  par3,
int  par4 
)
static

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

int net.minecraft.block.BlockBed.getRenderType ( )

The type of render function that is called for this block

int net.minecraft.block.BlockBed.idDropped ( int  par1,
Random  par2Random,
int  par3 
)

Returns the ID of the items to drop on destruction.

int net.minecraft.block.BlockBed.idPicked ( World  par1World,
int  par2,
int  par3,
int  par4 
)

only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative)

static boolean net.minecraft.block.BlockBed.isBedOccupied ( int  par0)
static

Return whether or not the bed is occupied.

static boolean net.minecraft.block.BlockBed.isBlockHeadOfBed ( int  par0)
static

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

boolean net.minecraft.block.BlockBed.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 net.minecraft.block.BlockBed.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 net.minecraft.block.BlockBed.onBlockHarvested ( World  par1World,
int  par2,
int  par3,
int  par4,
int  par5,
EntityPlayer  par6EntityPlayer 
)

Called when the block is attempted to be harvested

void net.minecraft.block.BlockBed.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

void net.minecraft.block.BlockBed.registerIcons ( IconRegister  par1IconRegister)

When this method is called, your block should register all the icons it needs with the given IconRegister. This is the only chance you get to register icons.

boolean net.minecraft.block.BlockBed.renderAsNormalBlock ( )

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

static void net.minecraft.block.BlockBed.setBedOccupied ( World  par0World,
int  par1,
int  par2,
int  par3,
boolean  par4 
)
static

Sets whether or not the bed is occupied.

void net.minecraft.block.BlockBed.setBlockBoundsBasedOnState ( IBlockAccess  par1IBlockAccess,
int  par2,
int  par3,
int  par4 
)

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

Member Data Documentation

final int [][] net.minecraft.block.BlockBed.footBlockToHeadBlockMap = new int[][] {{0, 1}, { -1, 0}, {0, -1}, {1, 0}}
static

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


The documentation for this class was generated from the following file: