Create: Production Line 1.0.2
Curse Maven Snippet
What's new
Promoted from beta on 2026-09-20: the same version number, now published as a release on all
three platforms (GitHub Release, CurseForge release type release, Modrinth channel Release). The jar
is the one built after the promotion pass recorded above — state machine extraction, material budget
line, 18 checks, documented trust model — so it supersedes the earlier 1.0.2 beta asset.
CurseForge content replaced on 2026-09-20: promotion first flipped the existing CurseForge file
(208,860 B beta jar) to release type release, which left the wrong bytes under a release label — the
upload API cannot swap a file's content. The author archived that file and the jar was uploaded again as
file 8924265, so all three platforms now carry the same 215,411 B / sha256:27e0a3c6….
How this version first went out, kept for the record: it shipped as a beta — Modrinth channel Beta,
CurseForge release type beta, GitHub Release marked as a pre-release, with 1.0.1 the current stable
release — and was promoted the same day. Existing schemes keep working unchanged — a V1 scheme item
loads with a target output and repeat count of 1 — and the only change on the way in is that the computer
now reads the target slot's stack size as the output the player wants.
Added
- The OP anvil flow: hand-author a Line Scheme in an anvil. An operator (permission level 2) builds a
plan one operation at a time. A scheme that already carries a plan plus
minecraft:paperin the right slot yields a cleared copy: every material step and every cached recipe payload is dropped, the target output and its per-craft count stay. The cleared scheme plus one material per operation appends that material to an ordered list and rebuilds the plan from it. The scheme plus paper again locks it:lockedfreezes the scheme, and every later anvil operation on it is refused. Two or more materials produce acreate:sequenced_assemblypayload, the first material as the base and every later material as oneDeployerstep (create:deployerby default). - A single material locks into a fallback instead of a fake sequence. With exactly one material the
anvil cannot express a sequenced assembly, so the scheme is locked with a
single_material_fallbackflag and derivation uses the single-material semantic machine (wood → saw/cutting, ore andraw_*→ crushing wheel, organic → millstone, metal/gem → press, default press). The player is told单原料自定义方案需等待后续版本支持/ "Single-material custom schemes are not supported yet", in the tooltip and once in the action bar at lock time. - The hand-authored state lives in a registered Data Component (
cpl:custom_assembly), persisted and network-synchronised rather than parked in ad-hoc NBT. - Every operation is server-authoritative, gated on
player.hasPermissions(2). Illegal input (a stacked scheme, a material before clearing, an empty right slot, a material equal to the product, anything on a locked scheme) cancels it, so nothing is consumed and the item is untouched. - The operation costs no experience and consumes exactly one item. The level cost is the vanilla
minimum of 1 (
setCost(1);AnvilMenu.mayPickuprequirescost > 0, so 0 would make the result impossible to take) and that level is refunded when the item is taken, which leaves a net cost of zero while the player still needs 1 level to pick it up. The repair penalty is cleared, and the right slot contributes one item (setMaterialCost(1);0would eat the whole stack). - The scheme loader re-derives the entries from the component server-side and ignores the embedded
JSON, exactly like the existing
recipeIdpath.RecipeDeriveritself is unchanged: a new adapter hands it a synthetic descriptor whose category decides between the assembly rule and the single-material rule. - The target slot's stack size is the target output, and the line gets a repeat budget. The number of items stacked into the target slot is the number the player wants out: the computer reads that stack size server-side (clamped to the item's max stack size) and records it as the target output. The installed Create recipe stays a single-craft payload, because Create's sequenced assembly cannot loop on its own and writing N crafts' worth of materials into one payload would consume N times the input for one craft's output. What the scheme records instead is how often the line has to run to reach the target, which the player realises physically by feeding the product back (their own belt loop).
- A new
RepeatPlandoes the arithmetic. An ordinary recipe (it does not consume its own product) repeatsceil(target / per-craft output)times. A doubling / recursive recipe (A + B = 2A, consumingccopies of the product and yieldingp > c) bootstraps from the single unit that goes on the belt, so it repeatsceil((target - 1) / (p - c))times, with a net gain ofp - cper pass. A recipe that cannot grow the stock (p <= c) is reported as unreachable: the repeat count stays 1 and the player is told to bring the product themselves. There is deliberately no "loop until it works" path anywhere. - A hand-built scheme is not "empty" while it is being authored. "No Steps" used to mean "empty scheme": the cleared state (and a single-material line, which really is one machine) therefore showed up as an empty scheme and, worse, was refused by the Scheme Loader's carrier whitelist. A genuine Line Scheme item now counts as a carrier when it carries a locked custom component even with no Steps, its tooltip keeps showing the target product plus the custom state, and a truly blank scheme is still refused.
- Where the numbers live.
LineSchemegainedTargetOutputCountandRepeatCount(scheme format V2; a V1 item loads with 1/1 instead of failing), the plan's topology closes with an explicit instruction line such asrepeat 3x -> 4 Iron Ingotwhen the line has to run more than once, and both the Line Scheme tooltip (重复执行 N 次(目标产量 M)/ "Repeat N times (target output M)") and the computer's panel show the same numbers. - The Scheme Loader says how many passes its cabinet asks for. It reports the largest repeat count among
the schemes in the cabinet through a server-derived menu data slot (not the client's copy of the item),
and its panel warns
该产线包含 N 次循环组装,请准备充足的基础材料/ "This line runs N times - prepare enough base materials". The first time a player opens such a cabinet they also get that single line in their own action bar; the mod never posts to chat and never messages anyone else. - The anvil flow inherits those numbers. Clearing a scheme copies the compute-time target output and
repeat count into the custom-scheme component, and hammering materials in never resets them;
CustomAssemblyPlannerputs the target output into the descriptor it hands toRecipeDeriver, so the custom line's stated output matches what the player computed.
Changed
- Headless self test grew to 18 checks (was 13; 15 after the anvil flow above, 16 for the target-output
/ repeat budget, 18 after the promotion pass). The new assertions cover the assembly payload shape, the
single-material fallback, the repeat budget (a doubling recipe with target output 4 must yield 3 passes, a
material budget of 6 for two materials, a plan whose topology says
repeat 3x, and an unreachable recipe (p <= c) that must not be looped) and all twelve rows of the anvil state table.
This mod has no additional files
