aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/anthonyhilyard
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
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')
-rw-r--r--src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSource.java4
-rw-r--r--src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSourceSodium.java4
-rw-r--r--src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollector.java4
-rw-r--r--src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollectorSodium.java12
-rw-r--r--src/main/java/com/anthonyhilyard/iceberg/renderer/VertexConsumerSodium.java2
5 files changed, 13 insertions, 13 deletions
diff --git a/src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSource.java b/src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSource.java
index d97eca2..4eaab58 100644
--- a/src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSource.java
+++ b/src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSource.java
@@ -28,8 +28,8 @@ public class CheckedBufferSource implements MultiBufferSource
{
try
{
- // If Sodium 0.4.11 is installed, use the Sodium implementation.
- useSodiumVersion = FabricLoader.getInstance().isModLoaded("sodium") && VersionPredicate.parse("0.4.11").test(FabricLoader.getInstance().getModContainer("sodium").get().getMetadata().getVersion());
+ // If Sodium 0.4.10 is installed, use the Sodium implementation.
+ useSodiumVersion = FabricLoader.getInstance().isModLoaded("sodium") && VersionPredicate.parse("0.4.10").test(FabricLoader.getInstance().getModContainer("sodium").get().getMetadata().getVersion());
}
catch (Exception e)
{
diff --git a/src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSourceSodium.java b/src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSourceSodium.java
index d4e1156..2a37254 100644
--- a/src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSourceSodium.java
+++ b/src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSourceSodium.java
@@ -7,8 +7,8 @@ import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
-import net.caffeinemc.mods.sodium.api.vertex.buffer.VertexBufferWriter;
-import net.caffeinemc.mods.sodium.api.vertex.format.VertexFormatDescription;
+import me.jellysquid.mods.sodium.client.render.vertex.VertexBufferWriter;
+import me.jellysquid.mods.sodium.client.render.vertex.VertexFormatDescription;
public final class CheckedBufferSourceSodium extends CheckedBufferSource
{
diff --git a/src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollector.java b/src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollector.java
index 07ce9be..0c6b9c9 100644
--- a/src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollector.java
+++ b/src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollector.java
@@ -34,8 +34,8 @@ public class VertexCollector implements MultiBufferSource
{
try
{
- // If Sodium 0.4.11 is installed, use the Sodium implementation.
- useSodiumVersion = FabricLoader.getInstance().isModLoaded("sodium") && VersionPredicate.parse("0.4.11").test(FabricLoader.getInstance().getModContainer("sodium").get().getMetadata().getVersion());
+ // If Sodium 0.4.10 is installed, use the Sodium implementation.
+ useSodiumVersion = FabricLoader.getInstance().isModLoaded("sodium") && VersionPredicate.parse("0.4.10").test(FabricLoader.getInstance().getModContainer("sodium").get().getMetadata().getVersion());
}
catch (Exception e)
{
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)
diff --git a/src/main/java/com/anthonyhilyard/iceberg/renderer/VertexConsumerSodium.java b/src/main/java/com/anthonyhilyard/iceberg/renderer/VertexConsumerSodium.java
index 7322576..c02ef30 100644
--- a/src/main/java/com/anthonyhilyard/iceberg/renderer/VertexConsumerSodium.java
+++ b/src/main/java/com/anthonyhilyard/iceberg/renderer/VertexConsumerSodium.java
@@ -2,7 +2,7 @@ package com.anthonyhilyard.iceberg.renderer;
import com.mojang.blaze3d.vertex.VertexConsumer;
-import net.caffeinemc.mods.sodium.api.vertex.buffer.VertexBufferWriter;
+import me.jellysquid.mods.sodium.client.render.vertex.VertexBufferWriter;
public interface VertexConsumerSodium extends VertexConsumer, VertexBufferWriter
{