Class AttachedStemBlock

All Implemented Interfaces:
Growable

public class AttachedStemBlock
extends PlantBlock
implements Growable
Mappings:
Namespace Name
official ajx
intermediary net/minecraft/class_314
named net/minecraft/block/AttachedStemBlock
  • Field Details

    • AGE

      public static final IntProperty AGE
      Mappings:
      Namespace Name Mixin selector
      official a Lajx;a:Lamn;
      intermediary field_1216 Lnet/minecraft/class_314;field_1216:Lnet/minecraft/class_391;
      named AGE Lnet/minecraft/block/AttachedStemBlock;AGE:Lnet/minecraft/state/property/IntProperty;
    • FACING

      public static final DirectionProperty FACING
      Mappings:
      Namespace Name Mixin selector
      official b Lajx;b:Laml;
      intermediary field_1217 Lnet/minecraft/class_314;field_1217:Lnet/minecraft/class_389;
      named FACING Lnet/minecraft/block/AttachedStemBlock;FACING:Lnet/minecraft/state/property/DirectionProperty;
    • mainBlock

      private final Block mainBlock
      Mappings:
      Namespace Name Mixin selector
      official N Lajx;N:Lafh;
      intermediary field_1215 Lnet/minecraft/class_314;field_1215:Lnet/minecraft/class_160;
      named mainBlock Lnet/minecraft/block/AttachedStemBlock;mainBlock:Lnet/minecraft/block/Block;
  • Constructor Details

    • AttachedStemBlock

      protected AttachedStemBlock​(Block mainBlock)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lajx;<init>(Lafh;)V
      intermediary <init> Lnet/minecraft/class_314;<init>(Lnet/minecraft/class_160;)V
      named <init> Lnet/minecraft/block/AttachedStemBlock;<init>(Lnet/minecraft/block/Block;)V
  • Method Details

    • getBlockState

      public BlockState getBlockState​(BlockState state, WorldView view, BlockPos pos)
      Returns the current block's blockstate at a certain position
      Overrides:
      getBlockState in class Block
      Parameters:
      state - The original blockstate
      view - WorldView instance
      pos - The block's position
      Returns:
      state
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lalz;Ladq;Lcj;)Lalz;
      intermediary method_673 Lnet/minecraft/class_160;method_673(Lnet/minecraft/class_376;Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Lnet/minecraft/class_376;
      named getBlockState Lnet/minecraft/block/Block;getBlockState(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;
    • canPlantOnTop

      protected boolean canPlantOnTop​(Block block)
      Overrides:
      canPlantOnTop in class PlantBlock
      Mappings:
      Namespace Name Mixin selector
      official c Lafm;c(Lafh;)Z
      intermediary method_753 Lnet/minecraft/class_167;method_753(Lnet/minecraft/class_160;)Z
      named canPlantOnTop Lnet/minecraft/block/PlantBlock;canPlantOnTop(Lnet/minecraft/block/Block;)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 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_1015

      public void method_1015​(World world, BlockPos blockPos, BlockState blockState)
      Mappings:
      Namespace Name Mixin selector
      official g Lajx;g(Ladm;Lcj;Lalz;)V
      intermediary method_1015 Lnet/minecraft/class_314;method_1015(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)V
      named method_1015 Lnet/minecraft/block/AttachedStemBlock;method_1015(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
    • getColor

      @Environment(CLIENT) public int getColor​(BlockState state)
      Overrides:
      getColor in class Block
      Mappings:
      Namespace Name Mixin selector
      official h Lafh;h(Lalz;)I
      intermediary method_722 Lnet/minecraft/class_160;method_722(Lnet/minecraft/class_376;)I
      named getColor Lnet/minecraft/block/Block;getColor(Lnet/minecraft/block/BlockState;)I
    • getBlockColor

      @Environment(CLIENT) public int getBlockColor​(WorldView view, BlockPos pos, int id)
      Returns the current block's color
      Overrides:
      getBlockColor in class Block
      Parameters:
      view - WorldView instance
      pos - The block's position
      id - Id
      Returns:
      Block color
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladq;Lcj;I)I
      intermediary method_666 Lnet/minecraft/class_160;method_666(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;I)I
      named getBlockColor Lnet/minecraft/block/Block;getBlockColor(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;I)I
    • setBlockItemBounds

      public void setBlockItemBounds()
      Sets the bounds for the BlockItem
      Overrides:
      setBlockItemBounds in class Block
      Mappings:
      Namespace Name Mixin selector
      official j Lafh;j()V
      intermediary method_725 Lnet/minecraft/class_160;method_725()V
      named setBlockItemBounds Lnet/minecraft/block/Block;setBlockItemBounds()V
    • setBoundingBox

      public void setBoundingBox​(WorldView view, BlockPos pos)
      Overrides:
      setBoundingBox in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladq;Lcj;)V
      intermediary method_665 Lnet/minecraft/class_160;method_665(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)V
      named setBoundingBox Lnet/minecraft/block/Block;setBoundingBox(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)V
    • 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 Lafh;a(Ladm;Lcj;Lalz;FI)V
      intermediary method_646 Lnet/minecraft/class_160;method_646(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;FI)V
      named randomDropAsItem Lnet/minecraft/block/Block;randomDropAsItem(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;FI)V
    • getSeeds

      protected Item getSeeds()
      Mappings:
      Namespace Name Mixin selector
      official l Lajx;l()Lzw;
      intermediary method_1016 Lnet/minecraft/class_314;method_1016()Lnet/minecraft/class_2054;
      named getSeeds Lnet/minecraft/block/AttachedStemBlock;getSeeds()Lnet/minecraft/item/Item;
    • 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 Lafh;a(Lalz;Ljava/util/Random;I)Lzw;
      intermediary method_674 Lnet/minecraft/class_160;method_674(Lnet/minecraft/class_376;Ljava/util/Random;I)Lnet/minecraft/class_2054;
      named getDropItem Lnet/minecraft/block/Block;getDropItem(Lnet/minecraft/block/BlockState;Ljava/util/Random;I)Lnet/minecraft/item/Item;
    • getPickItem

      @Environment(CLIENT) public Item getPickItem​(World world, BlockPos pos)
      Called when a player presses the pick block key while facing the block. It returns the item that must be placed into the player's inventory.
      Overrides:
      getPickItem in class Block
      Returns:
      The Item that must be placed into the player's inventory
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c(Ladm;Lcj;)Lzw;
      intermediary method_702 Lnet/minecraft/class_160;method_702(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Lnet/minecraft/class_2054;
      named getPickItem Lnet/minecraft/block/Block;getPickItem(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/item/Item;
    • 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;