ShulkerBoxScreen .java

net.minecraft.client.gui.screens.inventory.ShulkerBoxScreen (class): members: CONTAINER_TEXTURE, extractBackground. imports: ShulkerBoxMenu, Inventory.

net.minecraft.client.gui.screens.inventoryclass28 linesclientextends AbstractContainerScreen<ShulkerBoxMenu>1.2 KB

API Surface (1)

void extractBackground(final GuiGraphicsExtractor graphics, final int mouseX, final int mouseY, final float a)

Fields & Constants (1)

CONTAINER_TEXTURE

String literals (1)

"textures/gui/container/shulker_box.png"

Full Source

ShulkerBoxScreen.java28 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.client.gui.screens.inventory;
2
3
import net.fabricmc.api.EnvType;
4
import net.fabricmc.api.Environment;
5
import net.minecraft.client.gui.GuiGraphicsExtractor;
6
import net.minecraft.client.renderer.RenderPipelines;
7
import net.minecraft.network.chat.Component;
8
import net.minecraft.resources.Identifier;
9
import net.minecraft.world.entity.player.Inventory;
10
import net.minecraft.world.inventory.ShulkerBoxMenu;
11
12
@Environment(EnvType.CLIENT)
13
public class ShulkerBoxScreen extends AbstractContainerScreen<ShulkerBoxMenu> {
14
	private static final Identifier CONTAINER_TEXTURE = Identifier.withDefaultNamespace("textures/gui/container/shulker_box.png");
15
16
	public ShulkerBoxScreen(final ShulkerBoxMenu menu, final Inventory inventory, final Component title) {
17
		super(menu, inventory, title, 176, 167);
18
	}
19
20
	@Override
21
	public void extractBackground(final GuiGraphicsExtractor graphics, final int mouseX, final int mouseY, final float a) {
22
		super.extractBackground(graphics, mouseX, mouseY, a);
23
		int xo = (this.width - this.imageWidth) / 2;
24
		int yo = (this.height - this.imageHeight) / 2;
25
		graphics.blit(RenderPipelines.GUI_TEXTURED, CONTAINER_TEXTURE, xo, yo, 0.0F, 0.0F, this.imageWidth, this.imageHeight, 256, 256);
26
	}
27
}
28

Decompiled Minecraft 26.3 source of ShulkerBoxScreen (net/minecraft/client/gui/screens/inventory/ShulkerBoxScreen.java) with Mojang official mappings, stored verbatim on the site.