Текстура гуи сжимается

Версия Minecraft
1.12.2
API
Forge
Гуи шириной до 176 работает нормально, но если она больше 176, то просто сжимается. В итоге выглядит странно, слоты куда-то сдвигаются. Как можно расширить гуи?
GuiContainer:
public class GUICustomInvBasic extends GuiContainer {
    
    private static final ResourceLocation INVENTORY_GUI_TEXTURE = new ResourceLocation(Reference.MODID + ":textures/gui/inventory_gui_backpack_basic.png");

    private float oldMouseX;
    private float oldMouseY;
    
    public GUICustomInvBasic(EntityPlayer player, InventoryPlayer inventoryPlayer, CustomInventory cInventory) {
        super(new ContainerCustomInvBasic(inventoryPlayer, cInventory, player));
        this.xSize = 209;
        this.ySize = 166;
    }

    public void drawScreen(int mouseX, int mouseY, float partialTicks) {
        super.drawScreen(mouseX, mouseY, partialTicks);
        this.oldMouseX = (float)mouseX;
        this.oldMouseY = (float)mouseY;
        this.renderHoveredToolTip(mouseX, mouseY);
    }[ATTACH type="full"]12041[/ATTACH]

    @Override
    protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.mc.getTextureManager().bindTexture(INVENTORY_GUI_TEXTURE);
        int i = this.guiLeft;
        int j = this.guiTop;
        this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.ySize);
        GuiInventory.drawEntityOnScreen(i - 70, j + 165, 85, guiLeft + 51 - this.oldMouseX, guiTop + 25 - this.oldMouseY, this.mc.player);
    }

}
 

Вложения

  • 2021-05-27_07.53.10.png
    2021-05-27_07.53.10.png
    384.4 KB · Просмотры: 20
Сверху