Class SaplingBlock

All Implemented Interfaces:
Growable

public class SaplingBlock
extends PlantBlock
implements Growable
Mappings:
Namespace Name
official ajj
intermediary net/minecraft/class_298
named net/minecraft/block/SaplingBlock
  • Field Details

    • TYPE

      public static final EnumProperty<PlanksBlock.WoodType> TYPE
      Mappings:
      Namespace Name Mixin selector
      official a Lajj;a:Lamm;
      intermediary field_1182 Lnet/minecraft/class_298;field_1182:Lnet/minecraft/class_390;
      named TYPE Lnet/minecraft/block/SaplingBlock;TYPE:Lnet/minecraft/state/property/EnumProperty;
    • STAGE

      public static final IntProperty STAGE
      Mappings:
      Namespace Name Mixin selector
      official b Lajj;b:Lamn;
      intermediary field_1183 Lnet/minecraft/class_298;field_1183:Lnet/minecraft/class_391;
      named STAGE Lnet/minecraft/block/SaplingBlock;STAGE:Lnet/minecraft/state/property/IntProperty;
  • Constructor Details

    • SaplingBlock

      protected SaplingBlock()
  • Method Details

    • getTranslatedName

      public String getTranslatedName()
      Translates and returns the translation key
      Overrides:
      getTranslatedName in class Block
      Returns:
      Translated name
      Mappings:
      Namespace Name Mixin selector
      official f Lafh;f()Ljava/lang/String;
      intermediary method_716 Lnet/minecraft/class_160;method_716()Ljava/lang/String;
      named getTranslatedName Lnet/minecraft/block/Block;getTranslatedName()Ljava/lang/String;
    • 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 Lafh;b(Ladm;Lcj;Lalz;Ljava/util/Random;)V
      intermediary method_690 Lnet/minecraft/class_160;method_690(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;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_994

      public void method_994​(World world, BlockPos blockPos, BlockState blockState, Random random)
      Mappings:
      Namespace Name Mixin selector
      official d Lajj;d(Ladm;Lcj;Lalz;Ljava/util/Random;)V
      intermediary method_994 Lnet/minecraft/class_298;method_994(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Ljava/util/Random;)V
      named method_994 Lnet/minecraft/block/SaplingBlock;method_994(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/Random;)V
    • method_995

      public void method_995​(World world, BlockPos blockPos, BlockState blockState, Random random)
      Mappings:
      Namespace Name Mixin selector
      official e Lajj;e(Ladm;Lcj;Lalz;Ljava/util/Random;)V
      intermediary method_995 Lnet/minecraft/class_298;method_995(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Ljava/util/Random;)V
      named method_995 Lnet/minecraft/block/SaplingBlock;method_995(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/Random;)V
    • method_992

      private boolean method_992​(World world, BlockPos blockPos, int int2, int int3, PlanksBlock.WoodType woodType)
      Mappings:
      Namespace Name Mixin selector
      official a Lajj;a(Ladm;Lcj;IILaio$a;)Z
      intermediary method_992 Lnet/minecraft/class_298;method_992(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;IILnet/minecraft/class_266$class_267;)Z
      named method_992 Lnet/minecraft/block/SaplingBlock;method_992(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;IILnet/minecraft/block/PlanksBlock$WoodType;)Z
    • method_993

      public boolean method_993​(World world, BlockPos blockPos, PlanksBlock.WoodType woodType)
      Mappings:
      Namespace Name Mixin selector
      official a Lajj;a(Ladm;Lcj;Laio$a;)Z
      intermediary method_993 Lnet/minecraft/class_298;method_993(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_266$class_267;)Z
      named method_993 Lnet/minecraft/block/SaplingBlock;method_993(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/PlanksBlock$WoodType;)Z
    • getMeta

      public int getMeta​(BlockState state)
      Returns the metadata value for a certain BlockState
      Overrides:
      getMeta in class Block
      Parameters:
      state - The BlockState
      Returns:
      Metadata value
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lalz;)I
      intermediary method_672 Lnet/minecraft/class_160;method_672(Lnet/minecraft/class_376;)I
      named getMeta Lnet/minecraft/block/Block;getMeta(Lnet/minecraft/block/BlockState;)I
    • appendItemStacks

      @Environment(CLIENT) public void appendItemStacks​(Item item, ItemGroup group, List<ItemStack> stacks)
      Appends ItemStacks to an itemgroup. Only called on the client.
      Overrides:
      appendItemStacks in class Block
      Parameters:
      item - The Item that must be added
      group - The ItemGroup that the item must be added to
      stacks - The list of currently added ItemStacks to the ItemGroup
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lzw;Lyz;Ljava/util/List;)V
      intermediary method_682 Lnet/minecraft/class_160;method_682(Lnet/minecraft/class_2054;Lnet/minecraft/class_2029;Ljava/util/List;)V
      named appendItemStacks Lnet/minecraft/block/Block;appendItemStacks(Lnet/minecraft/item/Item;Lnet/minecraft/item/ItemGroup;Ljava/util/List;)V
    • 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 Lafj;a(Ladm;Lcj;Lalz;Z)Z
      intermediary method_750 Lnet/minecraft/class_164;method_750(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;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 Lafj;a(Ladm;Ljava/util/Random;Lcj;Lalz;)Z
      intermediary method_751 Lnet/minecraft/class_164;method_751(Lnet/minecraft/class_99;Ljava/util/Random;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)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 Lafj;b(Ladm;Ljava/util/Random;Lcj;Lalz;)V
      intermediary method_752 Lnet/minecraft/class_164;method_752(Lnet/minecraft/class_99;Ljava/util/Random;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)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 Lafh;a(I)Lalz;
      intermediary method_637 Lnet/minecraft/class_160;method_637(I)Lnet/minecraft/class_376;
      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 c Lafh;c(Lalz;)I
      intermediary method_706 Lnet/minecraft/class_160;method_706(Lnet/minecraft/class_376;)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 e Lafh;e()Lama;
      intermediary method_714 Lnet/minecraft/class_160;method_714()Lnet/minecraft/class_378;
      named appendProperties Lnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;