Skip to content

Add copper tool speed to the materials speed table (1.21.9+) - #87

Open
Pix3lPirat3 wants to merge 1 commit into
PrismarineJS:mainfrom
Pix3lPirat3:fix/copper-tool-speed
Open

Pix3lPirat3 wants to merge 1 commit into
PrismarineJS:mainfrom
Pix3lPirat3:fix/copper-tool-speed

Conversation

@Pix3lPirat3

Copy link
Copy Markdown

getToolSpeed() maps speed from the item-name prefix and had no entry for copper, so every copper tool fell to the 1.0 default in materials.json. Vanilla ToolMaterial.COPPER is 5.0. Add it for the modules that have copper tools: 1.21.9, 1.21.10, 1.21.11 and 26.1.

MaterialsDataGenerator.getToolSpeed() derives a tool's speed from its name prefix through a fixed table that predates copper tools, so from 1.21.9 every copper tool is emitted at the 1.0 default. Vanilla ToolMaterial.COPPER is 5.0 (new ToolMaterial(INCORRECT_FOR_COPPER_TOOL, 190, 5.0F, ...) in 1.21.9 and 26.1). With shipped data, prismarine-block digTime() reports a copper pickaxe on stone at 2300 ms instead of 450 ms, and a copper axe on oak log at 3000 ms instead of 600 ms.

This adds copper to the table for the four modules whose registry has copper tools. Regenerating them changes exactly 16 materials.json entries per version - every copper tool, 1.0 -> 5.0 — and nothing else. Live on a vanilla 26.1 server with mineflayer 4.39.0, copper pickaxe on stone breaks in 453 ms (was 2307), on iron ore in 902 ms (was 4563).

getToolSpeed() maps speed from the item-name prefix and had no entry for copper, so every copper tool fell to the 1.0 default in materials.json. Vanilla ToolMaterial.COPPER is 5.0. Add it for the modules that have copper tools: 1.21.9, 1.21.10, 1.21.11 and 26.1.
extremeheat pushed a commit to PrismarineJS/minecraft-data that referenced this pull request Sep 18, 2026
* pc: fix copper tool speeds in materials.json (1.21.9-26.1)

Copper tools were generated at speed 1.0 because the generator's speed table had no copper entry; vanilla is 5.0. Regenerated with PrismarineJS/minecraft-data-generator#87; 1.21.10 shares pc/1.21.9.

* pc: fix shears speed on leaves and wool in materials.json (1.21.5-26.1)

From 1.21.5 the generator overwrote its shears special cases with the 1.0 default; vanilla is 15 on leaves and 5 on wool. Regenerated with PrismarineJS/minecraft-data-generator#88; 1.21.10 shares pc/1.21.9.

@rom1504 rom1504 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Astra agent review — AI-generated, not manually written by the maintainer.

Looks ready to merge for the copper-speed correction. All four affected-version generation jobs pass. I checked the exact-head 1.21.9 and 26.1 CI artifacts against data#1309: the entire materials tables match; the data change is exactly 16 copper entries per version, from 1 to 5. With the candidate data, prismarine-block reports copper pickaxe/stone 450 ms, shovel/dirt 150 ms and axe/oak log 600 ms.

The corresponding data already landed as part of minecraft-data#1310, so this producer fix is still needed to preserve it on regeneration. Generator#88 includes the same copper change; coordinate those two overlapping branches when landing. An unrelated 1.18 CI job was cancelled; I did not perform a new local Java run.

Skills used: prismarine-protocol-data-review connected exact producer artifacts to the released-data direction and real model; prismarine-architecture-review checked the bounded fix in the existing tier table; prismarine-review checked actual base/head and cross-PR overlap.

@rom1504 rom1504 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Astra agent review — AI-generated, not manually written by the maintainer.

The copper-speed producer fix still matches the reviewed native value and downstream dig-time behavior in the existing review. Its data is already included in minecraft-data #1310, and generator #88 contains this same fix.

The refreshed Build 1.18 job is failed, so diagnose/rerun that remaining integration check rather than treating the full matrix as cleared. I found no new defect in the copper mapping. Coordinate the overlapping #88 branch when landing; no new local Java or live-server run was performed.

Skills used: prismarine-review checked the current revision and discussion; prismarine-protocol-data-review checked the version-selected producer/consumer contract; prismarine-architecture-review checked package ownership and integration scope.

arielvino added a commit to arielvino/minecraft-data-generator that referenced this pull request Oct 9, 2026
* Add version 26.2

* fix 26.2 build (PrismarineJS#78)

* Add 26.3 module, copied from 26.2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* mc/26.3: port to the 26.3 API

RedStoneWireBlock is now RedstoneWireBlock, and the SKY_COLOR environment
attribute holds a Vector3fc instead of a packed int; convert it with
ARGB.colorFromVector3f.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* mc/26.3: water and lava are not diggable

Same fix PrismarineJS#80 applied to the other modules: fluid blocks report hardness 100, so
diggable was true.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* mc/26.3: skip incorrect_for_* when picking a block's material

Port of PrismarineJS#86: tier-gated blocks (iron ore, obsidian, ...) reported
incorrect_for_wooden_tool, whose speed table only has wooden tools, so dig times
fell back to hand speed. Also adds the plant;mineable/hoe and
sword_instantly_mines;mineable/axe composites.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* mc/26.3: copper tools have speed 5

Port of PrismarineJS#87: copper was missing from the speed table, so copper tools got 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mc-zuri <174940476+mc-zuri@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants