Class ChiseledBookshelfBlock
- All Implemented Interfaces:
BlockEntityProvider
,ItemConvertible
,ToggleableFeature
- Mappings:
Namespace Name official cyc
intermediary net/minecraft/class_7714
named net/minecraft/block/ChiseledBookshelfBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroup
Nested 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 int
static final com.mojang.serialization.MapCodec<ChiseledBookshelfBlock>
private static final int
static final List<BooleanProperty>
Fields inherited from class net.minecraft.block.Block
field_31023, field_31024, field_31025, field_31035, FORCE_STATE, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_ALL_AND_REDRAW, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, STATE_IDS, stateManager
Fields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, velocityMultiplier
Fields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendProperties
(StateManager.Builder<Block, BlockState> builder) Appends block state properties to this block.createBlockEntity
(BlockPos pos, BlockState state) Returns a new block entity instance.com.mojang.serialization.MapCodec<ChiseledBookshelfBlock>
getCodec()
private static int
getColumn
(float x) int
getComparatorOutput
(BlockState state, World world, BlockPos pos) Returns the comparator output of the block, from0
to15
.getHitPos
(BlockHitResult hit, Direction facing) getRenderType
(BlockState state) Returns the block's render type (invisible, animated, model).private OptionalInt
getSlotForHitPos
(BlockHitResult blockHitResult, BlockState blockState) boolean
hasComparatorOutput
(BlockState state) Returns whether the block can have a comparator output.method_55765
(ItemStack itemStack, BlockState blockState, World world, BlockPos blockPos, PlayerEntity playerEntity, Hand hand, BlockHitResult blockHitResult) method_55766
(BlockState blockState, World world, BlockPos blockPos, PlayerEntity playerEntity, BlockHitResult blockHitResult) mirror
(BlockState state, BlockMirror mirror) Returnsstate
mirrored bymirror
.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.rotate
(BlockState state, BlockRotation rotation) Returnsstate
rotated byrotation
.private static void
tryAddBook
(World world, BlockPos pos, PlayerEntity player, ChiseledBookshelfBlockEntity blockEntity, ItemStack stack, int slot) private static void
tryRemoveBook
(World world, BlockPos pos, PlayerEntity player, ChiseledBookshelfBlockEntity blockEntity, int slot) Methods inherited from class net.minecraft.block.BlockWithEntity
createScreenHandlerFactory, onSyncedBlockEvent, validateTicker
Methods 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, toString
Methods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, canReplace, createCodec, createSettingsCodec, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getLootTableId, getMaxHorizontalModelOffset, getOpacity, getOutlineShape, getRaycastShape, getRenderingSeed, getRequiredFeatures, getSettings, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onExploded, onProjectileHit, onStacksDropped, prepare, randomTick, scheduledTick
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.block.BlockEntityProvider
getGameEventListener, getTicker
Methods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector official a
Lcyc;a:Lcom/mojang/serialization/MapCodec;
intermediary field_46312
Lnet/minecraft/class_7714;field_46312:Lcom/mojang/serialization/MapCodec;
named CODEC
Lnet/minecraft/block/ChiseledBookshelfBlock;CODEC:Lcom/mojang/serialization/MapCodec;
-
MAX_BOOK_COUNT
private static final int MAX_BOOK_COUNT- See Also:
- Mappings:
Namespace Name Mixin selector official d
Lcyc;d:I
intermediary field_41309
Lnet/minecraft/class_7714;field_41309:I
named MAX_BOOK_COUNT
Lnet/minecraft/block/ChiseledBookshelfBlock;MAX_BOOK_COUNT:I
-
BOOK_HEIGHT
public static final int BOOK_HEIGHT- See Also:
- Mappings:
Namespace Name Mixin selector official b
Lcyc;b:I
intermediary field_41307
Lnet/minecraft/class_7714;field_41307:I
named BOOK_HEIGHT
Lnet/minecraft/block/ChiseledBookshelfBlock;BOOK_HEIGHT:I
-
SLOT_OCCUPIED_PROPERTIES
- Mappings:
Namespace Name Mixin selector official c
Lcyc;c:Ljava/util/List;
intermediary field_41308
Lnet/minecraft/class_7714;field_41308:Ljava/util/List;
named SLOT_OCCUPIED_PROPERTIES
Lnet/minecraft/block/ChiseledBookshelfBlock;SLOT_OCCUPIED_PROPERTIES:Ljava/util/List;
-
-
Constructor Details
-
ChiseledBookshelfBlock
- Mappings:
Namespace Name Mixin selector official <init>
Ldjo;<init>(Ldjo$d;)V
intermediary <init>
Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)V
named <init>
Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
-
-
Method Details
-
getCodec
- Specified by:
getCodec
in classBlockWithEntity
- Mappings:
Namespace Name Mixin selector official a
Ldjo;a()Lcom/mojang/serialization/MapCodec;
intermediary method_53969
Lnet/minecraft/class_4970;method_53969()Lcom/mojang/serialization/MapCodec;
named getCodec
Lnet/minecraft/block/AbstractBlock;getCodec()Lcom/mojang/serialization/MapCodec;
-
getRenderType
Returns the block's render type (invisible, animated, model).- Overrides:
getRenderType
in classBlockWithEntity
- Returns:
- the block's render type (invisible, animated, model)
- Mappings:
Namespace Name Mixin selector official b_
Ldjo;b_(Ldjp;)Lddd;
intermediary method_9604
Lnet/minecraft/class_4970;method_9604(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2464;
named getRenderType
Lnet/minecraft/block/AbstractBlock;getRenderType(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockRenderType;
-
method_55765
public class_9062 method_55765(ItemStack itemStack, BlockState blockState, World world, BlockPos blockPos, PlayerEntity playerEntity, Hand hand, BlockHitResult blockHitResult) - Overrides:
method_55765
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Ldjo;a(Lcng;Ldjp;Lctx;Lhx;Lcfq;Lbkb;Lely;)Lbke;
intermediary method_55765
Lnet/minecraft/class_4970;method_55765(Lnet/minecraft/class_1799;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_9062;
named method_55765
Lnet/minecraft/block/AbstractBlock;method_55765(Lnet/minecraft/item/ItemStack;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/class_9062;
-
method_55766
public ActionResult method_55766(BlockState blockState, World world, BlockPos blockPos, PlayerEntity playerEntity, BlockHitResult blockHitResult) - Overrides:
method_55766
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Ldjo;a(Ldjp;Lctx;Lhx;Lcfq;Lely;)Lbkc;
intermediary method_55766
Lnet/minecraft/class_4970;method_55766(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_3965;)Lnet/minecraft/class_1269;
named method_55766
Lnet/minecraft/block/AbstractBlock;method_55766(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/hit/BlockHitResult;)Lnet/minecraft/util/ActionResult;
-
getSlotForHitPos
- Mappings:
Namespace Name Mixin selector official a
Lcyc;a(Lely;Ldjp;)Ljava/util/OptionalInt;
intermediary method_47580
Lnet/minecraft/class_7714;method_47580(Lnet/minecraft/class_3965;Lnet/minecraft/class_2680;)Ljava/util/OptionalInt;
named getSlotForHitPos
Lnet/minecraft/block/ChiseledBookshelfBlock;getSlotForHitPos(Lnet/minecraft/util/hit/BlockHitResult;Lnet/minecraft/block/BlockState;)Ljava/util/OptionalInt;
-
getHitPos
- Mappings:
Namespace Name Mixin selector official a
Lcyc;a(Lely;Lic;)Ljava/util/Optional;
intermediary method_47579
Lnet/minecraft/class_7714;method_47579(Lnet/minecraft/class_3965;Lnet/minecraft/class_2350;)Ljava/util/Optional;
named getHitPos
Lnet/minecraft/block/ChiseledBookshelfBlock;getHitPos(Lnet/minecraft/util/hit/BlockHitResult;Lnet/minecraft/util/math/Direction;)Ljava/util/Optional;
-
getColumn
private static int getColumn(float x) - Mappings:
Namespace Name Mixin selector official a
Lcyc;a(F)I
intermediary method_47577
Lnet/minecraft/class_7714;method_47577(F)I
named getColumn
Lnet/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 a
Lcyc;a(Lctx;Lhx;Lcfq;Ldhm;Lcng;I)V
intermediary method_45458
Lnet/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)V
named tryAddBook
Lnet/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 a
Lcyc;a(Lctx;Lhx;Lcfq;Ldhm;I)V
intermediary method_45457
Lnet/minecraft/class_7714;method_45457(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_7716;I)V
named tryRemoveBook
Lnet/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 a
Lczq;a(Lhx;Ldjp;)Ldhd;
intermediary method_10123
Lnet/minecraft/class_2343;method_10123(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Lnet/minecraft/class_2586;
named createBlockEntity
Lnet/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. SeeProperties
for the list of pre-defined properties.- Overrides:
appendProperties
in classBlock
- Mappings:
Namespace Name Mixin selector official a
Lcwy;a(Ldjq$a;)V
intermediary method_9515
Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)V
named appendProperties
Lnet/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.For most block entities,
ItemScatterer.onStateReplaced(net.minecraft.block.BlockState, net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos)
provides a good implementation of this method. Make sure to callsuper.onStateReplaced(state, world, pos, newState, moved);
after invokingItemScatterer
methods.- Overrides:
onStateReplaced
in classAbstractBlock
- See Also:
- Mappings:
Namespace Name Mixin selector official a
Ldjo;a(Ldjp;Lctx;Lhx;Ldjp;Z)V
intermediary method_9536
Lnet/minecraft/class_4970;method_9536(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)V
named onStateReplaced
Lnet/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:
getPlacementState
in classBlock
- Mappings:
Namespace Name Mixin selector official a
Lcwy;a(Lcpp;)Ldjp;
intermediary method_9605
Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;
named getPlacementState
Lnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;
-
rotate
Returnsstate
rotated byrotation
.By default, this returns the provided block state.
- Overrides:
rotate
in classAbstractBlock
- Returns:
state
rotated byrotation
- Mappings:
Namespace Name Mixin selector official a
Ldjo;a(Ldjp;Lddk;)Ldjp;
intermediary method_9598
Lnet/minecraft/class_4970;method_9598(Lnet/minecraft/class_2680;Lnet/minecraft/class_2470;)Lnet/minecraft/class_2680;
named rotate
Lnet/minecraft/block/AbstractBlock;rotate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockRotation;)Lnet/minecraft/block/BlockState;
-
mirror
Returnsstate
mirrored bymirror
.By default, this returns the provided block state.
- Overrides:
mirror
in classAbstractBlock
- Returns:
state
mirrored bymirror
- Mappings:
Namespace Name Mixin selector official a
Ldjo;a(Ldjp;Ldbu;)Ldjp;
intermediary method_9569
Lnet/minecraft/class_4970;method_9569(Lnet/minecraft/class_2680;Lnet/minecraft/class_2415;)Lnet/minecraft/class_2680;
named mirror
Lnet/minecraft/block/AbstractBlock;mirror(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockMirror;)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:
hasComparatorOutput
in classAbstractBlock
- Returns:
- whether the block can have a comparator output
- See Also:
- Mappings:
Namespace Name Mixin selector official d_
Ldjo;d_(Ldjp;)Z
intermediary method_9498
Lnet/minecraft/class_4970;method_9498(Lnet/minecraft/class_2680;)Z
named hasComparatorOutput
Lnet/minecraft/block/AbstractBlock;hasComparatorOutput(Lnet/minecraft/block/BlockState;)Z
-
getComparatorOutput
Returns the comparator output of the block, from0
to15
.When overriding this,
AbstractBlock.hasComparatorOutput(net.minecraft.block.BlockState)
must also be overridden.- Overrides:
getComparatorOutput
in classAbstractBlock
- Returns:
- the comparator output of the block, from
0
to15
- See Also:
- Mappings:
Namespace Name Mixin selector official a
Ldjo;a(Ldjp;Lctx;Lhx;)I
intermediary method_9572
Lnet/minecraft/class_4970;method_9572(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)I
named getComparatorOutput
Lnet/minecraft/block/AbstractBlock;getComparatorOutput(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
-