Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for sprites not being marked as active when used in a SpriteCoordinateExpander #2616

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -33,6 +34,7 @@ public class SpriteCoordinateExpanderMixin implements VertexBufferWriter {

@Inject(method = "<init>", at = @At("RETURN"))
private void onInit(VertexConsumer delegate, TextureAtlasSprite sprite, CallbackInfo ci) {
SpriteUtil.markSpriteActive(sprite);
this.minU = sprite.getU0();
this.minV = sprite.getV0();

Expand Down
Loading