Class FluidIngredient
java.lang.Object
com.simibubi.create.foundation.fluid.FluidIngredient
- All Implemented Interfaces:
Predicate<net.minecraftforge.fluids.FluidStack>
- Direct Known Subclasses:
FluidIngredient.FluidStackIngredient,FluidIngredient.FluidTagIngredient
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intstatic final FluidIngredientList<net.minecraftforge.fluids.FluidStack> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FluidIngredientdeserialize(com.google.gson.JsonElement je) protected abstract List<net.minecraftforge.fluids.FluidStack>static FluidIngredientfromFluid(net.minecraft.world.level.material.Fluid fluid, int amount) static FluidIngredientfromFluidStack(net.minecraftforge.fluids.FluidStack fluidStack) static FluidIngredientfromTag(net.minecraft.tags.Tag.Named<net.minecraft.world.level.material.Fluid> tag, int amount) List<net.minecraftforge.fluids.FluidStack>intstatic booleanisFluidIngredient(com.google.gson.JsonElement je) static FluidIngredientread(net.minecraft.network.FriendlyByteBuf buffer) protected abstract voidreadInternal(com.google.gson.JsonObject json) protected abstract voidreadInternal(net.minecraft.network.FriendlyByteBuf buffer) com.google.gson.JsonObjectbooleantest(net.minecraftforge.fluids.FluidStack t) protected abstract booleantestInternal(net.minecraftforge.fluids.FluidStack t) voidwrite(net.minecraft.network.FriendlyByteBuf buffer) protected abstract voidwriteInternal(com.google.gson.JsonObject json) protected abstract voidwriteInternal(net.minecraft.network.FriendlyByteBuf buffer)
-
Field Details
-
EMPTY
-
matchingFluidStacks
-
amountRequired
protected int amountRequired
-
-
Constructor Details
-
FluidIngredient
public FluidIngredient()
-
-
Method Details
-
fromTag
public static FluidIngredient fromTag(net.minecraft.tags.Tag.Named<net.minecraft.world.level.material.Fluid> tag, int amount) -
fromFluid
-
fromFluidStack
-
testInternal
protected abstract boolean testInternal(net.minecraftforge.fluids.FluidStack t) -
readInternal
protected abstract void readInternal(net.minecraft.network.FriendlyByteBuf buffer) -
writeInternal
protected abstract void writeInternal(net.minecraft.network.FriendlyByteBuf buffer) -
readInternal
protected abstract void readInternal(com.google.gson.JsonObject json) -
writeInternal
protected abstract void writeInternal(com.google.gson.JsonObject json) -
determineMatchingFluidStacks
-
getRequiredAmount
public int getRequiredAmount() -
getMatchingFluidStacks
-
test
public boolean test(net.minecraftforge.fluids.FluidStack t) -
write
public void write(net.minecraft.network.FriendlyByteBuf buffer) -
read
-
serialize
public com.google.gson.JsonObject serialize() -
isFluidIngredient
public static boolean isFluidIngredient(@Nullable com.google.gson.JsonElement je) -
deserialize
-