Package alexiil.mc.lib.attributes.misc
Class AbstractItemBasedAttribute
java.lang.Object
alexiil.mc.lib.attributes.misc.AbstractItemBasedAttribute
- Direct Known Subclasses:
FixedInvEmiItemInv
,ItemBasedSingleFluidInv
public abstract class AbstractItemBasedAttribute
extends java.lang.Object
Skeleton class for use when exposing an attribute (like a fluid inventory) from an item that is contained in a
reference.
-
Field Summary
Fields Modifier and Type Field Description protected LimitedConsumer<net.minecraft.item.ItemStack>
excessStacks
protected Reference<net.minecraft.item.ItemStack>
stackRef
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractItemBasedAttribute(Reference<net.minecraft.item.ItemStack> stackRef, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks)
-
Method Summary
Modifier and Type Method Description boolean
setStacks(Simulation simulation, net.minecraft.item.ItemStack oldStack, net.minecraft.item.ItemStack newStack)
Attempts to place the stacks in the reference and excess.java.lang.String
toString()
-
Field Details
-
Constructor Details
-
AbstractItemBasedAttribute
protected AbstractItemBasedAttribute(Reference<net.minecraft.item.ItemStack> stackRef, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks)
-
-
Method Details
-
setStacks
public boolean setStacks(Simulation simulation, net.minecraft.item.ItemStack oldStack, net.minecraft.item.ItemStack newStack)Attempts to place the stacks in the reference and excess. -
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-