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_192
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_871 Lnet/minecraft/class_192;field_871:Lnet/minecraft/class_389;
      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_872 Lnet/minecraft/class_192;field_872:Lnet/minecraft/class_388;
      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_868 Lnet/minecraft/class_192;field_868:Lnet/minecraft/class_390;
      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_869 Lnet/minecraft/class_192;field_869:Lnet/minecraft/class_388;
      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_870 Lnet/minecraft/class_192;field_870:Lnet/minecraft/class_390;
      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_160;<init>(Lnet/minecraft/class_591;)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_716 Lnet/minecraft/class_160;method_716()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_699 Lnet/minecraft/class_160;method_699()Z
      named hasTransperancy Lnet/minecraft/block/Block;hasTransperancy()Z
    • blocksMovement

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

      public boolean renderAsNormalBlock()
      Returns whether the block can be rendered as a normal block
      Overrides:
      renderAsNormalBlock in class Block
      Returns:
      Whether the block can be rendered as a normal block
      Mappings:
      Namespace Name Mixin selector
      official d Lafh;d()Z
      intermediary method_709 Lnet/minecraft/class_160;method_709()Z
      named renderAsNormalBlock Lnet/minecraft/block/Block;renderAsNormalBlock()Z
    • 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_686 Lnet/minecraft/class_160;method_686(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Lnet/minecraft/class_646;
      named getSelectionBox Lnet/minecraft/block/Block;getSelectionBox(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Box;
    • 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_645 Lnet/minecraft/class_160;method_645(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Lnet/minecraft/class_646;
      named getCollisionBox Lnet/minecraft/block/Block;getCollisionBox(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/util/math/Box;
    • setBoundingBox

      public void setBoundingBox​(WorldView view, BlockPos pos)
      Overrides:
      setBoundingBox in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladq;Lcj;)V
      intermediary method_665 Lnet/minecraft/class_160;method_665(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)V
      named setBoundingBox Lnet/minecraft/block/Block;setBoundingBox(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)V
    • method_824

      private void method_824​(int int2)
      Mappings:
      Namespace Name Mixin selector
      official k Lagh;k(I)V
      intermediary method_824 Lnet/minecraft/class_192;method_824(I)V
      named method_824 Lnet/minecraft/block/DoorBlock;method_824(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_654 Lnet/minecraft/class_160;method_654(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1963;Lnet/minecraft/class_1383;FFF)Z
      named onUse Lnet/minecraft/block/Block;onUse(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/Direction;FFF)Z
    • method_815

      public void method_815​(World world, BlockPos blockPos, boolean bool)
      Mappings:
      Namespace Name Mixin selector
      official a Lagh;a(Ladm;Lcj;Z)V
      intermediary method_815 Lnet/minecraft/class_192;method_815(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Z)V
      named method_815 Lnet/minecraft/block/DoorBlock;method_815(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_648 Lnet/minecraft/class_160;method_648(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_160;)V
      named neighborUpdate Lnet/minecraft/block/Block;neighborUpdate(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/Block;)V
    • getDropItem

      public Item getDropItem​(BlockState blockState, Random random, int state)
      Returns the item that must be dropped when the block is broken
      Overrides:
      getDropItem in class Block
      Parameters:
      blockState - The block's BlockState
      random - Random object
      state - State
      Returns:
      The Item that drops after the block breaks
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lalz;Ljava/util/Random;I)Lzw;
      intermediary method_674 Lnet/minecraft/class_160;method_674(Lnet/minecraft/class_376;Ljava/util/Random;I)Lnet/minecraft/class_2054;
      named getDropItem Lnet/minecraft/block/Block;getDropItem(Lnet/minecraft/block/BlockState;Ljava/util/Random;I)Lnet/minecraft/item/Item;
    • method_655

      public HitResult method_655​(World world, BlockPos pos, Vec3d vec1, Vec3d vec2)
      Overrides:
      method_655 in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Laui;Laui;)Lauh;
      intermediary method_655 Lnet/minecraft/class_160;method_655(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_649;Lnet/minecraft/class_649;)Lnet/minecraft/class_647;
      named method_655 Lnet/minecraft/block/Block;method_655(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/hit/HitResult;
    • 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_711 Lnet/minecraft/class_160;method_711(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Z
      named canBePlacedAtPos Lnet/minecraft/block/Block;canBePlacedAtPos(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
    • 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_728 Lnet/minecraft/class_160;method_728()I
      named getPistonInteractionType Lnet/minecraft/block/Block;getPistonInteractionType()I
    • method_817

      public static int method_817​(WorldView worldView, BlockPos blockPos)
      Mappings:
      Namespace Name Mixin selector
      official e Lagh;e(Ladq;Lcj;)I
      intermediary method_817 Lnet/minecraft/class_192;method_817(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)I
      named method_817 Lnet/minecraft/block/DoorBlock;method_817(Lnet/minecraft/world/WorldView;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_702 Lnet/minecraft/class_160;method_702(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Lnet/minecraft/class_2054;
      named getPickItem Lnet/minecraft/block/Block;getPickItem(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/item/Item;
    • method_825

      private Item method_825()
      Mappings:
      Namespace Name Mixin selector
      official l Lagh;l()Lzw;
      intermediary method_825 Lnet/minecraft/class_192;method_825()Lnet/minecraft/class_2054;
      named method_825 Lnet/minecraft/block/DoorBlock;method_825()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_653 Lnet/minecraft/class_160;method_653(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1963;)V
      named onBreakByPlayer Lnet/minecraft/block/Block;onBreakByPlayer(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;)V
    • getRenderLayerType

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

      public BlockState getBlockState​(BlockState state, WorldView view, BlockPos pos)
      Returns the current block's blockstate at a certain position
      Overrides:
      getBlockState in class Block
      Parameters:
      state - The original blockstate
      view - WorldView instance
      pos - The block's position
      Returns:
      state
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lalz;Ladq;Lcj;)Lalz;
      intermediary method_673 Lnet/minecraft/class_160;method_673(Lnet/minecraft/class_376;Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Lnet/minecraft/class_376;
      named getBlockState Lnet/minecraft/block/Block;getBlockState(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;
    • stateFromData

      public BlockState stateFromData​(int data)
      Returns a blockstate of the current block from it's id
      Overrides:
      stateFromData in class Block
      Parameters:
      data - The Blockstate's associated data value
      Returns:
      The Default state
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(I)Lalz;
      intermediary method_637 Lnet/minecraft/class_160;method_637(I)Lnet/minecraft/class_376;
      named stateFromData Lnet/minecraft/block/Block;stateFromData(I)Lnet/minecraft/block/BlockState;
    • getData

      public int getData​(BlockState state)
      Returns the data value for a blockstate Throws an IllegalArmumentException as this method does not work
      Overrides:
      getData in class Block
      Parameters:
      state - The Blockstate
      Returns:
      Zero
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c(Lalz;)I
      intermediary method_706 Lnet/minecraft/class_160;method_706(Lnet/minecraft/class_376;)I
      named getData Lnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
    • method_816

      protected static int method_816​(int int2)
      Mappings:
      Namespace Name Mixin selector
      official b Lagh;b(I)I
      intermediary method_816 Lnet/minecraft/class_192;method_816(I)I
      named method_816 Lnet/minecraft/block/DoorBlock;method_816(I)I
    • method_819

      public static boolean method_819​(WorldView worldView, BlockPos blockPos)
      Mappings:
      Namespace Name Mixin selector
      official f Lagh;f(Ladq;Lcj;)Z
      intermediary method_819 Lnet/minecraft/class_192;method_819(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Z
      named method_819 Lnet/minecraft/block/DoorBlock;method_819(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z
    • method_821

      public static Direction method_821​(WorldView worldView, BlockPos blockPos)
      Mappings:
      Namespace Name Mixin selector
      official h Lagh;h(Ladq;Lcj;)Lcq;
      intermediary method_821 Lnet/minecraft/class_192;method_821(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Lnet/minecraft/class_1383;
      named method_821 Lnet/minecraft/block/DoorBlock;method_821(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Direction;
    • method_818

      public static Direction method_818​(int int2)
      Mappings:
      Namespace Name Mixin selector
      official f Lagh;f(I)Lcq;
      intermediary method_818 Lnet/minecraft/class_192;method_818(I)Lnet/minecraft/class_1383;
      named method_818 Lnet/minecraft/block/DoorBlock;method_818(I)Lnet/minecraft/util/math/Direction;
    • method_820

      protected static boolean method_820​(int int2)
      Mappings:
      Namespace Name Mixin selector
      official g Lagh;g(I)Z
      intermediary method_820 Lnet/minecraft/class_192;method_820(I)Z
      named method_820 Lnet/minecraft/block/DoorBlock;method_820(I)Z
    • method_822

      protected static boolean method_822​(int int2)
      Mappings:
      Namespace Name Mixin selector
      official i Lagh;i(I)Z
      intermediary method_822 Lnet/minecraft/class_192;method_822(I)Z
      named method_822 Lnet/minecraft/block/DoorBlock;method_822(I)Z
    • method_823

      protected static boolean method_823​(int int2)
      Mappings:
      Namespace Name Mixin selector
      official j Lagh;j(I)Z
      intermediary method_823 Lnet/minecraft/class_192;method_823(I)Z
      named method_823 Lnet/minecraft/block/DoorBlock;method_823(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_714 Lnet/minecraft/class_160;method_714()Lnet/minecraft/class_378;
      named appendProperties Lnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;