Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MC-17738 Fix #361

Open
wants to merge 1 commit into
base: 1.20
Choose a base branch
from
Open

MC-17738 Fix #361

wants to merge 1 commit into from

Conversation

MaxenceDC
Copy link

https://bugs.mojang.com/browse/MC-177381 : Game does not count the distance properly if you locate a structure from more than 46340 blocks away

I fixed it using Math.hypot (I originally fixed this bug in my mod Sparse Structures, but thought it could fit in this mod too. This does not make the two mods incompatible, at least from my testing)


@BugFix(id = "MC-177831", category = FixCategory.BASIC, env = BugFix.Env.SERVER)
@Mixin(LocateCommand.class)
public class LocateDistanceMixin {
Copy link
Owner

Choose a reason for hiding this comment

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

mixin should always match target class name: LocateCommandMixin

@@ -59,6 +59,7 @@
"debugify.fix_explanation.mc-89146": "Provides a strict save order of tile entities, to match the update order which then allows initial update of tile entities to be in the correct order.",
"debugify.fix_explanation.mc-93018": "Only initiate breeding if the wolf is tamed.",
"debugify.fix_explanation.mc-100991": "Notifies the damage tracker of a thrown fishing hook damaging the entity with 0 damage, like snowballs.",
"debugify.fix_explanation.mc-177381": "The /locate command will now return the correct structure distance when very far from it.",
Copy link
Owner

Choose a reason for hiding this comment

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

Unnecessary explanation. It's clear that this bug fix will do this.

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