Class CachedTagLookup<T>

java.lang.Object
dev.latvian.mods.kubejs.recipe.CachedTagLookup<T>
Direct Known Subclasses:
CachedItemTagLookup

public class CachedTagLookup<T> extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final Map<net.minecraft.resources.ResourceLocation,List<net.minecraft.tags.TagLoader.EntryWithSource>>
     
    final net.minecraft.core.Registry<T>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    CachedTagLookup(net.minecraft.core.Registry<T> registry, Map<net.minecraft.resources.ResourceLocation,List<net.minecraft.tags.TagLoader.EntryWithSource>> originalMap)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Map<net.minecraft.tags.TagKey<T>,List<net.minecraft.core.Holder<T>>>
     
    Map<net.minecraft.resources.ResourceLocation,Collection<T>>
    build(Map<net.minecraft.resources.ResourceLocation,List<net.minecraft.tags.TagLoader.EntryWithSource>> builders)
     
    boolean
    isEmpty(net.minecraft.tags.TagKey<T> key)
     
    Set<net.minecraft.tags.TagKey<T>>
    keys(T value)
     
    Map<net.minecraft.tags.TagKey<T>,Set<T>>
     
    Map<net.minecraft.resources.ResourceLocation,Collection<net.minecraft.core.Holder<T>>>
     
    values(net.minecraft.tags.TagKey<T> key)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • registry

      public final net.minecraft.core.Registry<T> registry
    • originalMap

      public final Map<net.minecraft.resources.ResourceLocation,List<net.minecraft.tags.TagLoader.EntryWithSource>> originalMap
  • Constructor Details

    • CachedTagLookup

      public CachedTagLookup(net.minecraft.core.Registry<T> registry, Map<net.minecraft.resources.ResourceLocation,List<net.minecraft.tags.TagLoader.EntryWithSource>> originalMap)
  • Method Details

    • build

      public Map<net.minecraft.resources.ResourceLocation,Collection<T>> build(Map<net.minecraft.resources.ResourceLocation,List<net.minecraft.tags.TagLoader.EntryWithSource>> builders)
    • keyToValue

      public Map<net.minecraft.tags.TagKey<T>,Set<T>> keyToValue()
    • values

      public Set<T> values(net.minecraft.tags.TagKey<T> key)
    • isEmpty

      public boolean isEmpty(net.minecraft.tags.TagKey<T> key)
    • keys

      public Set<net.minecraft.tags.TagKey<T>> keys(T value)
    • bindingMap

      public Map<net.minecraft.tags.TagKey<T>,List<net.minecraft.core.Holder<T>>> bindingMap()
    • tagMap

      public Map<net.minecraft.resources.ResourceLocation,Collection<net.minecraft.core.Holder<T>>> tagMap()