Class CompatLeveledMap<Instance,Cls,V>

java.lang.Object
alexiil.mc.lib.attributes.CompatLeveledMap<Instance,Cls,V>
Type Parameters:
Instance - The object to map directly against with equals - for example this might be Block, or Item, or BlockEntityType, or EntityType.
Cls - The class to map directly or hierarchically against - for example this might be Block, or Item, or BlockEntity, or Entity.

public final class CompatLeveledMap<Instance,Cls,V> extends Object
Used primarily by Attribute to manage the custom adder list, and FluidContainerRegistry to manage filters for fluids.
  • Field Details

    • NULL_PRIORITY

      public static final int NULL_PRIORITY
      See Also:
    • baseOffset

      public int baseOffset
    • priorityMultiplier

      public int priorityMultiplier
  • Constructor Details

    • CompatLeveledMap

      public CompatLeveledMap(String name, Class<Cls> usedClass, V nullValue, Function<Instance,String> toStringFunc)
      Parameters:
      nullValue - A non-null value to use to indicate that this doesn't contain any entries for the given key. Note that this value will not be returned unless it is added to this map separately with any of the "put" methods.
  • Method Details