Pressing recipes

This commit is contained in:
2026-10-15 12:32:16 -03:00
parent 74c315bdfc
commit 7faa070d83
15 changed files with 335 additions and 35 deletions
+29 -25
View File
@@ -5,9 +5,9 @@ redstone, contraptions, trains, equipment, decoration and schematics. It aims to
possible, and to stay fast on both the server and the client when a world has thousands of moving parts.
Built so far: the importer and Create's imported blocks and items, R1, R2, R3 (`transformed` and `rotating`), R4, R5,
R8, S0, S7, S12, stonecutting from S9, and the start of P1's kinetics: shafts and cogwheels turned by a hand crank.
Facts about Create come from reading `ports/create1.21.1` and `ports/create1.19.3`, and facts about bworld from its
source.
R8, S0, S7, S12, stonecutting from S9, the start of P1's kinetics (shafts and cogwheels turned by a hand crank), and
Create's pressing recipes. Facts about Create come from reading `ports/create1.21.1` and `ports/create1.19.3`, and facts
about bworld from its source.
## Sources
@@ -108,19 +108,19 @@ shared tags to `c`, which is what bworld calls them. A mod's remap file is where
**Kinds:**
| Kind | Java | bworld | Status |
| ------------ | -------------------------------------------- | ---------------------------------------------------------------------- | ------ |
| `model` | `assets/*/models/**.json` | `models/`, parents kept, faces renamed, Blockbench extras dropped | Built |
| `texture` | `assets/*/textures/**.png` and `.png.mcmeta` | `textures/`, with animations | Built |
| `blockstate` | `assets/*/blockstates/*.json` | `blocks/*.json` with `variants` or `parts`, string states made numeric | Built |
| `item` | `assets/*/models/item/*.json` | `items/*.json` for items that aren't a block's, with their sprite | Built |
| `lang` | `assets/*/lang/en_us.json` | item and block names | |
| `recipe` | `data/*/recipe(s)/**.json` | `recipes/`: vanilla types to bworld's. Stonecutting so far | Built |
| `tag` | `data/*/tags/**.json` | `tags/`, Forge's shared tags as `c:`, missing entries optional | Built |
| `loot` | `data/*/loot_table(s)/**.json` | `drops`, or loot tables | |
| `worldgen` | `data/*/worldgen/**.json` | `worldgen/`: ores, and features where bworld has them | |
| `sound` | `assets/*/sounds.json`, `sounds/**.ogg` | sounds, once the engine has them (S8) | |
| `mod` | all of the above | a whole mod folder with a manifest, and one report | |
| Kind | Java | bworld | Status |
| ------------ | -------------------------------------------- | ----------------------------------------------------------------------- | ------ |
| `model` | `assets/*/models/**.json` | `models/`, parents kept, faces renamed, Blockbench extras dropped | Built |
| `texture` | `assets/*/textures/**.png` and `.png.mcmeta` | `textures/`, with animations | Built |
| `blockstate` | `assets/*/blockstates/*.json` | `blocks/*.json` with `variants` or `parts`, string states made numeric | Built |
| `item` | `assets/*/models/item/*.json` | `items/*.json` for items that aren't a block's, with their sprite | Built |
| `lang` | `assets/*/lang/en_us.json` | item and block names | |
| `recipe` | `data/*/recipe(s)/**.json` | `recipes/`: vanilla types to bworld's. Stonecutting and pressing so far | Built |
| `tag` | `data/*/tags/**.json` | `tags/`, Forge's shared tags as `c:`, missing entries optional | Built |
| `loot` | `data/*/loot_table(s)/**.json` | `drops`, or loot tables | |
| `worldgen` | `data/*/worldgen/**.json` | `worldgen/`: ores, and features where bworld has them | |
| `sound` | `assets/*/sounds.json`, `sounds/**.ogg` | sounds, once the engine has them (S8) | |
| `mod` | all of the above | a whole mod folder with a manifest, and one report | |
Block properties (shape, tool, toughness) aren't in any data file: Java mods set them in code. `mod` writes a block for
each blockstate with placeholder properties, and a per-mod table fills them in. For Create that table is
@@ -170,12 +170,14 @@ about 31 vanilla textures bworld doesn't have yet. The 132 blockstates that use
keeping folders in tag ids. An entry that doesn't exist here becomes optional (`required: false`), so the tag loads now
and picks it up once it's added, and what the remaps skip is left out. `recipe` converts each type bworld has an
equivalent for and reports the rest by type. A recipe naming an item or tag that doesn't exist here, or that only loads
under a condition (another mod installed), is skipped, since bworld's recipes have to be complete. Only
`minecraft:stonecutting` is converted so far, to `bworld:stonecutting`.
under a condition (another mod installed), is skipped, since bworld's recipes have to be complete. So far
`minecraft:stonecutting` is converted to `bworld:stonecutting`, and `create:pressing` keeps its type in the shape in
[Recipes](#recipes), from 0.5's and 6.0's JSON alike.
Create 0.5.0.j's data gives 89 tags: 45 of Create's and 44 of Forge's shared ones, which are `c:` here. Fluid tags are
skipped. Of its 531 stonecutting recipes, 423 are converted. The other 108 cut granite, diorite, deepslate, calcite,
tuff and dripstone, which bworld doesn't have yet. Re-importing once it does brings them in.
tuff and dripstone, which bworld doesn't have yet. Re-importing once it does brings them in. Of its 6 pressing recipes,
4 are converted, ingots into sheets. Sugar cane into paper and grass into dirt paths wait for those items.
**For Create**, `mods/create/import/` keeps the remap file, the block table and the commands. Re-running the import is
one command, and hand-written files are never in the folders it writes.
@@ -408,22 +410,24 @@ All 19 of Create's types, plus the vanilla types its data uses:
| `filling`, `emptying` | 24 | spout, item drain | P5 |
| `toolbox_dyeing`, `item_copying`, `conversion` | — | built-in, special | P9 |
Create's own types stay in Create's format inside bworld's envelope:
Create's own types keep Create's shape inside bworld's envelope, but with bworld's item choices (an id, a `#tag`, or a
list of those any of which fits) in place of Java's `{ item }` and `{ tag }`, like every other recipe here:
```json
{
"format_version": 1,
"recipe": {
"type": "create:pressing",
"ingredients": [{ "tag": "c:ingots/iron" }],
"results": [{ "id": "create:iron_sheet" }]
"ingredients": ["#c:ingots/iron"],
"results": [{ "id": "create:iron_sheet", "count": 1 }]
}
}
```
`scripts/recipes/` parses all of them in one place: ingredients as `{ item }`, `{ tag }`, lists of those, or sized fluid
ingredients; results as `{ id, count, chance }` or fluid stacks; `processing_time` and `heat_requirement`. It checks
each type's input and output limits, which come from each recipe class's `getMaxInputCount` and `getMaxOutputCount`. The
`scripts/recipes/` parses all of them in one place: ingredients as item choices, or sized fluid ingredients; results as
`{ id, count, chance }` or fluid stacks; `processing_time` and `heat_requirement`. Built for pressing, without fluids,
durations or heat yet, in `scripts/recipes/processing.ts`, which the server script runs in `setup`. It checks each
type's input and output limits, which come from each recipe class's `getMaxInputCount` and `getMaxOutputCount`. The
recipe viewer gets one reader for this shape, so every Create type shows with no per-type code, and animated categories
(R11) are added per machine on top.