Package dev.architectury.fluid
Class FluidStack
java.lang.Object
dev.architectury.fluid.FluidStack
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic long
copy()
copyWithAmount
(long amount) static FluidStack
create
(FluidStack stack, long amount) static FluidStack
static FluidStack
create
(Supplier<net.minecraft.world.level.material.Fluid> fluid, long amount, @Nullable net.minecraft.nbt.CompoundTag tag) static FluidStack
create
(net.minecraft.world.level.material.Fluid fluid, long amount) static FluidStack
create
(net.minecraft.world.level.material.Fluid fluid, long amount, @Nullable net.minecraft.nbt.CompoundTag tag) static FluidStack
empty()
boolean
long
@Nullable net.minecraft.nbt.CompoundTag
getChildTag
(String childName) net.minecraft.world.level.material.Fluid
getFluid()
net.minecraft.network.chat.Component
getName()
net.minecraft.nbt.CompoundTag
getOrCreateChildTag
(String childName) net.minecraft.nbt.CompoundTag
@Nullable net.minecraft.world.level.material.Fluid
Supplier<net.minecraft.world.level.material.Fluid>
@Nullable net.minecraft.nbt.CompoundTag
getTag()
void
grow
(long amount) int
hashCode()
boolean
hasTag()
static void
init()
boolean
isEmpty()
boolean
isFluidEqual
(FluidStack other) boolean
isFluidStackEqual
(FluidStack other) boolean
isTagEqual
(FluidStack other) static FluidStack
read
(net.minecraft.nbt.CompoundTag tag) static FluidStack
read
(net.minecraft.network.FriendlyByteBuf buf) void
removeChildTag
(String childName) void
setAmount
(long amount) void
setTag
(@Nullable net.minecraft.nbt.CompoundTag tag) void
shrink
(long amount) net.minecraft.nbt.CompoundTag
write
(net.minecraft.nbt.CompoundTag tag) void
write
(net.minecraft.network.FriendlyByteBuf buf)
-
Method Details
-
empty
-
create
public static FluidStack create(net.minecraft.world.level.material.Fluid fluid, long amount, @Nullable @Nullable net.minecraft.nbt.CompoundTag tag) -
create
-
create
public static FluidStack create(Supplier<net.minecraft.world.level.material.Fluid> fluid, long amount, @Nullable @Nullable net.minecraft.nbt.CompoundTag tag) -
create
public static FluidStack create(Supplier<net.minecraft.world.level.material.Fluid> fluid, long amount) -
create
-
bucketAmount
public static long bucketAmount() -
getFluid
public net.minecraft.world.level.material.Fluid getFluid() -
getRawFluid
@Nullable public @Nullable net.minecraft.world.level.material.Fluid getRawFluid() -
getRawFluidSupplier
-
isEmpty
public boolean isEmpty() -
getAmount
public long getAmount() -
setAmount
public void setAmount(long amount) -
grow
public void grow(long amount) -
shrink
public void shrink(long amount) -
hasTag
public boolean hasTag() -
getTag
@Nullable public @Nullable net.minecraft.nbt.CompoundTag getTag() -
setTag
public void setTag(@Nullable @Nullable net.minecraft.nbt.CompoundTag tag) -
getOrCreateTag
public net.minecraft.nbt.CompoundTag getOrCreateTag() -
getChildTag
-
getOrCreateChildTag
-
removeChildTag
-
getName
public net.minecraft.network.chat.Component getName() -
getTranslationKey
-
copy
-
hashCode
public int hashCode() -
equals
-
isFluidStackEqual
-
isFluidEqual
-
isTagEqual
-
read
-
read
-
write
public void write(net.minecraft.network.FriendlyByteBuf buf) -
write
public net.minecraft.nbt.CompoundTag write(net.minecraft.nbt.CompoundTag tag) -
copyWithAmount
-
init
@Internal public static void init()
-