Skip to content

Move Unique methods from mixin into util class#18

Open
blockninja124 wants to merge 3 commits into
milkucha:1.20.1-fabricfrom
blockninja124:1.20+1.20.1
Open

Move Unique methods from mixin into util class#18
blockninja124 wants to merge 3 commits into
milkucha:1.20.1-fabricfrom
blockninja124:1.20+1.20.1

Conversation

@blockninja124

@blockninja124 blockninja124 commented May 7, 2026

Copy link
Copy Markdown

This PR moves the @Unique methods from ServerPlayerEntityMixin into their own class, TRMTWalkingErosionUtil.

I want this change because it makes it wayyy easier for me to add compat for TRMT. I can have my custom interaction (in this case, wheels on a vehicle) trigger the walking code without rewriting all of it. Since there is absolutely no way for another mod to use the @Unique private methods in the mixin class, having to copy out all the functions is the only solution right now.

I can see this move as being useful for:

  1. Custom "vehicle" entities such as immersive vehicles
  2. Custom "vehicles" such as Valkyrien Skies or Create: Aeronautics
  3. Custom entities/mounts which need to trigger this code without the tick method (not sure why this would happen, but you never know).

The specifics of how I've moved these methods is up for discussion, I'm not particularly attached to where I've put them. I just want them to not be confined to only the mixin itself 🙏 🥺

@blockninja124

blockninja124 commented May 7, 2026

Copy link
Copy Markdown
Author

https://cdn.discordapp.com/attachments/267566425911066626/1501777483953868880/2026-05-06_22-43-41.mp4?ex=69fd4ec5&is=69fbfd45&hm=32bffec59481cedc80fcfa7ea4256ce95921318b3cbc1d83eed3af4827bb22be&

My compat for trackwork works pretty well! (Config values are cranked for demonstration)

But the compat rn requires me to copy out the entire walking erosion logic which is a bit yucky :(

@milkucha

milkucha commented May 7, 2026

Copy link
Copy Markdown
Owner

hey! I like the idea. I'm not looking into Create Aeronautics (and similar mods) compat just yet, since I'm focusing on finishing ports to more modern versions as well as Forge and Neoforge, but it is my next item in the list after that. And this is definitely helpful, will review it hopefully end of this month if all goes according to plan!

@milkucha

Copy link
Copy Markdown
Owner

Hey @blockninja124 , just wanted to give you a heads-up that I included a Contributors Agreement License in all branches of my repo, just to make sure that both contributors and the project are protected long-term. This was done after you submitted your PR, so I'd ask you to please read the CLA.md and post the acceptance statement from CONTRIBUTING.md as a comment here. Only after you do that can I consider merging your PR - I haven't looked into it yet, but I think it will likely be helpful to speed up the Create Aeronautics (and other mods) compat support. You can find both files in all branches of the repo. Thank you!

@blockninja124

Copy link
Copy Markdown
Author

I have read the Contributor License Agreement in CLA.md and I agree to its terms.

Also sorry about the flood of vibecoded port PRs you seem to be getting. :P

# Conflicts:
#	src/main/java/milkucha/trmt/mixin/ServerPlayerEntityMixin.java
@blockninja124

Copy link
Copy Markdown
Author

I've updated this PR to include the new changes to ServerPlayerEntityMixin from milkucha:1.20+1.20.1, moving those changes into TRMTWalkingErosionUtil

@milkucha

Copy link
Copy Markdown
Owner

amazing. I'm not yet looking into vehicle compat but when I do I will revisit this PR for sure - still got some backlog to clear before that happens but I hope to be able to get around it some time this summer, maybe July.

@blockninja124

Copy link
Copy Markdown
Author

You don't have to implement compat to merge this PR, this PR makes it easier for other mods to add their own compat. (aka putting the work on them, not you, lol)

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