public class BlockStairs extends Block
Modifier and Type | Class and Description |
---|---|
static class |
BlockStairs.EnumHalf |
static class |
BlockStairs.EnumShape |
Block.EnumOffsetType, Block.SoundType
Modifier and Type | Field and Description |
---|---|
static PropertyDirection |
FACING |
static PropertyEnum<BlockStairs.EnumHalf> |
HALF |
static PropertyEnum<BlockStairs.EnumShape> |
SHAPE |
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
Modifier | Constructor and Description |
---|---|
protected |
BlockStairs(IBlockState modelState) |
Modifier and Type | Method and Description |
---|---|
void |
addCollisionBoxesToList(World worldIn,
BlockPos pos,
IBlockState state,
AxisAlignedBB mask,
java.util.List<AxisAlignedBB> list,
Entity collidingEntity)
Add all collision boxes of this Block to the list that intersect with the given mask.
|
void |
breakBlock(World worldIn,
BlockPos pos,
IBlockState state) |
boolean |
canCollideCheck(IBlockState state,
boolean hitIfLiquid) |
boolean |
canPlaceBlockAt(World worldIn,
BlockPos pos) |
MovingObjectPosition |
collisionRayTrace(World worldIn,
BlockPos pos,
Vec3 start,
Vec3 end)
Ray traces through the blocks collision from start vector to end vector returning a ray trace hit.
|
protected BlockState |
createBlockState() |
boolean |
doesSideBlockRendering(IBlockAccess world,
BlockPos pos,
EnumFacing face)
Check if the face of a block should block rendering.
|
boolean |
func_176304_i(IBlockAccess blockAccess,
BlockPos pos) |
int |
func_176305_g(IBlockAccess blockAccess,
BlockPos pos) |
boolean |
func_176306_h(IBlockAccess blockAccess,
BlockPos pos) |
int |
func_176307_f(IBlockAccess blockAccess,
BlockPos pos) |
IBlockState |
getActualState(IBlockState state,
IBlockAccess worldIn,
BlockPos pos)
Get the actual Block state of this Block at the given position.
|
EnumWorldBlockLayer |
getBlockLayer() |
float |
getExplosionResistance(Entity exploder)
Returns how much this block can resist explosions from the passed in entity.
|
MapColor |
getMapColor(IBlockState state)
Get the MapColor for this Block and the given BlockState
|
int |
getMetaFromState(IBlockState state)
Convert the BlockState into the correct metadata value
|
int |
getMixedBrightnessForBlock(IBlockAccess worldIn,
BlockPos pos) |
AxisAlignedBB |
getSelectedBoundingBox(World worldIn,
BlockPos pos) |
IBlockState |
getStateFromMeta(int meta)
Convert the given metadata into a BlockState for this Block
|
static boolean |
isBlockStairs(Block blockIn)
Checks if a block is stairs
|
boolean |
isCollidable()
Returns if this block is collidable (only used by Fire).
|
boolean |
isFullCube() |
boolean |
isOpaqueCube()
Used to determine ambient occlusion and culling when rebuilding chunks for render
|
static boolean |
isSameStair(IBlockAccess worldIn,
BlockPos pos,
IBlockState state)
Check whether there is a stair block at the given position and it has the same properties as the given BlockState
|
Vec3 |
modifyAcceleration(World worldIn,
BlockPos pos,
Entity entityIn,
Vec3 motion) |
boolean |
onBlockActivated(World worldIn,
BlockPos pos,
IBlockState state,
EntityPlayer playerIn,
EnumFacing side,
float hitX,
float hitY,
float hitZ) |
void |
onBlockAdded(World worldIn,
BlockPos pos,
IBlockState state) |
void |
onBlockClicked(World worldIn,
BlockPos pos,
EntityPlayer playerIn) |
void |
onBlockDestroyedByExplosion(World worldIn,
BlockPos pos,
Explosion explosionIn)
Called when this Block is destroyed by an Explosion
|
void |
onBlockDestroyedByPlayer(World worldIn,
BlockPos pos,
IBlockState state)
Called when a player destroys this Block
|
IBlockState |
onBlockPlaced(World worldIn,
BlockPos pos,
EnumFacing facing,
float hitX,
float hitY,
float hitZ,
int meta,
EntityLivingBase placer)
Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the
IBlockstate
|
void |
onEntityCollidedWithBlock(World worldIn,
BlockPos pos,
Entity entityIn)
Triggered whenever an entity collides with this block (enters into the block)
|
void |
randomDisplayTick(World worldIn,
BlockPos pos,
IBlockState state,
java.util.Random rand) |
void |
setBaseCollisionBounds(IBlockAccess worldIn,
BlockPos pos)
Set the block bounds as the collision bounds for the stairs at the given position
|
void |
setBlockBoundsBasedOnState(IBlockAccess worldIn,
BlockPos pos) |
int |
tickRate(World worldIn)
How many world ticks before ticking
|
void |
updateTick(World worldIn,
BlockPos pos,
IBlockState state,
java.util.Random rand) |
addDestroyEffects, addHitEffects, addLandingEffects, beginLeavesDecay, canBeReplacedByLeaves, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canPlaceBlockOnSide, canPlaceTorchOnTop, canProvidePower, canRenderInLayer, canReplace, canSilkHarvest, canSilkHarvest, canSustainLeaves, canSustainPlant, captureDrops, colorMultiplier, colorMultiplier, createStackedBlock, createTileEntity, damageDropped, disableStats, dropBlockAsItem, dropBlockAsItemWithChance, 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, getExtendedState, getFireSpreadSpeed, getFlammability, getHarvestLevel, getHarvestTool, getIdFromBlock, getItem, getItemDropped, getLightOpacity, getLightOpacity, getLightValue, getLightValue, getLocalizedName, getMaterial, getMobilityFlag, getOffsetType, getPickBlock, getPickBlock, getPlayerRelativeBlockHardness, getRegistryName, getRenderColor, getRenderType, getStateById, getStateForEntityRender, getStateId, getStrongPower, getSubBlocks, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getValidRotations, getWeakChanges, getWeakPower, harvestBlock, hasComparatorInputOverride, hasTileEntity, hasTileEntity, isAABBInsideMaterial, isAir, isAssociatedBlock, isBeaconBase, isBed, isBedFoot, isBlockNormalCube, isBlockSolid, isBurning, isEntityInsideMaterial, isEqualTo, isFertile, isFireSource, isFlammable, isFlowerPot, isFoliage, isFullBlock, isLadder, isLeaves, isNormalCube, isNormalCube, isPassable, isReplaceable, isReplaceableOreGen, isSideSolid, isToolEffective, isTranslucent, isVisuallyOpaque, isWood, onBlockEventReceived, onBlockExploded, onBlockHarvested, onBlockPlacedBy, onEntityCollidedWithBlock, onFallenUpon, onLanded, onNeighborBlockChange, onNeighborChange, onPlantGrow, quantityDropped, quantityDropped, quantityDroppedWithBonus, 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, toString
public static final PropertyDirection FACING
public static final PropertyEnum<BlockStairs.EnumHalf> HALF
public static final PropertyEnum<BlockStairs.EnumShape> SHAPE
protected BlockStairs(IBlockState modelState)
public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos)
setBlockBoundsBasedOnState
in class Block
public boolean isOpaqueCube()
isOpaqueCube
in class Block
public boolean doesSideBlockRendering(IBlockAccess world, BlockPos pos, EnumFacing face)
Block
doesSideBlockRendering
in class Block
world
- The current worldpos
- Block position in worldpublic boolean isFullCube()
isFullCube
in class Block
public void setBaseCollisionBounds(IBlockAccess worldIn, BlockPos pos)
public static boolean isBlockStairs(Block blockIn)
public static boolean isSameStair(IBlockAccess worldIn, BlockPos pos, IBlockState state)
public int func_176307_f(IBlockAccess blockAccess, BlockPos pos)
public int func_176305_g(IBlockAccess blockAccess, BlockPos pos)
public boolean func_176306_h(IBlockAccess blockAccess, BlockPos pos)
public boolean func_176304_i(IBlockAccess blockAccess, BlockPos pos)
public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, java.util.List<AxisAlignedBB> list, Entity collidingEntity)
addCollisionBoxesToList
in class Block
public void onBlockClicked(World worldIn, BlockPos pos, EntityPlayer playerIn)
onBlockClicked
in class Block
public void randomDisplayTick(World worldIn, BlockPos pos, IBlockState state, java.util.Random rand)
randomDisplayTick
in class Block
public void onBlockDestroyedByPlayer(World worldIn, BlockPos pos, IBlockState state)
onBlockDestroyedByPlayer
in class Block
public int getMixedBrightnessForBlock(IBlockAccess worldIn, BlockPos pos)
getMixedBrightnessForBlock
in class Block
public float getExplosionResistance(Entity exploder)
getExplosionResistance
in class Block
public int tickRate(World worldIn)
public Vec3 modifyAcceleration(World worldIn, BlockPos pos, Entity entityIn, Vec3 motion)
modifyAcceleration
in class Block
public EnumWorldBlockLayer getBlockLayer()
getBlockLayer
in class Block
public AxisAlignedBB getSelectedBoundingBox(World worldIn, BlockPos pos)
getSelectedBoundingBox
in class Block
public boolean isCollidable()
isCollidable
in class Block
public boolean canCollideCheck(IBlockState state, boolean hitIfLiquid)
canCollideCheck
in class Block
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
canPlaceBlockAt
in class Block
public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state)
onBlockAdded
in class Block
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
breakBlock
in class Block
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, Entity entityIn)
onEntityCollidedWithBlock
in class Block
public void updateTick(World worldIn, BlockPos pos, IBlockState state, java.util.Random rand)
updateTick
in class Block
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
onBlockActivated
in class Block
public void onBlockDestroyedByExplosion(World worldIn, BlockPos pos, Explosion explosionIn)
onBlockDestroyedByExplosion
in class Block
public MapColor getMapColor(IBlockState state)
getMapColor
in class Block
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
onBlockPlaced
in class Block
public MovingObjectPosition collisionRayTrace(World worldIn, BlockPos pos, Vec3 start, Vec3 end)
collisionRayTrace
in class Block
public IBlockState getStateFromMeta(int meta)
getStateFromMeta
in class Block
public int getMetaFromState(IBlockState state)
getMetaFromState
in class Block
public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos)
getActualState
in class Block
protected BlockState createBlockState()
createBlockState
in class Block