Uses of Class
alexiil.mc.lib.attributes.fluid.amount.FluidAmount
Package
Description
The base package for
fluid
management.-
Uses of FluidAmount in alexiil.mc.lib.attributes.fluid
Modifier and TypeFieldDescriptionGroupedFluidInvView.FluidInvStatistic.amount_F
The total amount of the given filter.FluidContainerRegistry.FluidFillHandler.minimum
GroupedFluidInvView.FluidInvStatistic.spaceAddable_F
The total amount of space that the given filter can be added to (where an inventory already contains a partial stack).GroupedFluidInvView.FluidInvStatistic.spaceTotal_F
The total amount of additional entries that could be added to by this filter.Modifier and TypeMethodDescriptionFluidVolumeUtil.FluidTankInteraction.amountMoved_F()
default FluidAmount
GroupedFluidInvView.getAmount_F(FluidFilter filter)
default FluidAmount
GroupedFluidInvView.getAmount_F(FluidKey fluid)
protected abstract FluidAmount
FluidContainerRegistry.FluidFillHandler.getCapacity(FluidFilter filter)
default FluidAmount
GroupedFluidInvView.getCapacity_F(FluidKey fluid)
default FluidAmount
FixedFluidInvView.getMaxAmount_F(int tank)
SingleFluidTankView.getMaxAmount_F()
default FluidAmount
FluidInsertable.getMinimumAcceptedAmount()
SingleFluidTankView.getSpace()
default FluidAmount
GroupedFluidInvView.getSpace_F(FluidKey fluid)
default FluidAmount
GroupedFluidInvView.getTotalCapacity_F()
Modifier and TypeMethodDescriptiondefault FluidVolume
FluidExtractable.attemptAnyExtraction(FluidAmount maxAmount, Simulation simulation)
default FluidVolume
FluidExtractable.attemptExtraction(FluidFilter filter, FluidAmount maxAmount, Simulation simulation)
SingleFluidTank.attemptExtraction(FluidFilter filter, FluidAmount maxAmount, Simulation simulation)
FluidVolumeUtil.computeExtraction(FluidVolume inTank, FluidFilter filter, FluidAmount maxAmount)
Computes the result ofFluidVolumeUtil.extractSingle(FixedFluidInv, int, FluidFilter, FluidVolume, FluidAmount, Simulation)
, but without actually modifying an inventory.FluidVolumeUtil.computeExtraction(FluidVolume inTank, FluidFilter filter, FluidVolume toAddWith, FluidAmount maxAmount)
Computes the result ofFluidVolumeUtil.extractSingle(FixedFluidInv, int, FluidFilter, FluidVolume, FluidAmount, Simulation)
, but without actually modifying an inventory.FluidVolumeUtil.computeInsertion(FluidVolume current, FluidAmount capacity, FluidVolume toInsert)
Computes the result ofFluidVolumeUtil.insertSingle(FixedFluidInv, int, FluidVolume, Simulation)
, but without actually modifying an inventory.default FluidVolume
FluidExtractable.extract(FluidAmount maxAmount)
Attempt to extract *any*FluidVolume
from this.default FluidVolume
FluidExtractable.extract(FluidFilter filter, FluidAmount maxAmount)
default FluidVolume
FluidExtractable.extract(FluidKey filter, FluidAmount maxAmount)
default FluidVolume
FixedFluidInv.extractFluid(int tank, FluidFilter filter, FluidVolume mergeWith, FluidAmount maxAmount, Simulation simulation)
Attempts to extract part of the fluid volume that is held in the given tank.static FluidVolume
FluidVolumeUtil.extractSingle(FixedFluidInv inv, int tank, FluidFilter filter, FluidVolume toAddWith, FluidAmount maxAmount, Simulation simulation)
Deprecated, for removal: This API element is subject to removal in a future version.FluidInvUtil.interactCursorWithTank(FixedFluidInv inv, net.minecraft.server.network.ServerPlayerEntity player, FluidAmount maximum)
This is the "interactCursorWithTank" variant that takes a singleFixedFluidInv
and doesn't limit what fluid is moved.FluidInvUtil.interactCursorWithTank(FixedFluidInv inv, net.minecraft.server.network.ServerPlayerEntity player, FluidFilter filter, FluidAmount maximum)
This is the "interactCursorWithTank" variant that takes a singleFixedFluidInv
.FluidInvUtil.interactCursorWithTank(FluidInsertable invInsert, FluidExtractable invExtract, net.minecraft.server.network.ServerPlayerEntity player, FluidAmount maximum)
This is the "interactCursorWithTank" variant that doesn't limit what fluid is moved.FluidInvUtil.interactCursorWithTank(FluidInsertable invInsert, FluidExtractable invExtract, net.minecraft.server.network.ServerPlayerEntity player, FluidFilter filter, FluidAmount maximum)
Attempts to either fill the insertable from the player'sPlayerInventory#getCursorStack()
, or drain the extractable to the cursor stack.FluidInvUtil.interactCursorWithTank(FluidTransferable inv, net.minecraft.server.network.ServerPlayerEntity player, FluidAmount maximum)
This is the "interactCursorWithTank" variant that takes a singleFluidTransferable
and doesn't limit what fluid is moved.FluidInvUtil.interactCursorWithTank(FluidTransferable inv, net.minecraft.server.network.ServerPlayerEntity player, FluidFilter filter, FluidAmount maximum)
This is the "interactCursorWithTank" variant that takes a singleFluidTransferable
.FluidInvUtil.interactHandWithTank(FixedFluidInv inv, net.minecraft.entity.player.PlayerEntity player, net.minecraft.util.Hand hand, FluidAmount maximum)
This is the "interactHandWithTank" variant that takes a singleFixedFluidInv
and doesn't limit what fluid is moved.FluidInvUtil.interactHandWithTank(FixedFluidInv inv, net.minecraft.entity.player.PlayerEntity player, net.minecraft.util.Hand hand, FluidFilter filter, FluidAmount maximum)
This is the "interactHandWithTank" variant that takes a singleFixedFluidInv
.FluidInvUtil.interactHandWithTank(FluidInsertable invInsert, FluidExtractable invExtract, net.minecraft.entity.player.PlayerEntity player, net.minecraft.util.Hand hand, FluidAmount maximum)
This is the "interactHandWithTank" variant that doesn't limit what fluid is moved.FluidInvUtil.interactHandWithTank(FluidInsertable invInsert, FluidExtractable invExtract, net.minecraft.entity.player.PlayerEntity player, net.minecraft.util.Hand hand, FluidFilter filter, FluidAmount maximum)
Attempts to either fill the insertable from the player'shand
, or drain the extractable to the hand.FluidInvUtil.interactHandWithTank(FluidTransferable inv, net.minecraft.entity.player.PlayerEntity player, net.minecraft.util.Hand hand, FluidAmount maximum)
This is the "interactHandWithTank" variant that takes a singleFluidTransferable
and doesn't limit what fluid is moved.FluidInvUtil.interactHandWithTank(FluidTransferable inv, net.minecraft.entity.player.PlayerEntity player, net.minecraft.util.Hand hand, FluidFilter filter, FluidAmount maximum)
This is the "interactHandWithTank" variant that takes a singleFluidTransferable
.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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, FluidAmount maximum)
This is the "interactWithTank" variant that takes a singleFluidTransferable
.LimitedFixedFluidInv.FluidTankLimitRule.limitInsertionAmount(FluidAmount max)
Limits the amount of fluid that can be inserted (in total) to the given count.LimitedGroupedFluidInv.FluidLimitRule.limitInsertionAmount(FluidAmount max)
Limits the amount of fluid that can be inserted (in total) to the given amount.static FluidVolume
FluidVolumeUtil.move(FluidExtractable from, FluidInsertable to, FluidAmount maximum)
Attempts to move up to the given amount of fluid from theFluidExtractable
to theFluidInsertable
.static FluidVolume
FluidVolumeUtil.move(FluidExtractable from, FluidInsertable to, FluidAmount maximum, Simulation simulation)
Attempts to move up to the given amount of fluid from theFluidExtractable
to theFluidInsertable
.static FluidVolume
FluidVolumeUtil.move(FluidExtractable from, FluidInsertable to, FluidFilter filter, FluidAmount maximum)
Attempts to move up to the given maximum amount of fluids from theFluidExtractable
to theFluidInsertable
, provided they match the givenFluidFilter
.static FluidVolume
FluidVolumeUtil.move(FluidExtractable from, FluidInsertable to, FluidFilter filter, FluidAmount maximum, Simulation simulation)
Attempts to move up to the given maximum amount of fluids from theFluidExtractable
to theFluidInsertable
, provided they match the givenFluidFilter
.void
FluidInvAmountChangeListener_F.onChange(GroupedFluidInvView inv, FluidKey fluid, FluidAmount previous, FluidAmount current)
static void
FluidContainerRegistry.registerFillHandler(net.minecraft.item.Item empty, FluidAmount minimum, FluidAmount capacity, FluidContainerRegistry.FluidFillFunction fn)
static void
FluidContainerRegistry.registerFillHandler(net.minecraft.item.Item empty, FluidFilter fluids, boolean isFilterSpecific, FluidAmount minimum, FluidAmount capacity, FluidContainerRegistry.FluidFillFunction fn)
static void
FluidContainerRegistry.registerFillHandler(net.minecraft.item.Item empty, FluidKey fluid, FluidAmount minimum, FluidAmount capacity, FluidContainerRegistry.FluidFillFunction fn)
Registers a custom fill handler for the given empty item, which always creates filledItemStack
s with differentItem
s to the original.LimitedFixedFluidInv.FluidTankLimitRule.setMinimum(FluidAmount min)
Limits the amount of fluid that can be extracted to ensure that this tank cannot have an amount that goes below the given value.LimitedGroupedFluidInv.FluidLimitRule.setMinimum(FluidAmount min)
Limits the amount of fluid that can be extracted to ensure that the inventory cannot have an amount below the given value.ModifierConstructorDescriptionFluidFillHandler(FluidAmount minimum)
FluidInvStatistic(FluidFilter filter, FluidAmount amount, FluidAmount spaceAddable, FluidAmount spaceTotal)
-
Uses of FluidAmount in alexiil.mc.lib.attributes.fluid.amount
Modifier and TypeFieldDescriptionstatic FluidAmount
FluidAmount.A_MILLION
A very large amount of fluid - one million buckets.static FluidAmount
FluidAmount.ABSOLUTE_MAXIMUM
The maximum possible value that a validFluidAmount
can hold.static FluidAmount
FluidAmount.ABSOLUTE_MINIMUM
The minimum possible value that a validFluidAmount
can hold.static FluidAmount
FluidAmount.BOTTLE
One bottle is equal to a third of a bucket.static FluidAmount
FluidAmount.BUCKET
One bucket of fluid - which is alwaysONE
.FluidAmount.FluidMergeResult.excess
The leftover from the merging.static FluidAmount
FluidAmount.MAX_BUCKETS
Long.MAX_VALUE
of buckets.static FluidAmount
FluidAmount.MAX_VALUE
Deprecated, for removal: This API element is subject to removal in a future version.AsMAX_BUCKETS
should generally be used instead, however if you really need the absolute value then you can useABSOLUTE_MAXIMUM
.FluidAmount.FluidMergeResult.merged
The result of the merging.static FluidAmount
FluidAmount.MIN_BUCKETS
Long.MIN_VALUE
of buckets.static FluidAmount
FluidAmount.MIN_VALUE
Deprecated, for removal: This API element is subject to removal in a future version.AsMIN_BUCKETS
should generally be used instead, however if you really need the absolute minimum value then you can useABSOLUTE_MINIMUM
.static FluidAmount
FluidAmount.NEGATIVE_ONE
static FluidAmount
FluidAmount.ONE
FluidAmount.SafeAddResult.roundedResult
static FluidAmount
FluidAmount.ZERO
Modifier and TypeFieldDescriptionstatic com.google.gson.JsonDeserializer<FluidAmount>
FluidAmount.DESERIALIZER
Modifier and TypeMethodDescriptionFluidAmount.add(long by)
Adds the given long value to thisFluidAmount
, without performing any checking or saturation.FluidAmount.add(FluidAmount other)
The recommended method for adding twoFluidAmount
's together if you don't want to think about inexact answers.BigFluidAmount.asLongIntExact()
FluidAmount.asLongIntExact()
BigFluidAmount.asLongIntRounded()
Converts this into a normal long-basedFluidAmount
.BigFluidAmount.asLongIntRounded(RoundingMode rounding)
Converts this into a normal long-basedFluidAmount
.BigFluidAmount.asLongIntSaturated()
Converts this into a normal long-basedFluidAmount
.FluidAmount.checkedAdd(FluidAmount by)
Directly adds the givenFluidAmount
to this one.FluidAmount.checkedDiv(long by)
FluidAmount.checkedDiv(FluidAmount by)
FluidAmount.checkedMul(long by)
FluidAmount.checkedMul(FluidAmount by)
FluidAmount.checkedSub(FluidAmount by)
FluidAmount.div(long other)
The recommended method for dividing this by aLong
if you don't want to think about inexact answers.FluidAmount.div(FluidAmount other)
The recommended method for dividing this by anotherFluidAmount
if you don't want to think about inexact answers.static FluidAmount
FluidAmount.fromDouble(double value)
Deprecated, for removal: This API element is subject to removal in a future version.Useparse(String)
instead.static FluidAmount
FluidAmount.fromJson(com.google.gson.JsonElement json)
static FluidAmount
FluidAmount.fromMcBuffer(net.minecraft.network.PacketByteBuf buffer)
static FluidAmount
FluidAmount.fromNbt(net.minecraft.nbt.NbtCompound tag)
static FluidAmount
FluidAmount.fromStdBuffer(io.netty.buffer.ByteBuf buffer)
FluidAmount.getDivisor()
FluidAmount.lcm(FluidAmount other)
FluidAmount.mul(long by)
The recommended method for multiplying this by a long if you don't want to think about inexact answers.FluidAmount.mul(FluidAmount by)
The recommended method for multiplying twoFluidAmount
's together if you don't want to think about inexact answers.FluidAmount.negate()
static FluidAmount
FluidAmount.of(long numerator, long denominator)
Creates a newFluidAmount
with the given values.static FluidAmount
FluidAmount.of(long whole, long numerator, long denominator)
Creates a newFluidAmount
with the given values.static FluidAmount
FluidAmount.of1620(int amount)
Legacy conversion method for creating a fraction with the given amount as it's numerator, and 1620 as it's denominatorstatic FluidAmount
FluidAmount.ofWhole(long whole)
Creates a newFluidAmount
with the given values.static FluidAmount
Attempts to parse the given text as aFluidAmount
.FluidAmount.reciprocal()
FluidAmount.roundedAdd(FluidAmount other)
FluidAmount.roundedAdd(FluidAmount other, RoundingMode rounding)
FluidAmount.roundedDiv(long by)
FluidAmount.roundedDiv(long by, RoundingMode rounding)
FluidAmount.roundedDiv(FluidAmount by)
FluidAmount.roundedDiv(FluidAmount by, RoundingMode rounding)
FluidAmount.roundedMul(long by)
FluidAmount.roundedMul(long by, RoundingMode rounding)
FluidAmount.roundedMul(FluidAmount by)
FluidAmount.roundedMul(FluidAmount by, RoundingMode rounding)
FluidAmount.roundedSub(FluidAmount by)
FluidAmount.roundedSub(FluidAmount by, RoundingMode rounding)
FluidAmount.saturatedAdd(FluidAmount by)
Similar tocheckedAdd(FluidAmount)
, but returns eitherMAX_BUCKETS
orMIN_BUCKETS
instead of throwing an exception.FluidAmount.saturatedDiv(long by)
FluidAmount.saturatedDiv(FluidAmount by)
FluidAmount.saturatedMul(long by)
FluidAmount.saturatedMul(FluidAmount by)
FluidAmount.saturatedSub(FluidAmount by)
FluidAmount.splitBalanced(int count)
Splits thisFluidAmount
evenly into the given count, but not letting the denominator exceed the default value (2000).FluidAmount.splitBalanced(int count, long maxDenominator)
Splits thisFluidAmount
evenly into the given count, but not letting the denominator exceed the given value.FluidAmount.splitBalanced(FluidAmount[] dest, long maxDenominator)
Splits thisFluidAmount
evenly into the given count, but not letting the denominator exceed the given value.FluidAmount.sub(long by)
FluidAmount.sub(FluidAmount other)
The recommended method for subtracting anotherFluidAmount
from this if you don't want to think about inexact answers.Modifier and TypeMethodDescriptionBigFluidAmount.add(FluidAmount by)
FluidAmount.add(FluidAmount other)
The recommended method for adding twoFluidAmount
's together if you don't want to think about inexact answers.FluidAmount.bigAdd(FluidAmount by)
Directly adds the givenFluidAmount
to this one, returning the result as aBigFluidAmount
.FluidAmount.bigDiv(FluidAmount by)
FluidAmount.bigMul(FluidAmount by)
FluidAmount.checkedAdd(FluidAmount by)
Directly adds the givenFluidAmount
to this one.FluidAmount.checkedDiv(FluidAmount by)
FluidAmount.checkedMul(FluidAmount by)
FluidAmount.checkedSub(FluidAmount by)
int
FluidAmount.compareTo(FluidAmount o)
BigFluidAmount.div(FluidAmount by)
FluidAmount.div(FluidAmount other)
The recommended method for dividing this by anotherFluidAmount
if you don't want to think about inexact answers.boolean
FluidAmount.equals(FluidAmount other)
long
FluidAmount.getCountOf(FluidAmount by)
FluidAmount.lcm(FluidAmount other)
static FluidAmount.FluidMergeResult
FluidAmount.merge(FluidAmount target, FluidAmount toAdd)
static FluidAmount.FluidMergeResult
FluidAmount.merge(FluidAmount target, FluidAmount toAdd, long denominatorTarget, long denominatorAdd)
static FluidAmount.FluidMergeResult
FluidAmount.merge(FluidAmount target, FluidAmount toAdd, FluidAmount.FluidMergeRounding rounding)
BigFluidAmount.mul(FluidAmount by)
FluidAmount.mul(FluidAmount by)
The recommended method for multiplying twoFluidAmount
's together if you don't want to think about inexact answers.FluidAmount.roundedAdd(FluidAmount other)
FluidAmount.roundedAdd(FluidAmount other, RoundingMode rounding)
FluidAmount.roundedDiv(FluidAmount by)
FluidAmount.roundedDiv(FluidAmount by, RoundingMode rounding)
FluidAmount.roundedMul(FluidAmount by)
FluidAmount.roundedMul(FluidAmount by, RoundingMode rounding)
FluidAmount.roundedSub(FluidAmount by)
FluidAmount.roundedSub(FluidAmount by, RoundingMode rounding)
FluidAmount.safeAdd(FluidAmount other)
Safely adds the givenFluidAmount
to this one, returning the merged result.FluidAmount.safeAdd(FluidAmount other, RoundingMode rounding)
Safely adds the givenFluidAmount
to this one, returning the merged result.FluidAmount.safeSub(FluidAmount by)
FluidAmount.safeSub(FluidAmount by, RoundingMode rounding)
FluidAmount.saturatedAdd(FluidAmount by)
Similar tocheckedAdd(FluidAmount)
, but returns eitherMAX_BUCKETS
orMIN_BUCKETS
instead of throwing an exception.FluidAmount.saturatedDiv(FluidAmount by)
FluidAmount.saturatedMul(FluidAmount by)
FluidAmount.saturatedSub(FluidAmount by)
FluidAmount.splitBalanced(FluidAmount[] dest, long maxDenominator)
Splits thisFluidAmount
evenly into the given count, but not letting the denominator exceed the given value.BigFluidAmount.sub(FluidAmount by)
FluidAmount.sub(FluidAmount other)
The recommended method for subtracting anotherFluidAmount
from this if you don't want to think about inexact answers.ModifierConstructorDescriptionBigFluidAmount(FluidAmount from)
FluidMergeResult(FluidAmount merged)
Constructs a newFluidAmount.FluidMergeResult
with the givenFluidAmount.FluidMergeResult.merged
value, and with bothFluidAmount.FluidMergeResult.excess
andFluidAmount.FluidMergeResult.roundingError
set to zero.FluidMergeResult(FluidAmount merged, FluidAmount excess, BigFluidAmount error)
SafeAddResult(FluidAmount exactValue)
SafeAddResult(FluidAmount roundedResult, BigFluidAmount exactValue)
-
Uses of FluidAmount in alexiil.mc.lib.attributes.fluid.impl
Modifier and TypeFieldDescriptionprotected FluidAmount[]
SimpleLimitedFixedFluidInv.maxInsertionAmounts
Array of maximum amounts that can be inserted up to.protected FluidAmount[]
SimpleLimitedFixedFluidInv.minimumAmounts
Array of minimum amounts that can be extracted down to.SimpleFixedFluidInv.tankCapacity_F
Modifier and TypeMethodDescriptionAbstractPartialFixedFluidInvView.getMaxAmount_F(int tank)
CombinedFixedFluidInvView.getMaxAmount_F(int tank)
DelegatingFixedFluidInv.getMaxAmount_F(int tank)
SimpleFixedFluidInv.getMaxAmount_F(int tank)
SimpleLimitedFixedFluidInv.getMaxAmount_F(int tank)
CombinedFluidInsertable.getMinimumAcceptedAmount()
FilteredFluidInsertable.getMinimumAcceptedAmount()
FilteredFluidTransferable.getMinimumAcceptedAmount()
SimpleFixedFluidInv.getMinimumAcceptedAmount()
SimpleFixedFluidInvInsertable.getMinimumAcceptedAmount()
Deprecated, for removal: This API element is subject to removal in a future version.CombinedGroupedFluidInvView.getTotalCapacity_F()
DelegatingGroupedFluidInv.getTotalCapacity_F()
EmptyGroupedFluidInv.getTotalCapacity_F()
GroupedFluidInvViewFixedWrapper.getTotalCapacity_F()
Modifier and TypeMethodDescriptionDelegatingGroupedFluidInv.attemptAnyExtraction(FluidAmount maxAmount, Simulation simulation)
SimpleFixedFluidInv.attemptAnyExtraction(FluidAmount maxAmount, Simulation simulation)
CombinedFluidExtractable.attemptExtraction(FluidFilter filter, FluidAmount maxAmount, Simulation simulation)
CombinedGroupedFluidInv.attemptExtraction(FluidFilter filter, FluidAmount maxAmount, Simulation simulation)
DelegatingGroupedFluidInv.attemptExtraction(FluidFilter filter, FluidAmount maxAmount, Simulation simulation)
EmptyFluidExtractable.attemptExtraction(FluidFilter filter, FluidAmount maxAmount, Simulation simulation)
FilteredFluidExtractable.attemptExtraction(FluidFilter filter, FluidAmount maxAmount, Simulation simulation)
FilteredFluidTransferable.attemptExtraction(FluidFilter filter, FluidAmount maxAmount, Simulation simulation)
GroupedFluidInvFixedWrapper.attemptExtraction(FluidFilter filter, FluidAmount maxAmount, Simulation simulation)
SimpleFixedFluidInv.attemptExtraction(FluidFilter filter, FluidAmount maxAmount, Simulation simulation)
SimpleFixedFluidInvExtractable.attemptExtraction(FluidFilter filter, FluidAmount maxAmount, Simulation simulation)
Deprecated, for removal: This API element is subject to removal in a future version.SimpleLimitedGroupedFluidInv.attemptExtraction(FluidFilter filter, FluidAmount maxAmount, Simulation simulation)
ModifierConstructorDescriptionJumboFixedFluidInv(int invSize, FluidAmount tankCapacity)
SimpleFixedFluidInv(int invSize, FluidAmount tankCapacity)
-
Uses of FluidAmount in alexiil.mc.lib.attributes.fluid.item
Modifier and TypeMethodDescriptionItemBasedSingleFluidInv.attemptExtraction(FluidFilter filter, FluidAmount maxAmount, Simulation simulation)
-
Uses of FluidAmount in alexiil.mc.lib.attributes.fluid.mixin.api
-
Uses of FluidAmount in alexiil.mc.lib.attributes.fluid.volume
Modifier and TypeFieldDescriptionFluidKey.cohesion
How much this fluid will spread itself around.static FluidAmount
FluidKey.DEFAULT_GAS_COHESION
The defaultFluidKey.cohesion
that gases use: 1/24static FluidAmount
FluidKey.DEFAULT_GAS_DENSITY
The defaultFluidKey.density
(andFluidKey.thermalCapacity
) that gases use: 1/160.static FluidAmount
FluidKey.DEFAULT_GAS_VISCOSITY
The defaultFluidKey.viscosity
that gases use: 1/24.FluidKey.density
How dense this fluid is.FluidKey.netherCohesion
Special-case property for fluids to have differentFluidKey.cohesion
values in the nether.FluidKey.netherViscosity
Special-case property for fluids to have differentFluidKey.viscosity
values in the nether.FluidKey.thermalCapacity
How much energy is required to make this fluid change it's temperature.FluidKey.viscosity
How much this fluid resists attempts to move it around.Modifier and TypeMethodDescriptionFluidVolume.amount()
An alternate name forFluidVolume.getAmount_F()
.FluidVolume.getAmount_F()
Note: due to LBA's backwards compatibility with when it used to use a 1620-based fixed fraction integers this cannot use the name "getAmount", so instead this has "_F" added to the end.protected FluidAmount
FluidVolume.getRawAmount_F()
static FluidAmount
FluidVolume.parseAmount(com.google.gson.JsonElement elem)
Modifier and TypeMethodDescriptionvoid
WeightedFluidVolume.addAmount(T value, FluidAmount amount)
void
WeightedFluidVolume.addAmount(T value, FluidAmount amount, FluidAmount.FluidMergeRounding rounding)
void
FluidVolume.addFullTooltip(FluidAmount capacity, FluidTooltipContext context, List<net.minecraft.text.Text> tooltip)
Adds the complete tooltip for thisFluidVolume
to the given tooltip.void
FluidVolume.addFullTooltip(FluidAmount capacity, List<net.minecraft.text.Text> tooltip)
Adds the complete tooltip for thisFluidVolume
to the given tooltip.void
FluidVolume.addTooltipNameAmount(FluidAmount capacity, FluidTooltipContext context, List<net.minecraft.text.Text> tooltip)
Adds the name and amount to the given tooltip.protected ColouredFluidVolume
ColouredFluidKey.createFromMcBuffer(net.minecraft.network.PacketByteBuf buffer, FluidAmount amount)
protected FluidVolume
FluidKey.createFromMcBuffer(net.minecraft.network.PacketByteBuf buffer, FluidAmount amount)
Creates a newFluidVolume
and reads it from the buffer withFluidVolume.fromMcBufferInternal(PacketByteBuf)
.net.minecraft.text.Text
FluidUnit.getAmount(FluidAmount amount, boolean forceSingular, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnitBase.getAmount(FluidAmount amount)
net.minecraft.text.Text
FluidUnitBase.getAmount(FluidAmount amount, boolean forceSingular)
net.minecraft.text.Text
FluidUnitBase.getAmount(FluidAmount amount, boolean forceSingular, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnitBase.getAmount(FluidAmount amount, boolean forceSingular, net.minecraft.text.Text fluidName)
abstract net.minecraft.text.Text
FluidUnitBase.getAmount(FluidAmount amount, boolean forceSingular, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnitBase.getAmount(FluidAmount amount, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnitBase.getAmount(FluidAmount amount, net.minecraft.text.Text fluidName)
net.minecraft.text.Text
FluidUnitBase.getAmount(FluidAmount amount, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnitSet.getAmount(FluidAmount amount, boolean forceLastSingular, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnit.getEmptyTank(FluidAmount capacity, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnitBase.getEmptyTank(FluidAmount capacity)
abstract net.minecraft.text.Text
FluidUnitBase.getEmptyTank(FluidAmount capacity, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnitSet.getEmptyTank(FluidAmount capacity, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnit.getFlowRate(FluidAmount amountPerTick, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnitBase.getFlowRate(FluidAmount amountPerTick)
net.minecraft.text.Text
FluidUnitBase.getFlowRate(FluidAmount amountPerTick, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnitBase.getFlowRate(FluidAmount amountPerTick, net.minecraft.text.Text fluidName)
abstract net.minecraft.text.Text
FluidUnitBase.getFlowRate(FluidAmount amountPerTick, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnitSet.getFlowRate(FluidAmount amountPerTick, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnit.getFullTank(FluidAmount capacity, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnitBase.getFullTank(FluidAmount capacity)
net.minecraft.text.Text
FluidUnitBase.getFullTank(FluidAmount capacity, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnitBase.getFullTank(FluidAmount capacity, net.minecraft.text.Text fluidName)
abstract net.minecraft.text.Text
FluidUnitBase.getFullTank(FluidAmount capacity, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnitSet.getFullTank(FluidAmount capacity, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
List<net.minecraft.text.Text>
FluidVolume.getFullTooltip(FluidAmount capacity)
Simple getter for retrieving the entire fluid tooltip, instead of adding it to an already-existing list.List<net.minecraft.text.Text>
FluidVolume.getFullTooltip(FluidAmount capacity, FluidTooltipContext context)
Simple getter for retrieving the entire fluid tooltip, instead of adding it to an already-existing list.net.minecraft.text.Text
FluidUnit.getPartialTank(FluidAmount amount, FluidAmount capacity, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnitBase.getPartialTank(FluidAmount amount, FluidAmount capacity)
net.minecraft.text.Text
FluidUnitBase.getPartialTank(FluidAmount amount, FluidAmount capacity, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnitBase.getPartialTank(FluidAmount amount, FluidAmount capacity, net.minecraft.text.Text fluidName)
abstract net.minecraft.text.Text
FluidUnitBase.getPartialTank(FluidAmount amount, FluidAmount capacity, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnitSet.getPartialTank(FluidAmount amount, FluidAmount capacity, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnitBase.getTank(FluidAmount amount, FluidAmount capacity)
net.minecraft.text.Text
FluidUnitBase.getTank(FluidAmount amount, FluidAmount capacity, FluidTooltipContext ctx)
net.minecraft.text.Text
FluidUnitBase.getTank(FluidAmount amount, FluidAmount capacity, net.minecraft.text.Text fluidName)
net.minecraft.text.Text
FluidUnitBase.getTank(FluidAmount amount, FluidAmount capacity, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
FluidUnit.localizeAmount(FluidAmount amount, boolean forceSingular, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
FluidUnitBase.localizeAmount(FluidAmount amount)
FluidUnitBase.localizeAmount(FluidAmount amount, boolean forceSingular)
FluidUnitBase.localizeAmount(FluidAmount amount, boolean forceSingular, FluidTooltipContext ctx)
FluidUnitBase.localizeAmount(FluidAmount amount, boolean forceSingular, net.minecraft.text.Text fluidName)
abstract String
FluidUnitBase.localizeAmount(FluidAmount amount, boolean forceSingular, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
FluidUnitBase.localizeAmount(FluidAmount amount, FluidTooltipContext ctx)
FluidUnitBase.localizeAmount(FluidAmount amount, net.minecraft.text.Text fluidName)
FluidUnitBase.localizeAmount(FluidAmount amount, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
FluidUnitSet.localizeAmount(FluidAmount amount, boolean forceLastSingular, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
FluidUnit.localizeEmptyTank(FluidAmount capacity, FluidTooltipContext ctx)
FluidUnitBase.localizeEmptyTank(FluidAmount capacity)
abstract String
FluidUnitBase.localizeEmptyTank(FluidAmount capacity, FluidTooltipContext ctx)
FluidUnitSet.localizeEmptyTank(FluidAmount capacity, FluidTooltipContext ctx)
FluidUnit.localizeFlowRate(FluidAmount amountPerTick, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
FluidUnitBase.localizeFlowRate(FluidAmount amountPerTick)
FluidUnitBase.localizeFlowRate(FluidAmount amountPerTick, FluidTooltipContext ctx)
FluidUnitBase.localizeFlowRate(FluidAmount amountPerTick, net.minecraft.text.Text fluidName)
abstract String
FluidUnitBase.localizeFlowRate(FluidAmount amountPerTick, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
FluidUnitSet.localizeFlowRate(FluidAmount amountPerTick, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
FluidUnit.localizeFullTank(FluidAmount capacity, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
FluidUnitBase.localizeFullTank(FluidAmount capacity)
FluidUnitBase.localizeFullTank(FluidAmount capacity, FluidTooltipContext ctx)
FluidUnitBase.localizeFullTank(FluidAmount capacity, net.minecraft.text.Text fluidName)
abstract String
FluidUnitBase.localizeFullTank(FluidAmount capacity, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
FluidUnitSet.localizeFullTank(FluidAmount capacity, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
FluidVolume.localizeInTank(FluidAmount capacity)
FluidVolume.localizeInTank(FluidAmount capacity, FluidTooltipContext ctx)
FluidUnit.localizePartialTank(FluidAmount amount, FluidAmount capacity, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
FluidUnitBase.localizePartialTank(FluidAmount amount, FluidAmount capacity)
FluidUnitBase.localizePartialTank(FluidAmount amount, FluidAmount capacity, FluidTooltipContext ctx)
FluidUnitBase.localizePartialTank(FluidAmount amount, FluidAmount capacity, net.minecraft.text.Text fluidName)
abstract String
FluidUnitBase.localizePartialTank(FluidAmount amount, FluidAmount capacity, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
FluidUnitSet.localizePartialTank(FluidAmount amount, FluidAmount capacity, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
FluidUnitBase.localizeTank(FluidAmount amount, FluidAmount capacity)
FluidUnitBase.localizeTank(FluidAmount amount, FluidAmount capacity, FluidTooltipContext ctx)
FluidUnitBase.localizeTank(FluidAmount amount, FluidAmount capacity, net.minecraft.text.Text fluidName)
FluidUnitBase.localizeTank(FluidAmount amount, FluidAmount capacity, net.minecraft.text.Text fluidName, FluidTooltipContext ctx)
protected abstract T
FluidProperty.merge(FluidVolume volumeA, FluidVolume volumeB, FluidAmount amount, T valueA, T valueB)
Merges two values together, using the twoFluidVolume
s for context.protected void
FluidVolume.setAmount(FluidAmount newAmount)
Protected to allow the implementation ofFluidVolume.split(FluidAmount)
andFluidVolume.merge0(FluidVolume, FluidMergeRounding)
to set the amount.FluidKey.FluidKeyBuilder.setCohesion(FluidAmount to)
Sets theFluidKey.cohesion
property to the givenFluidAmount
, or null to use the default value.FluidKey.FluidKeyBuilder.setDensity(FluidAmount to)
Sets theFluidKey.density
property to the givenFluidAmount
, or null to use the default value.FluidKey.FluidKeyBuilder.setNetherCohesion(FluidAmount to)
Sets theFluidKey.netherCohesion
property to the givenFluidAmount
, or null to use the default value.FluidKey.FluidKeyBuilder.setNetherViscosity(FluidAmount to)
Sets theFluidKey.netherViscosity
property to the givenFluidAmount
, or null to use the default value.FluidKey.FluidKeyBuilder.setThermalCapacity(FluidAmount to)
Sets theFluidKey.thermalCapacity
property to the givenFluidAmount
, or null to use the default value.FluidKey.FluidKeyBuilder.setViscosity(FluidAmount to)
Sets theFluidKey.viscosity
property to the givenFluidAmount
, or null to use the default value.FluidVolume.split(FluidAmount toRemove)
Splits off the given amount of fluid and returns it, reducing this amount as well.
If the given amount is greater than this then the returnedFluidVolume
will have an amount equal to this amount, and not the amount given.FluidVolume.split(FluidAmount toRemove, RoundingMode rounding)
Splits off the given amount of fluid and returns it, reducing this amount as well.
If the given amount is greater than this then the returnedFluidVolume
will have an amount equal to this amount, and not the amount given.protected FluidVolume
ColouredFluidVolume.split0(FluidAmount toTake, RoundingMode rounding)
protected FluidVolume
FluidVolume.split0(FluidAmount toTake, RoundingMode rounding)
protected WeightedFluidVolume<T>
WeightedFluidVolume.split0(FluidAmount toTake, RoundingMode rounding)
BiomeSourcedFluidKey.withAmount(FluidAmount amount)
BiomeSourcedFluidKey.withAmount(net.minecraft.world.biome.Biome source, FluidAmount amount)
ColouredFluidKey.withAmount(FluidAmount amount)
FluidKey.withAmount(FluidAmount amount)
FluidVolume.withAmount(FluidAmount newAmount)
Creates a copy of this fluid with the given amount.NormalFluidKey.withAmount(FluidAmount amount)
Deprecated, for removal: This API element is subject to removal in a future version.PotionFluidKey.withAmount(FluidAmount amount)
SimpleFluidKey.withAmount(FluidAmount amount)
WeightedFluidKey.withAmount(FluidAmount amount)
abstract WeightedFluidVolume<T>
WeightedFluidKey.withAmount(T value, FluidAmount amount)
Modifier and TypeMethodDescriptionvoid
WeightedFluidVolume.addAmounts(Map<T,FluidAmount> sources)
protected void
WeightedFluidVolume.readValuesFromMcBuffer(net.minecraft.network.PacketByteBuf buffer, Map<T,FluidAmount> map)
protected void
WeightedFluidVolume.writeValuesToMcBuffer(net.minecraft.network.PacketByteBuf buffer, Map<T,FluidAmount> map)
ModifierConstructorDescriptionBiomeSourcedFluidVolume(BiomeSourcedFluidKey key, FluidAmount amount)
BiomeSourcedFluidVolume(BiomeSourcedFluidKey key, net.minecraft.world.biome.Biome source, FluidAmount amount)
ColouredFluidVolume(ColouredFluidKey key, FluidAmount amount)
FluidUnit(FluidAmount unitAmount, String key)
FluidVolume(FluidKey key, FluidAmount amount)
PotionFluidVolume(PotionFluidKey key, FluidAmount amount)
protected
SimpleFluidVolume(SimpleFluidKey key, FluidAmount amount)
WeightedFluidVolume(WeightedFluidKey<T> key, T value, FluidAmount amount)
FixedFluidInv.extractFluid(int, FluidFilter, FluidVolume, FluidAmount, Simulation)