Package emi.dev.emi.emi.api.stack
Class EmiStack
java.lang.Object
emi.dev.emi.emi.api.stack.EmiStack
- All Implemented Interfaces:
EmiRenderable,EmiIngredient
- Direct Known Subclasses:
EmiFistStack,EmptyEmiStack,ItemEmiStack
An abstract representation of a resource in EMI.
Can be an item, a fluid, or something else.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longprotected floatprotected Comparisonstatic final EmiStackFields inherited from interface emi.dev.emi.emi.api.stack.EmiIngredient
RENDER_AMOUNT, RENDER_ICON, RENDER_INGREDIENT, RENDER_REMAINDER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomparison(Comparison comparison) comparison(Function<Comparison, Comparison> comparison) abstract EmiStackcopy()booleanlongfloatabstract ResourceLocationgetId()abstract ObjectgetKey()<T> TgetKeyOfType(Class<T> clazz) abstract TextgetName()abstract NBTTagCompoundgetNbt()inthashCode()booleanhasNbt()abstract booleanisEmpty()booleanbooleanisEqual(EmiStack stack, Comparison comparison) static EmiStackstatic EmiStackstatic EmiStackstatic EmiStackstatic EmiStackstatic EmiStackstatic EmiStackstatic EmiStackstatic EmiStackstatic EmiStacksetAmount(long amount) setChance(float chance) setRemainder(EmiStack stack) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface emi.dev.emi.emi.api.stack.EmiIngredient
render, render
-
Field Details
-
EMPTY
-
comparison
-
amount
protected long amount -
chance
protected float chance
-
-
Constructor Details
-
EmiStack
public EmiStack()
-
-
Method Details
-
getEmiStacks
- Specified by:
getEmiStacksin interfaceEmiIngredient- Returns:
- The
EmiStacks represented by this ingredient. List is never empty. For an empty ingredient, usEMPTY
-
getRemainder
-
setRemainder
-
comparison
-
comparison
-
copy
- Specified by:
copyin interfaceEmiIngredient
-
isEmpty
public abstract boolean isEmpty()- Specified by:
isEmptyin interfaceEmiIngredient
-
getAmount
public long getAmount()- Specified by:
getAmountin interfaceEmiIngredient
-
setAmount
- Specified by:
setAmountin interfaceEmiIngredient
-
getChance
public float getChance()- Specified by:
getChancein interfaceEmiIngredient
-
setChance
- Specified by:
setChancein interfaceEmiIngredient
-
getNbt
-
hasNbt
public boolean hasNbt() -
getKey
-
getKeyOfType
-
getId
-
getItemStack
-
isEqual
-
isEqual
-
getTooltipText
-
getTooltip
- Specified by:
getTooltipin interfaceEmiIngredient
-
getName
-
equals
-
hashCode
public int hashCode() -
toString
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-