aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSourceSodium.java
diff options
context:
space:
mode:
authorAnthony Hilyard <anthony.hilyard@gmail.com>2023-04-09 13:22:32 -0700
committerAnthony Hilyard <anthony.hilyard@gmail.com>2023-04-09 13:22:32 -0700
commitc205088078971c5bb1f4be084e1fe314dc7dad3b (patch)
tree70008c843678d1506b701703c87d466c780a8e3b /src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSourceSodium.java
parent94e0927f324032c49a610f41c6055e56a0823321 (diff)
downloadIceberg-c205088078971c5bb1f4be084e1fe314dc7dad3b.tar.gz
Iceberg-c205088078971c5bb1f4be084e1fe314dc7dad3b.tar.bz2
Iceberg-c205088078971c5bb1f4be084e1fe314dc7dad3b.zip
Ported changes from 1.1.5. 3D item renderer now supports most items
that spawn entities.
Diffstat (limited to 'src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSourceSodium.java')
-rw-r--r--src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSourceSodium.java67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSourceSodium.java b/src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSourceSodium.java
new file mode 100644
index 0000000..7198512
--- /dev/null
+++ b/src/main/java/com/anthonyhilyard/iceberg/renderer/CheckedBufferSourceSodium.java
@@ -0,0 +1,67 @@
+package com.anthonyhilyard.iceberg.renderer;
+
+import org.lwjgl.system.MemoryStack;
+
+import com.mojang.blaze3d.vertex.VertexConsumer;
+
+import net.minecraft.client.renderer.MultiBufferSource;
+import net.minecraft.client.renderer.RenderType;
+
+// import me.jellysquid.mods.sodium.client.render.vertex.VertexBufferWriter;
+// import me.jellysquid.mods.sodium.client.render.vertex.VertexFormatDescription;
+
+public final class CheckedBufferSourceSodium extends CheckedBufferSource
+{
+ protected CheckedBufferSourceSodium(MultiBufferSource bufferSource)
+ {
+ super(bufferSource);
+ }
+
+ // @Override
+ // public VertexConsumer getBuffer(RenderType renderType)
+ // {
+ // final VertexConsumer vertexConsumer = bufferSource.getBuffer(renderType);
+ // VertexConsumer vertexConsumerWrap = new VertexConsumerSodium()
+ // {
+ // @Override
+ // public VertexConsumer vertex(double x, double y, double z)
+ // {
+ // hasRendered = true;
+ // return vertexConsumer.vertex(x, y, z);
+ // }
+
+ // @Override
+ // public VertexConsumer color(int r, int g, int b, int a) { return vertexConsumer.color(r, g, b, a); }
+
+ // @Override
+ // public VertexConsumer uv(float u, float v) { return vertexConsumer.uv(u, v); }
+
+ // @Override
+ // public VertexConsumer overlayCoords(int x, int y) { return vertexConsumer.overlayCoords(x, y); }
+
+ // @Override
+ // public VertexConsumer uv2(int u, int v) { return vertexConsumer.uv2(u, v); }
+
+ // @Override
+ // public VertexConsumer normal(float x, float y, float z) { return vertexConsumer.normal(x, y, z); }
+
+ // @Override
+ // public void endVertex() { vertexConsumer.endVertex(); }
+
+ // @Override
+ // public void defaultColor(int r, int g, int b, int a) { vertexConsumer.defaultColor(r, g, b, a); }
+
+ // @Override
+ // public void unsetDefaultColor() { vertexConsumer.unsetDefaultColor(); }
+
+ // @Override
+ // public void push(MemoryStack memoryStack, long pointer, int count, VertexFormatDescription format)
+ // {
+ // hasRendered = true;
+ // ((VertexBufferWriter)vertexConsumer).push(memoryStack, pointer, count, format);
+ // }
+ // };
+
+ // return vertexConsumerWrap;
+ // }
+} \ No newline at end of file