pta-1.20.1-2.1.0.jar
Curse Maven Snippet
What's new
[1.20.1-2.1.0]
Added
hand.consume.count(schema_version: 2). How much a successful interaction spends, on top of the existingchance, which only ever decides whether anything is spent. The two are independent and compose:"consume": { "mode": "shrink", "chance": 0.33, "count": { "min": 3, "max": 5 } }= one click in three costs 3–5 items. It takes the same shapes as every other count (
3,{ "count": 3 },{ "min": 3, "max": 5 }), defaults to1, and has a floor of1— spending nothing is whatchanceandmode: "none"are for. Undermode: "durability"it is durability points rather than items, and a tool that runs out still breaks exactly once. Holding fewer items than the roll asks for never blocks the interaction; it just costs what is there. JEI shows an Amount line on the hand slot whenever the value is not1. Example:configExamples/interactions/v2/19_consume_count.json.The legacy (schema 1) loader ignores it, as it already ignores
enabledandhidden.hiddenon an interaction (schema_version: 2)."hidden": truekeeps it out of JEI while it loads, syncs and fires exactly as before — for secrets, and for the intermediate steps of a multi-stage recipe. Distinct fromenabled: false, which is the one that turns an interaction off. Hidden interactions also stop stretching the category to fit their drop rows. Example:configExamples/interactions/v2/18_hidden_from_jei.json.Back-ported from the NeoForge 1.21.1 line so a pack can move between them without editing files. The legacy (schema 1) loader ignores it, as it already ignores
enabled.
Fixed
Also back-ported from the 1.21.1 audit. All six affect both schema versions.
count: { "min": 0, "max": 3 }on a drop now means "nothing to three". It silently meant "never anything": the entry produced no items, vanished from JEI, and still consumed its weight in the pool — while the docs advertised it as valid.- A shape mismatch in
nbt.whitelist/nbt.blacklistno longer crashes mid-click. Requiring a list where the item or block entity holds something else threw aClassCastExceptionfrom inside the interaction filter. RangeTagin a whitelist now compares numerically. It matched on the exact tag type, so a range written as[1,5](ints) against an enchantment level (a short) threw aClassCastException, and valid files silently failed to match. A malformedRangeTagis now rejected rather than running off the end of the list — the old size check was anassert, which is disabled at runtime. The blacklist path already did this; the two now agree, and both accept any numeric width.- Which interaction wins is now deterministic. Matches were collected into a hash set, so with
max_matches_per_click, or with several interactions competing to transform one block, the winner varied between runs and between machines. Candidates are ordered by id. - Fortune can no longer produce an over-sized stack. The bonus is clamped to the item's maximum stack size; the surplus used to disappear the moment the drop entered an inventory.
- A cost's maximum is clamped against its floored minimum, so
amount: 0no longer produces an inverted range. Slot counting also matches what JEI lays out, so a drop grid can no longer overflow the category background.
These were found by an audit on the 1.21.1 branch, which has a unit suite covering this logic. This branch has none, so the fixes here are verified by review and a build only — see
docs/backlog.md.
This mod has no additional files

