Sodium Extra

Sodium Extra

25M Downloads

Odd injection points in me.flashyreese.mods.sodiumextra.mixin.features.particle.MixinWorldRenderer

coderbot16 opened this issue ยท 1 comments

commented

It seems like it would make more sense to use HEAD injects here:

    @Inject(method = "tickRainSplashing", at = @At(value = "INVOKE"), cancellable = true)
    public void tickRainSplashing(Camera camera, CallbackInfo callbackInfo) {
        if (!(SodiumExtraClientMod.options().particleSettings.particles && SodiumExtraClientMod.options().particleSettings.rainSplash)) {
            callbackInfo.cancel();
        }
    }

    @Inject(method = "renderWeather", at = @At(value = "INVOKE"), cancellable = true)
    private void renderWeather(LightmapTextureManager manager, float f, double d, double e, double g, CallbackInfo callbackInfo) {
        if (!(SodiumExtraClientMod.options().detailSettings.rainSnow)) {
            callbackInfo.cancel();
        }
    }

While this doesn't actually change any behavior, checking whether weather rendering should be cancelled on every single function call within these functions seems a bit redundant.

commented

Makes sense, I didn't know why I did that at the time. Thank you for the issue.