commit
cbaff9cd64
91 changed files with 204 additions and 595 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
@ -123,8 +122,6 @@ 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;
|
||||
|
@ -135,11 +132,6 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
NetworkHandler.instance.sendToServer( p );
|
||||
}
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -193,17 +185,10 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
return;
|
||||
|
||||
if ( action != null )
|
||||
{
|
||||
try
|
||||
{
|
||||
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -234,17 +219,10 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
action = ctrlDown == 1 ? InventoryAction.CRAFT_STACK : InventoryAction.CRAFT_ITEM;
|
||||
|
||||
if ( action != null )
|
||||
{
|
||||
try
|
||||
{
|
||||
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -257,8 +235,6 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
if ( slot instanceof SlotME )
|
||||
stack = ((SlotME) slot).getAEStack();
|
||||
|
||||
try
|
||||
{
|
||||
int slotNum = inventorySlots.inventorySlots.size();
|
||||
|
||||
if ( !(slot instanceof SlotME) && slot != null )
|
||||
|
@ -267,11 +243,6 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
((AEBaseContainer) inventorySlots).setTargetStack( stack );
|
||||
PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, slotNum, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -304,17 +275,10 @@ 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 );
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -361,18 +325,11 @@ 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 );
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -423,8 +380,6 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
{
|
||||
drag_click.add( slot );
|
||||
if ( drag_click.size() > 1 )
|
||||
{
|
||||
try
|
||||
{
|
||||
for (Slot dr : drag_click)
|
||||
{
|
||||
|
@ -433,11 +388,6 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
NetworkHandler.instance.sendToServer( p );
|
||||
}
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
super.mouseClickMove( x, y, c, d );
|
||||
|
@ -485,8 +435,6 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
for (Slot s : (List<Slot>) inventorySlots.inventorySlots)
|
||||
{
|
||||
|
@ -497,11 +445,6 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
}
|
||||
}
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
@ -25,16 +22,9 @@ public class GuiChest extends AEBaseGui
|
|||
super.actionPerformed( par1GuiButton );
|
||||
|
||||
if ( par1GuiButton == priority )
|
||||
{
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -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;
|
||||
|
@ -41,16 +38,9 @@ public class GuiCondenser extends AEBaseGui
|
|||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if ( mode == btn )
|
||||
{
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( Settings.CONDENSER_OUTPUT, backwards ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -146,16 +146,9 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||
}
|
||||
|
||||
if ( btn == cancel )
|
||||
{
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
|
||||
if ( btn == start )
|
||||
{
|
||||
|
|
|
@ -87,16 +87,9 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
|||
}
|
||||
|
||||
if ( btn == originalGuiBtn )
|
||||
{
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -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,16 +46,9 @@ 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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
@ -25,16 +22,9 @@ public class GuiDrive extends AEBaseGui
|
|||
super.actionPerformed( par1GuiButton );
|
||||
|
||||
if ( par1GuiButton == priority )
|
||||
{
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -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;
|
||||
|
@ -52,16 +49,9 @@ public class GuiFormationPlane extends GuiUpgradeable
|
|||
super.actionPerformed( btn );
|
||||
|
||||
if ( btn == priority )
|
||||
{
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -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,19 +71,12 @@ public class GuiIOPort extends GuiUpgradeable
|
|||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
try
|
||||
{
|
||||
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 );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBackground()
|
||||
|
|
|
@ -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;
|
||||
|
@ -41,30 +38,15 @@ public class GuiInterface extends GuiUpgradeable
|
|||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if ( btn == priority )
|
||||
{
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
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 );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 == levelMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( levelMode.getSetting(), backwards ) );
|
||||
}
|
||||
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;
|
||||
|
|
|
@ -286,16 +286,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||
protected void actionPerformed(GuiButton btn)
|
||||
{
|
||||
if ( btn == craftingStatusBtn )
|
||||
{
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_CRAFTING_STATUS ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
|
||||
if ( btn instanceof GuiImgButton )
|
||||
{
|
||||
|
|
|
@ -118,16 +118,9 @@ public class GuiPriority extends AEBaseGui
|
|||
super.actionPerformed( btn );
|
||||
|
||||
if ( btn == originalGuiBtn )
|
||||
{
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
|
||||
}
|
||||
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;
|
||||
|
|
|
@ -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,8 +67,6 @@ public class GuiUpgradeable extends AEBaseGui
|
|||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
try
|
||||
{
|
||||
if ( btn == redstoneMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( redstoneMode.getSetting(), backwards ) );
|
||||
|
||||
|
@ -80,12 +75,6 @@ public class GuiUpgradeable extends AEBaseGui
|
|||
|
||||
if ( btn == fuzzyMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( fuzzyMode.getSetting(), backwards ) );
|
||||
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean hasToolbox()
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -296,15 +296,8 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
|||
ICraftingLink g = cc.submitJob( result, null, selectedCpu == -1 ? null : cpus.get( selectedCpu ).cpu, true, getActionSrc() );
|
||||
autoStart = false;
|
||||
if ( g != null && OriginalGui != null && openContext != null )
|
||||
{
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance.sendTo( new PacketSwitchGuis( OriginalGui ), (EntityPlayerMP) invPlayer.player );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
// :(
|
||||
}
|
||||
|
||||
TileEntity te = openContext.getTile();
|
||||
Platform.openGUI( invPlayer.player, te, openContext.side, OriginalGui );
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
String[] values = new String[storageCellDims.size()];
|
||||
|
||||
|
@ -292,16 +284,9 @@ public class WorldSettings extends Configuration
|
|||
if ( manager != null )
|
||||
{
|
||||
for (int newDim : get( "DimensionManager", "StorageCells", new int[0] ).getIntList())
|
||||
{
|
||||
try
|
||||
{
|
||||
manager.scheduleOutboundPacket( (new PacketNewStorageDimension( newDim )).getProxy() );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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() );
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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() );
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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() );
|
||||
|
|
|
@ -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() )
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,14 +146,8 @@ 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)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSpawnData(ByteBuf data)
|
||||
|
|
|
@ -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[] {
|
||||
|
|
|
@ -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,15 +113,8 @@ public class FMPEvent
|
|||
else
|
||||
{
|
||||
player.swingItem();
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketMultiPart() );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 };
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
@ -91,16 +89,8 @@ 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 );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
@ -96,16 +94,9 @@ 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 );
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package appeng.items.tools.powered;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -29,8 +28,6 @@ public class ToolChargedStaff extends AEBasePoweredItem
|
|||
{
|
||||
extractAEPower( item, 300 );
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
try
|
||||
{
|
||||
for (int x = 0; x < 2; x++)
|
||||
{
|
||||
|
@ -40,11 +37,6 @@ public class ToolChargedStaff extends AEBasePoweredItem
|
|||
ServerHelper.proxy.sendToAllNearExcept( null, dx, dy, dz, 32.0, target.worldObj, new PacketLightning( dx, dy, dz ) );
|
||||
}
|
||||
}
|
||||
catch (IOException ignored)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
target.attackEntityFrom( DamageSource.magic, 6 );
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ import java.util.List;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.networking.IGrid;
|
||||
import appeng.api.networking.IGridCache;
|
||||
import appeng.api.networking.IGridHost;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.IGridStorage;
|
||||
|
@ -19,7 +18,7 @@ import appeng.api.networking.security.ISecurityProvider;
|
|||
import appeng.core.WorldSettings;
|
||||
import appeng.me.GridNode;
|
||||
|
||||
public class SecurityCache implements IGridCache, ISecurityGrid
|
||||
public class SecurityCache implements ISecurityGrid
|
||||
{
|
||||
|
||||
final private List<ISecurityProvider> securityProvider = new ArrayList<ISecurityProvider>();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
@ -19,19 +18,12 @@ public class CreativeCellInventory implements IMEInventoryHandler<IAEItemStack>
|
|||
final IItemList<IAEItemStack> itemListCache = AEApi.instance().storage().createItemList();
|
||||
|
||||
public static IMEInventoryHandler getCell(ItemStack o)
|
||||
{
|
||||
try
|
||||
{
|
||||
return new CellInventoryHandler( new CreativeCellInventory( o ) );
|
||||
}
|
||||
catch (AppEngException ignored)
|
||||
|
||||
protected CreativeCellInventory(ItemStack o)
|
||||
{
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
protected CreativeCellInventory(ItemStack o) throws AppEngException {
|
||||
CellConfig cc = new CellConfig( o );
|
||||
for (ItemStack is : cc)
|
||||
if ( is != null )
|
||||
|
|
|
@ -14,7 +14,6 @@ import appeng.api.config.Actionable;
|
|||
import appeng.api.config.StorageFilter;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.networking.ticking.TickRateModulation;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.IMEMonitor;
|
||||
import appeng.api.storage.IMEMonitorHandlerReceiver;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
|
@ -24,7 +23,7 @@ import appeng.util.InventoryAdaptor;
|
|||
import appeng.util.Platform;
|
||||
import appeng.util.inv.ItemSlot;
|
||||
|
||||
public class MEMonitorIInventory implements IMEInventory<IAEItemStack>, IMEMonitor<IAEItemStack>
|
||||
public class MEMonitorIInventory implements IMEMonitor<IAEItemStack>
|
||||
{
|
||||
|
||||
static class CachedItemStack
|
||||
|
|
|
@ -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;
|
||||
|
@ -80,16 +78,9 @@ public class PartPlacement
|
|||
boolean supportedItem = AEApi.instance().items().itemMemoryCard.sameAsStack( held )
|
||||
|| 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( event.action == Action.RIGHT_CLICK_BLOCK && event.entityPlayer.worldObj.isRemote )
|
||||
|
@ -171,15 +162,8 @@ public class PartPlacement
|
|||
else
|
||||
{
|
||||
player.swingItem();
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -225,16 +209,9 @@ 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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -261,16 +238,9 @@ public class PartPlacement
|
|||
if ( sPart.part.onShiftActivate( player, mop.hitVec ) )
|
||||
{
|
||||
if ( world.isRemote )
|
||||
{
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
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 );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -409,15 +372,8 @@ public class PartPlacement
|
|||
else
|
||||
{
|
||||
player.swingItem();
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
for (ItemStack snaggedItem : out)
|
||||
{
|
||||
|
@ -392,16 +383,9 @@ 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 );
|
||||
}
|
||||
|
||||
Buffer.add( stack );
|
||||
storeBuffer();
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@Interface(iface = "buildcraft.api.transport.IPipeConnection", iname = "BC")
|
||||
public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements IPipeConnection, IInventory, ISidedInventory, IGridTickable
|
||||
public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements IPipeConnection, ISidedInventory, IGridTickable
|
||||
{
|
||||
|
||||
@Override
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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 };
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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() );
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -92,7 +92,7 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
|
|||
countRequestable += i;
|
||||
}
|
||||
|
||||
void putPacketValue(ByteBuf tag, long num) throws IOException
|
||||
void putPacketValue(ByteBuf tag, long num)
|
||||
{
|
||||
if ( num <= 255 )
|
||||
tag.writeByte( (byte) (num + Byte.MIN_VALUE) );
|
||||
|
@ -104,7 +104,7 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
|
|||
tag.writeLong( num );
|
||||
}
|
||||
|
||||
static long getPacketValue(byte type, ByteBuf tag) throws IOException
|
||||
static long getPacketValue(byte type, ByteBuf tag)
|
||||
{
|
||||
if ( type == 0 )
|
||||
{
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 38dd8952cea1985838347f741b895368d41948e3
|
||||
Subproject commit b0a451fecd97583367e12a98439dafac29e7ae97
|
Loading…
Reference in a new issue