public class DoorBlock extends Block
Block.NeighborGroupAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>| Modifier and Type | Field and Description |
|---|---|
protected static VoxelShape |
EAST_SHAPE |
static DirectionProperty |
FACING |
static EnumProperty<DoubleBlockHalf> |
HALF |
static EnumProperty<DoorHinge> |
HINGE |
protected static VoxelShape |
NORTH_SHAPE |
static BooleanProperty |
OPEN |
static BooleanProperty |
POWERED |
protected static VoxelShape |
SOUTH_SHAPE |
protected static VoxelShape |
WEST_SHAPE |
LOGGER, STATE_IDS, stateManagercollidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier| Modifier | Constructor and Description |
|---|---|
protected |
DoorBlock(AbstractBlock.Settings settings) |
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, is, isFaceFullSquare, isIn, isShapeFullCube, isTranslucent, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringcalcBlockBreakingDelta, canBucketPlace, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getRaycastShape, getRenderType, getSidesShape, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, isSideInvisible, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, prepare, randomTick, scheduledTickpublic static final DirectionProperty FACING
public static final BooleanProperty OPEN
public static final EnumProperty<DoorHinge> HINGE
public static final BooleanProperty POWERED
public static final EnumProperty<DoubleBlockHalf> HALF
protected static final VoxelShape NORTH_SHAPE
protected static final VoxelShape SOUTH_SHAPE
protected static final VoxelShape EAST_SHAPE
protected static final VoxelShape WEST_SHAPE
protected DoorBlock(AbstractBlock.Settings settings)
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape in class AbstractBlockpublic BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)
getStateForNeighborUpdate in class AbstractBlockpublic void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player)
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type)
canPathfindThrough in class AbstractBlockprivate int getOpenSoundEventId()
private int getCloseSoundEventId()
@Nullable public BlockState getPlacementState(ItemPlacementContext ctx)
getPlacementState in class Blockpublic void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack)
private DoorHinge getHinge(ItemPlacementContext ctx)
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)
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.
onUse in class AbstractBlockpublic boolean method_30841(BlockState blockState)
public void setOpen(World world, BlockState blockState, BlockPos blockPos, boolean bool)
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)
neighborUpdate in class AbstractBlockpublic boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos)
canPlaceAt in class AbstractBlockpublic PistonBehavior getPistonBehavior(BlockState state)
getPistonBehavior in class AbstractBlockpublic BlockState rotate(BlockState state, BlockRotation rotation)
By default, this returns the provided block state.
rotate in class AbstractBlockpublic BlockState mirror(BlockState state, BlockMirror mirror)
mirror in class AbstractBlock@Environment(value=CLIENT) public long getRenderingSeed(BlockState state, BlockPos pos)
getRenderingSeed in class AbstractBlockprotected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties in class Blockpublic static boolean isWoodenDoor(BlockState state)