Package alexiil.mc.lib.attributes
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.
Used primarily by 
Attribute to manage the custom adder list, and FluidContainerRegistry to manage
 filters for fluids.- 
Nested Class SummaryNested Classes
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddPredicateBased(AttributeSourceType type, boolean specific, Predicate<? super Instance> predicate, V value)voidputClassBased(AttributeSourceType type, Class<?> clazz, boolean matchSubclasses, V value)voidputExact(AttributeSourceType type, Instance key, V value)
- 
Field Details- 
NULL_PRIORITYpublic static final int NULL_PRIORITY- See Also:
- Constant Field Values
 
- 
baseOffsetpublic int baseOffset
- 
priorityMultiplierpublic int priorityMultiplier
 
- 
- 
Constructor Details- 
CompatLeveledMappublic 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- 
get
- 
getEntry
- 
putExact
- 
addPredicateBasedpublic void addPredicateBased(AttributeSourceType type, boolean specific, Predicate<? super Instance> predicate, V value)
- 
putClassBasedpublic void putClassBased(AttributeSourceType type, Class<?> clazz, boolean matchSubclasses, V value)
 
-