public class BlockLeaves extends Block implements IShearable
Block.EnumOffsetType, Block.Properties, Block.RenderSideCacheKey
Modifier and Type | Field and Description |
---|---|
static IntegerProperty |
DISTANCE |
static BooleanProperty |
PERSISTENT |
protected static boolean |
renderTranslucent |
BLOCK_STATE_IDS, blockHardness, blockMapColor, blockResistance, blocksMovement, capturedDrops, captureDrops, harvesters, lightValue, LOGGER, material, needsRandomTick, RANDOM, soundType, stateContainer
delegate
Constructor and Description |
---|
BlockLeaves(Block.Properties builder) |
Modifier and Type | Method and Description |
---|---|
void |
animateTick(IBlockState stateIn,
World worldIn,
BlockPos pos,
java.util.Random rand) |
boolean |
causesSuffocation(IBlockState state) |
protected void |
dropApple(World p_196474_1_,
BlockPos p_196474_2_,
IBlockState p_196474_3_,
int p_196474_4_) |
void |
dropBlockAsItemWithChance(IBlockState state,
World worldIn,
BlockPos pos,
float chancePerItem,
int fortune) |
protected void |
fillStateContainer(StateContainer.Builder<Block,IBlockState> builder) |
void |
getDrops(IBlockState state,
NonNullList<ItemStack> drops,
World worldIn,
BlockPos pos,
int fortune)
This gets a complete list of items dropped from this block.
|
IItemProvider |
getItemDropped(IBlockState state,
World worldIn,
BlockPos pos,
int fortune) |
int |
getOpacity(IBlockState state,
IBlockReader worldIn,
BlockPos pos) |
BlockRenderLayer |
getRenderLayer() |
protected int |
getSaplingDropChance(IBlockState p_196472_1_) |
IBlockState |
getStateForPlacement(BlockItemUseContext context) |
boolean |
getTickRandomly(IBlockState p_149653_1_) |
void |
harvestBlock(World worldIn,
EntityPlayer player,
BlockPos pos,
IBlockState state,
TileEntity te,
ItemStack stack) |
java.util.List<ItemStack> |
onSheared(ItemStack item,
IWorld world,
BlockPos pos,
int fortune)
Performs the shear function on this object.
|
int |
quantityDropped(IBlockState state,
java.util.Random random) |
void |
randomTick(IBlockState state,
World worldIn,
BlockPos pos,
java.util.Random random) |
static void |
setRenderTranslucent(boolean fancy) |
void |
tick(IBlockState state,
World worldIn,
BlockPos pos,
java.util.Random random) |
IBlockState |
updatePostPlacement(IBlockState stateIn,
EnumFacing facing,
IBlockState facingState,
IWorld worldIn,
BlockPos currentPos,
BlockPos facingPos) |
addInformation, allowsMovement, asItem, canDropFromExplosion, canEntitySpawn, canProvidePower, canSilkHarvest, canSilkHarvest, canSpawnInBlock, canSustainPlant, captureDrops, collisionRayTrace, doesSideFillSquare, dropXpOnBlockBreak, eventReceived, fillItemGroup, fillWithRain, getAmbientOcclusionLightValue, getBlockFaceShape, getBlockFromItem, getBlockHardness, getCollisionShape, getComparatorInputOverride, getDefaultState, getExplosionResistance, getFluidState, getHarvestLevel, getHarvestTool, getItem, getItemsToDropCount, getLightValue, getMapColor, getMaterial, getNameTextComponent, getOffset, getOffsetType, getPackedLightmapCoords, getPlayerRelativeBlockHardness, getPositionRandom, getPushReaction, getRaytraceShape, getRenderShape, getRenderType, getShape, getSilkTouchDrop, getSlipperiness, getSlipperiness, getSoundType, getStateById, getStateContainer, getStateId, getStrongPower, getTranslationKey, getValidBlockForPosition, getWeakPower, hasComparatorInputOverride, hasCustomBreakingProgress, hasTileEntity, isAir, isBlockNormalCube, isCollidable, isCollidable, isDirt, isExceptBlockForAttachWithPiston, isExceptionBlockForAttaching, isFullCube, isIn, isNormalCube, isOpaque, isOpaqueCube, isReplaceable, isRock, isSideInvisible, isSolid, isTopSolid, isValidPosition, isVariableOpacity, makeCuboidShape, mirror, needsPostProcessing, neighborChanged, nudgeEntitiesWithNewState, onBlockActivated, onBlockAdded, onBlockClicked, onBlockHarvested, onBlockPlacedBy, onEntityCollision, onEntityWalk, onExplosionDestroy, onFallenUpon, onLanded, onPlayerDestroy, onReplaced, propagatesSkylightDown, registerBlocks, replaceBlock, rotate, setDefaultState, shouldSideBeRendered, spawnAsEntity, tickRate, toString, updateDiagonalNeighbors, updateNeighbors, useNeighborBrightness
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isShearable
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, beginLeaveDecay, canBeConnectedTo, canBeReplacedByLeaves, canConnectRedstone, canCreatureSpawn, canEntityDestroy, canHarvestBlock, canPlaceTorchOnTop, canRenderInLayer, createTileEntity, doesSideBlockChestOpening, doesSideBlockRendering, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlock, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getFogColor, getLightValue, getPickBlock, getRayTraceResult, getSoundType, getStateAtViewpoint, getStateForPlacement, getValidRotations, getWeakChanges, hasTileEntity, isAir, isBeaconBase, isBed, isBedFoot, isBurning, isFertile, isFireSource, isFlammable, isFoliage, isLadder, isNormalCube, isReplaceableOreGen, isStickyBlock, isToolEffective, isTopSolid, observedNeighborChange, onBlockExploded, onNeighborChange, onPlantGrow, recolorBlock, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower
public static final IntegerProperty DISTANCE
public static final BooleanProperty PERSISTENT
protected static boolean renderTranslucent
public BlockLeaves(Block.Properties builder)
public boolean getTickRandomly(IBlockState p_149653_1_)
getTickRandomly
in class Block
public void randomTick(IBlockState state, World worldIn, BlockPos pos, java.util.Random random)
randomTick
in class Block
public void tick(IBlockState state, World worldIn, BlockPos pos, java.util.Random random)
public int getOpacity(IBlockState state, IBlockReader worldIn, BlockPos pos)
getOpacity
in class Block
public IBlockState updatePostPlacement(IBlockState stateIn, EnumFacing facing, IBlockState facingState, IWorld worldIn, BlockPos currentPos, BlockPos facingPos)
updatePostPlacement
in class Block
public void animateTick(IBlockState stateIn, World worldIn, BlockPos pos, java.util.Random rand)
animateTick
in class Block
public int quantityDropped(IBlockState state, java.util.Random random)
quantityDropped
in class Block
public IItemProvider getItemDropped(IBlockState state, World worldIn, BlockPos pos, int fortune)
getItemDropped
in class Block
public void dropBlockAsItemWithChance(IBlockState state, World worldIn, BlockPos pos, float chancePerItem, int fortune)
dropBlockAsItemWithChance
in class Block
public void getDrops(IBlockState state, NonNullList<ItemStack> drops, World worldIn, BlockPos pos, int fortune)
IForgeBlock
getDrops
in interface IForgeBlock
state
- Current statedrops
- add all items this block drops to this drops listworldIn
- The current world, Currently hard 'World' and not 'IBlockReder' because vanilla needs it.pos
- Block position in worldfortune
- Breakers fortune levelprotected void dropApple(World p_196474_1_, BlockPos p_196474_2_, IBlockState p_196474_3_, int p_196474_4_)
protected int getSaplingDropChance(IBlockState p_196472_1_)
public static void setRenderTranslucent(boolean fancy)
public BlockRenderLayer getRenderLayer()
getRenderLayer
in class Block
public boolean causesSuffocation(IBlockState state)
causesSuffocation
in class Block
public void harvestBlock(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state, @Nullable TileEntity te, ItemStack stack)
harvestBlock
in class Block
protected void fillStateContainer(StateContainer.Builder<Block,IBlockState> builder)
fillStateContainer
in class Block
public IBlockState getStateForPlacement(BlockItemUseContext context)
getStateForPlacement
in class Block
public java.util.List<ItemStack> onSheared(@Nonnull ItemStack item, IWorld world, BlockPos pos, int fortune)
IShearable
onSheared
in interface IShearable
item
- The ItemStack that is being used, may be empty.world
- The current world.pos
- If this is a block, the block's position in world.fortune
- The fortune level of the shears being used.