1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-12-05 13:58:06 +00:00

Make printout recipes a little more flexible

Rather than having one single hard-coded recipe, we now have separate
recipes for printed pages and printed books. These recipes are defined
in terms of

 - A list of ingredients (like shapeless recipes).
 - A result item.
 - An ingredient defining the acceptable page items (so printed page(s),
   but not books). This cannot overlap with any of the main ingredients.
 - The minimum number of printouts required.

We then override the shapeless recipe crafting logic to allow for
multiple printouts to appear.

It feels like it'd be nice to generalise this to a way of defining
shapeless recipes with variable-count ingredients (for instance, the
disk recipe could also be defined this way), but I don't think it's
worth it right now.

This solves some of the issues in #1755. Disk recipes have not been
changed yet.
This commit is contained in:
Jonathan Coates
2024-05-09 18:47:22 +01:00
parent 2c0d8263d3
commit ad70e2ad90
10 changed files with 162 additions and 107 deletions

View File

@@ -130,6 +130,7 @@ loom {
runs {
configureEach {
ideConfigGenerated(true)
property("fabric-tag-conventions-v2.missingTagTranslationWarning", "VERBOSE")
}
named("client") {

View File

@@ -1,6 +1,12 @@
{
"type": "computercraft:impostor_shapeless",
"type": "computercraft:printout",
"category": "redstone",
"ingredients": [{"item": "minecraft:leather"}, {"item": "computercraft:printed_page"}, {"tag": "c:strings"}],
"ingredients": [{"item": "minecraft:leather"}, {"tag": "c:strings"}],
"min_printouts": 1,
"printout": [
{"item": "computercraft:printed_page"},
{"item": "computercraft:printed_pages"},
{"item": "minecraft:paper"}
],
"result": {"count": 1, "id": "computercraft:printed_book"}
}