Emafire003 / LightWithin

This mods uncovers a new and player-unique power: the Inner Lights! Yes, a magical-ish power that changes for every player!
https://www.curseforge.com/minecraft/mc-mods/lightwithin
GNU Lesser General Public License v3.0
3 stars 0 forks source link

Please Fix Quilt Mod Loading Issue #19

Closed AcoYTMC closed 4 months ago

AcoYTMC commented 4 months ago

Discussed in https://github.com/Emafire003/LightWithin/discussions/18

Originally posted by **AcoYTMC** June 30, 2024 The Mod Can't Be Run On Quilt Because Of Your MilkNotCleanLightEffectsMixin Mixin Class, I Tried Asking Someone On The Official Fabric Development Discord For How To Improve It And Someone Said : : "...that doesn't seem like a very good way to accomplish that at all It totally ruins mod compat, because then only light within effects will not be cleared And if that mod is loaded, there's nothing you can do about it So to answer your question, yes there is a better way I would inject into clearStatusEffects WrapWithCondition the iterator.remove call if the status effect is your status effect and a boolean is true Then I would inject at the head and tail of milk bucket's finishUsing method and set the boolean to true, then false respectively" : : They also gave an example : : // some boolean in one of your non-mixin classes boolean bool = false; // mixin class for MilkBucketItem @Inject(method = "finishUsing", at = @At("HEAD")) private void setBoolTrue(){ bool = true; } @Inject(method = "finishUsing", at = @At("RETURN")) private void resetBool(){ bool = false; } // mixin class for LivingEntity @WrapWithCondition(method = "clearStatusEffects", at = @At(value = "INVOKE", target = "Ljava/util/Iterator;remove()V")) private boolean noRemove(/*whatever the args are*/) { if (bool && /* check if the status effect is a non-removable status effect */) { return false; } return true; } : : If You Could Do This It Would Make My Life So Much Easier But I Know You're Busy So I'm Able To Wait
Emafire003 commented 4 months ago

Please Don't Write Stuff Like This It Really Hurts My Eyes.

Also for context, that code bit is fairly old and yes, I was thinking about improving it sometime. But I'm not sure it's the only thing impacting on the quilt compat thing. However, I'll see what I can do, but quilt support is not a priority at the moment, sorry! Thank you anyway

AcoYTMC commented 4 months ago

Sorry about that, i'm just trying to make a server and innerlights (among other things) is the main focus but it's on quilt, and it doesn't let me space it out

Emafire003 commented 4 months ago

Apparently, it was indeed just the bucket causing issues with quilt. Will do a bit more testing the release 1.1.2 for minecraft 1.20.1, 1.19.2 and 1.21