Most of the 1.8 Port.
This commit is contained in:
@@ -30,27 +30,24 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.base.Stopwatch;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
|
||||
|
||||
import cpw.mods.fml.common.ObfuscationReflectionHelper;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.client.gui.widgets.GuiScrollbar;
|
||||
@@ -80,6 +77,9 @@ import appeng.integration.IntegrationRegistry;
|
||||
import appeng.integration.IntegrationType;
|
||||
import appeng.integration.abstraction.INEI;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.base.Stopwatch;
|
||||
|
||||
|
||||
public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
@@ -87,7 +87,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
protected final List<InternalSlotME> meSlots = new LinkedList<InternalSlotME>();
|
||||
// drag y
|
||||
final Set<Slot> drag_click = new HashSet<Slot>();
|
||||
final AppEngRenderItem aeRenderItem = new AppEngRenderItem();
|
||||
final AppEngRenderItem aeRenderItem = new AppEngRenderItem(Minecraft.getMinecraft().renderEngine,Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager());
|
||||
protected GuiScrollbar myScrollBar = null;
|
||||
boolean disableShiftClick = false;
|
||||
Stopwatch dbl_clickTimer = Stopwatch.createStarted();
|
||||
@@ -279,6 +279,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
this.zLevel = 0.0F;
|
||||
itemRender.zLevel = 0.0F;
|
||||
}
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
GL11.glPopAttrib();
|
||||
}
|
||||
|
||||
@@ -334,7 +335,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked( int xCoord, int yCoord, int btn )
|
||||
protected void mouseClicked( int xCoord, int yCoord, int btn ) throws IOException
|
||||
{
|
||||
this.drag_click.clear();
|
||||
|
||||
@@ -576,7 +577,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
final List<Slot> slots = this.getInventorySlots();
|
||||
for( Slot inventorySlot : slots )
|
||||
{
|
||||
if( inventorySlot != null && inventorySlot.canTakeStack( this.mc.thePlayer ) && inventorySlot.getHasStack() && inventorySlot.inventory == slot.inventory && Container.func_94527_a( inventorySlot, this.dbl_whichItem, true ) )
|
||||
if( inventorySlot != null && inventorySlot.canTakeStack( this.mc.thePlayer ) && inventorySlot.getHasStack() && inventorySlot.inventory == slot.inventory && Container.canAddItemToSlot( inventorySlot, this.dbl_whichItem, true ) )
|
||||
{
|
||||
this.handleMouseClick( inventorySlot, inventorySlot.slotNumber, ctrlDown, 1 );
|
||||
}
|
||||
@@ -657,7 +658,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
for( Slot slot : slots )
|
||||
{
|
||||
// isPointInRegion
|
||||
if( this.func_146978_c( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mouseX, mouseY ) )
|
||||
if( this.isPointInRegion( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mouseX, mouseY ) )
|
||||
{
|
||||
return slot;
|
||||
}
|
||||
@@ -669,7 +670,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
public abstract void drawBG( int offsetX, int offsetY, int mouseX, int mouseY );
|
||||
|
||||
@Override
|
||||
public void handleMouseInput()
|
||||
public void handleMouseInput() throws IOException
|
||||
{
|
||||
super.handleMouseInput();
|
||||
|
||||
@@ -728,7 +729,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
GL11.glEnable( GL12.GL_RESCALE_NORMAL );
|
||||
GL11.glEnable( GL11.GL_DEPTH_TEST );
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
itemRender.renderItemAndEffectIntoGUI( this.fontRendererObj, this.mc.renderEngine, is, x, y );
|
||||
itemRender.renderItemAndEffectIntoGUI( is, x, y );
|
||||
GL11.glPopAttrib();
|
||||
|
||||
itemRender.zLevel = 0.0F;
|
||||
@@ -803,7 +804,6 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
this.bindTexture( "guis/states.png" );
|
||||
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
try
|
||||
{
|
||||
int uv_y = (int) Math.floor( aes.getIcon() / 16 );
|
||||
@@ -821,15 +821,18 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
float par5 = 16;
|
||||
float par6 = 16;
|
||||
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||
|
||||
float f = 0.00390625F;
|
||||
float f1 = 0.00390625F;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA_F( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() );
|
||||
tessellator.addVertexWithUV( par1 + 0, par2 + par6, this.zLevel, ( par3 + 0 ) * f, ( par4 + par6 ) * f1 );
|
||||
tessellator.addVertexWithUV( par1 + par5, par2 + par6, this.zLevel, ( par3 + par5 ) * f, ( par4 + par6 ) * f1 );
|
||||
tessellator.addVertexWithUV( par1 + par5, par2 + 0, this.zLevel, ( par3 + par5 ) * f, ( par4 + 0 ) * f1 );
|
||||
tessellator.addVertexWithUV( par1 + 0, par2 + 0, this.zLevel, ( par3 + 0 ) * f, ( par4 + 0 ) * f1 );
|
||||
tessellator.setColorRGBA_F( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
worldrenderer.startDrawingQuads();
|
||||
worldrenderer.setColorRGBA_F( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() );
|
||||
worldrenderer.addVertexWithUV( par1 + 0, par2 + par6, this.zLevel, ( par3 + 0 ) * f, ( par4 + par6 ) * f1 );
|
||||
worldrenderer.addVertexWithUV( par1 + par5, par2 + par6, this.zLevel, ( par3 + par5 ) * f, ( par4 + par6 ) * f1 );
|
||||
worldrenderer.addVertexWithUV( par1 + par5, par2 + 0, this.zLevel, ( par3 + par5 ) * f, ( par4 + 0 ) * f1 );
|
||||
worldrenderer.addVertexWithUV( par1 + 0, par2 + 0, this.zLevel, ( par3 + 0 ) * f, ( par4 + 0 ) * f1 );
|
||||
worldrenderer.setColorRGBA_F( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
tessellator.draw();
|
||||
}
|
||||
catch( Exception err )
|
||||
|
||||
@@ -26,7 +26,6 @@ import java.util.Locale;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.client.me.SlotME;
|
||||
import appeng.core.AEConfig;
|
||||
|
||||
@@ -25,10 +25,8 @@ import java.util.List;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraftforge.common.config.ConfigCategory;
|
||||
import net.minecraftforge.common.config.ConfigElement;
|
||||
|
||||
import cpw.mods.fml.client.config.GuiConfig;
|
||||
import cpw.mods.fml.client.config.IConfigElement;
|
||||
|
||||
import net.minecraftforge.fml.client.config.GuiConfig;
|
||||
import net.minecraftforge.fml.client.config.IConfigElement;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.AppEng;
|
||||
|
||||
|
||||
@@ -23,8 +23,7 @@ import java.util.Set;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
import cpw.mods.fml.client.IModGuiFactory;
|
||||
import net.minecraftforge.fml.client.IModGuiFactory;
|
||||
|
||||
|
||||
public class AEConfigGuiFactory implements IModGuiFactory
|
||||
|
||||
@@ -21,13 +21,13 @@ package appeng.client.gui.implementations;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import appeng.api.config.ActionItems;
|
||||
import appeng.api.config.CopyMode;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
|
||||
@@ -19,9 +19,10 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiTabButton;
|
||||
import appeng.container.implementations.ContainerChest;
|
||||
@@ -44,7 +45,7 @@ public class GuiChest extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton par1GuiButton )
|
||||
protected void actionPerformed( GuiButton par1GuiButton ) throws IOException
|
||||
{
|
||||
super.actionPerformed( par1GuiButton );
|
||||
|
||||
|
||||
@@ -19,11 +19,13 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiImgButton;
|
||||
@@ -51,7 +53,7 @@ public class GuiCondenser extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( GuiButton btn ) throws IOException
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
|
||||
@@ -19,10 +19,11 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.definitions.IDefinitions;
|
||||
import appeng.api.definitions.IParts;
|
||||
@@ -175,7 +176,7 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped( char character, int key )
|
||||
protected void keyTyped( char character, int key ) throws IOException
|
||||
{
|
||||
if( !this.checkHotbarKeys( key ) )
|
||||
{
|
||||
@@ -225,7 +226,7 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( GuiButton btn ) throws IOException
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
|
||||
@@ -26,15 +26,13 @@ import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.storage.ITerminalHost;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
@@ -54,6 +52,8 @@ import appeng.parts.reporting.PartPatternTerminal;
|
||||
import appeng.parts.reporting.PartTerminal;
|
||||
import appeng.util.Platform;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
|
||||
|
||||
public class GuiCraftConfirm extends AEBaseGui
|
||||
{
|
||||
@@ -530,7 +530,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped( char character, int key )
|
||||
protected void keyTyped( char character, int key ) throws IOException
|
||||
{
|
||||
if( !this.checkHotbarKeys( key ) )
|
||||
{
|
||||
@@ -543,7 +543,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( GuiButton btn ) throws IOException
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
|
||||
@@ -26,15 +26,13 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
|
||||
import org.apache.commons.lang3.time.DurationFormatUtils;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.apache.commons.lang3.time.DurationFormatUtils;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.SortDir;
|
||||
import appeng.api.config.SortOrder;
|
||||
@@ -54,6 +52,8 @@ import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.ReadableNumberConverter;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
|
||||
|
||||
public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
{
|
||||
@@ -115,7 +115,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( GuiButton btn ) throws IOException
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
|
||||
@@ -25,12 +25,12 @@ package appeng.client.gui.implementations;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.definitions.IDefinitions;
|
||||
import appeng.api.definitions.IParts;
|
||||
@@ -107,7 +107,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( GuiButton btn ) throws IOException
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
|
||||
import appeng.api.config.ActionItems;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.storage.ITerminalHost;
|
||||
|
||||
@@ -19,9 +19,10 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiTabButton;
|
||||
import appeng.container.implementations.ContainerDrive;
|
||||
@@ -44,7 +45,7 @@ public class GuiDrive extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton par1GuiButton )
|
||||
protected void actionPerformed( GuiButton par1GuiButton ) throws IOException
|
||||
{
|
||||
super.actionPerformed( par1GuiButton );
|
||||
|
||||
|
||||
@@ -19,11 +19,13 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.YesNo;
|
||||
@@ -86,7 +88,7 @@ public class GuiFormationPlane extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( GuiButton btn ) throws IOException
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.container.implementations.ContainerGrinder;
|
||||
import appeng.core.localization.GuiText;
|
||||
|
||||
@@ -19,12 +19,14 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.FullnessMode;
|
||||
import appeng.api.config.OperationMode;
|
||||
@@ -110,7 +112,7 @@ public class GuiIOPort extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( GuiButton btn ) throws IOException
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiProgressBar;
|
||||
import appeng.client.gui.widgets.GuiProgressBar.Direction;
|
||||
|
||||
@@ -19,11 +19,13 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.YesNo;
|
||||
import appeng.client.gui.widgets.GuiImgButton;
|
||||
@@ -93,7 +95,7 @@ public class GuiInterface extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( GuiButton btn ) throws IOException
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
@@ -28,15 +29,13 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiScrollbar;
|
||||
@@ -48,6 +47,8 @@ import appeng.core.localization.GuiText;
|
||||
import appeng.parts.reporting.PartMonitor;
|
||||
import appeng.util.Platform;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
|
||||
|
||||
public class GuiInterfaceTerminal extends AEBaseGui
|
||||
{
|
||||
@@ -142,7 +143,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked( int xCoord, int yCoord, int btn )
|
||||
protected void mouseClicked( int xCoord, int yCoord, int btn ) throws IOException
|
||||
{
|
||||
this.searchField.mouseClicked( xCoord, yCoord, btn );
|
||||
|
||||
@@ -185,7 +186,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped( char character, int key )
|
||||
protected void keyTyped( char character, int key ) throws IOException
|
||||
{
|
||||
if( !this.checkHotbarKeys( key ) )
|
||||
{
|
||||
@@ -213,7 +214,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
this.refreshList = true;
|
||||
}
|
||||
|
||||
for( Object oKey : in.func_150296_c() )
|
||||
for( Object oKey : in.getKeySet() )
|
||||
{
|
||||
String key = (String) oKey;
|
||||
if( key.startsWith( "=" ) )
|
||||
|
||||
@@ -21,11 +21,11 @@ package appeng.client.gui.implementations;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.LevelType;
|
||||
import appeng.api.config.RedstoneMode;
|
||||
@@ -167,7 +167,7 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( GuiButton btn ) throws IOException
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
@@ -238,7 +238,7 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped( char character, int key )
|
||||
protected void keyTyped( char character, int key ) throws IOException
|
||||
{
|
||||
if( !this.checkHotbarKeys( key ) )
|
||||
{
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.client.gui.widgets.GuiImgButton;
|
||||
|
||||
@@ -22,14 +22,14 @@ package appeng.client.gui.implementations;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import appeng.api.config.SearchBoxMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.TerminalStyle;
|
||||
@@ -362,7 +362,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked( int xCoord, int yCoord, int btn )
|
||||
protected void mouseClicked( int xCoord, int yCoord, int btn ) throws IOException
|
||||
{
|
||||
Enum searchMode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
|
||||
|
||||
@@ -457,7 +457,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped( char character, int key )
|
||||
protected void keyTyped( char character, int key ) throws IOException
|
||||
{
|
||||
if( !this.checkHotbarKeys( key ) )
|
||||
{
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.api.implementations.guiobjects.IPortableCell;
|
||||
import appeng.container.implementations.ContainerMEPortableCell;
|
||||
|
||||
|
||||
@@ -19,16 +19,17 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.SortDir;
|
||||
import appeng.api.config.SortOrder;
|
||||
@@ -66,7 +67,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( GuiButton btn ) throws IOException
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.api.implementations.guiobjects.INetworkTool;
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiToggleButton;
|
||||
@@ -46,7 +45,7 @@ public class GuiNetworkTool extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( GuiButton btn ) throws IOException
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.config.ActionItems;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.storage.ITerminalHost;
|
||||
|
||||
@@ -24,7 +24,6 @@ import java.io.IOException;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.definitions.IBlocks;
|
||||
import appeng.api.definitions.IDefinitions;
|
||||
@@ -185,7 +184,7 @@ public class GuiPriority extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( GuiButton btn ) throws IOException
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
@@ -245,7 +244,7 @@ public class GuiPriority extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped( char character, int key )
|
||||
protected void keyTyped( char character, int key ) throws IOException
|
||||
{
|
||||
if( !this.checkHotbarKeys( key ) )
|
||||
{
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.container.implementations.ContainerQNB;
|
||||
import appeng.core.localization.GuiText;
|
||||
|
||||
@@ -23,7 +23,6 @@ import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.container.implementations.ContainerQuartzKnife;
|
||||
import appeng.core.AELog;
|
||||
@@ -49,7 +48,7 @@ public class GuiQuartzKnife extends AEBaseGui
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
this.name = new GuiTextField( this.fontRendererObj, this.guiLeft + 24, this.guiTop + 32, 79, this.fontRendererObj.FONT_HEIGHT );
|
||||
this.name = new GuiTextField( 0,this.fontRendererObj, this.guiLeft + 24, this.guiTop + 32, 79, this.fontRendererObj.FONT_HEIGHT );
|
||||
this.name.setEnableBackgroundDrawing( false );
|
||||
this.name.setMaxStringLength( 32 );
|
||||
this.name.setTextColor( 0xFFFFFF );
|
||||
@@ -73,7 +72,7 @@ public class GuiQuartzKnife extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped( char character, int key )
|
||||
protected void keyTyped( char character, int key ) throws IOException
|
||||
{
|
||||
if( this.name.textboxKeyTyped( character, key ) )
|
||||
{
|
||||
|
||||
@@ -22,7 +22,6 @@ package appeng.client.gui.implementations;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.config.SortOrder;
|
||||
import appeng.api.storage.ITerminalHost;
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.container.implementations.ContainerSkyChest;
|
||||
import appeng.core.localization.GuiText;
|
||||
|
||||
@@ -19,11 +19,13 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiImgButton;
|
||||
@@ -48,7 +50,7 @@ public class GuiSpatialIOPort extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( GuiButton btn ) throws IOException
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
|
||||
@@ -21,11 +21,11 @@ package appeng.client.gui.implementations;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.ActionItems;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
@@ -106,7 +106,7 @@ public class GuiStorageBus extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( GuiButton btn ) throws IOException
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
|
||||
@@ -19,11 +19,13 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.Settings;
|
||||
@@ -158,7 +160,7 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( GuiButton btn ) throws IOException
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiProgressBar;
|
||||
import appeng.client.gui.widgets.GuiProgressBar.Direction;
|
||||
|
||||
@@ -19,11 +19,13 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiImgButton;
|
||||
@@ -46,7 +48,7 @@ public class GuiWireless extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( GuiButton btn ) throws IOException
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.api.implementations.guiobjects.IPortableCell;
|
||||
|
||||
|
||||
|
||||
@@ -23,12 +23,12 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.ActionItems;
|
||||
import appeng.api.config.CondenserOutput;
|
||||
@@ -202,7 +202,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
}
|
||||
|
||||
par1Minecraft.renderEngine.bindTexture( ExtraBlockTextures.GuiTexture( "guis/states.png" ) );
|
||||
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||
this.hovered = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||
|
||||
int uv_y = (int) Math.floor( iconIndex / 16 );
|
||||
int uv_x = iconIndex - uv_y * 16;
|
||||
@@ -225,7 +225,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
}
|
||||
|
||||
par1Minecraft.renderEngine.bindTexture( ExtraBlockTextures.GuiTexture( "guis/states.png" ) );
|
||||
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||
this.hovered = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||
|
||||
int uv_y = (int) Math.floor( iconIndex / 16 );
|
||||
int uv_x = iconIndex - uv_y * 16;
|
||||
|
||||
@@ -30,7 +30,7 @@ public class GuiNumberBox extends GuiTextField
|
||||
|
||||
public GuiNumberBox( FontRenderer fontRenderer, int x, int y, int width, int height, Class type )
|
||||
{
|
||||
super( fontRenderer, x, y, width, height );
|
||||
super( 0, fontRenderer, x, y, width, height );
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ package appeng.client.gui.widgets;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import appeng.container.interfaces.IProgressProvider;
|
||||
import appeng.core.localization.GuiText;
|
||||
|
||||
|
||||
@@ -19,16 +19,15 @@
|
||||
package appeng.client.gui.widgets;
|
||||
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import appeng.client.texture.ExtraBlockTextures;
|
||||
|
||||
|
||||
@@ -81,7 +80,7 @@ public class GuiTabButton extends GuiButton implements ITooltip
|
||||
{
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
minecraft.renderEngine.bindTexture( ExtraBlockTextures.GuiTexture( "guis/states.png" ) );
|
||||
this.field_146123_n = x >= this.xPosition && y >= this.yPosition && x < this.xPosition + this.width && y < this.yPosition + this.height;
|
||||
this.hovered = x >= this.xPosition && y >= this.yPosition && x < this.xPosition + this.width && y < this.yPosition + this.height;
|
||||
|
||||
int uv_x = ( this.hideEdge > 0 ? 11 : 13 );
|
||||
|
||||
@@ -107,8 +106,7 @@ public class GuiTabButton extends GuiButton implements ITooltip
|
||||
GL11.glEnable( GL11.GL_LIGHTING );
|
||||
GL11.glEnable( GL12.GL_RESCALE_NORMAL );
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
FontRenderer fontrenderer = minecraft.fontRenderer;
|
||||
this.itemRenderer.renderItemAndEffectIntoGUI( fontrenderer, minecraft.renderEngine, this.myItem, offsetX + this.xPosition + 3, this.yPosition + 3 );
|
||||
this.itemRenderer.renderItemAndEffectIntoGUI( this.myItem, offsetX + this.xPosition + 3, this.yPosition + 3 );
|
||||
GL11.glDisable( GL11.GL_LIGHTING );
|
||||
|
||||
this.itemRenderer.zLevel = 0.0F;
|
||||
|
||||
@@ -21,12 +21,12 @@ package appeng.client.gui.widgets;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import appeng.client.texture.ExtraBlockTextures;
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ public class GuiToggleButton extends GuiButton implements ITooltip
|
||||
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
par1Minecraft.renderEngine.bindTexture( ExtraBlockTextures.GuiTexture( "guis/states.png" ) );
|
||||
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||
this.hovered = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||
|
||||
int uv_y = (int) Math.floor( iconIndex / 16 );
|
||||
int uv_x = iconIndex - uv_y * 16;
|
||||
|
||||
@@ -52,7 +52,7 @@ public class MEGuiTextField extends GuiTextField
|
||||
*/
|
||||
public MEGuiTextField( FontRenderer fontRenderer, int xPos, int yPos, int width, int height )
|
||||
{
|
||||
super( fontRenderer, xPos + PADDING, yPos + PADDING, width - 2 * PADDING - fontRenderer.getCharWidth( '_' ), height - 2 * PADDING );
|
||||
super( 0, fontRenderer, xPos + PADDING, yPos + PADDING, width - 2 * PADDING - fontRenderer.getCharWidth( '_' ), height - 2 * PADDING );
|
||||
|
||||
this._xPos = xPos;
|
||||
this._yPos = yPos;
|
||||
|
||||
Reference in New Issue
Block a user