Package net.minecraft.block
Class DoorBlock
java.lang.Object
net.minecraft.block.Block
net.minecraft.block.DoorBlock
public class DoorBlock extends Block
- Mappings:
Namespace Name official aghintermediary net/minecraft/class_192named net/minecraft/block/DoorBlock
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDoorBlock.DoorTypestatic classDoorBlock.HalfTypeNested classes/interfaces inherited from class net.minecraft.block.Block
Block.OffsetType, Block.Sound -
Field Summary
Fields Modifier and Type Field Description static DirectionPropertyFACINGstatic EnumProperty<DoorBlock.HalfType>HALFstatic EnumProperty<DoorBlock.DoorType>HINGEstatic BooleanPropertyOPENstatic BooleanPropertyPOWEREDFields inherited from class net.minecraft.block.Block
ANVIL, BLOCK_STATES, blockEntity, boundingBoxMaxX, boundingBoxMaxY, boundingBoxMaxZ, boundingBoxMinX, boundingBoxMinY, boundingBoxMinZ, CLOTH, fullBlock, GLASS, GRASS, GRAVEL, LADDER, lightLevel, material, materialColor, opacity, ORE, particleGravity, RAIL, randomTicks, REGISTRY, resistance, SAND, SLIME, slipperiness, SNOW, sound, stateManager, stats, STONE, strength, transluscent, useNeighbourLight, WOOD -
Constructor Summary
-
Method Summary
Modifier and Type Method Description protected StateManagerappendProperties()Returns a new state manager with a property array.booleanblocksMovement(WorldView view, BlockPos pos)booleancanBePlacedAtPos(World world, BlockPos pos)Returns whether the current block can be placed at a certainBlockPosBlockStategetBlockState(BlockState state, WorldView view, BlockPos pos)Returns the current block's blockstate at a certain positionBoxgetCollisionBox(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 BoxintgetData(BlockState state)Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not workItemgetDropItem(BlockState blockState, Random random, int state)Returns the item that must be dropped when the block is brokenItemgetPickItem(World world, BlockPos pos)Called when a player presses the pick block key while facing the block.intgetPistonInteractionType()Returns the block's piston interaction type, as provided by it's material.RenderLayergetRenderLayerType()Returns the appropriate RenderLayer for a block.BoxgetSelectionBox(World world, BlockPos pos)StringgetTranslatedName()Translates and returns the translation keybooleanhasTransperancy()HitResultmethod_655(World world, BlockPos pos, Vec3d vec1, Vec3d vec2)voidmethod_815(World world, BlockPos blockPos, boolean bool)protected static intmethod_816(int int2)static intmethod_817(WorldView worldView, BlockPos blockPos)static Directionmethod_818(int int2)static booleanmethod_819(WorldView worldView, BlockPos blockPos)protected static booleanmethod_820(int int2)static Directionmethod_821(WorldView worldView, BlockPos blockPos)protected static booleanmethod_822(int int2)protected static booleanmethod_823(int int2)private voidmethod_824(int int2)private Itemmethod_825()voidneighborUpdate(World world, BlockPos pos, BlockState state, Block block)Runs when its adjacent blocks are updated.voidonBreakByPlayer(World world, BlockPos pos, BlockState state, PlayerEntity player)Runs when the block is broken by a player.booleanonUse(World world, BlockPos pos, BlockState state, PlayerEntity player, Direction direction, float float2, float float3, float float4)Runs when the block is used, i.e.booleanrenderAsNormalBlock()Returns whether the block can be rendered as a normal blockvoidsetBoundingBox(WorldView view, BlockPos pos)BlockStatestateFromData(int data)Returns a blockstate of the current block from it's idMethods inherited from class net.minecraft.block.Block
appendCollisionBoxes, appendItemStacks, areBlocksEqual, calcBlockBreakingData, canBePlacedAdjacent, canBeReplaced, canCollide, canMobSpawnInside, createStackFromBlock, disableStats, dropAsItem, dropExperience, emitsRedstonePower, get, getAmbientOcclusionLightLevel, getBlastResistance, getBlendColor, getBlockColor, getBlockFromItem, getBlockType, getBonusDrops, getBrightness, getByBlockState, getById, getColor, getColor, getComparatorOutput, getDefaultState, getDropCount, getIdByBlock, getItemGroup, getLightLevel, getMaterial, getMaterialColor, getMaxX, getMaxY, getMaxZ, getMeta, getMeta, getMinX, getMinY, getMinZ, getOffsetType, getOpacity, getStateFromData, getStateFromRawId, getStateManager, getStrength, getStrongRedstonePower, getTickRate, getTranslationKey, getWeakRedstonePower, harvest, hasBlockEntity, hasCollision, hasCollision, hasComparatorOutput, hasStats, isEqualTo, isFire, isFlowerPot, isFullBlock, isFullCube, isLeafBlock, isNormalBlock, isReplaceable, isSideInvisible, isTransluscent, method_696, onBlockBreak, onBlockBreakStart, onBreakByPlayer, onBreaking, onCreation, onDestroyedByExplosion, onEntityCollision, onEntityCollision, onEvent, onLandedUpon, onPlaced, onSteppedOn, onUpdateTick, rainTick, randomDisplayTick, randomDropAsItem, requiresSilkTouch, scheduledTick, setBlockItemBounds, setBoundingBox, setDefaultState, setEntityVelocity, setItemGroup, setLightLevel, setOpacity, setResistance, setSound, setStrength, setTickRandomly, setTranslationKey, setUnbreakable, setup, shouldDropItemsOnExplosion, ticksRandomly, toString, usesNeighbourLight
-
Field Details
-
FACING
- Mappings:
Namespace Name Mixin selector official aLagh;a:Laml;intermediary field_871Lnet/minecraft/class_192;field_871:Lnet/minecraft/class_389;named FACINGLnet/minecraft/block/DoorBlock;FACING:Lnet/minecraft/state/property/DirectionProperty;
-
OPEN
- Mappings:
Namespace Name Mixin selector official bLagh;b:Lamk;intermediary field_872Lnet/minecraft/class_192;field_872:Lnet/minecraft/class_388;named OPENLnet/minecraft/block/DoorBlock;OPEN:Lnet/minecraft/state/property/BooleanProperty;
-
HINGE
- Mappings:
Namespace Name Mixin selector official NLagh;N:Lamm;intermediary field_868Lnet/minecraft/class_192;field_868:Lnet/minecraft/class_390;named HINGELnet/minecraft/block/DoorBlock;HINGE:Lnet/minecraft/state/property/EnumProperty;
-
POWERED
- Mappings:
Namespace Name Mixin selector official OLagh;O:Lamk;intermediary field_869Lnet/minecraft/class_192;field_869:Lnet/minecraft/class_388;named POWEREDLnet/minecraft/block/DoorBlock;POWERED:Lnet/minecraft/state/property/BooleanProperty;
-
HALF
- Mappings:
Namespace Name Mixin selector official PLagh;P:Lamm;intermediary field_870Lnet/minecraft/class_192;field_870:Lnet/minecraft/class_390;named HALFLnet/minecraft/block/DoorBlock;HALF:Lnet/minecraft/state/property/EnumProperty;
-
-
Constructor Details
-
DoorBlock
- Parameters:
material- The block's material- Mappings:
Namespace Name Mixin selector official <init>Lafh;<init>(Larm;)Vintermediary <init>Lnet/minecraft/class_160;<init>(Lnet/minecraft/class_591;)Vnamed <init>Lnet/minecraft/block/Block;<init>(Lnet/minecraft/block/Material;)V
-
-
Method Details
-
getTranslatedName
Translates and returns the translation key- Overrides:
getTranslatedNamein classBlock- Returns:
- Translated name
- Mappings:
Namespace Name Mixin selector official fLafh;f()Ljava/lang/String;intermediary method_716Lnet/minecraft/class_160;method_716()Ljava/lang/String;named getTranslatedNameLnet/minecraft/block/Block;getTranslatedName()Ljava/lang/String;
-
hasTransperancy
public boolean hasTransperancy()- Overrides:
hasTransperancyin classBlock- Mappings:
Namespace Name Mixin selector official cLafh;c()Zintermediary method_699Lnet/minecraft/class_160;method_699()Znamed hasTransperancyLnet/minecraft/block/Block;hasTransperancy()Z
-
blocksMovement
- Overrides:
blocksMovementin classBlock- Mappings:
Namespace Name Mixin selector official bLafh;b(Ladq;Lcj;)Zintermediary method_692Lnet/minecraft/class_160;method_692(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Znamed blocksMovementLnet/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:
renderAsNormalBlockin classBlock- Returns:
- Whether the block can be rendered as a normal block
- Mappings:
Namespace Name Mixin selector official dLafh;d()Zintermediary method_709Lnet/minecraft/class_160;method_709()Znamed renderAsNormalBlockLnet/minecraft/block/Block;renderAsNormalBlock()Z
-
getSelectionBox
- Overrides:
getSelectionBoxin classBlock- Mappings:
Namespace Name Mixin selector official bLafh;b(Ladm;Lcj;)Laug;intermediary method_686Lnet/minecraft/class_160;method_686(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Lnet/minecraft/class_646;named getSelectionBoxLnet/minecraft/block/Block;getSelectionBox(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Box;
-
getCollisionBox
Returns a box by adding the block's current location and the block's corresponding value in its Bounding Box- Overrides:
getCollisionBoxin classBlock- Parameters:
world- The world that the block has been placedpos- The block's positionstate- The block's BlockState- Returns:
- The Collision box
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;)Laug;intermediary method_645Lnet/minecraft/class_160;method_645(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Lnet/minecraft/class_646;named getCollisionBoxLnet/minecraft/block/Block;getCollisionBox(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/util/math/Box;
-
setBoundingBox
- Overrides:
setBoundingBoxin classBlock- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladq;Lcj;)Vintermediary method_665Lnet/minecraft/class_160;method_665(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Vnamed setBoundingBoxLnet/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 kLagh;k(I)Vintermediary method_824Lnet/minecraft/class_192;method_824(I)Vnamed method_824Lnet/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:
onUsein classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStateplayer- The player who used the blockdirection- The direction that the block is facing- Returns:
- Whether the action is succesful
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Lwn;Lcq;FFF)Zintermediary method_654Lnet/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)Znamed onUseLnet/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
- Mappings:
Namespace Name Mixin selector official aLagh;a(Ladm;Lcj;Z)Vintermediary method_815Lnet/minecraft/class_192;method_815(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Z)Vnamed method_815Lnet/minecraft/block/DoorBlock;method_815(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Z)V
-
neighborUpdate
Runs when its adjacent blocks are updated. It will also run when the block is placed or removed as Air is being updated.- Overrides:
neighborUpdatein classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStateblock- The adjacent Block that updated the current block- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Lafh;)Vintermediary method_648Lnet/minecraft/class_160;method_648(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_160;)Vnamed neighborUpdateLnet/minecraft/block/Block;neighborUpdate(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/Block;)V
-
getDropItem
Returns the item that must be dropped when the block is broken- Overrides:
getDropItemin classBlock- Parameters:
blockState- The block's BlockStaterandom- Random objectstate- State- Returns:
- The Item that drops after the block breaks
- Mappings:
Namespace Name Mixin selector official aLafh;a(Lalz;Ljava/util/Random;I)Lzw;intermediary method_674Lnet/minecraft/class_160;method_674(Lnet/minecraft/class_376;Ljava/util/Random;I)Lnet/minecraft/class_2054;named getDropItemLnet/minecraft/block/Block;getDropItem(Lnet/minecraft/block/BlockState;Ljava/util/Random;I)Lnet/minecraft/item/Item;
-
method_655
- Overrides:
method_655in classBlock- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Laui;Laui;)Lauh;intermediary method_655Lnet/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_655Lnet/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
Returns whether the current block can be placed at a certainBlockPos- Overrides:
canBePlacedAtPosin classBlock- Returns:
- Whether the current block can be placed at a BlockPos
- Mappings:
Namespace Name Mixin selector official dLafh;d(Ladm;Lcj;)Zintermediary method_711Lnet/minecraft/class_160;method_711(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Znamed canBePlacedAtPosLnet/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:
getPistonInteractionTypein classBlock- Returns:
- Current block's piston interaction type
- Mappings:
Namespace Name Mixin selector official kLafh;k()Iintermediary method_728Lnet/minecraft/class_160;method_728()Inamed getPistonInteractionTypeLnet/minecraft/block/Block;getPistonInteractionType()I
-
method_817
- Mappings:
Namespace Name Mixin selector official eLagh;e(Ladq;Lcj;)Iintermediary method_817Lnet/minecraft/class_192;method_817(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Inamed method_817Lnet/minecraft/block/DoorBlock;method_817(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)I
-
getPickItem
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:
getPickItemin classBlock- Returns:
- The Item that must be placed into the player's inventory
- Mappings:
Namespace Name Mixin selector official cLafh;c(Ladm;Lcj;)Lzw;intermediary method_702Lnet/minecraft/class_160;method_702(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Lnet/minecraft/class_2054;named getPickItemLnet/minecraft/block/Block;getPickItem(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/item/Item;
-
method_825
- Mappings:
Namespace Name Mixin selector official lLagh;l()Lzw;intermediary method_825Lnet/minecraft/class_192;method_825()Lnet/minecraft/class_2054;named method_825Lnet/minecraft/block/DoorBlock;method_825()Lnet/minecraft/item/Item;
-
onBreakByPlayer
Runs when the block is broken by a player.- Overrides:
onBreakByPlayerin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStateplayer- The player who broke the block- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Lwn;)Vintermediary method_653Lnet/minecraft/class_160;method_653(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1963;)Vnamed onBreakByPlayerLnet/minecraft/block/Block;onBreakByPlayer(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;)V
-
getRenderLayerType
Returns the appropriate RenderLayer for a block. Only called on the client.- Overrides:
getRenderLayerTypein classBlock- Returns:
- The block's RenderLayer
- Mappings:
Namespace Name Mixin selector official mLafh;m()Ladf;intermediary method_731Lnet/minecraft/class_160;method_731()Lnet/minecraft/class_91;named getRenderLayerTypeLnet/minecraft/block/Block;getRenderLayerType()Lnet/minecraft/client/render/RenderLayer;
-
getBlockState
Returns the current block's blockstate at a certain position- Overrides:
getBlockStatein classBlock- Parameters:
state- The original blockstateview- WorldView instancepos- The block's position- Returns:
- state
- Mappings:
Namespace Name Mixin selector official aLafh;a(Lalz;Ladq;Lcj;)Lalz;intermediary method_673Lnet/minecraft/class_160;method_673(Lnet/minecraft/class_376;Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Lnet/minecraft/class_376;named getBlockStateLnet/minecraft/block/Block;getBlockState(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;
-
stateFromData
Returns a blockstate of the current block from it's id- Overrides:
stateFromDatain classBlock- Parameters:
data- The Blockstate's associated data value- Returns:
- The Default state
- Mappings:
Namespace Name Mixin selector official aLafh;a(I)Lalz;intermediary method_637Lnet/minecraft/class_160;method_637(I)Lnet/minecraft/class_376;named stateFromDataLnet/minecraft/block/Block;stateFromData(I)Lnet/minecraft/block/BlockState;
-
getData
Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not work- Overrides:
getDatain classBlock- Parameters:
state- The Blockstate- Returns:
- Zero
- Mappings:
Namespace Name Mixin selector official cLafh;c(Lalz;)Iintermediary method_706Lnet/minecraft/class_160;method_706(Lnet/minecraft/class_376;)Inamed getDataLnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
-
method_816
protected static int method_816(int int2)- Mappings:
Namespace Name Mixin selector official bLagh;b(I)Iintermediary method_816Lnet/minecraft/class_192;method_816(I)Inamed method_816Lnet/minecraft/block/DoorBlock;method_816(I)I
-
method_819
- Mappings:
Namespace Name Mixin selector official fLagh;f(Ladq;Lcj;)Zintermediary method_819Lnet/minecraft/class_192;method_819(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Znamed method_819Lnet/minecraft/block/DoorBlock;method_819(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z
-
method_821
- Mappings:
Namespace Name Mixin selector official hLagh;h(Ladq;Lcj;)Lcq;intermediary method_821Lnet/minecraft/class_192;method_821(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Lnet/minecraft/class_1383;named method_821Lnet/minecraft/block/DoorBlock;method_821(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Direction;
-
method_818
- Mappings:
Namespace Name Mixin selector official fLagh;f(I)Lcq;intermediary method_818Lnet/minecraft/class_192;method_818(I)Lnet/minecraft/class_1383;named method_818Lnet/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 gLagh;g(I)Zintermediary method_820Lnet/minecraft/class_192;method_820(I)Znamed method_820Lnet/minecraft/block/DoorBlock;method_820(I)Z
-
method_822
protected static boolean method_822(int int2)- Mappings:
Namespace Name Mixin selector official iLagh;i(I)Zintermediary method_822Lnet/minecraft/class_192;method_822(I)Znamed method_822Lnet/minecraft/block/DoorBlock;method_822(I)Z
-
method_823
protected static boolean method_823(int int2)- Mappings:
Namespace Name Mixin selector official jLagh;j(I)Zintermediary method_823Lnet/minecraft/class_192;method_823(I)Znamed method_823Lnet/minecraft/block/DoorBlock;method_823(I)Z
-
appendProperties
Returns a new state manager with a property array.- Overrides:
appendPropertiesin classBlock- Returns:
- New state manager
- Mappings:
Namespace Name Mixin selector official eLafh;e()Lama;intermediary method_714Lnet/minecraft/class_160;method_714()Lnet/minecraft/class_378;named appendPropertiesLnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;
-