Skip to content

Conversation

@skycatminepokie
Copy link
Contributor

@skycatminepokie skycatminepokie commented Oct 20, 2025

These classes trip me up sometimes, with immutability and mutability mixed in with each other. Hopefully, adding contract annotations will help.

I avoided annotating anything that returns a primitive type - that seems unnecessary and would add bloat. I also didn't annotate static methods, as they can usually be assumed to be pure.

Depends on #4351 , and has more classes to do, so I'm leaving this as a draft.

@skycatminepokie skycatminepokie changed the title Contracts for net.minecraft.util.math classes Contract annotations for net.minecraft.util.math classes Oct 20, 2025
@skycatminepokie
Copy link
Contributor Author

OK, that's a lot better. I went a little crazy at first xd

@cputnam-a11y
Copy link

cputnam-a11y commented Oct 20, 2025

The git history seems broken see below apparently I did a stupid

@skycatminepokie
Copy link
Contributor Author

Where? I wouldn't be surprised though, I will fix it when your PR is merged. I checked out the latest yarn, then merged your branch on top, then made my changes. This is really my first experience with working with multiple collaborative branches - it's always been just me or a random one-off change :P

@Earthcomputer
Copy link
Contributor

The git history looks fine to me, I think he missed that this PR has a dependency. It will need rebasing once my PR is merged.

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.

3 participants