From 7f225a5ec15c4c509818fc73846a6ec9f5c07b42 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 3 Oct 2014 23:08:28 -0700 Subject: [PATCH] Deleted useless things --- .../block/networking/BlockWireless.java | 1 - .../java/appeng/client/gui/AEBaseGui.java | 115 +++++------------- .../client/gui/implementations/GuiChest.java | 12 +- .../gui/implementations/GuiCondenser.java | 12 +- .../gui/implementations/GuiCraftAmount.java | 7 -- .../gui/implementations/GuiCraftConfirm.java | 9 +- .../implementations/GuiCraftingStatus.java | 9 +- .../gui/implementations/GuiCraftingTerm.java | 14 +-- .../client/gui/implementations/GuiDrive.java | 12 +- .../implementations/GuiFormationPlane.java | 12 +- .../client/gui/implementations/GuiIOPort.java | 18 +-- .../gui/implementations/GuiInterface.java | 28 +---- .../implementations/GuiInterfaceTerminal.java | 1 - .../gui/implementations/GuiLevelEmitter.java | 15 +-- .../gui/implementations/GuiMEMonitorable.java | 9 +- .../gui/implementations/GuiPriority.java | 9 +- .../gui/implementations/GuiUpgradeable.java | 23 +--- .../render/blocks/RenderBlockCraftingCPU.java | 2 - .../ContainerCraftConfirm.java | 9 +- src/main/java/appeng/core/WorldSettings.java | 19 +-- src/main/java/appeng/core/api/ApiPart.java | 5 +- .../appeng/core/sync/packets/PacketClick.java | 6 +- .../sync/packets/PacketCompassRequest.java | 6 +- .../sync/packets/PacketCompassResponse.java | 4 +- .../core/sync/packets/PacketConfigButton.java | 6 +- .../core/sync/packets/PacketCraftRequest.java | 8 +- .../sync/packets/PacketInventoryAction.java | 4 +- .../core/sync/packets/PacketLightning.java | 8 +- .../core/sync/packets/PacketMatterCannon.java | 8 +- .../sync/packets/PacketMockExplosion.java | 8 +- .../core/sync/packets/PacketMultiPart.java | 12 +- .../packets/PacketNewStorageDimension.java | 9 +- .../sync/packets/PacketPaintedEntity.java | 5 +- .../sync/packets/PacketPartPlacement.java | 9 +- .../core/sync/packets/PacketPartialItem.java | 8 +- .../core/sync/packets/PacketProgressBar.java | 9 +- .../core/sync/packets/PacketSwapSlots.java | 9 +- .../core/sync/packets/PacketSwitchGuis.java | 9 +- .../sync/packets/PacketTransitionEffect.java | 9 +- .../appeng/entity/EntityTinyTNTPrimed.java | 10 +- src/main/java/appeng/fmp/CableBusPart.java | 3 +- src/main/java/appeng/fmp/FMPEvent.java | 12 +- .../java/appeng/helpers/DualityInterface.java | 6 +- .../java/appeng/helpers/IInterfaceHost.java | 3 +- .../appeng/helpers/MultiCraftingTracker.java | 2 - .../java/appeng/hooks/CompassManager.java | 12 +- .../java/appeng/integration/modules/IC2.java | 3 +- .../java/appeng/integration/modules/NEI.java | 3 +- .../java/appeng/integration/modules/RC.java | 3 +- .../java/appeng/integration/modules/RF.java | 3 +- .../appeng/integration/modules/RFItem.java | 3 +- .../appeng/integration/modules/Waila.java | 2 - .../appeng/items/tools/ToolNetworkTool.java | 11 +- .../items/tools/powered/ToolChargedStaff.java | 18 +-- .../java/appeng/me/cache/SecurityCache.java | 3 +- .../appeng/me/cache/SpatialPylonCache.java | 3 +- .../me/storage/CreativeCellInventory.java | 14 +-- .../me/storage/MEMonitorIInventory.java | 3 +- src/main/java/appeng/parts/PartPlacement.java | 58 ++------- .../automation/PartAnnihilationPlane.java | 22 +--- .../parts/automation/PartExportBus.java | 6 +- .../parts/automation/PartImportBus.java | 3 +- .../parts/automation/PartUpgradeable.java | 3 +- .../java/appeng/parts/misc/PartInterface.java | 3 +- .../java/appeng/parts/p2p/PartP2PItems.java | 2 +- .../java/appeng/parts/p2p/PartP2PRFPower.java | 1 - .../parts/reporting/PartCraftingTerminal.java | 3 +- .../parts/reporting/PartPatternTerminal.java | 3 +- .../appeng/spatial/StorageChunkProvider.java | 2 +- .../tile/crafting/TileMolecularAssembler.java | 8 +- .../tile/events/AETileEventHandler.java | 7 +- .../appeng/tile/grindstone/TileCrank.java | 4 +- .../appeng/tile/misc/TileCellWorkbench.java | 3 +- .../java/appeng/tile/misc/TileCharger.java | 2 +- .../java/appeng/tile/misc/TileCondenser.java | 3 +- .../java/appeng/tile/misc/TileInterface.java | 6 +- src/main/java/appeng/tile/misc/TilePaint.java | 5 +- .../misc/TileQuartzGrowthAccelerator.java | 5 +- .../java/appeng/tile/misc/TileSecurity.java | 5 +- .../tile/misc/TileVibrationChamber.java | 6 +- .../tile/networking/TileController.java | 3 +- .../appeng/tile/networking/TileWireless.java | 5 +- .../appeng/tile/qnb/TileQuantumBridge.java | 5 +- .../tile/spatial/TileSpatialIOPort.java | 1 - .../appeng/tile/spatial/TileSpatialPylon.java | 5 +- .../java/appeng/tile/storage/TileChest.java | 5 +- .../java/appeng/tile/storage/TileDrive.java | 5 +- .../appeng/tile/storage/TileSkyChest.java | 6 +- .../util/inv/WrapperMCISidedInventory.java | 3 +- src/main/java/appeng/util/item/AEStack.java | 4 +- .../resources/assets/appliedenergistics2/lang | 2 +- 91 files changed, 204 insertions(+), 595 deletions(-) diff --git a/src/main/java/appeng/block/networking/BlockWireless.java b/src/main/java/appeng/block/networking/BlockWireless.java index ff8c9d39..6fae5c1a 100644 --- a/src/main/java/appeng/block/networking/BlockWireless.java +++ b/src/main/java/appeng/block/networking/BlockWireless.java @@ -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; diff --git a/src/main/java/appeng/client/gui/AEBaseGui.java b/src/main/java/appeng/client/gui/AEBaseGui.java index 91687e56..2a08aa7b 100644 --- a/src/main/java/appeng/client/gui/AEBaseGui.java +++ b/src/main/java/appeng/client/gui/AEBaseGui.java @@ -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) inventorySlots.inventorySlots) { - for (Slot s : (List) 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 ); - } } } } diff --git a/src/main/java/appeng/client/gui/implementations/GuiChest.java b/src/main/java/appeng/client/gui/implementations/GuiChest.java index 3647cc7c..72a0bc75 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiChest.java +++ b/src/main/java/appeng/client/gui/implementations/GuiChest.java @@ -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 ) ); } } diff --git a/src/main/java/appeng/client/gui/implementations/GuiCondenser.java b/src/main/java/appeng/client/gui/implementations/GuiCondenser.java index 59cdb882..b5f9c4a2 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiCondenser.java +++ b/src/main/java/appeng/client/gui/implementations/GuiCondenser.java @@ -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 ) ); } } diff --git a/src/main/java/appeng/client/gui/implementations/GuiCraftAmount.java b/src/main/java/appeng/client/gui/implementations/GuiCraftAmount.java index 50ef67c6..08b436f1 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiCraftAmount.java +++ b/src/main/java/appeng/client/gui/implementations/GuiCraftAmount.java @@ -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; diff --git a/src/main/java/appeng/client/gui/implementations/GuiCraftConfirm.java b/src/main/java/appeng/client/gui/implementations/GuiCraftConfirm.java index 312ed39d..e6a22df1 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiCraftConfirm.java +++ b/src/main/java/appeng/client/gui/implementations/GuiCraftConfirm.java @@ -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 ) diff --git a/src/main/java/appeng/client/gui/implementations/GuiCraftingStatus.java b/src/main/java/appeng/client/gui/implementations/GuiCraftingStatus.java index 6d311848..ba2683c1 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiCraftingStatus.java +++ b/src/main/java/appeng/client/gui/implementations/GuiCraftingStatus.java @@ -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 ) ); } } diff --git a/src/main/java/appeng/client/gui/implementations/GuiCraftingTerm.java b/src/main/java/appeng/client/gui/implementations/GuiCraftingTerm.java index c01438fa..fba96a8f 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiCraftingTerm.java +++ b/src/main/java/appeng/client/gui/implementations/GuiCraftingTerm.java @@ -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 ); } } } diff --git a/src/main/java/appeng/client/gui/implementations/GuiDrive.java b/src/main/java/appeng/client/gui/implementations/GuiDrive.java index ec5c41bb..aeddf576 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiDrive.java +++ b/src/main/java/appeng/client/gui/implementations/GuiDrive.java @@ -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 ) ); } } diff --git a/src/main/java/appeng/client/gui/implementations/GuiFormationPlane.java b/src/main/java/appeng/client/gui/implementations/GuiFormationPlane.java index 6f7188d6..5441529c 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiFormationPlane.java +++ b/src/main/java/appeng/client/gui/implementations/GuiFormationPlane.java @@ -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 ) ); } } diff --git a/src/main/java/appeng/client/gui/implementations/GuiIOPort.java b/src/main/java/appeng/client/gui/implementations/GuiIOPort.java index 0bed5d4f..13e727cc 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiIOPort.java +++ b/src/main/java/appeng/client/gui/implementations/GuiIOPort.java @@ -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 diff --git a/src/main/java/appeng/client/gui/implementations/GuiInterface.java b/src/main/java/appeng/client/gui/implementations/GuiInterface.java index 55193bbe..d202eff8 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiInterface.java +++ b/src/main/java/appeng/client/gui/implementations/GuiInterface.java @@ -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 diff --git a/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java b/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java index da11e76b..30ef795d 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java +++ b/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java @@ -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; diff --git a/src/main/java/appeng/client/gui/implementations/GuiLevelEmitter.java b/src/main/java/appeng/client/gui/implementations/GuiLevelEmitter.java index de48d72a..d0ac6919 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiLevelEmitter.java +++ b/src/main/java/appeng/client/gui/implementations/GuiLevelEmitter.java @@ -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; diff --git a/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java b/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java index 4dc78f68..9046e8b4 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java +++ b/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java @@ -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 ) diff --git a/src/main/java/appeng/client/gui/implementations/GuiPriority.java b/src/main/java/appeng/client/gui/implementations/GuiPriority.java index 35caf58e..5f660e34 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiPriority.java +++ b/src/main/java/appeng/client/gui/implementations/GuiPriority.java @@ -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; diff --git a/src/main/java/appeng/client/gui/implementations/GuiUpgradeable.java b/src/main/java/appeng/client/gui/implementations/GuiUpgradeable.java index 51b8a230..e1feac47 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiUpgradeable.java +++ b/src/main/java/appeng/client/gui/implementations/GuiUpgradeable.java @@ -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() diff --git a/src/main/java/appeng/client/render/blocks/RenderBlockCraftingCPU.java b/src/main/java/appeng/client/render/blocks/RenderBlockCraftingCPU.java index 29b84393..ee29604f 100644 --- a/src/main/java/appeng/client/render/blocks/RenderBlockCraftingCPU.java +++ b/src/main/java/appeng/client/render/blocks/RenderBlockCraftingCPU.java @@ -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; diff --git a/src/main/java/appeng/container/implementations/ContainerCraftConfirm.java b/src/main/java/appeng/container/implementations/ContainerCraftConfirm.java index 53cc2311..df975115 100644 --- a/src/main/java/appeng/container/implementations/ContainerCraftConfirm.java +++ b/src/main/java/appeng/container/implementations/ContainerCraftConfirm.java @@ -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 ); diff --git a/src/main/java/appeng/core/WorldSettings.java b/src/main/java/appeng/core/WorldSettings.java index 10011e3a..37af73ce 100644 --- a/src/main/java/appeng/core/WorldSettings.java +++ b/src/main/java/appeng/core/WorldSettings.java @@ -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 diff --git a/src/main/java/appeng/core/api/ApiPart.java b/src/main/java/appeng/core/api/ApiPart.java index bb5be912..ce98da3f 100644 --- a/src/main/java/appeng/core/api/ApiPart.java +++ b/src/main/java/appeng/core/api/ApiPart.java @@ -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 ); diff --git a/src/main/java/appeng/core/sync/packets/PacketClick.java b/src/main/java/appeng/core/sync/packets/PacketClick.java index 93cb2fda..8c51272c 100644 --- a/src/main/java/appeng/core/sync/packets/PacketClick.java +++ b/src/main/java/appeng/core/sync/packets/PacketClick.java @@ -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(); diff --git a/src/main/java/appeng/core/sync/packets/PacketCompassRequest.java b/src/main/java/appeng/core/sync/packets/PacketCompassRequest.java index 4d467511..c257dad7 100644 --- a/src/main/java/appeng/core/sync/packets/PacketCompassRequest.java +++ b/src/main/java/appeng/core/sync/packets/PacketCompassRequest.java @@ -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(); diff --git a/src/main/java/appeng/core/sync/packets/PacketCompassResponse.java b/src/main/java/appeng/core/sync/packets/PacketCompassResponse.java index 405e4897..94945215 100644 --- a/src/main/java/appeng/core/sync/packets/PacketCompassResponse.java +++ b/src/main/java/appeng/core/sync/packets/PacketCompassResponse.java @@ -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(); diff --git a/src/main/java/appeng/core/sync/packets/PacketConfigButton.java b/src/main/java/appeng/core/sync/packets/PacketConfigButton.java index 010b1e9c..76a48c43 100644 --- a/src/main/java/appeng/core/sync/packets/PacketConfigButton.java +++ b/src/main/java/appeng/core/sync/packets/PacketConfigButton.java @@ -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; diff --git a/src/main/java/appeng/core/sync/packets/PacketCraftRequest.java b/src/main/java/appeng/core/sync/packets/PacketCraftRequest.java index 6a1be972..10c9aecf 100644 --- a/src/main/java/appeng/core/sync/packets/PacketCraftRequest.java +++ b/src/main/java/appeng/core/sync/packets/PacketCraftRequest.java @@ -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; diff --git a/src/main/java/appeng/core/sync/packets/PacketInventoryAction.java b/src/main/java/appeng/core/sync/packets/PacketInventoryAction.java index 146bef59..4df68958 100644 --- a/src/main/java/appeng/core/sync/packets/PacketInventoryAction.java +++ b/src/main/java/appeng/core/sync/packets/PacketInventoryAction.java @@ -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; diff --git a/src/main/java/appeng/core/sync/packets/PacketLightning.java b/src/main/java/appeng/core/sync/packets/PacketLightning.java index ab878e72..d6fa8dda 100644 --- a/src/main/java/appeng/core/sync/packets/PacketLightning.java +++ b/src/main/java/appeng/core/sync/packets/PacketLightning.java @@ -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; diff --git a/src/main/java/appeng/core/sync/packets/PacketMatterCannon.java b/src/main/java/appeng/core/sync/packets/PacketMatterCannon.java index 61584415..5a767080 100644 --- a/src/main/java/appeng/core/sync/packets/PacketMatterCannon.java +++ b/src/main/java/appeng/core/sync/packets/PacketMatterCannon.java @@ -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 ); diff --git a/src/main/java/appeng/core/sync/packets/PacketMockExplosion.java b/src/main/java/appeng/core/sync/packets/PacketMockExplosion.java index bd9b3481..e8a74c98 100644 --- a/src/main/java/appeng/core/sync/packets/PacketMockExplosion.java +++ b/src/main/java/appeng/core/sync/packets/PacketMockExplosion.java @@ -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; diff --git a/src/main/java/appeng/core/sync/packets/PacketMultiPart.java b/src/main/java/appeng/core/sync/packets/PacketMultiPart.java index 528f7fcd..42abe428 100644 --- a/src/main/java/appeng/core/sync/packets/PacketMultiPart.java +++ b/src/main/java/appeng/core/sync/packets/PacketMultiPart.java @@ -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() ); diff --git a/src/main/java/appeng/core/sync/packets/PacketNewStorageDimension.java b/src/main/java/appeng/core/sync/packets/PacketNewStorageDimension.java index 6ae7f7a9..efaa8a4d 100644 --- a/src/main/java/appeng/core/sync/packets/PacketNewStorageDimension.java +++ b/src/main/java/appeng/core/sync/packets/PacketNewStorageDimension.java @@ -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(); diff --git a/src/main/java/appeng/core/sync/packets/PacketPaintedEntity.java b/src/main/java/appeng/core/sync/packets/PacketPaintedEntity.java index 3b9662f3..464282f0 100644 --- a/src/main/java/appeng/core/sync/packets/PacketPaintedEntity.java +++ b/src/main/java/appeng/core/sync/packets/PacketPaintedEntity.java @@ -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(); diff --git a/src/main/java/appeng/core/sync/packets/PacketPartPlacement.java b/src/main/java/appeng/core/sync/packets/PacketPartPlacement.java index 5ba3a97c..98913e4e 100644 --- a/src/main/java/appeng/core/sync/packets/PacketPartPlacement.java +++ b/src/main/java/appeng/core/sync/packets/PacketPartPlacement.java @@ -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() ); diff --git a/src/main/java/appeng/core/sync/packets/PacketPartialItem.java b/src/main/java/appeng/core/sync/packets/PacketPartialItem.java index 4d433994..9667e817 100644 --- a/src/main/java/appeng/core/sync/packets/PacketPartialItem.java +++ b/src/main/java/appeng/core/sync/packets/PacketPartialItem.java @@ -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(); diff --git a/src/main/java/appeng/core/sync/packets/PacketProgressBar.java b/src/main/java/appeng/core/sync/packets/PacketProgressBar.java index d83de75a..382cfe21 100644 --- a/src/main/java/appeng/core/sync/packets/PacketProgressBar.java +++ b/src/main/java/appeng/core/sync/packets/PacketProgressBar.java @@ -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; diff --git a/src/main/java/appeng/core/sync/packets/PacketSwapSlots.java b/src/main/java/appeng/core/sync/packets/PacketSwapSlots.java index db536507..f031d2b4 100644 --- a/src/main/java/appeng/core/sync/packets/PacketSwapSlots.java +++ b/src/main/java/appeng/core/sync/packets/PacketSwapSlots.java @@ -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() ); diff --git a/src/main/java/appeng/core/sync/packets/PacketSwitchGuis.java b/src/main/java/appeng/core/sync/packets/PacketSwitchGuis.java index 9a6d03ff..a241fd34 100644 --- a/src/main/java/appeng/core/sync/packets/PacketSwitchGuis.java +++ b/src/main/java/appeng/core/sync/packets/PacketSwitchGuis.java @@ -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() ) diff --git a/src/main/java/appeng/core/sync/packets/PacketTransitionEffect.java b/src/main/java/appeng/core/sync/packets/PacketTransitionEffect.java index 6353ec0e..51922bdd 100644 --- a/src/main/java/appeng/core/sync/packets/PacketTransitionEffect.java +++ b/src/main/java/appeng/core/sync/packets/PacketTransitionEffect.java @@ -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; diff --git a/src/main/java/appeng/entity/EntityTinyTNTPrimed.java b/src/main/java/appeng/entity/EntityTinyTNTPrimed.java index e7d11ce8..96d5e313 100644 --- a/src/main/java/appeng/entity/EntityTinyTNTPrimed.java +++ b/src/main/java/appeng/entity/EntityTinyTNTPrimed.java @@ -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 diff --git a/src/main/java/appeng/fmp/CableBusPart.java b/src/main/java/appeng/fmp/CableBusPart.java index 3ffc72ab..9d5f0d4d 100644 --- a/src/main/java/appeng/fmp/CableBusPart.java +++ b/src/main/java/appeng/fmp/CableBusPart.java @@ -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[] { diff --git a/src/main/java/appeng/fmp/FMPEvent.java b/src/main/java/appeng/fmp/FMPEvent.java index 62e613b8..a7fd4ba5 100644 --- a/src/main/java/appeng/fmp/FMPEvent.java +++ b/src/main/java/appeng/fmp/FMPEvent.java @@ -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; } diff --git a/src/main/java/appeng/helpers/DualityInterface.java b/src/main/java/appeng/helpers/DualityInterface.java index 5e9bb333..328f4406 100644 --- a/src/main/java/appeng/helpers/DualityInterface.java +++ b/src/main/java/appeng/helpers/DualityInterface.java @@ -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 }; diff --git a/src/main/java/appeng/helpers/IInterfaceHost.java b/src/main/java/appeng/helpers/IInterfaceHost.java index ea2e2338..707bf354 100644 --- a/src/main/java/appeng/helpers/IInterfaceHost.java +++ b/src/main/java/appeng/helpers/IInterfaceHost.java @@ -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(); diff --git a/src/main/java/appeng/helpers/MultiCraftingTracker.java b/src/main/java/appeng/helpers/MultiCraftingTracker.java index 96be0c40..a2c4dd2b 100644 --- a/src/main/java/appeng/helpers/MultiCraftingTracker.java +++ b/src/main/java/appeng/helpers/MultiCraftingTracker.java @@ -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 ) { diff --git a/src/main/java/appeng/hooks/CompassManager.java b/src/main/java/appeng/hooks/CompassManager.java index 9621fcd2..4cdf2847 100644 --- a/src/main/java/appeng/hooks/CompassManager.java +++ b/src/main/java/appeng/hooks/CompassManager.java @@ -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 ) ); } } diff --git a/src/main/java/appeng/integration/modules/IC2.java b/src/main/java/appeng/integration/modules/IC2.java index 5a4182de..94afd918 100644 --- a/src/main/java/appeng/integration/modules/IC2.java +++ b/src/main/java/appeng/integration/modules/IC2.java @@ -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; diff --git a/src/main/java/appeng/integration/modules/NEI.java b/src/main/java/appeng/integration/modules/NEI.java index 58e12107..d670e8e1 100644 --- a/src/main/java/appeng/integration/modules/NEI.java +++ b/src/main/java/appeng/integration/modules/NEI.java @@ -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; diff --git a/src/main/java/appeng/integration/modules/RC.java b/src/main/java/appeng/integration/modules/RC.java index eba9526f..08a0baf0 100644 --- a/src/main/java/appeng/integration/modules/RC.java +++ b/src/main/java/appeng/integration/modules/RC.java @@ -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; diff --git a/src/main/java/appeng/integration/modules/RF.java b/src/main/java/appeng/integration/modules/RF.java index d0b7536d..2ddc2306 100644 --- a/src/main/java/appeng/integration/modules/RF.java +++ b/src/main/java/appeng/integration/modules/RF.java @@ -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; diff --git a/src/main/java/appeng/integration/modules/RFItem.java b/src/main/java/appeng/integration/modules/RFItem.java index 2cb3a475..c67dcc2e 100644 --- a/src/main/java/appeng/integration/modules/RFItem.java +++ b/src/main/java/appeng/integration/modules/RFItem.java @@ -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; diff --git a/src/main/java/appeng/integration/modules/Waila.java b/src/main/java/appeng/integration/modules/Waila.java index 70ae4d30..2e84a62a 100644 --- a/src/main/java/appeng/integration/modules/Waila.java +++ b/src/main/java/appeng/integration/modules/Waila.java @@ -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; diff --git a/src/main/java/appeng/items/tools/ToolNetworkTool.java b/src/main/java/appeng/items/tools/ToolNetworkTool.java index aba031a5..c6777820 100644 --- a/src/main/java/appeng/items/tools/ToolNetworkTool.java +++ b/src/main/java/appeng/items/tools/ToolNetworkTool.java @@ -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; } diff --git a/src/main/java/appeng/items/tools/powered/ToolChargedStaff.java b/src/main/java/appeng/items/tools/powered/ToolChargedStaff.java index 20bfbaf9..4ea4e5d3 100644 --- a/src/main/java/appeng/items/tools/powered/ToolChargedStaff.java +++ b/src/main/java/appeng/items/tools/powered/ToolChargedStaff.java @@ -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 ); diff --git a/src/main/java/appeng/me/cache/SecurityCache.java b/src/main/java/appeng/me/cache/SecurityCache.java index 0aad933f..e2e0fcdc 100644 --- a/src/main/java/appeng/me/cache/SecurityCache.java +++ b/src/main/java/appeng/me/cache/SecurityCache.java @@ -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 securityProvider = new ArrayList(); diff --git a/src/main/java/appeng/me/cache/SpatialPylonCache.java b/src/main/java/appeng/me/cache/SpatialPylonCache.java index 2ed3946b..c3a132c1 100644 --- a/src/main/java/appeng/me/cache/SpatialPylonCache.java +++ b/src/main/java/appeng/me/cache/SpatialPylonCache.java @@ -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; diff --git a/src/main/java/appeng/me/storage/CreativeCellInventory.java b/src/main/java/appeng/me/storage/CreativeCellInventory.java index 8754c0ec..d78979f7 100644 --- a/src/main/java/appeng/me/storage/CreativeCellInventory.java +++ b/src/main/java/appeng/me/storage/CreativeCellInventory.java @@ -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 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 ) diff --git a/src/main/java/appeng/me/storage/MEMonitorIInventory.java b/src/main/java/appeng/me/storage/MEMonitorIInventory.java index 2be8949f..89b1834f 100644 --- a/src/main/java/appeng/me/storage/MEMonitorIInventory.java +++ b/src/main/java/appeng/me/storage/MEMonitorIInventory.java @@ -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, IMEMonitor +public class MEMonitorIInventory implements IMEMonitor { static class CachedItemStack diff --git a/src/main/java/appeng/parts/PartPlacement.java b/src/main/java/appeng/parts/PartPlacement.java index e5192f99..d5448ca3 100644 --- a/src/main/java/appeng/parts/PartPlacement.java +++ b/src/main/java/appeng/parts/PartPlacement.java @@ -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; } diff --git a/src/main/java/appeng/parts/automation/PartAnnihilationPlane.java b/src/main/java/appeng/parts/automation/PartAnnihilationPlane.java index 72967424..914e80e8 100644 --- a/src/main/java/appeng/parts/automation/PartAnnihilationPlane.java +++ b/src/main/java/appeng/parts/automation/PartAnnihilationPlane.java @@ -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(); diff --git a/src/main/java/appeng/parts/automation/PartExportBus.java b/src/main/java/appeng/parts/automation/PartExportBus.java index 3c6fe7fc..78668663 100644 --- a/src/main/java/appeng/parts/automation/PartExportBus.java +++ b/src/main/java/appeng/parts/automation/PartExportBus.java @@ -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 ); diff --git a/src/main/java/appeng/parts/automation/PartImportBus.java b/src/main/java/appeng/parts/automation/PartImportBus.java index 3686a6d0..a1be7c1f 100644 --- a/src/main/java/appeng/parts/automation/PartImportBus.java +++ b/src/main/java/appeng/parts/automation/PartImportBus.java @@ -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; diff --git a/src/main/java/appeng/parts/automation/PartUpgradeable.java b/src/main/java/appeng/parts/automation/PartUpgradeable.java index 61ffe6ea..1f17d3dd 100644 --- a/src/main/java/appeng/parts/automation/PartUpgradeable.java +++ b/src/main/java/appeng/parts/automation/PartUpgradeable.java @@ -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 ); diff --git a/src/main/java/appeng/parts/misc/PartInterface.java b/src/main/java/appeng/parts/misc/PartInterface.java index 846c5ba5..29528171 100644 --- a/src/main/java/appeng/parts/misc/PartInterface.java +++ b/src/main/java/appeng/parts/misc/PartInterface.java @@ -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 { diff --git a/src/main/java/appeng/parts/p2p/PartP2PItems.java b/src/main/java/appeng/parts/p2p/PartP2PItems.java index a4c7d290..f76ae29e 100644 --- a/src/main/java/appeng/parts/p2p/PartP2PItems.java +++ b/src/main/java/appeng/parts/p2p/PartP2PItems.java @@ -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 implements IPipeConnection, IInventory, ISidedInventory, IGridTickable +public class PartP2PItems extends PartP2PTunnel implements IPipeConnection, ISidedInventory, IGridTickable { @Override diff --git a/src/main/java/appeng/parts/p2p/PartP2PRFPower.java b/src/main/java/appeng/parts/p2p/PartP2PRFPower.java index 158bc720..e1103258 100644 --- a/src/main/java/appeng/parts/p2p/PartP2PRFPower.java +++ b/src/main/java/appeng/parts/p2p/PartP2PRFPower.java @@ -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; diff --git a/src/main/java/appeng/parts/reporting/PartCraftingTerminal.java b/src/main/java/appeng/parts/reporting/PartCraftingTerminal.java index 544ea1c7..ee753af6 100644 --- a/src/main/java/appeng/parts/reporting/PartCraftingTerminal.java +++ b/src/main/java/appeng/parts/reporting/PartCraftingTerminal.java @@ -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 ); diff --git a/src/main/java/appeng/parts/reporting/PartPatternTerminal.java b/src/main/java/appeng/parts/reporting/PartPatternTerminal.java index dc5d8919..1b44c4f3 100644 --- a/src/main/java/appeng/parts/reporting/PartPatternTerminal.java +++ b/src/main/java/appeng/parts/reporting/PartPatternTerminal.java @@ -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 ); diff --git a/src/main/java/appeng/spatial/StorageChunkProvider.java b/src/main/java/appeng/spatial/StorageChunkProvider.java index 190b0681..0057b7f1 100644 --- a/src/main/java/appeng/spatial/StorageChunkProvider.java +++ b/src/main/java/appeng/spatial/StorageChunkProvider.java @@ -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; diff --git a/src/main/java/appeng/tile/crafting/TileMolecularAssembler.java b/src/main/java/appeng/tile/crafting/TileMolecularAssembler.java index 3b7dae44..bd4802b7 100644 --- a/src/main/java/appeng/tile/crafting/TileMolecularAssembler.java +++ b/src/main/java/appeng/tile/crafting/TileMolecularAssembler.java @@ -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 ); } diff --git a/src/main/java/appeng/tile/events/AETileEventHandler.java b/src/main/java/appeng/tile/events/AETileEventHandler.java index 7d6e935d..e91a99fb 100644 --- a/src/main/java/appeng/tile/events/AETileEventHandler.java +++ b/src/main/java/appeng/tile/events/AETileEventHandler.java @@ -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 { diff --git a/src/main/java/appeng/tile/grindstone/TileCrank.java b/src/main/java/appeng/tile/grindstone/TileCrank.java index 7bda6b86..6218e512 100644 --- a/src/main/java/appeng/tile/grindstone/TileCrank.java +++ b/src/main/java/appeng/tile/grindstone/TileCrank.java @@ -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 ); } diff --git a/src/main/java/appeng/tile/misc/TileCellWorkbench.java b/src/main/java/appeng/tile/misc/TileCellWorkbench.java index e6d3e48e..3b4bf9dc 100644 --- a/src/main/java/appeng/tile/misc/TileCellWorkbench.java +++ b/src/main/java/appeng/tile/misc/TileCellWorkbench.java @@ -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 ); diff --git a/src/main/java/appeng/tile/misc/TileCharger.java b/src/main/java/appeng/tile/misc/TileCharger.java index 8676ce18..3c5ffa08 100644 --- a/src/main/java/appeng/tile/misc/TileCharger.java +++ b/src/main/java/appeng/tile/misc/TileCharger.java @@ -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 { diff --git a/src/main/java/appeng/tile/misc/TileCondenser.java b/src/main/java/appeng/tile/misc/TileCondenser.java index a512f131..e0697105 100644 --- a/src/main/java/appeng/tile/misc/TileCondenser.java +++ b/src/main/java/appeng/tile/misc/TileCondenser.java @@ -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 }; diff --git a/src/main/java/appeng/tile/misc/TileInterface.java b/src/main/java/appeng/tile/misc/TileInterface.java index ea210cc5..653e4210 100644 --- a/src/main/java/appeng/tile/misc/TileInterface.java +++ b/src/main/java/appeng/tile/misc/TileInterface.java @@ -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; diff --git a/src/main/java/appeng/tile/misc/TilePaint.java b/src/main/java/appeng/tile/misc/TilePaint.java index 623a4829..0b59d9f8 100644 --- a/src/main/java/appeng/tile/misc/TilePaint.java +++ b/src/main/java/appeng/tile/misc/TilePaint.java @@ -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; diff --git a/src/main/java/appeng/tile/misc/TileQuartzGrowthAccelerator.java b/src/main/java/appeng/tile/misc/TileQuartzGrowthAccelerator.java index 2aaf8014..e0999df8 100644 --- a/src/main/java/appeng/tile/misc/TileQuartzGrowthAccelerator.java +++ b/src/main/java/appeng/tile/misc/TileQuartzGrowthAccelerator.java @@ -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 { diff --git a/src/main/java/appeng/tile/misc/TileSecurity.java b/src/main/java/appeng/tile/misc/TileSecurity.java index fd2d4995..090ee2ed 100644 --- a/src/main/java/appeng/tile/misc/TileSecurity.java +++ b/src/main/java/appeng/tile/misc/TileSecurity.java @@ -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() ); diff --git a/src/main/java/appeng/tile/misc/TileVibrationChamber.java b/src/main/java/appeng/tile/misc/TileVibrationChamber.java index 6ee04f3f..4b9913c7 100644 --- a/src/main/java/appeng/tile/misc/TileVibrationChamber.java +++ b/src/main/java/appeng/tile/misc/TileVibrationChamber.java @@ -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 ); } diff --git a/src/main/java/appeng/tile/networking/TileController.java b/src/main/java/appeng/tile/networking/TileController.java index 5bff5913..4a089ca1 100644 --- a/src/main/java/appeng/tile/networking/TileController.java +++ b/src/main/java/appeng/tile/networking/TileController.java @@ -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; diff --git a/src/main/java/appeng/tile/networking/TileWireless.java b/src/main/java/appeng/tile/networking/TileWireless.java index 798e7df4..1409a464 100644 --- a/src/main/java/appeng/tile/networking/TileWireless.java +++ b/src/main/java/appeng/tile/networking/TileWireless.java @@ -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; diff --git a/src/main/java/appeng/tile/qnb/TileQuantumBridge.java b/src/main/java/appeng/tile/qnb/TileQuantumBridge.java index 290ee293..a7310968 100644 --- a/src/main/java/appeng/tile/qnb/TileQuantumBridge.java +++ b/src/main/java/appeng/tile/qnb/TileQuantumBridge.java @@ -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(); diff --git a/src/main/java/appeng/tile/spatial/TileSpatialIOPort.java b/src/main/java/appeng/tile/spatial/TileSpatialIOPort.java index 8b8e23ec..3a267ab4 100644 --- a/src/main/java/appeng/tile/spatial/TileSpatialIOPort.java +++ b/src/main/java/appeng/tile/spatial/TileSpatialIOPort.java @@ -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; diff --git a/src/main/java/appeng/tile/spatial/TileSpatialPylon.java b/src/main/java/appeng/tile/spatial/TileSpatialPylon.java index 9fd9181c..076bdbee 100644 --- a/src/main/java/appeng/tile/spatial/TileSpatialPylon.java +++ b/src/main/java/appeng/tile/spatial/TileSpatialPylon.java @@ -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 ); } diff --git a/src/main/java/appeng/tile/storage/TileChest.java b/src/main/java/appeng/tile/storage/TileChest.java index d9aed088..6f0548b1 100644 --- a/src/main/java/appeng/tile/storage/TileChest.java +++ b/src/main/java/appeng/tile/storage/TileChest.java @@ -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; diff --git a/src/main/java/appeng/tile/storage/TileDrive.java b/src/main/java/appeng/tile/storage/TileDrive.java index 36055c85..2a7cb95f 100644 --- a/src/main/java/appeng/tile/storage/TileDrive.java +++ b/src/main/java/appeng/tile/storage/TileDrive.java @@ -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(); diff --git a/src/main/java/appeng/tile/storage/TileSkyChest.java b/src/main/java/appeng/tile/storage/TileSkyChest.java index 515c57dd..8ea95c6a 100644 --- a/src/main/java/appeng/tile/storage/TileSkyChest.java +++ b/src/main/java/appeng/tile/storage/TileSkyChest.java @@ -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; diff --git a/src/main/java/appeng/util/inv/WrapperMCISidedInventory.java b/src/main/java/appeng/util/inv/WrapperMCISidedInventory.java index 237adb53..a1a55d41 100644 --- a/src/main/java/appeng/util/inv/WrapperMCISidedInventory.java +++ b/src/main/java/appeng/util/inv/WrapperMCISidedInventory.java @@ -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; diff --git a/src/main/java/appeng/util/item/AEStack.java b/src/main/java/appeng/util/item/AEStack.java index dde555bc..905efc3d 100644 --- a/src/main/java/appeng/util/item/AEStack.java +++ b/src/main/java/appeng/util/item/AEStack.java @@ -92,7 +92,7 @@ public abstract class AEStack implements IAEStack implements IAEStack