mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-24 22:16:38 +01:00
the "count":<n> is now supported in recipe inputs, changed mixer recipes to use this new feature
This commit is contained in:
parent
4ce1f24404
commit
b9053f7902
6 changed files with 19 additions and 55 deletions
|
@ -28,8 +28,14 @@ public class ProcessingRecipeSerializer<T extends ProcessingRecipe<?>>
|
||||||
|
|
||||||
List<ProcessingIngredient> ingredients = new ArrayList<>();
|
List<ProcessingIngredient> ingredients = new ArrayList<>();
|
||||||
for (JsonElement e : JSONUtils.getJsonArray(json, "ingredients")) {
|
for (JsonElement e : JSONUtils.getJsonArray(json, "ingredients")) {
|
||||||
|
int count = 1;
|
||||||
|
if (JSONUtils.hasField((JsonObject) e, "count")) {
|
||||||
|
count = JSONUtils.getInt(e.getAsJsonObject().get("count"), "count");
|
||||||
|
}
|
||||||
|
for(int i = 0; i < count; i++) {
|
||||||
ingredients.add(ProcessingIngredient.parse(e.getAsJsonObject()));
|
ingredients.add(ProcessingIngredient.parse(e.getAsJsonObject()));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<ProcessingOutput> results = new ArrayList<>();
|
List<ProcessingOutput> results = new ArrayList<>();
|
||||||
for (JsonElement e : JSONUtils.getJsonArray(json, "results")) {
|
for (JsonElement e : JSONUtils.getJsonArray(json, "results")) {
|
||||||
|
|
|
@ -8,16 +8,8 @@
|
||||||
"item": "create:obsidian_dust"
|
"item": "create:obsidian_dust"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"item": "minecraft:blaze_powder"
|
"item": "minecraft:blaze_powder",
|
||||||
},
|
"count": 4
|
||||||
{
|
|
||||||
"item": "minecraft:blaze_powder"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item": "minecraft:blaze_powder"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item": "minecraft:blaze_powder"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"results": [
|
"results": [
|
||||||
|
|
|
@ -8,16 +8,8 @@
|
||||||
"item": "create:obsidian_dust"
|
"item": "create:obsidian_dust"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"item": "minecraft:blaze_powder"
|
"item": "minecraft:blaze_powder",
|
||||||
},
|
"count": 4
|
||||||
{
|
|
||||||
"item": "minecraft:blaze_powder"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item": "minecraft:blaze_powder"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item": "minecraft:blaze_powder"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"results": [
|
"results": [
|
||||||
|
|
|
@ -8,16 +8,8 @@
|
||||||
"item": "create:obsidian_dust"
|
"item": "create:obsidian_dust"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"item": "minecraft:blaze_powder"
|
"item": "minecraft:blaze_powder",
|
||||||
},
|
"count": 4
|
||||||
{
|
|
||||||
"item": "minecraft:blaze_powder"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item": "minecraft:blaze_powder"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item": "minecraft:blaze_powder"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"results": [
|
"results": [
|
||||||
|
|
|
@ -8,16 +8,8 @@
|
||||||
"item": "create:obsidian_dust"
|
"item": "create:obsidian_dust"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"item": "minecraft:blaze_powder"
|
"item": "minecraft:blaze_powder",
|
||||||
},
|
"count": 4
|
||||||
{
|
|
||||||
"item": "minecraft:blaze_powder"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item": "minecraft:blaze_powder"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item": "minecraft:blaze_powder"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"results": [
|
"results": [
|
||||||
|
|
|
@ -2,25 +2,15 @@
|
||||||
"type": "create:mixing",
|
"type": "create:mixing",
|
||||||
"ingredients": [
|
"ingredients": [
|
||||||
{
|
{
|
||||||
"tag": "forge:dusts/glowstone"
|
"tag": "forge:dusts/glowstone",
|
||||||
},
|
"count": 3
|
||||||
{
|
|
||||||
"tag": "forge:dusts/glowstone"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"tag": "forge:dusts/glowstone"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"item": "create:polished_rose_quartz"
|
"item": "create:polished_rose_quartz"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"item": "create:obsidian_dust"
|
"item": "create:obsidian_dust",
|
||||||
},
|
"count": 3
|
||||||
{
|
|
||||||
"item": "create:obsidian_dust"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item": "create:obsidian_dust"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"item": "minecraft:dragon_breath",
|
"item": "minecraft:dragon_breath",
|
||||||
|
|
Loading…
Reference in a new issue