Class Block

java.lang.Object
net.minecraft.block.Block
Direct Known Subclasses:
AbstractButtonBlock, AbstractFluidBlock, AbstractPressurePlateBlock, AbstractRailBlock, AirBlock, BarrierBlock, BaseLeavesBlock, BigMushroomBlock, BlockWithEntity, BookshelfBlock, CactusBlock, CakeBlock, CarpetBlock, CauldronBlock, ClayBlock, CobwebBlock, CraftingTableBlock, DirtBlock, DoorBlock, DragonEggBlock, EndPortalFrameBlock, FallingBlock, FarmlandBlock, FenceBlock, FireBlock, GlowstoneBlock, GrassBlock, HardenedClayBlock, HorizontalFacingBlock, InfestedBlock, LadderBlock, LeverBlock, MelonBlock, MyceliumBlock, NetherBrickBlock, NetherrackBlock, ObsidianBlock, OreBlock, PackedIceBlock, PaneBlock, PillarBlock, PistonBlock, PistonHeadBlock, PlanksBlock, PlantBlock, PrismarineBlock, QuartzBlock, RedSandstoneBlock, RedstoneBlock, RedstoneLampBlock, RedstoneOreBlock, RedstoneWireBlock, SandstoneBlock, SeaLanternBlock, SlabBlock, SnowBlock, SnowLayerBlock, SoulSandBlock, SpongeBlock, StairsBlock, StoneBlock, StoneBrickBlock, SugarCaneBlock, TntBlock, TorchBlock, TransparentBlock, TrapdoorBlock, TripwireBlock, TripwireHookBlock, VineBlock, WallBlock, WoolBlock

public class Block
extends Object
The Block class provides useful methods and fields for creation of Blocks. All blocks extend the Block class. The Block class also registers all the blocks.
Mappings:
Namespace Name
official afh
intermediary net/minecraft/class_160
named net/minecraft/block/Block
  • Field Details

    • AIR_ID

      private static final Identifier AIR_ID
      The Identifier for Air
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a:Ljy;
      intermediary field_591 Lnet/minecraft/class_160;field_591:Lnet/minecraft/class_1605;
      named AIR_ID Lnet/minecraft/block/Block;AIR_ID:Lnet/minecraft/util/Identifier;
    • REGISTRY

      public static final BiDefaultedRegistry<Identifier,​Block> REGISTRY
      The Registry object to which all blocks get registered to
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c:Lco;
      intermediary field_593 Lnet/minecraft/class_160;field_593:Lnet/minecraft/class_1381;
      named REGISTRY Lnet/minecraft/block/Block;REGISTRY:Lnet/minecraft/util/registry/BiDefaultedRegistry;
    • BLOCK_STATES

      public static final IdList<BlockState> BLOCK_STATES
      A List of all blockstates, used by Debug worlds
      Mappings:
      Namespace Name Mixin selector
      official d Lafh;d:Lct;
      intermediary field_594 Lnet/minecraft/class_160;field_594:Lnet/minecraft/class_1389;
      named BLOCK_STATES Lnet/minecraft/block/Block;BLOCK_STATES:Lnet/minecraft/util/IdList;
    • ORE

      public static final Block.Sound ORE
      Ore sound type
      Mappings:
      Namespace Name Mixin selector
      official e Lafh;e:Lafh$b;
      intermediary field_595 Lnet/minecraft/class_160;field_595:Lnet/minecraft/class_160$class_162;
      named ORE Lnet/minecraft/block/Block;ORE:Lnet/minecraft/block/Block$Sound;
    • WOOD

      public static final Block.Sound WOOD
      Wood sound type
      Mappings:
      Namespace Name Mixin selector
      official f Lafh;f:Lafh$b;
      intermediary field_596 Lnet/minecraft/class_160;field_596:Lnet/minecraft/class_160$class_162;
      named WOOD Lnet/minecraft/block/Block;WOOD:Lnet/minecraft/block/Block$Sound;
    • GRAVEL

      public static final Block.Sound GRAVEL
      Gravel sound type
      Mappings:
      Namespace Name Mixin selector
      official g Lafh;g:Lafh$b;
      intermediary field_597 Lnet/minecraft/class_160;field_597:Lnet/minecraft/class_160$class_162;
      named GRAVEL Lnet/minecraft/block/Block;GRAVEL:Lnet/minecraft/block/Block$Sound;
    • GRASS

      public static final Block.Sound GRASS
      Grass sound type
      Mappings:
      Namespace Name Mixin selector
      official h Lafh;h:Lafh$b;
      intermediary field_598 Lnet/minecraft/class_160;field_598:Lnet/minecraft/class_160$class_162;
      named GRASS Lnet/minecraft/block/Block;GRASS:Lnet/minecraft/block/Block$Sound;
    • STONE

      public static final Block.Sound STONE
      Stone sound type
      Mappings:
      Namespace Name Mixin selector
      official i Lafh;i:Lafh$b;
      intermediary field_599 Lnet/minecraft/class_160;field_599:Lnet/minecraft/class_160$class_162;
      named STONE Lnet/minecraft/block/Block;STONE:Lnet/minecraft/block/Block$Sound;
    • RAIL

      public static final Block.Sound RAIL
      Rail sound type
      Mappings:
      Namespace Name Mixin selector
      official j Lafh;j:Lafh$b;
      intermediary field_600 Lnet/minecraft/class_160;field_600:Lnet/minecraft/class_160$class_162;
      named RAIL Lnet/minecraft/block/Block;RAIL:Lnet/minecraft/block/Block$Sound;
    • GLASS

      public static final Block.Sound GLASS
      Glass sound type
      Mappings:
      Namespace Name Mixin selector
      official k Lafh;k:Lafh$b;
      intermediary field_601 Lnet/minecraft/class_160;field_601:Lnet/minecraft/class_160$class_162;
      named GLASS Lnet/minecraft/block/Block;GLASS:Lnet/minecraft/block/Block$Sound;
    • CLOTH

      public static final Block.Sound CLOTH
      Cloth sound type
      Mappings:
      Namespace Name Mixin selector
      official l Lafh;l:Lafh$b;
      intermediary field_602 Lnet/minecraft/class_160;field_602:Lnet/minecraft/class_160$class_162;
      named CLOTH Lnet/minecraft/block/Block;CLOTH:Lnet/minecraft/block/Block$Sound;
    • SAND

      public static final Block.Sound SAND
      Sand sound type
      Mappings:
      Namespace Name Mixin selector
      official m Lafh;m:Lafh$b;
      intermediary field_603 Lnet/minecraft/class_160;field_603:Lnet/minecraft/class_160$class_162;
      named SAND Lnet/minecraft/block/Block;SAND:Lnet/minecraft/block/Block$Sound;
    • SNOW

      public static final Block.Sound SNOW
      Snow sound type
      Mappings:
      Namespace Name Mixin selector
      official n Lafh;n:Lafh$b;
      intermediary field_604 Lnet/minecraft/class_160;field_604:Lnet/minecraft/class_160$class_162;
      named SNOW Lnet/minecraft/block/Block;SNOW:Lnet/minecraft/block/Block$Sound;
    • LADDER

      public static final Block.Sound LADDER
      Ladder sound type
      Mappings:
      Namespace Name Mixin selector
      official o Lafh;o:Lafh$b;
      intermediary field_605 Lnet/minecraft/class_160;field_605:Lnet/minecraft/class_160$class_162;
      named LADDER Lnet/minecraft/block/Block;LADDER:Lnet/minecraft/block/Block$Sound;
    • ANVIL

      public static final Block.Sound ANVIL
      Anvil sound type
      Mappings:
      Namespace Name Mixin selector
      official p Lafh;p:Lafh$b;
      intermediary field_606 Lnet/minecraft/class_160;field_606:Lnet/minecraft/class_160$class_162;
      named ANVIL Lnet/minecraft/block/Block;ANVIL:Lnet/minecraft/block/Block$Sound;
    • SLIME

      public static final Block.Sound SLIME
      Slime sound type
      Mappings:
      Namespace Name Mixin selector
      official q Lafh;q:Lafh$b;
      intermediary field_607 Lnet/minecraft/class_160;field_607:Lnet/minecraft/class_160$class_162;
      named SLIME Lnet/minecraft/block/Block;SLIME:Lnet/minecraft/block/Block$Sound;
    • itemGroup

      private ItemGroup itemGroup
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b:Lyz;
      intermediary field_592 Lnet/minecraft/class_160;field_592:Lnet/minecraft/class_2029;
      named itemGroup Lnet/minecraft/block/Block;itemGroup:Lnet/minecraft/item/ItemGroup;
    • fullBlock

      protected boolean fullBlock
      Specifies whether the current block is a full block
      Mappings:
      Namespace Name Mixin selector
      official r Lafh;r:Z
      intermediary field_608 Lnet/minecraft/class_160;field_608:Z
      named fullBlock Lnet/minecraft/block/Block;fullBlock:Z
    • opacity

      protected int opacity
      Stores the light opacity of the block
      Mappings:
      Namespace Name Mixin selector
      official s Lafh;s:I
      intermediary field_609 Lnet/minecraft/class_160;field_609:I
      named opacity Lnet/minecraft/block/Block;opacity:I
    • transluscent

      protected boolean transluscent
      Specifies whether the current block is transluscent
      Mappings:
      Namespace Name Mixin selector
      official t Lafh;t:Z
      intermediary field_610 Lnet/minecraft/class_160;field_610:Z
      named transluscent Lnet/minecraft/block/Block;transluscent:Z
    • lightLevel

      protected int lightLevel
      Stores the block's luminescence
      Mappings:
      Namespace Name Mixin selector
      official u Lafh;u:I
      intermediary field_611 Lnet/minecraft/class_160;field_611:I
      named lightLevel Lnet/minecraft/block/Block;lightLevel:I
    • useNeighbourLight

      protected boolean useNeighbourLight
      Mappings:
      Namespace Name Mixin selector
      official v Lafh;v:Z
      intermediary field_612 Lnet/minecraft/class_160;field_612:Z
      named useNeighbourLight Lnet/minecraft/block/Block;useNeighbourLight:Z
    • strength

      protected float strength
      Stores the current block's hardness
      Mappings:
      Namespace Name Mixin selector
      official w Lafh;w:F
      intermediary field_613 Lnet/minecraft/class_160;field_613:F
      named strength Lnet/minecraft/block/Block;strength:F
    • resistance

      protected float resistance
      Stores the current block's resistance
      Mappings:
      Namespace Name Mixin selector
      official x Lafh;x:F
      intermediary field_614 Lnet/minecraft/class_160;field_614:F
      named resistance Lnet/minecraft/block/Block;resistance:F
    • stats

      protected boolean stats
      Specifies whether the current block is tracked for stats
      Mappings:
      Namespace Name Mixin selector
      official y Lafh;y:Z
      intermediary field_615 Lnet/minecraft/class_160;field_615:Z
      named stats Lnet/minecraft/block/Block;stats:Z
    • randomTicks

      protected boolean randomTicks
      Specifies whether the current block ticks randomly
      Mappings:
      Namespace Name Mixin selector
      official z Lafh;z:Z
      intermediary field_616 Lnet/minecraft/class_160;field_616:Z
      named randomTicks Lnet/minecraft/block/Block;randomTicks:Z
    • blockEntity

      protected boolean blockEntity
      Specifies whether the current block has a block entity
      Mappings:
      Namespace Name Mixin selector
      official A Lafh;A:Z
      intermediary field_576 Lnet/minecraft/class_160;field_576:Z
      named blockEntity Lnet/minecraft/block/Block;blockEntity:Z
    • boundingBoxMinX

      protected double boundingBoxMinX
      Stores the Minimum value on the X axis for the voxel shape
      Mappings:
      Namespace Name Mixin selector
      official B Lafh;B:D
      intermediary field_577 Lnet/minecraft/class_160;field_577:D
      named boundingBoxMinX Lnet/minecraft/block/Block;boundingBoxMinX:D
    • boundingBoxMinY

      protected double boundingBoxMinY
      Stores the Minimum value on the Y axis for the voxel shape
      Mappings:
      Namespace Name Mixin selector
      official C Lafh;C:D
      intermediary field_578 Lnet/minecraft/class_160;field_578:D
      named boundingBoxMinY Lnet/minecraft/block/Block;boundingBoxMinY:D
    • boundingBoxMinZ

      protected double boundingBoxMinZ
      Stores the Minimum value on the Z axis for the voxel shape
      Mappings:
      Namespace Name Mixin selector
      official D Lafh;D:D
      intermediary field_579 Lnet/minecraft/class_160;field_579:D
      named boundingBoxMinZ Lnet/minecraft/block/Block;boundingBoxMinZ:D
    • boundingBoxMaxX

      protected double boundingBoxMaxX
      Stores the Maximum value on the X axis for the voxel shape
      Mappings:
      Namespace Name Mixin selector
      official E Lafh;E:D
      intermediary field_580 Lnet/minecraft/class_160;field_580:D
      named boundingBoxMaxX Lnet/minecraft/block/Block;boundingBoxMaxX:D
    • boundingBoxMaxY

      protected double boundingBoxMaxY
      Stores the Maximum value on the Y axis for the voxel shape
      Mappings:
      Namespace Name Mixin selector
      official F Lafh;F:D
      intermediary field_581 Lnet/minecraft/class_160;field_581:D
      named boundingBoxMaxY Lnet/minecraft/block/Block;boundingBoxMaxY:D
    • boundingBoxMaxZ

      protected double boundingBoxMaxZ
      Stores the Maximum value on the Z axis for the voxel shape
      Mappings:
      Namespace Name Mixin selector
      official G Lafh;G:D
      intermediary field_582 Lnet/minecraft/class_160;field_582:D
      named boundingBoxMaxZ Lnet/minecraft/block/Block;boundingBoxMaxZ:D
    • sound

      public Block.Sound sound
      Stores the current block's sound type
      Mappings:
      Namespace Name Mixin selector
      official H Lafh;H:Lafh$b;
      intermediary field_583 Lnet/minecraft/class_160;field_583:Lnet/minecraft/class_160$class_162;
      named sound Lnet/minecraft/block/Block;sound:Lnet/minecraft/block/Block$Sound;
    • particleGravity

      public float particleGravity
      Stores the current block's particles' gravity
      Mappings:
      Namespace Name Mixin selector
      official I Lafh;I:F
      intermediary field_584 Lnet/minecraft/class_160;field_584:F
      named particleGravity Lnet/minecraft/block/Block;particleGravity:F
    • material

      protected final Material material
      Stores the current block's material
      See Also:
      Material
      Mappings:
      Namespace Name Mixin selector
      official J Lafh;J:Larm;
      intermediary field_585 Lnet/minecraft/class_160;field_585:Lnet/minecraft/class_591;
      named material Lnet/minecraft/block/Block;material:Lnet/minecraft/block/Material;
    • materialColor

      protected final MaterialColor materialColor
      Stores the current block's material color
      See Also:
      MaterialColor
      Mappings:
      Namespace Name Mixin selector
      official K Lafh;K:Larn;
      intermediary field_586 Lnet/minecraft/class_160;field_586:Lnet/minecraft/class_592;
      named materialColor Lnet/minecraft/block/Block;materialColor:Lnet/minecraft/block/MaterialColor;
    • slipperiness

      public float slipperiness
      Stores the current block's slipperiness Used By Ice and Packed Ice
      Mappings:
      Namespace Name Mixin selector
      official L Lafh;L:F
      intermediary field_587 Lnet/minecraft/class_160;field_587:F
      named slipperiness Lnet/minecraft/block/Block;slipperiness:F
    • stateManager

      protected final StateManager stateManager
      Stores the block's state manager
      Mappings:
      Namespace Name Mixin selector
      official M Lafh;M:Lama;
      intermediary field_588 Lnet/minecraft/class_160;field_588:Lnet/minecraft/class_378;
      named stateManager Lnet/minecraft/block/Block;stateManager:Lnet/minecraft/state/StateManager;
    • defaultState

      private BlockState defaultState
      Stores the block's default state
      Mappings:
      Namespace Name Mixin selector
      official N Lafh;N:Lalz;
      intermediary field_589 Lnet/minecraft/class_160;field_589:Lnet/minecraft/class_376;
      named defaultState Lnet/minecraft/block/Block;defaultState:Lnet/minecraft/block/BlockState;
    • translationKey

      private String translationKey
      Stores the block's translation key
      Mappings:
      Namespace Name Mixin selector
      official O Lafh;O:Ljava/lang/String;
      intermediary field_590 Lnet/minecraft/class_160;field_590:Ljava/lang/String;
      named translationKey Lnet/minecraft/block/Block;translationKey:Ljava/lang/String;
  • Constructor Details

    • Block

      public Block​(Material material, MaterialColor color)
      Block constructor which initializes all fields to their default values and assigns the material and material color to the specified parameters
      Parameters:
      material - The block's material
      color - The block's material color
      Mappings:
      Namespace Name Mixin selector
      official <init> Lafh;<init>(Larm;Larn;)V
      intermediary <init> Lnet/minecraft/class_160;<init>(Lnet/minecraft/class_591;Lnet/minecraft/class_592;)V
      named <init> Lnet/minecraft/block/Block;<init>(Lnet/minecraft/block/Material;Lnet/minecraft/block/MaterialColor;)V
    • Block

      protected Block​(Material material)
      Overloaded Block constructor that calls the other with the default material color
      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

    • getIdByBlock

      public static int getIdByBlock​(Block block)
      Returns a certain block's id
      Parameters:
      block - The block for which the id is returned
      Returns:
      Block id
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lafh;)I
      intermediary method_670 Lnet/minecraft/class_160;method_670(Lnet/minecraft/class_160;)I
      named getIdByBlock Lnet/minecraft/block/Block;getIdByBlock(Lnet/minecraft/block/Block;)I
    • getByBlockState

      public static int getByBlockState​(BlockState state)
      Returns a certain Block's id from a blockstate
      Parameters:
      state - The BlockState for which the id is returned
      Returns:
      Block id
      Mappings:
      Namespace Name Mixin selector
      official f Lafh;f(Lalz;)I
      intermediary method_717 Lnet/minecraft/class_160;method_717(Lnet/minecraft/class_376;)I
      named getByBlockState Lnet/minecraft/block/Block;getByBlockState(Lnet/minecraft/block/BlockState;)I
    • getById

      public static Block getById​(int id)
      Returns a certain block from its id
      Parameters:
      id - The id for which the Block is returned
      Returns:
      The Block
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c(I)Lafh;
      intermediary method_701 Lnet/minecraft/class_160;method_701(I)Lnet/minecraft/class_160;
      named getById Lnet/minecraft/block/Block;getById(I)Lnet/minecraft/block/Block;
    • getStateFromRawId

      public static BlockState getStateFromRawId​(int id)
      Returns a BlockState from it's id
      Parameters:
      id - The BlockState's id
      Returns:
      The Blockstate
      Mappings:
      Namespace Name Mixin selector
      official d Lafh;d(I)Lalz;
      intermediary method_710 Lnet/minecraft/class_160;method_710(I)Lnet/minecraft/class_376;
      named getStateFromRawId Lnet/minecraft/block/Block;getStateFromRawId(I)Lnet/minecraft/block/BlockState;
    • getBlockFromItem

      public static Block getBlockFromItem​(Item item)
      Returns a block by converting a blockitem to a block
      Parameters:
      item - The item that must be converted to a block
      Returns:
      The block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lzw;)Lafh;
      intermediary method_681 Lnet/minecraft/class_160;method_681(Lnet/minecraft/class_2054;)Lnet/minecraft/class_160;
      named getBlockFromItem Lnet/minecraft/block/Block;getBlockFromItem(Lnet/minecraft/item/Item;)Lnet/minecraft/block/Block;
    • get

      public static Block get​(String id)
      Returns a block from it's name
      Parameters:
      id - The block's name
      Returns:
      The block
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Ljava/lang/String;)Lafh;
      intermediary method_698 Lnet/minecraft/class_160;method_698(Ljava/lang/String;)Lnet/minecraft/class_160;
      named get Lnet/minecraft/block/Block;get(Ljava/lang/String;)Lnet/minecraft/block/Block;
    • isFullBlock

      public boolean isFullBlock()
      Checks whether the current block is a full block
      Returns:
      fullBlock
      Mappings:
      Namespace Name Mixin selector
      official o Lafh;o()Z
      intermediary method_732 Lnet/minecraft/class_160;method_732()Z
      named isFullBlock Lnet/minecraft/block/Block;isFullBlock()Z
    • getOpacity

      public int getOpacity()
      Returns the current block's opacity
      Returns:
      opacity
      Mappings:
      Namespace Name Mixin selector
      official p Lafh;p()I
      intermediary method_733 Lnet/minecraft/class_160;method_733()I
      named getOpacity Lnet/minecraft/block/Block;getOpacity()I
    • isTransluscent

      @Environment(CLIENT) public boolean isTransluscent()
      Checks whether the current block is transluscent
      Returns:
      transluscent
      Mappings:
      Namespace Name Mixin selector
      official q Lafh;q()Z
      intermediary method_734 Lnet/minecraft/class_160;method_734()Z
      named isTransluscent Lnet/minecraft/block/Block;isTransluscent()Z
    • getLightLevel

      public int getLightLevel()
      Returns the block's luminescence
      Returns:
      lightLevel
      Mappings:
      Namespace Name Mixin selector
      official r Lafh;r()I
      intermediary method_735 Lnet/minecraft/class_160;method_735()I
      named getLightLevel Lnet/minecraft/block/Block;getLightLevel()I
    • usesNeighbourLight

      public boolean usesNeighbourLight()
      Checks whether the current block uses light from the adjacent block
      Returns:
      useNeighbourLight
      Mappings:
      Namespace Name Mixin selector
      official s Lafh;s()Z
      intermediary method_736 Lnet/minecraft/class_160;method_736()Z
      named usesNeighbourLight Lnet/minecraft/block/Block;usesNeighbourLight()Z
    • getMaterial

      public Material getMaterial()
      Returns the block's material
      Returns:
      material
      Mappings:
      Namespace Name Mixin selector
      official t Lafh;t()Larm;
      intermediary method_737 Lnet/minecraft/class_160;method_737()Lnet/minecraft/class_591;
      named getMaterial Lnet/minecraft/block/Block;getMaterial()Lnet/minecraft/block/Material;
    • getMaterialColor

      public MaterialColor getMaterialColor​(BlockState state)
      Returns the block's material color from it's state Blockstates can have different material colors
      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;
    • stateFromData

      public BlockState stateFromData​(int data)
      Returns a blockstate of the current block from it's id
      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
      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
    • getBlockState

      public BlockState getBlockState​(BlockState state, WorldView view, BlockPos pos)
      Returns the current block's blockstate at a certain position
      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;
    • setSound

      protected Block setSound​(Block.Sound sound)
      Sets the block's sound type. Used in registering blocks.
      Parameters:
      sound - The block's sound type
      Returns:
      The current block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lafh$b;)Lafh;
      intermediary method_669 Lnet/minecraft/class_160;method_669(Lnet/minecraft/class_160$class_162;)Lnet/minecraft/class_160;
      named setSound Lnet/minecraft/block/Block;setSound(Lnet/minecraft/block/Block$Sound;)Lnet/minecraft/block/Block;
    • setOpacity

      protected Block setOpacity​(int opacity)
      Sets the block's light opacity. Used in registering blocks.
      Parameters:
      opacity - The block's light opacity
      Returns:
      The current block
      Mappings:
      Namespace Name Mixin selector
      official e Lafh;e(I)Lafh;
      intermediary method_715 Lnet/minecraft/class_160;method_715(I)Lnet/minecraft/class_160;
      named setOpacity Lnet/minecraft/block/Block;setOpacity(I)Lnet/minecraft/block/Block;
    • setLightLevel

      protected Block setLightLevel​(float lightLevel)
      Sets the block's luminescence. Used in registering blocks.
      Parameters:
      lightLevel - The block's luminescence
      Returns:
      The current block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(F)Lafh;
      intermediary method_635 Lnet/minecraft/class_160;method_635(F)Lnet/minecraft/class_160;
      named setLightLevel Lnet/minecraft/block/Block;setLightLevel(F)Lnet/minecraft/block/Block;
    • setResistance

      protected Block setResistance​(float resistance)
      Sets the block's resistance. Used in registering blocks.
      Parameters:
      resistance - The block's resistance
      Returns:
      The current block
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(F)Lafh;
      intermediary method_685 Lnet/minecraft/class_160;method_685(F)Lnet/minecraft/class_160;
      named setResistance Lnet/minecraft/block/Block;setResistance(F)Lnet/minecraft/block/Block;
    • isNormalBlock

      public boolean isNormalBlock()
      Checks whether the block is a normal block. A normal block is one that blocks movement and can be rendered as a normal block.
      Returns:
      Whether the block is a normal block
      Mappings:
      Namespace Name Mixin selector
      official u Lafh;u()Z
      intermediary method_738 Lnet/minecraft/class_160;method_738()Z
      named isNormalBlock Lnet/minecraft/block/Block;isNormalBlock()Z
    • isFullCube

      public boolean isFullCube()
      Checks whether the current block is a full cube. A block is a full cube when it can be rendered as a normal block, does not emit redstone power and is opaque.
      Returns:
      Whether the current block is a full cube
      Mappings:
      Namespace Name Mixin selector
      official v Lafh;v()Z
      intermediary method_739 Lnet/minecraft/class_160;method_739()Z
      named isFullCube Lnet/minecraft/block/Block;isFullCube()Z
    • isLeafBlock

      public boolean isLeafBlock()
      Checks whether the current block is a normal block (used only by LeavesBlock)
      Returns:
      Whether the current block is a normal block
      Mappings:
      Namespace Name Mixin selector
      official w Lafh;w()Z
      intermediary method_740 Lnet/minecraft/class_160;method_740()Z
      named isLeafBlock Lnet/minecraft/block/Block;isLeafBlock()Z
    • renderAsNormalBlock

      public boolean renderAsNormalBlock()
      Returns whether the block can be rendered as a normal 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
    • blocksMovement

      public boolean blocksMovement​(WorldView view, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Ladq;Lcj;)Z
      intermediary method_692 Lnet/minecraft/class_160;method_692(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Z
      named blocksMovement Lnet/minecraft/block/Block;blocksMovement(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z
    • getBlockType

      public int getBlockType()
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b()I
      intermediary method_684 Lnet/minecraft/class_160;method_684()I
      named getBlockType Lnet/minecraft/block/Block;getBlockType()I
    • isReplaceable

      public boolean isReplaceable​(World world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;)Z
      intermediary method_643 Lnet/minecraft/class_160;method_643(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Z
      named isReplaceable Lnet/minecraft/block/Block;isReplaceable(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
    • setStrength

      protected Block setStrength​(float strength)
      Sets the current block's strength. Used in registering blocks.
      Parameters:
      strength - The block's strength
      Returns:
      The current block
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c(F)Lafh;
      intermediary method_700 Lnet/minecraft/class_160;method_700(F)Lnet/minecraft/class_160;
      named setStrength Lnet/minecraft/block/Block;setStrength(F)Lnet/minecraft/block/Block;
    • setUnbreakable

      protected Block setUnbreakable()
      Sets the current block as unbreakable. Used in registering blocks. Setting the strength as -1 makes the block unbreakable. Used by barriers and command blocks.
      Returns:
      The current block
      Mappings:
      Namespace Name Mixin selector
      official x Lafh;x()Lafh;
      intermediary method_741 Lnet/minecraft/class_160;method_741()Lnet/minecraft/class_160;
      named setUnbreakable Lnet/minecraft/block/Block;setUnbreakable()Lnet/minecraft/block/Block;
    • getStrength

      public float getStrength​(World world, BlockPos pos)
      Returns the current block's strength
      Parameters:
      world - The world where the block is placed
      pos - The block's position
      Returns:
      The block's strength
      Mappings:
      Namespace Name Mixin selector
      official g Lafh;g(Ladm;Lcj;)F
      intermediary method_719 Lnet/minecraft/class_160;method_719(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)F
      named getStrength Lnet/minecraft/block/Block;getStrength(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)F
    • setTickRandomly

      protected Block setTickRandomly​(boolean tickRandomly)
      Sets whether the current block has random ticks. Used in registering blocks.
      Parameters:
      tickRandomly - Whether the current block should have random ticks
      Returns:
      The current block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Z)Lafh;
      intermediary method_683 Lnet/minecraft/class_160;method_683(Z)Lnet/minecraft/class_160;
      named setTickRandomly Lnet/minecraft/block/Block;setTickRandomly(Z)Lnet/minecraft/block/Block;
    • ticksRandomly

      public boolean ticksRandomly()
      Returns whether the current block has random ticks
      Returns:
      Whether the current block has random ticks
      Mappings:
      Namespace Name Mixin selector
      official y Lafh;y()Z
      intermediary method_742 Lnet/minecraft/class_160;method_742()Z
      named ticksRandomly Lnet/minecraft/block/Block;ticksRandomly()Z
    • hasBlockEntity

      public boolean hasBlockEntity()
      Returns whether the current block has a block entity
      Returns:
      Whether the current block has a block entity
      Mappings:
      Namespace Name Mixin selector
      official z Lafh;z()Z
      intermediary method_743 Lnet/minecraft/class_160;method_743()Z
      named hasBlockEntity Lnet/minecraft/block/Block;hasBlockEntity()Z
    • setBoundingBox

      protected final void setBoundingBox​(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
      Sets the block's bounding box. It accepts six parameters: The minimum and maximum for each of the three axes.
      Parameters:
      minX - Minimum X value
      minY - Minimum Y value
      minZ - Minimum Z value
      maxX - Maximum X value
      maxY - Maximum Y value
      maxZ - Maximum Z value
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(FFFFFF)V
      intermediary method_636 Lnet/minecraft/class_160;method_636(FFFFFF)V
      named setBoundingBox Lnet/minecraft/block/Block;setBoundingBox(FFFFFF)V
    • getBrightness

      @Environment(CLIENT) public int getBrightness​(WorldView worldView, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c(Ladq;Lcj;)I
      intermediary method_705 Lnet/minecraft/class_160;method_705(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)I
      named getBrightness Lnet/minecraft/block/Block;getBrightness(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)I
    • isSideInvisible

      @Environment(CLIENT) public boolean isSideInvisible​(WorldView view, BlockPos pos, Direction facing)
      Returns whether the current block has connected sides, i.e its side faces are invisible when covered by other blocks. Used by glass to prevent the white dots from appearing everywhere through adjacent glass blocks.
      Parameters:
      view - WorldView instance
      pos - The current block's position
      facing - The direction the block is facing
      Returns:
      Whether the current block has connected sides
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladq;Lcj;Lcq;)Z
      intermediary method_668 Lnet/minecraft/class_160;method_668(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;)Z
      named isSideInvisible Lnet/minecraft/block/Block;isSideInvisible(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Z
    • hasCollision

      public boolean hasCollision​(WorldView worldView, BlockPos pos, Direction direction)
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Ladq;Lcj;Lcq;)Z
      intermediary method_694 Lnet/minecraft/class_160;method_694(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;)Z
      named hasCollision Lnet/minecraft/block/Block;hasCollision(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Z
    • getSelectionBox

      @Environment(CLIENT) public Box getSelectionBox​(World world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Ladm;Lcj;)Laug;
      intermediary method_686 Lnet/minecraft/class_160;method_686(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Lnet/minecraft/class_646;
      named getSelectionBox Lnet/minecraft/block/Block;getSelectionBox(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Box;
    • appendCollisionBoxes

      public void appendCollisionBoxes​(World world, BlockPos pos, BlockState state, Box box, List<Box> list, Entity entity)
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;Laug;Ljava/util/List;Lpk;)V
      intermediary method_649 Lnet/minecraft/class_160;method_649(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_646;Ljava/util/List;Lnet/minecraft/class_1745;)V
      named appendCollisionBoxes Lnet/minecraft/block/Block;appendCollisionBoxes(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Box;Ljava/util/List;Lnet/minecraft/entity/Entity;)V
    • getCollisionBox

      public Box getCollisionBox​(World world, BlockPos pos, BlockState state)
      Returns a box by adding the block's current location and the block's corresponding value in its Bounding Box
      Parameters:
      world - The world that the block has been placed
      pos - The block's position
      state - The block's BlockState
      Returns:
      The Collision box
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;)Laug;
      intermediary method_645 Lnet/minecraft/class_160;method_645(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Lnet/minecraft/class_646;
      named getCollisionBox Lnet/minecraft/block/Block;getCollisionBox(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/util/math/Box;
    • hasTransperancy

      public boolean hasTransperancy()
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c()Z
      intermediary method_699 Lnet/minecraft/class_160;method_699()Z
      named hasTransperancy Lnet/minecraft/block/Block;hasTransperancy()Z
    • canCollide

      public boolean canCollide​(BlockState state, boolean bl)
      Returns whether entities can collide with the block
      Parameters:
      state - The block's BlockState
      Returns:
      Whether the block has collision
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lalz;Z)Z
      intermediary method_675 Lnet/minecraft/class_160;method_675(Lnet/minecraft/class_376;Z)Z
      named canCollide Lnet/minecraft/block/Block;canCollide(Lnet/minecraft/block/BlockState;Z)Z
    • hasCollision

      public boolean hasCollision()
      Returns whether a block has collision, i.e. stops entities
      Returns:
      Whether a block has collision
      Mappings:
      Namespace Name Mixin selector
      official A Lafh;A()Z
      intermediary method_615 Lnet/minecraft/class_160;method_615()Z
      named hasCollision Lnet/minecraft/block/Block;hasCollision()Z
    • onUpdateTick

      public void onUpdateTick​(World world, BlockPos pos, BlockState state, Random rand)
      Runs when the block is updated
      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 a Lafh;a(Ladm;Lcj;Lalz;Ljava/util/Random;)V
      intermediary method_650 Lnet/minecraft/class_160;method_650(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Ljava/util/Random;)V
      named onUpdateTick Lnet/minecraft/block/Block;onUpdateTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/Random;)V
    • scheduledTick

      public void scheduledTick​(World world, BlockPos pos, BlockState state, Random rand)
      Runs when the block is updated as per a schedule
      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
    • randomDisplayTick

      @Environment(CLIENT) public void randomDisplayTick​(World world, BlockPos pos, BlockState state, Random rand)
      Runs every random display Tick. Useful for displaying particles around a block, like Redstone Ore.
      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 c Lafh;c(Ladm;Lcj;Lalz;Ljava/util/Random;)V
      intermediary method_704 Lnet/minecraft/class_160;method_704(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Ljava/util/Random;)V
      named randomDisplayTick Lnet/minecraft/block/Block;randomDisplayTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/Random;)V
    • onBreakByPlayer

      public void onBreakByPlayer​(World world, BlockPos pos, BlockState state)
      Runs when the block is broken by the player
      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 d Lafh;d(Ladm;Lcj;Lalz;)V
      intermediary method_712 Lnet/minecraft/class_160;method_712(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)V
      named onBreakByPlayer Lnet/minecraft/block/Block;onBreakByPlayer(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
    • neighborUpdate

      public void neighborUpdate​(World world, BlockPos pos, BlockState state, Block block)
      Runs when its adjacent blocks are updated. It will also run when the block is placed or removed as Air is being updated.
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      block - The adjacent Block that updated the current block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;Lafh;)V
      intermediary method_648 Lnet/minecraft/class_160;method_648(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_160;)V
      named neighborUpdate Lnet/minecraft/block/Block;neighborUpdate(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/Block;)V
    • getTickRate

      public int getTickRate​(World world)
      Returns the block's tick rate. Default is 10.
      Parameters:
      world - The world that the block is placed in
      Returns:
      Tick rate
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;)I
      intermediary method_642 Lnet/minecraft/class_160;method_642(Lnet/minecraft/class_99;)I
      named getTickRate Lnet/minecraft/block/Block;getTickRate(Lnet/minecraft/world/World;)I
    • onCreation

      public void onCreation​(World world, BlockPos pos, BlockState state)
      Runs when the block is placed (by a player or enderman).
      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).
      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
    • getDropCount

      public int getDropCount​(Random rand)
      Returns the amount of items the block should drop on breaking without bonus rolls.
      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
    • getDropItem

      public Item getDropItem​(BlockState blockState, Random random, int state)
      Returns the item that must be dropped when the block is broken
      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;
    • calcBlockBreakingData

      public float calcBlockBreakingData​(PlayerEntity player, World world, BlockPos pos)
      Calculates how fast or slow the block must be broken by a Player. Status effects such as Haste and Mining fatigue are taken into consideration.
      Parameters:
      player - The player breaking the block
      world - The world that the block is placed in
      pos - The block's position
      Returns:
      Speed of breaking
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lwn;Ladm;Lcj;)F
      intermediary method_679 Lnet/minecraft/class_160;method_679(Lnet/minecraft/class_1963;Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)F
      named calcBlockBreakingData Lnet/minecraft/block/Block;calcBlockBreakingData(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)F
    • dropAsItem

      public final void dropAsItem​(World world, BlockPos pos, BlockState state, int id)
      Runs when the block must be dropped as an item. Called when the block is broken or an enderman holding the block dies.
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      id - Id
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Ladm;Lcj;Lalz;I)V
      intermediary method_689 Lnet/minecraft/class_160;method_689(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;I)V
      named dropAsItem Lnet/minecraft/block/Block;dropAsItem(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;I)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.
      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
    • onBlockBreak

      public static void onBlockBreak​(World world, BlockPos pos, ItemStack item)
      Runs when a block is broken
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      item - Allows creating an ItemEntity
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lzx;)V
      intermediary method_662 Lnet/minecraft/class_160;method_662(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_2056;)V
      named onBlockBreak Lnet/minecraft/block/Block;onBlockBreak(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/item/ItemStack;)V
    • dropExperience

      protected void dropExperience​(World world, BlockPos pos, int size)
      Runs when the block is broken to drop experience. Since entities are being spawned, most of it only happens on a ServerWorld.
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      size - Size
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Ladm;Lcj;I)V
      intermediary method_687 Lnet/minecraft/class_160;method_687(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;I)V
      named dropExperience Lnet/minecraft/block/Block;dropExperience(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;I)V
    • getMeta

      public int getMeta​(BlockState state)
      Returns the metadata value for a certain BlockState
      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
    • getBlastResistance

      public float getBlastResistance​(Entity entity)
      Returns the block's blast resistance as per the entity provided.
      Parameters:
      entity - The entity that blast resistance must be calculated for
      Returns:
      Blast Resistance
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lpk;)F
      intermediary method_678 Lnet/minecraft/class_160;method_678(Lnet/minecraft/class_1745;)F
      named getBlastResistance Lnet/minecraft/block/Block;getBlastResistance(Lnet/minecraft/entity/Entity;)F
    • method_655

      public HitResult method_655​(World world, BlockPos pos, Vec3d vec1, Vec3d vec2)
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Laui;Laui;)Lauh;
      intermediary method_655 Lnet/minecraft/class_160;method_655(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_649;Lnet/minecraft/class_649;)Lnet/minecraft/class_647;
      named method_655 Lnet/minecraft/block/Block;method_655(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/hit/HitResult;
    • method_676

      private boolean method_676​(Vec3d vec)
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Laui;)Z
      intermediary method_676 Lnet/minecraft/class_160;method_676(Lnet/minecraft/class_649;)Z
      named method_676 Lnet/minecraft/block/Block;method_676(Lnet/minecraft/util/math/Vec3d;)Z
    • method_697

      private boolean method_697​(Vec3d vec)
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Laui;)Z
      intermediary method_697 Lnet/minecraft/class_160;method_697(Lnet/minecraft/class_649;)Z
      named method_697 Lnet/minecraft/block/Block;method_697(Lnet/minecraft/util/math/Vec3d;)Z
    • method_707

      private boolean method_707​(Vec3d vec)
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c(Laui;)Z
      intermediary method_707 Lnet/minecraft/class_160;method_707(Lnet/minecraft/class_649;)Z
      named method_707 Lnet/minecraft/block/Block;method_707(Lnet/minecraft/util/math/Vec3d;)Z
    • onDestroyedByExplosion

      public void onDestroyedByExplosion​(World world, BlockPos pos, Explosion explosion)
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Ladi;)V
      intermediary method_644 Lnet/minecraft/class_160;method_644(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_93;)V
      named onDestroyedByExplosion Lnet/minecraft/block/Block;onDestroyedByExplosion(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/explosion/Explosion;)V
    • getRenderLayerType

      @Environment(CLIENT) public RenderLayer getRenderLayerType()
      Returns the appropriate RenderLayer for a block. Only called on the client.
      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;
    • canBeReplaced

      public boolean canBeReplaced​(World world, BlockPos pos, Direction dir, ItemStack stack)
      Returns whether the current block can be replaced. Useful for grass like blocks.
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      dir - The block's direction
      stack - ItemStack
      Returns:
      Whether the current block can be replaced
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lcq;Lzx;)Z
      intermediary method_657 Lnet/minecraft/class_160;method_657(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;Lnet/minecraft/class_2056;)Z
      named canBeReplaced Lnet/minecraft/block/Block;canBeReplaced(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;Lnet/minecraft/item/ItemStack;)Z
    • canBePlacedAdjacent

      public boolean canBePlacedAdjacent​(World world, BlockPos pos, Direction direction)
      Returns whether blocks can be placed adjacent to it.
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      direction - The block's direction
      Returns:
      Whether blocks can be placed adjacent to it
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Ladm;Lcj;Lcq;)Z
      intermediary method_691 Lnet/minecraft/class_160;method_691(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;)Z
      named canBePlacedAdjacent Lnet/minecraft/block/Block;canBePlacedAdjacent(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Z
    • canBePlacedAtPos

      public boolean canBePlacedAtPos​(World world, BlockPos pos)
      Returns whether the current block can be placed at a certain BlockPos
      Returns:
      Whether the current block can be placed at a BlockPos
      Mappings:
      Namespace Name Mixin selector
      official d Lafh;d(Ladm;Lcj;)Z
      intermediary method_711 Lnet/minecraft/class_160;method_711(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Z
      named canBePlacedAtPos Lnet/minecraft/block/Block;canBePlacedAtPos(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
    • onUse

      public boolean onUse​(World world, BlockPos pos, BlockState state, PlayerEntity player, Direction direction, float float2, float float3, float float4)
      Runs when the block is used, i.e. right clicked in most cases. It is similar to the same method in Item, but this method is called only when the player uses it when the block is placed, not when the player is holding the BlockItem.
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      player - The player who used the block
      direction - The direction that the block is facing
      Returns:
      Whether the action is succesful
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;Lwn;Lcq;FFF)Z
      intermediary method_654 Lnet/minecraft/class_160;method_654(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1963;Lnet/minecraft/class_1383;FFF)Z
      named onUse Lnet/minecraft/block/Block;onUse(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/Direction;FFF)Z
    • onSteppedOn

      public void onSteppedOn​(World world, BlockPos pos, Entity entity)
      Runs every time an entity steps on the Block. Used by redstone ore to change it's state.
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      entity - The entity who stepped on the block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lpk;)V
      intermediary method_658 Lnet/minecraft/class_160;method_658(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1745;)V
      named onSteppedOn Lnet/minecraft/block/Block;onSteppedOn(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/Entity;)V
    • getStateFromData

      public BlockState getStateFromData​(World world, BlockPos pos, Direction dir, float float2, float float3, float float4, int id, LivingEntity entity)
      Returns a BlockState from an id
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      dir - The block's direction
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lcq;FFFILpr;)Lalz;
      intermediary method_656 Lnet/minecraft/class_160;method_656(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;FFFILnet/minecraft/class_1752;)Lnet/minecraft/class_376;
      named getStateFromData Lnet/minecraft/block/Block;getStateFromData(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;FFFILnet/minecraft/entity/LivingEntity;)Lnet/minecraft/block/BlockState;
    • onBlockBreakStart

      public void onBlockBreakStart​(World world, BlockPos pos, PlayerEntity player)
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lwn;)V
      intermediary method_661 Lnet/minecraft/class_160;method_661(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1963;)V
      named onBlockBreakStart Lnet/minecraft/block/Block;onBlockBreakStart(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;)V
    • onEntityCollision

      public Vec3d onEntityCollision​(World world, BlockPos pos, Entity entity, Vec3d velocity)
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lpk;Laui;)Laui;
      intermediary method_660 Lnet/minecraft/class_160;method_660(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1745;Lnet/minecraft/class_649;)Lnet/minecraft/class_649;
      named onEntityCollision Lnet/minecraft/block/Block;onEntityCollision(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/Vec3d;
    • setBoundingBox

      public void setBoundingBox​(WorldView view, BlockPos pos)
      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
    • getMinX

      public final double getMinX()
      Returns the block's bounding box' minimum X value
      Returns:
      Minimum X value
      Mappings:
      Namespace Name Mixin selector
      official B Lafh;B()D
      intermediary method_616 Lnet/minecraft/class_160;method_616()D
      named getMinX Lnet/minecraft/block/Block;getMinX()D
    • getMaxX

      public final double getMaxX()
      Returns the block's bounding box' minimum Y value
      Returns:
      Minimum Y value
      Mappings:
      Namespace Name Mixin selector
      official C Lafh;C()D
      intermediary method_617 Lnet/minecraft/class_160;method_617()D
      named getMaxX Lnet/minecraft/block/Block;getMaxX()D
    • getMinY

      public final double getMinY()
      Returns the block's bounding box' minimum Z value
      Returns:
      Minimum Z value
      Mappings:
      Namespace Name Mixin selector
      official D Lafh;D()D
      intermediary method_618 Lnet/minecraft/class_160;method_618()D
      named getMinY Lnet/minecraft/block/Block;getMinY()D
    • getMaxY

      public final double getMaxY()
      Returns the block's bounding box' maximum X value
      Returns:
      Maximum X value
      Mappings:
      Namespace Name Mixin selector
      official E Lafh;E()D
      intermediary method_619 Lnet/minecraft/class_160;method_619()D
      named getMaxY Lnet/minecraft/block/Block;getMaxY()D
    • getMinZ

      public final double getMinZ()
      Returns the block's bounding box' maximum Y value
      Returns:
      Maximum Y value
      Mappings:
      Namespace Name Mixin selector
      official F Lafh;F()D
      intermediary method_620 Lnet/minecraft/class_160;method_620()D
      named getMinZ Lnet/minecraft/block/Block;getMinZ()D
    • getMaxZ

      public final double getMaxZ()
      Returns the block's bounding box' maximum Z value
      Returns:
      Maximum Z value
      Mappings:
      Namespace Name Mixin selector
      official G Lafh;G()D
      intermediary method_621 Lnet/minecraft/class_160;method_621()D
      named getMaxZ Lnet/minecraft/block/Block;getMaxZ()D
    • getColor

      @Environment(CLIENT) public int getColor()
      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)
      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
      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
    • getBlendColor

      @Environment(CLIENT) public final int getBlendColor​(WorldView world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official d Lafh;d(Ladq;Lcj;)I
      intermediary method_713 Lnet/minecraft/class_160;method_713(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)I
      named getBlendColor Lnet/minecraft/block/Block;getBlendColor(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)I
    • getWeakRedstonePower

      public int getWeakRedstonePower​(WorldView view, BlockPos pos, BlockState state, Direction facing)
      Returns the block's weak redstone power.
      Parameters:
      view - WorldView instance
      pos - The block's position
      state - The block's BlockState
      facing - The block's direction
      Returns:
      Block's weak redstone power
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladq;Lcj;Lalz;Lcq;)I
      intermediary method_667 Lnet/minecraft/class_160;method_667(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1383;)I
      named getWeakRedstonePower Lnet/minecraft/block/Block;getWeakRedstonePower(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;)I
    • emitsRedstonePower

      public boolean emitsRedstonePower()
      Returns whether the current block emits a redstone signal. Used by comparators, Redstone Blocks, etc.
      Returns:
      Whether the current block emits a redstone signal
      Mappings:
      Namespace Name Mixin selector
      official i Lafh;i()Z
      intermediary method_723 Lnet/minecraft/class_160;method_723()Z
      named emitsRedstonePower Lnet/minecraft/block/Block;emitsRedstonePower()Z
    • onEntityCollision

      public void onEntityCollision​(World world, BlockPos pos, BlockState state, Entity entity)
      Runs every time an entity collides with the block
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      entity - The entity that collided with the block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;Lpk;)V
      intermediary method_651 Lnet/minecraft/class_160;method_651(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1745;)V
      named onEntityCollision Lnet/minecraft/block/Block;onEntityCollision(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/Entity;)V
    • getStrongRedstonePower

      public int getStrongRedstonePower​(WorldView view, BlockPos pos, BlockState state, Direction facing)
      Returns the block's strong redstone power.
      Parameters:
      view - WorldView instance
      pos - The block's position
      state - The block's BlockState
      facing - The block's direction
      Returns:
      The Block's strong redstone power
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Ladq;Lcj;Lalz;Lcq;)I
      intermediary method_693 Lnet/minecraft/class_160;method_693(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1383;)I
      named getStrongRedstonePower Lnet/minecraft/block/Block;getStrongRedstonePower(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;)I
    • setBlockItemBounds

      public void setBlockItemBounds()
      Sets the bounds for the BlockItem
      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
    • harvest

      public void harvest​(World world, PlayerEntity player, BlockPos pos, BlockState state, BlockEntity be)
      Runs every time a player begins to break the block.
      Parameters:
      world - The world that the block is placed in
      player - The player who is mining the block
      pos - The block's position
      state - The block's BlockState
      be - The block entity in the block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lwn;Lcj;Lalz;Lakw;)V
      intermediary method_664 Lnet/minecraft/class_160;method_664(Lnet/minecraft/class_99;Lnet/minecraft/class_1963;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_348;)V
      named harvest Lnet/minecraft/block/Block;harvest(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/BlockEntity;)V
    • requiresSilkTouch

      protected boolean requiresSilkTouch()
      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
    • createStackFromBlock

      protected ItemStack createStackFromBlock​(BlockState state)
      Creates and returns and ItemStack from a block.
      Parameters:
      state - The block's BlockState
      Returns:
      An ItemStack instance containing the block
      Mappings:
      Namespace Name Mixin selector
      official i Lafh;i(Lalz;)Lzx;
      intermediary method_724 Lnet/minecraft/class_160;method_724(Lnet/minecraft/class_376;)Lnet/minecraft/class_2056;
      named createStackFromBlock Lnet/minecraft/block/Block;createStackFromBlock(Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
    • getBonusDrops

      public int getBonusDrops​(int id, Random rand)
      Returns the number bonus drops for a block when broken.
      Parameters:
      id - Id
      rand - Random object
      Returns:
      Bonus drops for a block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(ILjava/util/Random;)I
      intermediary method_639 Lnet/minecraft/class_160;method_639(ILjava/util/Random;)I
      named getBonusDrops Lnet/minecraft/block/Block;getBonusDrops(ILjava/util/Random;)I
    • onPlaced

      public void onPlaced​(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack)
      Runs when the block is placed by an entity
      Parameters:
      world - The world that the block is in
      pos - The block's position
      state - The block's BlockState
      placer - The entity who placed the block
      itemStack - ItemStack instance
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;Lpr;Lzx;)V
      intermediary method_652 Lnet/minecraft/class_160;method_652(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1752;Lnet/minecraft/class_2056;)V
      named onPlaced Lnet/minecraft/block/Block;onPlaced(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;)V
    • canMobSpawnInside

      public boolean canMobSpawnInside()
      Returns whether mobs can spawn inside the block. Used for Air.
      Returns:
      Whether mobs can spawn inside the block
      Mappings:
      Namespace Name Mixin selector
      official g Lafh;g()Z
      intermediary method_718 Lnet/minecraft/class_160;method_718()Z
      named canMobSpawnInside Lnet/minecraft/block/Block;canMobSpawnInside()Z
    • setTranslationKey

      public Block setTranslationKey​(String key)
      Sets the block's localization key. Used in registering blocks.
      Parameters:
      key - The Translation key
      Returns:
      The Current block
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c(Ljava/lang/String;)Lafh;
      intermediary method_708 Lnet/minecraft/class_160;method_708(Ljava/lang/String;)Lnet/minecraft/class_160;
      named setTranslationKey Lnet/minecraft/block/Block;setTranslationKey(Ljava/lang/String;)Lnet/minecraft/block/Block;
    • getTranslatedName

      public String getTranslatedName()
      Translates and returns the translation key
      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;
    • getTranslationKey

      public String getTranslationKey()
      Returns the block's translation key
      Returns:
      Translation Key
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a()Ljava/lang/String;
      intermediary method_634 Lnet/minecraft/class_160;method_634()Ljava/lang/String;
      named getTranslationKey Lnet/minecraft/block/Block;getTranslationKey()Ljava/lang/String;
    • onEvent

      public boolean onEvent​(World world, BlockPos pos, BlockState state, int id, int meta)
      Runs when an event takes place
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      id - Id
      meta - Metadata
      Returns:
      Whether the event is successful
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;II)Z
      intermediary method_647 Lnet/minecraft/class_160;method_647(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;II)Z
      named onEvent Lnet/minecraft/block/Block;onEvent(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;II)Z
    • hasStats

      public boolean hasStats()
      Returns whether the current block should be tracked for stats
      Returns:
      Whether the current block should be tracked for stats
      Mappings:
      Namespace Name Mixin selector
      official J Lafh;J()Z
      intermediary method_624 Lnet/minecraft/class_160;method_624()Z
      named hasStats Lnet/minecraft/block/Block;hasStats()Z
    • disableStats

      protected Block disableStats()
      Disables tracking by stats for the current block. Used in registering blocks.
      Returns:
      The current block
      Mappings:
      Namespace Name Mixin selector
      official K Lafh;K()Lafh;
      intermediary method_625 Lnet/minecraft/class_160;method_625()Lnet/minecraft/class_160;
      named disableStats Lnet/minecraft/block/Block;disableStats()Lnet/minecraft/block/Block;
    • getPistonInteractionType

      public int getPistonInteractionType()
      Returns the block's piston interaction type, as provided by it's material.
      Returns:
      Current block's piston interaction type
      Mappings:
      Namespace Name Mixin selector
      official k Lafh;k()I
      intermediary method_728 Lnet/minecraft/class_160;method_728()I
      named getPistonInteractionType Lnet/minecraft/block/Block;getPistonInteractionType()I
    • getAmbientOcclusionLightLevel

      @Environment(CLIENT) public float getAmbientOcclusionLightLevel()
      Returns the block's ambient occlusion light level on the basis of whether it is a normal block. Only called on the client.
      Returns:
      The block's ambient occlusion light level
      Mappings:
      Namespace Name Mixin selector
      official h Lafh;h()F
      intermediary method_721 Lnet/minecraft/class_160;method_721()F
      named getAmbientOcclusionLightLevel Lnet/minecraft/block/Block;getAmbientOcclusionLightLevel()F
    • onLandedUpon

      public void onLandedUpon​(World world, BlockPos pos, Entity entity, float distance)
      Runs when an entity falls on the block.
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      entity - The entity who fell on the block
      distance - The relative height from which the entity fell
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lpk;F)V
      intermediary method_659 Lnet/minecraft/class_160;method_659(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1745;F)V
      named onLandedUpon Lnet/minecraft/block/Block;onLandedUpon(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/Entity;F)V
    • setEntityVelocity

      public void setEntityVelocity​(World world, Entity entity)
      Sets the speed of an entity moving on the block
      Parameters:
      world - The world that the block is placed in
      entity - The entity that the speed must be changed for
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lpk;)V
      intermediary method_663 Lnet/minecraft/class_160;method_663(Lnet/minecraft/class_99;Lnet/minecraft/class_1745;)V
      named setEntityVelocity Lnet/minecraft/block/Block;setEntityVelocity(Lnet/minecraft/world/World;Lnet/minecraft/entity/Entity;)V
    • 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.
      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;
    • getMeta

      public int getMeta​(World world, BlockPos pos)
      Returns metadata from a world and a BlockPos
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      Returns:
      Metadata
      Mappings:
      Namespace Name Mixin selector
      official j Lafh;j(Ladm;Lcj;)I
      intermediary method_726 Lnet/minecraft/class_160;method_726(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)I
      named getMeta Lnet/minecraft/block/Block;getMeta(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
    • appendItemStacks

      @Environment(CLIENT) public void appendItemStacks​(Item item, ItemGroup group, List<ItemStack> stacks)
      Appends ItemStacks to an itemgroup. Only called on the client.
      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
    • getItemGroup

      @Environment(CLIENT) public ItemGroup getItemGroup()
      Returns the block's ItemGroup. Only called on the client.
      Returns:
      The Block's item group
      Mappings:
      Namespace Name Mixin selector
      official L Lafh;L()Lyz;
      intermediary method_626 Lnet/minecraft/class_160;method_626()Lnet/minecraft/class_2029;
      named getItemGroup Lnet/minecraft/block/Block;getItemGroup()Lnet/minecraft/item/ItemGroup;
    • setItemGroup

      public Block setItemGroup​(ItemGroup group)
      Sets the block's ItemGroup. Used in registering blocks.
      Parameters:
      group - The itemgroup that the block must be added to
      Returns:
      The current block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lyz;)Lafh;
      intermediary method_680 Lnet/minecraft/class_160;method_680(Lnet/minecraft/class_2029;)Lnet/minecraft/class_160;
      named setItemGroup Lnet/minecraft/block/Block;setItemGroup(Lnet/minecraft/item/ItemGroup;)Lnet/minecraft/block/Block;
    • onBreakByPlayer

      public void onBreakByPlayer​(World world, BlockPos pos, BlockState state, PlayerEntity player)
      Runs when the block is broken by a player.
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      player - The player who broke the block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;Lwn;)V
      intermediary method_653 Lnet/minecraft/class_160;method_653(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1963;)V
      named onBreakByPlayer Lnet/minecraft/block/Block;onBreakByPlayer(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;)V
    • rainTick

      public void rainTick​(World world, BlockPos pos)
      Runs every tick when raining. Used my cauldrons to randomly fill up when raining.
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      Mappings:
      Namespace Name Mixin selector
      official k Lafh;k(Ladm;Lcj;)V
      intermediary method_729 Lnet/minecraft/class_160;method_729(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)V
      named rainTick Lnet/minecraft/block/Block;rainTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
    • isFlowerPot

      @Environment(CLIENT) public boolean isFlowerPot()
      Mappings:
      Namespace Name Mixin selector
      official M Lafh;M()Z
      intermediary method_627 Lnet/minecraft/class_160;method_627()Z
      named isFlowerPot Lnet/minecraft/block/Block;isFlowerPot()Z
    • isFire

      public boolean isFire()
      Mappings:
      Namespace Name Mixin selector
      official N Lafh;N()Z
      intermediary method_628 Lnet/minecraft/class_160;method_628()Z
      named isFire Lnet/minecraft/block/Block;isFire()Z
    • shouldDropItemsOnExplosion

      public boolean shouldDropItemsOnExplosion​(Explosion explosion)
      Returns whether the block should drop as an Item during an explosion.
      Parameters:
      explosion - The explosion that caused the block to break
      Returns:
      Whether the block should drop as an item during an explosion
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladi;)Z
      intermediary method_641 Lnet/minecraft/class_160;method_641(Lnet/minecraft/class_93;)Z
      named shouldDropItemsOnExplosion Lnet/minecraft/block/Block;shouldDropItemsOnExplosion(Lnet/minecraft/world/explosion/Explosion;)Z
    • isEqualTo

      public boolean isEqualTo​(Block block)
      Returns whether the current block and another block are equal
      Parameters:
      block - The other block
      Returns:
      Whether the current block and the other block are equal
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Lafh;)Z
      intermediary method_695 Lnet/minecraft/class_160;method_695(Lnet/minecraft/class_160;)Z
      named isEqualTo Lnet/minecraft/block/Block;isEqualTo(Lnet/minecraft/block/Block;)Z
    • areBlocksEqual

      public static boolean areBlocksEqual​(Block one, Block two)
      Returns whether two blocks are equal.
      Returns:
      Whether two blocks are equal
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lafh;Lafh;)Z
      intermediary method_671 Lnet/minecraft/class_160;method_671(Lnet/minecraft/class_160;Lnet/minecraft/class_160;)Z
      named areBlocksEqual Lnet/minecraft/block/Block;areBlocksEqual(Lnet/minecraft/block/Block;Lnet/minecraft/block/Block;)Z
    • hasComparatorOutput

      public boolean hasComparatorOutput()
      Returns whether the block provides comparator output. Used in blocks with entities like Chests and Droppers.
      Returns:
      Whether the block provides comparator output
      Mappings:
      Namespace Name Mixin selector
      official O Lafh;O()Z
      intermediary method_629 Lnet/minecraft/class_160;method_629()Z
      named hasComparatorOutput Lnet/minecraft/block/Block;hasComparatorOutput()Z
    • getComparatorOutput

      public int getComparatorOutput​(World world, BlockPos pos)
      Returns the block's comparator output value. Used in blocks with entities like Chests and Droppers.
      Returns:
      The block's comparator output value
      Mappings:
      Namespace Name Mixin selector
      official l Lafh;l(Ladm;Lcj;)I
      intermediary method_730 Lnet/minecraft/class_160;method_730(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)I
      named getComparatorOutput Lnet/minecraft/block/Block;getComparatorOutput(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
    • method_696

      @Environment(CLIENT) public BlockState method_696​(BlockState blockState)
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Lalz;)Lalz;
      intermediary method_696 Lnet/minecraft/class_160;method_696(Lnet/minecraft/class_376;)Lnet/minecraft/class_376;
      named method_696 Lnet/minecraft/block/Block;method_696(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockState;
    • appendProperties

      protected StateManager appendProperties()
      Returns a new state manager with a property array.
      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;
    • getStateManager

      public StateManager getStateManager()
      Returns the current state manager.
      Returns:
      The current state manager
      Mappings:
      Namespace Name Mixin selector
      official P Lafh;P()Lama;
      intermediary method_630 Lnet/minecraft/class_160;method_630()Lnet/minecraft/class_378;
      named getStateManager Lnet/minecraft/block/Block;getStateManager()Lnet/minecraft/state/StateManager;
    • setDefaultState

      protected final void setDefaultState​(BlockState state)
      Sets the block's default BlockState.
      Parameters:
      state - The default state
      Mappings:
      Namespace Name Mixin selector
      official j Lafh;j(Lalz;)V
      intermediary method_727 Lnet/minecraft/class_160;method_727(Lnet/minecraft/class_376;)V
      named setDefaultState Lnet/minecraft/block/Block;setDefaultState(Lnet/minecraft/block/BlockState;)V
    • getDefaultState

      public final BlockState getDefaultState()
      Returns the block's default BlockState.
      Returns:
      The block's default BlockState
      Mappings:
      Namespace Name Mixin selector
      official Q Lafh;Q()Lalz;
      intermediary method_631 Lnet/minecraft/class_160;method_631()Lnet/minecraft/class_376;
      named getDefaultState Lnet/minecraft/block/Block;getDefaultState()Lnet/minecraft/block/BlockState;
    • getOffsetType

      @Environment(CLIENT) public Block.OffsetType getOffsetType()
      Returns the block's offset type. Used by grass and flowers.
      Returns:
      The block's offset type
      Mappings:
      Namespace Name Mixin selector
      official R Lafh;R()Lafh$a;
      intermediary method_632 Lnet/minecraft/class_160;method_632()Lnet/minecraft/class_160$class_161;
      named getOffsetType Lnet/minecraft/block/Block;getOffsetType()Lnet/minecraft/block/Block$OffsetType;
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Mappings:
      Namespace Name Mixin selector
      official toString Lafh;toString()Ljava/lang/String;
      intermediary toString Lnet/minecraft/class_160;toString()Ljava/lang/String;
      named toString Lnet/minecraft/block/Block;toString()Ljava/lang/String;
    • setup

      public static void setup()
      Registers all blocks
      Mappings:
      Namespace Name Mixin selector
      official S Lafh;S()V
      intermediary method_633 Lnet/minecraft/class_160;method_633()V
      named setup Lnet/minecraft/block/Block;setup()V
    • register

      private static void register​(int id, Identifier identifier, Block block)
      Registers a block to the registry
      Parameters:
      id - The block's Id
      identifier - The block's Identifier
      block - The block object
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(ILjy;Lafh;)V
      intermediary method_640 Lnet/minecraft/class_160;method_640(ILnet/minecraft/class_1605;Lnet/minecraft/class_160;)V
      named register Lnet/minecraft/block/Block;register(ILnet/minecraft/util/Identifier;Lnet/minecraft/block/Block;)V
    • register

      private static void register​(int id, String name, Block block)
      Registers a block to the registry
      Parameters:
      id - The block's Id
      name - The block's name
      block - The block object
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(ILjava/lang/String;Lafh;)V
      intermediary method_638 Lnet/minecraft/class_160;method_638(ILjava/lang/String;Lnet/minecraft/class_160;)V
      named register Lnet/minecraft/block/Block;register(ILjava/lang/String;Lnet/minecraft/block/Block;)V