Move GUI classes to separate package

This commit is contained in:
Electroblob
2018-06-24 12:23:08 +01:00
parent c7c7d57e7e
commit f3c9fbdd2e
9 changed files with 19 additions and 18 deletions
@@ -1,4 +1,4 @@
package electroblob.wizardry.client;
package electroblob.wizardry.client.gui;
import org.lwjgl.input.Keyboard;
@@ -54,8 +54,8 @@ public class GuiArcaneWorkbench extends GuiContainer {
public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_){
// Tests if there is a wand in the workbench and edits the positioning accordingly
if(this.inventorySlots.getSlot(ContainerArcaneWorkbench.WAND_SLOT).getHasStack() && this.inventorySlots
.getSlot(ContainerArcaneWorkbench.WAND_SLOT).getStack().getItem() instanceof ItemWand){
if(this.inventorySlots.getSlot(ContainerArcaneWorkbench.CENTRE_SLOT).getHasStack() && this.inventorySlots
.getSlot(ContainerArcaneWorkbench.CENTRE_SLOT).getStack().getItem() instanceof ItemWand){
xSize = xSizeNoTip + tooltipWidth;
guiLeft = (this.width - this.xSize) / 2;
this.applyBtn.x = (this.width - tooltipWidth) / 2 + 48;
@@ -65,7 +65,7 @@ public class GuiArcaneWorkbench extends GuiContainer {
this.applyBtn.x = this.width / 2 + 48;
}
if(this.inventorySlots.getSlot(ContainerArcaneWorkbench.WAND_SLOT).getHasStack()){
if(this.inventorySlots.getSlot(ContainerArcaneWorkbench.CENTRE_SLOT).getHasStack()){
this.applyBtn.enabled = true;
}else{
this.applyBtn.enabled = false;
@@ -94,8 +94,8 @@ public class GuiArcaneWorkbench extends GuiContainer {
}
// Tooltip only drawn if there is a wand
if(this.inventorySlots.getSlot(ContainerArcaneWorkbench.WAND_SLOT).getHasStack() && this.inventorySlots
.getSlot(ContainerArcaneWorkbench.WAND_SLOT).getStack().getItem() instanceof ItemWand){
if(this.inventorySlots.getSlot(ContainerArcaneWorkbench.CENTRE_SLOT).getHasStack() && this.inventorySlots
.getSlot(ContainerArcaneWorkbench.CENTRE_SLOT).getStack().getItem() instanceof ItemWand){
// Tooltip box
drawTexturedModalRect(guiLeft + xSizeNoTip, guiTop, xSizeNoTip, 0, 256 - xSizeNoTip - 4, ySize);
@@ -103,7 +103,7 @@ public class GuiArcaneWorkbench extends GuiContainer {
drawTexturedModalRect(guiLeft + xSize - (256 - xSizeNoTip - 4), guiTop, xSizeNoTip + 4, 0,
256 - xSizeNoTip - 4, ySize);
ItemStack wand = this.inventorySlots.getSlot(ContainerArcaneWorkbench.WAND_SLOT).getStack();
ItemStack wand = this.inventorySlots.getSlot(ContainerArcaneWorkbench.CENTRE_SLOT).getStack();
Spell[] spells = WandHelper.getSpells(wand);
@@ -161,10 +161,10 @@ public class GuiArcaneWorkbench extends GuiContainer {
this.fontRenderer.drawString(this.playerInventory.hasCustomName() ? this.playerInventory.getName()
: I18n.format(this.playerInventory.getName()), 8, this.ySize - 96 + 2, 4210752);
if(this.inventorySlots.getSlot(ContainerArcaneWorkbench.WAND_SLOT).getHasStack() && this.inventorySlots
.getSlot(ContainerArcaneWorkbench.WAND_SLOT).getStack().getItem() instanceof ItemWand){
if(this.inventorySlots.getSlot(ContainerArcaneWorkbench.CENTRE_SLOT).getHasStack() && this.inventorySlots
.getSlot(ContainerArcaneWorkbench.CENTRE_SLOT).getStack().getItem() instanceof ItemWand){
ItemStack wand = this.inventorySlots.getSlot(ContainerArcaneWorkbench.WAND_SLOT).getStack();
ItemStack wand = this.inventorySlots.getSlot(ContainerArcaneWorkbench.CENTRE_SLOT).getStack();
this.fontRenderer.drawStringWithShadow("\u00A7f" + wand.getDisplayName(), xSizeNoTip + 6, 6, 0);
this.fontRenderer.drawStringWithShadow(
@@ -1,4 +1,4 @@
package electroblob.wizardry.client;
package electroblob.wizardry.client.gui;
import electroblob.wizardry.Wizardry;
import electroblob.wizardry.util.WizardryUtilities;
@@ -1,4 +1,4 @@
package electroblob.wizardry.client;
package electroblob.wizardry.client.gui;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
@@ -1,4 +1,4 @@
package electroblob.wizardry.client;
package electroblob.wizardry.client.gui;
import electroblob.wizardry.Wizardry;
import electroblob.wizardry.util.WizardryUtilities;
@@ -1,4 +1,4 @@
package electroblob.wizardry.client;
package electroblob.wizardry.client.gui;
import java.util.ArrayList;
import java.util.List;
@@ -1,4 +1,4 @@
package electroblob.wizardry.client;
package electroblob.wizardry.client.gui;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
@@ -1,4 +1,4 @@
package electroblob.wizardry.client;
package electroblob.wizardry.client.gui;
import org.lwjgl.input.Keyboard;
@@ -1,4 +1,4 @@
package electroblob.wizardry.client;
package electroblob.wizardry.client.gui;
import java.util.List;
@@ -1,4 +1,4 @@
package electroblob.wizardry.client;
package electroblob.wizardry.client.gui;
import java.io.BufferedReader;
import java.io.IOException;
@@ -13,6 +13,7 @@ import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;
import electroblob.wizardry.Wizardry;
import electroblob.wizardry.client.ClientProxy;
import electroblob.wizardry.constants.Constants;
import electroblob.wizardry.constants.Element;
import electroblob.wizardry.constants.Tier;