public class BlockCrops extends BlockBush implements IGrowable
Block.EnumOffsetType
IForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>
Modifier and Type | Field and Description |
---|---|
static PropertyInteger |
AGE |
private static AxisAlignedBB[] |
CROPS_AABB |
BLOCK_STATE_IDS, blockHardness, blockMapColor, blockMaterial, blockParticleGravity, blockResistance, blockSoundType, blockState, capturedDrops, captureDrops, enableStats, FULL_BLOCK_AABB, fullBlock, harvesters, hasTileEntity, lightOpacity, lightValue, needsRandomTick, NULL_AABB, RANDOM, REGISTRY, slipperiness, translucent, useNeighborBrightness
delegate
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) |
protected boolean |
canSustainBush(IBlockState state) |
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) |
protected int |
getAge(IBlockState state) |
protected PropertyInteger |
getAgeProperty() |
protected int |
getBonemealAgeIncrease(World worldIn) |
AxisAlignedBB |
getBoundingBox(IBlockState state,
IBlockAccess source,
BlockPos pos) |
protected Item |
getCrop() |
void |
getDrops(NonNullList<ItemStack> drops,
IBlockAccess world,
BlockPos pos,
IBlockState state,
int fortune)
This gets 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) |
int |
getMaxAge() |
int |
getMetaFromState(IBlockState state) |
protected Item |
getSeed() |
IBlockState |
getStateFromMeta(int meta) |
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, getBlockFaceShape, getBlockLayer, getCollisionBoundingBox, getPlant, getPlantType, isFullCube, isOpaqueCube, neighborChanged
addCollisionBoxToList, addCollisionBoxToList, addDestroyEffects, addHitEffects, addInformation, addLandingEffects, addRunningEffects, 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, doesSideBlockChestOpening, doesSideBlockRendering, dropBlockAsItem, dropXpOnBlockBreak, eventReceived, fillWithRain, getActualState, getAiPathNodeType, getAiPathNodeType, getAmbientOcclusionLightValue, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlockById, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockLiquidHeight, getBlockState, getComparatorInputOverride, getCreativeTabToDisplayOn, getDefaultState, getDrops, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getFogColor, getHarvestLevel, getHarvestTool, getIdFromBlock, getLightOpacity, getLightOpacity, getLightValue, getLightValue, getLocalizedName, getMapColor, getMaterial, getMobilityFlag, getOffset, getOffsetType, getPackedLightmapCoords, getPickBlock, getPlayerRelativeBlockHardness, getRenderType, getSelectedBoundingBox, getSilkTouchDrop, getSlipperiness, getSoundType, getSoundType, getStateAtViewpoint, getStateById, getStateForPlacement, getStateForPlacement, getStateId, getStrongPower, getSubBlocks, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getValidRotations, getWeakChanges, getWeakPower, harvestBlock, hasComparatorInputOverride, hasCustomBreakingProgress, hasTileEntity, hasTileEntity, isAABBInsideLiquid, isAABBInsideMaterial, isAir, isAssociatedBlock, isBeaconBase, isBed, isBedFoot, isBlockNormalCube, isBurning, isCollidable, isEntityInsideMaterial, isEqualTo, isExceptBlockForAttachWithPiston, isExceptionBlockForAttaching, isFertile, isFireSource, isFlammable, isFoliage, isFullBlock, isLadder, isLeaves, isNormalCube, isNormalCube, isPassable, isReplaceable, isReplaceableOreGen, isSideSolid, isStickyBlock, isToolEffective, isTopSolid, 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, setDefaultSlipperiness, setDefaultState, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setResistance, setSoundType, setTickRandomly, setUnlocalizedName, shouldCheckWeakPower, shouldSideBeRendered, spawnAsEntity, tickRate, toString, withMirror, withRotation
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
public static final PropertyInteger AGE
private static final AxisAlignedBB[] CROPS_AABB
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
getBoundingBox
in class BlockBush
protected boolean canSustainBush(IBlockState state)
canSustainBush
in class BlockBush
protected 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 BlockBush
public 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 BlockBush
protected Item getSeed()
protected Item getCrop()
public void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
Block
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
dropBlockAsItemWithChance
in class Block
public Item getItemDropped(IBlockState state, java.util.Random rand, int fortune)
getItemDropped
in class Block
public 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 IGrowable
public void grow(World worldIn, java.util.Random rand, BlockPos pos, IBlockState state)
public IBlockState getStateFromMeta(int meta)
getStateFromMeta
in class Block
public int getMetaFromState(IBlockState state)
getMetaFromState
in class Block
protected BlockStateContainer createBlockState()
createBlockState
in class Block