Uses of Interface
alexiil.mc.lib.attributes.misc.Reference
Package
Description
The base package for
fluid
management.-
Uses of Reference 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
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) 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 T
Obtains a combined instance of this attribute in the givenItemStack
Reference
, or theDefaultedAttribute.defaultValue
if none were found.final ItemAttributeList<T>
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) 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 ItemAttributeList<T>
Obtains all instances of this attribute in the givenItemStack
Reference
.final T
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) 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
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) 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) 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.final T
Attribute.getFirstOrNull
(Reference<net.minecraft.item.ItemStack> stackRef, Predicate<T> filter) Obtains the first instance of this attribute in the givenItemStack
Reference
, or null if none were found. -
Uses of Reference in alexiil.mc.lib.attributes.fluid
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.FluidInvUtil.interactWithTank
(FixedFluidInv inv, net.minecraft.entity.player.PlayerEntity player, Reference<net.minecraft.item.ItemStack> stack) This is the "interactWithTank" variant that takes a singleFixedFluidInv
, and doesn't limit what fluid is moved, or the amount of fluid moved.FluidInvUtil.interactWithTank
(FixedFluidInv inv, net.minecraft.entity.player.PlayerEntity player, Reference<net.minecraft.item.ItemStack> stack, FluidAmount maximum) This is the "interactWithTank" variant that takes a singleFixedFluidInv
, and doesn't limit what fluid is moved.FluidInvUtil.interactWithTank
(FixedFluidInv inv, net.minecraft.entity.player.PlayerEntity player, Reference<net.minecraft.item.ItemStack> stack, FluidFilter filter) This is the "interactWithTank" variant that takes a singleFixedFluidInv
, and doesn't limit the amount of fluid moved.FluidInvUtil.interactWithTank
(FixedFluidInv inv, net.minecraft.entity.player.PlayerEntity player, Reference<net.minecraft.item.ItemStack> stack, FluidFilter filter, FluidAmount maximum) This is the "interactWithTank" variant that takes a singleFixedFluidInv
.FluidInvUtil.interactWithTank
(FluidInsertable invInsert, FluidExtractable invExtract, net.minecraft.entity.player.PlayerEntity player, Reference<net.minecraft.item.ItemStack> stack) This is the "interactWithTank" variant that doesn't limit what fluid is moved, or the amount of fluid moved.FluidInvUtil.interactWithTank
(FluidInsertable invInsert, FluidExtractable invExtract, net.minecraft.entity.player.PlayerEntity player, Reference<net.minecraft.item.ItemStack> stack, FluidAmount maximum) This is the "interactWithTank" variant that doesn't limit the fluid moved.FluidInvUtil.interactWithTank
(FluidInsertable invInsert, FluidExtractable invExtract, net.minecraft.entity.player.PlayerEntity player, Reference<net.minecraft.item.ItemStack> stack, FluidFilter filter) This is the "interactWithTank" variant that doesn't limit the amount of fluid moved.FluidInvUtil.interactWithTank
(FluidInsertable invInsert, FluidExtractable invExtract, net.minecraft.entity.player.PlayerEntity player, Reference<net.minecraft.item.ItemStack> stack, FluidFilter filter, FluidAmount maximum) Attempts to either fill the insertable from the provided stack reference, or drain the extractable to the provided stack.FluidInvUtil.interactWithTank
(FluidTransferable inv, net.minecraft.entity.player.PlayerEntity player, Reference<net.minecraft.item.ItemStack> stack) This is the "interactWithTank" variant that takes a singleFluidTransferable
, and doesn't limit what fluid is moved, or the amount of fluid moved.FluidInvUtil.interactWithTank
(FluidTransferable inv, net.minecraft.entity.player.PlayerEntity player, Reference<net.minecraft.item.ItemStack> stack, FluidAmount maximum) This is the "interactWithTank" variant that takes a singleFluidTransferable
, and doesn't limit what fluid is moved.FluidInvUtil.interactWithTank
(FluidTransferable inv, net.minecraft.entity.player.PlayerEntity player, Reference<net.minecraft.item.ItemStack> stack, FluidFilter filter) This is the "interactWithTank" variant that takes a singleFluidTransferable
, and doesn't limit the amount of fluid moved.FluidInvUtil.interactWithTank
(FluidTransferable inv, net.minecraft.entity.player.PlayerEntity player, Reference<net.minecraft.item.ItemStack> stack, FluidFilter filter, FluidAmount maximum) This is the "interactWithTank" variant that takes a singleFluidTransferable
.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
.static boolean
FluidVolumeUtil.interactWithTank
(FluidInsertable invInsert, FluidExtractable invExtract, net.minecraft.entity.player.PlayerEntity player, Reference<net.minecraft.item.ItemStack> mainStackRef) Deprecated, for removal: This API element is subject to removal in a future version.The boolean return has been deprecated, and the main method has been moved toFluidInvUtil.interactWithTank(FluidInsertable, FluidExtractable, PlayerEntity, Reference)
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 Reference in alexiil.mc.lib.attributes.fluid.item
ModifierConstructorDescriptionprotected
ItemBasedSingleFluidInv
(Reference<net.minecraft.item.ItemStack> stackRef, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks) -
Uses of Reference in alexiil.mc.lib.attributes.item
Modifier and TypeClassDescriptionclass
class
A delegating accessor of a single slot in aFixedItemInv
.Modifier and TypeMethodDescriptionstatic Reference<net.minecraft.item.ItemStack>
ItemInvUtil.referenceGuiCursor
(net.minecraft.server.network.ServerPlayerEntity player) Deprecated, for removal: This API element is subject to removal in a future version.static Reference<net.minecraft.item.ItemStack>
ItemInvUtil.referenceHand
(net.minecraft.entity.player.PlayerEntity player, net.minecraft.util.Hand hand) Deprecated, for removal: This API element is subject to removal in a future version.UsePlayerInvUtil.referenceHand(PlayerEntity,Hand)
instead -
Uses of Reference in alexiil.mc.lib.attributes.misc
Modifier and TypeClassDescriptionfinal class
CallableRef<T>
AReference
that delegates to aSupplier
forCallableRef.get()
,Consumer
forCallableRef.set(Object)
, and aPredicate
forCallableRef.isValid(Object)
.final class
AReference
that can be modified untilDestroyableRef.destroy()
is called, after which all calls toDestroyableRef.set(Object)
andDestroyableRef.isValid(Object)
will return false.final class
Ref<T>
final class
A variant ofCallableRef
that usesSupplier
forSimulatableRef.get()
, andLimitedConsumer
forSimulatableRef.set(Object)
andSimulatableRef.isValid(Object)
.final class
AReference
that may be obtained throughUnmodifiableRef.get()
, but never allows the value to be changed inUnmodifiableRef.set(Object)
.Modifier and TypeFieldDescriptionprotected final Reference<net.minecraft.item.ItemStack>
AbstractItemBasedAttribute.stackRef
Modifier and TypeMethodDescriptionstatic Reference<net.minecraft.item.ItemStack>
PlayerInvUtil.referenceGuiCursor
(net.minecraft.server.network.ServerPlayerEntity player) Creates aReference
to the given player'scursor stack
, that updates the client whenever it is changed.static Reference<net.minecraft.item.ItemStack>
PlayerInvUtil.referenceHand
(net.minecraft.entity.player.PlayerEntity player, net.minecraft.util.Hand hand) Creates aReference
to the what the player is currently holding in the givenHand
.static Reference<net.minecraft.item.ItemStack>
PlayerInvUtil.referenceSlot
(net.minecraft.screen.slot.Slot slot) Creates aReference
to the givenSlot
.Modifier and TypeMethodDescriptionstatic <T> DestroyableRef<T>
Reference.destroying
(Reference<T> ref) ModifierConstructorDescriptionprotected
AbstractItemBasedAttribute
(Reference<net.minecraft.item.ItemStack> stackRef, LimitedConsumer<net.minecraft.item.ItemStack> excessStacks) DestroyableRef
(Reference<T> ref)
FluidInvUtil.interactItemWithTank(FixedFluidInv, Reference, LimitedConsumer)
instead: all interactWithTank methods have been moved toFluidInvUtil
.