diff options
Diffstat (limited to 'src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollectorSodium.java')
-rw-r--r-- | src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollectorSodium.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollectorSodium.java b/src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollectorSodium.java index ed0fb7c..dab44b2 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollectorSodium.java +++ b/src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollectorSodium.java @@ -8,8 +8,8 @@ import com.mojang.blaze3d.vertex.VertexConsumer; import net.minecraft.client.renderer.RenderType; -import me.jellysquid.mods.sodium.client.render.vertex.VertexFormatDescription; -import me.jellysquid.mods.sodium.client.render.vertex.transform.CommonVertexElement; +import net.caffeinemc.mods.sodium.api.vertex.format.VertexFormatDescription; +import net.caffeinemc.mods.sodium.api.vertex.attributes.CommonVertexAttribute; public class VertexCollectorSodium extends VertexCollector { @@ -79,12 +79,12 @@ public class VertexCollectorSodium extends VertexCollector for (int i = 0; i < count; i++) { // Get the vertex position. - float x = UnsafeUtil.readFloat(pointer + i * format.stride + format.getOffset(CommonVertexElement.POSITION)); - float y = UnsafeUtil.readFloat(pointer + i * format.stride + format.getOffset(CommonVertexElement.POSITION) + 4); - float z = UnsafeUtil.readFloat(pointer + i * format.stride + format.getOffset(CommonVertexElement.POSITION) + 8); + float x = UnsafeUtil.readFloat(pointer + i * format.stride() + format.getElementOffset(CommonVertexAttribute.POSITION)); + float y = UnsafeUtil.readFloat(pointer + i * format.stride() + format.getElementOffset(CommonVertexAttribute.POSITION) + 4); + float z = UnsafeUtil.readFloat(pointer + i * format.stride() + format.getElementOffset(CommonVertexAttribute.POSITION) + 8); // Get the vertex alpha. - int a = UnsafeUtil.readByte(pointer + i * format.stride + format.getOffset(CommonVertexElement.COLOR) + 3) & 0xFF; + int a = UnsafeUtil.readByte(pointer + i * format.stride() + format.getElementOffset(CommonVertexAttribute.COLOR) + 3) & 0xFF; // Add the vertex to the list if it's opaque. if (a >= 25) |