mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
get rid of moar errors
This commit is contained in:
1 parent
1bd860c52f
commit
7d8f58ea88
15 files changed
+109
-107
No files matched your search
@@ -17,7 +17,7 @@ import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
@@ -89,7 +89,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
public void initGui ()
|
||||
{
|
||||
super.initGui();
|
||||
this.mc.thePlayer.openContainer = this.container;
|
||||
this.field_146297_k.thePlayer.openContainer = this.container;
|
||||
this.guiLeft = (this.width - this.xSize) / 2;
|
||||
this.guiTop = (this.height - this.ySize) / 2;
|
||||
}
|
||||
@@ -168,7 +168,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
}*/
|
||||
|
||||
this.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
InventoryPlayer inventoryplayer = this.mc.thePlayer.inventory;
|
||||
InventoryPlayer inventoryplayer = this.field_146297_k.thePlayer.inventory;
|
||||
ItemStack itemstack = this.draggedStack == null ? inventoryplayer.getItemStack() : this.draggedStack;
|
||||
|
||||
if (itemstack != null)
|
||||
@@ -231,15 +231,15 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
GL11.glTranslatef(0.0F, 0.0F, 32.0F);
|
||||
this.zLevel = 200.0F;
|
||||
itemRenderer.zLevel = 200.0F;
|
||||
itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.mc.renderEngine, par1ItemStack, par2, par3);
|
||||
itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.mc.renderEngine, par1ItemStack, par2, par3 - (this.draggedStack == null ? 0 : 8), par4Str);
|
||||
itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.field_146297_k.renderEngine, par1ItemStack, par2, par3);
|
||||
itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.field_146297_k.renderEngine, par1ItemStack, par2, par3 - (this.draggedStack == null ? 0 : 8), par4Str);
|
||||
this.zLevel = 0.0F;
|
||||
itemRenderer.zLevel = 0.0F;
|
||||
}
|
||||
|
||||
protected void drawItemStackTooltip (ItemStack par1ItemStack, int par2, int par3)
|
||||
{
|
||||
List list = par1ItemStack.getTooltip(this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips);
|
||||
List list = par1ItemStack.getTooltip(this.field_146297_k.thePlayer, this.field_146297_k.gameSettings.advancedItemTooltips);
|
||||
|
||||
for (int k = 0; k < list.size(); ++k)
|
||||
{
|
||||
@@ -365,7 +365,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
ItemStack itemstack = par1Slot.getStack();
|
||||
boolean flag = false;
|
||||
boolean flag1 = par1Slot == this.clickedSlot && this.draggedStack != null && !this.isRightMouseClick;
|
||||
ItemStack itemstack1 = this.mc.thePlayer.inventory.getItemStack();
|
||||
ItemStack itemstack1 = this.field_146297_k.thePlayer.inventory.getItemStack();
|
||||
String s = null;
|
||||
|
||||
if (par1Slot == this.clickedSlot && this.draggedStack != null && this.isRightMouseClick && itemstack != null)
|
||||
@@ -410,12 +410,12 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
|
||||
if (itemstack == null)
|
||||
{
|
||||
Icon icon = par1Slot.getBackgroundIconIndex();
|
||||
IIcon icon = par1Slot.getBackgroundIconIndex();
|
||||
|
||||
if (icon != null)
|
||||
{
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
this.mc.getTextureManager().bindTexture(TextureMap.locationItemsTexture);
|
||||
this.field_146297_k.getTextureManager().bindTexture(TextureMap.locationItemsTexture);
|
||||
this.drawTexturedModelRectFromIcon(i, j, icon, 16, 16);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
flag1 = true;
|
||||
@@ -430,8 +430,8 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.mc.renderEngine, itemstack, i, j);
|
||||
itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.mc.renderEngine, itemstack, i, j, s);
|
||||
itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.field_146297_k.renderEngine, itemstack, i, j);
|
||||
itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.field_146297_k.renderEngine, itemstack, i, j, s);
|
||||
}
|
||||
|
||||
itemRenderer.zLevel = 0.0F;
|
||||
@@ -440,7 +440,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
|
||||
protected void func_94066_g ()
|
||||
{
|
||||
ItemStack itemstack = this.mc.thePlayer.inventory.getItemStack();
|
||||
ItemStack itemstack = this.field_146297_k.thePlayer.inventory.getItemStack();
|
||||
|
||||
if (itemstack != null && this.field_94076_q)
|
||||
{
|
||||
@@ -492,7 +492,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
protected void mouseClicked (int mouseX, int mouseY, int mouseButton)
|
||||
{
|
||||
super.mouseClicked(mouseX, mouseY, mouseButton);
|
||||
boolean flag = mouseButton == this.mc.gameSettings.keyBindPickBlock.keyCode + 100;
|
||||
boolean flag = mouseButton == this.field_146297_k.gameSettings.keyBindPickBlock.keyCode + 100;
|
||||
Slot slot = this.getSlotAtPosition(mouseX, mouseY);
|
||||
long l = Minecraft.getSystemTime();
|
||||
this.field_94074_J = this.field_94072_H == slot && l - this.field_94070_G < 250L && this.field_94073_I == mouseButton;
|
||||
@@ -515,15 +515,15 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
k1 = -999;
|
||||
}
|
||||
|
||||
if (this.mc.gameSettings.touchscreen && flag1 && this.mc.thePlayer.inventory.getItemStack() == null)
|
||||
if (this.field_146297_k.gameSettings.touchscreen && flag1 && this.field_146297_k.thePlayer.inventory.getItemStack() == null)
|
||||
{
|
||||
this.mc.displayGuiScreen((GuiScreen) null);
|
||||
this.field_146297_k.displayGuiScreen((GuiScreen) null);
|
||||
return;
|
||||
}
|
||||
|
||||
if (k1 != -1)
|
||||
{
|
||||
if (this.mc.gameSettings.touchscreen)
|
||||
if (this.field_146297_k.gameSettings.touchscreen)
|
||||
{
|
||||
if (slot != null && slot.getHasStack())
|
||||
{
|
||||
@@ -538,9 +538,9 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
}
|
||||
else if (!this.field_94076_q)
|
||||
{
|
||||
if (this.mc.thePlayer.inventory.getItemStack() == null)
|
||||
if (this.field_146297_k.thePlayer.inventory.getItemStack() == null)
|
||||
{
|
||||
if (mouseButton == this.mc.gameSettings.keyBindPickBlock.keyCode + 100)
|
||||
if (mouseButton == this.field_146297_k.gameSettings.keyBindPickBlock.keyCode + 100)
|
||||
{
|
||||
this.handleMouseClick(slot, k1, mouseButton, 3);
|
||||
}
|
||||
@@ -591,9 +591,9 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
protected void func_85041_a (int par1, int par2, int par3, long par4)
|
||||
{
|
||||
Slot slot = this.getSlotAtPosition(par1, par2);
|
||||
ItemStack itemstack = this.mc.thePlayer.inventory.getItemStack();
|
||||
ItemStack itemstack = this.field_146297_k.thePlayer.inventory.getItemStack();
|
||||
|
||||
if (this.clickedSlot != null && this.mc.gameSettings.touchscreen)
|
||||
if (this.clickedSlot != null && this.field_146297_k.gameSettings.touchscreen)
|
||||
{
|
||||
if (par3 == 0 || par3 == 1)
|
||||
{
|
||||
@@ -672,7 +672,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
{
|
||||
slot1 = (Slot) iterator.next();
|
||||
|
||||
if (slot1 != null && slot1.canTakeStack(this.mc.thePlayer) && slot1.getHasStack() && slot1.inventory == slot.inventory
|
||||
if (slot1 != null && slot1.canTakeStack(this.field_146297_k.thePlayer) && slot1.getHasStack() && slot1.inventory == slot.inventory
|
||||
&& Container.func_94527_a(slot1, this.field_94075_K, true))
|
||||
{
|
||||
this.handleMouseClick(slot1, slot1.slotNumber, par3, 1);
|
||||
@@ -706,7 +706,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
|
||||
boolean flag1;
|
||||
|
||||
if (this.clickedSlot != null && this.mc.gameSettings.touchscreen)
|
||||
if (this.clickedSlot != null && this.field_146297_k.gameSettings.touchscreen)
|
||||
{
|
||||
if (par3 == 0 || par3 == 1)
|
||||
{
|
||||
@@ -722,7 +722,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
this.handleMouseClick(this.clickedSlot, this.clickedSlot.slotNumber, par3, 0);
|
||||
this.handleMouseClick(slot, j1, 0, 0);
|
||||
|
||||
if (this.mc.thePlayer.inventory.getItemStack() != null)
|
||||
if (this.field_146297_k.thePlayer.inventory.getItemStack() != null)
|
||||
{
|
||||
this.handleMouseClick(this.clickedSlot, this.clickedSlot.slotNumber, par3, 0);
|
||||
this.field_85049_r = par1 - l;
|
||||
@@ -762,9 +762,9 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
|
||||
this.handleMouseClick((Slot) null, -999, Container.func_94534_d(2, this.field_94071_C), 5);
|
||||
}
|
||||
else if (this.mc.thePlayer.inventory.getItemStack() != null)
|
||||
else if (this.field_146297_k.thePlayer.inventory.getItemStack() != null)
|
||||
{
|
||||
if (par3 == this.mc.gameSettings.keyBindPickBlock.keyCode + 100)
|
||||
if (par3 == this.field_146297_k.gameSettings.keyBindPickBlock.keyCode + 100)
|
||||
{
|
||||
this.handleMouseClick(slot, j1, par3, 3);
|
||||
}
|
||||
@@ -782,7 +782,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
}
|
||||
}
|
||||
|
||||
if (this.mc.thePlayer.inventory.getItemStack() == null)
|
||||
if (this.field_146297_k.thePlayer.inventory.getItemStack() == null)
|
||||
{
|
||||
this.field_94070_G = 0L;
|
||||
}
|
||||
@@ -822,7 +822,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
par2 = par1Slot.slotNumber;
|
||||
}
|
||||
|
||||
this.mc.playerController.windowClick(this.container.windowId, par2, par3, par4, this.mc.thePlayer);
|
||||
this.field_146297_k.playerController.windowClick(this.container.windowId, par2, par3, par4, this.field_146297_k.thePlayer);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -830,20 +830,20 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
*/
|
||||
protected void keyTyped (char par1, int par2)
|
||||
{
|
||||
if (par2 == 1 || par2 == this.mc.gameSettings.keyBindInventory.keyCode)
|
||||
if (par2 == 1 || par2 == this.field_146297_k.gameSettings.keyBindInventory.keyCode)
|
||||
{
|
||||
this.mc.thePlayer.closeScreen();
|
||||
this.field_146297_k.thePlayer.closeScreen();
|
||||
}
|
||||
|
||||
this.checkHotbarKeys(par2);
|
||||
|
||||
if (this.mainSlot != null && this.mainSlot.getHasStack())
|
||||
{
|
||||
if (par2 == this.mc.gameSettings.keyBindPickBlock.keyCode)
|
||||
if (par2 == this.field_146297_k.gameSettings.keyBindPickBlock.keyCode)
|
||||
{
|
||||
this.handleMouseClick(this.mainSlot, this.mainSlot.slotNumber, 0, 3);
|
||||
}
|
||||
else if (par2 == this.mc.gameSettings.keyBindDrop.keyCode)
|
||||
else if (par2 == this.field_146297_k.gameSettings.keyBindDrop.keyCode)
|
||||
{
|
||||
this.handleMouseClick(this.mainSlot, this.mainSlot.slotNumber, isCtrlKeyDown() ? 1 : 0, 4);
|
||||
}
|
||||
@@ -855,7 +855,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
*/
|
||||
protected boolean checkHotbarKeys (int par1)
|
||||
{
|
||||
if (this.mc.thePlayer.inventory.getItemStack() == null && this.mainSlot != null)
|
||||
if (this.field_146297_k.thePlayer.inventory.getItemStack() == null && this.mainSlot != null)
|
||||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
@@ -875,9 +875,9 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
*/
|
||||
public void onGuiClosed ()
|
||||
{
|
||||
if (this.mc.thePlayer != null)
|
||||
if (this.field_146297_k.thePlayer != null)
|
||||
{
|
||||
this.container.onContainerClosed(this.mc.thePlayer);
|
||||
this.container.onContainerClosed(this.field_146297_k.thePlayer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -896,9 +896,9 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
{
|
||||
super.updateScreen();
|
||||
|
||||
if (!this.mc.thePlayer.isEntityAlive() || this.mc.thePlayer.isDead)
|
||||
if (!this.field_146297_k.thePlayer.isEntityAlive() || this.field_146297_k.thePlayer.isDead)
|
||||
{
|
||||
this.mc.thePlayer.closeScreen();
|
||||
this.field_146297_k.thePlayer.closeScreen();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user