-
Notifications
You must be signed in to change notification settings - Fork 18
/
CollectorScreen.java
29 lines (23 loc) · 1.13 KB
/
CollectorScreen.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
package knightminer.inspirations.utility.client;
import knightminer.inspirations.utility.inventory.ContainerCollector;
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 CollectorScreen extends MultiModuleScreen<ContainerCollector> {
private static final ResourceLocation BACKGROUND = new ResourceLocation("textures/gui/container/dispenser.png");
public CollectorScreen(ContainerCollector 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 = Minecraft.getInstance().player.inventory.getDisplayName().getUnformattedComponentText();
this.font.drawString(localizedName, 8, this.ySize - 96 + 2, 0x404040);
}
}