Class CropBlock

All Implemented Interfaces:
Growable
Direct Known Subclasses:
BeetrootsBlock, CarrotsBlock, PotatoesBlock

public class CropBlock extends PlantBlock implements Growable
Mappings:
Namespace Name
official amp
intermediary net/minecraft/class_122
named net/minecraft/block/CropBlock
  • Field Details

    • field_9349

      public static final IntProperty field_9349
      Mappings:
      Namespace Name Mixin selector
      official c Lamp;c:Laua;
      intermediary field_9349 Lnet/minecraft/class_122;field_9349:Lnet/minecraft/class_2246;
      named field_9349 Lnet/minecraft/block/CropBlock;field_9349:Lnet/minecraft/state/property/IntProperty;
    • field_12638

      private static final Box[] field_12638
      Mappings:
      Namespace Name Mixin selector
      official a Lamp;a:[Lbdt;
      intermediary field_12638 Lnet/minecraft/class_122;field_12638:[Lnet/minecraft/class_231;
      named field_12638 Lnet/minecraft/block/CropBlock;field_12638:[Lnet/minecraft/util/math/Box;
  • Constructor Details

    • CropBlock

      protected CropBlock()
  • Method Details

    • getCollisionBox

      public Box getCollisionBox(BlockState state, BlockView view, BlockPos pos)
      Overrides:
      getCollisionBox in class PlantBlock
      Mappings:
      Namespace Name Mixin selector
      official b Lalu;b(Latl;Lajw;Lco;)Lbdt;
      intermediary method_11554 Lnet/minecraft/class_197;method_11554(Lnet/minecraft/class_2232;Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)Lnet/minecraft/class_231;
      named getCollisionBox Lnet/minecraft/block/Block;getCollisionBox(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Box;
    • canBePlacedOn

      protected boolean canBePlacedOn(BlockState state)
      Overrides:
      canBePlacedOn in class PlantBlock
      Mappings:
      Namespace Name Mixin selector
      official i Lama;i(Latl;)Z
      intermediary method_11579 Lnet/minecraft/class_1754;method_11579(Lnet/minecraft/class_2232;)Z
      named canBePlacedOn Lnet/minecraft/block/PlantBlock;canBePlacedOn(Lnet/minecraft/block/BlockState;)Z
    • method_11594

      protected IntProperty method_11594()
      Mappings:
      Namespace Name Mixin selector
      official e Lamp;e()Laua;
      intermediary method_11594 Lnet/minecraft/class_122;method_11594()Lnet/minecraft/class_2246;
      named method_11594 Lnet/minecraft/block/CropBlock;method_11594()Lnet/minecraft/state/property/IntProperty;
    • method_11596

      public int method_11596()
      Mappings:
      Namespace Name Mixin selector
      official g Lamp;g()I
      intermediary method_11596 Lnet/minecraft/class_122;method_11596()I
      named method_11596 Lnet/minecraft/block/CropBlock;method_11596()I
    • method_11598

      protected int method_11598(BlockState blockState)
      Mappings:
      Namespace Name Mixin selector
      official z Lamp;z(Latl;)I
      intermediary method_11598 Lnet/minecraft/class_122;method_11598(Lnet/minecraft/class_2232;)I
      named method_11598 Lnet/minecraft/block/CropBlock;method_11598(Lnet/minecraft/block/BlockState;)I
    • method_11595

      public BlockState method_11595(int int2)
      Mappings:
      Namespace Name Mixin selector
      official e Lamp;e(I)Latl;
      intermediary method_11595 Lnet/minecraft/class_122;method_11595(I)Lnet/minecraft/class_2232;
      named method_11595 Lnet/minecraft/block/CropBlock;method_11595(I)Lnet/minecraft/block/BlockState;
    • method_11599

      public boolean method_11599(BlockState blockState)
      Mappings:
      Namespace Name Mixin selector
      official A Lamp;A(Latl;)Z
      intermediary method_11599 Lnet/minecraft/class_122;method_11599(Lnet/minecraft/class_2232;)Z
      named method_11599 Lnet/minecraft/block/CropBlock;method_11599(Lnet/minecraft/block/BlockState;)Z
    • scheduledTick

      public void scheduledTick(World world, BlockPos pos, BlockState state, Random rand)
      Runs when the block is updated as per a schedule
      Overrides:
      scheduledTick in class PlantBlock
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      rand - Random object
      Mappings:
      Namespace Name Mixin selector
      official b Lalu;b(Lajs;Lco;Latl;Ljava/util/Random;)V
      intermediary method_8661 Lnet/minecraft/class_197;method_8661(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Ljava/util/Random;)V
      named scheduledTick Lnet/minecraft/block/Block;scheduledTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/Random;)V
    • method_11597

      public void method_11597(World world, BlockPos blockPos, BlockState blockState)
      Mappings:
      Namespace Name Mixin selector
      official g Lamp;g(Lajs;Lco;Latl;)V
      intermediary method_11597 Lnet/minecraft/class_122;method_11597(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)V
      named method_11597 Lnet/minecraft/block/CropBlock;method_11597(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
    • method_11593

      protected int method_11593(World world)
      Mappings:
      Namespace Name Mixin selector
      official b Lamp;b(Lajs;)I
      intermediary method_11593 Lnet/minecraft/class_122;method_11593(Lnet/minecraft/class_1150;)I
      named method_11593 Lnet/minecraft/block/CropBlock;method_11593(Lnet/minecraft/world/World;)I
    • method_8714

      protected static float method_8714(Block block, World world, BlockPos blockPos)
      Mappings:
      Namespace Name Mixin selector
      official a Lamp;a(Lalu;Lajs;Lco;)F
      intermediary method_8714 Lnet/minecraft/class_122;method_8714(Lnet/minecraft/class_197;Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)F
      named method_8714 Lnet/minecraft/block/CropBlock;method_8714(Lnet/minecraft/block/Block;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)F
    • method_8691

      public boolean method_8691(World world, BlockPos pos, BlockState state)
      Overrides:
      method_8691 in class PlantBlock
      Mappings:
      Namespace Name Mixin selector
      official f Lama;f(Lajs;Lco;Latl;)Z
      intermediary method_8691 Lnet/minecraft/class_1754;method_8691(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Z
      named method_8691 Lnet/minecraft/block/PlantBlock;method_8691(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z
    • method_6469

      protected Item method_6469()
      Mappings:
      Namespace Name Mixin selector
      official h Lamp;h()Lafh;
      intermediary method_6469 Lnet/minecraft/class_122;method_6469()Lnet/minecraft/class_1069;
      named method_6469 Lnet/minecraft/block/CropBlock;method_6469()Lnet/minecraft/item/Item;
    • method_6468

      protected Item method_6468()
      Mappings:
      Namespace Name Mixin selector
      official i Lamp;i()Lafh;
      intermediary method_6468 Lnet/minecraft/class_122;method_6468()Lnet/minecraft/class_1069;
      named method_6468 Lnet/minecraft/block/CropBlock;method_6468()Lnet/minecraft/item/Item;
    • randomDropAsItem

      public void randomDropAsItem(World world, BlockPos pos, BlockState state, float chance, int id)
      Called when the block must be dropped as an item by dropAsItem, but luck is taken into consideration here.
      Overrides:
      randomDropAsItem in class Block
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      chance - The chance (luck factor)
      id - Id
      Mappings:
      Namespace Name Mixin selector
      official a Lalu;a(Lajs;Lco;Latl;FI)V
      intermediary method_410 Lnet/minecraft/class_197;method_410(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;FI)V
      named randomDropAsItem Lnet/minecraft/block/Block;randomDropAsItem(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;FI)V
    • getDropItem

      public Item getDropItem(BlockState blockState, Random random, int state)
      Returns the item that must be dropped when the block is broken
      Overrides:
      getDropItem in class Block
      Parameters:
      blockState - The block's BlockState
      random - Random object
      state - State
      Returns:
      The Item that drops after the block breaks
      Mappings:
      Namespace Name Mixin selector
      official a Lalu;a(Latl;Ljava/util/Random;I)Lafh;
      intermediary method_398 Lnet/minecraft/class_197;method_398(Lnet/minecraft/class_2232;Ljava/util/Random;I)Lnet/minecraft/class_1069;
      named getDropItem Lnet/minecraft/block/Block;getDropItem(Lnet/minecraft/block/BlockState;Ljava/util/Random;I)Lnet/minecraft/item/Item;
    • method_8640

      public ItemStack method_8640(World world, BlockPos blockPos, BlockState blockState)
      Overrides:
      method_8640 in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Lalu;a(Lajs;Lco;Latl;)Lafj;
      intermediary method_8640 Lnet/minecraft/class_197;method_8640(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Lnet/minecraft/class_1071;
      named method_8640 Lnet/minecraft/block/Block;method_8640(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
    • canGrow

      public boolean canGrow(World world, BlockPos pos, BlockState state, boolean bl)
      Specified by:
      canGrow in interface Growable
      Mappings:
      Namespace Name Mixin selector
      official a Lalx;a(Lajs;Lco;Latl;Z)Z
      intermediary method_6460 Lnet/minecraft/class_1753;method_6460(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Z)Z
      named canGrow Lnet/minecraft/block/Growable;canGrow(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)Z
    • canBeFertilized

      public boolean canBeFertilized(World world, Random random, BlockPos pos, BlockState state)
      Specified by:
      canBeFertilized in interface Growable
      Mappings:
      Namespace Name Mixin selector
      official a Lalx;a(Lajs;Ljava/util/Random;Lco;Latl;)Z
      intermediary method_6461 Lnet/minecraft/class_1753;method_6461(Lnet/minecraft/class_1150;Ljava/util/Random;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Z
      named canBeFertilized Lnet/minecraft/block/Growable;canBeFertilized(Lnet/minecraft/world/World;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z
    • grow

      public void grow(World world, Random random, BlockPos pos, BlockState state)
      Specified by:
      grow in interface Growable
      Mappings:
      Namespace Name Mixin selector
      official b Lalx;b(Lajs;Ljava/util/Random;Lco;Latl;)V
      intermediary method_6462 Lnet/minecraft/class_1753;method_6462(Lnet/minecraft/class_1150;Ljava/util/Random;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)V
      named grow Lnet/minecraft/block/Growable;grow(Lnet/minecraft/world/World;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
    • stateFromData

      public BlockState stateFromData(int data)
      Returns a blockstate of the current block from it's id
      Overrides:
      stateFromData in class Block
      Parameters:
      data - The Blockstate's associated data value
      Returns:
      The Default state
      Mappings:
      Namespace Name Mixin selector
      official a Lalu;a(I)Latl;
      intermediary method_8635 Lnet/minecraft/class_197;method_8635(I)Lnet/minecraft/class_2232;
      named stateFromData Lnet/minecraft/block/Block;stateFromData(I)Lnet/minecraft/block/BlockState;
    • getData

      public int getData(BlockState state)
      Returns the data value for a blockstate Throws an IllegalArmumentException as this method does not work
      Overrides:
      getData in class Block
      Parameters:
      state - The Blockstate
      Returns:
      Zero
      Mappings:
      Namespace Name Mixin selector
      official e Lalu;e(Latl;)I
      intermediary method_8671 Lnet/minecraft/class_197;method_8671(Lnet/minecraft/class_2232;)I
      named getData Lnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
    • appendProperties

      protected StateManager appendProperties()
      Returns a new state manager with a property array.
      Overrides:
      appendProperties in class Block
      Returns:
      New state manager
      Mappings:
      Namespace Name Mixin selector
      official b Lalu;b()Latm;
      intermediary method_8676 Lnet/minecraft/class_197;method_8676()Lnet/minecraft/class_2233;
      named appendProperties Lnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;