-
Notifications
You must be signed in to change notification settings - Fork 18
/
PipeScreen.java
31 lines (24 loc) · 1.15 KB
/
PipeScreen.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package knightminer.inspirations.utility.client;
import knightminer.inspirations.library.Util;
import knightminer.inspirations.utility.inventory.ContainerPipe;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import slimeknights.mantle.client.screen.MultiModuleScreen;
public class PipeScreen extends MultiModuleScreen<ContainerPipe> {
private static final ResourceLocation BACKGROUND = Util.getResource("textures/gui/pipe.png");
public PipeScreen(ContainerPipe container, PlayerInventory playerInventory, ITextComponent title) {
super(container, playerInventory, title);
}
@Override
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
drawBackground(BACKGROUND);
super.drawGuiContainerBackgroundLayer(partialTicks, mouseX, mouseY);
}
@Override
protected void drawPlayerInventoryName() {
String localizedName = Minecraft.getInstance().player.inventory.getDisplayName().getUnformattedComponentText();
this.font.drawString(localizedName, 8, this.ySize - 129 + 2, 0x404040);
}
}