diff options
author | Anthony Hilyard <anthony.hilyard@gmail.com> | 2023-04-20 14:47:14 -0700 |
---|---|---|
committer | Anthony Hilyard <anthony.hilyard@gmail.com> | 2023-04-20 14:47:14 -0700 |
commit | 17083f07fc0a464d520c1b233676ebe7bdc8fa2f (patch) | |
tree | 8b5f7d7c54edb696ff7563dd5609e6b262a5f683 /src/main/java/com/anthonyhilyard/iceberg | |
parent | b35061a82bed88966b6efdab39fc3c5b11cb0267 (diff) | |
download | Iceberg-17083f07fc0a464d520c1b233676ebe7bdc8fa2f.tar.gz Iceberg-17083f07fc0a464d520c1b233676ebe7bdc8fa2f.tar.bz2 Iceberg-17083f07fc0a464d520c1b233676ebe7bdc8fa2f.zip |
Fixed a potential crash in the CustomItemRenderer.
Diffstat (limited to 'src/main/java/com/anthonyhilyard/iceberg')
-rw-r--r-- | src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSource.java | 2 | ||||
-rw-r--r-- | src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollector.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSource.java b/src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSource.java index 706fd9c..2140178 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSource.java +++ b/src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSource.java @@ -37,7 +37,7 @@ public class CheckedBufferSource implements MultiBufferSource } } - if (useSodiumVersion) + if (useSodiumVersion != null && useSodiumVersion) { // Instantiate the Sodium implementation using reflection. try diff --git a/src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollector.java b/src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollector.java index 22b98e1..47ff098 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollector.java +++ b/src/main/java/com/anthonyhilyard/iceberg/renderer/VertexCollector.java @@ -34,7 +34,7 @@ public class VertexCollector implements MultiBufferSource { try { - // If Sodium 0.4.9+ is installed, use the Sodium implementation. + // If Sodium 0.4.10 is installed, use the Sodium implementation. useSodiumVersion = FabricLoader.getInstance().isModLoaded("sodium") && VersionPredicateParser.parse("0.4.10").test(FabricLoader.getInstance().getModContainer("sodium").get().getMetadata().getVersion()); } catch (Exception e) @@ -43,7 +43,7 @@ public class VertexCollector implements MultiBufferSource } } - if (useSodiumVersion) + if (useSodiumVersion != null && useSodiumVersion) { // Instantiate the Sodium implementation using reflection. try |