Class JSONSerializableDataHandler
java.lang.Object
com.hrznstudio.titanium.recipe.serializer.JSONSerializableDataHandler
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanacceptField(Field f, Class<?> type) static <T> voidmap(Class<T> type, JSONSerializableDataHandler.Writer<T> writer, JSONSerializableDataHandler.Reader<T> reader) static <T> Tstatic net.minecraftforge.fluids.FluidStackreadFluidStack(com.google.gson.JsonElement object) static net.minecraft.world.item.ItemStackreadItemStack(com.google.gson.JsonObject object) static net.minecraft.resources.ResourceKey<?>readRegistryKey(com.google.gson.JsonElement object) static com.google.gson.JsonElementstatic com.google.gson.JsonElementwriteFluidStack(net.minecraftforge.fluids.FluidStack fluidStack) static com.google.gson.JsonObjectwriteItemStack(net.minecraft.world.item.ItemStack stack) static com.google.gson.JsonObjectwriteRegistryKey(net.minecraft.resources.ResourceKey<?> registryKey)
-
Constructor Details
-
JSONSerializableDataHandler
public JSONSerializableDataHandler()
-
-
Method Details
-
map
public static <T> void map(Class<T> type, JSONSerializableDataHandler.Writer<T> writer, JSONSerializableDataHandler.Reader<T> reader) -
acceptField
-
read
-
write
-
writeItemStack
public static com.google.gson.JsonObject writeItemStack(net.minecraft.world.item.ItemStack stack) -
writeFluidStack
public static com.google.gson.JsonElement writeFluidStack(net.minecraftforge.fluids.FluidStack fluidStack) -
readFluidStack
public static net.minecraftforge.fluids.FluidStack readFluidStack(com.google.gson.JsonElement object) -
readItemStack
public static net.minecraft.world.item.ItemStack readItemStack(com.google.gson.JsonObject object) -
writeRegistryKey
public static com.google.gson.JsonObject writeRegistryKey(net.minecraft.resources.ResourceKey<?> registryKey) -
readRegistryKey
public static net.minecraft.resources.ResourceKey<?> readRegistryKey(com.google.gson.JsonElement object)
-