diff --git a/gradle.properties b/gradle.properties index d2ed0005b1..8e8b98ecd9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,7 +17,7 @@ archives_base_name=meteor-client baritone_version=1.21 # Sodium (https://github.com/CaffeineMC/sodium-fabric) -sodium_version=mc1.21-0.6.0-beta.1-fabric +sodium_version=mc1.21-0.6.0-beta.2-fabric # Lithium (https://github.com/CaffeineMC/lithium-fabric) lithium_version=mc1.21.1-0.13.0 diff --git a/src/main/java/meteordevelopment/meteorclient/mixin/sodium/MeshVertexConsumerMixin.java b/src/main/java/meteordevelopment/meteorclient/mixin/sodium/MeshVertexConsumerMixin.java index da47e5f1c6..16c80d99f7 100644 --- a/src/main/java/meteordevelopment/meteorclient/mixin/sodium/MeshVertexConsumerMixin.java +++ b/src/main/java/meteordevelopment/meteorclient/mixin/sodium/MeshVertexConsumerMixin.java @@ -6,10 +6,10 @@ package meteordevelopment.meteorclient.mixin.sodium; import meteordevelopment.meteorclient.utils.render.MeshVertexConsumerProvider; -import net.caffeinemc.mods.sodium.api.vertex.attributes.CommonVertexAttribute; import net.caffeinemc.mods.sodium.api.vertex.buffer.VertexBufferWriter; -import net.caffeinemc.mods.sodium.api.vertex.format.VertexFormatDescription; import net.minecraft.client.render.VertexConsumer; +import net.minecraft.client.render.VertexFormat; +import net.minecraft.client.render.VertexFormatElement; import org.lwjgl.system.MemoryStack; import org.lwjgl.system.MemoryUtil; import org.spongepowered.asm.mixin.Mixin; @@ -17,13 +17,13 @@ @Mixin(value = MeshVertexConsumerProvider.MeshVertexConsumer.class, remap = false) public abstract class MeshVertexConsumerMixin implements VertexConsumer, VertexBufferWriter { @Override - public void push(MemoryStack stack, long ptr, int count, VertexFormatDescription format) { - int positionOffset = format.getElementOffset(CommonVertexAttribute.POSITION); + public void push(MemoryStack stack, long ptr, int count, VertexFormat format) { + int positionOffset = format.getOffset(VertexFormatElement.POSITION); if (positionOffset == -1) return; for (int i = 0; i < count; i++) { - long positionPtr = ptr + (long) format.stride() * i + positionOffset; + long positionPtr = ptr + (long) format.getVertexSizeByte() * i + positionOffset; float x = MemoryUtil.memGetFloat(positionPtr); float y = MemoryUtil.memGetFloat(positionPtr + 4); diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 6340515ecc..8f9d2a3b9f 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -53,7 +53,7 @@ "feather": "*", "origins": "*", "wurst": "*", - "sodium": "<0.6.0-beta", + "sodium": "<0.6.0-beta.2", "morechathistory": "*" } }