Class FluidIngredient
java.lang.Object
com.simibubi.create.foundation.fluid.FluidIngredient
- All Implemented Interfaces:
Predicate<net.neoforged.neoforge.fluids.FluidStack>
- Direct Known Subclasses:
FluidIngredient.FluidStackIngredient,FluidIngredient.FluidTagIngredient
public abstract sealed class FluidIngredient
extends Object
implements Predicate<net.neoforged.neoforge.fluids.FluidStack>
permits FluidIngredient.FluidStackIngredient, FluidIngredient.FluidTagIngredient
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classprotected static enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intstatic final com.mojang.serialization.Codec<FluidIngredient> static final FluidIngredientList<net.neoforged.neoforge.fluids.FluidStack> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, FluidIngredient> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract List<net.neoforged.neoforge.fluids.FluidStack> static FluidIngredientfromFluid(net.minecraft.world.level.material.Fluid fluid, int amount) static FluidIngredientfromFluidStack(net.neoforged.neoforge.fluids.FluidStack fluidStack) static FluidIngredientfromTag(net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> tag, int amount) List<net.neoforged.neoforge.fluids.FluidStack> intprotected abstract FluidIngredient.TypegetType()static FluidIngredientread(net.minecraft.network.RegistryFriendlyByteBuf buffer) protected abstract voidreadInternal(net.minecraft.network.RegistryFriendlyByteBuf buffer) booleantest(net.neoforged.neoforge.fluids.FluidStack t) protected abstract booleantestInternal(net.neoforged.neoforge.fluids.FluidStack t) static voidwrite(net.minecraft.network.RegistryFriendlyByteBuf buffer, FluidIngredient ingredient) protected abstract voidwriteInternal(net.minecraft.network.RegistryFriendlyByteBuf buffer)
-
Field Details
-
EMPTY
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,FluidIngredient> STREAM_CODEC -
matchingFluidStacks
-
amountRequired
protected int amountRequired
-
-
Constructor Details
-
FluidIngredient
public FluidIngredient()
-
-
Method Details
-
fromTag
public static FluidIngredient fromTag(net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> tag, int amount) -
fromFluid
-
fromFluidStack
-
getRequiredAmount
public int getRequiredAmount() -
testInternal
protected abstract boolean testInternal(net.neoforged.neoforge.fluids.FluidStack t) -
readInternal
protected abstract void readInternal(net.minecraft.network.RegistryFriendlyByteBuf buffer) -
writeInternal
protected abstract void writeInternal(net.minecraft.network.RegistryFriendlyByteBuf buffer) -
determineMatchingFluidStacks
-
getType
-
getMatchingFluidStacks
-
test
public boolean test(net.neoforged.neoforge.fluids.FluidStack t) -
write
public static void write(net.minecraft.network.RegistryFriendlyByteBuf buffer, FluidIngredient ingredient) -
read
-