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_197
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_9282 Lnet/minecraft/class_197;field_9282:Lnet/minecraft/class_1653;
      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_9283 Lnet/minecraft/class_197;field_9283:Lnet/minecraft/class_1940;
      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_9284 Lnet/minecraft/class_197;field_9284:Lnet/minecraft/class_1942;
      named BLOCK_STATES Lnet/minecraft/block/Block;BLOCK_STATES:Lnet/minecraft/util/collection/IdList;
    • ORE

      public static final Block.Sound ORE
      Ore sound type
      Mappings:
      Namespace Name Mixin selector
      official e Lafh;e:Lafh$b;
      intermediary field_483 Lnet/minecraft/class_197;field_483:Lnet/minecraft/class_197$class_200;
      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_484 Lnet/minecraft/class_197;field_484:Lnet/minecraft/class_197$class_200;
      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_7261 Lnet/minecraft/class_197;field_7261:Lnet/minecraft/class_197$class_200;
      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_486 Lnet/minecraft/class_197;field_486:Lnet/minecraft/class_197$class_200;
      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_487 Lnet/minecraft/class_197;field_487:Lnet/minecraft/class_197$class_200;
      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_7262 Lnet/minecraft/class_197;field_7262:Lnet/minecraft/class_197$class_200;
      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_7263 Lnet/minecraft/class_197;field_7263:Lnet/minecraft/class_197$class_200;
      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_7264 Lnet/minecraft/class_197;field_7264:Lnet/minecraft/class_197$class_200;
      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_7265 Lnet/minecraft/class_197;field_7265:Lnet/minecraft/class_197$class_200;
      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_7266 Lnet/minecraft/class_197;field_7266:Lnet/minecraft/class_197$class_200;
      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_7267 Lnet/minecraft/class_197;field_7267:Lnet/minecraft/class_197$class_200;
      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_7268 Lnet/minecraft/class_197;field_7268:Lnet/minecraft/class_197$class_200;
      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_9285 Lnet/minecraft/class_197;field_9285:Lnet/minecraft/class_197$class_200;
      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_372 Lnet/minecraft/class_197;field_372:Lnet/minecraft/class_1041;
      named itemGroup Lnet/minecraft/block/Block;itemGroup:Lnet/minecraft/item/itemgroup/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_7269 Lnet/minecraft/class_197;field_7269: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_7270 Lnet/minecraft/class_197;field_7270: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_7271 Lnet/minecraft/class_197;field_7271: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_7272 Lnet/minecraft/class_197;field_7272: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_7273 Lnet/minecraft/class_197;field_7273:Z
      named useNeighbourLight Lnet/minecraft/block/Block;useNeighbourLight:Z
    • hardness

      protected float hardness
      Stores the current block's hardness
      Mappings:
      Namespace Name Mixin selector
      official w Lafh;w:F
      intermediary field_467 Lnet/minecraft/class_197;field_467:F
      named hardness Lnet/minecraft/block/Block;hardness:F
    • blastResistance

      protected float blastResistance
      Stores the current block's resistance
      Mappings:
      Namespace Name Mixin selector
      official x Lafh;x:F
      intermediary field_468 Lnet/minecraft/class_197;field_468:F
      named blastResistance Lnet/minecraft/block/Block;blastResistance: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_470 Lnet/minecraft/class_197;field_470: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_471 Lnet/minecraft/class_197;field_471: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_472 Lnet/minecraft/class_197;field_472: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_473 Lnet/minecraft/class_197;field_473: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_474 Lnet/minecraft/class_197;field_474: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_475 Lnet/minecraft/class_197;field_475: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_476 Lnet/minecraft/class_197;field_476: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_477 Lnet/minecraft/class_197;field_477: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_478 Lnet/minecraft/class_197;field_478: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_479 Lnet/minecraft/class_197;field_479:Lnet/minecraft/class_197$class_200;
      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_480 Lnet/minecraft/class_197;field_480:F
      named particleGravity Lnet/minecraft/block/Block;particleGravity:F
    • material

      protected final Material material
      Stores the current block's material
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official J Lafh;J:Larm;
      intermediary field_481 Lnet/minecraft/class_197;field_481:Lnet/minecraft/class_63;
      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:
      Mappings:
      Namespace Name Mixin selector
      official K Lafh;K:Larn;
      intermediary field_9279 Lnet/minecraft/class_197;field_9279:Lnet/minecraft/class_65;
      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_482 Lnet/minecraft/class_197;field_482: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_9280 Lnet/minecraft/class_197;field_9280:Lnet/minecraft/class_2233;
      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_9281 Lnet/minecraft/class_197;field_9281:Lnet/minecraft/class_2232;
      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_425 Lnet/minecraft/class_197;field_425: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_197;<init>(Lnet/minecraft/class_63;Lnet/minecraft/class_65;)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_197;<init>(Lnet/minecraft/class_63;)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_6445 Lnet/minecraft/class_197;method_6445(Lnet/minecraft/class_197;)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_8677 Lnet/minecraft/class_197;method_8677(Lnet/minecraft/class_2232;)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_6448 Lnet/minecraft/class_197;method_6448(I)Lnet/minecraft/class_197;
      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_8672 Lnet/minecraft/class_197;method_8672(I)Lnet/minecraft/class_2232;
      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_6442 Lnet/minecraft/class_197;method_6442(Lnet/minecraft/class_1069;)Lnet/minecraft/class_197;
      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_6446 Lnet/minecraft/class_197;method_6446(Ljava/lang/String;)Lnet/minecraft/class_197;
      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_6451 Lnet/minecraft/class_197;method_6451()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_6452 Lnet/minecraft/class_197;method_6452()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_6453 Lnet/minecraft/class_197;method_6453()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_6454 Lnet/minecraft/class_197;method_6454()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_6455 Lnet/minecraft/class_197;method_6455()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_6456 Lnet/minecraft/class_197;method_6456()Lnet/minecraft/class_63;
      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_8680 Lnet/minecraft/class_197;method_8680(Lnet/minecraft/class_2232;)Lnet/minecraft/class_65;
      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_8635 Lnet/minecraft/class_197;method_8635(I)Lnet/minecraft/class_2232;
      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_8671 Lnet/minecraft/class_197;method_8671(Lnet/minecraft/class_2232;)I
      named getData Lnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
    • getBlockState

      public BlockState getBlockState(BlockState state, BlockView view, BlockPos pos)
      Returns the current block's blockstate at a certain position
      Parameters:
      state - The original blockstate
      view - BlockView instance
      pos - The block's position
      Returns:
      state
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lalz;Ladq;Lcj;)Lalz;
      intermediary method_8656 Lnet/minecraft/class_197;method_8656(Lnet/minecraft/class_2232;Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)Lnet/minecraft/class_2232;
      named getBlockState Lnet/minecraft/block/Block;getBlockState(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;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_401 Lnet/minecraft/class_197;method_401(Lnet/minecraft/class_197$class_200;)Lnet/minecraft/class_197;
      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_6450 Lnet/minecraft/class_197;method_6450(I)Lnet/minecraft/class_197;
      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_6441 Lnet/minecraft/class_197;method_6441(F)Lnet/minecraft/class_197;
      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_430 Lnet/minecraft/class_197;method_430(F)Lnet/minecraft/class_197;
      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_6458 Lnet/minecraft/class_197;method_6458()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_6459 Lnet/minecraft/class_197;method_6459()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_8688 Lnet/minecraft/class_197;method_8688()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_441 Lnet/minecraft/class_197;method_441()Z
      named renderAsNormalBlock Lnet/minecraft/block/Block;renderAsNormalBlock()Z
    • blocksMovement

      public boolean blocksMovement(BlockView view, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Ladq;Lcj;)Z
      intermediary method_8663 Lnet/minecraft/class_197;method_8663(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)Z
      named blocksMovement Lnet/minecraft/block/Block;blocksMovement(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Z
    • getBlockType

      public int getBlockType()
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b()I
      intermediary method_429 Lnet/minecraft/class_197;method_429()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_8638 Lnet/minecraft/class_197;method_8638(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)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_442 Lnet/minecraft/class_197;method_442(F)Lnet/minecraft/class_197;
      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_474 Lnet/minecraft/class_197;method_474()Lnet/minecraft/class_197;
      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_8679 Lnet/minecraft/class_197;method_8679(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)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_440 Lnet/minecraft/class_197;method_440(Z)Lnet/minecraft/class_197;
      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_476 Lnet/minecraft/class_197;method_476()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_478 Lnet/minecraft/class_197;method_478()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_394 Lnet/minecraft/class_197;method_394(FFFFFF)V
      named setBoundingBox Lnet/minecraft/block/Block;setBoundingBox(FFFFFF)V
    • getBrightness

      @Environment(CLIENT) public int getBrightness(BlockView blockView, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c(Ladq;Lcj;)I
      intermediary method_8670 Lnet/minecraft/class_197;method_8670(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)I
      named getBrightness Lnet/minecraft/block/Block;getBrightness(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)I
    • isSideInvisible

      @Environment(CLIENT) public boolean isSideInvisible(BlockView 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 - BlockView 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_8654 Lnet/minecraft/class_197;method_8654(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;Lnet/minecraft/class_1354;)Z
      named isSideInvisible Lnet/minecraft/block/Block;isSideInvisible(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Z
    • hasCollision

      public boolean hasCollision(BlockView blockView, BlockPos pos, Direction direction)
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Ladq;Lcj;Lcq;)Z
      intermediary method_8665 Lnet/minecraft/class_197;method_8665(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;Lnet/minecraft/class_1354;)Z
      named hasCollision Lnet/minecraft/block/Block;hasCollision(Lnet/minecraft/world/BlockView;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_8657 Lnet/minecraft/class_197;method_8657(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)Lnet/minecraft/class_231;
      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_8642 Lnet/minecraft/class_197;method_8642(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_231;Ljava/util/List;Lnet/minecraft/class_864;)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_8640 Lnet/minecraft/class_197;method_8640(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Lnet/minecraft/class_231;
      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_449 Lnet/minecraft/class_197;method_449()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_400 Lnet/minecraft/class_197;method_400(Lnet/minecraft/class_2232;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_469 Lnet/minecraft/class_197;method_469()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_8643 Lnet/minecraft/class_197;method_8643(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;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_8661 Lnet/minecraft/class_197;method_8661(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;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_8669 Lnet/minecraft/class_197;method_8669(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;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_8674 Lnet/minecraft/class_197;method_8674(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)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_8641 Lnet/minecraft/class_197;method_8641(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_197;)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_4789 Lnet/minecraft/class_197;method_4789(Lnet/minecraft/class_1150;)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_8668 Lnet/minecraft/class_197;method_8668(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)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_8659 Lnet/minecraft/class_197;method_8659(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)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_403 Lnet/minecraft/class_197;method_403(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_398 Lnet/minecraft/class_197;method_398(Lnet/minecraft/class_2232;Ljava/util/Random;I)Lnet/minecraft/class_1069;
      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_405 Lnet/minecraft/class_197;method_405(Lnet/minecraft/class_988;Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)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_8660 Lnet/minecraft/class_197;method_8660(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;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_410 Lnet/minecraft/class_197;method_410(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;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_8649 Lnet/minecraft/class_197;method_8649(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_1071;)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_8658 Lnet/minecraft/class_197;method_8658(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;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_8655 Lnet/minecraft/class_197;method_8655(Lnet/minecraft/class_2232;)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_404 Lnet/minecraft/class_197;method_404(Lnet/minecraft/class_864;)F
      named getBlastResistance Lnet/minecraft/block/Block;getBlastResistance(Lnet/minecraft/entity/Entity;)F
    • method_414

      public BlockHitResult method_414(World world, BlockPos pos, Vec3d vec1, Vec3d vec2)
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Laui;Laui;)Lauh;
      intermediary method_414 Lnet/minecraft/class_197;method_414(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_236;Lnet/minecraft/class_236;)Lnet/minecraft/class_234;
      named method_414 Lnet/minecraft/block/Block;method_414(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/hit/BlockHitResult;
    • method_402

      private boolean method_402(Vec3d vec)
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Laui;)Z
      intermediary method_402 Lnet/minecraft/class_197;method_402(Lnet/minecraft/class_236;)Z
      named method_402 Lnet/minecraft/block/Block;method_402(Lnet/minecraft/util/math/Vec3d;)Z
    • method_432

      private boolean method_432(Vec3d vec)
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Laui;)Z
      intermediary method_432 Lnet/minecraft/class_197;method_432(Lnet/minecraft/class_236;)Z
      named method_432 Lnet/minecraft/block/Block;method_432(Lnet/minecraft/util/math/Vec3d;)Z
    • method_443

      private boolean method_443(Vec3d vec)
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c(Laui;)Z
      intermediary method_443 Lnet/minecraft/class_197;method_443(Lnet/minecraft/class_236;)Z
      named method_443 Lnet/minecraft/block/Block;method_443(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_8639 Lnet/minecraft/class_197;method_8639(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_1147;)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 BlockRenderLayer 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_8687 Lnet/minecraft/class_197;method_8687()Lnet/minecraft/class_2165;
      named getRenderLayerType Lnet/minecraft/block/Block;getRenderLayerType()Lnet/minecraft/client/render/BlockRenderLayer;
    • 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_8646 Lnet/minecraft/class_197;method_8646(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_1354;Lnet/minecraft/class_1071;)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_8662 Lnet/minecraft/class_197;method_8662(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_1354;)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_8673 Lnet/minecraft/class_197;method_8673(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)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_421 Lnet/minecraft/class_197;method_421(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_988;Lnet/minecraft/class_1354;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_437 Lnet/minecraft/class_197;method_437(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_864;)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_8645 Lnet/minecraft/class_197;method_8645(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_1354;FFFILnet/minecraft/class_1699;)Lnet/minecraft/class_2232;
      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_420 Lnet/minecraft/class_197;method_420(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_988;)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_8648 Lnet/minecraft/class_197;method_8648(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_864;Lnet/minecraft/class_236;)Lnet/minecraft/class_236;
      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(BlockView view, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladq;Lcj;)V
      intermediary method_8652 Lnet/minecraft/class_197;method_8652(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)V
      named setBoundingBox Lnet/minecraft/block/Block;setBoundingBox(Lnet/minecraft/world/BlockView;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_4189 Lnet/minecraft/class_197;method_4189()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_4190 Lnet/minecraft/class_197;method_4190()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_4191 Lnet/minecraft/class_197;method_4191()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_4192 Lnet/minecraft/class_197;method_4192()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_4193 Lnet/minecraft/class_197;method_4193()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_4183 Lnet/minecraft/class_197;method_4183()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_470 Lnet/minecraft/class_197;method_470()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_8681 Lnet/minecraft/class_197;method_8681(Lnet/minecraft/class_2232;)I
      named getColor Lnet/minecraft/block/Block;getColor(Lnet/minecraft/block/BlockState;)I
    • getBlockColor

      @Environment(CLIENT) public int getBlockColor(BlockView view, BlockPos pos, int id)
      Returns the current block's color
      Parameters:
      view - BlockView 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_438 Lnet/minecraft/class_197;method_438(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;I)I
      named getBlockColor Lnet/minecraft/block/Block;getBlockColor(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;I)I
    • getBlendColor

      @Environment(CLIENT) public final int getBlendColor(BlockView world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official d Lafh;d(Ladq;Lcj;)I
      intermediary method_8675 Lnet/minecraft/class_197;method_8675(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)I
      named getBlendColor Lnet/minecraft/block/Block;getBlendColor(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)I
    • getWeakRedstonePower

      public int getWeakRedstonePower(BlockView view, BlockPos pos, BlockState state, Direction facing)
      Returns the block's weak redstone power.
      Parameters:
      view - BlockView 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_8653 Lnet/minecraft/class_197;method_8653(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_1354;)I
      named getWeakRedstonePower Lnet/minecraft/block/Block;getWeakRedstonePower(Lnet/minecraft/world/BlockView;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_466 Lnet/minecraft/class_197;method_466()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_416 Lnet/minecraft/class_197;method_416(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_864;)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(BlockView view, BlockPos pos, BlockState state, Direction facing)
      Returns the block's strong redstone power.
      Parameters:
      view - BlockView 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_8664 Lnet/minecraft/class_197;method_8664(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_1354;)I
      named getStrongRedstonePower Lnet/minecraft/block/Block;getStrongRedstonePower(Lnet/minecraft/world/BlockView;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_456 Lnet/minecraft/class_197;method_456()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_8651 Lnet/minecraft/class_197;method_8651(Lnet/minecraft/class_1150;Lnet/minecraft/class_988;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_226;)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_475 Lnet/minecraft/class_197;method_475()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_8682 Lnet/minecraft/class_197;method_8682(Lnet/minecraft/class_2232;)Lnet/minecraft/class_1071;
      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_397 Lnet/minecraft/class_197;method_397(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_419 Lnet/minecraft/class_197;method_419(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_1699;Lnet/minecraft/class_1071;)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_8678 Lnet/minecraft/class_197;method_8678()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_433 Lnet/minecraft/class_197;method_433(Ljava/lang/String;)Lnet/minecraft/class_197;
      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_480 Lnet/minecraft/class_197;method_480()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_392 Lnet/minecraft/class_197;method_392()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_435 Lnet/minecraft/class_197;method_435(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;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_481 Lnet/minecraft/class_197;method_481()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_482 Lnet/minecraft/class_197;method_482()Lnet/minecraft/class_197;
      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_453 Lnet/minecraft/class_197;method_453()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_6440 Lnet/minecraft/class_197;method_6440()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_8647 Lnet/minecraft/class_197;method_8647(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_864;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_8650 Lnet/minecraft/class_197;method_8650(Lnet/minecraft/class_1150;Lnet/minecraft/class_864;)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_8667 Lnet/minecraft/class_197;method_8667(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)Lnet/minecraft/class_1069;
      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_8683 Lnet/minecraft/class_197;method_8683(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)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_399 Lnet/minecraft/class_197;method_399(Lnet/minecraft/class_1069;Lnet/minecraft/class_1041;Ljava/util/List;)V
      named appendItemStacks Lnet/minecraft/block/Block;appendItemStacks(Lnet/minecraft/item/Item;Lnet/minecraft/item/itemgroup/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_483 Lnet/minecraft/class_197;method_483()Lnet/minecraft/class_1041;
      named getItemGroup Lnet/minecraft/block/Block;getItemGroup()Lnet/minecraft/item/itemgroup/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_406 Lnet/minecraft/class_197;method_406(Lnet/minecraft/class_1041;)Lnet/minecraft/class_197;
      named setItemGroup Lnet/minecraft/block/Block;setItemGroup(Lnet/minecraft/item/itemgroup/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_8644 Lnet/minecraft/class_197;method_8644(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_988;)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_8685 Lnet/minecraft/class_197;method_8685(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)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_4188 Lnet/minecraft/class_197;method_4188()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_4187 Lnet/minecraft/class_197;method_4187()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_4184 Lnet/minecraft/class_197;method_4184(Lnet/minecraft/class_1147;)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_6447 Lnet/minecraft/class_197;method_6447(Lnet/minecraft/class_197;)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_6443 Lnet/minecraft/class_197;method_6443(Lnet/minecraft/class_197;Lnet/minecraft/class_197;)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_4797 Lnet/minecraft/class_197;method_4797()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_8686 Lnet/minecraft/class_197;method_8686(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)I
      named getComparatorOutput Lnet/minecraft/block/Block;getComparatorOutput(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
    • method_8666

      @Environment(CLIENT) public BlockState method_8666(BlockState blockState)
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Lalz;)Lalz;
      intermediary method_8666 Lnet/minecraft/class_197;method_8666(Lnet/minecraft/class_2232;)Lnet/minecraft/class_2232;
      named method_8666 Lnet/minecraft/block/Block;method_8666(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_8676 Lnet/minecraft/class_197;method_8676()Lnet/minecraft/class_2233;
      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_8632 Lnet/minecraft/class_197;method_8632()Lnet/minecraft/class_2233;
      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_8684 Lnet/minecraft/class_197;method_8684(Lnet/minecraft/class_2232;)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_8633 Lnet/minecraft/class_197;method_8633()Lnet/minecraft/class_2232;
      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_8634 Lnet/minecraft/class_197;method_8634()Lnet/minecraft/class_197$class_2177;
      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_197;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_6457 Lnet/minecraft/class_197;method_6457()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_8637 Lnet/minecraft/class_197;method_8637(ILnet/minecraft/class_1653;Lnet/minecraft/class_197;)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_8636 Lnet/minecraft/class_197;method_8636(ILjava/lang/String;Lnet/minecraft/class_197;)V
      named register Lnet/minecraft/block/Block;register(ILjava/lang/String;Lnet/minecraft/block/Block;)V