Class StainedGlassBlock


public class StainedGlassBlock
extends TransparentBlock
Mappings:
Namespace Name
official ajs
intermediary net/minecraft/class_307
named net/minecraft/block/StainedGlassBlock
  • Field Details

    • COLOR

      public static final EnumProperty<DyeColor> COLOR
      Mappings:
      Namespace Name Mixin selector
      official a Lajs;a:Lamm;
      intermediary field_1193 Lnet/minecraft/class_307;field_1193:Lnet/minecraft/class_390;
      named COLOR Lnet/minecraft/block/StainedGlassBlock;COLOR:Lnet/minecraft/state/property/EnumProperty;
  • Constructor Details

    • StainedGlassBlock

      public StainedGlassBlock​(Material material)
      Parameters:
      material - The block's material
      Mappings:
      Namespace Name Mixin selector
      official <init> Lafh;<init>(Larm;)V
      intermediary <init> Lnet/minecraft/class_160;<init>(Lnet/minecraft/class_591;)V
      named <init> Lnet/minecraft/block/Block;<init>(Lnet/minecraft/block/Material;)V
  • Method Details

    • 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
    • getMaterialColor

      public MaterialColor getMaterialColor​(BlockState state)
      Returns the block's material color from it's state Blockstates can have different material colors
      Overrides:
      getMaterialColor in class Block
      Parameters:
      state - The Blockstate for which the material color is returned
      Returns:
      materialColor
      Mappings:
      Namespace Name Mixin selector
      official g Lafh;g(Lalz;)Larn;
      intermediary method_720 Lnet/minecraft/class_160;method_720(Lnet/minecraft/class_376;)Lnet/minecraft/class_592;
      named getMaterialColor Lnet/minecraft/block/Block;getMaterialColor(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/MaterialColor;
    • 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;
    • getDropCount

      public int getDropCount​(Random rand)
      Returns the amount of items the block should drop on breaking without bonus rolls.
      Overrides:
      getDropCount in class Block
      Parameters:
      rand - Random object
      Returns:
      Amount of items to be dropped
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ljava/util/Random;)I
      intermediary method_677 Lnet/minecraft/class_160;method_677(Ljava/util/Random;)I
      named getDropCount Lnet/minecraft/block/Block;getDropCount(Ljava/util/Random;)I
    • requiresSilkTouch

      protected boolean requiresSilkTouch()
      Overrides:
      requiresSilkTouch in class Block
      Mappings:
      Namespace Name Mixin selector
      official I Lafh;I()Z
      intermediary method_623 Lnet/minecraft/class_160;method_623()Z
      named requiresSilkTouch Lnet/minecraft/block/Block;requiresSilkTouch()Z
    • renderAsNormalBlock

      public boolean renderAsNormalBlock()
      Returns whether the block can be rendered as a normal block
      Overrides:
      renderAsNormalBlock in class Block
      Returns:
      Whether the block can be rendered as a normal block
      Mappings:
      Namespace Name Mixin selector
      official d Lafh;d()Z
      intermediary method_709 Lnet/minecraft/class_160;method_709()Z
      named renderAsNormalBlock Lnet/minecraft/block/Block;renderAsNormalBlock()Z
    • 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;
    • onCreation

      public void onCreation​(World world, BlockPos pos, BlockState state)
      Runs when the block is placed (by a player or enderman).
      Overrides:
      onCreation in class Block
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c(Ladm;Lcj;Lalz;)V
      intermediary method_703 Lnet/minecraft/class_160;method_703(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)V
      named onCreation Lnet/minecraft/block/Block;onCreation(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
    • onBreaking

      public void onBreaking​(World world, BlockPos pos, BlockState state)
      Runs when the block is removed (by an entity or explosion).
      Overrides:
      onBreaking in class Block
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Ladm;Lcj;Lalz;)V
      intermediary method_688 Lnet/minecraft/class_160;method_688(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)V
      named onBreaking Lnet/minecraft/block/Block;onBreaking(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
    • 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;