Package net.minecraft.block
Class ChiseledBookshelfBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.BlockWithEntity
net.minecraft.block.ChiseledBookshelfBlock
- All Implemented Interfaces:
BlockEntityProvider,ItemConvertible,ToggleableFeature
- Mappings:
Namespace Name official cqointermediary net/minecraft/class_7714named net/minecraft/block/ChiseledBookshelfBlock
-
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.Offsetter, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate static final intstatic final List<BooleanProperty>Fields inherited from class net.minecraft.block.Block
field_31022, field_31023, field_31024, field_31025, field_31035, FORCE_STATE, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, velocityMultiplierFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendProperties(StateManager.Builder<Block, BlockState> builder) Appends block state properties to this block.createBlockEntity(BlockPos pos, BlockState state) Returns a new block entity instance.private static intgetColumn(float x) intgetComparatorOutput(BlockState state, World world, BlockPos pos) Returns the comparator output of the block, from0to15.getHitPos(BlockHitResult hit, Direction facing) getRenderType(BlockState state) Returns the block's render type (invisible, animated, model).private static intgetSlotForHitPos(Vec2f hitPos) booleanhasComparatorOutput(BlockState state) Returns whether the block can have a comparator output.voidonStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) Called server-side on the old block when the block state is changed.onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.private static voidtryAddBook(World world, BlockPos pos, PlayerEntity player, ChiseledBookshelfBlockEntity blockEntity, ItemStack stack, int slot) private static voidtryRemoveBook(World world, BlockPos pos, PlayerEntity player, ChiseledBookshelfBlockEntity blockEntity, int slot) Methods inherited from class net.minecraft.block.BlockWithEntity
checkType, createScreenHandlerFactory, onSyncedBlockEventMethods inherited from class net.minecraft.block.Block
afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTransparent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, canReplace, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getLootTableId, getMaxHorizontalModelOffset, getOpacity, getOutlineShape, getRaycastShape, getRenderingSeed, getRequiredFeatures, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, prepare, randomTick, rotate, scheduledTickMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.block.BlockEntityProvider
getGameEventListener, getTickerMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
MAX_BOOK_COUNT
private static final int MAX_BOOK_COUNT- See Also:
- Mappings:
Namespace Name Mixin selector official cLcqo;c:Iintermediary field_41309Lnet/minecraft/class_7714;field_41309:Inamed MAX_BOOK_COUNTLnet/minecraft/block/ChiseledBookshelfBlock;MAX_BOOK_COUNT:I
-
BOOK_HEIGHT
public static final int BOOK_HEIGHT- See Also:
- Mappings:
Namespace Name Mixin selector official aLcqo;a:Iintermediary field_41307Lnet/minecraft/class_7714;field_41307:Inamed BOOK_HEIGHTLnet/minecraft/block/ChiseledBookshelfBlock;BOOK_HEIGHT:I
-
SLOT_OCCUPIED_PROPERTIES
- Mappings:
Namespace Name Mixin selector official bLcqo;b:Ljava/util/List;intermediary field_41308Lnet/minecraft/class_7714;field_41308:Ljava/util/List;named SLOT_OCCUPIED_PROPERTIESLnet/minecraft/block/ChiseledBookshelfBlock;SLOT_OCCUPIED_PROPERTIES:Ljava/util/List;
-
-
Constructor Details
-
ChiseledBookshelfBlock
- Mappings:
Namespace Name Mixin selector official <init>Ldbx;<init>(Ldbx$d;)Vintermediary <init>Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)Vnamed <init>Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
-
-
Method Details
-
getRenderType
Returns the block's render type (invisible, animated, model).- Overrides:
getRenderTypein classBlockWithEntity- Returns:
- the block's render type (invisible, animated, model)
- Mappings:
Namespace Name Mixin selector official b_Ldbx;b_(Ldby;)Lcvp;intermediary method_9604Lnet/minecraft/class_4970;method_9604(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2464;named getRenderTypeLnet/minecraft/block/AbstractBlock;getRenderType(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockRenderType;
-
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.
- Mappings:
Namespace Name Mixin selector official aLdbx;a(Ldby;Lcmk;Lgu;Lbym;Lbdv;Ledw;)Lbdw;intermediary method_9534Lnet/minecraft/class_4970;method_9534(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;Lnet/minecraft/class_3965;)Lnet/minecraft/class_1269;named onUseLnet/minecraft/block/AbstractBlock;onUse(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/util/hit/BlockHitResult;)Lnet/minecraft/util/ActionResult;
-
getHitPos
- Mappings:
Namespace Name Mixin selector official aLcqo;a(Ledw;Lha;)Ljava/util/Optional;intermediary method_47579Lnet/minecraft/class_7714;method_47579(Lnet/minecraft/class_3965;Lnet/minecraft/class_2350;)Ljava/util/Optional;named getHitPosLnet/minecraft/block/ChiseledBookshelfBlock;getHitPos(Lnet/minecraft/util/hit/BlockHitResult;Lnet/minecraft/util/math/Direction;)Ljava/util/Optional;
-
getSlotForHitPos
- Mappings:
Namespace Name Mixin selector official aLcqo;a(Ledz;)Iintermediary method_47580Lnet/minecraft/class_7714;method_47580(Lnet/minecraft/class_241;)Inamed getSlotForHitPosLnet/minecraft/block/ChiseledBookshelfBlock;getSlotForHitPos(Lnet/minecraft/util/math/Vec2f;)I
-
getColumn
private static int getColumn(float x) - Mappings:
Namespace Name Mixin selector official aLcqo;a(F)Iintermediary method_47577Lnet/minecraft/class_7714;method_47577(F)Inamed getColumnLnet/minecraft/block/ChiseledBookshelfBlock;getColumn(F)I
-
tryAddBook
private static void tryAddBook(World world, BlockPos pos, PlayerEntity player, ChiseledBookshelfBlockEntity blockEntity, ItemStack stack, int slot) - Mappings:
Namespace Name Mixin selector official aLcqo;a(Lcmk;Lgu;Lbym;Lczt;Lcfx;I)Vintermediary method_45458Lnet/minecraft/class_7714;method_45458(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_7716;Lnet/minecraft/class_1799;I)Vnamed tryAddBookLnet/minecraft/block/ChiseledBookshelfBlock;tryAddBook(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;Lnet/minecraft/item/ItemStack;I)V
-
tryRemoveBook
private static void tryRemoveBook(World world, BlockPos pos, PlayerEntity player, ChiseledBookshelfBlockEntity blockEntity, int slot) - Mappings:
Namespace Name Mixin selector official aLcqo;a(Lcmk;Lgu;Lbym;Lczt;I)Vintermediary method_45457Lnet/minecraft/class_7714;method_45457(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_7716;I)Vnamed tryRemoveBookLnet/minecraft/block/ChiseledBookshelfBlock;tryRemoveBook(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;I)V
-
createBlockEntity
Returns a new block entity instance.For example:
@Override public BlockEntity createBlockEntity(BlockPos pos, BlockState state) { return new MyBlockEntity(pos, state); }- Returns:
- a new block entity instance
- Mappings:
Namespace Name Mixin selector official aLcrz;a(Lgu;Ldby;)Lczk;intermediary method_10123Lnet/minecraft/class_2343;method_10123(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Lnet/minecraft/class_2586;named createBlockEntityLnet/minecraft/block/BlockEntityProvider;createBlockEntity(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/entity/BlockEntity;
-
appendProperties
Appends block state properties to this block. To use this, override and callStateManager.Builder.add(net.minecraft.state.property.Property<?>[])inside the method. SeePropertiesfor the list of pre-defined properties.- Overrides:
appendPropertiesin classBlock- Mappings:
Namespace Name Mixin selector official aLcpl;a(Ldbz$a;)Vintermediary method_9515Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)Vnamed appendPropertiesLnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V
-
onStateReplaced
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) Called server-side on the old block when the block state is changed. This includes block removal. This is used to update neighboring blocks when an active redstone power source is removed, or to drop the contents of an inventory. The checkstate.isOf(newState.getBlock())can be used to see if the block was removed or not.- Overrides:
onStateReplacedin classAbstractBlock- See Also:
- Mappings:
Namespace Name Mixin selector official aLdbx;a(Ldby;Lcmk;Lgu;Ldby;Z)Vintermediary method_9536Lnet/minecraft/class_4970;method_9536(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)Vnamed onStateReplacedLnet/minecraft/block/AbstractBlock;onStateReplaced(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)V
-
getPlacementState
- Overrides:
getPlacementStatein classBlock- Mappings:
Namespace Name Mixin selector official aLcpl;a(Lcif;)Ldby;intermediary method_9605Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;named getPlacementStateLnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;
-
hasComparatorOutput
Returns whether the block can have a comparator output.This does not check the current comparator output of the block. Use
AbstractBlock.getComparatorOutput(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos)in that case.- Overrides:
hasComparatorOutputin classAbstractBlock- Returns:
- whether the block can have a comparator output
- See Also:
- Mappings:
Namespace Name Mixin selector official d_Ldbx;d_(Ldby;)Zintermediary method_9498Lnet/minecraft/class_4970;method_9498(Lnet/minecraft/class_2680;)Znamed hasComparatorOutputLnet/minecraft/block/AbstractBlock;hasComparatorOutput(Lnet/minecraft/block/BlockState;)Z
-
getComparatorOutput
Returns the comparator output of the block, from0to15.When overriding this,
AbstractBlock.hasComparatorOutput(net.minecraft.block.BlockState)must also be overridden.- Overrides:
getComparatorOutputin classAbstractBlock- Returns:
- the comparator output of the block, from
0to15 - See Also:
- Mappings:
Namespace Name Mixin selector official aLdbx;a(Ldby;Lcmk;Lgu;)Iintermediary method_9572Lnet/minecraft/class_4970;method_9572(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Inamed getComparatorOutputLnet/minecraft/block/AbstractBlock;getComparatorOutput(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
-