package lv.enes.mc.eris_alchemy.client; import lv.enes.mc.eris_alchemy.ErisAlchemy; import lv.enes.mc.eris_alchemy.menu.AlchemicalChestMenu; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; public class AlchemicalChestScreen extends AbstractContainerScreen { public static final ResourceLocation TEXTURE = new ResourceLocation(ErisAlchemy.ID, "textures/gui/container/alchemical_chest.png"); public static final int TEXTURE_WIDTH = 248; public static final int TEXTURE_HEIGHT = 237; public AlchemicalChestScreen(AlchemicalChestMenu menu, Inventory inventory, Component title) { super(menu, inventory, title); imageWidth = TEXTURE_WIDTH; imageHeight = TEXTURE_HEIGHT; } @Override public void render(GuiGraphics graphics, int mouseX, int mouseY, float delta) { renderBackground(graphics); super.render(graphics, mouseX, mouseY, delta); renderTooltip(graphics, mouseX, mouseY); } @Override protected void renderBg(GuiGraphics graphics, float delta, int mouseX, int mouseY) { int x = (width - imageWidth) / 2; int y = (height - imageHeight) / 2; graphics.blit(TEXTURE, x, y, 0, 0, imageWidth, imageHeight); } @Override protected void renderLabels(GuiGraphics graphics, int mouseX, int mouseY) { // Don't render any labels, there's no space for them lol } }