Temporarily fized 1.21.4

This commit is contained in:
2026-03-06 11:30:01 +01:00
parent 464177e2a4
commit d8e8f21ed6
2 changed files with 16 additions and 16 deletions
@@ -16,16 +16,16 @@ public class ImageTexture extends Element {
@Override
public void render(RenderScope renderScope, ElementContext ctx) {
if (sprite.toString().endsWith(".svg")) {
IMinecraftClient client = MinecraftProvider.PROVIDER.getClient();
// if (sprite.toString().endsWith(".svg")) {
// IMinecraftClient client = MinecraftProvider.PROVIDER.getClient();
// Get the actual window pixel dimensions for the image
int renderWidth = (int) (width * client.getWindow().getFramebufferWidth() / client.getWindow().getWidth());
int renderHeight = (int) (height * client.getWindow().getFramebufferHeight()
/ client.getWindow().getHeight());
// // Get the actual window pixel dimensions for the image
// int renderWidth = (int) (width * client.getWindow().getFramebufferWidth() / client.getWindow().getWidth());
// int renderHeight = (int) (height * client.getWindow().getFramebufferHeight()
// / client.getWindow().getHeight());
sprite = SvgTexture.getSvg(client, sprite, renderWidth * 2, renderHeight * 2);
}
// sprite = SvgTexture.getSvg(client, sprite, renderWidth * 2, renderHeight * 2);
// }
renderScope.drawTexture(sprite, 0, 0, 0, 0, width, height);
}