public class BlockPistonBase extends Block
Block.EnumOffsetType, Block.SoundType
Modifier and Type | Field and Description |
---|---|
static PropertyBool |
EXTENDED |
static PropertyDirection |
FACING |
private boolean |
isSticky
This piston is the sticky one?
|
BLOCK_STATE_IDS, blockHardness, blockMaterial, blockParticleGravity, blockRegistry, blockResistance, blockState, enableStats, field_181083_K, fullBlock, isBlockContainer, lightOpacity, lightValue, maxX, maxY, maxZ, minX, minY, minZ, needsRandomTick, SLIME_SOUND, slipperiness, soundTypeAnvil, soundTypeCloth, soundTypeGlass, soundTypeGrass, soundTypeGravel, soundTypeLadder, soundTypeMetal, soundTypePiston, soundTypeSand, soundTypeSnow, soundTypeStone, soundTypeWood, stepSound, translucent, useNeighborBrightness
Constructor and Description |
---|
BlockPistonBase(boolean isSticky) |
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.
|
static boolean |
canPush(Block blockIn,
World worldIn,
BlockPos pos,
EnumFacing direction,
boolean allowDestroy) |
private void |
checkForMove(World worldIn,
BlockPos pos,
IBlockState state) |
protected BlockState |
createBlockState() |
private boolean |
doMove(World worldIn,
BlockPos pos,
EnumFacing direction,
boolean extending) |
AxisAlignedBB |
getCollisionBoundingBox(World worldIn,
BlockPos pos,
IBlockState state) |
static EnumFacing |
getFacing(int meta) |
static EnumFacing |
getFacingFromEntity(World worldIn,
BlockPos clickedBlock,
EntityLivingBase entityIn) |
int |
getMetaFromState(IBlockState state)
Convert the BlockState into the correct metadata value
|
IBlockState |
getStateForEntityRender(IBlockState state)
Possibly modify the given BlockState before rendering it on an Entity (Minecarts, Endermen, ...)
|
IBlockState |
getStateFromMeta(int meta)
Convert the given metadata into a BlockState for this Block
|
boolean |
isFullCube() |
boolean |
isOpaqueCube()
Used to determine ambient occlusion and culling when rebuilding chunks for render
|
void |
onBlockAdded(World worldIn,
BlockPos pos,
IBlockState state) |
boolean |
onBlockEventReceived(World worldIn,
BlockPos pos,
IBlockState state,
int eventID,
int eventParam)
Called on both Client and Server when World#addBlockEvent is called
|
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 |
onBlockPlacedBy(World worldIn,
BlockPos pos,
IBlockState state,
EntityLivingBase placer,
ItemStack stack)
Called by ItemBlocks after a block is set in the world, to allow post-place logic
|
void |
onNeighborBlockChange(World worldIn,
BlockPos pos,
IBlockState state,
Block neighborBlock)
Called when a neighboring block changes.
|
void |
setBlockBoundsBasedOnState(IBlockAccess worldIn,
BlockPos pos) |
void |
setBlockBoundsForItemRender()
Sets the block's bounds for rendering it as an item
|
private boolean |
shouldBeExtended(World worldIn,
BlockPos pos,
EnumFacing facing) |
breakBlock, canCollideCheck, canDropFromExplosion, canPlaceBlockAt, canPlaceBlockOnSide, canProvidePower, canReplace, canSilkHarvest, collisionRayTrace, colorMultiplier, colorMultiplier, createStackedBlock, damageDropped, disableStats, dropBlockAsItem, dropBlockAsItemWithChance, dropXpOnBlockBreak, fillWithRain, func_181623_g, getActualState, getAmbientOcclusionLightValue, getBlockBoundsMaxX, getBlockBoundsMaxY, getBlockBoundsMaxZ, getBlockBoundsMinX, getBlockBoundsMinY, getBlockBoundsMinZ, getBlockById, getBlockColor, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockLayer, getBlockState, getComparatorInputOverride, getCreativeTabToDisplayOn, getDamageValue, getDefaultState, getEnableStats, getExplosionResistance, getIdFromBlock, getItem, getItemDropped, getLightOpacity, getLightValue, getLocalizedName, getMapColor, getMaterial, getMixedBrightnessForBlock, getMobilityFlag, getOffsetType, getPlayerRelativeBlockHardness, getRenderColor, getRenderType, getSelectedBoundingBox, getStateById, getStateId, getStrongPower, getSubBlocks, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getWeakPower, harvestBlock, hasComparatorInputOverride, hasTileEntity, isAssociatedBlock, isBlockNormalCube, isBlockSolid, isCollidable, isEqualTo, isFlowerPot, isFullBlock, isNormalCube, isPassable, isReplaceable, isTranslucent, isVisuallyOpaque, modifyAcceleration, onBlockActivated, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockHarvested, onEntityCollidedWithBlock, onEntityCollidedWithBlock, onFallenUpon, onLanded, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, randomTick, registerBlocks, requiresUpdates, setBlockBounds, setBlockUnbreakable, setCreativeTab, setDefaultState, setHardness, setLightLevel, setLightOpacity, setResistance, setStepSound, setTickRandomly, setUnlocalizedName, shouldSideBeRendered, spawnAsEntity, tickRate, toString, updateTick
public static final PropertyDirection FACING
public static final PropertyBool EXTENDED
private final boolean isSticky
public boolean isOpaqueCube()
isOpaqueCube
in class Block
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
onBlockPlacedBy
in class Block
public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock)
onNeighborBlockChange
in class Block
public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state)
onBlockAdded
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
private void checkForMove(World worldIn, BlockPos pos, IBlockState state)
private boolean shouldBeExtended(World worldIn, BlockPos pos, EnumFacing facing)
public boolean onBlockEventReceived(World worldIn, BlockPos pos, IBlockState state, int eventID, int eventParam)
onBlockEventReceived
in class Block
public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos)
setBlockBoundsBasedOnState
in class Block
public void setBlockBoundsForItemRender()
setBlockBoundsForItemRender
in class Block
public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, java.util.List<AxisAlignedBB> list, Entity collidingEntity)
addCollisionBoxesToList
in class Block
public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state)
getCollisionBoundingBox
in class Block
public boolean isFullCube()
isFullCube
in class Block
public static EnumFacing getFacing(int meta)
public static EnumFacing getFacingFromEntity(World worldIn, BlockPos clickedBlock, EntityLivingBase entityIn)
public static boolean canPush(Block blockIn, World worldIn, BlockPos pos, EnumFacing direction, boolean allowDestroy)
private boolean doMove(World worldIn, BlockPos pos, EnumFacing direction, boolean extending)
public IBlockState getStateForEntityRender(IBlockState state)
getStateForEntityRender
in class Block
public IBlockState getStateFromMeta(int meta)
getStateFromMeta
in class Block
public int getMetaFromState(IBlockState state)
getMetaFromState
in class Block
protected BlockState createBlockState()
createBlockState
in class Block