Package alexiil.mc.lib.attributes.misc
Class AbstractItemBasedAttribute
java.lang.Object
alexiil.mc.lib.attributes.misc.AbstractItemBasedAttribute
- Direct Known Subclasses:
ItemBasedSingleFluidInv
Skeleton class for use when exposing an attribute (like a fluid inventory) from an item that is contained in a
reference.
-
Field Summary
Modifier and TypeFieldDescriptionprotected LimitedConsumer<net.minecraft.item.ItemStack>
protected Reference<net.minecraft.item.ItemStack>
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractItemBasedAttribute(Reference<net.minecraft.item.ItemStack> stackRef, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
setStacks(Simulation simulation, net.minecraft.item.ItemStack oldStack, net.minecraft.item.ItemStack newStack)
Attempts to place the stacks in the reference and excess.toString()
-
Field Details
-
stackRef
-
excessStacks
-
-
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
-