Class TagCache

java.lang.Object
org.geysermc.geyser.session.cache.TagCache

@ParametersAreNonnullByDefault public final class TagCache extends Object
Manages information sent from the ClientboundUpdateTagsPacket. If that packet is not sent, all lists here will remain empty, matching Java Edition behavior. This system is designed for easy extensibility - just add an enum to BlockTag or ItemTag.
  • Field Details

  • Constructor Details

    • TagCache

      public TagCache()
  • Method Details

    • loadPacket

      public void loadPacket(GeyserSession session, org.geysermc.mcprotocollib.protocol.packet.common.clientbound.ClientboundUpdateTagsPacket packet)
    • is

      public boolean is(BlockTag tag, BlockMapping mapping)
      Returns:
      true if the block tag is present and contains this block mapping's Java ID.
    • is

      public boolean is(ItemTag tag, GeyserItemStack itemStack)
      Returns:
      true if the item tag is present and contains this item stack's Java ID.
    • is

      public boolean is(ItemTag tag, Item item)
      Returns:
      true if the item tag is present and contains this item's Java ID.