Class IdMapper<T>

java.lang.Object
net.minecraft.core.IdMapper<T>
All Implemented Interfaces:
Iterable<T>, IdMap<T>
Direct Known Subclasses:
GameData.ClearableObjectIntIdentityMap

public class IdMapper<T> extends Object implements IdMap<T>
  • Field Details

    • nextId

      protected int nextId
    • tToId

      protected final it.unimi.dsi.fastutil.objects.Object2IntMap<T> tToId
    • idToT

      protected final List<T> idToT
  • Constructor Details

    • IdMapper

      public IdMapper()
    • IdMapper

      public IdMapper(int p_122658_)
  • Method Details

    • addMapping

      public void addMapping(T p_122665_, int p_122666_)
    • add

      public void add(T p_122668_)
    • getId

      public int getId(T p_122663_)
      Specified by:
      getId in interface IdMap<T>
    • byId

      @Nullable public final T byId(int p_122661_)
      Specified by:
      byId in interface IdMap<T>
    • iterator

      public Iterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T>
    • contains

      public boolean contains(int p_175381_)
    • size

      public int size()
      Specified by:
      size in interface IdMap<T>