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.final T
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.final T
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.final ItemAttributeList<T>
Attribute.getAll
(Reference<net.minecraft.item.ItemStack> stackRef, LimitedConsumer<net.minecraft.item.ItemStack> excess) Obtains all instances of this attribute in the givenItemStack
Reference
.final ItemAttributeList<T>
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
.final T
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.final T
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.final T
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.final T
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 TypeClassDescriptionfinal class
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 TypeClassDescriptionfinal class
class
class
enum
AnFluidTransferable
that never returns any items fromEmptyFluidTransferable.attemptExtraction(FluidFilter, int, Simulation)
, nor accepts any items inEmptyFluidTransferable.attemptInsertion(FluidVolume, Simulation)
.enum
GroupedFluidInvView
for an empty inventory.final class
AFluidInsertable
that delegates to anotherFluidInsertable
, but has an additional filter as to what can be inserted.final 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.enum
AnFluidInsertable
that always refuses to accept any insertedFluidVolume
.class
A simple, extendible, fixed size item inventory that supports all of the features thatFixedFluidInv
exposes.final 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
final class
class
class
A simple implementation ofFixedItemInv.ModifiableFixedItemInv
that supports all of the features that the interface exposes.enum
GroupedItemInvView
for an empty inventory.enum
AnItemTransferable
that never returns any items fromEmptyItemTransferable.attemptExtraction(ItemFilter, int, Simulation)
, nor accepts any items inEmptyItemTransferable.attemptInsertion(ItemStack, Simulation)
.final class
AnItemInsertable
that delegates to anotherItemInsertable
, but has an additional filter as to what can be inserted.final class
class
A simple, extendible, fixed size item inventory that supports all of the features thatFixedItemInv.CopyingFixedItemInv
exposes.class
AGroupedItemInv
wrapper over aFixedItemInv
.enum
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!final 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 final 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
.