forked from BloodyMods/ExNihiloCreatio
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Why is gson dumber outside my dev environment?
- Loading branch information
Showing
37 changed files
with
202 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
src/main/kotlin/exnihilofabrico/api/recipes/LeakingRecipe.kt
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
src/main/kotlin/exnihilofabrico/api/recipes/WitchWaterWorldRecipe.kt
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...ihilofabrico/api/recipes/AlchemyRecipe.kt → ...brico/api/recipes/barrel/AlchemyRecipe.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ihilofabrico/api/recipes/CompostRecipe.kt → ...brico/api/recipes/barrel/CompostRecipe.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/main/kotlin/exnihilofabrico/api/recipes/barrel/LeakingRecipe.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package exnihilofabrico.api.recipes.barrel | ||
|
||
import exnihilofabrico.api.crafting.FluidIngredient | ||
import exnihilofabrico.api.crafting.ItemIngredient | ||
import net.minecraft.block.Block | ||
import net.minecraft.block.Blocks | ||
|
||
data class LeakingRecipe(val target: ItemIngredient = ItemIngredient.EMPTY, | ||
val fluid: FluidIngredient = FluidIngredient.EMPTY, | ||
val loss: Int = 0, | ||
val result: Block = Blocks.AIR) |
2 changes: 1 addition & 1 deletion
2
...ihilofabrico/api/recipes/MilkingRecipe.kt → ...brico/api/recipes/barrel/MilkingRecipe.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...fabrico/api/recipes/CrucibleHeatRecipe.kt → ...pi/recipes/crucible/CrucibleHeatRecipe.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...hilofabrico/api/recipes/CrucibleRecipe.kt → ...co/api/recipes/crucible/CrucibleRecipe.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ico/api/recipes/WitchWaterEntityRecipe.kt → ...ipes/witchwater/WitchWaterEntityRecipe.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/main/kotlin/exnihilofabrico/api/recipes/witchwater/WitchWaterWorldRecipe.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package exnihilofabrico.api.recipes.witchwater | ||
|
||
import exnihilofabrico.api.crafting.FluidIngredient | ||
import exnihilofabrico.api.crafting.WeightedList | ||
|
||
data class WitchWaterWorldRecipe(val fluid: FluidIngredient = FluidIngredient.EMPTY, | ||
val results: WeightedList = WeightedList()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/exnihilofabrico/api/registry/ICompostRegistry.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/exnihilofabrico/api/registry/IWitchWaterEntityRegistry.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/kotlin/exnihilofabrico/json/CrucibleRecipeJson.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package exnihilofabrico.json | ||
|
||
import com.google.gson.* | ||
import exnihilofabrico.api.crafting.ItemIngredient | ||
import exnihilofabrico.api.recipes.crucible.CrucibleRecipe | ||
import exnihilofabrico.json.FluidVolumeJson.TYPE_TOKEN | ||
import java.lang.reflect.Type | ||
|
||
object CrucibleRecipeJson: JsonDeserializer<CrucibleRecipe>, JsonSerializer<CrucibleRecipe> { | ||
override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): CrucibleRecipe { | ||
val obj = json.asJsonObject | ||
return CrucibleRecipe( | ||
ItemIngredient.fromJson(obj.get("input"), context), | ||
FluidVolumeJson.deserialize(obj.get("output"), TYPE_TOKEN, context) | ||
) | ||
} | ||
|
||
override fun serialize(src: CrucibleRecipe, typeOfSrc: Type, context: JsonSerializationContext): JsonElement { | ||
val obj = JsonObject() | ||
obj.add("input", src.input.toJson(context)) | ||
obj.add("output", FluidVolumeJson.serialize(src.output, TYPE_TOKEN, context)) | ||
return obj | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.