Package net.minecraft.world.level.block
Class ChiseledBookShelfBlock
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.ChiseledBookShelfBlock
- All Implemented Interfaces:
FeatureElement
,EntityBlock
,ItemLike
,IBlockExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block
Block.ShapePairKey
Nested 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 int
static final com.mojang.serialization.MapCodec
<ChiseledBookShelfBlock> private static final int
static final List
<BooleanProperty> 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_DROPS
Fields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
descriptionId, drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDER
Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
addBook
(Level pLevel, BlockPos pPos, Player pPlayer, ChiseledBookShelfBlockEntity pBlockEntity, ItemStack pBookStack, int pSlot) protected void
affectNeighborsAfterRemoval
(BlockState p_394006_, ServerLevel p_394108_, BlockPos p_394432_, boolean p_393697_) com.mojang.serialization.MapCodec
<ChiseledBookShelfBlock> codec()
protected void
protected int
getAnalogOutputSignal
(BlockState p_249192_, Level p_252207_, BlockPos p_248999_) Returns the analog signal this block emits.private OptionalInt
getHitSlot
(BlockHitResult pHitReselt, BlockState pState) getRelativeHitCoordinatesForBlockFace
(BlockHitResult pHitResult, Direction pFace) private static int
getSection
(float pX) getStateForPlacement
(BlockPlaceContext p_251318_) protected boolean
hasAnalogOutputSignal
(BlockState p_249302_) mirror
(BlockState p_289000_, Mirror p_288962_) Returns the blockstate with the given mirror of the passed blockstate.newBlockEntity
(BlockPos p_250440_, BlockState p_248729_) private static void
removeBook
(Level pLevel, BlockPos pPos, Player pPlayer, ChiseledBookShelfBlockEntity pBlockEntity, int pSlot) rotate
(BlockState p_288975_, Rotation p_288993_) Returns the blockstate with the given rotation from the passed blockstate.protected InteractionResult
useItemOn
(ItemStack p_316457_, BlockState p_316201_, Level p_316747_, BlockPos p_316462_, Player p_316228_, InteractionHand p_316721_, BlockHitResult p_316464_) protected InteractionResult
useWithoutItem
(BlockState p_316403_, Level p_316842_, BlockPos p_316539_, Player p_316349_, BlockHitResult p_316278_) Methods inherited from class net.minecraft.world.level.block.BaseEntityBlock
createTickerHelper, getMenuProvider, triggerEvent
Methods 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, dropFromExplosion, 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, withPropertiesOf
Methods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, entityInside, getBlockSupportShape, getCloneItemStack, getCollisionShape, getDescriptionId, getDestroyProgress, getDirectSignal, getDrops, getEntityInsideCollisionShape, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getShape, getSignal, getSoundType, getVisualShape, isAir, isCollisionShapeFullBlock, isPathfindable, isRandomlyTicking, isSignalSource, neighborChanged, onExplosionHit, onPlace, onProjectileHit, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, simpleCodec, skipRendering, spawnAfterBreak, tick, updateIndirectNeighbourShapes, updateShape, useShapeForLightOcclusion
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.level.block.EntityBlock
getListener, getTicker
Methods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
Methods 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, 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
-
MAX_BOOKS_IN_STORAGE
private static final int MAX_BOOKS_IN_STORAGE- See Also:
-
BOOKS_PER_ROW
public static final int BOOKS_PER_ROW- See Also:
-
SLOT_OCCUPIED_PROPERTIES
-
-
Constructor Details
-
ChiseledBookShelfBlock
-
-
Method Details
-
codec
- Specified by:
codec
in classBaseEntityBlock
-
useItemOn
protected InteractionResult useItemOn(ItemStack p_316457_, BlockState p_316201_, Level p_316747_, BlockPos p_316462_, Player p_316228_, InteractionHand p_316721_, BlockHitResult p_316464_) - Overrides:
useItemOn
in classBlockBehaviour
-
useWithoutItem
protected InteractionResult useWithoutItem(BlockState p_316403_, Level p_316842_, BlockPos p_316539_, Player p_316349_, BlockHitResult p_316278_) - Overrides:
useWithoutItem
in classBlockBehaviour
-
getHitSlot
-
getRelativeHitCoordinatesForBlockFace
private static Optional<Vec2> getRelativeHitCoordinatesForBlockFace(BlockHitResult pHitResult, Direction pFace) -
getSection
private static int getSection(float pX) -
addBook
private static void addBook(Level pLevel, BlockPos pPos, Player pPlayer, ChiseledBookShelfBlockEntity pBlockEntity, ItemStack pBookStack, int pSlot) -
removeBook
private static void removeBook(Level pLevel, BlockPos pPos, Player pPlayer, ChiseledBookShelfBlockEntity pBlockEntity, int pSlot) -
newBlockEntity
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinition
in classBlock
-
affectNeighborsAfterRemoval
protected void affectNeighborsAfterRemoval(BlockState p_394006_, ServerLevel p_394108_, BlockPos p_394432_, boolean p_393697_) - Overrides:
affectNeighborsAfterRemoval
in classBlockBehaviour
-
getStateForPlacement
- Overrides:
getStateForPlacement
in classBlock
-
rotate
Description copied from class:BlockBehaviour
Returns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
rotate
in classBlockBehaviour
-
mirror
Description copied from class:BlockBehaviour
Returns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
mirror
in classBlockBehaviour
-
hasAnalogOutputSignal
- Overrides:
hasAnalogOutputSignal
in classBlockBehaviour
-
getAnalogOutputSignal
Description copied from class:BlockBehaviour
Returns the analog signal this block emits. This is the signal a comparator can read from it.- Overrides:
getAnalogOutputSignal
in classBlockBehaviour
-