Package net.minecraft.world.level.block
Class LecternBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.BaseEntityBlock
net.minecraft.world.level.block.LecternBlock
- All Implemented Interfaces:
FeatureElement,EntityBlock,ItemLike,IBlockExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block
Block.ShapePairKeyNested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<LecternBlock> static final EnumProperty<Direction> static final BooleanPropertyprivate static final intstatic final BooleanPropertyprivate static final VoxelShapeprivate static final Map<Direction, VoxelShape> Fields inherited from class net.minecraft.world.level.block.Block
BLOCK_STATE_REGISTRY, INDESTRUCTIBLE, INSTANT, stateDefinition, UPDATE_ALL, UPDATE_ALL_IMMEDIATE, UPDATE_CLIENTS, UPDATE_IMMEDIATE, UPDATE_INVISIBLE, UPDATE_KNOWN_SHAPE, UPDATE_LIMIT, UPDATE_MOVE_BY_PISTON, UPDATE_NEIGHBORS, UPDATE_NONE, UPDATE_SKIP_ALL_SIDEEFFECTS, UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS, UPDATE_SKIP_ON_PLACE, UPDATE_SKIP_SHAPE_UPDATE_ON_WIRE, UPDATE_SUPPRESS_DROPSFields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
descriptionId, drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaffectNeighborsAfterRemoval(BlockState p_394224_, ServerLevel p_394158_, BlockPos p_393759_, boolean p_393736_) private static voidchangePowered(Level pLevel, BlockPos pPos, BlockState pState, boolean pPowered) com.mojang.serialization.MapCodec<LecternBlock> codec()protected voidprotected intgetAnalogOutputSignal(BlockState p_54520_, Level p_54521_, BlockPos p_54522_, Direction p_433198_) protected VoxelShapegetCollisionShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) protected intgetDirectSignal(BlockState pBlockState, BlockGetter pBlockAccess, BlockPos pPos, Direction pSide) Returns the direct signal this block emits in the given direction.protected MenuProvidergetMenuProvider(BlockState pState, Level pLevel, BlockPos pPos) protected VoxelShapegetOcclusionShape(BlockState p_54584_) protected VoxelShapegetShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) protected intgetSignal(BlockState pBlockState, BlockGetter pBlockAccess, BlockPos pPos, Direction pSide) Returns the signal this block emits in the given direction.getStateForPlacement(BlockPlaceContext pContext) protected booleanhasAnalogOutputSignal(BlockState pState) protected booleanisPathfindable(BlockState p_54510_, PathComputationType p_54513_) protected booleanisSignalSource(BlockState pState) Returns whether this block is capable of emitting redstone signals.protected BlockStatemirror(BlockState pState, Mirror pMirror) Returns the blockstate with the given mirror of the passed blockstate.newBlockEntity(BlockPos p_153573_, BlockState p_153574_) private voidopenScreen(Level pLevel, BlockPos pPos, Player pPlayer) private static voidplaceBook(LivingEntity pEntity, Level pLevel, BlockPos pPos, BlockState pState, ItemStack pStack) static voidresetBookState(Entity pEntity, Level pLevel, BlockPos pPos, BlockState pState, boolean pHasBook) protected BlockStaterotate(BlockState pState, Rotation pRotation) Returns the blockstate with the given rotation from the passed blockstate.static voidsignalPageChange(Level pLevel, BlockPos pPos, BlockState pState) protected voidtick(BlockState p_221388_, ServerLevel p_221389_, BlockPos p_221390_, RandomSource p_221391_) static booleantryPlaceBook(LivingEntity pEntity, Level pLevel, BlockPos pPos, BlockState pState, ItemStack pStack) private static voidupdateBelow(Level pLevel, BlockPos pPos, BlockState pState) protected InteractionResultuseItemOn(ItemStack p_316392_, BlockState p_316600_, Level p_316640_, BlockPos p_316673_, Player p_316670_, InteractionHand p_316384_, BlockHitResult p_316419_) protected booleanuseShapeForLightOcclusion(BlockState pState) protected InteractionResultuseWithoutItem(BlockState p_316164_, Level p_316515_, BlockPos p_316598_, Player p_316584_, BlockHitResult p_316197_) Methods inherited from class net.minecraft.world.level.block.BaseEntityBlock
createTickerHelper, triggerEventMethods inherited from class net.minecraft.world.level.block.Block
animateTick, asBlock, asItem, box, boxes, boxZ, boxZ, boxZ, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, column, column, cube, cube, defaultBlockState, destroy, dropFromBlockInteractLootTable, dropFromExplosion, dropFromLootTable, dropResources, dropResources, dropResources, fallOn, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getShapeForEachState, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityMovementAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOfMethods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, entityInside, getBlockSupportShape, getCloneItemStack, getDescriptionId, getDestroyProgress, getDrops, getEntityInsideCollisionShape, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getRenderShape, getSeed, getShadeBrightness, getSoundType, getVisualShape, isAir, isCollisionShapeFullBlock, isRandomlyTicking, neighborChanged, onExplosionHit, onPlace, onProjectileHit, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, shouldChangedStateKeepBlockEntity, simpleCodec, skipRendering, spawnAfterBreak, updateIndirectNeighbourShapes, updateShapeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.block.EntityBlock
getListener, getTickerMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockExtension
addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, canSustainPlant, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getBubbleColumnDirection, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasDynamicLightEmission, hidesNeighborFace, ignitedByLava, isBed, isBurning, isConduitFrame, isEmpty, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onDestroyedByPushReaction, onNeighborChange, onTreeGrow, playFallSound, playStepSound, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHiding
-
Field Details
-
CODEC
-
FACING
-
POWERED
-
HAS_BOOK
-
SHAPE_COLLISION
-
SHAPES
-
PAGE_CHANGE_IMPULSE_TICKS
private static final int PAGE_CHANGE_IMPULSE_TICKS- See Also:
-
-
Constructor Details
-
LecternBlock
-
-
Method Details
-
codec
- Specified by:
codecin classBaseEntityBlock
-
getOcclusionShape
- Overrides:
getOcclusionShapein classBlockBehaviour
-
useShapeForLightOcclusion
- Overrides:
useShapeForLightOcclusionin classBlockBehaviour
-
getStateForPlacement
- Overrides:
getStateForPlacementin classBlock
-
getCollisionShape
protected VoxelShape getCollisionShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) - Overrides:
getCollisionShapein classBlockBehaviour
-
getShape
protected VoxelShape getShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) - Overrides:
getShapein classBlockBehaviour
-
rotate
Description copied from class:BlockBehaviourReturns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
rotatein classBlockBehaviour
-
mirror
Description copied from class:BlockBehaviourReturns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
mirrorin classBlockBehaviour
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinitionin classBlock
-
newBlockEntity
-
tryPlaceBook
public static boolean tryPlaceBook(@Nullable LivingEntity pEntity, Level pLevel, BlockPos pPos, BlockState pState, ItemStack pStack) -
placeBook
private static void placeBook(@Nullable LivingEntity pEntity, Level pLevel, BlockPos pPos, BlockState pState, ItemStack pStack) -
resetBookState
public static void resetBookState(@Nullable Entity pEntity, Level pLevel, BlockPos pPos, BlockState pState, boolean pHasBook) -
signalPageChange
-
changePowered
-
updateBelow
-
tick
protected void tick(BlockState p_221388_, ServerLevel p_221389_, BlockPos p_221390_, RandomSource p_221391_) - Overrides:
tickin classBlockBehaviour
-
affectNeighborsAfterRemoval
protected void affectNeighborsAfterRemoval(BlockState p_394224_, ServerLevel p_394158_, BlockPos p_393759_, boolean p_393736_) - Overrides:
affectNeighborsAfterRemovalin classBlockBehaviour
-
isSignalSource
Description copied from class:BlockBehaviourReturns whether this block is capable of emitting redstone signals.- Overrides:
isSignalSourcein classBlockBehaviour
-
getSignal
protected int getSignal(BlockState pBlockState, BlockGetter pBlockAccess, BlockPos pPos, Direction pSide) Description copied from class:BlockBehaviourReturns the signal this block emits in the given direction.NOTE: directions in redstone signal related methods are backwards, so this method checks for the signal emitted in the opposite direction of the one given.
- Overrides:
getSignalin classBlockBehaviour
-
getDirectSignal
protected int getDirectSignal(BlockState pBlockState, BlockGetter pBlockAccess, BlockPos pPos, Direction pSide) Description copied from class:BlockBehaviourReturns the direct signal this block emits in the given direction.NOTE: directions in redstone signal related methods are backwards, so this method checks for the signal emitted in the opposite direction of the one given.
- Overrides:
getDirectSignalin classBlockBehaviour
-
hasAnalogOutputSignal
- Overrides:
hasAnalogOutputSignalin classBlockBehaviour
-
getAnalogOutputSignal
protected int getAnalogOutputSignal(BlockState p_54520_, Level p_54521_, BlockPos p_54522_, Direction p_433198_) - Overrides:
getAnalogOutputSignalin classBlockBehaviour
-
useItemOn
protected InteractionResult useItemOn(ItemStack p_316392_, BlockState p_316600_, Level p_316640_, BlockPos p_316673_, Player p_316670_, InteractionHand p_316384_, BlockHitResult p_316419_) - Overrides:
useItemOnin classBlockBehaviour
-
useWithoutItem
protected InteractionResult useWithoutItem(BlockState p_316164_, Level p_316515_, BlockPos p_316598_, Player p_316584_, BlockHitResult p_316197_) - Overrides:
useWithoutItemin classBlockBehaviour
-
getMenuProvider
- Overrides:
getMenuProviderin classBaseEntityBlock
-
openScreen
-
isPathfindable
- Overrides:
isPathfindablein classBlockBehaviour
-