This repository has been archived by the owner on Apr 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ExaltationTableScreen.java
53 lines (51 loc) · 2.37 KB
/
ExaltationTableScreen.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package net.supcm.enhancedenchanting.client.gui;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import net.supcm.enhancedenchanting.EnhancedEnchanting;
import net.supcm.enhancedenchanting.common.inventory.container.ExaltationTableContainer;
public class ExaltationTableScreen extends ContainerScreen<ExaltationTableContainer> {
private final ResourceLocation TEXTURE = new ResourceLocation(EnhancedEnchanting.MODID,
"textures/gui/exaltation_table.png");
public ExaltationTableScreen(ExaltationTableContainer container, PlayerInventory player,
ITextComponent title) {
super(container, player, title);
}
@Override
public void render(MatrixStack ms, int x, int y, float ticks) {
renderBackground(ms);
super.render(ms, x, y, ticks);
renderTooltip(ms, x, y);
}
@Override protected void renderBg(MatrixStack ms, float ticks, int mouseX, int mouseY) {
ms.pushPose();
RenderSystem.color4f(1.0f, 1.0f, 1.0f, 1.0f);
Minecraft.getInstance().getTextureManager().bind(TEXTURE);
blit(ms, getGuiLeft(), getGuiTop(), 0, 0, getXSize(), getYSize());
if(menu.getSlot(37).hasItem()) {
blit(ms, getGuiLeft() + 74, getGuiTop() + 30,
menu.getSlot(37).getItem().getTag().getBoolean("IsAbility") ? 176 : 182,
0, 6, 6);
}
if(menu.getSlot(39).hasItem()) {
blit(ms, getGuiLeft() + 96, getGuiTop() + 30,
menu.getSlot(39).getItem().getTag().getBoolean("IsAbility") ? 176 : 182,
6, 6, 6);
}
if(menu.getSlot(38).hasItem()) {
blit(ms, getGuiLeft() + 74, getGuiTop() + 52,
menu.getSlot(38).getItem().getTag().getBoolean("IsAbility") ? 176 : 182,
12, 6, 6);
}
if(menu.getSlot(40).hasItem()) {
blit(ms, getGuiLeft() + 96, getGuiTop() + 52,
menu.getSlot(40).getItem().getTag().getBoolean("IsAbility") ? 176 : 182,
18, 6, 6);
}
ms.popPose();
}
}