Interface ItemHasher


public interface ItemHasher
Used for converting items to hashed items and caching them for later use during serverbound packets.

Most of this stays in the internal module given non-permanent, imperfect caching as well as missing converters.

  • Method Details

    • isProcessingClientboundInventoryPacket

      boolean isProcessingClientboundInventoryPacket()
      Returns whether this connection is currently processing a clientbound player inventory packet.

      Used for checking when it is necessary to track/process item data hashes.

      Returns:
      true if processing a clientbound inventory packet, false otherwise
    • setProcessingClientboundInventoryPacket

      void setProcessingClientboundInventoryPacket(boolean processingClientboundInventoryPacket)
    • setEnchantments

      void setEnchantments(List<String> enchantments)
      Sets the enchantment registry for this connection.
      Parameters:
      enchantments - list of enchantment identifiers