public class BlockCrops extends BlockBush implements IGrowable
Block.EnumOffsetTypeIForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>| Modifier and Type | Field and Description |
|---|---|
static PropertyInteger |
AGE |
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 |
BlockCrops() |
| 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
|
protected boolean |
canSustainBush(IBlockState state)
Return true if the block can sustain a Bush
|
boolean |
canUseBonemeal(World worldIn,
java.util.Random rand,
BlockPos pos,
IBlockState state) |
protected BlockStateContainer |
createBlockState() |
void |
dropBlockAsItemWithChance(World worldIn,
BlockPos pos,
IBlockState state,
float chance,
int fortune)
Spawns this Block's drops into the World as EntityItems.
|
protected int |
getAge(IBlockState state) |
protected PropertyInteger |
getAgeProperty() |
protected int |
getBonemealAgeIncrease(World worldIn) |
AxisAlignedBB |
getBoundingBox(IBlockState state,
IBlockAccess source,
BlockPos pos) |
protected Item |
getCrop() |
java.util.List<ItemStack> |
getDrops(IBlockAccess world,
BlockPos pos,
IBlockState state,
int fortune)
This returns a complete list of items dropped from this block.
|
protected static float |
getGrowthChance(Block blockIn,
World worldIn,
BlockPos pos) |
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 |
getMaxAge() |
int |
getMetaFromState(IBlockState state)
Convert the BlockState into the correct metadata value
|
protected Item |
getSeed() |
IBlockState |
getStateFromMeta(int meta)
Convert the given metadata into a BlockState for this Block
|
void |
grow(World worldIn,
BlockPos pos,
IBlockState state) |
void |
grow(World worldIn,
java.util.Random rand,
BlockPos pos,
IBlockState state) |
boolean |
isMaxAge(IBlockState state) |
void |
updateTick(World worldIn,
BlockPos pos,
IBlockState state,
java.util.Random rand) |
IBlockState |
withAge(int age) |
canPlaceBlockAt, checkAndDropBlock, getBlockLayer, getCollisionBoundingBox, getPlant, getPlantType, isFullCube, isOpaqueCube, neighborChangedaddCollisionBoxToList, 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, 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, getOffsetType, getPackedLightmapCoords, getPickBlock, getPlayerRelativeBlockHardness, getRenderType, getSelectedBoundingBox, getSilkTouchDrop, getSoundType, getSoundType, getStateById, getStateForPlacement, getStateForPlacement, getStateId, getStrongPower, getSubBlocks, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getValidRotations, getWeakChanges, getWeakPower, harvestBlock, 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, isReplaceable, isReplaceableOreGen, isSideSolid, isToolEffective, isTranslucent, isWood, modifyAcceleration, observedNeighborChange, onBlockActivated, onBlockAdded, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockExploded, onBlockHarvested, onBlockPlacedBy, onEntityCollidedWithBlock, onEntityWalk, onFallenUpon, onLanded, onNeighborChange, onPlantGrow, quantityDropped, quantityDropped, quantityDroppedWithBonus, 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 PropertyInteger AGE
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
getBoundingBox in class BlockBushprotected boolean canSustainBush(IBlockState state)
canSustainBush in class BlockBushprotected PropertyInteger getAgeProperty()
public int getMaxAge()
protected int getAge(IBlockState state)
public IBlockState withAge(int age)
public boolean isMaxAge(IBlockState state)
public void updateTick(World worldIn, BlockPos pos, IBlockState state, java.util.Random rand)
updateTick in class BlockBushpublic void grow(World worldIn, BlockPos pos, IBlockState state)
protected int getBonemealAgeIncrease(World worldIn)
public boolean canBlockStay(World worldIn, BlockPos pos, IBlockState state)
canBlockStay in class BlockBushprotected Item getSeed()
protected Item getCrop()
public java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
Blockpublic void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
dropBlockAsItemWithChance in class Blockpublic Item getItemDropped(IBlockState state, java.util.Random rand, int fortune)
getItemDropped in class Blockpublic ItemStack getItem(World worldIn, BlockPos pos, IBlockState state)
public 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 Block