diff --git a/buildscript/src/main/java/Buildscript.java b/buildscript/src/main/java/Buildscript.java index 2b147977d8..f6ff3efe43 100644 --- a/buildscript/src/main/java/Buildscript.java +++ b/buildscript/src/main/java/Buildscript.java @@ -46,7 +46,7 @@ public class Buildscript extends SimpleFabricProject { static final boolean SODIUM = true; static final boolean CUSTOM_SODIUM = true; static final String MC_VERSION = "1.20.2"; - static final String customSodiumName = "sodium-fabric-mc1.20.2-0.5.3+git.e228d59.jar"; + static final String customSodiumName = "sodium-fabric-mc1.20.2-0.5.3+git.43e53c4.jar"; private static final String[] SOURCE_SETS = new String[] { "main", diff --git a/src/main/java/net/coderbot/iris/mixin/vertices/MixinBufferBuilder.java b/src/main/java/net/coderbot/iris/mixin/vertices/MixinBufferBuilder.java index 00b477e7ff..486716965e 100644 --- a/src/main/java/net/coderbot/iris/mixin/vertices/MixinBufferBuilder.java +++ b/src/main/java/net/coderbot/iris/mixin/vertices/MixinBufferBuilder.java @@ -182,8 +182,12 @@ public abstract class MixinBufferBuilder extends DefaultedVertexConsumer impleme VertexFormatDescription formatDescription = VertexFormatRegistry.instance() .get(format); - this.uv1Offset = formatDescription.getElementOffset(CommonVertexAttribute.OVERLAY); - this.normalOffset = formatDescription.getElementOffset(CommonVertexAttribute.NORMAL); + if (formatDescription.containsElement(CommonVertexAttribute.OVERLAY)) { + this.uv1Offset = formatDescription.getElementOffset(CommonVertexAttribute.OVERLAY); + } + if (formatDescription.containsElement(CommonVertexAttribute.NORMAL)) { + this.normalOffset = formatDescription.getElementOffset(CommonVertexAttribute.NORMAL); + } if (formatDescription.containsElement(IrisCommonVertexAttributes.TANGENT)) { this.tangentOffset = formatDescription.getElementOffset(IrisCommonVertexAttributes.TANGENT); } @@ -209,8 +213,8 @@ public abstract class MixinBufferBuilder extends DefaultedVertexConsumer impleme return; } - if (injectNormalAndUV1 && currentElement == DefaultVertexFormat.ELEMENT_NORMAL) { - MemoryUtil.memPutInt(MemoryUtil.memAddress(buffer, nextElementByte + uv1Offset), 0); + if (injectNormalAndUV1) { + this.normal(0, 0, 0); } if (iris$isTerrain) {