Package alexiil.mc.lib.attributes
Class AbstractAttributeList<T>
java.lang.Object
alexiil.mc.lib.attributes.AbstractAttributeList<T>
- Direct Known Subclasses:
AttributeList
,ItemAttributeList
The base class for
AttributeList
and ItemAttributeList
.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
combine
(CombinableAttribute<T> combinable) get
(int index) int
getCount()
getFirst
(DefaultedAttribute<T> defaulted)
-
Field Details
-
attribute
-
list
-
-
Constructor Details
-
AbstractAttributeList
-
-
Method Details
-
getCount
public int getCount()- Returns:
- The number of attribute instances added to this list.
-
get
-
getFirstOrNull
-
getFirst
-
combine
- Returns:
- A combined version of this list, or the attribute's default value if this list is empty.
-
assertAdding
protected void assertAdding() -
assertUsing
protected void assertUsing()
-