Skip to content

Commit

Permalink
2.7.7. Make compatible with optifine and rubidium shaders.
Browse files Browse the repository at this point in the history
  • Loading branch information
Corosauce committed Nov 15, 2023
1 parent ead33f6 commit 8e7b37d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/weather2/EventHandlerForge.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 8e7b37d

Please sign in to comment.