diff --git a/gradle.properties b/gradle.properties index cfd5daef..3cd0943f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -54,7 +54,7 @@ mod_name=Weather2 # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=All Rights Reserved # The mod version. See https://semver.org/ -mod_version=1.20.1-2.7.6 +mod_version=1.20.1-2.7.7 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/weather2/EventHandlerForge.java b/src/main/java/weather2/EventHandlerForge.java index 4c943e3a..e2dfde94 100644 --- a/src/main/java/weather2/EventHandlerForge.java +++ b/src/main/java/weather2/EventHandlerForge.java @@ -2,6 +2,7 @@ import com.corosus.coroutil.util.CULog; import com.corosus.coroutil.util.CoroUtilCompatibility; +import net.minecraft.client.Minecraft; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.util.Mth; @@ -33,6 +34,8 @@ public void worldRender(RenderLevelStageEvent event) { if (event.getStage() == RenderLevelStageEvent.Stage.AFTER_WEATHER) { ClientTickHandler.getClientWeather(); + } else if (event.getStage() == RenderLevelStageEvent.Stage.AFTER_PARTICLES) { + ClientTickHandler.particleManagerExtended().render(event.getPoseStack(), null, Minecraft.getInstance().gameRenderer.lightTexture(), event.getCamera(), event.getPartialTick(), event.getFrustum()); } } diff --git a/src/main/java/weather2/mixin/client/RenderParticlesOverride.java b/src/main/java/weather2/mixin/client/RenderParticlesOverride.java index 96235fa0..19d3c2ac 100644 --- a/src/main/java/weather2/mixin/client/RenderParticlesOverride.java +++ b/src/main/java/weather2/mixin/client/RenderParticlesOverride.java @@ -17,15 +17,15 @@ @Mixin(LevelRenderer.class) public abstract class RenderParticlesOverride { - @Redirect(method = "renderLevel", + //replaced by RenderLevelStageEvent.Stage.AFTER_PARTICLES + /*@Redirect(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/particle/ParticleEngine;render(Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource$BufferSource;Lnet/minecraft/client/renderer/LightTexture;Lnet/minecraft/client/Camera;FLnet/minecraft/client/renderer/culling/Frustum;)V")) public void render(ParticleEngine particleManager, PoseStack matrixStackIn, MultiBufferSource.BufferSource bufferIn, LightTexture lightTextureIn, Camera activeRenderInfoIn, float partialTicks, @Nullable net.minecraft.client.renderer.culling.Frustum clippingHelper) { - //CULog.dbg("ParticleEngine render hook"); ClientTickHandler.particleManagerExtended().render(matrixStackIn, bufferIn, lightTextureIn, activeRenderInfoIn, partialTicks, clippingHelper); particleManager.render(matrixStackIn, bufferIn, lightTextureIn, activeRenderInfoIn, partialTicks, clippingHelper); - } + }*/ @Redirect(method = "renderLevel", at = @At(value = "INVOKE",