Class ChiseledBookshelfBlock

All Implemented Interfaces:
BlockEntityProvider, ItemConvertible, ToggleableFeature

public class ChiseledBookshelfBlock extends BlockWithEntity
Mappings:
Namespace Name
named net/minecraft/block/ChiseledBookshelfBlock
intermediary net/minecraft/class_7714
official dot
  • Field Details Link icon

    • CODEC Link icon

      public static final com.mojang.serialization.MapCodec<ChiseledBookshelfBlock> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/block/ChiseledBookshelfBlock;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_46312 Lnet/minecraft/class_7714;field_46312:Lcom/mojang/serialization/MapCodec;
      official a Ldot;a:Lcom/mojang/serialization/MapCodec;
    • MAX_BOOK_COUNT Link icon

      private static final int MAX_BOOK_COUNT
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_BOOK_COUNT Lnet/minecraft/block/ChiseledBookshelfBlock;MAX_BOOK_COUNT:I
      intermediary field_41309 Lnet/minecraft/class_7714;field_41309:I
      official d Ldot;d:I
    • BOOK_HEIGHT Link icon

      public static final int BOOK_HEIGHT
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named BOOK_HEIGHT Lnet/minecraft/block/ChiseledBookshelfBlock;BOOK_HEIGHT:I
      intermediary field_41307 Lnet/minecraft/class_7714;field_41307:I
      official b Ldot;b:I
    • SLOT_OCCUPIED_PROPERTIES Link icon

      public static final List<BooleanProperty> SLOT_OCCUPIED_PROPERTIES
      Mappings:
      Namespace Name Mixin selector
      named SLOT_OCCUPIED_PROPERTIES Lnet/minecraft/block/ChiseledBookshelfBlock;SLOT_OCCUPIED_PROPERTIES:Ljava/util/List;
      intermediary field_41308 Lnet/minecraft/class_7714;field_41308:Ljava/util/List;
      official c Ldot;c:Ljava/util/List;
  • Constructor Details Link icon

    • ChiseledBookshelfBlock Link icon

      public ChiseledBookshelfBlock(AbstractBlock.Settings settings)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
      intermediary <init> Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)V
      official <init> Lebp;<init>(Lebp$d;)V
  • Method Details Link icon

    • getCodec Link icon

      public com.mojang.serialization.MapCodec<ChiseledBookshelfBlock> getCodec()
      Specified by:
      getCodec in class BlockWithEntity
      Mappings:
      Namespace Name Mixin selector
      named getCodec Lnet/minecraft/block/AbstractBlock;getCodec()Lcom/mojang/serialization/MapCodec;
      intermediary method_53969 Lnet/minecraft/class_4970;method_53969()Lcom/mojang/serialization/MapCodec;
      official a Lebp;a()Lcom/mojang/serialization/MapCodec;
    • onUseWithItem Link icon

      protected ActionResult onUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)
      Overrides:
      onUseWithItem in class AbstractBlock
      Mappings:
      Namespace Name Mixin selector
      named onUseWithItem Lnet/minecraft/block/AbstractBlock;onUseWithItem(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/util/ActionResult;
      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_1269;
      official a Lebp;a(Ldak;Lebq;Ldkj;Liw;Lcsi;Lbvb;Lffy;)Lbvc;
    • onUse Link icon

      protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit)
      Overrides:
      onUse in class AbstractBlock
      Mappings:
      Namespace Name Mixin selector
      named onUse Lnet/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/hit/BlockHitResult;)Lnet/minecraft/util/ActionResult;
      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;
      official a Lebp;a(Lebq;Ldkj;Liw;Lcsi;Lffy;)Lbvc;
    • getSlotForHitPos Link icon

      private OptionalInt getSlotForHitPos(BlockHitResult hit, BlockState state)
      Mappings:
      Namespace Name Mixin selector
      named getSlotForHitPos Lnet/minecraft/block/ChiseledBookshelfBlock;getSlotForHitPos(Lnet/minecraft/util/hit/BlockHitResult;Lnet/minecraft/block/BlockState;)Ljava/util/OptionalInt;
      intermediary method_47580 Lnet/minecraft/class_7714;method_47580(Lnet/minecraft/class_3965;Lnet/minecraft/class_2680;)Ljava/util/OptionalInt;
      official a Ldot;a(Lffy;Lebq;)Ljava/util/OptionalInt;
    • getHitPos Link icon

      private static Optional<Vec2f> getHitPos(BlockHitResult hit, Direction facing)
      Mappings:
      Namespace Name Mixin selector
      named getHitPos Lnet/minecraft/block/ChiseledBookshelfBlock;getHitPos(Lnet/minecraft/util/hit/BlockHitResult;Lnet/minecraft/util/math/Direction;)Ljava/util/Optional;
      intermediary method_47579 Lnet/minecraft/class_7714;method_47579(Lnet/minecraft/class_3965;Lnet/minecraft/class_2350;)Ljava/util/Optional;
      official a Ldot;a(Lffy;Ljc;)Ljava/util/Optional;
    • getColumn Link icon

      private static int getColumn(float x)
      Mappings:
      Namespace Name Mixin selector
      named getColumn Lnet/minecraft/block/ChiseledBookshelfBlock;getColumn(F)I
      intermediary method_47577 Lnet/minecraft/class_7714;method_47577(F)I
      official a Ldot;a(F)I
    • tryAddBook Link icon

      private static void tryAddBook(World world, BlockPos pos, PlayerEntity player, ChiseledBookshelfBlockEntity blockEntity, ItemStack stack, int slot)
      Mappings:
      Namespace Name Mixin selector
      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
      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
      official a Ldot;a(Ldkj;Liw;Lcsi;Ldyy;Ldak;I)V
    • tryRemoveBook Link icon

      private static void tryRemoveBook(World world, BlockPos pos, PlayerEntity player, ChiseledBookshelfBlockEntity blockEntity, int slot)
      Mappings:
      Namespace Name Mixin selector
      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
      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
      official a Ldot;a(Ldkj;Liw;Lcsi;Ldyy;I)V
    • createBlockEntity Link icon

      @Nullable public @Nullable BlockEntity createBlockEntity(BlockPos pos, BlockState state)
      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
      Implementation Note:
      While this is marked as nullable, in practice this should never return null. PistonExtensionBlock is the only block in vanilla that returns null inside the implementation.
      Mappings:
      Namespace Name Mixin selector
      named createBlockEntity Lnet/minecraft/block/BlockEntityProvider;createBlockEntity(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/entity/BlockEntity;
      intermediary method_10123 Lnet/minecraft/class_2343;method_10123(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Lnet/minecraft/class_2586;
      official a Ldqi;a(Liw;Lebq;)Ldyo;
    • appendProperties Link icon

      protected void appendProperties(StateManager.Builder<Block,BlockState> builder)
      Appends block state properties to this block. To use this, override and call StateManager.Builder.add(net.minecraft.state.property.Property<?>[]) inside the method. See Properties for the list of pre-defined properties.
      Overrides:
      appendProperties in class Block
      Mappings:
      Namespace Name Mixin selector
      named appendProperties Lnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V
      intermediary method_9515 Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)V
      official a Ldno;a(Lebr$a;)V
    • onStateReplaced Link icon

      protected void onStateReplaced(BlockState state, ServerWorld world, BlockPos pos, boolean moved)
      Overrides:
      onStateReplaced in class AbstractBlock
      Mappings:
      Namespace Name Mixin selector
      named onStateReplaced Lnet/minecraft/block/AbstractBlock;onStateReplaced(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Z)V
      intermediary method_66388 Lnet/minecraft/class_4970;method_66388(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Z)V
      official a Lebp;a(Lebq;Lasb;Liw;Z)V
    • getPlacementState Link icon

      public BlockState getPlacementState(ItemPlacementContext ctx)
      Overrides:
      getPlacementState in class Block
      Mappings:
      Namespace Name Mixin selector
      named getPlacementState Lnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;
      intermediary method_9605 Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;
      official a Ldno;a(Lded;)Lebq;
    • rotate Link icon

      public BlockState rotate(BlockState state, BlockRotation rotation)
      Returns state rotated by rotation.

      By default, this returns the provided block state.

      Overrides:
      rotate in class AbstractBlock
      Returns:
      state rotated by rotation
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named rotate Lnet/minecraft/block/AbstractBlock;rotate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockRotation;)Lnet/minecraft/block/BlockState;
      intermediary method_9598 Lnet/minecraft/class_4970;method_9598(Lnet/minecraft/class_2680;Lnet/minecraft/class_2470;)Lnet/minecraft/class_2680;
      official a Lebp;a(Lebq;Ldui;)Lebq;
    • mirror Link icon

      public BlockState mirror(BlockState state, BlockMirror mirror)
      Returns state mirrored by mirror.

      By default, this returns the provided block state.

      Overrides:
      mirror in class AbstractBlock
      Returns:
      state mirrored by mirror
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named mirror Lnet/minecraft/block/AbstractBlock;mirror(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockMirror;)Lnet/minecraft/block/BlockState;
      intermediary method_9569 Lnet/minecraft/class_4970;method_9569(Lnet/minecraft/class_2680;Lnet/minecraft/class_2415;)Lnet/minecraft/class_2680;
      official a Lebp;a(Lebq;Ldsr;)Lebq;
    • hasComparatorOutput Link icon

      protected boolean hasComparatorOutput(BlockState state)
      Returns whether the block can have a comparator output.

      This does not check the current comparator output of the block. Use getComparatorOutput(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos) in that case.

      Overrides:
      hasComparatorOutput in class AbstractBlock
      Returns:
      whether the block can have a comparator output
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named hasComparatorOutput Lnet/minecraft/block/AbstractBlock;hasComparatorOutput(Lnet/minecraft/block/BlockState;)Z
      intermediary method_9498 Lnet/minecraft/class_4970;method_9498(Lnet/minecraft/class_2680;)Z
      official c_ Lebp;c_(Lebq;)Z
    • getComparatorOutput Link icon

      protected int getComparatorOutput(BlockState state, World world, BlockPos pos)
      Returns the comparator output of the block, from 0 to 15.

      When overriding this, hasComparatorOutput(net.minecraft.block.BlockState) must also be overridden.

      Overrides:
      getComparatorOutput in class AbstractBlock
      Returns:
      the comparator output of the block, from 0 to 15
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named getComparatorOutput Lnet/minecraft/block/AbstractBlock;getComparatorOutput(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
      intermediary method_9572 Lnet/minecraft/class_4970;method_9572(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)I
      official a Lebp;a(Lebq;Ldkj;Liw;)I