Package org.cyclops.cyclopscore.helper
Class RecipeSerializerHelpers
java.lang.Object
org.cyclops.cyclopscore.helper.RecipeSerializerHelpers
Helpers related to recipe serialization.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraftforge.fluids.FluidStack
deserializeFluidStack
(com.google.gson.JsonObject json, boolean readNbt) static net.minecraftforge.fluids.FluidStack
getJsonFluidStack
(com.google.gson.JsonObject json, String key, boolean required) static net.minecraft.world.item.crafting.Ingredient
getJsonIngredient
(com.google.gson.JsonObject json, String key, boolean required) static net.minecraft.world.item.ItemStack
getJsonItemStack
(com.google.gson.JsonObject json, String key, boolean required) static ItemStackFromIngredient
getJsonItemStackFromTag
(com.google.gson.JsonObject json, String key) Deprecated.static ItemStackFromIngredient
getJsonItemStackFromTag
(com.google.gson.JsonObject json, String key, List<String> modPriorities) static com.mojang.datafixers.util.Either<net.minecraft.world.item.ItemStack,
ItemStackFromIngredient> getJsonItemStackOrTag
(com.google.gson.JsonObject json, boolean required) Deprecated.static com.mojang.datafixers.util.Either<net.minecraft.world.item.ItemStack,
ItemStackFromIngredient> getJsonItemStackOrTag
(com.google.gson.JsonObject json, boolean required, List<String> modPriorities) static com.mojang.datafixers.util.Either<net.minecraft.world.item.ItemStack,
ItemStackFromIngredient> readItemStackOrItemStackIngredient
(net.minecraft.network.FriendlyByteBuf buffer) static void
writeItemStackOrItemStackIngredient
(net.minecraft.network.FriendlyByteBuf buffer, com.mojang.datafixers.util.Either<net.minecraft.world.item.ItemStack, ItemStackFromIngredient> itemStackOrItemStackIngredient)
-
Constructor Details
-
RecipeSerializerHelpers
public RecipeSerializerHelpers()
-
-
Method Details
-
getJsonIngredient
public static net.minecraft.world.item.crafting.Ingredient getJsonIngredient(com.google.gson.JsonObject json, String key, boolean required) -
getJsonItemStackOrTag
@Deprecated public static com.mojang.datafixers.util.Either<net.minecraft.world.item.ItemStack,ItemStackFromIngredient> getJsonItemStackOrTag(com.google.gson.JsonObject json, boolean required) Deprecated. -
getJsonItemStackOrTag
public static com.mojang.datafixers.util.Either<net.minecraft.world.item.ItemStack,ItemStackFromIngredient> getJsonItemStackOrTag(com.google.gson.JsonObject json, boolean required, List<String> modPriorities) -
getJsonItemStack
public static net.minecraft.world.item.ItemStack getJsonItemStack(com.google.gson.JsonObject json, String key, boolean required) -
getJsonItemStackFromTag
@Deprecated public static ItemStackFromIngredient getJsonItemStackFromTag(com.google.gson.JsonObject json, String key) Deprecated. -
getJsonItemStackFromTag
public static ItemStackFromIngredient getJsonItemStackFromTag(com.google.gson.JsonObject json, String key, List<String> modPriorities) -
deserializeFluidStack
public static net.minecraftforge.fluids.FluidStack deserializeFluidStack(com.google.gson.JsonObject json, boolean readNbt) -
getJsonFluidStack
public static net.minecraftforge.fluids.FluidStack getJsonFluidStack(com.google.gson.JsonObject json, String key, boolean required) -
writeItemStackOrItemStackIngredient
public static void writeItemStackOrItemStackIngredient(net.minecraft.network.FriendlyByteBuf buffer, com.mojang.datafixers.util.Either<net.minecraft.world.item.ItemStack, ItemStackFromIngredient> itemStackOrItemStackIngredient) -
readItemStackOrItemStackIngredient
public static com.mojang.datafixers.util.Either<net.minecraft.world.item.ItemStack,ItemStackFromIngredient> readItemStackOrItemStackIngredient(net.minecraft.network.FriendlyByteBuf buffer)
-