|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.minecraft.block.Block
net.minecraft.block.BlockRail
public class BlockRail
Field Summary |
---|
Method Summary | |
---|---|
boolean |
canMakeSlopes(World world,
int x,
int y,
int z)
Returns true if the rail can make up and down slopes. |
boolean |
canPlaceBlockAt(World par1World,
int par2,
int par3,
int par4)
Checks to see if its valid to put this block at the specified coordinates. |
MovingObjectPosition |
collisionRayTrace(World par1World,
int par2,
int par3,
int par4,
Vec3 par5Vec3,
Vec3 par6Vec3)
Ray traces through the blocks collision from start vector to end vector returning a ray trace hit. |
int |
getBasicRailMetadata(IBlockAccess world,
EntityMinecart cart,
int x,
int y,
int z)
Return the rails metadata (without the power bit if the rail uses one). |
int |
getBlockTextureFromSideAndMetadata(int par1,
int par2)
From the specified side and block metadata retrieves the blocks texture. |
AxisAlignedBB |
getCollisionBoundingBoxFromPool(World par1World,
int par2,
int par3,
int par4)
Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been cleared to be reused) |
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 |
float |
getRailMaxSpeed(World world,
EntityMinecart cart,
int y,
int x,
int z)
Returns the max speed of the rail at the specified position. |
int |
getRenderType()
The type of render function that is called for this block |
boolean |
hasPowerBit(World world,
int x,
int y,
int z)
Return true if this rail uses the 4th bit as a power bit. |
boolean |
isFlexibleRail(World world,
int y,
int x,
int z)
Return true if the rail can make corners. |
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 |
isPowered()
Returns true if the block is power related rail. |
static boolean |
isRailBlock(int par0)
Return true if the parameter is a blockID for a valid rail block (current is rail, powered or detector). |
static boolean |
isRailBlockAt(World par0World,
int par1,
int par2,
int par3)
Returns true if the block at the coordinates of world passed is a valid rail block (current is rail, powered or detector). |
void |
onBlockAdded(World par1World,
int par2,
int par3,
int par4)
Called whenever the block is added into the world. |
void |
onMinecartPass(World world,
EntityMinecart cart,
int y,
int x,
int z)
This function is called by any minecart that passes over this rail. |
void |
onNeighborBlockChange(World par1World,
int par2,
int par3,
int par4,
int par5)
Lets the block know when one of its neighbor changes. |
int |
quantityDropped(Random par1Random)
Returns the quantity of items to drop on block destruction. |
boolean |
renderAsNormalBlock()
If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) |
void |
setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess,
int par2,
int par3,
int par4)
Updates the blocks bounds based on its current state. |
void |
setRenderType(int value)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static final boolean isRailBlockAt(World par0World, int par1, int par2, int par3)
public static final boolean isRailBlock(int par0)
public boolean isPowered()
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
getCollisionBoundingBoxFromPool
in class Block
public boolean isOpaqueCube()
isOpaqueCube
in class Block
public MovingObjectPosition collisionRayTrace(World par1World, int par2, int par3, int par4, Vec3 par5Vec3, Vec3 par6Vec3)
collisionRayTrace
in class Block
public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
setBlockBoundsBasedOnState
in class Block
public int getBlockTextureFromSideAndMetadata(int par1, int par2)
getBlockTextureFromSideAndMetadata
in class Block
public boolean renderAsNormalBlock()
renderAsNormalBlock
in class Block
public int getRenderType()
getRenderType
in class Block
public int quantityDropped(Random par1Random)
quantityDropped
in class Block
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
canPlaceBlockAt
in class Block
public void onBlockAdded(World par1World, int par2, int par3, int par4)
onBlockAdded
in class Block
public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
onNeighborBlockChange
in class Block
public int getMobilityFlag()
getMobilityFlag
in class Block
public boolean isFlexibleRail(World world, int y, int x, int z)
world
- The world.x
- The rail X coordinate.y
- The rail Y coordinate.z
- The rail Z coordinate.
public boolean canMakeSlopes(World world, int x, int y, int z)
world
- The world.x
- The rail X coordinate.y
- The rail Y coordinate.z
- The rail Z coordinate.
public int getBasicRailMetadata(IBlockAccess world, EntityMinecart cart, int x, int y, int z)
world
- The world.cart
- The cart asking for the metadata, null if it is not called by EntityMinecart.y
- The rail X coordinate.x
- The rail Y coordinate.z
- The rail Z coordinate.
public float getRailMaxSpeed(World world, EntityMinecart cart, int y, int x, int z)
world
- The world.cart
- The cart on the rail, may be null.x
- The rail X coordinate.y
- The rail Y coordinate.z
- The rail Z coordinate.
public void onMinecartPass(World world, EntityMinecart cart, int y, int x, int z)
world
- The world.cart
- The cart on the rail.y
- The rail X coordinate.x
- The rail Y coordinate.z
- The rail Z coordinate.public boolean hasPowerBit(World world, int x, int y, int z)
world
- The world.x
- The rail X coordinate.y
- The rail Y coordinate.z
- The rail Z coordinate.
public void setRenderType(int value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |