Interface TomeStorageAccessor

All Known Implementing Classes:
EnchantingTableBlockEntityMixin

public interface TomeStorageAccessor
Accessor interface for EnchantingTableBlockEntity.

This interface is implemented via Mixin to allow the vanilla Enchanting Table Block Entity to store an ItemStack. It is used to persist the specific Enchanted Tome that was used to activate a DeactivatedEnchantingTableBlock, ensuring the exact tome (along with its stored enchantments) can be retrieved via pick-block or dropped when the table is broken.

  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.item.ItemStack
    Retrieves the Enchanted Tome item stack currently stored inside this block entity.
    void
    enchanting_overhauled$setTomeStack(net.minecraft.world.item.ItemStack stack)
    Sets the Enchanted Tome item stack to be stored in this block entity and marks the block entity for persistence and client synchronization.
  • Method Details

    • enchanting_overhauled$getTomeStack

      net.minecraft.world.item.ItemStack enchanting_overhauled$getTomeStack()
      Retrieves the Enchanted Tome item stack currently stored inside this block entity.
      Returns:
      The stored ItemStack, or ItemStack.EMPTY if no tome is stored.
    • enchanting_overhauled$setTomeStack

      void enchanting_overhauled$setTomeStack(net.minecraft.world.item.ItemStack stack)
      Sets the Enchanted Tome item stack to be stored in this block entity and marks the block entity for persistence and client synchronization.
      Parameters:
      stack - The ItemStack representing the Enchanted Tome to store.