package net.minecraft.client.gui.screens.inventory; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.renderer.RenderType; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.inventory.ShulkerBoxMenu; @Environment(EnvType.CLIENT) public class ShulkerBoxScreen extends AbstractContainerScreen { private static final ResourceLocation CONTAINER_TEXTURE = ResourceLocation.withDefaultNamespace("textures/gui/container/shulker_box.png"); public ShulkerBoxScreen(ShulkerBoxMenu menu, Inventory playerInventory, Component title) { super(menu, playerInventory, title); this.imageHeight++; } @Override public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { super.render(guiGraphics, mouseX, mouseY, partialTick); this.renderTooltip(guiGraphics, mouseX, mouseY); } @Override protected void renderBg(GuiGraphics guiGraphics, float partialTick, int mouseX, int mouseY) { int i = (this.width - this.imageWidth) / 2; int j = (this.height - this.imageHeight) / 2; guiGraphics.blit(RenderType::guiTextured, CONTAINER_TEXTURE, i, j, 0.0F, 0.0F, this.imageWidth, this.imageHeight, 256, 256); } }