Class ChiseledBookshelfBlock

All Implemented Interfaces:
BlockEntityProvider, InteractibleSlotContainer, ItemConvertible, ToggleableFeature

public class ChiseledBookshelfBlock extends BlockWithEntity implements InteractibleSlotContainer
Mappings:
Namespace Name
named net/minecraft/block/ChiseledBookshelfBlock
intermediary net/minecraft/class_7714
official dwa
  • Field Details

    • CODEC

      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 Ldwa;a:Lcom/mojang/serialization/MapCodec;
    • FACING

      public static final EnumProperty<Direction> FACING
      Mappings:
      Namespace Name Mixin selector
      named FACING Lnet/minecraft/block/ChiseledBookshelfBlock;FACING:Lnet/minecraft/state/property/EnumProperty;
      intermediary field_61990 Lnet/minecraft/class_7714;field_61990:Lnet/minecraft/class_2754;
      official b Ldwa;b:Lekk;
    • SLOT_0_OCCUPIED

      public static final BooleanProperty SLOT_0_OCCUPIED
      Mappings:
      Namespace Name Mixin selector
      named SLOT_0_OCCUPIED Lnet/minecraft/block/ChiseledBookshelfBlock;SLOT_0_OCCUPIED:Lnet/minecraft/state/property/BooleanProperty;
      intermediary field_61991 Lnet/minecraft/class_7714;field_61991:Lnet/minecraft/class_2746;
      official c Ldwa;c:Lekd;
    • SLOT_1_OCCUPIED

      public static final BooleanProperty SLOT_1_OCCUPIED
      Mappings:
      Namespace Name Mixin selector
      named SLOT_1_OCCUPIED Lnet/minecraft/block/ChiseledBookshelfBlock;SLOT_1_OCCUPIED:Lnet/minecraft/state/property/BooleanProperty;
      intermediary field_61992 Lnet/minecraft/class_7714;field_61992:Lnet/minecraft/class_2746;
      official d Ldwa;d:Lekd;
    • SLOT_2_OCCUPIED

      public static final BooleanProperty SLOT_2_OCCUPIED
      Mappings:
      Namespace Name Mixin selector
      named SLOT_2_OCCUPIED Lnet/minecraft/block/ChiseledBookshelfBlock;SLOT_2_OCCUPIED:Lnet/minecraft/state/property/BooleanProperty;
      intermediary field_61993 Lnet/minecraft/class_7714;field_61993:Lnet/minecraft/class_2746;
      official e Ldwa;e:Lekd;
    • SLOT_3_OCCUPIED

      public static final BooleanProperty SLOT_3_OCCUPIED
      Mappings:
      Namespace Name Mixin selector
      named SLOT_3_OCCUPIED Lnet/minecraft/block/ChiseledBookshelfBlock;SLOT_3_OCCUPIED:Lnet/minecraft/state/property/BooleanProperty;
      intermediary field_61994 Lnet/minecraft/class_7714;field_61994:Lnet/minecraft/class_2746;
      official f Ldwa;f:Lekd;
    • SLOT_4_OCCUPIED

      public static final BooleanProperty SLOT_4_OCCUPIED
      Mappings:
      Namespace Name Mixin selector
      named SLOT_4_OCCUPIED Lnet/minecraft/block/ChiseledBookshelfBlock;SLOT_4_OCCUPIED:Lnet/minecraft/state/property/BooleanProperty;
      intermediary field_61995 Lnet/minecraft/class_7714;field_61995:Lnet/minecraft/class_2746;
      official g Ldwa;g:Lekd;
    • SLOT_5_OCCUPIED

      public static final BooleanProperty SLOT_5_OCCUPIED
      Mappings:
      Namespace Name Mixin selector
      named SLOT_5_OCCUPIED Lnet/minecraft/block/ChiseledBookshelfBlock;SLOT_5_OCCUPIED:Lnet/minecraft/state/property/BooleanProperty;
      intermediary field_61996 Lnet/minecraft/class_7714;field_61996:Lnet/minecraft/class_2746;
      official h Ldwa;h:Lekd;
    • MAX_BOOK_COUNT

      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 Ldwa;D:I
    • BOOK_HEIGHT

      private 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 R Ldwa;R:I
    • SLOT_OCCUPIED_PROPERTIES

      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 i Ldwa;i:Ljava/util/List;
  • Constructor Details

    • ChiseledBookshelfBlock

      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> Lejl;<init>(Lejl$d;)V
  • Method Details

    • getCodec

      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 Lejl;a()Lcom/mojang/serialization/MapCodec;
    • getRows

      public int getRows()
      Specified by:
      getRows in interface InteractibleSlotContainer
      Mappings:
      Namespace Name Mixin selector
      named getRows Lnet/minecraft/block/InteractibleSlotContainer;getRows()I
      intermediary method_72586 Lnet/minecraft/class_11585;method_72586()I
      official b Lecf;b()I
    • getColumns

      public int getColumns()
      Specified by:
      getColumns in interface InteractibleSlotContainer
      Mappings:
      Namespace Name Mixin selector
      named getColumns Lnet/minecraft/block/InteractibleSlotContainer;getColumns()I
      intermediary method_72587 Lnet/minecraft/class_11585;method_72587()I
      official c Lecf;c()I
    • onUseWithItem

      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 Lejl;a(Ldhp;Lejm;Ldrq;Lja;Lczl;Lcbp;Lfod;)Lcbq;
    • onUse

      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 Lejl;a(Lejm;Ldrq;Lja;Lczl;Lfod;)Lcbq;
    • tryAddBook

      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 Ldwa;a(Ldrq;Lja;Lczl;Legq;Ldhp;I)V
    • tryRemoveBook

      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 Ldwa;a(Ldrq;Lja;Lczl;Legq;I)V
    • createBlockEntity

      @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);
       }
       
      Specified by:
      createBlockEntity in interface BlockEntityProvider
      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 Ldxs;a(Lja;Lejm;)Legg;
    • appendProperties

      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 Lduv;a(Lejn$a;)V
    • onStateReplaced

      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 Lejl;a(Lejm;Lawx;Lja;Z)V
    • getPlacementState

      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 Lduv;a(Ldlk;)Lejm;
    • rotate

      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 Lejl;a(Lejm;Lebr;)Lejm;
    • mirror

      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 Lejl;a(Lejm;Leaa;)Lejm;
    • hasComparatorOutput

      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, net.minecraft.util.math.Direction) 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_ Lejl;c_(Lejm;)Z
    • getComparatorOutput

      protected int getComparatorOutput(BlockState state, World world, BlockPos pos, Direction direction)
      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;Lnet/minecraft/util/math/Direction;)I
      intermediary method_9572 Lnet/minecraft/class_4970;method_9572(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)I
      official a Lejl;a(Lejm;Ldrq;Lja;Ljg;)I