Class TagCache
java.lang.Object
org.geysermc.geyser.session.cache.TagCache
Manages information sent from the
ClientboundUpdateTagsPacket. If that packet is not sent, all lists here
will remain empty, matching Java Edition behavior. Looking up a tag that wasn't listed in that packet will return an empty array.
Only tags from suitable registries in JavaRegistries are stored. Read JavaRegistryKey for more information.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> List<T>int[]<T> booleanis(GeyserHolderSet<T> holderSet, T object) booleanis(Tag<Item> tag, GeyserItemStack itemStack) <T> booleanvoidloadPacket(GeyserSession session, org.geysermc.mcprotocollib.protocol.packet.common.clientbound.ClientboundUpdateTagsPacket packet) static <T> List<T>mapRawArray(GeyserSession session, int[] array, JavaRegistryKey<T> registry) Maps a raw array of network IDs to their respective objects.
-
Constructor Details
-
TagCache
-
-
Method Details
-
loadPacket
public void loadPacket(GeyserSession session, org.geysermc.mcprotocollib.protocol.packet.common.clientbound.ClientboundUpdateTagsPacket packet) -
is
-
is
- Returns:
- true if the item tag is present and contains this item stack's Java ID.
-
is
- Returns:
- true if the specified network ID is in the given holder set.
-
get
-
getRaw
- Returns:
- the network IDs in the given tag. This can be an empty list.
-
mapRawArray
public static <T> List<T> mapRawArray(GeyserSession session, int[] array, JavaRegistryKey<T> registry) Maps a raw array of network IDs to their respective objects.
-