Package net.minecraft.block
Class CropsBlock
- java.lang.Object
-
- net.minecraftforge.registries.ForgeRegistryEntry<Block>
-
- net.minecraft.block.AbstractBlock
-
- net.minecraft.block.Block
-
- net.minecraft.block.BushBlock
-
- net.minecraft.block.CropsBlock
-
- All Implemented Interfaces:
IGrowable
,IItemProvider
,IForgeBlock
,IPlantable
,IForgeRegistryEntry<Block>
- Direct Known Subclasses:
BeetrootBlock
,CarrotBlock
,PotatoBlock
public class CropsBlock extends BushBlock implements IGrowable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.RenderSideCacheKey
-
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.IExtendedPositionPredicate<A>, AbstractBlock.IPositionPredicate, AbstractBlock.OffsetType, AbstractBlock.Properties
-
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
-
Field Summary
Fields Modifier and Type Field Description static IntegerProperty
AGE
private static VoxelShape[]
SHAPE_BY_AGE
-
Fields inherited from class net.minecraft.block.Block
BLOCK_STATE_REGISTRY, LOGGER, RANDOM, stateDefinition
-
Fields inherited from class net.minecraft.block.AbstractBlock
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, material, properties, soundType, speedFactor, UPDATE_SHAPE_ORDER
-
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
-
Constructor Summary
Constructors Constructor Description CropsBlock(AbstractBlock.Properties p_i48421_1_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canSurvive(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_)
protected void
createBlockStateDefinition(StateContainer.Builder<Block,BlockState> p_206840_1_)
void
entityInside(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_)
protected int
getAge(BlockState p_185527_1_)
IntegerProperty
getAgeProperty()
protected IItemProvider
getBaseSeedId()
protected int
getBonemealAgeIncrease(World p_185529_1_)
ItemStack
getCloneItemStack(IBlockReader p_185473_1_, BlockPos p_185473_2_, BlockState p_185473_3_)
protected static float
getGrowthSpeed(Block p_180672_0_, IBlockReader p_180672_1_, BlockPos p_180672_2_)
int
getMaxAge()
VoxelShape
getShape(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_)
BlockState
getStateForAge(int p_185528_1_)
void
growCrops(World p_176487_1_, BlockPos p_176487_2_, BlockState p_176487_3_)
boolean
isBonemealSuccess(World p_180670_1_, java.util.Random p_180670_2_, BlockPos p_180670_3_, BlockState p_180670_4_)
boolean
isMaxAge(BlockState p_185525_1_)
boolean
isRandomlyTicking(BlockState p_149653_1_)
boolean
isValidBonemealTarget(IBlockReader p_176473_1_, BlockPos p_176473_2_, BlockState p_176473_3_, boolean p_176473_4_)
protected boolean
mayPlaceOn(BlockState p_200014_1_, IBlockReader p_200014_2_, BlockPos p_200014_3_)
void
performBonemeal(ServerWorld p_225535_1_, java.util.Random p_225535_2_, BlockPos p_225535_3_, BlockState p_225535_4_)
void
randomTick(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, java.util.Random p_225542_4_)
-
Methods inherited from class net.minecraft.block.BushBlock
getPlant, isPathfindable, propagatesSkylightDown, updateShape
-
Methods inherited from class net.minecraft.block.Block
animateTick, appendHoverText, asBlock, asItem, box, byItem, canSupportCenter, canSupportRigidBlock, canSustainPlant, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, fillItemCategory, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getHarvestLevel, getHarvestTool, getId, getJumpFactor, getName, getSoundType, getSpeedFactor, getStateDefinition, getStateForPlacement, getTags, handleRain, hasDynamicShape, is, is, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, stateById, stepOn, toString, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded
-
Methods inherited from class net.minecraft.block.AbstractBlock
attack, canBeReplaced, canBeReplaced, defaultMaterialColor, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMenuProvider, getOcclusionShape, getOffsetType, getPistonPushReaction, getRenderShape, getSeed, getShadeBrightness, getSignal, getVisualShape, hasAnalogOutputSignal, isAir, isEntityBlock, isSignalSource, mirror, neighborChanged, onPlace, onProjectileHit, onRemove, rotate, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, use, useShapeForLightOcclusion
-
Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlock
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, canBeReplacedByLeaves, canBeReplacedByLogs, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, catchFire, collisionExtendsVertically, createTileEntity, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlock, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFogColor, getLightValue, getPickBlock, getRespawnPosition, getSlipperiness, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasTileEntity, isAir, isBed, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, isToolEffective, makesOpenTrapdoorAboveClimbable, observedNeighborChange, onBlockExploded, onNeighborChange, onPlantGrow, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay
-
Methods inherited from interface net.minecraftforge.common.IPlantable
getPlantType
-
-
-
-
Field Detail
-
AGE
public static final IntegerProperty AGE
-
SHAPE_BY_AGE
private static final VoxelShape[] SHAPE_BY_AGE
-
-
Constructor Detail
-
CropsBlock
public CropsBlock(AbstractBlock.Properties p_i48421_1_)
-
-
Method Detail
-
getShape
public VoxelShape getShape(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_)
- Overrides:
getShape
in classAbstractBlock
-
mayPlaceOn
protected boolean mayPlaceOn(BlockState p_200014_1_, IBlockReader p_200014_2_, BlockPos p_200014_3_)
- Overrides:
mayPlaceOn
in classBushBlock
-
getAgeProperty
public IntegerProperty getAgeProperty()
-
getMaxAge
public int getMaxAge()
-
getAge
protected int getAge(BlockState p_185527_1_)
-
getStateForAge
public BlockState getStateForAge(int p_185528_1_)
-
isMaxAge
public boolean isMaxAge(BlockState p_185525_1_)
-
isRandomlyTicking
public boolean isRandomlyTicking(BlockState p_149653_1_)
- Overrides:
isRandomlyTicking
in classBlock
-
randomTick
public void randomTick(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, java.util.Random p_225542_4_)
- Overrides:
randomTick
in classAbstractBlock
-
growCrops
public void growCrops(World p_176487_1_, BlockPos p_176487_2_, BlockState p_176487_3_)
-
getBonemealAgeIncrease
protected int getBonemealAgeIncrease(World p_185529_1_)
-
getGrowthSpeed
protected static float getGrowthSpeed(Block p_180672_0_, IBlockReader p_180672_1_, BlockPos p_180672_2_)
-
canSurvive
public boolean canSurvive(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_)
- Overrides:
canSurvive
in classBushBlock
-
entityInside
public void entityInside(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_)
- Overrides:
entityInside
in classAbstractBlock
-
getBaseSeedId
protected IItemProvider getBaseSeedId()
-
getCloneItemStack
public ItemStack getCloneItemStack(IBlockReader p_185473_1_, BlockPos p_185473_2_, BlockState p_185473_3_)
- Overrides:
getCloneItemStack
in classBlock
-
isValidBonemealTarget
public boolean isValidBonemealTarget(IBlockReader p_176473_1_, BlockPos p_176473_2_, BlockState p_176473_3_, boolean p_176473_4_)
- Specified by:
isValidBonemealTarget
in interfaceIGrowable
-
isBonemealSuccess
public boolean isBonemealSuccess(World p_180670_1_, java.util.Random p_180670_2_, BlockPos p_180670_3_, BlockState p_180670_4_)
- Specified by:
isBonemealSuccess
in interfaceIGrowable
-
performBonemeal
public void performBonemeal(ServerWorld p_225535_1_, java.util.Random p_225535_2_, BlockPos p_225535_3_, BlockState p_225535_4_)
- Specified by:
performBonemeal
in interfaceIGrowable
-
createBlockStateDefinition
protected void createBlockStateDefinition(StateContainer.Builder<Block,BlockState> p_206840_1_)
- Overrides:
createBlockStateDefinition
in classBlock
-
-