Skip to content

fix(energy): stop battery and cable taking forever to mine - #839

Open
Indemnity83 wants to merge 1 commit into
mc/1.21.1from
battery-cable-tool-tags
Open

fix(energy): stop battery and cable taking forever to mine#839
Indemnity83 wants to merge 1 commit into
mc/1.21.1from
battery-cable-tool-tags

Conversation

@Indemnity83

Copy link
Copy Markdown
Owner

Summary

The Battery and power Cables (copper/gold/ender) had no correct-tool tag, so a pickaxe gave no mining-speed bonus against them — breaking either was much slower than intended, tool or no tool.

Changes

  • Battery: add requiresCorrectToolForDrops() and register it in the mineable/pickaxe tag, matching every other machine/engine block (mirrors the Steam Engine, which shares its 3.0 hardness).
  • Cable: drop hardness from 1.5 to 0.3 and set mapColor(NONE) to match the Pipe blocks' properties exactly, so it breaks just as fast by hand as a pipe does. Per-tier sounds (copper/gold/ender) are unchanged.

Notes

Will forward-port to mc/1.21.11, mc/26.1, mc/26.2, and mc/26.3 once this merges.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1c20ce39-1de4-4fe2-8295-d6b28987d656

📥 Commits

Reviewing files that changed from the base of the PR and between a2dc8c3 and b5dee1b.

📒 Files selected for processing (2)
  • common/src/main/java/com/logistics/LogisticsPower.java
  • common/src/main/resources/data/minecraft/tags/block/mineable/pickaxe.json

📝 Walkthrough

Walkthrough

The PR updates battery and cable block properties. Batteries now require pickaxes for mining and correct tool drops. Cables use no map color and lower block strength.

Changes

Power block properties

Layer / File(s) Summary
Block mining properties
common/src/main/java/com/logistics/LogisticsPower.java, common/src/main/resources/data/minecraft/tags/block/mineable/pickaxe.json
Battery blocks require the correct tool for drops and are mineable with a pickaxe. Cable blocks use MapColor.NONE and strength 0.3f instead of 1.5f.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: fixing slow mining for battery and cable blocks.
Description check ✅ Passed The description directly explains the battery and cable mining-speed fixes and the related block-property changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch battery-cable-tool-tags

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 22.23%. Comparing base (a2dc8c3) to head (b5dee1b).

Files with missing lines Patch % Lines
...on/src/main/java/com/logistics/LogisticsPower.java 0.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##             mc/1.21.1     #839      +/-   ##
===============================================
- Coverage        22.23%   22.23%   -0.01%     
  Complexity        2229     2229              
===============================================
  Files              560      560              
  Lines            24623    24624       +1     
  Branches          3684     3684              
===============================================
  Hits              5476     5476              
- Misses           18731    18732       +1     
  Partials           416      416              
Flag Coverage Δ
common 23.67% <0.00%> (-0.01%) ⬇️
fabric 4.26% <ø> (ø)
neoforge 2.95% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...on/src/main/java/com/logistics/LogisticsPower.java 62.33% <0.00%> (-0.21%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant