Initial commit
This commit is contained in:
commit
e9f33a2072
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"type": "create:crushing",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "ironchests:copper_chest"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "minecraft:chest",
|
||||
"count": 1,
|
||||
"chance": 0.9
|
||||
},
|
||||
{
|
||||
"item": "minecraft:copper_ingot",
|
||||
"count": 6,
|
||||
"chance": 1
|
||||
},
|
||||
{
|
||||
"item": "create:copper_nugget",
|
||||
"count": 6,
|
||||
"chance": 0.75
|
||||
}
|
||||
],
|
||||
"processingTime": 300
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"type": "create:crushing",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "ironchests:crystal_chest"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "ironchests:diamond_chest",
|
||||
"count": 1,
|
||||
"chance": 0.9
|
||||
},
|
||||
{
|
||||
"item": "minecraft:glass",
|
||||
"count": 3,
|
||||
"chance": 1
|
||||
},
|
||||
{
|
||||
"item": "minecraft:glass",
|
||||
"count": 3,
|
||||
"chance": 0.5
|
||||
},
|
||||
{
|
||||
"item": "minecraft:amethyst_shard",
|
||||
"count": 2,
|
||||
"chance": 0.75
|
||||
}
|
||||
],
|
||||
"processingTime": 300
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"type": "create:crushing",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "ironchests:diamond_chest"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "ironchests:golden_chest",
|
||||
"count": 1,
|
||||
"chance": 0.9
|
||||
},
|
||||
{
|
||||
"item": "minecraft:diamond",
|
||||
"count": 2,
|
||||
"chance": 1
|
||||
},
|
||||
{
|
||||
"item": "minecraft:gold_ingot",
|
||||
"count": 4,
|
||||
"chance": 1
|
||||
},
|
||||
{
|
||||
"item": "minecraft:gold_nugget",
|
||||
"count": 6,
|
||||
"chance": 0.75
|
||||
}
|
||||
],
|
||||
"processingTime": 300
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"type": "create:crushing",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "ironchests:gold_chest"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "ironchests:iron_chest",
|
||||
"count": 1,
|
||||
"chance": 0.9
|
||||
},
|
||||
{
|
||||
"item": "minecraft:gold_ingot",
|
||||
"count": 6,
|
||||
"chance": 1
|
||||
},
|
||||
{
|
||||
"item": "minecraft:gold_nugget",
|
||||
"count": 6,
|
||||
"chance": 0.75
|
||||
}
|
||||
],
|
||||
"processingTime": 300
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"type": "create:crushing",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "ironchests:iron_chest"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "ironchests:copper_chest",
|
||||
"count": 1,
|
||||
"chance": 0.9
|
||||
},
|
||||
{
|
||||
"item": "minecraft:iron_ingot",
|
||||
"count": 6,
|
||||
"chance": 1
|
||||
},
|
||||
{
|
||||
"item": "minecraft:iron_nugget",
|
||||
"count": 6,
|
||||
"chance": 0.75
|
||||
}
|
||||
],
|
||||
"processingTime": 300
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"type": "create:crushing",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "ironchests:obsidian_chest"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "ironchests:diamond_chest",
|
||||
"count": 1,
|
||||
"chance": 0.9
|
||||
},
|
||||
{
|
||||
"item": "minecraft:obsidian",
|
||||
"count": 6,
|
||||
"chance": 1
|
||||
},
|
||||
{
|
||||
"item": "minecraft:obsidian",
|
||||
"count": 2,
|
||||
"chance": 0.5
|
||||
},
|
||||
{
|
||||
"item": "create:powdered_obsidian",
|
||||
"count": 2,
|
||||
"chance": 0.25
|
||||
}
|
||||
],
|
||||
"processingTime": 300
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
|
||||
from dataclasses import dataclass
|
||||
from json import dump
|
||||
|
||||
@dataclass
|
||||
class RandomItemStack:
|
||||
item: str
|
||||
count: int = 1
|
||||
chance: float = 1
|
||||
|
||||
recipes: dict[str, list[RandomItemStack]] = {
|
||||
"ironchests:copper_chest": [
|
||||
RandomItemStack("minecraft:chest", 1, 0.9),
|
||||
RandomItemStack("minecraft:copper_ingot", 6, 1),
|
||||
RandomItemStack("create:copper_nugget", 6, 0.75),
|
||||
],
|
||||
"ironchests:iron_chest": [
|
||||
RandomItemStack("ironchests:copper_chest", 1, 0.9),
|
||||
RandomItemStack("minecraft:iron_ingot", 6, 1),
|
||||
RandomItemStack("minecraft:iron_nugget", 6, 0.75),
|
||||
],
|
||||
"ironchests:gold_chest": [
|
||||
RandomItemStack("ironchests:iron_chest", 1, 0.9),
|
||||
RandomItemStack("minecraft:gold_ingot", 6, 1),
|
||||
RandomItemStack("minecraft:gold_nugget", 6, 0.75),
|
||||
],
|
||||
"ironchests:diamond_chest": [
|
||||
RandomItemStack("ironchests:golden_chest", 1, 0.9),
|
||||
RandomItemStack("minecraft:diamond", 2, 1),
|
||||
RandomItemStack("minecraft:gold_ingot", 4, 1),
|
||||
RandomItemStack("minecraft:gold_nugget", 6, 0.75),
|
||||
],
|
||||
"ironchests:obsidian_chest": [
|
||||
RandomItemStack("ironchests:diamond_chest", 1, 0.9),
|
||||
RandomItemStack("minecraft:obsidian", 6, 1),
|
||||
RandomItemStack("minecraft:obsidian", 2, 0.5),
|
||||
RandomItemStack("create:powdered_obsidian", 2, 0.25),
|
||||
],
|
||||
"ironchests:crystal_chest": [
|
||||
RandomItemStack("ironchests:diamond_chest", 1, 0.9),
|
||||
RandomItemStack("minecraft:glass", 3, 1),
|
||||
RandomItemStack("minecraft:glass", 3, 0.5),
|
||||
RandomItemStack("minecraft:amethyst_shard", 2, 0.75),
|
||||
],
|
||||
}
|
||||
|
||||
for input_name, outputs in recipes.items():
|
||||
namespace, item_name = input_name.split(":", 1)
|
||||
filename = f"data/ironchests/recipes/crushing_{namespace}_{item_name}.json"
|
||||
with open(filename, "w") as fp:
|
||||
dump({
|
||||
"type": "create:crushing",
|
||||
"ingredients": [{ "item": input_name }],
|
||||
"results": [
|
||||
{
|
||||
"item": output.item,
|
||||
"count": output.count,
|
||||
"chance": output.chance
|
||||
}
|
||||
for output in outputs
|
||||
],
|
||||
"processingTime": 300
|
||||
}, fp, indent=2)
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"pack": {
|
||||
"description": "Uncrafting IronChests chests",
|
||||
"pack_format": 15
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue