Package net.minecraft.block
Class CropBlock
java.lang.Object
net.minecraft.block.Block
net.minecraft.block.PlantBlock
net.minecraft.block.CropBlock
- All Implemented Interfaces:
Growable
- Direct Known Subclasses:
BeetrootsBlock,CarrotsBlock,PotatoesBlock
- Mappings:
Namespace Name official ampintermediary net/minecraft/class_122named net/minecraft/block/CropBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.OffsetType -
Field Summary
FieldsFields inherited from class net.minecraft.block.PlantBlock
field_12594Fields inherited from class net.minecraft.block.Block
blastResistance, BLOCK_STATES, blockEntity, blockSoundGroup, collisionBox, EMPTY_BOX, fullBlock, hardness, lightLevel, material, materialColor, opacity, particleGravity, randomTicks, REGISTRY, slipperiness, stateManager, stats, transluscent, useNeighbourLight -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StateManagerReturns a new state manager with a property array.booleancanBeFertilized(World world, Random random, BlockPos pos, BlockState state) protected booleancanBePlacedOn(BlockState state) booleancanGrow(World world, BlockPos pos, BlockState state, boolean bl) getCollisionBox(BlockState state, BlockView view, BlockPos pos) intgetData(BlockState state) Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not workgetDropItem(BlockState blockState, Random random, int state) Returns the item that must be dropped when the block is brokenvoidgrow(World world, Random random, BlockPos pos, BlockState state) protected intmethod_11593(World world) protected IntPropertymethod_11595(int int2) intvoidmethod_11597(World world, BlockPos blockPos, BlockState blockState) protected intmethod_11598(BlockState blockState) booleanmethod_11599(BlockState blockState) protected Itemprotected Itemmethod_8640(World world, BlockPos blockPos, BlockState blockState) booleanmethod_8691(World world, BlockPos pos, BlockState state) protected static floatmethod_8714(Block block, World world, BlockPos blockPos) voidrandomDropAsItem(World world, BlockPos pos, BlockState state, float chance, int id) Called when the block must be dropped as an item bydropAsItem, but luck is taken into consideration here.voidscheduledTick(World world, BlockPos pos, BlockState state, Random rand) Runs when the block is updated as per a schedulestateFromData(int data) Returns a blockstate of the current block from it's idMethods inherited from class net.minecraft.block.PlantBlock
canBePlacedAtPos, getRenderLayerType, isFullBoundsCubeForCulling, method_11562, method_8640, method_8690, onBreakMethods inherited from class net.minecraft.block.Block
appendCollisionBoxes, appendCollisionBoxes, areBlocksEqual, blocksMovement, canBePlacedAdjacent, canCollide, canMobSpawnInside, createStackFromBlock, disableStats, dropAsItem, dropExperience, get, getBlastResistance, getBlockFromItem, getBlockRenderType, getBlockState, getBonusDrops, getByBlockState, getById, getComparatorOutput, getDefaultState, getDropCount, getHardness, getIdByBlock, getItemGroup, getLuminance, getMaterial, getMaterialColor, getMeta, getOffsetType, getOpacity, getPistonBehavior, getSoundGroup, getStateFromData, getStateFromRawId, getStateManager, getTickRate, getTranslatedName, getTranslationKey, hasBlockEntity, hasCollision, hasCollision, hasStats, isEqualTo, isFire, isFullBlock, isTransluscent, method_11557, method_11559, method_11563, method_11564, method_11565, method_11566, method_11568, method_11575, method_11576, method_11577, method_13315, method_13700, method_13701, method_13702, method_13703, method_13704, method_414, method_435, method_8638, method_8651, method_8653, method_8654, method_8664, method_8669, onBlockBreak, onBlockBreakStart, onBreakByPlayer, onBreakByPlayer, onBreaking, onCreation, onDestroyedByExplosion, onEntityCollision, onEntityCollision, onLandedUpon, onPlaced, onSteppedOn, onUpdateTick, rainTick, requiresSilkTouch, setBlockSoundGroup, setDefaultState, setEntityVelocity, setItemGroup, setLightLevel, setOpacity, setResistance, setStrength, setTickRandomly, setTranslationKey, setUnbreakable, setup, shouldDropItemsOnExplosion, ticksRandomly, toString, use, useNeighbourLight, withMirror, withRotation
-
Field Details
-
field_9349
- Mappings:
Namespace Name Mixin selector official cLamp;c:Laua;intermediary field_9349Lnet/minecraft/class_122;field_9349:Lnet/minecraft/class_2246;named field_9349Lnet/minecraft/block/CropBlock;field_9349:Lnet/minecraft/state/property/IntProperty;
-
field_12638
- Mappings:
Namespace Name Mixin selector official aLamp;a:[Lbdt;intermediary field_12638Lnet/minecraft/class_122;field_12638:[Lnet/minecraft/class_231;named field_12638Lnet/minecraft/block/CropBlock;field_12638:[Lnet/minecraft/util/math/Box;
-
-
Constructor Details
-
CropBlock
protected CropBlock()
-
-
Method Details
-
getCollisionBox
- Overrides:
getCollisionBoxin classPlantBlock- Mappings:
Namespace Name Mixin selector official bLalu;b(Latl;Lajw;Lco;)Lbdt;intermediary method_11554Lnet/minecraft/class_197;method_11554(Lnet/minecraft/class_2232;Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)Lnet/minecraft/class_231;named getCollisionBoxLnet/minecraft/block/Block;getCollisionBox(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Box;
-
canBePlacedOn
- Overrides:
canBePlacedOnin classPlantBlock- Mappings:
Namespace Name Mixin selector official iLama;i(Latl;)Zintermediary method_11579Lnet/minecraft/class_1754;method_11579(Lnet/minecraft/class_2232;)Znamed canBePlacedOnLnet/minecraft/block/PlantBlock;canBePlacedOn(Lnet/minecraft/block/BlockState;)Z
-
method_11594
- Mappings:
Namespace Name Mixin selector official eLamp;e()Laua;intermediary method_11594Lnet/minecraft/class_122;method_11594()Lnet/minecraft/class_2246;named method_11594Lnet/minecraft/block/CropBlock;method_11594()Lnet/minecraft/state/property/IntProperty;
-
method_11596
public int method_11596()- Mappings:
Namespace Name Mixin selector official gLamp;g()Iintermediary method_11596Lnet/minecraft/class_122;method_11596()Inamed method_11596Lnet/minecraft/block/CropBlock;method_11596()I
-
method_11598
- Mappings:
Namespace Name Mixin selector official zLamp;z(Latl;)Iintermediary method_11598Lnet/minecraft/class_122;method_11598(Lnet/minecraft/class_2232;)Inamed method_11598Lnet/minecraft/block/CropBlock;method_11598(Lnet/minecraft/block/BlockState;)I
-
method_11595
- Mappings:
Namespace Name Mixin selector official eLamp;e(I)Latl;intermediary method_11595Lnet/minecraft/class_122;method_11595(I)Lnet/minecraft/class_2232;named method_11595Lnet/minecraft/block/CropBlock;method_11595(I)Lnet/minecraft/block/BlockState;
-
method_11599
- Mappings:
Namespace Name Mixin selector official ALamp;A(Latl;)Zintermediary method_11599Lnet/minecraft/class_122;method_11599(Lnet/minecraft/class_2232;)Znamed method_11599Lnet/minecraft/block/CropBlock;method_11599(Lnet/minecraft/block/BlockState;)Z
-
scheduledTick
Runs when the block is updated as per a schedule- Overrides:
scheduledTickin classPlantBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStaterand- Random object- Mappings:
Namespace Name Mixin selector official bLalu;b(Lajs;Lco;Latl;Ljava/util/Random;)Vintermediary method_8661Lnet/minecraft/class_197;method_8661(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Ljava/util/Random;)Vnamed scheduledTickLnet/minecraft/block/Block;scheduledTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/Random;)V
-
method_11597
- Mappings:
Namespace Name Mixin selector official gLamp;g(Lajs;Lco;Latl;)Vintermediary method_11597Lnet/minecraft/class_122;method_11597(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Vnamed method_11597Lnet/minecraft/block/CropBlock;method_11597(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
method_11593
- Mappings:
Namespace Name Mixin selector official bLamp;b(Lajs;)Iintermediary method_11593Lnet/minecraft/class_122;method_11593(Lnet/minecraft/class_1150;)Inamed method_11593Lnet/minecraft/block/CropBlock;method_11593(Lnet/minecraft/world/World;)I
-
method_8714
- Mappings:
Namespace Name Mixin selector official aLamp;a(Lalu;Lajs;Lco;)Fintermediary method_8714Lnet/minecraft/class_122;method_8714(Lnet/minecraft/class_197;Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)Fnamed method_8714Lnet/minecraft/block/CropBlock;method_8714(Lnet/minecraft/block/Block;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)F
-
method_8691
- Overrides:
method_8691in classPlantBlock- Mappings:
Namespace Name Mixin selector official fLama;f(Lajs;Lco;Latl;)Zintermediary method_8691Lnet/minecraft/class_1754;method_8691(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Znamed method_8691Lnet/minecraft/block/PlantBlock;method_8691(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z
-
method_6469
- Mappings:
Namespace Name Mixin selector official hLamp;h()Lafh;intermediary method_6469Lnet/minecraft/class_122;method_6469()Lnet/minecraft/class_1069;named method_6469Lnet/minecraft/block/CropBlock;method_6469()Lnet/minecraft/item/Item;
-
method_6468
- Mappings:
Namespace Name Mixin selector official iLamp;i()Lafh;intermediary method_6468Lnet/minecraft/class_122;method_6468()Lnet/minecraft/class_1069;named method_6468Lnet/minecraft/block/CropBlock;method_6468()Lnet/minecraft/item/Item;
-
randomDropAsItem
Called when the block must be dropped as an item bydropAsItem, but luck is taken into consideration here.- Overrides:
randomDropAsItemin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStatechance- The chance (luck factor)id- Id- Mappings:
Namespace Name Mixin selector official aLalu;a(Lajs;Lco;Latl;FI)Vintermediary method_410Lnet/minecraft/class_197;method_410(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;FI)Vnamed randomDropAsItemLnet/minecraft/block/Block;randomDropAsItem(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;FI)V
-
getDropItem
Returns the item that must be dropped when the block is broken- Overrides:
getDropItemin classBlock- Parameters:
blockState- The block's BlockStaterandom- Random objectstate- State- Returns:
- The Item that drops after the block breaks
- Mappings:
Namespace Name Mixin selector official aLalu;a(Latl;Ljava/util/Random;I)Lafh;intermediary method_398Lnet/minecraft/class_197;method_398(Lnet/minecraft/class_2232;Ljava/util/Random;I)Lnet/minecraft/class_1069;named getDropItemLnet/minecraft/block/Block;getDropItem(Lnet/minecraft/block/BlockState;Ljava/util/Random;I)Lnet/minecraft/item/Item;
-
method_8640
- Overrides:
method_8640in classBlock- Mappings:
Namespace Name Mixin selector official aLalu;a(Lajs;Lco;Latl;)Lafj;intermediary method_8640Lnet/minecraft/class_197;method_8640(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Lnet/minecraft/class_1071;named method_8640Lnet/minecraft/block/Block;method_8640(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
-
canGrow
- Specified by:
canGrowin interfaceGrowable- Mappings:
Namespace Name Mixin selector official aLalx;a(Lajs;Lco;Latl;Z)Zintermediary method_6460Lnet/minecraft/class_1753;method_6460(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Z)Znamed canGrowLnet/minecraft/block/Growable;canGrow(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)Z
-
canBeFertilized
- Specified by:
canBeFertilizedin interfaceGrowable- Mappings:
Namespace Name Mixin selector official aLalx;a(Lajs;Ljava/util/Random;Lco;Latl;)Zintermediary method_6461Lnet/minecraft/class_1753;method_6461(Lnet/minecraft/class_1150;Ljava/util/Random;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Znamed canBeFertilizedLnet/minecraft/block/Growable;canBeFertilized(Lnet/minecraft/world/World;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z
-
grow
- Specified by:
growin interfaceGrowable- Mappings:
Namespace Name Mixin selector official bLalx;b(Lajs;Ljava/util/Random;Lco;Latl;)Vintermediary method_6462Lnet/minecraft/class_1753;method_6462(Lnet/minecraft/class_1150;Ljava/util/Random;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Vnamed growLnet/minecraft/block/Growable;grow(Lnet/minecraft/world/World;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
stateFromData
Returns a blockstate of the current block from it's id- Overrides:
stateFromDatain classBlock- Parameters:
data- The Blockstate's associated data value- Returns:
- The Default state
- Mappings:
Namespace Name Mixin selector official aLalu;a(I)Latl;intermediary method_8635Lnet/minecraft/class_197;method_8635(I)Lnet/minecraft/class_2232;named stateFromDataLnet/minecraft/block/Block;stateFromData(I)Lnet/minecraft/block/BlockState;
-
getData
Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not work- Overrides:
getDatain classBlock- Parameters:
state- The Blockstate- Returns:
- Zero
- Mappings:
Namespace Name Mixin selector official eLalu;e(Latl;)Iintermediary method_8671Lnet/minecraft/class_197;method_8671(Lnet/minecraft/class_2232;)Inamed getDataLnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
-
appendProperties
Returns a new state manager with a property array.- Overrides:
appendPropertiesin classBlock- Returns:
- New state manager
- Mappings:
Namespace Name Mixin selector official bLalu;b()Latm;intermediary method_8676Lnet/minecraft/class_197;method_8676()Lnet/minecraft/class_2233;named appendPropertiesLnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;
-