aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollectorSodium.java
diff options
context:
space:
mode:
authorAnthony Hilyard <anthony.hilyard@gmail.com>2023-06-09 14:00:33 -0700
committerAnthony Hilyard <anthony.hilyard@gmail.com>2023-06-09 14:00:33 -0700
commit4916249af135eec5ca9624d9af1716f2c2364682 (patch)
treeef046ec007b50fe8b561a789da5d431171e18633 /src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollectorSodium.java
parent7e2f2ce1d2af02a31368662a3e465ea1581e9112 (diff)
downloadIceberg-4916249af135eec5ca9624d9af1716f2c2364682.tar.gz
Iceberg-4916249af135eec5ca9624d9af1716f2c2364682.tar.bz2
Iceberg-4916249af135eec5ca9624d9af1716f2c2364682.zip
Reverted sodium support changes. Fixes AHilyard/LegendaryTooltips#79.
Diffstat (limited to 'src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollectorSodium.java')
-rw-r--r--src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollectorSodium.java12
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 dab44b2..ed0fb7c 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 net.caffeinemc.mods.sodium.api.vertex.format.VertexFormatDescription;
-import net.caffeinemc.mods.sodium.api.vertex.attributes.CommonVertexAttribute;
+import me.jellysquid.mods.sodium.client.render.vertex.VertexFormatDescription;
+import me.jellysquid.mods.sodium.client.render.vertex.transform.CommonVertexElement;
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.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);
+ 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);
// Get the vertex alpha.
- int a = UnsafeUtil.readByte(pointer + i * format.stride() + format.getElementOffset(CommonVertexAttribute.COLOR) + 3) & 0xFF;
+ int a = UnsafeUtil.readByte(pointer + i * format.stride + format.getOffset(CommonVertexElement.COLOR) + 3) & 0xFF;
// Add the vertex to the list if it's opaque.
if (a >= 25)