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
public class DoorBlock extends Block
-
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
Fields Modifier and Type Field Description protected static VoxelShapeEAST_SHAPEstatic DirectionPropertyFACINGstatic EnumProperty<DoubleBlockHalf>HALFstatic EnumProperty<DoorHinge>HINGEprotected static VoxelShapeNORTH_SHAPEstatic BooleanPropertyOPENstatic BooleanPropertyPOWEREDprotected static VoxelShapeSOUTH_SHAPEprotected static VoxelShapeWEST_SHAPEFields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier -
Constructor Summary
Constructors Modifier Constructor Description protectedDoorBlock(AbstractBlock.Settings settings) -
Method Summary
Methods inherited from class net.minecraft.block.Block
addStacksForDisplay, afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTranslucent, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getLootTableId, getMaxModelOffset, getOffsetType, getOpacity, getRaycastShape, getRenderType, getSidesShape, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isSideInvisible, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, prepare, randomTick, scheduledTick
-
Field Details
-
FACING
-
OPEN
-
HINGE
-
POWERED
-
HALF
-
NORTH_SHAPE
-
SOUTH_SHAPE
-
EAST_SHAPE
-
WEST_SHAPE
-
-
Constructor Details
-
DoorBlock
-
-
Method Details
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getOutlineShapein classAbstractBlock
-
getStateForNeighborUpdate
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)- Overrides:
getStateForNeighborUpdatein classAbstractBlock
-
onBreak
-
getOpenSoundEventId
private int getOpenSoundEventId() -
getCloseSoundEventId
private int getCloseSoundEventId() -
getPlacementState
- Overrides:
getPlacementStatein classBlock
-
onPlaced
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) -
getHinge
-
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.
-
isOpen
-
setOpen
public void setOpen(@Nullable Entity entity, World world, BlockState state, BlockPos pos, boolean open) -
neighborUpdate
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)- Overrides:
neighborUpdatein classAbstractBlock
-
canPlaceAt
- Overrides:
canPlaceAtin classAbstractBlock
-
playOpenCloseSound
-
getPistonBehavior
- Overrides:
getPistonBehaviorin classAbstractBlock
-
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
-
mirror
- Overrides:
mirrorin classAbstractBlock
-
getRenderingSeed
- Overrides:
getRenderingSeedin classAbstractBlock
-
appendProperties
- Overrides:
appendPropertiesin classBlock
-
isWoodenDoor
-
isWoodenDoor
-