promotional bannermobile promotional banner

PunchThemAll

Punch different blocks to obtain the ressources you need !
Back to Files

pta-1.20.1-2.1.0.jar

File namepta-1.20.1-2.1.0.jar
Uploader
DrimoZDrimoZ
Uploaded
Aug 1, 2026
Downloads
9
Size
242.2 KB
Mod Loaders
Forge
File ID
8554080
Type
R
Release
Supported game versions
  • 1.20.1
  • 1.20

Curse Maven Snippet

Forge

implementation fg.deobf("curse.maven:punchthemall-1046761:8554080")

Learn more about Curse Maven

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 existing chance, 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 to 1, and has a floor of 1 — spending nothing is what chance and mode: "none" are for. Under mode: "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 not 1. Example: configExamples/interactions/v2/19_consume_count.json.

    The legacy (schema 1) loader ignores it, as it already ignores enabled and hidden.

  • hidden on an interaction (schema_version: 2). "hidden": true keeps 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 from enabled: 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.blacklist no longer crashes mid-click. Requiring a list where the item or block entity holds something else threw a ClassCastException from inside the interaction filter.
  • RangeTag in 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 a ClassCastException, and valid files silently failed to match. A malformed RangeTag is now rejected rather than running off the end of the list — the old size check was an assert, 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: 0 no 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