Basic reformat, hit once, hope never again

This commit is contained in:
thatsIch
2015-04-03 08:54:31 +02:00
parent 4ff1631f89
commit d34c988c88
886 changed files with 31400 additions and 30990 deletions
@@ -18,6 +18,7 @@
package appeng.client.gui.implementations;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
@@ -34,11 +35,42 @@ import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketInventoryAction;
import appeng.helpers.InventoryAction;
public class GuiCraftingTerm extends GuiMEMonitorable
{
GuiImgButton clearBtn;
public GuiCraftingTerm( InventoryPlayer inventoryPlayer, ITerminalHost te )
{
super( inventoryPlayer, te, new ContainerCraftingTerm( inventoryPlayer, te ) );
this.reservedSpace = 73;
}
@Override
protected void actionPerformed( GuiButton btn )
{
super.actionPerformed( btn );
if( this.clearBtn == btn )
{
Slot s = null;
Container c = this.inventorySlots;
for( Object j : c.inventorySlots )
{
if( j instanceof SlotCraftingMatrix )
s = (Slot) j;
}
if( s != null )
{
PacketInventoryAction p;
p = new PacketInventoryAction( InventoryAction.MOVE_REGION, s.slotNumber, 0 );
NetworkHandler.instance.sendToServer( p );
}
}
}
@Override
public void initGui()
{
@@ -48,32 +80,10 @@ public class GuiCraftingTerm extends GuiMEMonitorable
}
@Override
protected void actionPerformed(GuiButton btn)
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
{
super.actionPerformed( btn );
if ( this.clearBtn == btn )
{
Slot s = null;
Container c = this.inventorySlots;
for (Object j : c.inventorySlots)
{
if ( j instanceof SlotCraftingMatrix )
s = (Slot) j;
}
if ( s != null )
{
PacketInventoryAction p;
p = new PacketInventoryAction( InventoryAction.MOVE_REGION, s.slotNumber, 0 );
NetworkHandler.instance.sendToServer( p );
}
}
}
public GuiCraftingTerm(InventoryPlayer inventoryPlayer, ITerminalHost te) {
super( inventoryPlayer, te, new ContainerCraftingTerm( inventoryPlayer, te ) );
this.reservedSpace = 73;
super.drawFG( offsetX, offsetY, mouseX, mouseY );
this.fontRendererObj.drawString( GuiText.CraftingTerminal.getLocal(), 8, this.ySize - 96 + 1 - this.reservedSpace, 4210752 );
}
@Override
@@ -81,12 +91,4 @@ public class GuiCraftingTerm extends GuiMEMonitorable
{
return "guis/crafting.png";
}
@Override
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
{
super.drawFG( offsetX, offsetY, mouseX, mouseY );
this.fontRendererObj.drawString( GuiText.CraftingTerminal.getLocal(), 8, this.ySize - 96 + 1 - this.reservedSpace, 4210752 );
}
}