Merge pull request #237 from iloveportalz0r/rv2

Deleted useless things
This commit is contained in:
thatsIch 2014-10-04 10:21:13 +02:00
commit cbaff9cd64
91 changed files with 204 additions and 595 deletions

View file

@ -7,7 +7,6 @@ import java.util.List;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseBlock;

View file

@ -13,7 +13,6 @@ import java.util.concurrent.TimeUnit;
import appeng.container.slot.*;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.RenderHelper;
@ -124,20 +123,13 @@ public abstract class AEBaseGui extends GuiContainer
IAEItemStack item = ((SlotME) slot).getAEStack();
if ( item != null )
{
try
((AEBaseContainer) inventorySlots).setTargetStack( item );
InventoryAction direction = wheel > 0 ? InventoryAction.ROLL_DOWN : InventoryAction.ROLL_UP;
int times = Math.abs( wheel );
for (int h = 0; h < times; h++)
{
((AEBaseContainer) inventorySlots).setTargetStack( item );
InventoryAction direction = wheel > 0 ? InventoryAction.ROLL_DOWN : InventoryAction.ROLL_UP;
int times = Math.abs( wheel );
for (int h = 0; h < times; h++)
{
PacketInventoryAction p = new PacketInventoryAction( direction, inventorySlots.inventorySlots.size(), 0 );
NetworkHandler.instance.sendToServer( p );
}
}
catch (IOException e)
{
AELog.error( e );
PacketInventoryAction p = new PacketInventoryAction( direction, inventorySlots.inventorySlots.size(), 0 );
NetworkHandler.instance.sendToServer( p );
}
}
}
@ -194,15 +186,8 @@ public abstract class AEBaseGui extends GuiContainer
if ( action != null )
{
try
{
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
NetworkHandler.instance.sendToServer( p );
}
catch (IOException e)
{
AELog.error( e );
}
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
NetworkHandler.instance.sendToServer( p );
}
return;
@ -235,15 +220,8 @@ public abstract class AEBaseGui extends GuiContainer
if ( action != null )
{
try
{
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
NetworkHandler.instance.sendToServer( p );
}
catch (IOException e)
{
AELog.error( e );
}
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
NetworkHandler.instance.sendToServer( p );
}
return;
@ -257,21 +235,14 @@ public abstract class AEBaseGui extends GuiContainer
if ( slot instanceof SlotME )
stack = ((SlotME) slot).getAEStack();
try
{
int slotNum = inventorySlots.inventorySlots.size();
int slotNum = inventorySlots.inventorySlots.size();
if ( !(slot instanceof SlotME) && slot != null )
slotNum = slot.slotNumber;
if ( !(slot instanceof SlotME) && slot != null )
slotNum = slot.slotNumber;
((AEBaseContainer) inventorySlots).setTargetStack( stack );
PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, slotNum, 0 );
NetworkHandler.instance.sendToServer( p );
}
catch (IOException e)
{
AELog.error( e );
}
((AEBaseContainer) inventorySlots).setTargetStack( stack );
PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, slotNum, 0 );
NetworkHandler.instance.sendToServer( p );
return;
}
}
@ -305,15 +276,8 @@ public abstract class AEBaseGui extends GuiContainer
if ( action != null )
{
try
{
PacketInventoryAction p = new PacketInventoryAction( action, slot.getSlotIndex(), ((SlotDisconnected) slot).mySlot.id );
NetworkHandler.instance.sendToServer( p );
}
catch (IOException e)
{
AELog.error( e );
}
PacketInventoryAction p = new PacketInventoryAction( action, slot.getSlotIndex(), ((SlotDisconnected) slot).mySlot.id );
NetworkHandler.instance.sendToServer( p );
}
return;
@ -362,16 +326,9 @@ public abstract class AEBaseGui extends GuiContainer
if ( action != null )
{
try
{
((AEBaseContainer) inventorySlots).setTargetStack( stack );
PacketInventoryAction p = new PacketInventoryAction( action, inventorySlots.inventorySlots.size(), 0 );
NetworkHandler.instance.sendToServer( p );
}
catch (IOException e)
{
AELog.error( e );
}
((AEBaseContainer) inventorySlots).setTargetStack( stack );
PacketInventoryAction p = new PacketInventoryAction( action, inventorySlots.inventorySlots.size(), 0 );
NetworkHandler.instance.sendToServer( p );
}
return;
@ -424,18 +381,11 @@ public abstract class AEBaseGui extends GuiContainer
drag_click.add( slot );
if ( drag_click.size() > 1 )
{
try
for (Slot dr : drag_click)
{
for (Slot dr : drag_click)
{
PacketInventoryAction p = new PacketInventoryAction( c == 0 ? InventoryAction.PICKUP_OR_SET_DOWN : InventoryAction.PLACE_SINGLE,
dr.slotNumber, 0 );
NetworkHandler.instance.sendToServer( p );
}
}
catch (IOException e)
{
AELog.error( e );
PacketInventoryAction p = new PacketInventoryAction( c == 0 ? InventoryAction.PICKUP_OR_SET_DOWN : InventoryAction.PLACE_SINGLE,
dr.slotNumber, 0 );
NetworkHandler.instance.sendToServer( p );
}
}
}
@ -486,21 +436,14 @@ public abstract class AEBaseGui extends GuiContainer
}
else
{
try
for (Slot s : (List<Slot>) inventorySlots.inventorySlots)
{
for (Slot s : (List<Slot>) inventorySlots.inventorySlots)
if ( s.getSlotIndex() == j && s.inventory == ((AEBaseContainer) inventorySlots).getPlayerInv() )
{
if ( s.getSlotIndex() == j && s.inventory == ((AEBaseContainer) inventorySlots).getPlayerInv() )
{
NetworkHandler.instance.sendToServer( new PacketSwapSlots( s.slotNumber, theSlot.slotNumber ) );
return true;
}
NetworkHandler.instance.sendToServer( new PacketSwapSlots( s.slotNumber, theSlot.slotNumber ) );
return true;
}
}
catch (IOException e)
{
AELog.error( e );
}
}
}
}

View file

@ -1,13 +1,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;
import appeng.core.AELog;
import appeng.core.localization.GuiText;
import appeng.core.sync.GuiBridge;
import appeng.core.sync.network.NetworkHandler;
@ -26,14 +23,7 @@ public class GuiChest extends AEBaseGui
if ( par1GuiButton == priority )
{
try
{
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
}
catch (IOException e)
{
AELog.error( e );
}
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
}
}

View file

@ -1,7 +1,5 @@
package appeng.client.gui.implementations;
import java.io.IOException;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.InventoryPlayer;
@ -13,7 +11,6 @@ import appeng.client.gui.widgets.GuiImgButton;
import appeng.client.gui.widgets.GuiProgressBar;
import appeng.client.gui.widgets.GuiProgressBar.Direction;
import appeng.container.implementations.ContainerCondenser;
import appeng.core.AELog;
import appeng.core.localization.GuiText;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketConfigButton;
@ -42,14 +39,7 @@ public class GuiCondenser extends AEBaseGui
if ( mode == btn )
{
try
{
NetworkHandler.instance.sendToServer( new PacketConfigButton( Settings.CONDENSER_OUTPUT, backwards ) );
}
catch (IOException e)
{
AELog.error( e );
}
NetworkHandler.instance.sendToServer( new PacketConfigButton( Settings.CONDENSER_OUTPUT, backwards ) );
}
}

View file

@ -1,7 +1,5 @@
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;
@ -13,7 +11,6 @@ import appeng.client.gui.widgets.GuiTabButton;
import appeng.container.AEBaseContainer;
import appeng.container.implementations.ContainerCraftAmount;
import appeng.core.AEConfig;
import appeng.core.AELog;
import appeng.core.localization.GuiText;
import appeng.core.sync.GuiBridge;
import appeng.core.sync.network.NetworkHandler;
@ -126,10 +123,6 @@ public class GuiCraftAmount extends AEBaseGui
// nope..
amountToCraft.setText( "1" );
}
catch (IOException e)
{
AELog.error( e );
}
boolean isPlus = btn == plus1 || btn == plus10 || btn == plus100 || btn == plus1000;
boolean isMinus = btn == minus1 || btn == minus10 || btn == minus100 || btn == minus1000;

View file

@ -147,14 +147,7 @@ public class GuiCraftConfirm extends AEBaseGui
if ( btn == cancel )
{
try
{
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
}
catch (IOException e)
{
AELog.error( e );
}
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
}
if ( btn == start )

View file

@ -88,14 +88,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
if ( btn == originalGuiBtn )
{
try
{
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
}
catch (IOException e)
{
AELog.error( e );
}
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
}
}

View file

@ -1,7 +1,5 @@
package appeng.client.gui.implementations;
import java.io.IOException;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
@ -12,7 +10,6 @@ import appeng.api.storage.ITerminalHost;
import appeng.client.gui.widgets.GuiImgButton;
import appeng.container.implementations.ContainerCraftingTerm;
import appeng.container.slot.SlotCraftingMatrix;
import appeng.core.AELog;
import appeng.core.localization.GuiText;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketInventoryAction;
@ -49,15 +46,8 @@ public class GuiCraftingTerm extends GuiMEMonitorable
if ( s != null )
{
PacketInventoryAction p;
try
{
p = new PacketInventoryAction( InventoryAction.MOVE_REGION, s.slotNumber, 0 );
NetworkHandler.instance.sendToServer( p );
}
catch (IOException e)
{
AELog.error( e );
}
p = new PacketInventoryAction( InventoryAction.MOVE_REGION, s.slotNumber, 0 );
NetworkHandler.instance.sendToServer( p );
}
}
}

View file

@ -1,13 +1,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;
import appeng.core.AELog;
import appeng.core.localization.GuiText;
import appeng.core.sync.GuiBridge;
import appeng.core.sync.network.NetworkHandler;
@ -26,14 +23,7 @@ public class GuiDrive extends AEBaseGui
if ( par1GuiButton == priority )
{
try
{
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
}
catch (IOException e)
{
AELog.error( e );
}
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
}
}

View file

@ -1,7 +1,5 @@
package appeng.client.gui.implementations;
import java.io.IOException;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.InventoryPlayer;
import appeng.api.config.FuzzyMode;
@ -9,7 +7,6 @@ import appeng.api.config.Settings;
import appeng.client.gui.widgets.GuiImgButton;
import appeng.client.gui.widgets.GuiTabButton;
import appeng.container.implementations.ContainerFormationPlane;
import appeng.core.AELog;
import appeng.core.localization.GuiText;
import appeng.core.sync.GuiBridge;
import appeng.core.sync.network.NetworkHandler;
@ -53,14 +50,7 @@ public class GuiFormationPlane extends GuiUpgradeable
if ( btn == priority )
{
try
{
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
}
catch (IOException e)
{
AELog.error( e );
}
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
}
}

View file

@ -1,7 +1,5 @@
package appeng.client.gui.implementations;
import java.io.IOException;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.InventoryPlayer;
@ -14,7 +12,6 @@ import appeng.api.config.RedstoneMode;
import appeng.api.config.Settings;
import appeng.client.gui.widgets.GuiImgButton;
import appeng.container.implementations.ContainerIOPort;
import appeng.core.AELog;
import appeng.core.localization.GuiText;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketConfigButton;
@ -74,18 +71,11 @@ public class GuiIOPort extends GuiUpgradeable
boolean backwards = Mouse.isButtonDown( 1 );
try
{
if ( btn == fullMode )
NetworkHandler.instance.sendToServer( new PacketConfigButton( fullMode.getSetting(), backwards ) );
if ( btn == fullMode )
NetworkHandler.instance.sendToServer( new PacketConfigButton( fullMode.getSetting(), backwards ) );
if ( btn == operationMode )
NetworkHandler.instance.sendToServer( new PacketConfigButton( operationMode.getSetting(), backwards ) );
}
catch (IOException e)
{
AELog.error( e );
}
if ( btn == operationMode )
NetworkHandler.instance.sendToServer( new PacketConfigButton( operationMode.getSetting(), backwards ) );
}
@Override

View file

@ -1,7 +1,5 @@
package appeng.client.gui.implementations;
import java.io.IOException;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.InventoryPlayer;
@ -13,7 +11,6 @@ import appeng.client.gui.widgets.GuiImgButton;
import appeng.client.gui.widgets.GuiTabButton;
import appeng.client.gui.widgets.GuiToggleButton;
import appeng.container.implementations.ContainerInterface;
import appeng.core.AELog;
import appeng.core.localization.GuiText;
import appeng.core.sync.GuiBridge;
import appeng.core.sync.network.NetworkHandler;
@ -42,29 +39,14 @@ public class GuiInterface extends GuiUpgradeable
if ( btn == priority )
{
try
{
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
}
catch (IOException e)
{
AELog.error( e );
}
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
}
try
{
if ( btn == interfaceMode )
NetworkHandler.instance.sendToServer( new PacketConfigButton( Settings.INTERFACE_TERMINAL, backwards ) );
if ( btn == interfaceMode )
NetworkHandler.instance.sendToServer( new PacketConfigButton( Settings.INTERFACE_TERMINAL, backwards ) );
if ( btn == BlockMode )
NetworkHandler.instance.sendToServer( new PacketConfigButton( BlockMode.getSetting(), backwards ) );
}
catch (IOException e)
{
AELog.error( e );
}
if ( btn == BlockMode )
NetworkHandler.instance.sendToServer( new PacketConfigButton( BlockMode.getSetting(), backwards ) );
}
@Override

View file

@ -11,7 +11,6 @@ import java.util.WeakHashMap;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;

View file

@ -89,18 +89,11 @@ public class GuiLevelEmitter extends GuiUpgradeable
boolean backwards = Mouse.isButtonDown( 1 );
try
{
if ( btn == craftingMode )
NetworkHandler.instance.sendToServer( new PacketConfigButton( craftingMode.getSetting(), backwards ) );
if ( btn == craftingMode )
NetworkHandler.instance.sendToServer( new PacketConfigButton( craftingMode.getSetting(), backwards ) );
if ( btn == levelMode )
NetworkHandler.instance.sendToServer( new PacketConfigButton( levelMode.getSetting(), backwards ) );
}
catch (IOException e)
{
AELog.error( e );
}
if ( btn == levelMode )
NetworkHandler.instance.sendToServer( new PacketConfigButton( levelMode.getSetting(), backwards ) );
boolean isPlus = btn == plus1 || btn == plus10 || btn == plus100 || btn == plus1000;
boolean isMinus = btn == minus1 || btn == minus10 || btn == minus100 || btn == minus1000;

View file

@ -287,14 +287,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
{
if ( btn == craftingStatusBtn )
{
try
{
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_CRAFTING_STATUS ) );
}
catch (IOException e)
{
AELog.error( e );
}
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_CRAFTING_STATUS ) );
}
if ( btn instanceof GuiImgButton )

View file

@ -119,14 +119,7 @@ public class GuiPriority extends AEBaseGui
if ( btn == originalGuiBtn )
{
try
{
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
}
catch (IOException e)
{
AELog.error( e );
}
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
}
boolean isPlus = btn == plus1 || btn == plus10 || btn == plus100 || btn == plus1000;

View file

@ -1,7 +1,5 @@
package appeng.client.gui.implementations;
import java.io.IOException;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.InventoryPlayer;
@ -16,7 +14,6 @@ import appeng.api.implementations.IUpgradeableHost;
import appeng.client.gui.AEBaseGui;
import appeng.client.gui.widgets.GuiImgButton;
import appeng.container.implementations.ContainerUpgradeable;
import appeng.core.AELog;
import appeng.core.localization.GuiText;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketConfigButton;
@ -70,22 +67,14 @@ public class GuiUpgradeable extends AEBaseGui
boolean backwards = Mouse.isButtonDown( 1 );
try
{
if ( btn == redstoneMode )
NetworkHandler.instance.sendToServer( new PacketConfigButton( redstoneMode.getSetting(), backwards ) );
if ( btn == redstoneMode )
NetworkHandler.instance.sendToServer( new PacketConfigButton( redstoneMode.getSetting(), backwards ) );
if ( btn == craftMode )
NetworkHandler.instance.sendToServer( new PacketConfigButton( craftMode.getSetting(), backwards ) );
if ( btn == craftMode )
NetworkHandler.instance.sendToServer( new PacketConfigButton( craftMode.getSetting(), backwards ) );
if ( btn == fuzzyMode )
NetworkHandler.instance.sendToServer( new PacketConfigButton( fuzzyMode.getSetting(), backwards ) );
}
catch (IOException e)
{
AELog.error( e );
}
if ( btn == fuzzyMode )
NetworkHandler.instance.sendToServer( new PacketConfigButton( fuzzyMode.getSetting(), backwards ) );
}
protected boolean hasToolbox()

View file

@ -4,10 +4,8 @@ import java.util.EnumSet;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.client.IItemRenderer.ItemRenderType;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.AEApi;
import appeng.api.util.AEColor;

View file

@ -297,14 +297,7 @@ public class ContainerCraftConfirm extends AEBaseContainer
autoStart = false;
if ( g != null && OriginalGui != null && openContext != null )
{
try
{
NetworkHandler.instance.sendTo( new PacketSwitchGuis( OriginalGui ), (EntityPlayerMP) invPlayer.player );
}
catch (IOException e)
{
// :(
}
NetworkHandler.instance.sendTo( new PacketSwitchGuis( OriginalGui ), (EntityPlayerMP) invPlayer.player );
TileEntity te = openContext.getTile();
Platform.openGUI( invPlayer.player, te, openContext.side, OriginalGui );

View file

@ -3,7 +3,6 @@ package appeng.core;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Collection;
@ -230,14 +229,7 @@ public class WorldSettings extends Configuration
storageCellDims.add( newDim );
DimensionManager.registerDimension( newDim, AEConfig.instance.storageProviderID );
try
{
NetworkHandler.instance.sendToAll( new PacketNewStorageDimension( newDim ) );
}
catch (IOException e)
{
e.printStackTrace();
}
NetworkHandler.instance.sendToAll( new PacketNewStorageDimension( newDim ) );
String[] values = new String[storageCellDims.size()];
@ -293,14 +285,7 @@ public class WorldSettings extends Configuration
{
for (int newDim : get( "DimensionManager", "StorageCells", new int[0] ).getIntList())
{
try
{
manager.scheduleOutboundPacket( (new PacketNewStorageDimension( newDim )).getProxy() );
}
catch (IOException e)
{
AELog.error( e );
}
manager.scheduleOutboundPacket( (new PacketNewStorageDimension( newDim )).getProxy() );
}
}
else

View file

@ -1,6 +1,5 @@
package appeng.core.api;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Iterator;
@ -98,7 +97,7 @@ public class ApiPart implements IPartHelper
return clazz;
}
public ClassNode getReader(String name) throws IOException
public ClassNode getReader(String name)
{
try
{
@ -212,7 +211,7 @@ public class ApiPart implements IPartHelper
}
public Class getClassByDesc(String Addendum, String fullPath, String root, String next) throws IOException
public Class getClassByDesc(String Addendum, String fullPath, String root, String next)
{
if ( roots.get( fullPath ) != null )
return roots.get( fullPath );

View file

@ -3,8 +3,6 @@ package appeng.core.sync.packets;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import appeng.api.AEApi;
@ -27,7 +25,7 @@ public class PacketClick extends AppEngPacket
final float hitZ;
// automatic.
public PacketClick(ByteBuf stream) throws IOException {
public PacketClick(ByteBuf stream) {
x = stream.readInt();
y = stream.readInt();
z = stream.readInt();
@ -60,7 +58,7 @@ public class PacketClick extends AppEngPacket
}
// api
public PacketClick(int x, int y, int z, int side, float hitX, float hitY, float hitZ) throws IOException {
public PacketClick(int x, int y, int z, int side, float hitX, float hitY, float hitZ) {
ByteBuf data = Unpooled.buffer();

View file

@ -3,8 +3,6 @@ package appeng.core.sync.packets;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import appeng.api.util.DimensionalCoord;
@ -23,7 +21,7 @@ public class PacketCompassRequest extends AppEngPacket implements ICompassCallba
EntityPlayer talkBackTo;
// automatic.
public PacketCompassRequest(ByteBuf stream) throws IOException {
public PacketCompassRequest(ByteBuf stream) {
attunement = stream.readLong();
cx = stream.readInt();
cz = stream.readInt();
@ -46,7 +44,7 @@ public class PacketCompassRequest extends AppEngPacket implements ICompassCallba
}
// api
public PacketCompassRequest(long attunement, int cx, int cz, int cdy) throws IOException {
public PacketCompassRequest(long attunement, int cx, int cz, int cdy) {
ByteBuf data = Unpooled.buffer();

View file

@ -3,8 +3,6 @@ package appeng.core.sync.packets;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import appeng.core.sync.AppEngPacket;
import appeng.core.sync.network.INetworkInfo;
@ -20,7 +18,7 @@ public class PacketCompassResponse extends AppEngPacket
public CompassResult cr;
// automatic.
public PacketCompassResponse(ByteBuf stream) throws IOException {
public PacketCompassResponse(ByteBuf stream) {
attunement = stream.readLong();
cx = stream.readInt();
cz = stream.readInt();

View file

@ -3,8 +3,6 @@ package appeng.core.sync.packets;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import appeng.api.config.Settings;
@ -22,7 +20,7 @@ public class PacketConfigButton extends AppEngPacket
final public boolean rotationDirection;
// automatic.
public PacketConfigButton(ByteBuf stream) throws IOException {
public PacketConfigButton(ByteBuf stream) {
option = Settings.values()[stream.readInt()];
rotationDirection = stream.readBoolean();
}
@ -41,7 +39,7 @@ public class PacketConfigButton extends AppEngPacket
}
// api
public PacketConfigButton(Settings option, boolean rotationDirection) throws IOException {
public PacketConfigButton(Settings option, boolean rotationDirection) {
this.option = option;
this.rotationDirection = rotationDirection;

View file

@ -3,7 +3,6 @@ package appeng.core.sync.packets;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.io.IOException;
import java.util.concurrent.Future;
import net.minecraft.entity.player.EntityPlayer;
@ -30,7 +29,8 @@ public class PacketCraftRequest extends AppEngPacket
final public boolean heldShift;
// automatic.
public PacketCraftRequest(ByteBuf stream) throws IOException {
public PacketCraftRequest(ByteBuf stream)
{
heldShift = stream.readBoolean();
amount = stream.readLong();
}
@ -88,8 +88,8 @@ public class PacketCraftRequest extends AppEngPacket
}
}
public PacketCraftRequest(int craftAmt, boolean shift) throws IOException {
public PacketCraftRequest(int craftAmt, boolean shift)
{
this.amount = craftAmt;
this.heldShift = shift;

View file

@ -118,8 +118,8 @@ public class PacketInventoryAction extends AppEngPacket
}
// api
public PacketInventoryAction(InventoryAction action, int slot, long id) throws IOException {
public PacketInventoryAction(InventoryAction action, int slot, long id)
{
this.action = action;
this.slot = slot;
this.id = id;

View file

@ -3,8 +3,6 @@ package appeng.core.sync.packets;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.io.IOException;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import appeng.client.ClientHelper;
@ -24,7 +22,7 @@ public class PacketLightning extends AppEngPacket
final double z;
// automatic.
public PacketLightning(ByteBuf stream) throws IOException {
public PacketLightning(ByteBuf stream) {
x = stream.readFloat();
y = stream.readFloat();
z = stream.readFloat();
@ -48,8 +46,8 @@ public class PacketLightning extends AppEngPacket
}
// api
public PacketLightning(double x, double y, double z) throws IOException {
public PacketLightning(double x, double y, double z)
{
this.x = x;
this.y = y;
this.z = z;

View file

@ -3,8 +3,6 @@ package appeng.core.sync.packets;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.io.IOException;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
@ -28,7 +26,8 @@ public class PacketMatterCannon extends AppEngPacket
final byte len;
// automatic.
public PacketMatterCannon(ByteBuf stream) throws IOException {
public PacketMatterCannon(ByteBuf stream)
{
x = stream.readFloat();
y = stream.readFloat();
z = stream.readFloat();
@ -59,7 +58,8 @@ public class PacketMatterCannon extends AppEngPacket
}
// api
public PacketMatterCannon(double x, double y, double z, float dx, float dy, float dz, byte len) throws IOException {
public PacketMatterCannon(double x, double y, double z, float dx, float dy, float dz, byte len)
{
float dl = dx * dx + dy * dy + dz * dz;
float dlz = (float) Math.sqrt( dl );

View file

@ -3,8 +3,6 @@ package appeng.core.sync.packets;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import appeng.core.CommonHelper;
@ -29,14 +27,16 @@ public class PacketMockExplosion extends AppEngPacket
}
// automatic.
public PacketMockExplosion(ByteBuf stream) throws IOException {
public PacketMockExplosion(ByteBuf stream)
{
x = stream.readDouble();
y = stream.readDouble();
z = stream.readDouble();
}
// api
public PacketMockExplosion(double x, double y, double z) throws IOException {
public PacketMockExplosion(double x, double y, double z)
{
this.x = x;
this.y = y;
this.z = z;

View file

@ -3,8 +3,6 @@ package appeng.core.sync.packets;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraftforge.common.MinecraftForge;
@ -18,8 +16,8 @@ public class PacketMultiPart extends AppEngPacket
{
// automatic.
public PacketMultiPart(ByteBuf stream) throws IOException {
public PacketMultiPart(ByteBuf stream)
{
}
@Override
@ -29,13 +27,13 @@ public class PacketMultiPart extends AppEngPacket
if ( fmp != null )
{
EntityPlayerMP sender = (EntityPlayerMP) player;
MinecraftForge.EVENT_BUS.post( fmp.newFMPPacketEvent( sender ) ); // when received it just pots this event.
MinecraftForge.EVENT_BUS.post( fmp.newFMPPacketEvent( sender ) ); // when received it just posts this event.
}
}
// api
public PacketMultiPart() throws IOException {
public PacketMultiPart()
{
ByteBuf data = Unpooled.buffer();
data.writeInt( getPacketID() );

View file

@ -3,8 +3,6 @@ package appeng.core.sync.packets;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.common.DimensionManager;
import appeng.core.AEConfig;
@ -19,7 +17,8 @@ public class PacketNewStorageDimension extends AppEngPacket
final int newDim;
// automatic.
public PacketNewStorageDimension(ByteBuf stream) throws IOException {
public PacketNewStorageDimension(ByteBuf stream)
{
newDim = stream.readInt();
}
@ -38,8 +37,8 @@ public class PacketNewStorageDimension extends AppEngPacket
}
// api
public PacketNewStorageDimension(int newDim) throws IOException {
public PacketNewStorageDimension(int newDim)
{
this.newDim = newDim;
ByteBuf data = Unpooled.buffer();

View file

@ -3,8 +3,6 @@ package appeng.core.sync.packets;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import appeng.api.util.AEColor;
import appeng.core.sync.AppEngPacket;
@ -20,7 +18,8 @@ public class PacketPaintedEntity extends AppEngPacket
private int ticks;
// automatic.
public PacketPaintedEntity(ByteBuf stream) throws IOException {
public PacketPaintedEntity(ByteBuf stream)
{
entityId = stream.readInt();
myColor = AEColor.values()[stream.readByte()];
ticks = stream.readInt();

View file

@ -3,8 +3,6 @@ package appeng.core.sync.packets;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import appeng.core.CommonHelper;
@ -19,7 +17,8 @@ public class PacketPartPlacement extends AppEngPacket
float eyeHeight;
// automatic.
public PacketPartPlacement(ByteBuf stream) throws IOException {
public PacketPartPlacement(ByteBuf stream)
{
x = stream.readInt();
y = stream.readInt();
z = stream.readInt();
@ -38,8 +37,8 @@ public class PacketPartPlacement extends AppEngPacket
}
// api
public PacketPartPlacement(int x, int y, int z, int face, float eyeHeight ) throws IOException {
public PacketPartPlacement(int x, int y, int z, int face, float eyeHeight )
{
ByteBuf data = Unpooled.buffer();
data.writeInt( getPacketID() );

View file

@ -3,8 +3,6 @@ package appeng.core.sync.packets;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import appeng.container.AEBaseContainer;
import appeng.core.sync.AppEngPacket;
@ -17,7 +15,8 @@ public class PacketPartialItem extends AppEngPacket
final byte[] data;
// automatic.
public PacketPartialItem(ByteBuf stream) throws IOException {
public PacketPartialItem(ByteBuf stream)
{
pageNum = stream.readShort();
stream.readBytes( data = new byte[stream.readableBytes()] );
}
@ -32,7 +31,8 @@ public class PacketPartialItem extends AppEngPacket
}
// api
public PacketPartialItem(int page, int maxPages, byte[] buf) throws IOException {
public PacketPartialItem(int page, int maxPages, byte[] buf)
{
ByteBuf data = Unpooled.buffer();

View file

@ -3,8 +3,6 @@ package appeng.core.sync.packets;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import appeng.container.AEBaseContainer;
@ -18,7 +16,8 @@ public class PacketProgressBar extends AppEngPacket
final long value;
// automatic.
public PacketProgressBar(ByteBuf stream) throws IOException {
public PacketProgressBar(ByteBuf stream)
{
id = stream.readShort();
value = stream.readLong();
}
@ -40,8 +39,8 @@ public class PacketProgressBar extends AppEngPacket
}
// api
public PacketProgressBar(int short_id, long value) throws IOException {
public PacketProgressBar(int short_id, long value)
{
this.id = (short) short_id;
this.value = value;

View file

@ -3,8 +3,6 @@ package appeng.core.sync.packets;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import appeng.container.AEBaseContainer;
import appeng.core.sync.AppEngPacket;
@ -17,7 +15,8 @@ public class PacketSwapSlots extends AppEngPacket
final int slotB;
// automatic.
public PacketSwapSlots(ByteBuf stream) throws IOException {
public PacketSwapSlots(ByteBuf stream)
{
slotA = stream.readInt();
slotB = stream.readInt();
}
@ -32,8 +31,8 @@ public class PacketSwapSlots extends AppEngPacket
}
// api
public PacketSwapSlots(int slotA, int slotB) throws IOException {
public PacketSwapSlots(int slotA, int slotB)
{
ByteBuf data = Unpooled.buffer();
data.writeInt( getPacketID() );

View file

@ -3,8 +3,6 @@ package appeng.core.sync.packets;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.tileentity.TileEntity;
@ -22,7 +20,8 @@ public class PacketSwitchGuis extends AppEngPacket
final GuiBridge newGui;
// automatic.
public PacketSwitchGuis(ByteBuf stream) throws IOException {
public PacketSwitchGuis(ByteBuf stream)
{
newGui = GuiBridge.values()[stream.readInt()];
}
@ -49,8 +48,8 @@ public class PacketSwitchGuis extends AppEngPacket
}
// api
public PacketSwitchGuis(GuiBridge newGui) throws IOException {
public PacketSwitchGuis(GuiBridge newGui)
{
this.newGui = newGui;
if ( Platform.isClient() )

View file

@ -3,8 +3,6 @@ package appeng.core.sync.packets;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.io.IOException;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
@ -32,7 +30,8 @@ public class PacketTransitionEffect extends AppEngPacket
final public boolean mode;
// automatic.
public PacketTransitionEffect(ByteBuf stream) throws IOException {
public PacketTransitionEffect(ByteBuf stream)
{
x = stream.readFloat();
y = stream.readFloat();
z = stream.readFloat();
@ -77,8 +76,8 @@ public class PacketTransitionEffect extends AppEngPacket
}
// api
public PacketTransitionEffect(double x, double y, double z, ForgeDirection dir, boolean wasBlock) throws IOException {
public PacketTransitionEffect(double x, double y, double z, ForgeDirection dir, boolean wasBlock)
{
this.x = x;
this.y = y;
this.z = z;

View file

@ -2,8 +2,6 @@ package appeng.entity;
import io.netty.buffer.ByteBuf;
import java.io.IOException;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
@ -148,13 +146,7 @@ final public class EntityTinyTNTPrimed extends EntityTNTPrimed implements IEntit
}
}
try
{
CommonHelper.proxy.sendToAllNearExcept( null, posX, posY, posZ, 64, this.worldObj, new PacketMockExplosion( posX, posY, posZ ) );
}
catch (IOException ignored)
{
}
CommonHelper.proxy.sendToAllNearExcept( null, posX, posY, posZ, 64, this.worldObj, new PacketMockExplosion( posX, posY, posZ ) );
}
@Override

View file

@ -25,7 +25,6 @@ import appeng.api.parts.IFacadeContainer;
import appeng.api.parts.IFacadePart;
import appeng.api.parts.IPart;
import appeng.api.parts.IPartCollisionHelper;
import appeng.api.parts.IPartHost;
import appeng.api.parts.IPartItem;
import appeng.api.parts.LayerFlags;
import appeng.api.parts.PartItemStack;
@ -62,7 +61,7 @@ import codechicken.multipart.scalatraits.TIInventoryTile;
*
* TSlottedPart,ISidedHollowConnect
*/
public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IRedstonePart, IPartHost, AEMultiTile
public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IRedstonePart, AEMultiTile
{
final static Cuboid6 sideTests[] = new Cuboid6[] {

View file

@ -1,7 +1,5 @@
package appeng.fmp;
import java.io.IOException;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFence;
import net.minecraft.entity.player.EntityPlayer;
@ -14,7 +12,6 @@ import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action;
import appeng.block.AEBaseItemBlock;
import appeng.core.AELog;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketMultiPart;
import appeng.integration.modules.helpers.FMPPacketEvent;
@ -116,14 +113,7 @@ public class FMPEvent
else
{
player.swingItem();
try
{
NetworkHandler.instance.sendToServer( new PacketMultiPart() );
}
catch (IOException e)
{
AELog.error( e );
}
NetworkHandler.instance.sendToServer( new PacketMultiPart() );
}
return true;
}

View file

@ -28,7 +28,6 @@ import appeng.api.config.YesNo;
import appeng.api.implementations.ICraftingPatternItem;
import appeng.api.implementations.IUpgradeableHost;
import appeng.api.implementations.tiles.ICraftingMachine;
import appeng.api.implementations.tiles.ISegmentedInventory;
import appeng.api.networking.GridFlags;
import appeng.api.networking.IGrid;
import appeng.api.networking.IGridNode;
@ -53,7 +52,6 @@ import appeng.api.storage.data.IAEItemStack;
import appeng.api.util.AECableType;
import appeng.api.util.DimensionalCoord;
import appeng.api.util.IConfigManager;
import appeng.api.util.IConfigurableObject;
import appeng.core.settings.TickRates;
import appeng.me.GridAccessException;
import appeng.me.helpers.AENetworkProxy;
@ -76,8 +74,8 @@ import appeng.util.item.AEItemStack;
import com.google.common.collect.ImmutableSet;
public class DualityInterface implements IGridTickable, ISegmentedInventory, IStorageMonitorable, IInventoryDestination, IAEAppEngInventory,
IConfigurableObject, IConfigManagerHost, ICraftingProvider, IUpgradeableHost, IPriorityHost
public class DualityInterface implements IGridTickable, IStorageMonitorable, IInventoryDestination, IAEAppEngInventory,
IConfigManagerHost, ICraftingProvider, IUpgradeableHost, IPriorityHost
{
final int sides[] = new int[] { 0, 1, 2, 3, 4, 5, 6, 7 };

View file

@ -7,9 +7,8 @@ import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.implementations.IUpgradeableHost;
import appeng.api.networking.crafting.ICraftingProvider;
import appeng.api.networking.crafting.ICraftingRequester;
import appeng.api.networking.security.IActionHost;
public interface IInterfaceHost extends IActionHost, ICraftingProvider, IUpgradeableHost, ICraftingRequester
public interface IInterfaceHost extends ICraftingProvider, IUpgradeableHost, ICraftingRequester
{
DualityInterface getInterfaceDuality();

View file

@ -13,7 +13,6 @@ import appeng.api.networking.crafting.ICraftingLink;
import appeng.api.networking.crafting.ICraftingRequester;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.storage.data.IAEItemStack;
import appeng.me.GridAccessException;
import appeng.parts.automation.NonNullArrayIterator;
import appeng.util.InventoryAdaptor;
@ -58,7 +57,6 @@ public class MultiCraftingTracker
}
public boolean handleCrafting(int x, long itemToCraft, IAEItemStack ais, InventoryAdaptor d, World w, IGrid g, ICraftingGrid cg, BaseActionSource mySrc)
throws GridAccessException
{
if ( ais != null && d.simulateAdd( ais.getItemStack() ) == null )
{

View file

@ -1,10 +1,8 @@
package appeng.hooks;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import appeng.core.AELog;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketCompassRequest;
@ -92,15 +90,7 @@ public class CompassManager
private void requestUpdate(CompassRequest r)
{
try
{
NetworkHandler.instance.sendToServer( new PacketCompassRequest( r.attunement, r.cx, r.cz, r.cdy ) );
}
catch (IOException e)
{
AELog.error( e );
}
NetworkHandler.instance.sendToServer( new PacketCompassRequest( r.attunement, r.cx, r.cz, r.cdy ) );
}
}

View file

@ -9,10 +9,9 @@ import appeng.api.AEApi;
import appeng.api.config.TunnelType;
import appeng.api.features.IP2PTunnelRegistry;
import appeng.integration.BaseModule;
import appeng.integration.IIntegrationModule;
import appeng.integration.abstraction.IIC2;
public class IC2 extends BaseModule implements IIntegrationModule, IIC2
public class IC2 extends BaseModule implements IIC2
{
public static IC2 instance;

View file

@ -17,7 +17,6 @@ import appeng.client.gui.implementations.GuiPatternTerm;
import appeng.core.AEConfig;
import appeng.core.features.AEFeature;
import appeng.integration.BaseModule;
import appeng.integration.IIntegrationModule;
import appeng.integration.abstraction.INEI;
import appeng.integration.modules.NEIHelpers.NEIAEShapedRecipeHandler;
import appeng.integration.modules.NEIHelpers.NEIAEShapelessRecipeHandler;
@ -31,7 +30,7 @@ import codechicken.nei.api.IStackPositioner;
import codechicken.nei.guihook.GuiContainerManager;
import codechicken.nei.guihook.IContainerTooltipHandler;
public class NEI extends BaseModule implements IIntegrationModule, INEI, IContainerTooltipHandler
public class NEI extends BaseModule implements INEI, IContainerTooltipHandler
{
public static NEI instance;

View file

@ -4,10 +4,9 @@ import mods.railcraft.api.crafting.IRockCrusherRecipe;
import mods.railcraft.api.crafting.RailcraftCraftingManager;
import net.minecraft.item.ItemStack;
import appeng.integration.BaseModule;
import appeng.integration.IIntegrationModule;
import appeng.integration.abstraction.IRC;
public class RC extends BaseModule implements IIntegrationModule, IRC
public class RC extends BaseModule implements IRC
{
public static RC instance;

View file

@ -5,10 +5,9 @@ import net.minecraftforge.oredict.OreDictionary;
import appeng.api.AEApi;
import appeng.api.config.TunnelType;
import appeng.integration.BaseModule;
import appeng.integration.IIntegrationModule;
import cpw.mods.fml.common.registry.GameRegistry;
public class RF extends BaseModule implements IIntegrationModule
public class RF extends BaseModule
{
public static RF instance;

View file

@ -1,9 +1,8 @@
package appeng.integration.modules;
import appeng.integration.BaseModule;
import appeng.integration.IIntegrationModule;
public class RFItem extends BaseModule implements IIntegrationModule
public class RFItem extends BaseModule
{
public static RFItem instance;

View file

@ -17,8 +17,6 @@ import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import appeng.api.implementations.IPowerChannelState;
import appeng.api.implementations.parts.IPartStorageMonitor;
import appeng.api.parts.IFacadePart;
import appeng.api.parts.IPart;
import appeng.api.parts.IPartHost;
import appeng.api.parts.SelectedPart;
import appeng.api.storage.data.IAEFluidStack;

View file

@ -1,6 +1,5 @@
package appeng.items.tools;
import java.io.IOException;
import java.util.EnumSet;
import net.minecraft.block.Block;
@ -21,7 +20,6 @@ import appeng.api.util.DimensionalCoord;
import appeng.api.util.INetworkToolAgent;
import appeng.client.ClientHelper;
import appeng.container.AEBaseContainer;
import appeng.core.AELog;
import appeng.core.features.AEFeature;
import appeng.core.sync.GuiBridge;
import appeng.core.sync.network.NetworkHandler;
@ -97,14 +95,7 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench,
if ( Platform.isClient() )
{
try
{
NetworkHandler.instance.sendToServer( new PacketClick( x, y, z, side, hitX, hitY, hitZ ) );
}
catch (IOException e)
{
AELog.error( e );
}
NetworkHandler.instance.sendToServer( new PacketClick( x, y, z, side, hitX, hitY, hitZ ) );
}
return true;
}

View file

@ -1,6 +1,5 @@
package appeng.items.tools.powered;
import java.io.IOException;
import java.util.EnumSet;
import net.minecraft.entity.EntityLivingBase;
@ -30,19 +29,12 @@ public class ToolChargedStaff extends AEBasePoweredItem
extractAEPower( item, 300 );
if ( Platform.isServer() )
{
try
for (int x = 0; x < 2; x++)
{
for (int x = 0; x < 2; x++)
{
float dx = (float) (Platform.getRandomFloat() * target.width + target.boundingBox.minX);
float dy = (float) (Platform.getRandomFloat() * target.height + target.boundingBox.minY);
float dz = (float) (Platform.getRandomFloat() * target.width + target.boundingBox.minZ);
ServerHelper.proxy.sendToAllNearExcept( null, dx, dy, dz, 32.0, target.worldObj, new PacketLightning( dx, dy, dz ) );
}
}
catch (IOException ignored)
{
float dx = (float) (Platform.getRandomFloat() * target.width + target.boundingBox.minX);
float dy = (float) (Platform.getRandomFloat() * target.height + target.boundingBox.minY);
float dz = (float) (Platform.getRandomFloat() * target.width + target.boundingBox.minZ);
ServerHelper.proxy.sendToAllNearExcept( null, dx, dy, dz, 32.0, target.worldObj, new PacketLightning( dx, dy, dz ) );
}
}
target.attackEntityFrom( DamageSource.magic, 6 );

View file

@ -8,7 +8,6 @@ import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import appeng.api.config.SecurityPermissions;
import appeng.api.networking.IGrid;
import appeng.api.networking.IGridCache;
import appeng.api.networking.IGridHost;
import appeng.api.networking.IGridNode;
import appeng.api.networking.IGridStorage;
@ -19,7 +18,7 @@ import appeng.api.networking.security.ISecurityProvider;
import appeng.core.WorldSettings;
import appeng.me.GridNode;
public class SecurityCache implements IGridCache, ISecurityGrid
public class SecurityCache implements ISecurityGrid
{
final private List<ISecurityProvider> securityProvider = new ArrayList<ISecurityProvider>();

View file

@ -5,7 +5,6 @@ import java.util.LinkedList;
import java.util.List;
import appeng.api.networking.IGrid;
import appeng.api.networking.IGridCache;
import appeng.api.networking.IGridHost;
import appeng.api.networking.IGridNode;
import appeng.api.networking.IGridStorage;
@ -19,7 +18,7 @@ import appeng.me.cluster.implementations.SpatialPylonCluster;
import appeng.tile.spatial.TileSpatialIOPort;
import appeng.tile.spatial.TileSpatialPylon;
public class SpatialPylonCache implements IGridCache, ISpatialCache
public class SpatialPylonCache implements ISpatialCache
{
long powerRequired = 0;

View file

@ -4,7 +4,6 @@ import net.minecraft.item.ItemStack;
import appeng.api.AEApi;
import appeng.api.config.AccessRestriction;
import appeng.api.config.Actionable;
import appeng.api.exceptions.AppEngException;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.storage.IMEInventoryHandler;
import appeng.api.storage.StorageChannel;
@ -20,18 +19,11 @@ public class CreativeCellInventory implements IMEInventoryHandler<IAEItemStack>
public static IMEInventoryHandler getCell(ItemStack o)
{
try
{
return new CellInventoryHandler( new CreativeCellInventory( o ) );
}
catch (AppEngException ignored)
{
}
return null;
return new CellInventoryHandler( new CreativeCellInventory( o ) );
}
protected CreativeCellInventory(ItemStack o) throws AppEngException {
protected CreativeCellInventory(ItemStack o)
{
CellConfig cc = new CellConfig( o );
for (ItemStack is : cc)
if ( is != null )

View file

@ -14,7 +14,6 @@ import appeng.api.config.Actionable;
import appeng.api.config.StorageFilter;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.networking.ticking.TickRateModulation;
import appeng.api.storage.IMEInventory;
import appeng.api.storage.IMEMonitor;
import appeng.api.storage.IMEMonitorHandlerReceiver;
import appeng.api.storage.StorageChannel;
@ -24,7 +23,7 @@ import appeng.util.InventoryAdaptor;
import appeng.util.Platform;
import appeng.util.inv.ItemSlot;
public class MEMonitorIInventory implements IMEInventory<IAEItemStack>, IMEMonitor<IAEItemStack>
public class MEMonitorIInventory implements IMEMonitor<IAEItemStack>
{
static class CachedItemStack

View file

@ -1,6 +1,5 @@
package appeng.parts;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
@ -26,7 +25,6 @@ import appeng.api.parts.IPartItem;
import appeng.api.parts.PartItemStack;
import appeng.api.parts.SelectedPart;
import appeng.api.util.DimensionalCoord;
import appeng.core.AELog;
import appeng.core.AppEng;
import appeng.core.CommonHelper;
import appeng.core.sync.network.NetworkHandler;
@ -81,14 +79,7 @@ public class PartPlacement
|| AEApi.instance().items().itemColorApplicator.sameAsStack( held );
if ( event.entityPlayer.isSneaking() && held != null && supportedItem )
{
try
{
NetworkHandler.instance.sendToServer( new PacketClick( event.x, event.y, event.z, event.face, 0, 0, 0 ) );
}
catch (IOException e)
{
// :P
}
NetworkHandler.instance.sendToServer( new PacketClick( event.x, event.y, event.z, event.face, 0, 0, 0 ) );
}
}
}
@ -171,14 +162,7 @@ public class PartPlacement
else
{
player.swingItem();
try
{
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
}
catch (IOException e)
{
AELog.error( e );
}
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
}
return true;
}
@ -225,15 +209,8 @@ public class PartPlacement
else
{
player.swingItem();
try
{
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
return true;
}
catch (IOException e)
{
AELog.error( e );
}
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
return true;
}
}
return false;
@ -262,14 +239,7 @@ public class PartPlacement
{
if ( world.isRemote )
{
try
{
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
}
catch (IOException e)
{
AELog.error( e );
}
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
}
return true;
}
@ -328,14 +298,7 @@ public class PartPlacement
else
{
player.swingItem();
try
{
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
}
catch (IOException e)
{
AELog.error( e );
}
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
return true;
}
}
@ -409,14 +372,7 @@ public class PartPlacement
else
{
player.swingItem();
try
{
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
}
catch (IOException e)
{
AELog.error( e );
}
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
}
return true;
}

View file

@ -1,6 +1,5 @@
package appeng.parts.automation;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.Callable;
@ -36,7 +35,6 @@ import appeng.api.parts.IPartHost;
import appeng.api.parts.IPartRenderHelper;
import appeng.api.storage.data.IAEItemStack;
import appeng.client.texture.CableBusTextures;
import appeng.core.AELog;
import appeng.core.settings.TickRates;
import appeng.core.sync.packets.PacketTransitionEffect;
import appeng.hooks.TickHandler;
@ -292,14 +290,7 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
}
}
try
{
ServerHelper.proxy.sendToAllNearExcept( null, x, y, z, 64, w, new PacketTransitionEffect( x, y, z, side, true ) );
}
catch (IOException e)
{
AELog.error( e );
}
ServerHelper.proxy.sendToAllNearExcept( null, x, y, z, 64, w, new PacketTransitionEffect( x, y, z, side, true ) );
for (ItemStack snaggedItem : out)
{
@ -393,15 +384,8 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
IAEItemStack stack = AEItemStack.create( ((EntityItem) entity).getEntityItem() );
if ( stack != null )
{
try
{
ServerHelper.proxy.sendToAllNearExcept( null, tile.xCoord, tile.yCoord, tile.zCoord, 64, tile.getWorldObj(),
new PacketTransitionEffect( entity.posX, entity.posY, entity.posZ, side, false ) );
}
catch (IOException e)
{
AELog.error( e );
}
ServerHelper.proxy.sendToAllNearExcept( null, tile.xCoord, tile.yCoord, tile.zCoord, 64, tile.getWorldObj(),
new PacketTransitionEffect( entity.posX, entity.posY, entity.posZ, side, false ) );
Buffer.add( stack );
storeBuffer();

View file

@ -19,7 +19,6 @@ import appeng.api.networking.crafting.ICraftingRequester;
import appeng.api.networking.energy.IEnergyGrid;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.networking.security.MachineSource;
import appeng.api.networking.ticking.IGridTickable;
import appeng.api.networking.ticking.TickRateModulation;
import appeng.api.networking.ticking.TickingRequest;
import appeng.api.parts.IPartCollisionHelper;
@ -43,13 +42,14 @@ import com.google.common.collect.ImmutableSet;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class PartExportBus extends PartSharedItemBus implements IGridTickable, ICraftingRequester
public class PartExportBus extends PartSharedItemBus implements ICraftingRequester
{
final MultiCraftingTracker cratingTracker = new MultiCraftingTracker( this, 9 );
final BaseActionSource mySrc;
public PartExportBus(ItemStack is) {
public PartExportBus(ItemStack is)
{
super( PartExportBus.class, is );
settings.registerSetting( Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE );
settings.registerSetting( Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );

View file

@ -16,7 +16,6 @@ import appeng.api.networking.energy.IEnergyGrid;
import appeng.api.networking.energy.IEnergySource;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.networking.security.MachineSource;
import appeng.api.networking.ticking.IGridTickable;
import appeng.api.networking.ticking.TickRateModulation;
import appeng.api.networking.ticking.TickingRequest;
import appeng.api.parts.IPartCollisionHelper;
@ -34,7 +33,7 @@ import appeng.util.inv.IInventoryDestination;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class PartImportBus extends PartSharedItemBus implements IGridTickable, IInventoryDestination
public class PartImportBus extends PartSharedItemBus implements IInventoryDestination
{
final BaseActionSource mySrc;

View file

@ -6,7 +6,6 @@ import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import appeng.api.config.RedstoneMode;
import appeng.api.config.Upgrades;
import appeng.api.implementations.tiles.ISegmentedInventory;
import appeng.api.util.IConfigManager;
import appeng.parts.PartBasicState;
import appeng.tile.inventory.IAEAppEngInventory;
@ -14,7 +13,7 @@ import appeng.tile.inventory.InvOperation;
import appeng.util.ConfigManager;
import appeng.util.IConfigManagerHost;
public class PartUpgradeable extends PartBasicState implements ISegmentedInventory, IAEAppEngInventory, IConfigManagerHost
public class PartUpgradeable extends PartBasicState implements IAEAppEngInventory, IConfigManagerHost
{
final IConfigManager settings = new ConfigManager( this );

View file

@ -16,7 +16,6 @@ import net.minecraft.util.Vec3;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.config.Actionable;
import appeng.api.config.Upgrades;
import appeng.api.implementations.tiles.ISegmentedInventory;
import appeng.api.implementations.tiles.ITileStorageMonitorable;
import appeng.api.networking.IGridNode;
import appeng.api.networking.crafting.ICraftingLink;
@ -52,7 +51,7 @@ import com.google.common.collect.ImmutableSet;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class PartInterface extends PartBasicState implements IGridTickable, ISegmentedInventory, IStorageMonitorable, IInventoryDestination, IInterfaceHost,
public class PartInterface extends PartBasicState implements IGridTickable, IStorageMonitorable, IInventoryDestination, IInterfaceHost,
ISidedInventory, IAEAppEngInventory, ITileStorageMonitorable, IPriorityHost
{

View file

@ -40,7 +40,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@Interface(iface = "buildcraft.api.transport.IPipeConnection", iname = "BC")
public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements IPipeConnection, IInventory, ISidedInventory, IGridTickable
public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements IPipeConnection, ISidedInventory, IGridTickable
{
@Override

View file

@ -4,7 +4,6 @@ import java.util.Stack;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraftforge.common.util.ForgeDirection;

View file

@ -9,10 +9,9 @@ import net.minecraft.nbt.NBTTagCompound;
import appeng.client.texture.CableBusTextures;
import appeng.core.sync.GuiBridge;
import appeng.tile.inventory.AppEngInternalInventory;
import appeng.tile.inventory.IAEAppEngInventory;
import appeng.tile.inventory.InvOperation;
public class PartCraftingTerminal extends PartTerminal implements IAEAppEngInventory
public class PartCraftingTerminal extends PartTerminal
{
final AppEngInternalInventory craftingGrid = new AppEngInternalInventory( this, 9 );

View file

@ -12,10 +12,9 @@ import appeng.api.storage.data.IAEItemStack;
import appeng.client.texture.CableBusTextures;
import appeng.core.sync.GuiBridge;
import appeng.tile.inventory.AppEngInternalInventory;
import appeng.tile.inventory.IAEAppEngInventory;
import appeng.tile.inventory.InvOperation;
public class PartPatternTerminal extends PartTerminal implements IAEAppEngInventory
public class PartPatternTerminal extends PartTerminal
{
final AppEngInternalInventory crafting = new AppEngInternalInventory( this, 9 );

View file

@ -12,7 +12,7 @@ import net.minecraft.world.gen.ChunkProviderGenerate;
import appeng.api.AEApi;
import appeng.core.AEConfig;
public class StorageChunkProvider extends ChunkProviderGenerate implements IChunkProvider
public class StorageChunkProvider extends ChunkProviderGenerate
{
final static Block[] blocks;

View file

@ -6,7 +6,6 @@ import java.io.IOException;
import java.util.ArrayList;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@ -45,7 +44,6 @@ import appeng.tile.TileEvent;
import appeng.tile.events.TileEventType;
import appeng.tile.grid.AENetworkInvTile;
import appeng.tile.inventory.AppEngInternalInventory;
import appeng.tile.inventory.IAEAppEngInventory;
import appeng.tile.inventory.InvOperation;
import appeng.util.ConfigManager;
import appeng.util.IConfigManagerHost;
@ -55,7 +53,7 @@ import appeng.util.item.AEItemStack;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
public class TileMolecularAssembler extends AENetworkInvTile implements IAEAppEngInventory, ISidedInventory, IUpgradeableHost, IConfigManagerHost,
public class TileMolecularAssembler extends AENetworkInvTile implements IUpgradeableHost, IConfigManagerHost,
IGridTickable, ICraftingMachine, IPowerChannelState
{
@ -177,7 +175,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IAEAppEn
}
@TileEvent(TileEventType.NETWORK_READ)
public boolean readFromStream_TileMolecularAssembler(ByteBuf data) throws IOException
public boolean readFromStream_TileMolecularAssembler(ByteBuf data)
{
boolean oldPower = isPowered;
isPowered = data.readBoolean();
@ -185,7 +183,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IAEAppEn
}
@TileEvent(TileEventType.NETWORK_WRITE)
public void writeToStream_TileMolecularAssembler(ByteBuf data) throws IOException
public void writeToStream_TileMolecularAssembler(ByteBuf data)
{
data.writeBoolean( isPowered );
}

View file

@ -15,11 +15,10 @@ public class AETileEventHandler
{
private final Method method;
private final TileEventType type;
public AETileEventHandler(Method m, TileEventType which) {
public AETileEventHandler(Method m, TileEventType which)
{
method = m;
type = which;
}
// TICK
@ -86,7 +85,7 @@ public class AETileEventHandler
}
// NETWORK
public void writeToStream(AEBaseTile tile, ByteBuf data) throws IOException
public void writeToStream(AEBaseTile tile, ByteBuf data)
{
try
{

View file

@ -49,14 +49,14 @@ public class TileCrank extends AEBaseTile implements ICustomCollision
}
@TileEvent(TileEventType.NETWORK_READ)
public boolean readFromStream_TileCrank(ByteBuf data) throws java.io.IOException
public boolean readFromStream_TileCrank(ByteBuf data)
{
rotation = data.readInt();
return false;
}
@TileEvent(TileEventType.NETWORK_WRITE)
public void writeToStream_TileCrank(ByteBuf data) throws java.io.IOException
public void writeToStream_TileCrank(ByteBuf data)
{
data.writeInt( rotation );
}

View file

@ -12,7 +12,6 @@ import appeng.api.config.Upgrades;
import appeng.api.implementations.IUpgradeableHost;
import appeng.api.storage.ICellWorkbenchItem;
import appeng.api.util.IConfigManager;
import appeng.api.util.IConfigurableObject;
import appeng.tile.AEBaseTile;
import appeng.tile.TileEvent;
import appeng.tile.events.TileEventType;
@ -23,7 +22,7 @@ import appeng.tile.inventory.InvOperation;
import appeng.util.ConfigManager;
import appeng.util.IConfigManagerHost;
public class TileCellWorkbench extends AEBaseTile implements IUpgradeableHost, IAEAppEngInventory, IConfigurableObject, IConfigManagerHost
public class TileCellWorkbench extends AEBaseTile implements IUpgradeableHost, IAEAppEngInventory, IConfigManagerHost
{
final AppEngInternalInventory cell = new AppEngInternalInventory( this, 1 );

View file

@ -46,7 +46,7 @@ public class TileCharger extends AENetworkPowerTile implements ICrankable
}
@TileEvent(TileEventType.NETWORK_READ)
public boolean readFromStream_TileCharger(ByteBuf data) throws IOException
public boolean readFromStream_TileCharger(ByteBuf data)
{
try
{

View file

@ -18,13 +18,12 @@ import appeng.tile.AEBaseInvTile;
import appeng.tile.TileEvent;
import appeng.tile.events.TileEventType;
import appeng.tile.inventory.AppEngInternalInventory;
import appeng.tile.inventory.IAEAppEngInventory;
import appeng.tile.inventory.InvOperation;
import appeng.util.ConfigManager;
import appeng.util.IConfigManagerHost;
import appeng.util.Platform;
public class TileCondenser extends AEBaseInvTile implements IAEAppEngInventory, IFluidHandler, IConfigManagerHost, IConfigurableObject
public class TileCondenser extends AEBaseInvTile implements IFluidHandler, IConfigManagerHost, IConfigurableObject
{
final int[] sides = new int[] { 0, 1 };

View file

@ -12,7 +12,6 @@ import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.config.Actionable;
import appeng.api.config.Upgrades;
import appeng.api.implementations.tiles.ISegmentedInventory;
import appeng.api.implementations.tiles.ITileStorageMonitorable;
import appeng.api.networking.IGridNode;
import appeng.api.networking.crafting.ICraftingLink;
@ -32,7 +31,6 @@ import appeng.api.storage.data.IAEItemStack;
import appeng.api.util.AECableType;
import appeng.api.util.DimensionalCoord;
import appeng.api.util.IConfigManager;
import appeng.api.util.IConfigurableObject;
import appeng.helpers.DualityInterface;
import appeng.helpers.IInterfaceHost;
import appeng.helpers.IPriorityHost;
@ -45,8 +43,8 @@ import appeng.util.inv.IInventoryDestination;
import com.google.common.collect.ImmutableSet;
public class TileInterface extends AENetworkInvTile implements IGridTickable, ISegmentedInventory, ITileStorageMonitorable, IStorageMonitorable,
IInventoryDestination, IInterfaceHost, IConfigurableObject, IPriorityHost
public class TileInterface extends AENetworkInvTile implements IGridTickable, ITileStorageMonitorable, IStorageMonitorable,
IInventoryDestination, IInterfaceHost, IPriorityHost
{
ForgeDirection pointAt = ForgeDirection.UNKNOWN;

View file

@ -4,7 +4,6 @@ import appeng.helpers.Splotch;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
@ -90,13 +89,13 @@ public class TilePaint extends AEBaseTile
}
@TileEvent(TileEventType.NETWORK_WRITE)
public void writeToStream_TilePaint(ByteBuf data) throws IOException
public void writeToStream_TilePaint(ByteBuf data)
{
writeBuffer( data );
}
@TileEvent(TileEventType.NETWORK_READ)
public boolean readFromStream_TilePaint(ByteBuf data) throws IOException
public boolean readFromStream_TilePaint(ByteBuf data)
{
readBuffer( data );
return true;

View file

@ -2,7 +2,6 @@ package appeng.tile.misc;
import io.netty.buffer.ByteBuf;
import java.io.IOException;
import java.util.EnumSet;
import net.minecraftforge.common.util.ForgeDirection;
@ -35,7 +34,7 @@ public class TileQuartzGrowthAccelerator extends AENetworkTile implements IPower
}
@TileEvent(TileEventType.NETWORK_READ)
public boolean readFromStream_TileQuartzGrowthAccelerator(ByteBuf data) throws IOException
public boolean readFromStream_TileQuartzGrowthAccelerator(ByteBuf data)
{
boolean hadPower = hasPower;
hasPower = data.readBoolean();
@ -43,7 +42,7 @@ public class TileQuartzGrowthAccelerator extends AENetworkTile implements IPower
}
@TileEvent(TileEventType.NETWORK_WRITE)
public void writeToStream_TileQuartzGrowthAccelerator(ByteBuf data) throws IOException
public void writeToStream_TileQuartzGrowthAccelerator(ByteBuf data)
{
try
{

View file

@ -3,7 +3,6 @@ package appeng.tile.misc;
import appeng.helpers.PlayerSecurityWrapper;
import io.netty.buffer.ByteBuf;
import java.io.IOException;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.HashMap;
@ -123,7 +122,7 @@ public class TileSecurity extends AENetworkTile implements ITerminalHost, IAEApp
}
@TileEvent(TileEventType.NETWORK_READ)
public boolean readFromStream_TileSecurity(ByteBuf data) throws IOException
public boolean readFromStream_TileSecurity(ByteBuf data)
{
boolean wasActive = isActive;
isActive = data.readBoolean();
@ -135,7 +134,7 @@ public class TileSecurity extends AENetworkTile implements ITerminalHost, IAEApp
}
@TileEvent(TileEventType.NETWORK_WRITE)
public void writeToStream_TileSecurity(ByteBuf data) throws IOException
public void writeToStream_TileSecurity(ByteBuf data)
{
data.writeBoolean( gridProxy.isActive() );
data.writeByte( paintedColor.ordinal() );

View file

@ -2,8 +2,6 @@ package appeng.tile.misc;
import io.netty.buffer.ByteBuf;
import java.io.IOException;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@ -47,7 +45,7 @@ public class TileVibrationChamber extends AENetworkInvTile implements IGridTicka
}
@TileEvent(TileEventType.NETWORK_READ)
public boolean readFromStream_TileVibrationChamber(ByteBuf data) throws IOException
public boolean readFromStream_TileVibrationChamber(ByteBuf data)
{
boolean wasOn = isOn;
isOn = data.readBoolean();
@ -55,7 +53,7 @@ public class TileVibrationChamber extends AENetworkInvTile implements IGridTicka
}
@TileEvent(TileEventType.NETWORK_WRITE)
public void writeToStream_TileVibrationChamber(ByteBuf data) throws IOException
public void writeToStream_TileVibrationChamber(ByteBuf data)
{
data.writeBoolean( burnTime > 0 );
}

View file

@ -7,7 +7,6 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.config.Actionable;
import appeng.api.networking.GridFlags;
import appeng.api.networking.energy.IAEPowerStorage;
import appeng.api.networking.events.MENetworkControllerChange;
import appeng.api.networking.events.MENetworkEventSubscribe;
import appeng.api.networking.events.MENetworkPowerStatusChange;
@ -20,7 +19,7 @@ import appeng.tile.grid.AENetworkPowerTile;
import appeng.tile.inventory.AppEngInternalInventory;
import appeng.tile.inventory.InvOperation;
public class TileController extends AENetworkPowerTile implements IAEPowerStorage
public class TileController extends AENetworkPowerTile
{
boolean isValid = false;

View file

@ -2,7 +2,6 @@ package appeng.tile.networking;
import io.netty.buffer.ByteBuf;
import java.io.IOException;
import java.util.EnumSet;
import net.minecraft.inventory.IInventory;
@ -62,7 +61,7 @@ public class TileWireless extends AENetworkInvTile implements IWirelessAccessPoi
}
@TileEvent(TileEventType.NETWORK_READ)
public boolean readFromStream_TileWireless(ByteBuf data) throws IOException
public boolean readFromStream_TileWireless(ByteBuf data)
{
int old = clientFlags;
clientFlags = data.readByte();
@ -71,7 +70,7 @@ public class TileWireless extends AENetworkInvTile implements IWirelessAccessPoi
}
@TileEvent(TileEventType.NETWORK_WRITE)
public void writeToStream_TileWireless(ByteBuf data) throws IOException
public void writeToStream_TileWireless(ByteBuf data)
{
clientFlags = 0;

View file

@ -2,7 +2,6 @@ package appeng.tile.qnb;
import io.netty.buffer.ByteBuf;
import java.io.IOException;
import java.util.EnumSet;
import net.minecraft.inventory.IInventory;
@ -63,7 +62,7 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
}
@TileEvent(TileEventType.NETWORK_WRITE)
public void writeToStream_TileQuantumBridge(ByteBuf data) throws IOException
public void writeToStream_TileQuantumBridge(ByteBuf data)
{
int out = constructed;
@ -77,7 +76,7 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
}
@TileEvent(TileEventType.NETWORK_READ)
public boolean readFromStream_TileQuantumBridge(ByteBuf data) throws IOException
public boolean readFromStream_TileQuantumBridge(ByteBuf data)
{
int oldValue = constructed;
constructed = data.readByte();

View file

@ -20,7 +20,6 @@ import appeng.api.networking.spatial.ISpatialCache;
import appeng.api.util.AECableType;
import appeng.api.util.DimensionalCoord;
import appeng.hooks.TickHandler;
import appeng.items.storage.ItemSpatialStorageCell;
import appeng.me.cache.SpatialPylonCache;
import appeng.tile.TileEvent;
import appeng.tile.events.TileEventType;

View file

@ -2,7 +2,6 @@ package appeng.tile.spatial;
import io.netty.buffer.ByteBuf;
import java.io.IOException;
import java.util.EnumSet;
import net.minecraftforge.common.util.ForgeDirection;
@ -54,7 +53,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
}
@TileEvent(TileEventType.NETWORK_READ)
public boolean readFromStream_TileSpatialPylon(ByteBuf data) throws IOException
public boolean readFromStream_TileSpatialPylon(ByteBuf data)
{
int old = displayBits;
displayBits = data.readByte();
@ -62,7 +61,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
}
@TileEvent(TileEventType.NETWORK_WRITE)
public void writeToStream_TileSpatialPylon(ByteBuf data) throws IOException
public void writeToStream_TileSpatialPylon(ByteBuf data)
{
data.writeByte( displayBits );
}

View file

@ -6,7 +6,6 @@ import appeng.api.networking.IGridNode;
import appeng.api.networking.security.*;
import io.netty.buffer.ByteBuf;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@ -168,7 +167,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
}
@TileEvent(TileEventType.NETWORK_WRITE)
public void writeToStream_TileChest(ByteBuf data) throws IOException
public void writeToStream_TileChest(ByteBuf data)
{
if ( worldObj.getTotalWorldTime() - lastStateChange > 8 )
state = 0;
@ -199,7 +198,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
}
@TileEvent(TileEventType.NETWORK_READ)
public boolean readFromStream_TileChest(ByteBuf data) throws IOException
public boolean readFromStream_TileChest(ByteBuf data)
{
int oldState = state;
ItemStack oldType = storageType;

View file

@ -2,7 +2,6 @@ package appeng.tile.storage;
import io.netty.buffer.ByteBuf;
import java.io.IOException;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
@ -88,7 +87,7 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive, IPrior
}
@TileEvent(TileEventType.NETWORK_WRITE)
public void writeToStream_TileDrive(ByteBuf data) throws IOException
public void writeToStream_TileDrive(ByteBuf data)
{
if ( worldObj.getTotalWorldTime() - lastStateChange > 8 )
state = 0;
@ -107,7 +106,7 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive, IPrior
}
@TileEvent(TileEventType.NETWORK_READ)
public boolean readFromStream_TileDrive(ByteBuf data) throws IOException
public boolean readFromStream_TileDrive(ByteBuf data)
{
int oldState = state;
state = data.readInt();

View file

@ -2,8 +2,6 @@ package appeng.tile.storage;
import io.netty.buffer.ByteBuf;
import java.io.IOException;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
@ -21,13 +19,13 @@ public class TileSkyChest extends AEBaseInvTile
final AppEngInternalInventory inv = new AppEngInternalInventory( this, 9 * 4 );
@TileEvent(TileEventType.NETWORK_WRITE)
public void writeToStream_TileSkyChest(ByteBuf data) throws IOException
public void writeToStream_TileSkyChest(ByteBuf data)
{
data.writeBoolean( playerOpen > 0 );
}
@TileEvent(TileEventType.NETWORK_READ)
public boolean readFromStream_TileSkyChest(ByteBuf data) throws IOException
public boolean readFromStream_TileSkyChest(ByteBuf data)
{
int wasOpen = playerOpen;
playerOpen = data.readBoolean() ? 1 : 0;

View file

@ -1,11 +1,10 @@
package appeng.util.inv;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
public class WrapperMCISidedInventory extends WrapperInventoryRange implements IInventory, IInventoryWrapper
public class WrapperMCISidedInventory extends WrapperInventoryRange implements IInventoryWrapper
{
private final ForgeDirection dir;

View file

@ -92,7 +92,7 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
countRequestable += i;
}
void putPacketValue(ByteBuf tag, long num) throws IOException
void putPacketValue(ByteBuf tag, long num)
{
if ( num <= 255 )
tag.writeByte( (byte) (num + Byte.MIN_VALUE) );
@ -104,7 +104,7 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
tag.writeLong( num );
}
static long getPacketValue(byte type, ByteBuf tag) throws IOException
static long getPacketValue(byte type, ByteBuf tag)
{
if ( type == 0 )
{

@ -1 +1 @@
Subproject commit 38dd8952cea1985838347f741b895368d41948e3
Subproject commit b0a451fecd97583367e12a98439dafac29e7ae97