Class DoorBlock

java.lang.Object
net.minecraft.block.Block
net.minecraft.block.DoorBlock

public class DoorBlock extends Block
Mappings:
Namespace Name
official agh
intermediary net/minecraft/class_129
named net/minecraft/block/DoorBlock
  • Field Details

    • FACING

      public static final DirectionProperty FACING
      Mappings:
      Namespace Name Mixin selector
      official a Lagh;a:Laml;
      intermediary field_9372 Lnet/minecraft/class_129;field_9372:Lnet/minecraft/class_2244;
      named FACING Lnet/minecraft/block/DoorBlock;FACING:Lnet/minecraft/state/property/DirectionProperty;
    • OPEN

      public static final BooleanProperty OPEN
      Mappings:
      Namespace Name Mixin selector
      official b Lagh;b:Lamk;
      intermediary field_9373 Lnet/minecraft/class_129;field_9373:Lnet/minecraft/class_2243;
      named OPEN Lnet/minecraft/block/DoorBlock;OPEN:Lnet/minecraft/state/property/BooleanProperty;
    • HINGE

      public static final EnumProperty<DoorBlock.DoorType> HINGE
      Mappings:
      Namespace Name Mixin selector
      official N Lagh;N:Lamm;
      intermediary field_9369 Lnet/minecraft/class_129;field_9369:Lnet/minecraft/class_2245;
      named HINGE Lnet/minecraft/block/DoorBlock;HINGE:Lnet/minecraft/state/property/EnumProperty;
    • POWERED

      public static final BooleanProperty POWERED
      Mappings:
      Namespace Name Mixin selector
      official O Lagh;O:Lamk;
      intermediary field_9370 Lnet/minecraft/class_129;field_9370:Lnet/minecraft/class_2243;
      named POWERED Lnet/minecraft/block/DoorBlock;POWERED:Lnet/minecraft/state/property/BooleanProperty;
    • HALF

      public static final EnumProperty<DoorBlock.HalfType> HALF
      Mappings:
      Namespace Name Mixin selector
      official P Lagh;P:Lamm;
      intermediary field_9371 Lnet/minecraft/class_129;field_9371:Lnet/minecraft/class_2245;
      named HALF Lnet/minecraft/block/DoorBlock;HALF:Lnet/minecraft/state/property/EnumProperty;
  • Constructor Details

    • DoorBlock

      protected DoorBlock(Material material)
      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

    • getTranslatedName

      public String getTranslatedName()
      Translates and returns the translation key
      Overrides:
      getTranslatedName in class Block
      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;
    • hasTransperancy

      public boolean hasTransperancy()
      Overrides:
      hasTransperancy in class Block
      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
    • blocksMovement

      public boolean blocksMovement(BlockView view, BlockPos pos)
      Overrides:
      blocksMovement in class Block
      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
    • renderAsNormalBlock

      public boolean renderAsNormalBlock()
      Returns whether the block can be rendered as a normal block
      Overrides:
      renderAsNormalBlock in class Block
      Returns:
      Whether the block can be rendered as a normal block
      Mappings:
      Namespace Name Mixin selector
      official d Lafh;d()Z
      intermediary method_441 Lnet/minecraft/class_197;method_441()Z
      named renderAsNormalBlock Lnet/minecraft/block/Block;renderAsNormalBlock()Z
    • getSelectionBox

      @Environment(CLIENT) public Box getSelectionBox(World world, BlockPos pos)
      Overrides:
      getSelectionBox in class Block
      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;
    • 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
      Overrides:
      getCollisionBox in class Block
      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;
    • setBoundingBox

      public void setBoundingBox(BlockView view, BlockPos pos)
      Overrides:
      setBoundingBox in class Block
      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
    • method_306

      private void method_306(int int2)
      Mappings:
      Namespace Name Mixin selector
      official k Lagh;k(I)V
      intermediary method_306 Lnet/minecraft/class_129;method_306(I)V
      named method_306 Lnet/minecraft/block/DoorBlock;method_306(I)V
    • 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.
      Overrides:
      onUse in class Block
      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
    • method_8742

      public void method_8742(World world, BlockPos blockPos, boolean bool)
      Mappings:
      Namespace Name Mixin selector
      official a Lagh;a(Ladm;Lcj;Z)V
      intermediary method_8742 Lnet/minecraft/class_129;method_8742(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Z)V
      named method_8742 Lnet/minecraft/block/DoorBlock;method_8742(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Z)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.
      Overrides:
      neighborUpdate in class Block
      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
    • getDropItem

      public Item getDropItem(BlockState blockState, Random random, int state)
      Returns the item that must be dropped when the block is broken
      Overrides:
      getDropItem in class Block
      Parameters:
      blockState - The block's BlockState
      random - Random object
      state - State
      Returns:
      The Item that drops after the block breaks
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lalz;Ljava/util/Random;I)Lzw;
      intermediary method_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;
    • method_414

      public BlockHitResult method_414(World world, BlockPos pos, Vec3d vec1, Vec3d vec2)
      Overrides:
      method_414 in class Block
      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;
    • canBePlacedAtPos

      public boolean canBePlacedAtPos(World world, BlockPos pos)
      Returns whether the current block can be placed at a certain BlockPos
      Overrides:
      canBePlacedAtPos in class Block
      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
    • getPistonInteractionType

      public int getPistonInteractionType()
      Returns the block's piston interaction type, as provided by it's material.
      Overrides:
      getPistonInteractionType in class Block
      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
    • method_8744

      public static int method_8744(BlockView blockView, BlockPos blockPos)
      Mappings:
      Namespace Name Mixin selector
      official e Lagh;e(Ladq;Lcj;)I
      intermediary method_8744 Lnet/minecraft/class_129;method_8744(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)I
      named method_8744 Lnet/minecraft/block/DoorBlock;method_8744(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)I
    • getPickItem

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

      private Item method_8751()
      Mappings:
      Namespace Name Mixin selector
      official l Lagh;l()Lzw;
      intermediary method_8751 Lnet/minecraft/class_129;method_8751()Lnet/minecraft/class_1069;
      named method_8751 Lnet/minecraft/block/DoorBlock;method_8751()Lnet/minecraft/item/Item;
    • onBreakByPlayer

      public void onBreakByPlayer(World world, BlockPos pos, BlockState state, PlayerEntity player)
      Runs when the block is broken by a player.
      Overrides:
      onBreakByPlayer in class Block
      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
    • getRenderLayerType

      @Environment(CLIENT) public BlockRenderLayer getRenderLayerType()
      Returns the appropriate RenderLayer for a block. Only called on the client.
      Overrides:
      getRenderLayerType in class Block
      Returns:
      The block's RenderLayer
      Mappings:
      Namespace Name Mixin selector
      official m Lafh;m()Ladf;
      intermediary method_8687 Lnet/minecraft/class_197;method_8687()Lnet/minecraft/class_2165;
      named getRenderLayerType Lnet/minecraft/block/Block;getRenderLayerType()Lnet/minecraft/client/render/BlockRenderLayer;
    • getBlockState

      public BlockState getBlockState(BlockState state, BlockView view, BlockPos pos)
      Returns the current block's blockstate at a certain position
      Overrides:
      getBlockState in class Block
      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;
    • stateFromData

      public BlockState stateFromData(int data)
      Returns a blockstate of the current block from it's id
      Overrides:
      stateFromData in class Block
      Parameters:
      data - The Blockstate's associated data value
      Returns:
      The Default state
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(I)Lalz;
      intermediary method_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
      Overrides:
      getData in class Block
      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
    • method_8743

      protected static int method_8743(int int2)
      Mappings:
      Namespace Name Mixin selector
      official b Lagh;b(I)I
      intermediary method_8743 Lnet/minecraft/class_129;method_8743(I)I
      named method_8743 Lnet/minecraft/block/DoorBlock;method_8743(I)I
    • method_8746

      public static boolean method_8746(BlockView blockView, BlockPos blockPos)
      Mappings:
      Namespace Name Mixin selector
      official f Lagh;f(Ladq;Lcj;)Z
      intermediary method_8746 Lnet/minecraft/class_129;method_8746(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)Z
      named method_8746 Lnet/minecraft/block/DoorBlock;method_8746(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Z
    • method_8748

      public static Direction method_8748(BlockView blockView, BlockPos blockPos)
      Mappings:
      Namespace Name Mixin selector
      official h Lagh;h(Ladq;Lcj;)Lcq;
      intermediary method_8748 Lnet/minecraft/class_129;method_8748(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;)Lnet/minecraft/class_1354;
      named method_8748 Lnet/minecraft/block/DoorBlock;method_8748(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Direction;
    • method_8745

      public static Direction method_8745(int int2)
      Mappings:
      Namespace Name Mixin selector
      official f Lagh;f(I)Lcq;
      intermediary method_8745 Lnet/minecraft/class_129;method_8745(I)Lnet/minecraft/class_1354;
      named method_8745 Lnet/minecraft/block/DoorBlock;method_8745(I)Lnet/minecraft/util/math/Direction;
    • method_8747

      protected static boolean method_8747(int int2)
      Mappings:
      Namespace Name Mixin selector
      official g Lagh;g(I)Z
      intermediary method_8747 Lnet/minecraft/class_129;method_8747(I)Z
      named method_8747 Lnet/minecraft/block/DoorBlock;method_8747(I)Z
    • method_8749

      protected static boolean method_8749(int int2)
      Mappings:
      Namespace Name Mixin selector
      official i Lagh;i(I)Z
      intermediary method_8749 Lnet/minecraft/class_129;method_8749(I)Z
      named method_8749 Lnet/minecraft/block/DoorBlock;method_8749(I)Z
    • method_8750

      protected static boolean method_8750(int int2)
      Mappings:
      Namespace Name Mixin selector
      official j Lagh;j(I)Z
      intermediary method_8750 Lnet/minecraft/class_129;method_8750(I)Z
      named method_8750 Lnet/minecraft/block/DoorBlock;method_8750(I)Z
    • appendProperties

      protected StateManager appendProperties()
      Returns a new state manager with a property array.
      Overrides:
      appendProperties in class Block
      Returns:
      New state manager
      Mappings:
      Namespace Name Mixin selector
      official e Lafh;e()Lama;
      intermediary method_8676 Lnet/minecraft/class_197;method_8676()Lnet/minecraft/class_2233;
      named appendProperties Lnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;