-
Notifications
You must be signed in to change notification settings - Fork 18
/
GuiBookshelf.java
31 lines (25 loc) · 1.21 KB
/
GuiBookshelf.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.building.client;
import knightminer.inspirations.building.inventory.ContainerBookshelf;
import knightminer.inspirations.building.tileentity.TileBookshelf;
import knightminer.inspirations.library.Util;
import net.minecraft.client.gui.IHasContainer;
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 GuiBookshelf extends MultiModuleScreen<ContainerBookshelf> {
private static final ResourceLocation BACKGROUND = Util.getResource("textures/gui/bookshelf.png");
public GuiBookshelf(ContainerBookshelf container, PlayerInventory playerInv, ITextComponent title) {
super(container, playerInv, title);
}
@Override
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
drawBackground(BACKGROUND);
super.drawGuiContainerBackgroundLayer(partialTicks, mouseX, mouseY);
}
@Override
protected void drawPlayerInventoryName() {
String localizedName = playerInventory.getDisplayName().getUnformattedComponentText();
this.font.drawString(localizedName, 8, this.ySize - 106 + 2, 0x404040);
}
}