Skip to content

Fix Repair Tool Problems#2158

Open
Loqor wants to merge 1 commit into
mainfrom
fix/repair-tool-stuff
Open

Fix Repair Tool Problems#2158
Loqor wants to merge 1 commit into
mainfrom
fix/repair-tool-stuff

Conversation

@Loqor

@Loqor Loqor commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

About the PR

Rounded the added value of the repair tool for durability stuff and fixed the repair tool only working on certain faces (somehow)

Why / Balance

annoying

Technical details

Use #setDurability instead of #addDurability remove the call for the position being a vecCenterPos()

Media

Requirements

Breaking changes

Changelog

fix: repair tool not rounding durability value

Signed-off-by: Loqor <isaiahcrace@gmail.com>
@Loqor
Loqor requested a review from a team as a code owner July 17, 2026 05:59
@Loqor Loqor added A: Engine Area: Tardis engine. A: General Interactions Area: General in-game interactions that don't relate to another area. A: Core Tech Area: Underlying core tech for the mod and the Github repository. labels Jul 17, 2026
@github-actions github-actions Bot added size/XS Denotes a PR that changes 0-9 lines. S: Needs Review Status: Requires additional reviews before being fully accepted. S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Jul 17, 2026
@Loqor Loqor removed the S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. label Jul 17, 2026
if (hitResult.getType() == HitResult.Type.BLOCK) {
Vec3d pos3d = hitResult.getPos();
BlockPos pos = new BlockPos((int) pos3d.x, (int) pos3d.y, (int) pos3d.z);
BlockPos pos = ((net.minecraft.util.hit.BlockHitResult) hitResult).getBlockPos();

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.

import

int val = world.getRandom().nextBetween(2, 10);
val = (val * DurableSubSystem.MAX_DURABILITY) / 100;
durable.addDurability(val);
durable.setDurability(Math.round(durable.durability() + val));

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.

use addDurability

@github-actions github-actions Bot added S: Awaiting Changes Status: Changes are required before another review can happen. and removed S: Needs Review Status: Requires additional reviews before being fully accepted. labels Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A: Core Tech Area: Underlying core tech for the mod and the Github repository. A: Engine Area: Tardis engine. A: General Interactions Area: General in-game interactions that don't relate to another area. S: Awaiting Changes Status: Changes are required before another review can happen. size/XS Denotes a PR that changes 0-9 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants