From 308c68bf02e9c3fbdf8a5169d2e3f110bdb41d2c Mon Sep 17 00:00:00 2001 From: mcrcortex <{ID}+{username}@users.noreply.github.com> Date: Tue, 23 Jul 2024 20:05:53 +1000 Subject: [PATCH] Partial fix for https://github.com/CaffeineMC/sodium-fabric/issues/2601 class of issues, however it assumes that a new SpriteCoordinateExpander is created every frame. --- .../immediate/consumer/SpriteCoordinateExpanderMixin.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/caffeinemc/mods/sodium/mixin/core/render/immediate/consumer/SpriteCoordinateExpanderMixin.java b/src/main/java/net/caffeinemc/mods/sodium/mixin/core/render/immediate/consumer/SpriteCoordinateExpanderMixin.java index 89f768ce5a..636a2c83de 100644 --- a/src/main/java/net/caffeinemc/mods/sodium/mixin/core/render/immediate/consumer/SpriteCoordinateExpanderMixin.java +++ b/src/main/java/net/caffeinemc/mods/sodium/mixin/core/render/immediate/consumer/SpriteCoordinateExpanderMixin.java @@ -4,6 +4,7 @@ import net.caffeinemc.mods.sodium.api.vertex.attributes.CommonVertexAttribute; import net.caffeinemc.mods.sodium.api.vertex.attributes.common.TextureAttribute; import net.caffeinemc.mods.sodium.api.vertex.format.VertexFormatDescription; +import net.caffeinemc.mods.sodium.client.render.texture.SpriteUtil; import net.minecraft.client.renderer.SpriteCoordinateExpander; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.caffeinemc.mods.sodium.api.vertex.buffer.VertexBufferWriter; @@ -33,6 +34,7 @@ public class SpriteCoordinateExpanderMixin implements VertexBufferWriter { @Inject(method = "", at = @At("RETURN")) private void onInit(VertexConsumer delegate, TextureAtlasSprite sprite, CallbackInfo ci) { + SpriteUtil.markSpriteActive(sprite); this.minU = sprite.getU0(); this.minV = sprite.getV0();