Juices on the mechanical press !

This commit is contained in:
2026-10-31 00:03:03 -03:00
parent 3734f5707a
commit 23d02c5229
11 changed files with 381 additions and 62 deletions
+23 -12
View File
@@ -7,9 +7,9 @@ possible, and to stay fast on both the server and the client when a world has th
Built so far: the importer and Create's imported blocks and items, R1, R2, R3 (`transformed`, `rotating`, `fluid` and
items), R4, R5, R8, S0, S4, S7, S12, stonecutting from S9, the start of P1's kinetics (shafts, cogwheels, gearboxes,
encased shafts and cogs, clutches, gearshifts and chain drives turned by a hand crank, creative motor or water wheel,
with stress and overstress), Create's pressing recipes, the mechanical press pressing items on the ground, and the basin
holding items and fluids. Facts about Create come from reading `ports/create1.21.1` and `ports/create1.19.3`, and facts
about bworld from its source.
with stress and overstress), Create's pressing recipes, the mechanical press pressing items on the ground or compacting
in a basin, and the basin holding items and fluids. Facts about Create come from reading `ports/create1.21.1` and
`ports/create1.19.3`, and facts about bworld from its source.
## Sources
@@ -446,11 +446,12 @@ list of those any of which fits) in place of Java's `{ item }` and `{ tag }`, li
```
`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.
`{ id, count, chance }` or fluid stacks; `processing_time` and `heat_requirement`. Built for pressing and compacting,
with fluid results as `{ fluid, amount }` but no fluid ingredients, 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.
## Kinetics
@@ -610,10 +611,20 @@ stack of each, and 2 tanks of 1000 mB, a fluid each. An item that lands in it go
it, an empty one fills from its first tank, and an empty hand takes every item out, like `BasinBlock.useItemOn`. What's
in it is only its `items` and `tanks` client data, and its visual draws them like `BasinRenderer`: the fluids side by
side, filling faster at first, and the items in a ring over them, bobbing while there's fluid. Water and lava buckets
aren't fluid containers in bworld, so they don't fill it yet. Its output inventory and tanks, its facing toward an
output, and the item and fluid capabilities (S1, S2) come with mixing and the logistics that move things in and out. For
it the engine got `on_entity_stand`, and an item inside a block only floats out of it when it's inside what it bumps
into, like Minecraft's `noCollision`, so items can lie in a hollow.
aren't fluid containers in bworld, so they don't fill it yet. Its facing toward an output, and the item and fluid
capabilities (S1, S2), come with mixing and the logistics that move things in and out. For it the engine got
`on_entity_stand`, and an item inside a block only floats out of it when it's inside what it bumps into, like
Minecraft's `noCollision`, so items can lie in a hollow.
A press with a basin two blocks under it presses into the basin instead of on the ground, its head coming 22/16 of a
block down, like `PressingBehaviour`'s basin mode. Each cycle it makes the first `create:compacting` recipe that can be
made there, the ones with more ingredients first, like `BasinOperatingBlockEntity.getMatchingRecipes`, and it only
starts one when a recipe can be made. `apply_basin_recipe` in `processing/basin.ts` is `BasinRecipe.apply`: an item for
each ingredient from the basin's input items, item results into its outputs, which recipes don't take again, and fluid
results into its tanks, all or nothing. Outputs are its `outputs` client data, drawn and taken out by hand with the
rest. Unlike Create's, its input and output tanks are the same 2, since no recipe takes fluids yet. bworld's shared
script makes a compacting recipe for every juicing recipe while Create's press and basin are there, so the press makes
juice. Create's own 7 compacting recipes need fluid ingredients or Minecraft items, and aren't imported yet.
### P4: Logistics