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

mod dev compatibility/dependency feature request #335

Open
westbot657 opened this issue Jan 5, 2025 · 9 comments
Open

mod dev compatibility/dependency feature request #335

westbot657 opened this issue Jan 5, 2025 · 9 comments

Comments

@westbot657
Copy link

I'm not actually sure what to describe this request as, but I've started working on a mod and I've hit a problem where a lot of vivecraft's custom rendering code is within Mixin classes, which means as a mod dev using vivecraft as a dependency, I cannot directly mixin to any of the modified rendering code of vivecraft without the use of MixinSquared, which discourages using itself for projects that are openly maintained

@fayer3
Copy link
Member

fayer3 commented Jan 5, 2025

which part exactly do you need to modify?

@westbot657
Copy link
Author

the ItemInHandRendererVRMixin is the one I'm focused on right now

@fayer3
Copy link
Member

fayer3 commented Jan 5, 2025

hm, we could extract that yeah

@westbot657
Copy link
Author

ok, thank you, that would be very helpful! thanks for the quick responding!

@fayer3
Copy link
Member

fayer3 commented Jan 5, 2025

hm, looking a bit closer at it I can't just move it out. what exactly do you want to do with it?

@westbot657
Copy link
Author

I would like to be able to disable the rendering of a specific item so that I can render it a bit differently in a way where I need to be able to use info (world-space positions/player entity positions/hand positions) that is available in the held item render code, but that the item rendering code isn't told about.

I think looking at the mixin, I'm assuming the difficult part about extracting the methods is "this"? you would probably just make it a parameter for the extracted methods and refer to it as "instance" or something in the new code? I could try making a pull request to change it if that's ok?

@fayer3
Copy link
Member

fayer3 commented Jan 5, 2025

is ther any reason why you can't just mixin into VivecraftItemRendering.applyThirdPersonItemTransforms / VivecraftItemRendering.applyFirstPersonItemTransforms?

@fayer3
Copy link
Member

fayer3 commented Jan 5, 2025

But if that is something more people would want to do, we can add something to override positions per item to the upcomming API

@westbot657
Copy link
Author

is ther any reason why you can't just mixin into VivecraftItemRendering.applyThirdPersonItemTransforms / VivecraftItemRendering.applyFirstPersonItemTransforms?

actually, this might work for me, thanks! though it's probably still worth having a way to override what renders, I happen to want to just render the item model with different transforms, but I could see other people wanting to render a different model (or models) entirely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants