Package net.minecraft.block
Class DoorBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.DoorBlock
- All Implemented Interfaces:
ItemConvertible
- Mappings:
Namespace Name official cksintermediary net/minecraft/class_2323named net/minecraft/block/DoorBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroupNested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final VoxelShapestatic final DirectionPropertyprotected static final floatstatic final EnumProperty<DoubleBlockHalf>static final EnumProperty<DoorHinge>protected static final VoxelShapestatic final BooleanPropertystatic final BooleanPropertyprotected static final VoxelShapeprotected static final VoxelShapeFields inherited from class net.minecraft.block.Block
field_31022, field_31023, field_31024, field_31025, field_31035, FORCE_STATE, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, SKIP_LIGHTING_UPDATES, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendProperties(StateManager.Builder<Block, BlockState> builder) booleancanPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type) booleancanPlaceAt(BlockState state, WorldView world, BlockPos pos) private intprivate DoorHingeprivate intgetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) getPistonBehavior(BlockState state) longgetRenderingSeed(BlockState state, BlockPos pos) getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) Gets the possibly updated block state of this block when a neighboring block is updated.booleanisOpen(BlockState state) static booleanisWoodenDoor(BlockState state) static booleanisWoodenDoor(World world, BlockPos pos) mirror(BlockState state, BlockMirror mirror) voidneighborUpdate(BlockState state, World world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) voidonBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) voidonPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.private voidplayOpenCloseSound(World world, BlockPos pos, boolean open) rotate(BlockState state, BlockRotation rotation) Applies a block rotation to a block state.voidMethods inherited from class net.minecraft.block.Block
afterBreak, appendStacks, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTranslucent, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getLootTableId, getMaxHorizontalModelOffset, getOpacity, getRaycastShape, getRenderType, getSidesShape, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, prepare, randomTick, scheduledTick
-
Field Details
-
FACING
- Mappings:
Namespace Name Mixin selector official aLcks;a:Lcvl;intermediary field_10938Lnet/minecraft/class_2323;field_10938:Lnet/minecraft/class_2753;named FACINGLnet/minecraft/block/DoorBlock;FACING:Lnet/minecraft/state/property/DirectionProperty;
-
OPEN
- Mappings:
Namespace Name Mixin selector official bLcks;b:Lcvi;intermediary field_10945Lnet/minecraft/class_2323;field_10945:Lnet/minecraft/class_2746;named OPENLnet/minecraft/block/DoorBlock;OPEN:Lnet/minecraft/state/property/BooleanProperty;
-
HINGE
- Mappings:
Namespace Name Mixin selector official cLcks;c:Lcvp;intermediary field_10941Lnet/minecraft/class_2323;field_10941:Lnet/minecraft/class_2754;named HINGELnet/minecraft/block/DoorBlock;HINGE:Lnet/minecraft/state/property/EnumProperty;
-
POWERED
- Mappings:
Namespace Name Mixin selector official dLcks;d:Lcvi;intermediary field_10940Lnet/minecraft/class_2323;field_10940:Lnet/minecraft/class_2746;named POWEREDLnet/minecraft/block/DoorBlock;POWERED:Lnet/minecraft/state/property/BooleanProperty;
-
HALF
- Mappings:
Namespace Name Mixin selector official eLcks;e:Lcvp;intermediary field_10946Lnet/minecraft/class_2323;field_10946:Lnet/minecraft/class_2754;named HALFLnet/minecraft/block/DoorBlock;HALF:Lnet/minecraft/state/property/EnumProperty;
-
field_31083
protected static final float field_31083- See Also:
- Mappings:
Namespace Name Mixin selector official fLcks;f:Fintermediary field_31083Lnet/minecraft/class_2323;field_31083:Fnamed field_31083Lnet/minecraft/block/DoorBlock;field_31083:F
-
NORTH_SHAPE
- Mappings:
Namespace Name Mixin selector official gLcks;g:Ldwm;intermediary field_10942Lnet/minecraft/class_2323;field_10942:Lnet/minecraft/class_265;named NORTH_SHAPELnet/minecraft/block/DoorBlock;NORTH_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
SOUTH_SHAPE
- Mappings:
Namespace Name Mixin selector official hLcks;h:Ldwm;intermediary field_10939Lnet/minecraft/class_2323;field_10939:Lnet/minecraft/class_265;named SOUTH_SHAPELnet/minecraft/block/DoorBlock;SOUTH_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
EAST_SHAPE
- Mappings:
Namespace Name Mixin selector official iLcks;i:Ldwm;intermediary field_10944Lnet/minecraft/class_2323;field_10944:Lnet/minecraft/class_265;named EAST_SHAPELnet/minecraft/block/DoorBlock;EAST_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
WEST_SHAPE
- Mappings:
Namespace Name Mixin selector official jLcks;j:Ldwm;intermediary field_10943Lnet/minecraft/class_2323;field_10943:Lnet/minecraft/class_265;named WEST_SHAPELnet/minecraft/block/DoorBlock;WEST_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
-
Constructor Details
-
DoorBlock
- Mappings:
Namespace Name Mixin selector official <init>Lcuq;<init>(Lcuq$c;)Vintermediary <init>Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)Vnamed <init>Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
-
-
Method Details
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
getOutlineShapein classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcuq;a(Lcur;Lcfg;Lgt;Ldvy;)Ldwm;intermediary method_9530Lnet/minecraft/class_4970;method_9530(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;named getOutlineShapeLnet/minecraft/block/AbstractBlock;getOutlineShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;
-
getStateForNeighborUpdate
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) Gets the possibly updated block state of this block when a neighboring block is updated.- Overrides:
getStateForNeighborUpdatein classAbstractBlock- Parameters:
state- the state of this blockdirection- the direction from this block to the neighborneighborState- the state of the updated neighbor blockworld- the worldpos- the position of this blockneighborPos- the position of the neighbor block- Returns:
- the new state of this block
- Mappings:
Namespace Name Mixin selector official aLcuq;a(Lcur;Lgy;Lcur;Lcgb;Lgt;Lgt;)Lcur;intermediary method_9559Lnet/minecraft/class_4970;method_9559(Lnet/minecraft/class_2680;Lnet/minecraft/class_2350;Lnet/minecraft/class_2680;Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2680;named getStateForNeighborUpdateLnet/minecraft/block/AbstractBlock;getStateForNeighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;
-
onBreak
- Overrides:
onBreakin classBlock- Mappings:
Namespace Name Mixin selector official aLciw;a(Lcga;Lgt;Lcur;Lbtf;)Vintermediary method_9576Lnet/minecraft/class_2248;method_9576(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_1657;)Vnamed onBreakLnet/minecraft/block/Block;onBreak(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;)V
-
getCloseSoundEventId
private int getCloseSoundEventId()- Mappings:
Namespace Name Mixin selector official bLcks;b()Iintermediary method_10034Lnet/minecraft/class_2323;method_10034()Inamed getCloseSoundEventIdLnet/minecraft/block/DoorBlock;getCloseSoundEventId()I
-
getOpenSoundEventId
private int getOpenSoundEventId()- Mappings:
Namespace Name Mixin selector official qLcks;q()Iintermediary method_10032Lnet/minecraft/class_2323;method_10032()Inamed getOpenSoundEventIdLnet/minecraft/block/DoorBlock;getOpenSoundEventId()I
-
getPlacementState
- Overrides:
getPlacementStatein classBlock- Mappings:
Namespace Name Mixin selector official aLciw;a(Lcca;)Lcur;intermediary method_9605Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;named getPlacementStateLnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;
-
onPlaced
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) - Overrides:
onPlacedin classBlock- Mappings:
Namespace Name Mixin selector official aLciw;a(Lcga;Lgt;Lcur;Lbbf;Lcaa;)Vintermediary method_9567Lnet/minecraft/class_2248;method_9567(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;)Vnamed onPlacedLnet/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
-
getHinge
- Mappings:
Namespace Name Mixin selector official bLcks;b(Lcca;)Lcvm;intermediary method_10035Lnet/minecraft/class_2323;method_10035(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2750;named getHingeLnet/minecraft/block/DoorBlock;getHinge(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/enums/DoorHinge;
-
onUse
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player. This, by default, is bound to using the right mouse button.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
world.isClient().If the action result is successful on a logical client, then the action will be sent to the logical server for processing.
- Overrides:
onUsein classAbstractBlock- Returns:
- an action result that specifies if using the block was successful.
- Mappings:
Namespace Name Mixin selector official aLcuq;a(Lcur;Lcga;Lgt;Lbtf;Lazl;Ldvp;)Lazm;intermediary method_9534Lnet/minecraft/class_4970;method_9534(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;Lnet/minecraft/class_3965;)Lnet/minecraft/class_1269;named onUseLnet/minecraft/block/AbstractBlock;onUse(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/util/hit/BlockHitResult;)Lnet/minecraft/util/ActionResult;
-
isOpen
- Mappings:
Namespace Name Mixin selector official hLcks;h(Lcur;)Zintermediary method_30841Lnet/minecraft/class_2323;method_30841(Lnet/minecraft/class_2680;)Znamed isOpenLnet/minecraft/block/DoorBlock;isOpen(Lnet/minecraft/block/BlockState;)Z
-
setOpen
public void setOpen(@Nullable @Nullable Entity entity, World world, BlockState state, BlockPos pos, boolean open) - Mappings:
Namespace Name Mixin selector official aLcks;a(Lbaq;Lcga;Lcur;Lgt;Z)Vintermediary method_10033Lnet/minecraft/class_2323;method_10033(Lnet/minecraft/class_1297;Lnet/minecraft/class_1937;Lnet/minecraft/class_2680;Lnet/minecraft/class_2338;Z)Vnamed setOpenLnet/minecraft/block/DoorBlock;setOpen(Lnet/minecraft/entity/Entity;Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Z)V
-
neighborUpdate
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) - Overrides:
neighborUpdatein classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcuq;a(Lcur;Lcga;Lgt;Lciw;Lgt;Z)Vintermediary method_9612Lnet/minecraft/class_4970;method_9612(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2248;Lnet/minecraft/class_2338;Z)Vnamed neighborUpdateLnet/minecraft/block/AbstractBlock;neighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/Block;Lnet/minecraft/util/math/BlockPos;Z)V
-
canPlaceAt
- Overrides:
canPlaceAtin classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcuq;a(Lcur;Lcgd;Lgt;)Zintermediary method_9558Lnet/minecraft/class_4970;method_9558(Lnet/minecraft/class_2680;Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;)Znamed canPlaceAtLnet/minecraft/block/AbstractBlock;canPlaceAt(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z
-
playOpenCloseSound
- Mappings:
Namespace Name Mixin selector official aLcks;a(Lcga;Lgt;Z)Vintermediary method_10036Lnet/minecraft/class_2323;method_10036(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Z)Vnamed playOpenCloseSoundLnet/minecraft/block/DoorBlock;playOpenCloseSound(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Z)V
-
getPistonBehavior
- Overrides:
getPistonBehaviorin classAbstractBlock- Mappings:
Namespace Name Mixin selector official dLcuq;d(Lcur;)Ldpe;intermediary method_9527Lnet/minecraft/class_4970;method_9527(Lnet/minecraft/class_2680;)Lnet/minecraft/class_3619;named getPistonBehaviorLnet/minecraft/block/AbstractBlock;getPistonBehavior(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/piston/PistonBehavior;
-
rotate
Applies a block rotation to a block state.By default, this returns the provided block state.
- Overrides:
rotatein classAbstractBlock- Returns:
- the rotated block state
- Mappings:
Namespace Name Mixin selector official aLcuq;a(Lcur;Lcoz;)Lcur;intermediary method_9598Lnet/minecraft/class_4970;method_9598(Lnet/minecraft/class_2680;Lnet/minecraft/class_2470;)Lnet/minecraft/class_2680;named rotateLnet/minecraft/block/AbstractBlock;rotate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockRotation;)Lnet/minecraft/block/BlockState;
-
mirror
- Overrides:
mirrorin classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcuq;a(Lcur;Lcnk;)Lcur;intermediary method_9569Lnet/minecraft/class_4970;method_9569(Lnet/minecraft/class_2680;Lnet/minecraft/class_2415;)Lnet/minecraft/class_2680;named mirrorLnet/minecraft/block/AbstractBlock;mirror(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockMirror;)Lnet/minecraft/block/BlockState;
-
getRenderingSeed
- Overrides:
getRenderingSeedin classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcuq;a(Lcur;Lgt;)Jintermediary method_9535Lnet/minecraft/class_4970;method_9535(Lnet/minecraft/class_2680;Lnet/minecraft/class_2338;)Jnamed getRenderingSeedLnet/minecraft/block/AbstractBlock;getRenderingSeed(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;)J
-
appendProperties
- Overrides:
appendPropertiesin classBlock- Mappings:
Namespace Name Mixin selector official aLciw;a(Lcus$a;)Vintermediary method_9515Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)Vnamed appendPropertiesLnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V
-
isWoodenDoor
- Mappings:
Namespace Name Mixin selector official aLcks;a(Lcga;Lgt;)Zintermediary method_24795Lnet/minecraft/class_2323;method_24795(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Znamed isWoodenDoorLnet/minecraft/block/DoorBlock;isWoodenDoor(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
-
isWoodenDoor
- Mappings:
Namespace Name Mixin selector official nLcks;n(Lcur;)Zintermediary method_24796Lnet/minecraft/class_2323;method_24796(Lnet/minecraft/class_2680;)Znamed isWoodenDoorLnet/minecraft/block/DoorBlock;isWoodenDoor(Lnet/minecraft/block/BlockState;)Z
-