Class GrassBlock

java.lang.Object
net.minecraft.block.Block
net.minecraft.block.GrassBlock
All Implemented Interfaces:
Growable

public class GrassBlock
extends Block
implements Growable
Mappings:
Namespace Name
official ahe
intermediary net/minecraft/class_223
named net/minecraft/block/GrassBlock
  • Field Details

    • SNOWY

      public static final BooleanProperty SNOWY
      Mappings:
      Namespace Name Mixin selector
      official a Lahe;a:Lamk;
      intermediary field_975 Lnet/minecraft/class_223;field_975:Lnet/minecraft/class_388;
      named SNOWY Lnet/minecraft/block/GrassBlock;SNOWY:Lnet/minecraft/state/property/BooleanProperty;
  • Constructor Details

    • GrassBlock

      protected GrassBlock()
  • 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;
    • getColor

      @Environment(CLIENT) public int getColor()
      Overrides:
      getColor in class Block
      Mappings:
      Namespace Name Mixin selector
      official H Lafh;H()I
      intermediary method_622 Lnet/minecraft/class_160;method_622()I
      named getColor Lnet/minecraft/block/Block;getColor()I
    • 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
    • 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 Block
      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
    • 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;
    • 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
    • getRenderLayerType

      @Environment(CLIENT) public RenderLayer getRenderLayerType()
      Returns the appropriate RenderLayer for a block. Only called on the client.
      Overrides:
      getRenderLayerType in class Block
      Returns:
      The block's RenderLayer
      Mappings:
      Namespace Name Mixin selector
      official m Lafh;m()Ladf;
      intermediary method_731 Lnet/minecraft/class_160;method_731()Lnet/minecraft/class_91;
      named getRenderLayerType Lnet/minecraft/block/Block;getRenderLayerType()Lnet/minecraft/client/render/RenderLayer;
    • 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;