Class MCFluidStackMutable
java.lang.Object
com.blamejared.crafttweaker.api.fluid.MCFluidStackMutable
- All Implemented Interfaces:
CommandStringDisplayable,IFluidStack
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongGets the fluid amount in MilliBuckets (mB).net.minecraft.world.level.material.FluidgetFluid()Retrieves this fluid stack's fluid.net.minecraftforge.fluids.FluidStackGets a copy of the internal FluidStack that this IFluidStack is based on.net.minecraftforge.fluids.FluidStackGets the internal FluidStack that this IFluidStack is based on.net.minecraft.nbt.CompoundTaggetTag()Returns the NBT tag attached to this FluidStack.inthashCode()booleanhasTag()Returns true if this FluidStack has a TagbooleanisEmpty()Gets whether this fluid stack is empty.booleansetAmount(int amount) Sets the fluid amount in MilliBuckets (mB)Sets the tag for the FluidStack.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.blamejared.crafttweaker.api.fluid.IFluidStack
asFluidIngredient, asIData, asImmutable, asList, asMutable, copy, getCommandString, getRegistryName, isFluidEqual, matches
-
Constructor Details
-
MCFluidStackMutable
public MCFluidStackMutable(net.minecraftforge.fluids.FluidStack stack)
-
-
Method Details
-
isEmpty
public boolean isEmpty()Description copied from interface:IFluidStackGets whether this fluid stack is empty.- Specified by:
isEmptyin interfaceIFluidStack- Returns:
trueif this stack is empty,falseotherwise.
-
getAmount
public long getAmount()Description copied from interface:IFluidStackGets the fluid amount in MilliBuckets (mB).- Specified by:
getAmountin interfaceIFluidStack- Returns:
- The amount of this fluid
-
setAmount
Description copied from interface:IFluidStackSets the fluid amount in MilliBuckets (mB)- Specified by:
setAmountin interfaceIFluidStack- Parameters:
amount- The amount to multiply this stack- Returns:
- A new stack, or this stack, depending on if this stack is mutable
-
isImmutable
public boolean isImmutable()- Specified by:
isImmutablein interfaceIFluidStack
-
getFluid
public net.minecraft.world.level.material.Fluid getFluid()Description copied from interface:IFluidStackRetrieves this fluid stack's fluid.- Specified by:
getFluidin interfaceIFluidStack- Returns:
- The fluid.
-
withTag
Description copied from interface:IFluidStackSets the tag for the FluidStack.- Specified by:
withTagin interfaceIFluidStack- Parameters:
tag- The tag to set.- Returns:
- This FluidStack if it is mutable, a new one with the changed property otherwise
-
hasTag
public boolean hasTag()Description copied from interface:IFluidStackReturns true if this FluidStack has a Tag- Specified by:
hasTagin interfaceIFluidStack- Returns:
- true if tag is present.
-
getInternalTag
public net.minecraft.nbt.CompoundTag getInternalTag()- Specified by:
getInternalTagin interfaceIFluidStack
-
getTag
Description copied from interface:IFluidStackReturns the NBT tag attached to this FluidStack.- Specified by:
getTagin interfaceIFluidStack- Returns:
- MapData of the FluidStack's NBT Tag, null if it doesn't exist.
-
getInternal
public net.minecraftforge.fluids.FluidStack getInternal()Description copied from interface:IFluidStackGets the internal FluidStack that this IFluidStack is based on. On Forge, this will be anet.minecraftforge.fluids.FluidStack. On Fabric, this will be acom.blamejared.crafttweaker.impl.fluid.SimpleFluidStackYou may need to specify the type in the call itself at times, like soiFluidStack.<FluidStack>getInternal().getFluid()oriFluidStack.<SimpleFluidStack>getInternal().fluid()- Specified by:
getInternalin interfaceIFluidStack- Returns:
- The internal FluidStack that this IFluidStack is based on.
-
getImmutableInternal
public net.minecraftforge.fluids.FluidStack getImmutableInternal()Description copied from interface:IFluidStackGets a copy of the internal FluidStack that this IFluidStack is based on. On Forge, this will be anet.minecraftforge.fluids.FluidStack. On Fabric, this will be acom.blamejared.crafttweaker.impl.fluid.SimpleFluidStackYou may need to specify the type in the call itself at times, like soiFluidStack.<FluidStack>getInternal().getFluid()oriFluidStack.<SimpleFluidStack>getInternal().fluid()- Specified by:
getImmutableInternalin interfaceIFluidStack- Returns:
- A copy of the FluidStack that this IFluidStack is based on.
-
equals
-
hashCode
public int hashCode()
-