Uses of Interface
alexiil.mc.lib.attributes.misc.LimitedConsumer
Package
Description
The base package for
fluid
management.-
Uses of LimitedConsumer in alexiil.mc.lib.attributes
Modifier and TypeMethodDescriptionvoid
ItemAttributeAdder.addAll(Reference<net.minecraft.item.ItemStack> stack, LimitedConsumer<net.minecraft.item.ItemStack> excess, ItemAttributeList<T> to)
Adds every attribute instance to the given list that the item itself cannot be expected to add support for.void
AttributeProviderItem.addAllAttributes(Reference<net.minecraft.item.ItemStack> stack, LimitedConsumer<net.minecraft.item.ItemStack> excess, ItemAttributeList<?> to)
Adds every attribute instance to the given list that the item itself cannot be expected to add support for.CombinableAttribute.get(Reference<net.minecraft.item.ItemStack> stackRef, LimitedConsumer<net.minecraft.item.ItemStack> excess)
Obtains a combined instance of this attribute in the givenItemStack
Reference
, or theDefaultedAttribute.defaultValue
if none were found.CombinableAttribute.get(Reference<net.minecraft.item.ItemStack> stackRef, LimitedConsumer<net.minecraft.item.ItemStack> excess, Predicate<T> filter)
Obtains a combined instance of this attribute in the givenItemStack
Reference
, or theDefaultedAttribute.defaultValue
if none were found.Attribute.getAll(Reference<net.minecraft.item.ItemStack> stackRef, LimitedConsumer<net.minecraft.item.ItemStack> excess)
Obtains all instances of this attribute in the givenItemStack
Reference
.Attribute.getAll(Reference<net.minecraft.item.ItemStack> stackRef, LimitedConsumer<net.minecraft.item.ItemStack> excess, Predicate<T> filter)
Obtains all instances of this attribute in the givenItemStack
Reference
.DefaultedAttribute.getFirst(Reference<net.minecraft.item.ItemStack> stackRef, LimitedConsumer<net.minecraft.item.ItemStack> excess)
Obtains the first instance of this attribute in the givenItemStack
Reference
, or theDefaultedAttribute.defaultValue
if none were found.DefaultedAttribute.getFirst(Reference<net.minecraft.item.ItemStack> stackRef, LimitedConsumer<net.minecraft.item.ItemStack> excess, Predicate<T> filter)
Obtains the first instance of this attribute in the givenItemStack
Reference
, or theDefaultedAttribute.defaultValue
if none were found.Attribute.getFirstOrNull(Reference<net.minecraft.item.ItemStack> stackRef, LimitedConsumer<net.minecraft.item.ItemStack> excess)
Obtains the first instance of this attribute in the givenItemStack
Reference
, or null if none were found.Attribute.getFirstOrNull(Reference<net.minecraft.item.ItemStack> stackRef, LimitedConsumer<net.minecraft.item.ItemStack> excess, Predicate<T> filter)
Obtains the first instance of this attribute in the givenItemStack
Reference
, or null if none were found. -
Uses of LimitedConsumer in alexiil.mc.lib.attributes.fluid
Modifier and TypeInterfaceDescriptioninterface
Defines an object that can have fluids inserted into it.interface
Combined interface forFluidInsertable
andFluidExtractable
.interface
A modifiable version ofGroupedFluidInvView
, except that all modification methods are provided byFluidExtractable
andFluidInsertable
.interface
Modifier and TypeClassDescriptionclass
A delegating accessor of a single slot in aFixedFluidInv
.Modifier and TypeMethodDescriptionFluidInvUtil.interactItemWithTank(FixedFluidInv inv, Reference<net.minecraft.item.ItemStack> stack, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks)
This is the "interactItemWithTank" variant that uses a singleFixedFluidInv
for the insertable/extractable tanks, and doesn't limit the fluid moved, or the amount moved.FluidInvUtil.interactItemWithTank(FixedFluidInv inv, Reference<net.minecraft.item.ItemStack> stack, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks, FluidAmount maximum)
This is the "interactItemWithTank" variant that uses a singleFixedFluidInv
for the insertable/extractable tanks, and doesn't limit what fluid is moved.FluidInvUtil.interactItemWithTank(FixedFluidInv inv, Reference<net.minecraft.item.ItemStack> stack, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks, FluidFilter filter)
This is the "interactItemWithTank" variant that uses a singleFixedFluidInv
for the insertable/extractable tanks, and doesn't limit the amount of fluid moved.FluidInvUtil.interactItemWithTank(FixedFluidInv inv, Reference<net.minecraft.item.ItemStack> stack, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks, FluidFilter filter, FluidAmount maximum)
This is the "interactItemWithTank" variant that uses a singleFixedFluidInv
for the insertable/extractable tanks.FluidInvUtil.interactItemWithTank(FluidInsertable invInsert, FluidExtractable invExtract, Reference<net.minecraft.item.ItemStack> stack, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks)
This is the "interactItemWithTank" variant that doesn't limit what fluid is moved, or the amount of fluid that is moved.FluidInvUtil.interactItemWithTank(FluidInsertable invInsert, FluidExtractable invExtract, Reference<net.minecraft.item.ItemStack> stack, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks, FluidAmount maximum)
This is the "interactItemWithTank" variant that doesn't filter what is moved.FluidInvUtil.interactItemWithTank(FluidInsertable invInsert, FluidExtractable invExtract, Reference<net.minecraft.item.ItemStack> stack, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks, FluidFilter filter)
This is the "interactItemWithTank" variant that doesn't limit the amount of fluid moved.FluidInvUtil.interactItemWithTank(FluidInsertable invInsert, FluidExtractable invExtract, Reference<net.minecraft.item.ItemStack> stack, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks, FluidFilter filter, FluidAmount maximum)
Attempts to either fill the insertable from the provided stack reference, or drain the extractable to the provided stack.FluidInvUtil.interactItemWithTank(FluidTransferable inv, Reference<net.minecraft.item.ItemStack> stack, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks)
This is the "interactItemWithTank" variant that uses a singleFluidTransferable
for the insertable/extractable tanks, and doesn't limit what fluid is moved, or how much is moved.FluidInvUtil.interactItemWithTank(FluidTransferable inv, Reference<net.minecraft.item.ItemStack> stack, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks, FluidAmount maximum)
This is the "interactItemWithTank" variant that uses a singleFluidTransferable
for the insertable/extractable tanks, and doesn't filter what is moved.FluidInvUtil.interactItemWithTank(FluidTransferable inv, Reference<net.minecraft.item.ItemStack> stack, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks, FluidFilter filter)
This is the "interactItemWithTank" variant that uses a singleFluidTransferable
for the insertable/extractable tanks, and doesn't limit the amount moved.FluidInvUtil.interactItemWithTank(FluidTransferable inv, Reference<net.minecraft.item.ItemStack> stack, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks, FluidFilter filter, FluidAmount maximum)
This is the "interactItemWithTank" variant that uses a singleFluidTransferable
for the insertable/extractable tanks.FluidVolumeUtil.interactWithTank(FixedFluidInv inv, Reference<net.minecraft.item.ItemStack> stack, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks)
Deprecated, for removal: This API element is subject to removal in a future version.FluidVolumeUtil.interactWithTank(FluidInsertable invInsert, FluidExtractable invExtract, Reference<net.minecraft.item.ItemStack> stack, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks)
Deprecated, for removal: This API element is subject to removal in a future version.UseFluidInvUtil.interactItemWithTank(FluidInsertable, FluidExtractable, Reference, LimitedConsumer)
instead: all interactWithTank methods have been moved toFluidInvUtil
.FluidVolumeUtil.interactWithTank(FluidTransferable inv, Reference<net.minecraft.item.ItemStack> stack, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks)
Deprecated, for removal: This API element is subject to removal in a future version.UseFluidInvUtil.interactItemWithTank(FluidTransferable, Reference, LimitedConsumer)
instead: all interactWithTank methods have been moved toFluidInvUtil
. -
Uses of LimitedConsumer in alexiil.mc.lib.attributes.fluid.impl
Modifier and TypeClassDescriptionclass
class
class
class
AnFluidTransferable
that never returns any items fromEmptyFluidTransferable.attemptExtraction(FluidFilter, int, Simulation)
, nor accepts any items inEmptyFluidTransferable.attemptInsertion(FluidVolume, Simulation)
.class
GroupedFluidInvView
for an empty inventory.class
AFluidInsertable
that delegates to anotherFluidInsertable
, but has an additional filter as to what can be inserted.class
class
AnGroupedFluidInv
wrapper over anFixedFluidInv
.class
ASimpleFixedFluidInv
with a few optimisations to make theFluidInsertable
,FluidExtractable
, andGroupedFluidInvView
implementations much faster than a simple inventory search for larger inventories.class
AnFluidInsertable
that always refuses to accept any insertedFluidVolume
.class
A simple, extendible, fixed size item inventory that supports all of the features thatFixedFluidInv
exposes.class
Deprecated, for removal: This API element is subject to removal in a future version.This has been replaced withFixedFluidInv.getMappedInv(int...)
followed byFixedFluidInv.getInsertable()
.class
-
Uses of LimitedConsumer in alexiil.mc.lib.attributes.fluid.item
Modifier and TypeClassDescriptionclass
An abstractGroupedFluidInv
for anAbstractItemBasedAttribute
which only ever contains a single fluid, and can contain any amount of said fluid between 0 and it's capacity.ModifierConstructorDescriptionprotected
ItemBasedSingleFluidInv(Reference<net.minecraft.item.ItemStack> stackRef, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks)
-
Uses of LimitedConsumer in alexiil.mc.lib.attributes.item
Modifier and TypeInterfaceDescriptioninterface
A modifiable version ofGroupedItemInvView
, except that all modification methods are provided byItemExtractable
andItemInsertable
.interface
Defines an object that can have items inserted into it.interface
Combined interface forItemInsertable
andItemExtractable
.interface
Modifier and TypeClassDescriptionclass
class
A delegating accessor of a single slot in aFixedItemInv
. -
Uses of LimitedConsumer in alexiil.mc.lib.attributes.item.entity
-
Uses of LimitedConsumer in alexiil.mc.lib.attributes.item.impl
Modifier and TypeClassDescriptionclass
class
class
class
A simple implementation ofFixedItemInv.ModifiableFixedItemInv
that supports all of the features that the interface exposes.class
GroupedItemInvView
for an empty inventory.class
AnItemTransferable
that never returns any items fromEmptyItemTransferable.attemptExtraction(ItemFilter, int, Simulation)
, nor accepts any items inEmptyItemTransferable.attemptInsertion(ItemStack, Simulation)
.class
AnItemInsertable
that delegates to anotherItemInsertable
, but has an additional filter as to what can be inserted.class
class
A simple, extendible, fixed size item inventory that supports all of the features thatFixedItemInv.CopyingFixedItemInv
exposes.class
AGroupedItemInv
wrapper over aFixedItemInv
.class
AnItemInsertable
that always refuses to accept any insertedItemStack
.class
Deprecated, for removal: This API element is subject to removal in a future version.You should use eitherDirectFixedItemInv
orFullFixedItemInv
instead of this!class
Deprecated, for removal: This API element is subject to removal in a future version.UseGroupedItemInvFixedWrapper
instead.class
A simpleGroupedItemInv
that has a limit on both the number of different items that this can store, and the total number of items that can be stored.class
-
Uses of LimitedConsumer in alexiil.mc.lib.attributes.misc
Modifier and TypeFieldDescriptionprotected LimitedConsumer<net.minecraft.item.ItemStack>
AbstractItemBasedAttribute.excessStacks
Modifier and TypeMethodDescriptionstatic <T> LimitedConsumer<T>
LimitedConsumer.fromConsumer(Consumer<T> consumer)
Creates a newLimitedConsumer
that accepts everything, and passes it on to the givenConsumer
.static <T> LimitedConsumer<T>
LimitedConsumer.rejecting()
Modifier and TypeMethodDescriptionstatic <T> SimulatableRef<T>
Reference.simulating(Supplier<T> getter, LimitedConsumer<T> setter)
ModifierConstructorDescriptionprotected
AbstractItemBasedAttribute(Reference<net.minecraft.item.ItemStack> stackRef, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks)
SimulatableRef(Supplier<T> getter, LimitedConsumer<T> setter)
FluidInvUtil.interactItemWithTank(FixedFluidInv, Reference, LimitedConsumer)
instead: all interactWithTank methods have been moved toFluidInvUtil
.