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

little tiles conflict #268

Open
fayer3 opened this issue Apr 4, 2024 · 7 comments
Open

little tiles conflict #268

fayer3 opened this issue Apr 4, 2024 · 7 comments

Comments

@fayer3
Copy link
Member

fayer3 commented Apr 4, 2024

these two mixins are conflicting
https://github.com/CreativeMD/LittleTiles/blob/bf2278ea20472e7fc44b2b1fe8ea7f37fb39d7ae/src/main/java/team/creative/littletiles/mixin/client/MinecraftMixin.java#L89-L92

@Redirect(at = @At(value = "INVOKE", target = "Lnet/minecraft/client/multiplayer/MultiPlayerGameMode;isDestroying()Z"), method = "startUseItem()V")
public boolean vivecraft$seatedCheck(MultiPlayerGameMode gameMode) {
return gameMode.isDestroying() && (!VRState.vrRunning || ClientDataHolderVR.getInstance().vrSettings.seated);
}

littletiles.mixins.json:client.MinecraftMixin from mod littletiles->@Redirect::isDestroying(Lnet/minecraft/client/multiplayer/MultiPlayerGameMode;)Z with priority 1000, already redirected by vivecraft.mixins.json:client_vr.MinecraftVRMixin from mod vivecraft->@Redirect::vivecraft$seatedCheck(Lnet/minecraft/client/multiplayer/MultiPlayerGameMode;)Z with priority 1000 
@ferriarnus
Copy link
Member

Guess we can use something like wrap operation from mixin extra's to fix the conflict? I think we both would need to.

@fayer3
Copy link
Member Author

fayer3 commented Apr 4, 2024

a wrap should at least not crash I think

@fayer3
Copy link
Member Author

fayer3 commented Apr 4, 2024

if we also wrap after them, I think it should wrap the redirect

@Techjar
Copy link
Collaborator

Techjar commented Apr 4, 2024

What does this mixin actually do?

@fayer3
Copy link
Member Author

fayer3 commented Apr 4, 2024

seems to cancel the startUseItem in non seated mode

@fayer3
Copy link
Member Author

fayer3 commented Apr 4, 2024

sorry, read it backwards, if that returns true the method is canceled, but we seem to want to run it always in standing mode

@CreativeMD
Copy link

Made use of MixinExtra's wrapper operator, which should hopefully fix this issue.

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

4 participants