LittleTiles

LittleTiles

12M Downloads

[1.20.1] Crash with Oculus 1.7.0

PolishTorch opened this issue ยท 6 comments

commented

The crash happened on Forge 47.1.3

List of mods:

  1. CreativeCore 2.11.27
  2. Embeddium 0.3.14
  3. LittleTiles pre-103
  4. Oculus 1.7.0

Steps to replicate:

  1. Run Minecraft with the aforementioned mods
  2. Go to options > video settings > shader packs
  3. Enable shaders and select any shader of your choice (i tested Complementary Unbound 5.1.1 and MakeUp Ultra Fast 8.9d)
  4. Create or open any world
  5. Crash with this message - "The game crashed whilst unexpected error Error: java.lang.NoClassDefFoundError: net/coderbot/iris/compat sodium/impl/vertex_format/IrisChunkMeshAttributes"

Here's the crash report: crash-2024-04-29_14.45.26-client.txt

commented

Can this please be fixed? I need to update to Iris 1.7 and this mod is blocking it.

commented

Sorry, for not responding earlier. I was quite busy. A new version is out which fixes this issue. Thanks for everybody who tried to solve it!

commented

Same here.
ATM9
Log https://mclo.gs/LbgFK6s

commented

I believe they only changed the import path.

import net.coderbot.iris.compat.sodium.impl.vertex_format.IrisChunkMeshAttributes;

Change from coderbot to irisshaders, can't test it now but by inspecting the oculus.1.20.1-1.7.0.jar file that seems to be it.

EDIT: Just tested it, it worked with a little change in the method setMaterialId, adding the new lightValue parameter to the function. I assigned it the default value, which is 0. The following links are related to this lightValue parameter.

https://github.com/IrisShaders/Iris/blob/245d5fb66f2add0811266178b368768c0adf922a/src/sodiumCompatibility/java/net/irisshaders/iris/compat/sodium/impl/block_context/ChunkBuildBuffersExt.java#L8

https://github.com/IrisShaders/Iris/blob/245d5fb66f2add0811266178b368768c0adf922a/src/sodiumCompatibility/java/net/irisshaders/iris/compat/sodium/impl/block_context/BlockContextHolder.java#L23

diff --git a/build.gradle b/build.gradle
index 0ced7832..ea5aa308 100644
--- a/build.gradle
+++ b/build.gradle
@@ -85,7 +85,7 @@ minecraft {
 }
 
 dependencies {
-    implementation fg.deobf("curse.maven:oculus-581495:5108615")
+    implementation fg.deobf("curse.maven:oculus-581495:5299671")
     implementation fg.deobf("org.embeddedt:embeddium-1.20.1:0.3.9-git.f603a93+mc1.20.1")
     
     minecraft "net.minecraftforge:forge:${project.property 'minecraft_version'}-${project.property 'forge_version'}"
diff --git a/src/main/java/team/creative/littletiles/client/mod/oculus/OculusInteractor.java b/src/main/java/team/creative/littletiles/client/mod/oculus/OculusInteractor.java
index 750c7e5e..db7a87e1 100644
--- a/src/main/java/team/creative/littletiles/client/mod/oculus/OculusInteractor.java
+++ b/src/main/java/team/creative/littletiles/client/mod/oculus/OculusInteractor.java
@@ -1,9 +1,9 @@
 package team.creative.littletiles.client.mod.oculus;
 
 import me.jellysquid.mods.sodium.client.render.chunk.compile.ChunkBuildBuffers;
-import net.coderbot.iris.compat.sodium.impl.block_context.ChunkBuildBuffersExt;
-import net.coderbot.iris.compat.sodium.impl.shader_overrides.ShaderChunkRendererExt;
-import net.coderbot.iris.vertices.ExtendedDataHelper;
+import net.irisshaders.iris.compat.sodium.impl.block_context.ChunkBuildBuffersExt;
+import net.irisshaders.iris.compat.sodium.impl.shader_overrides.ShaderChunkRendererExt;
+import net.irisshaders.iris.vertices.ExtendedDataHelper;
 import net.irisshaders.iris.api.v0.IrisApi;
 import net.minecraft.core.BlockPos;
 import net.minecraft.world.level.block.state.BlockState;
@@ -29,7 +29,7 @@ public class OculusInteractor {
     
     public static void setMaterialId(ChunkBuildBuffers buffers, BlockState state) {
         if (buffers instanceof ChunkBuildBuffersExt ext)
-            ext.iris$setMaterialId(state, ExtendedDataHelper.BLOCK_RENDER_TYPE);
+            ext.iris$setMaterialId(state, ExtendedDataHelper.BLOCK_RENDER_TYPE, (byte) 0);
     }
     
     public static void resetBlockContext(ChunkBuildBuffers buffers) {
diff --git a/src/main/java/team/creative/littletiles/client/mod/oculus/OculusSodiumInteractor.java b/src/main/java/team/creative/littletiles/client/mod/oculus/OculusSodiumInteractor.java
index b034378c..af6679fc 100644
--- a/src/main/java/team/creative/littletiles/client/mod/oculus/OculusSodiumInteractor.java
+++ b/src/main/java/team/creative/littletiles/client/mod/oculus/OculusSodiumInteractor.java
@@ -3,7 +3,7 @@ package team.creative.littletiles.client.mod.oculus;
 import me.jellysquid.mods.sodium.client.gl.attribute.GlVertexAttributeBinding;
 import me.jellysquid.mods.sodium.client.gl.attribute.GlVertexFormat;
 import me.jellysquid.mods.sodium.client.render.chunk.vertex.format.ChunkMeshAttribute;
-import net.coderbot.iris.compat.sodium.impl.vertex_format.IrisChunkMeshAttributes;
+import net.irisshaders.iris.compat.sodium.impl.vertex_format.IrisChunkMeshAttributes;
 
 public class OculusSodiumInteractor {
     
diff --git a/src/main/java/team/creative/littletiles/mixin/oculus/XHFPTerrainVertexMixin.java b/src/main/java/team/creative/littletiles/mixin/oculus/XHFPTerrainVertexMixin.java
index 607dc584..7e572828 100644
--- a/src/main/java/team/creative/littletiles/mixin/oculus/XHFPTerrainVertexMixin.java
+++ b/src/main/java/team/creative/littletiles/mixin/oculus/XHFPTerrainVertexMixin.java
@@ -5,8 +5,8 @@ import org.spongepowered.asm.mixin.Unique;
 import org.spongepowered.asm.mixin.injection.At;
 import org.spongepowered.asm.mixin.injection.Redirect;
 
-import net.coderbot.iris.compat.sodium.impl.vertex_format.terrain_xhfp.XHFPTerrainVertex;
-import net.coderbot.iris.vertices.ExtendedDataHelper;
+import net.irisshaders.iris.compat.sodium.impl.vertex_format.terrain_xhfp.XHFPTerrainVertex;
+import net.irisshaders.iris.vertices.ExtendedDataHelper;
 import team.creative.creativecore.common.util.math.vec.Vec3d;
 
 @Mixin(XHFPTerrainVertex.class)
@@ -15,7 +15,7 @@ public class XHFPTerrainVertexMixin {
     @Unique
     public Vec3d center;
     
-    @Redirect(remap = false, at = @At(value = "INVOKE", target = "Lnet/coderbot/iris/vertices/ExtendedDataHelper;computeMidBlock(FFFIII)I"),
+    @Redirect(remap = false, at = @At(value = "INVOKE", target = "Lnet/irisshaders/iris/vertices/ExtendedDataHelper;computeMidBlock(FFFIII)I"),
             method = "write(JLme/jellysquid/mods/sodium/client/render/chunk/terrain/material/Material;Lme/jellysquid/mods/sodium/client/render/chunk/vertex/format/ChunkVertexEncoder$Vertex;I)J")
     public int computeMidBlock(float x, float y, float z, int localPosX, int localPosY, int localPosZ) {
         if (center != null)
commented

Same here! (I made an Oculus report thinking it was it, relevant logs and crash reports can be found there: Asek3/Oculus#610)

commented

Please use the version prior. I will try to fix the incompatibility soon.