public class TrapdoorBlock extends HorizontalFacingBlock implements Waterloggable
Block.NeighborGroupAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>| Modifier and Type | Field and Description |
|---|---|
protected static VoxelShape |
EAST_SHAPE |
static EnumProperty<BlockHalf> |
HALF |
protected static VoxelShape |
NORTH_SHAPE |
static BooleanProperty |
OPEN |
protected static VoxelShape |
OPEN_BOTTOM_SHAPE |
protected static VoxelShape |
OPEN_TOP_SHAPE |
static BooleanProperty |
POWERED |
protected static VoxelShape |
SOUTH_SHAPE |
static BooleanProperty |
WATERLOGGED |
protected static VoxelShape |
WEST_SHAPE |
FACINGLOGGER, STATE_IDS, stateManagercollidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier| Modifier | Constructor and Description |
|---|---|
protected |
TrapdoorBlock(AbstractBlock.Settings settings) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendProperties(StateManager.Builder<Block,BlockState> builder) |
boolean |
canPathfindThrough(BlockState state,
BlockView world,
BlockPos pos,
NavigationType type) |
FluidState |
getFluidState(BlockState state) |
VoxelShape |
getOutlineShape(BlockState state,
BlockView world,
BlockPos pos,
ShapeContext context) |
BlockState |
getPlacementState(ItemPlacementContext ctx) |
BlockState |
getStateForNeighborUpdate(BlockState state,
Direction direction,
BlockState newState,
WorldAccess world,
BlockPos pos,
BlockPos posFrom) |
void |
neighborUpdate(BlockState state,
World world,
BlockPos pos,
Block block,
BlockPos fromPos,
boolean notify) |
ActionResult |
onUse(BlockState state,
World world,
BlockPos pos,
PlayerEntity player,
Hand hand,
BlockHitResult hit)
Called when this block is used by a player.
|
protected void |
playToggleSound(PlayerEntity player,
World world,
BlockPos pos,
boolean open) |
mirror, rotateaddStacksForDisplay, 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, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringcalcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getLootTableId, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, isSideInvisible, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, prepare, randomTick, scheduledTickclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcanFillWithFluid, tryDrainFluid, tryFillWithFluidpublic static final BooleanProperty OPEN
public static final EnumProperty<BlockHalf> HALF
public static final BooleanProperty POWERED
public static final BooleanProperty WATERLOGGED
protected static final VoxelShape EAST_SHAPE
protected static final VoxelShape WEST_SHAPE
protected static final VoxelShape SOUTH_SHAPE
protected static final VoxelShape NORTH_SHAPE
protected static final VoxelShape OPEN_BOTTOM_SHAPE
protected static final VoxelShape OPEN_TOP_SHAPE
protected TrapdoorBlock(AbstractBlock.Settings settings)
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape in class AbstractBlockpublic boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type)
canPathfindThrough in class AbstractBlockpublic 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 AbstractBlockprotected void playToggleSound(@Nullable PlayerEntity player, World world, BlockPos pos, boolean open)
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)
neighborUpdate in class AbstractBlockpublic BlockState getPlacementState(ItemPlacementContext ctx)
getPlacementState in class Blockprotected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties in class Blockpublic FluidState getFluidState(BlockState state)
getFluidState in class AbstractBlockpublic BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)
getStateForNeighborUpdate in class AbstractBlock