public class BlockTallGrass extends BlockBush implements IGrowable, IShearable
| Modifier and Type | Class and Description |
|---|---|
static class |
BlockTallGrass.EnumType |
Block.EnumOffsetTypeIForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>| Modifier and Type | Field and Description |
|---|---|
protected static AxisAlignedBB |
TALL_GRASS_AABB |
static PropertyEnum<BlockTallGrass.EnumType> |
TYPE |
BLOCK_STATE_IDS, blockHardness, blockMapColor, blockMaterial, blockParticleGravity, blockResistance, blockSoundType, blockState, capturedDrops, captureDrops, enableStats, FULL_BLOCK_AABB, fullBlock, harvesters, isBlockContainer, lightOpacity, lightValue, needsRandomTick, NULL_AABB, RANDOM, REGISTRY, slipperiness, translucent, useNeighborBrightnessdelegate| Modifier | Constructor and Description |
|---|---|
protected |
BlockTallGrass() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBlockStay(World worldIn,
BlockPos pos,
IBlockState state) |
boolean |
canGrow(World worldIn,
BlockPos pos,
IBlockState state,
boolean isClient)
Whether this IGrowable can grow
|
boolean |
canUseBonemeal(World worldIn,
java.util.Random rand,
BlockPos pos,
IBlockState state) |
protected BlockStateContainer |
createBlockState() |
AxisAlignedBB |
getBoundingBox(IBlockState state,
IBlockAccess source,
BlockPos pos) |
NonNullList<ItemStack> |
getDrops(IBlockAccess world,
BlockPos pos,
IBlockState state,
int fortune)
This returns a complete list of items dropped from this block.
|
ItemStack |
getItem(World worldIn,
BlockPos pos,
IBlockState state) |
Item |
getItemDropped(IBlockState state,
java.util.Random rand,
int fortune)
Get the Item that this Block should drop when harvested.
|
int |
getMetaFromState(IBlockState state)
Convert the BlockState into the correct metadata value
|
Block.EnumOffsetType |
getOffsetType()
Get the OffsetType for this Block.
|
IBlockState |
getStateFromMeta(int meta)
Convert the given metadata into a BlockState for this Block
|
void |
getSubBlocks(Item itemIn,
CreativeTabs tab,
NonNullList<ItemStack> list)
returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
|
void |
grow(World worldIn,
java.util.Random rand,
BlockPos pos,
IBlockState state) |
void |
harvestBlock(World worldIn,
EntityPlayer player,
BlockPos pos,
IBlockState state,
TileEntity te,
ItemStack stack) |
boolean |
isReplaceable(IBlockAccess worldIn,
BlockPos pos)
Whether this Block can be replaced directly by other blocks (true for e.g.
|
boolean |
isShearable(ItemStack item,
IBlockAccess world,
BlockPos pos)
Checks if the object is currently shearable
Example: Sheep return false when they have no wool
|
NonNullList<ItemStack> |
onSheared(ItemStack item,
IBlockAccess world,
BlockPos pos,
int fortune)
Performs the shear function on this object.
|
int |
quantityDroppedWithBonus(int fortune,
java.util.Random random)
Get the quantity dropped based on the given fortune level
|
canPlaceBlockAt, canSustainBush, checkAndDropBlock, getBlockLayer, getCollisionBoundingBox, getPlant, getPlantType, isFullCube, isOpaqueCube, neighborChanged, updateTickaddCollisionBoxToList, addCollisionBoxToList, addDestroyEffects, addHitEffects, addInformation, addLandingEffects, beginLeavesDecay, breakBlock, canBeConnectedTo, canBeReplacedByLeaves, canCollideCheck, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canEntitySpawn, canHarvestBlock, canPlaceBlockOnSide, canPlaceTorchOnTop, canProvidePower, canRenderInLayer, canSilkHarvest, canSilkHarvest, canSpawnInBlock, canSustainLeaves, canSustainPlant, captureDrops, causesSuffocation, collisionRayTrace, createTileEntity, damageDropped, disableStats, doesSideBlockRendering, dropBlockAsItem, dropBlockAsItemWithChance, dropXpOnBlockBreak, eventReceived, fillWithRain, getActualState, getAiPathNodeType, getAmbientOcclusionLightValue, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlockById, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockState, getComparatorInputOverride, getCreativeTabToDisplayOn, getDefaultState, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getHarvestLevel, getHarvestTool, getIdFromBlock, getLightOpacity, getLightOpacity, getLightValue, getLightValue, getLocalizedName, getMapColor, getMaterial, getMobilityFlag, getOffset, getPackedLightmapCoords, getPickBlock, getPlayerRelativeBlockHardness, getRenderType, getSelectedBoundingBox, getSilkTouchDrop, getSoundType, getSoundType, getStateById, getStateForPlacement, getStateForPlacement, getStateId, getStrongPower, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getValidRotations, getWeakChanges, getWeakPower, hasComparatorInputOverride, hasCustomBreakingProgress, hasTileEntity, hasTileEntity, isAABBInsideMaterial, isAir, isAssociatedBlock, isBeaconBase, isBed, isBedFoot, isBlockNormalCube, isBlockSolid, isBurning, isCollidable, isEntityInsideMaterial, isEqualTo, isFertile, isFireSource, isFlammable, isFoliage, isFullBlock, isFullyOpaque, isLadder, isLeaves, isNormalCube, isNormalCube, isPassable, isReplaceableOreGen, isSideSolid, isToolEffective, isTranslucent, isWood, modifyAcceleration, observedNeighborChange, onBlockActivated, onBlockAdded, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockExploded, onBlockHarvested, onBlockPlacedBy, onEntityCollidedWithBlock, onEntityWalk, onFallenUpon, onLanded, onNeighborChange, onPlantGrow, quantityDropped, quantityDropped, randomDisplayTick, randomTick, rayTrace, recolorBlock, registerBlocks, removedByPlayer, requiresUpdates, rotateBlock, setBedOccupied, setBlockUnbreakable, setCreativeTab, setDefaultState, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setResistance, setSoundType, setTickRandomly, setUnlocalizedName, shouldCheckWeakPower, shouldSideBeRendered, spawnAsEntity, tickRate, toString, withMirror, withRotationgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNamepublic static final PropertyEnum<BlockTallGrass.EnumType> TYPE
protected static final AxisAlignedBB TALL_GRASS_AABB
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
getBoundingBox in class BlockBushpublic boolean canBlockStay(World worldIn, BlockPos pos, IBlockState state)
canBlockStay in class BlockBushpublic boolean isReplaceable(IBlockAccess worldIn, BlockPos pos)
isReplaceable in class Blockpublic Item getItemDropped(IBlockState state, java.util.Random rand, int fortune)
getItemDropped in class Blockpublic int quantityDroppedWithBonus(int fortune,
java.util.Random random)
quantityDroppedWithBonus in class Blockpublic void harvestBlock(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state, TileEntity te, ItemStack stack)
harvestBlock in class Blockpublic ItemStack getItem(World worldIn, BlockPos pos, IBlockState state)
public void getSubBlocks(Item itemIn, CreativeTabs tab, NonNullList<ItemStack> list)
getSubBlocks in class Blockpublic boolean canGrow(World worldIn, BlockPos pos, IBlockState state, boolean isClient)
public boolean canUseBonemeal(World worldIn, java.util.Random rand, BlockPos pos, IBlockState state)
canUseBonemeal in interface IGrowablepublic void grow(World worldIn, java.util.Random rand, BlockPos pos, IBlockState state)
public IBlockState getStateFromMeta(int meta)
getStateFromMeta in class Blockpublic int getMetaFromState(IBlockState state)
getMetaFromState in class Blockprotected BlockStateContainer createBlockState()
createBlockState in class Blockpublic Block.EnumOffsetType getOffsetType()
getOffsetType in class Blockpublic boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos)
IShearableisShearable in interface IShearableitem - The itemstack that is being used, Possible to be nullworld - The current worldpos - Block's position in world.public NonNullList<ItemStack> onSheared(ItemStack item, IBlockAccess world, BlockPos pos, int fortune)
IShearableonSheared in interface IShearableitem - The itemstack that is being used, Possible to be nullworld - The current worldpos - If this is a block, the block's position in world.fortune - The fortune level of the shears being usedpublic NonNullList<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
Block