Merge branch 'main-upstream'
# Conflicts: # coreSubProjects # fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinLevelRenderer.java
This commit is contained in:
+16
-27
@@ -23,6 +23,9 @@ import com.mojang.blaze3d.vertex.PoseStack;
|
||||
#if PRE_MC_1_19_4
|
||||
import com.mojang.math.Matrix4f;
|
||||
#else
|
||||
import net.minecraft.client.Camera;
|
||||
import net.minecraft.client.renderer.GameRenderer;
|
||||
import net.minecraft.client.renderer.LightTexture;
|
||||
import org.joml.Matrix4f;
|
||||
#endif
|
||||
import com.seibel.distanthorizons.common.rendering.SeamlessOverdraw;
|
||||
@@ -32,8 +35,11 @@ import com.seibel.distanthorizons.common.wrappers.world.ClientLevelWrapper;
|
||||
import com.seibel.distanthorizons.core.config.Config;
|
||||
import com.seibel.distanthorizons.core.api.internal.ClientApi;
|
||||
import com.seibel.distanthorizons.coreapi.util.math.Mat4f;
|
||||
import net.minecraft.client.Camera;
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.client.renderer.GameRenderer;
|
||||
import net.minecraft.client.renderer.LevelRenderer;
|
||||
import net.minecraft.client.renderer.LightTexture;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.world.level.lighting.LevelLightEngine;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -154,35 +160,18 @@ public class MixinLevelRenderer
|
||||
}
|
||||
}
|
||||
|
||||
@Redirect(method =
|
||||
"Lnet/minecraft/client/renderer/LevelRenderer;" +
|
||||
"renderLevel(Lcom/mojang/blaze3d/vertex/PoseStack;" +
|
||||
"FJZLnet/minecraft/client/Camera;" +
|
||||
"Lnet/minecraft/client/renderer/GameRenderer;" +
|
||||
"Lnet/minecraft/client/renderer/LightTexture;" +
|
||||
#if PRE_MC_1_19_4
|
||||
"Lcom/mojang/math/Matrix4f;)V"
|
||||
#else
|
||||
"Lorg/joml/Matrix4f;)V"
|
||||
#endif
|
||||
,
|
||||
at = @At(
|
||||
value = "INVOKE",
|
||||
#if PRE_MC_1_20_1
|
||||
target = "Lnet/minecraft/world/level/lighting/LevelLightEngine;runUpdates(IZZ)I"
|
||||
#else
|
||||
target = "Lnet/minecraft/world/level/lighting/LevelLightEngine;runLightUpdates()I"
|
||||
#endif
|
||||
))
|
||||
private int callAfterRunUpdates(LevelLightEngine light #if PRE_MC_1_20_1 , int pos, boolean isQueueEmpty, boolean updateBlockLight #endif )
|
||||
#if PRE_MC_1_19_4
|
||||
@Inject(at = @At(value = "TAIL", target = "Lnet/minecraft/world/level/lighting/LevelLightEngine;runUpdates(IZZ)I"), method = "renderLevel")
|
||||
public void callAfterRunUpdates(PoseStack poseStack, float partialTick, long finishNanoTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f projectionMatrix, CallbackInfo ci)
|
||||
#elif PRE_MC_1_20_1
|
||||
@Inject(at = @At(value = "TAIL", target = "Lnet/minecraft/world/level/lighting/LevelLightEngine;runUpdates(IZZ)I"), method = "renderLevel")
|
||||
public void callAfterRunUpdates(PoseStack poseStack, float partialTick, long finishNanoTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f projectionMatrix, CallbackInfo ci)
|
||||
#else
|
||||
@Inject(at = @At(value = "TAIL", target = "Lnet/minecraft/world/level/lighting/LevelLightEngine;runLightUpdates()I"), method = "renderLevel")
|
||||
private void callAfterRunUpdates(PoseStack poseStack, float partialTick, long finishNanoTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f projectionMatrix, CallbackInfo ci)
|
||||
#endif
|
||||
{
|
||||
#if PRE_MC_1_20_1
|
||||
int r = light.runUpdates(pos, isQueueEmpty, updateBlockLight);
|
||||
#else
|
||||
int r = light.runLightUpdates();
|
||||
#endif
|
||||
ChunkWrapper.syncedUpdateClientLightStatus();
|
||||
return r;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,8 +1,10 @@
|
||||
package com.seibel.distanthorizons.forge.mixins.client;
|
||||
|
||||
import com.seibel.distanthorizons.api.enums.config.EUpdateBranch;
|
||||
import com.seibel.distanthorizons.common.wrappers.gui.updater.UpdateModScreen;
|
||||
import com.seibel.distanthorizons.core.config.Config;
|
||||
import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector;
|
||||
import com.seibel.distanthorizons.core.jar.installer.GitlabGetter;
|
||||
import com.seibel.distanthorizons.core.jar.installer.ModrinthGetter;
|
||||
import com.seibel.distanthorizons.core.jar.updater.SelfUpdater;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.IVersionConstants;
|
||||
@@ -48,7 +50,7 @@ public class MixinMinecraft
|
||||
{
|
||||
instance.setScreen(new UpdateModScreen(
|
||||
new TitleScreen(false), // We don't want to use the vanilla title screen as it would fade the buttons
|
||||
ModrinthGetter.getLatestIDForVersion(SingletonInjector.INSTANCE.get(IVersionConstants.class).getMinecraftVersion())
|
||||
(Config.Client.Advanced.AutoUpdater.updateBranch.get() == EUpdateBranch.STABLE ? ModrinthGetter.getLatestIDForVersion(SingletonInjector.INSTANCE.get(IVersionConstants.class).getMinecraftVersion()): GitlabGetter.INSTANCE.projectPipelines.get(0).get("sha"))
|
||||
));
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user