Skip to content

Commit

Permalink
upgrade sodium
Browse files Browse the repository at this point in the history
  • Loading branch information
qouteall committed Feb 12, 2021
1 parent 2b6c421 commit a9a9e30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ allprojects {

modImplementation 'com.github.Virtuoel:Pehkui:1.17-SNAPSHOT'

modCompileOnly 'com.github.qouteall:sodium-fabric:ipc1164_1'
modImplementation 'com.github.qouteall:sodium-fabric:compat_next_1_16_4-SNAPSHOT'
// modCompileOnly 'com.github.qouteall:sodium-fabric:compat_next_1_16_4-SNAPSHOT'
// modImplementation("me.jellysquid.mods:sodium:0.1.1-SNAPSHOT")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import com.qouteall.immersive_portals.SodiumInterface;
import com.qouteall.immersive_portals.render.FrontClipping;
import me.jellysquid.mods.sodium.client.IWorldRenderer;
import me.jellysquid.mods.sodium.client.SodiumHooks;
import me.jellysquid.mods.sodium.client.WorldRendererAccessor;
import me.jellysquid.mods.sodium.client.render.SodiumWorldRenderer;
import me.jellysquid.mods.sodium.client.render.chunk.ChunkRenderManager;
import net.fabricmc.api.EnvType;
Expand All @@ -15,13 +15,13 @@ public static void init() {
SodiumInterface.createClientChunkManager = ClientChunkManagerWithSodium::new;

SodiumInterface.createNewRenderingContext = worldRenderer -> {
SodiumWorldRenderer swr = ((IWorldRenderer) worldRenderer).getSodiumWorldRenderer();
SodiumWorldRenderer swr = ((WorldRendererAccessor) worldRenderer).getSodiumWorldRenderer();
return swr.createNewRenderContext();
};

SodiumInterface.switchRenderingContext = (worldRenderer, newContext) -> {
SodiumWorldRenderer sodiumWorldRenderer =
((IWorldRenderer) worldRenderer).getSodiumWorldRenderer();
((WorldRendererAccessor) worldRenderer).getSodiumWorldRenderer();

// must update render list
sodiumWorldRenderer.scheduleTerrainUpdate();
Expand Down

0 comments on commit a9a9e30

Please sign in to comment.