Skip to content

Commit

Permalink
Fixed BB issues
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Dec 3, 2023
1 parent fa30197 commit 081a836
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion buildscript/src/main/java/Buildscript.java
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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) {
Expand Down

0 comments on commit 081a836

Please sign in to comment.