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.Entity;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
import appeng.block.AEBaseBlock;
|
import appeng.block.AEBaseBlock;
|
||||||
|
|
|
@ -13,7 +13,6 @@ import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import appeng.container.slot.*;
|
import appeng.container.slot.*;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.Gui;
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.client.renderer.RenderHelper;
|
import net.minecraft.client.renderer.RenderHelper;
|
||||||
|
@ -124,20 +123,13 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
IAEItemStack item = ((SlotME) slot).getAEStack();
|
IAEItemStack item = ((SlotME) slot).getAEStack();
|
||||||
if ( item != null )
|
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 );
|
PacketInventoryAction p = new PacketInventoryAction( direction, inventorySlots.inventorySlots.size(), 0 );
|
||||||
InventoryAction direction = wheel > 0 ? InventoryAction.ROLL_DOWN : InventoryAction.ROLL_UP;
|
NetworkHandler.instance.sendToServer( p );
|
||||||
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 );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,15 +186,8 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
|
|
||||||
if ( action != null )
|
if ( action != null )
|
||||||
{
|
{
|
||||||
try
|
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
||||||
{
|
NetworkHandler.instance.sendToServer( p );
|
||||||
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
|
||||||
NetworkHandler.instance.sendToServer( p );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -235,15 +220,8 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
|
|
||||||
if ( action != null )
|
if ( action != null )
|
||||||
{
|
{
|
||||||
try
|
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
||||||
{
|
NetworkHandler.instance.sendToServer( p );
|
||||||
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
|
||||||
NetworkHandler.instance.sendToServer( p );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -257,21 +235,14 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
if ( slot instanceof SlotME )
|
if ( slot instanceof SlotME )
|
||||||
stack = ((SlotME) slot).getAEStack();
|
stack = ((SlotME) slot).getAEStack();
|
||||||
|
|
||||||
try
|
int slotNum = inventorySlots.inventorySlots.size();
|
||||||
{
|
|
||||||
int slotNum = inventorySlots.inventorySlots.size();
|
|
||||||
|
|
||||||
if ( !(slot instanceof SlotME) && slot != null )
|
if ( !(slot instanceof SlotME) && slot != null )
|
||||||
slotNum = slot.slotNumber;
|
slotNum = slot.slotNumber;
|
||||||
|
|
||||||
((AEBaseContainer) inventorySlots).setTargetStack( stack );
|
((AEBaseContainer) inventorySlots).setTargetStack( stack );
|
||||||
PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, slotNum, 0 );
|
PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, slotNum, 0 );
|
||||||
NetworkHandler.instance.sendToServer( p );
|
NetworkHandler.instance.sendToServer( p );
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -305,15 +276,8 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
|
|
||||||
if ( action != null )
|
if ( action != null )
|
||||||
{
|
{
|
||||||
try
|
PacketInventoryAction p = new PacketInventoryAction( action, slot.getSlotIndex(), ((SlotDisconnected) slot).mySlot.id );
|
||||||
{
|
NetworkHandler.instance.sendToServer( p );
|
||||||
PacketInventoryAction p = new PacketInventoryAction( action, slot.getSlotIndex(), ((SlotDisconnected) slot).mySlot.id );
|
|
||||||
NetworkHandler.instance.sendToServer( p );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -362,16 +326,9 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
|
|
||||||
if ( action != null )
|
if ( action != null )
|
||||||
{
|
{
|
||||||
try
|
((AEBaseContainer) inventorySlots).setTargetStack( stack );
|
||||||
{
|
PacketInventoryAction p = new PacketInventoryAction( action, inventorySlots.inventorySlots.size(), 0 );
|
||||||
((AEBaseContainer) inventorySlots).setTargetStack( stack );
|
NetworkHandler.instance.sendToServer( p );
|
||||||
PacketInventoryAction p = new PacketInventoryAction( action, inventorySlots.inventorySlots.size(), 0 );
|
|
||||||
NetworkHandler.instance.sendToServer( p );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -424,18 +381,11 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
drag_click.add( slot );
|
drag_click.add( slot );
|
||||||
if ( drag_click.size() > 1 )
|
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 );
|
||||||
PacketInventoryAction p = new PacketInventoryAction( c == 0 ? InventoryAction.PICKUP_OR_SET_DOWN : InventoryAction.PLACE_SINGLE,
|
NetworkHandler.instance.sendToServer( p );
|
||||||
dr.slotNumber, 0 );
|
|
||||||
NetworkHandler.instance.sendToServer( p );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -486,21 +436,14 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
try
|
for (Slot s : (List<Slot>) inventorySlots.inventorySlots)
|
||||||
{
|
{
|
||||||
for (Slot s : (List<Slot>) inventorySlots.inventorySlots)
|
if ( s.getSlotIndex() == j && s.inventory == ((AEBaseContainer) inventorySlots).getPlayerInv() )
|
||||||
{
|
{
|
||||||
if ( s.getSlotIndex() == j && s.inventory == ((AEBaseContainer) inventorySlots).getPlayerInv() )
|
NetworkHandler.instance.sendToServer( new PacketSwapSlots( s.slotNumber, theSlot.slotNumber ) );
|
||||||
{
|
return true;
|
||||||
NetworkHandler.instance.sendToServer( new PacketSwapSlots( s.slotNumber, theSlot.slotNumber ) );
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
package appeng.client.gui.implementations;
|
package appeng.client.gui.implementations;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import appeng.client.gui.AEBaseGui;
|
import appeng.client.gui.AEBaseGui;
|
||||||
import appeng.client.gui.widgets.GuiTabButton;
|
import appeng.client.gui.widgets.GuiTabButton;
|
||||||
import appeng.container.implementations.ContainerChest;
|
import appeng.container.implementations.ContainerChest;
|
||||||
import appeng.core.AELog;
|
|
||||||
import appeng.core.localization.GuiText;
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.core.sync.GuiBridge;
|
import appeng.core.sync.GuiBridge;
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
import appeng.core.sync.network.NetworkHandler;
|
||||||
|
@ -26,14 +23,7 @@ public class GuiChest extends AEBaseGui
|
||||||
|
|
||||||
if ( par1GuiButton == priority )
|
if ( par1GuiButton == priority )
|
||||||
{
|
{
|
||||||
try
|
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||||
{
|
|
||||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package appeng.client.gui.implementations;
|
package appeng.client.gui.implementations;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
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;
|
||||||
import appeng.client.gui.widgets.GuiProgressBar.Direction;
|
import appeng.client.gui.widgets.GuiProgressBar.Direction;
|
||||||
import appeng.container.implementations.ContainerCondenser;
|
import appeng.container.implementations.ContainerCondenser;
|
||||||
import appeng.core.AELog;
|
|
||||||
import appeng.core.localization.GuiText;
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
import appeng.core.sync.network.NetworkHandler;
|
||||||
import appeng.core.sync.packets.PacketConfigButton;
|
import appeng.core.sync.packets.PacketConfigButton;
|
||||||
|
@ -42,14 +39,7 @@ public class GuiCondenser extends AEBaseGui
|
||||||
|
|
||||||
if ( mode == btn )
|
if ( mode == btn )
|
||||||
{
|
{
|
||||||
try
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( Settings.CONDENSER_OUTPUT, backwards ) );
|
||||||
{
|
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( Settings.CONDENSER_OUTPUT, backwards ) );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package appeng.client.gui.implementations;
|
package appeng.client.gui.implementations;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -13,7 +11,6 @@ import appeng.client.gui.widgets.GuiTabButton;
|
||||||
import appeng.container.AEBaseContainer;
|
import appeng.container.AEBaseContainer;
|
||||||
import appeng.container.implementations.ContainerCraftAmount;
|
import appeng.container.implementations.ContainerCraftAmount;
|
||||||
import appeng.core.AEConfig;
|
import appeng.core.AEConfig;
|
||||||
import appeng.core.AELog;
|
|
||||||
import appeng.core.localization.GuiText;
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.core.sync.GuiBridge;
|
import appeng.core.sync.GuiBridge;
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
import appeng.core.sync.network.NetworkHandler;
|
||||||
|
@ -126,10 +123,6 @@ public class GuiCraftAmount extends AEBaseGui
|
||||||
// nope..
|
// nope..
|
||||||
amountToCraft.setText( "1" );
|
amountToCraft.setText( "1" );
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean isPlus = btn == plus1 || btn == plus10 || btn == plus100 || btn == plus1000;
|
boolean isPlus = btn == plus1 || btn == plus10 || btn == plus100 || btn == plus1000;
|
||||||
boolean isMinus = btn == minus1 || btn == minus10 || btn == minus100 || btn == minus1000;
|
boolean isMinus = btn == minus1 || btn == minus10 || btn == minus100 || btn == minus1000;
|
||||||
|
|
|
@ -147,14 +147,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||||
|
|
||||||
if ( btn == cancel )
|
if ( btn == cancel )
|
||||||
{
|
{
|
||||||
try
|
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
|
||||||
{
|
|
||||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( btn == start )
|
if ( btn == start )
|
||||||
|
|
|
@ -88,14 +88,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||||
|
|
||||||
if ( btn == originalGuiBtn )
|
if ( btn == originalGuiBtn )
|
||||||
{
|
{
|
||||||
try
|
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
|
||||||
{
|
|
||||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package appeng.client.gui.implementations;
|
package appeng.client.gui.implementations;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
|
@ -12,7 +10,6 @@ import appeng.api.storage.ITerminalHost;
|
||||||
import appeng.client.gui.widgets.GuiImgButton;
|
import appeng.client.gui.widgets.GuiImgButton;
|
||||||
import appeng.container.implementations.ContainerCraftingTerm;
|
import appeng.container.implementations.ContainerCraftingTerm;
|
||||||
import appeng.container.slot.SlotCraftingMatrix;
|
import appeng.container.slot.SlotCraftingMatrix;
|
||||||
import appeng.core.AELog;
|
|
||||||
import appeng.core.localization.GuiText;
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
import appeng.core.sync.network.NetworkHandler;
|
||||||
import appeng.core.sync.packets.PacketInventoryAction;
|
import appeng.core.sync.packets.PacketInventoryAction;
|
||||||
|
@ -49,15 +46,8 @@ public class GuiCraftingTerm extends GuiMEMonitorable
|
||||||
if ( s != null )
|
if ( s != null )
|
||||||
{
|
{
|
||||||
PacketInventoryAction p;
|
PacketInventoryAction p;
|
||||||
try
|
p = new PacketInventoryAction( InventoryAction.MOVE_REGION, s.slotNumber, 0 );
|
||||||
{
|
NetworkHandler.instance.sendToServer( p );
|
||||||
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;
|
package appeng.client.gui.implementations;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import appeng.client.gui.AEBaseGui;
|
import appeng.client.gui.AEBaseGui;
|
||||||
import appeng.client.gui.widgets.GuiTabButton;
|
import appeng.client.gui.widgets.GuiTabButton;
|
||||||
import appeng.container.implementations.ContainerDrive;
|
import appeng.container.implementations.ContainerDrive;
|
||||||
import appeng.core.AELog;
|
|
||||||
import appeng.core.localization.GuiText;
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.core.sync.GuiBridge;
|
import appeng.core.sync.GuiBridge;
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
import appeng.core.sync.network.NetworkHandler;
|
||||||
|
@ -26,14 +23,7 @@ public class GuiDrive extends AEBaseGui
|
||||||
|
|
||||||
if ( par1GuiButton == priority )
|
if ( par1GuiButton == priority )
|
||||||
{
|
{
|
||||||
try
|
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||||
{
|
|
||||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package appeng.client.gui.implementations;
|
package appeng.client.gui.implementations;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import appeng.api.config.FuzzyMode;
|
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.GuiImgButton;
|
||||||
import appeng.client.gui.widgets.GuiTabButton;
|
import appeng.client.gui.widgets.GuiTabButton;
|
||||||
import appeng.container.implementations.ContainerFormationPlane;
|
import appeng.container.implementations.ContainerFormationPlane;
|
||||||
import appeng.core.AELog;
|
|
||||||
import appeng.core.localization.GuiText;
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.core.sync.GuiBridge;
|
import appeng.core.sync.GuiBridge;
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
import appeng.core.sync.network.NetworkHandler;
|
||||||
|
@ -53,14 +50,7 @@ public class GuiFormationPlane extends GuiUpgradeable
|
||||||
|
|
||||||
if ( btn == priority )
|
if ( btn == priority )
|
||||||
{
|
{
|
||||||
try
|
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||||
{
|
|
||||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package appeng.client.gui.implementations;
|
package appeng.client.gui.implementations;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
|
||||||
|
@ -14,7 +12,6 @@ import appeng.api.config.RedstoneMode;
|
||||||
import appeng.api.config.Settings;
|
import appeng.api.config.Settings;
|
||||||
import appeng.client.gui.widgets.GuiImgButton;
|
import appeng.client.gui.widgets.GuiImgButton;
|
||||||
import appeng.container.implementations.ContainerIOPort;
|
import appeng.container.implementations.ContainerIOPort;
|
||||||
import appeng.core.AELog;
|
|
||||||
import appeng.core.localization.GuiText;
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
import appeng.core.sync.network.NetworkHandler;
|
||||||
import appeng.core.sync.packets.PacketConfigButton;
|
import appeng.core.sync.packets.PacketConfigButton;
|
||||||
|
@ -74,18 +71,11 @@ public class GuiIOPort extends GuiUpgradeable
|
||||||
|
|
||||||
boolean backwards = Mouse.isButtonDown( 1 );
|
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 )
|
if ( btn == operationMode )
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( operationMode.getSetting(), backwards ) );
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( operationMode.getSetting(), backwards ) );
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package appeng.client.gui.implementations;
|
package appeng.client.gui.implementations;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
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.GuiTabButton;
|
||||||
import appeng.client.gui.widgets.GuiToggleButton;
|
import appeng.client.gui.widgets.GuiToggleButton;
|
||||||
import appeng.container.implementations.ContainerInterface;
|
import appeng.container.implementations.ContainerInterface;
|
||||||
import appeng.core.AELog;
|
|
||||||
import appeng.core.localization.GuiText;
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.core.sync.GuiBridge;
|
import appeng.core.sync.GuiBridge;
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
import appeng.core.sync.network.NetworkHandler;
|
||||||
|
@ -42,29 +39,14 @@ public class GuiInterface extends GuiUpgradeable
|
||||||
|
|
||||||
if ( btn == priority )
|
if ( btn == priority )
|
||||||
{
|
{
|
||||||
try
|
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||||
{
|
|
||||||
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 == interfaceMode )
|
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( Settings.INTERFACE_TERMINAL, backwards ) );
|
|
||||||
|
|
||||||
if ( btn == BlockMode )
|
if ( btn == BlockMode )
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( BlockMode.getSetting(), backwards ) );
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( BlockMode.getSetting(), backwards ) );
|
||||||
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -11,7 +11,6 @@ import java.util.WeakHashMap;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.inventory.Slot;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
|
||||||
|
|
|
@ -89,18 +89,11 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||||
|
|
||||||
boolean backwards = Mouse.isButtonDown( 1 );
|
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 )
|
if ( btn == levelMode )
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( levelMode.getSetting(), backwards ) );
|
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 isPlus = btn == plus1 || btn == plus10 || btn == plus100 || btn == plus1000;
|
||||||
boolean isMinus = btn == minus1 || btn == minus10 || btn == minus100 || btn == minus1000;
|
boolean isMinus = btn == minus1 || btn == minus10 || btn == minus100 || btn == minus1000;
|
||||||
|
|
|
@ -287,14 +287,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||||
{
|
{
|
||||||
if ( btn == craftingStatusBtn )
|
if ( btn == craftingStatusBtn )
|
||||||
{
|
{
|
||||||
try
|
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_CRAFTING_STATUS ) );
|
||||||
{
|
|
||||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_CRAFTING_STATUS ) );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( btn instanceof GuiImgButton )
|
if ( btn instanceof GuiImgButton )
|
||||||
|
|
|
@ -119,14 +119,7 @@ public class GuiPriority extends AEBaseGui
|
||||||
|
|
||||||
if ( btn == originalGuiBtn )
|
if ( btn == originalGuiBtn )
|
||||||
{
|
{
|
||||||
try
|
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
|
||||||
{
|
|
||||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isPlus = btn == plus1 || btn == plus10 || btn == plus100 || btn == plus1000;
|
boolean isPlus = btn == plus1 || btn == plus10 || btn == plus100 || btn == plus1000;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package appeng.client.gui.implementations;
|
package appeng.client.gui.implementations;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
|
||||||
|
@ -16,7 +14,6 @@ import appeng.api.implementations.IUpgradeableHost;
|
||||||
import appeng.client.gui.AEBaseGui;
|
import appeng.client.gui.AEBaseGui;
|
||||||
import appeng.client.gui.widgets.GuiImgButton;
|
import appeng.client.gui.widgets.GuiImgButton;
|
||||||
import appeng.container.implementations.ContainerUpgradeable;
|
import appeng.container.implementations.ContainerUpgradeable;
|
||||||
import appeng.core.AELog;
|
|
||||||
import appeng.core.localization.GuiText;
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
import appeng.core.sync.network.NetworkHandler;
|
||||||
import appeng.core.sync.packets.PacketConfigButton;
|
import appeng.core.sync.packets.PacketConfigButton;
|
||||||
|
@ -70,22 +67,14 @@ public class GuiUpgradeable extends AEBaseGui
|
||||||
|
|
||||||
boolean backwards = Mouse.isButtonDown( 1 );
|
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 )
|
if ( btn == craftMode )
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( craftMode.getSetting(), backwards ) );
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( craftMode.getSetting(), backwards ) );
|
||||||
|
|
||||||
if ( btn == fuzzyMode )
|
if ( btn == fuzzyMode )
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( fuzzyMode.getSetting(), backwards ) );
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( fuzzyMode.getSetting(), backwards ) );
|
||||||
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean hasToolbox()
|
protected boolean hasToolbox()
|
||||||
|
|
|
@ -4,10 +4,8 @@ import java.util.EnumSet;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.RenderBlocks;
|
import net.minecraft.client.renderer.RenderBlocks;
|
||||||
import net.minecraft.client.renderer.Tessellator;
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraftforge.client.IItemRenderer.ItemRenderType;
|
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
import appeng.api.AEApi;
|
import appeng.api.AEApi;
|
||||||
import appeng.api.util.AEColor;
|
import appeng.api.util.AEColor;
|
||||||
|
|
|
@ -297,14 +297,7 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
||||||
autoStart = false;
|
autoStart = false;
|
||||||
if ( g != null && OriginalGui != null && openContext != null )
|
if ( g != null && OriginalGui != null && openContext != null )
|
||||||
{
|
{
|
||||||
try
|
NetworkHandler.instance.sendTo( new PacketSwitchGuis( OriginalGui ), (EntityPlayerMP) invPlayer.player );
|
||||||
{
|
|
||||||
NetworkHandler.instance.sendTo( new PacketSwitchGuis( OriginalGui ), (EntityPlayerMP) invPlayer.player );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
// :(
|
|
||||||
}
|
|
||||||
|
|
||||||
TileEntity te = openContext.getTile();
|
TileEntity te = openContext.getTile();
|
||||||
Platform.openGUI( invPlayer.player, te, openContext.side, OriginalGui );
|
Platform.openGUI( invPlayer.player, te, openContext.side, OriginalGui );
|
||||||
|
|
|
@ -3,7 +3,6 @@ package appeng.core;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
@ -230,14 +229,7 @@ public class WorldSettings extends Configuration
|
||||||
storageCellDims.add( newDim );
|
storageCellDims.add( newDim );
|
||||||
DimensionManager.registerDimension( newDim, AEConfig.instance.storageProviderID );
|
DimensionManager.registerDimension( newDim, AEConfig.instance.storageProviderID );
|
||||||
|
|
||||||
try
|
NetworkHandler.instance.sendToAll( new PacketNewStorageDimension( newDim ) );
|
||||||
{
|
|
||||||
NetworkHandler.instance.sendToAll( new PacketNewStorageDimension( newDim ) );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
String[] values = new String[storageCellDims.size()];
|
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())
|
for (int newDim : get( "DimensionManager", "StorageCells", new int[0] ).getIntList())
|
||||||
{
|
{
|
||||||
try
|
manager.scheduleOutboundPacket( (new PacketNewStorageDimension( newDim )).getProxy() );
|
||||||
{
|
|
||||||
manager.scheduleOutboundPacket( (new PacketNewStorageDimension( newDim )).getProxy() );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package appeng.core.api;
|
package appeng.core.api;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -98,7 +97,7 @@ public class ApiPart implements IPartHelper
|
||||||
return clazz;
|
return clazz;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ClassNode getReader(String name) throws IOException
|
public ClassNode getReader(String name)
|
||||||
{
|
{
|
||||||
try
|
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 )
|
if ( roots.get( fullPath ) != null )
|
||||||
return roots.get( fullPath );
|
return roots.get( fullPath );
|
||||||
|
|
|
@ -3,8 +3,6 @@ package appeng.core.sync.packets;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import appeng.api.AEApi;
|
import appeng.api.AEApi;
|
||||||
|
@ -27,7 +25,7 @@ public class PacketClick extends AppEngPacket
|
||||||
final float hitZ;
|
final float hitZ;
|
||||||
|
|
||||||
// automatic.
|
// automatic.
|
||||||
public PacketClick(ByteBuf stream) throws IOException {
|
public PacketClick(ByteBuf stream) {
|
||||||
x = stream.readInt();
|
x = stream.readInt();
|
||||||
y = stream.readInt();
|
y = stream.readInt();
|
||||||
z = stream.readInt();
|
z = stream.readInt();
|
||||||
|
@ -60,7 +58,7 @@ public class PacketClick extends AppEngPacket
|
||||||
}
|
}
|
||||||
|
|
||||||
// api
|
// 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();
|
ByteBuf data = Unpooled.buffer();
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@ package appeng.core.sync.packets;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
import appeng.api.util.DimensionalCoord;
|
import appeng.api.util.DimensionalCoord;
|
||||||
|
@ -23,7 +21,7 @@ public class PacketCompassRequest extends AppEngPacket implements ICompassCallba
|
||||||
EntityPlayer talkBackTo;
|
EntityPlayer talkBackTo;
|
||||||
|
|
||||||
// automatic.
|
// automatic.
|
||||||
public PacketCompassRequest(ByteBuf stream) throws IOException {
|
public PacketCompassRequest(ByteBuf stream) {
|
||||||
attunement = stream.readLong();
|
attunement = stream.readLong();
|
||||||
cx = stream.readInt();
|
cx = stream.readInt();
|
||||||
cz = stream.readInt();
|
cz = stream.readInt();
|
||||||
|
@ -46,7 +44,7 @@ public class PacketCompassRequest extends AppEngPacket implements ICompassCallba
|
||||||
}
|
}
|
||||||
|
|
||||||
// api
|
// 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();
|
ByteBuf data = Unpooled.buffer();
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@ package appeng.core.sync.packets;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import appeng.core.sync.AppEngPacket;
|
import appeng.core.sync.AppEngPacket;
|
||||||
import appeng.core.sync.network.INetworkInfo;
|
import appeng.core.sync.network.INetworkInfo;
|
||||||
|
@ -20,7 +18,7 @@ public class PacketCompassResponse extends AppEngPacket
|
||||||
public CompassResult cr;
|
public CompassResult cr;
|
||||||
|
|
||||||
// automatic.
|
// automatic.
|
||||||
public PacketCompassResponse(ByteBuf stream) throws IOException {
|
public PacketCompassResponse(ByteBuf stream) {
|
||||||
attunement = stream.readLong();
|
attunement = stream.readLong();
|
||||||
cx = stream.readInt();
|
cx = stream.readInt();
|
||||||
cz = stream.readInt();
|
cz = stream.readInt();
|
||||||
|
|
|
@ -3,8 +3,6 @@ package appeng.core.sync.packets;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
import appeng.api.config.Settings;
|
import appeng.api.config.Settings;
|
||||||
|
@ -22,7 +20,7 @@ public class PacketConfigButton extends AppEngPacket
|
||||||
final public boolean rotationDirection;
|
final public boolean rotationDirection;
|
||||||
|
|
||||||
// automatic.
|
// automatic.
|
||||||
public PacketConfigButton(ByteBuf stream) throws IOException {
|
public PacketConfigButton(ByteBuf stream) {
|
||||||
option = Settings.values()[stream.readInt()];
|
option = Settings.values()[stream.readInt()];
|
||||||
rotationDirection = stream.readBoolean();
|
rotationDirection = stream.readBoolean();
|
||||||
}
|
}
|
||||||
|
@ -41,7 +39,7 @@ public class PacketConfigButton extends AppEngPacket
|
||||||
}
|
}
|
||||||
|
|
||||||
// api
|
// api
|
||||||
public PacketConfigButton(Settings option, boolean rotationDirection) throws IOException {
|
public PacketConfigButton(Settings option, boolean rotationDirection) {
|
||||||
this.option = option;
|
this.option = option;
|
||||||
this.rotationDirection = rotationDirection;
|
this.rotationDirection = rotationDirection;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ package appeng.core.sync.packets;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
@ -30,7 +29,8 @@ public class PacketCraftRequest extends AppEngPacket
|
||||||
final public boolean heldShift;
|
final public boolean heldShift;
|
||||||
|
|
||||||
// automatic.
|
// automatic.
|
||||||
public PacketCraftRequest(ByteBuf stream) throws IOException {
|
public PacketCraftRequest(ByteBuf stream)
|
||||||
|
{
|
||||||
heldShift = stream.readBoolean();
|
heldShift = stream.readBoolean();
|
||||||
amount = stream.readLong();
|
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.amount = craftAmt;
|
||||||
this.heldShift = shift;
|
this.heldShift = shift;
|
||||||
|
|
||||||
|
|
|
@ -118,8 +118,8 @@ public class PacketInventoryAction extends AppEngPacket
|
||||||
}
|
}
|
||||||
|
|
||||||
// api
|
// api
|
||||||
public PacketInventoryAction(InventoryAction action, int slot, long id) throws IOException {
|
public PacketInventoryAction(InventoryAction action, int slot, long id)
|
||||||
|
{
|
||||||
this.action = action;
|
this.action = action;
|
||||||
this.slot = slot;
|
this.slot = slot;
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
|
|
@ -3,8 +3,6 @@ package appeng.core.sync.packets;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import appeng.client.ClientHelper;
|
import appeng.client.ClientHelper;
|
||||||
|
@ -24,7 +22,7 @@ public class PacketLightning extends AppEngPacket
|
||||||
final double z;
|
final double z;
|
||||||
|
|
||||||
// automatic.
|
// automatic.
|
||||||
public PacketLightning(ByteBuf stream) throws IOException {
|
public PacketLightning(ByteBuf stream) {
|
||||||
x = stream.readFloat();
|
x = stream.readFloat();
|
||||||
y = stream.readFloat();
|
y = stream.readFloat();
|
||||||
z = stream.readFloat();
|
z = stream.readFloat();
|
||||||
|
@ -48,8 +46,8 @@ public class PacketLightning extends AppEngPacket
|
||||||
}
|
}
|
||||||
|
|
||||||
// api
|
// api
|
||||||
public PacketLightning(double x, double y, double z) throws IOException {
|
public PacketLightning(double x, double y, double z)
|
||||||
|
{
|
||||||
this.x = x;
|
this.x = x;
|
||||||
this.y = y;
|
this.y = y;
|
||||||
this.z = z;
|
this.z = z;
|
||||||
|
|
|
@ -3,8 +3,6 @@ package appeng.core.sync.packets;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
|
@ -28,7 +26,8 @@ public class PacketMatterCannon extends AppEngPacket
|
||||||
final byte len;
|
final byte len;
|
||||||
|
|
||||||
// automatic.
|
// automatic.
|
||||||
public PacketMatterCannon(ByteBuf stream) throws IOException {
|
public PacketMatterCannon(ByteBuf stream)
|
||||||
|
{
|
||||||
x = stream.readFloat();
|
x = stream.readFloat();
|
||||||
y = stream.readFloat();
|
y = stream.readFloat();
|
||||||
z = stream.readFloat();
|
z = stream.readFloat();
|
||||||
|
@ -59,7 +58,8 @@ public class PacketMatterCannon extends AppEngPacket
|
||||||
}
|
}
|
||||||
|
|
||||||
// api
|
// 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 dl = dx * dx + dy * dy + dz * dz;
|
||||||
float dlz = (float) Math.sqrt( dl );
|
float dlz = (float) Math.sqrt( dl );
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@ package appeng.core.sync.packets;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import appeng.core.CommonHelper;
|
import appeng.core.CommonHelper;
|
||||||
|
@ -29,14 +27,16 @@ public class PacketMockExplosion extends AppEngPacket
|
||||||
}
|
}
|
||||||
|
|
||||||
// automatic.
|
// automatic.
|
||||||
public PacketMockExplosion(ByteBuf stream) throws IOException {
|
public PacketMockExplosion(ByteBuf stream)
|
||||||
|
{
|
||||||
x = stream.readDouble();
|
x = stream.readDouble();
|
||||||
y = stream.readDouble();
|
y = stream.readDouble();
|
||||||
z = stream.readDouble();
|
z = stream.readDouble();
|
||||||
}
|
}
|
||||||
|
|
||||||
// api
|
// api
|
||||||
public PacketMockExplosion(double x, double y, double z) throws IOException {
|
public PacketMockExplosion(double x, double y, double z)
|
||||||
|
{
|
||||||
this.x = x;
|
this.x = x;
|
||||||
this.y = y;
|
this.y = y;
|
||||||
this.z = z;
|
this.z = z;
|
||||||
|
|
|
@ -3,8 +3,6 @@ package appeng.core.sync.packets;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
|
@ -18,8 +16,8 @@ public class PacketMultiPart extends AppEngPacket
|
||||||
{
|
{
|
||||||
|
|
||||||
// automatic.
|
// automatic.
|
||||||
public PacketMultiPart(ByteBuf stream) throws IOException {
|
public PacketMultiPart(ByteBuf stream)
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -29,13 +27,13 @@ public class PacketMultiPart extends AppEngPacket
|
||||||
if ( fmp != null )
|
if ( fmp != null )
|
||||||
{
|
{
|
||||||
EntityPlayerMP sender = (EntityPlayerMP) player;
|
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
|
// api
|
||||||
public PacketMultiPart() throws IOException {
|
public PacketMultiPart()
|
||||||
|
{
|
||||||
ByteBuf data = Unpooled.buffer();
|
ByteBuf data = Unpooled.buffer();
|
||||||
|
|
||||||
data.writeInt( getPacketID() );
|
data.writeInt( getPacketID() );
|
||||||
|
|
|
@ -3,8 +3,6 @@ package appeng.core.sync.packets;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraftforge.common.DimensionManager;
|
import net.minecraftforge.common.DimensionManager;
|
||||||
import appeng.core.AEConfig;
|
import appeng.core.AEConfig;
|
||||||
|
@ -19,7 +17,8 @@ public class PacketNewStorageDimension extends AppEngPacket
|
||||||
final int newDim;
|
final int newDim;
|
||||||
|
|
||||||
// automatic.
|
// automatic.
|
||||||
public PacketNewStorageDimension(ByteBuf stream) throws IOException {
|
public PacketNewStorageDimension(ByteBuf stream)
|
||||||
|
{
|
||||||
newDim = stream.readInt();
|
newDim = stream.readInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,8 +37,8 @@ public class PacketNewStorageDimension extends AppEngPacket
|
||||||
}
|
}
|
||||||
|
|
||||||
// api
|
// api
|
||||||
public PacketNewStorageDimension(int newDim) throws IOException {
|
public PacketNewStorageDimension(int newDim)
|
||||||
|
{
|
||||||
this.newDim = newDim;
|
this.newDim = newDim;
|
||||||
|
|
||||||
ByteBuf data = Unpooled.buffer();
|
ByteBuf data = Unpooled.buffer();
|
||||||
|
|
|
@ -3,8 +3,6 @@ package appeng.core.sync.packets;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import appeng.api.util.AEColor;
|
import appeng.api.util.AEColor;
|
||||||
import appeng.core.sync.AppEngPacket;
|
import appeng.core.sync.AppEngPacket;
|
||||||
|
@ -20,7 +18,8 @@ public class PacketPaintedEntity extends AppEngPacket
|
||||||
private int ticks;
|
private int ticks;
|
||||||
|
|
||||||
// automatic.
|
// automatic.
|
||||||
public PacketPaintedEntity(ByteBuf stream) throws IOException {
|
public PacketPaintedEntity(ByteBuf stream)
|
||||||
|
{
|
||||||
entityId = stream.readInt();
|
entityId = stream.readInt();
|
||||||
myColor = AEColor.values()[stream.readByte()];
|
myColor = AEColor.values()[stream.readByte()];
|
||||||
ticks = stream.readInt();
|
ticks = stream.readInt();
|
||||||
|
|
|
@ -3,8 +3,6 @@ package appeng.core.sync.packets;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
import appeng.core.CommonHelper;
|
import appeng.core.CommonHelper;
|
||||||
|
@ -19,7 +17,8 @@ public class PacketPartPlacement extends AppEngPacket
|
||||||
float eyeHeight;
|
float eyeHeight;
|
||||||
|
|
||||||
// automatic.
|
// automatic.
|
||||||
public PacketPartPlacement(ByteBuf stream) throws IOException {
|
public PacketPartPlacement(ByteBuf stream)
|
||||||
|
{
|
||||||
x = stream.readInt();
|
x = stream.readInt();
|
||||||
y = stream.readInt();
|
y = stream.readInt();
|
||||||
z = stream.readInt();
|
z = stream.readInt();
|
||||||
|
@ -38,8 +37,8 @@ public class PacketPartPlacement extends AppEngPacket
|
||||||
}
|
}
|
||||||
|
|
||||||
// api
|
// 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();
|
ByteBuf data = Unpooled.buffer();
|
||||||
|
|
||||||
data.writeInt( getPacketID() );
|
data.writeInt( getPacketID() );
|
||||||
|
|
|
@ -3,8 +3,6 @@ package appeng.core.sync.packets;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import appeng.container.AEBaseContainer;
|
import appeng.container.AEBaseContainer;
|
||||||
import appeng.core.sync.AppEngPacket;
|
import appeng.core.sync.AppEngPacket;
|
||||||
|
@ -17,7 +15,8 @@ public class PacketPartialItem extends AppEngPacket
|
||||||
final byte[] data;
|
final byte[] data;
|
||||||
|
|
||||||
// automatic.
|
// automatic.
|
||||||
public PacketPartialItem(ByteBuf stream) throws IOException {
|
public PacketPartialItem(ByteBuf stream)
|
||||||
|
{
|
||||||
pageNum = stream.readShort();
|
pageNum = stream.readShort();
|
||||||
stream.readBytes( data = new byte[stream.readableBytes()] );
|
stream.readBytes( data = new byte[stream.readableBytes()] );
|
||||||
}
|
}
|
||||||
|
@ -32,7 +31,8 @@ public class PacketPartialItem extends AppEngPacket
|
||||||
}
|
}
|
||||||
|
|
||||||
// api
|
// api
|
||||||
public PacketPartialItem(int page, int maxPages, byte[] buf) throws IOException {
|
public PacketPartialItem(int page, int maxPages, byte[] buf)
|
||||||
|
{
|
||||||
|
|
||||||
ByteBuf data = Unpooled.buffer();
|
ByteBuf data = Unpooled.buffer();
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@ package appeng.core.sync.packets;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
import appeng.container.AEBaseContainer;
|
import appeng.container.AEBaseContainer;
|
||||||
|
@ -18,7 +16,8 @@ public class PacketProgressBar extends AppEngPacket
|
||||||
final long value;
|
final long value;
|
||||||
|
|
||||||
// automatic.
|
// automatic.
|
||||||
public PacketProgressBar(ByteBuf stream) throws IOException {
|
public PacketProgressBar(ByteBuf stream)
|
||||||
|
{
|
||||||
id = stream.readShort();
|
id = stream.readShort();
|
||||||
value = stream.readLong();
|
value = stream.readLong();
|
||||||
}
|
}
|
||||||
|
@ -40,8 +39,8 @@ public class PacketProgressBar extends AppEngPacket
|
||||||
}
|
}
|
||||||
|
|
||||||
// api
|
// api
|
||||||
public PacketProgressBar(int short_id, long value) throws IOException {
|
public PacketProgressBar(int short_id, long value)
|
||||||
|
{
|
||||||
this.id = (short) short_id;
|
this.id = (short) short_id;
|
||||||
this.value = value;
|
this.value = value;
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@ package appeng.core.sync.packets;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import appeng.container.AEBaseContainer;
|
import appeng.container.AEBaseContainer;
|
||||||
import appeng.core.sync.AppEngPacket;
|
import appeng.core.sync.AppEngPacket;
|
||||||
|
@ -17,7 +15,8 @@ public class PacketSwapSlots extends AppEngPacket
|
||||||
final int slotB;
|
final int slotB;
|
||||||
|
|
||||||
// automatic.
|
// automatic.
|
||||||
public PacketSwapSlots(ByteBuf stream) throws IOException {
|
public PacketSwapSlots(ByteBuf stream)
|
||||||
|
{
|
||||||
slotA = stream.readInt();
|
slotA = stream.readInt();
|
||||||
slotB = stream.readInt();
|
slotB = stream.readInt();
|
||||||
}
|
}
|
||||||
|
@ -32,8 +31,8 @@ public class PacketSwapSlots extends AppEngPacket
|
||||||
}
|
}
|
||||||
|
|
||||||
// api
|
// api
|
||||||
public PacketSwapSlots(int slotA, int slotB) throws IOException {
|
public PacketSwapSlots(int slotA, int slotB)
|
||||||
|
{
|
||||||
ByteBuf data = Unpooled.buffer();
|
ByteBuf data = Unpooled.buffer();
|
||||||
|
|
||||||
data.writeInt( getPacketID() );
|
data.writeInt( getPacketID() );
|
||||||
|
|
|
@ -3,8 +3,6 @@ package appeng.core.sync.packets;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
@ -22,7 +20,8 @@ public class PacketSwitchGuis extends AppEngPacket
|
||||||
final GuiBridge newGui;
|
final GuiBridge newGui;
|
||||||
|
|
||||||
// automatic.
|
// automatic.
|
||||||
public PacketSwitchGuis(ByteBuf stream) throws IOException {
|
public PacketSwitchGuis(ByteBuf stream)
|
||||||
|
{
|
||||||
newGui = GuiBridge.values()[stream.readInt()];
|
newGui = GuiBridge.values()[stream.readInt()];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,8 +48,8 @@ public class PacketSwitchGuis extends AppEngPacket
|
||||||
}
|
}
|
||||||
|
|
||||||
// api
|
// api
|
||||||
public PacketSwitchGuis(GuiBridge newGui) throws IOException {
|
public PacketSwitchGuis(GuiBridge newGui)
|
||||||
|
{
|
||||||
this.newGui = newGui;
|
this.newGui = newGui;
|
||||||
|
|
||||||
if ( Platform.isClient() )
|
if ( Platform.isClient() )
|
||||||
|
|
|
@ -3,8 +3,6 @@ package appeng.core.sync.packets;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||||
|
@ -32,7 +30,8 @@ public class PacketTransitionEffect extends AppEngPacket
|
||||||
final public boolean mode;
|
final public boolean mode;
|
||||||
|
|
||||||
// automatic.
|
// automatic.
|
||||||
public PacketTransitionEffect(ByteBuf stream) throws IOException {
|
public PacketTransitionEffect(ByteBuf stream)
|
||||||
|
{
|
||||||
x = stream.readFloat();
|
x = stream.readFloat();
|
||||||
y = stream.readFloat();
|
y = stream.readFloat();
|
||||||
z = stream.readFloat();
|
z = stream.readFloat();
|
||||||
|
@ -77,8 +76,8 @@ public class PacketTransitionEffect extends AppEngPacket
|
||||||
}
|
}
|
||||||
|
|
||||||
// api
|
// 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.x = x;
|
||||||
this.y = y;
|
this.y = y;
|
||||||
this.z = z;
|
this.z = z;
|
||||||
|
|
|
@ -2,8 +2,6 @@ package appeng.entity;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.Entity;
|
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 ) );
|
||||||
{
|
|
||||||
CommonHelper.proxy.sendToAllNearExcept( null, posX, posY, posZ, 64, this.worldObj, new PacketMockExplosion( posX, posY, posZ ) );
|
|
||||||
}
|
|
||||||
catch (IOException ignored)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -25,7 +25,6 @@ import appeng.api.parts.IFacadeContainer;
|
||||||
import appeng.api.parts.IFacadePart;
|
import appeng.api.parts.IFacadePart;
|
||||||
import appeng.api.parts.IPart;
|
import appeng.api.parts.IPart;
|
||||||
import appeng.api.parts.IPartCollisionHelper;
|
import appeng.api.parts.IPartCollisionHelper;
|
||||||
import appeng.api.parts.IPartHost;
|
|
||||||
import appeng.api.parts.IPartItem;
|
import appeng.api.parts.IPartItem;
|
||||||
import appeng.api.parts.LayerFlags;
|
import appeng.api.parts.LayerFlags;
|
||||||
import appeng.api.parts.PartItemStack;
|
import appeng.api.parts.PartItemStack;
|
||||||
|
@ -62,7 +61,7 @@ import codechicken.multipart.scalatraits.TIInventoryTile;
|
||||||
*
|
*
|
||||||
* TSlottedPart,ISidedHollowConnect
|
* 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[] {
|
final static Cuboid6 sideTests[] = new Cuboid6[] {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package appeng.fmp;
|
package appeng.fmp;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockFence;
|
import net.minecraft.block.BlockFence;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
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;
|
||||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action;
|
import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action;
|
||||||
import appeng.block.AEBaseItemBlock;
|
import appeng.block.AEBaseItemBlock;
|
||||||
import appeng.core.AELog;
|
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
import appeng.core.sync.network.NetworkHandler;
|
||||||
import appeng.core.sync.packets.PacketMultiPart;
|
import appeng.core.sync.packets.PacketMultiPart;
|
||||||
import appeng.integration.modules.helpers.FMPPacketEvent;
|
import appeng.integration.modules.helpers.FMPPacketEvent;
|
||||||
|
@ -116,14 +113,7 @@ public class FMPEvent
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player.swingItem();
|
player.swingItem();
|
||||||
try
|
NetworkHandler.instance.sendToServer( new PacketMultiPart() );
|
||||||
{
|
|
||||||
NetworkHandler.instance.sendToServer( new PacketMultiPart() );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,6 @@ import appeng.api.config.YesNo;
|
||||||
import appeng.api.implementations.ICraftingPatternItem;
|
import appeng.api.implementations.ICraftingPatternItem;
|
||||||
import appeng.api.implementations.IUpgradeableHost;
|
import appeng.api.implementations.IUpgradeableHost;
|
||||||
import appeng.api.implementations.tiles.ICraftingMachine;
|
import appeng.api.implementations.tiles.ICraftingMachine;
|
||||||
import appeng.api.implementations.tiles.ISegmentedInventory;
|
|
||||||
import appeng.api.networking.GridFlags;
|
import appeng.api.networking.GridFlags;
|
||||||
import appeng.api.networking.IGrid;
|
import appeng.api.networking.IGrid;
|
||||||
import appeng.api.networking.IGridNode;
|
import appeng.api.networking.IGridNode;
|
||||||
|
@ -53,7 +52,6 @@ import appeng.api.storage.data.IAEItemStack;
|
||||||
import appeng.api.util.AECableType;
|
import appeng.api.util.AECableType;
|
||||||
import appeng.api.util.DimensionalCoord;
|
import appeng.api.util.DimensionalCoord;
|
||||||
import appeng.api.util.IConfigManager;
|
import appeng.api.util.IConfigManager;
|
||||||
import appeng.api.util.IConfigurableObject;
|
|
||||||
import appeng.core.settings.TickRates;
|
import appeng.core.settings.TickRates;
|
||||||
import appeng.me.GridAccessException;
|
import appeng.me.GridAccessException;
|
||||||
import appeng.me.helpers.AENetworkProxy;
|
import appeng.me.helpers.AENetworkProxy;
|
||||||
|
@ -76,8 +74,8 @@ import appeng.util.item.AEItemStack;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
|
||||||
public class DualityInterface implements IGridTickable, ISegmentedInventory, IStorageMonitorable, IInventoryDestination, IAEAppEngInventory,
|
public class DualityInterface implements IGridTickable, IStorageMonitorable, IInventoryDestination, IAEAppEngInventory,
|
||||||
IConfigurableObject, IConfigManagerHost, ICraftingProvider, IUpgradeableHost, IPriorityHost
|
IConfigManagerHost, ICraftingProvider, IUpgradeableHost, IPriorityHost
|
||||||
{
|
{
|
||||||
|
|
||||||
final int sides[] = new int[] { 0, 1, 2, 3, 4, 5, 6, 7 };
|
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.implementations.IUpgradeableHost;
|
||||||
import appeng.api.networking.crafting.ICraftingProvider;
|
import appeng.api.networking.crafting.ICraftingProvider;
|
||||||
import appeng.api.networking.crafting.ICraftingRequester;
|
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();
|
DualityInterface getInterfaceDuality();
|
||||||
|
|
|
@ -13,7 +13,6 @@ import appeng.api.networking.crafting.ICraftingLink;
|
||||||
import appeng.api.networking.crafting.ICraftingRequester;
|
import appeng.api.networking.crafting.ICraftingRequester;
|
||||||
import appeng.api.networking.security.BaseActionSource;
|
import appeng.api.networking.security.BaseActionSource;
|
||||||
import appeng.api.storage.data.IAEItemStack;
|
import appeng.api.storage.data.IAEItemStack;
|
||||||
import appeng.me.GridAccessException;
|
|
||||||
import appeng.parts.automation.NonNullArrayIterator;
|
import appeng.parts.automation.NonNullArrayIterator;
|
||||||
import appeng.util.InventoryAdaptor;
|
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)
|
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 )
|
if ( ais != null && d.simulateAdd( ais.getItemStack() ) == null )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
package appeng.hooks;
|
package appeng.hooks;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import appeng.core.AELog;
|
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
import appeng.core.sync.network.NetworkHandler;
|
||||||
import appeng.core.sync.packets.PacketCompassRequest;
|
import appeng.core.sync.packets.PacketCompassRequest;
|
||||||
|
|
||||||
|
@ -92,15 +90,7 @@ public class CompassManager
|
||||||
|
|
||||||
private void requestUpdate(CompassRequest r)
|
private void requestUpdate(CompassRequest r)
|
||||||
{
|
{
|
||||||
|
NetworkHandler.instance.sendToServer( new PacketCompassRequest( r.attunement, r.cx, r.cz, r.cdy ) );
|
||||||
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.config.TunnelType;
|
||||||
import appeng.api.features.IP2PTunnelRegistry;
|
import appeng.api.features.IP2PTunnelRegistry;
|
||||||
import appeng.integration.BaseModule;
|
import appeng.integration.BaseModule;
|
||||||
import appeng.integration.IIntegrationModule;
|
|
||||||
import appeng.integration.abstraction.IIC2;
|
import appeng.integration.abstraction.IIC2;
|
||||||
|
|
||||||
public class IC2 extends BaseModule implements IIntegrationModule, IIC2
|
public class IC2 extends BaseModule implements IIC2
|
||||||
{
|
{
|
||||||
|
|
||||||
public static IC2 instance;
|
public static IC2 instance;
|
||||||
|
|
|
@ -17,7 +17,6 @@ import appeng.client.gui.implementations.GuiPatternTerm;
|
||||||
import appeng.core.AEConfig;
|
import appeng.core.AEConfig;
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
import appeng.integration.BaseModule;
|
import appeng.integration.BaseModule;
|
||||||
import appeng.integration.IIntegrationModule;
|
|
||||||
import appeng.integration.abstraction.INEI;
|
import appeng.integration.abstraction.INEI;
|
||||||
import appeng.integration.modules.NEIHelpers.NEIAEShapedRecipeHandler;
|
import appeng.integration.modules.NEIHelpers.NEIAEShapedRecipeHandler;
|
||||||
import appeng.integration.modules.NEIHelpers.NEIAEShapelessRecipeHandler;
|
import appeng.integration.modules.NEIHelpers.NEIAEShapelessRecipeHandler;
|
||||||
|
@ -31,7 +30,7 @@ import codechicken.nei.api.IStackPositioner;
|
||||||
import codechicken.nei.guihook.GuiContainerManager;
|
import codechicken.nei.guihook.GuiContainerManager;
|
||||||
import codechicken.nei.guihook.IContainerTooltipHandler;
|
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;
|
public static NEI instance;
|
||||||
|
|
|
@ -4,10 +4,9 @@ import mods.railcraft.api.crafting.IRockCrusherRecipe;
|
||||||
import mods.railcraft.api.crafting.RailcraftCraftingManager;
|
import mods.railcraft.api.crafting.RailcraftCraftingManager;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import appeng.integration.BaseModule;
|
import appeng.integration.BaseModule;
|
||||||
import appeng.integration.IIntegrationModule;
|
|
||||||
import appeng.integration.abstraction.IRC;
|
import appeng.integration.abstraction.IRC;
|
||||||
|
|
||||||
public class RC extends BaseModule implements IIntegrationModule, IRC
|
public class RC extends BaseModule implements IRC
|
||||||
{
|
{
|
||||||
|
|
||||||
public static RC instance;
|
public static RC instance;
|
||||||
|
|
|
@ -5,10 +5,9 @@ import net.minecraftforge.oredict.OreDictionary;
|
||||||
import appeng.api.AEApi;
|
import appeng.api.AEApi;
|
||||||
import appeng.api.config.TunnelType;
|
import appeng.api.config.TunnelType;
|
||||||
import appeng.integration.BaseModule;
|
import appeng.integration.BaseModule;
|
||||||
import appeng.integration.IIntegrationModule;
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
public class RF extends BaseModule implements IIntegrationModule
|
public class RF extends BaseModule
|
||||||
{
|
{
|
||||||
|
|
||||||
public static RF instance;
|
public static RF instance;
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
package appeng.integration.modules;
|
package appeng.integration.modules;
|
||||||
|
|
||||||
import appeng.integration.BaseModule;
|
import appeng.integration.BaseModule;
|
||||||
import appeng.integration.IIntegrationModule;
|
|
||||||
|
|
||||||
public class RFItem extends BaseModule implements IIntegrationModule
|
public class RFItem extends BaseModule
|
||||||
{
|
{
|
||||||
|
|
||||||
public static RFItem instance;
|
public static RFItem instance;
|
||||||
|
|
|
@ -17,8 +17,6 @@ import net.minecraft.util.MovingObjectPosition;
|
||||||
import net.minecraft.util.Vec3;
|
import net.minecraft.util.Vec3;
|
||||||
import appeng.api.implementations.IPowerChannelState;
|
import appeng.api.implementations.IPowerChannelState;
|
||||||
import appeng.api.implementations.parts.IPartStorageMonitor;
|
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.IPartHost;
|
||||||
import appeng.api.parts.SelectedPart;
|
import appeng.api.parts.SelectedPart;
|
||||||
import appeng.api.storage.data.IAEFluidStack;
|
import appeng.api.storage.data.IAEFluidStack;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package appeng.items.tools;
|
package appeng.items.tools;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
@ -21,7 +20,6 @@ import appeng.api.util.DimensionalCoord;
|
||||||
import appeng.api.util.INetworkToolAgent;
|
import appeng.api.util.INetworkToolAgent;
|
||||||
import appeng.client.ClientHelper;
|
import appeng.client.ClientHelper;
|
||||||
import appeng.container.AEBaseContainer;
|
import appeng.container.AEBaseContainer;
|
||||||
import appeng.core.AELog;
|
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
import appeng.core.sync.GuiBridge;
|
import appeng.core.sync.GuiBridge;
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
import appeng.core.sync.network.NetworkHandler;
|
||||||
|
@ -97,14 +95,7 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench,
|
||||||
|
|
||||||
if ( Platform.isClient() )
|
if ( Platform.isClient() )
|
||||||
{
|
{
|
||||||
try
|
NetworkHandler.instance.sendToServer( new PacketClick( x, y, z, side, hitX, hitY, hitZ ) );
|
||||||
{
|
|
||||||
NetworkHandler.instance.sendToServer( new PacketClick( x, y, z, side, hitX, hitY, hitZ ) );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package appeng.items.tools.powered;
|
package appeng.items.tools.powered;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
@ -30,19 +29,12 @@ public class ToolChargedStaff extends AEBasePoweredItem
|
||||||
extractAEPower( item, 300 );
|
extractAEPower( item, 300 );
|
||||||
if ( Platform.isServer() )
|
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 dx = (float) (Platform.getRandomFloat() * target.width + target.boundingBox.minX);
|
float dz = (float) (Platform.getRandomFloat() * target.width + target.boundingBox.minZ);
|
||||||
float dy = (float) (Platform.getRandomFloat() * target.height + target.boundingBox.minY);
|
ServerHelper.proxy.sendToAllNearExcept( null, dx, dy, dz, 32.0, target.worldObj, new PacketLightning( dx, dy, dz ) );
|
||||||
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)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
target.attackEntityFrom( DamageSource.magic, 6 );
|
target.attackEntityFrom( DamageSource.magic, 6 );
|
||||||
|
|
|
@ -8,7 +8,6 @@ import java.util.List;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import appeng.api.config.SecurityPermissions;
|
import appeng.api.config.SecurityPermissions;
|
||||||
import appeng.api.networking.IGrid;
|
import appeng.api.networking.IGrid;
|
||||||
import appeng.api.networking.IGridCache;
|
|
||||||
import appeng.api.networking.IGridHost;
|
import appeng.api.networking.IGridHost;
|
||||||
import appeng.api.networking.IGridNode;
|
import appeng.api.networking.IGridNode;
|
||||||
import appeng.api.networking.IGridStorage;
|
import appeng.api.networking.IGridStorage;
|
||||||
|
@ -19,7 +18,7 @@ import appeng.api.networking.security.ISecurityProvider;
|
||||||
import appeng.core.WorldSettings;
|
import appeng.core.WorldSettings;
|
||||||
import appeng.me.GridNode;
|
import appeng.me.GridNode;
|
||||||
|
|
||||||
public class SecurityCache implements IGridCache, ISecurityGrid
|
public class SecurityCache implements ISecurityGrid
|
||||||
{
|
{
|
||||||
|
|
||||||
final private List<ISecurityProvider> securityProvider = new ArrayList<ISecurityProvider>();
|
final private List<ISecurityProvider> securityProvider = new ArrayList<ISecurityProvider>();
|
||||||
|
|
|
@ -5,7 +5,6 @@ import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import appeng.api.networking.IGrid;
|
import appeng.api.networking.IGrid;
|
||||||
import appeng.api.networking.IGridCache;
|
|
||||||
import appeng.api.networking.IGridHost;
|
import appeng.api.networking.IGridHost;
|
||||||
import appeng.api.networking.IGridNode;
|
import appeng.api.networking.IGridNode;
|
||||||
import appeng.api.networking.IGridStorage;
|
import appeng.api.networking.IGridStorage;
|
||||||
|
@ -19,7 +18,7 @@ import appeng.me.cluster.implementations.SpatialPylonCluster;
|
||||||
import appeng.tile.spatial.TileSpatialIOPort;
|
import appeng.tile.spatial.TileSpatialIOPort;
|
||||||
import appeng.tile.spatial.TileSpatialPylon;
|
import appeng.tile.spatial.TileSpatialPylon;
|
||||||
|
|
||||||
public class SpatialPylonCache implements IGridCache, ISpatialCache
|
public class SpatialPylonCache implements ISpatialCache
|
||||||
{
|
{
|
||||||
|
|
||||||
long powerRequired = 0;
|
long powerRequired = 0;
|
||||||
|
|
|
@ -4,7 +4,6 @@ import net.minecraft.item.ItemStack;
|
||||||
import appeng.api.AEApi;
|
import appeng.api.AEApi;
|
||||||
import appeng.api.config.AccessRestriction;
|
import appeng.api.config.AccessRestriction;
|
||||||
import appeng.api.config.Actionable;
|
import appeng.api.config.Actionable;
|
||||||
import appeng.api.exceptions.AppEngException;
|
|
||||||
import appeng.api.networking.security.BaseActionSource;
|
import appeng.api.networking.security.BaseActionSource;
|
||||||
import appeng.api.storage.IMEInventoryHandler;
|
import appeng.api.storage.IMEInventoryHandler;
|
||||||
import appeng.api.storage.StorageChannel;
|
import appeng.api.storage.StorageChannel;
|
||||||
|
@ -20,18 +19,11 @@ public class CreativeCellInventory implements IMEInventoryHandler<IAEItemStack>
|
||||||
|
|
||||||
public static IMEInventoryHandler getCell(ItemStack o)
|
public static IMEInventoryHandler getCell(ItemStack o)
|
||||||
{
|
{
|
||||||
try
|
return new CellInventoryHandler( new CreativeCellInventory( o ) );
|
||||||
{
|
|
||||||
return new CellInventoryHandler( new CreativeCellInventory( o ) );
|
|
||||||
}
|
|
||||||
catch (AppEngException ignored)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected CreativeCellInventory(ItemStack o) throws AppEngException {
|
protected CreativeCellInventory(ItemStack o)
|
||||||
|
{
|
||||||
CellConfig cc = new CellConfig( o );
|
CellConfig cc = new CellConfig( o );
|
||||||
for (ItemStack is : cc)
|
for (ItemStack is : cc)
|
||||||
if ( is != null )
|
if ( is != null )
|
||||||
|
|
|
@ -14,7 +14,6 @@ import appeng.api.config.Actionable;
|
||||||
import appeng.api.config.StorageFilter;
|
import appeng.api.config.StorageFilter;
|
||||||
import appeng.api.networking.security.BaseActionSource;
|
import appeng.api.networking.security.BaseActionSource;
|
||||||
import appeng.api.networking.ticking.TickRateModulation;
|
import appeng.api.networking.ticking.TickRateModulation;
|
||||||
import appeng.api.storage.IMEInventory;
|
|
||||||
import appeng.api.storage.IMEMonitor;
|
import appeng.api.storage.IMEMonitor;
|
||||||
import appeng.api.storage.IMEMonitorHandlerReceiver;
|
import appeng.api.storage.IMEMonitorHandlerReceiver;
|
||||||
import appeng.api.storage.StorageChannel;
|
import appeng.api.storage.StorageChannel;
|
||||||
|
@ -24,7 +23,7 @@ import appeng.util.InventoryAdaptor;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
import appeng.util.inv.ItemSlot;
|
import appeng.util.inv.ItemSlot;
|
||||||
|
|
||||||
public class MEMonitorIInventory implements IMEInventory<IAEItemStack>, IMEMonitor<IAEItemStack>
|
public class MEMonitorIInventory implements IMEMonitor<IAEItemStack>
|
||||||
{
|
{
|
||||||
|
|
||||||
static class CachedItemStack
|
static class CachedItemStack
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package appeng.parts;
|
package appeng.parts;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -26,7 +25,6 @@ import appeng.api.parts.IPartItem;
|
||||||
import appeng.api.parts.PartItemStack;
|
import appeng.api.parts.PartItemStack;
|
||||||
import appeng.api.parts.SelectedPart;
|
import appeng.api.parts.SelectedPart;
|
||||||
import appeng.api.util.DimensionalCoord;
|
import appeng.api.util.DimensionalCoord;
|
||||||
import appeng.core.AELog;
|
|
||||||
import appeng.core.AppEng;
|
import appeng.core.AppEng;
|
||||||
import appeng.core.CommonHelper;
|
import appeng.core.CommonHelper;
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
import appeng.core.sync.network.NetworkHandler;
|
||||||
|
@ -81,14 +79,7 @@ public class PartPlacement
|
||||||
|| AEApi.instance().items().itemColorApplicator.sameAsStack( held );
|
|| AEApi.instance().items().itemColorApplicator.sameAsStack( held );
|
||||||
if ( event.entityPlayer.isSneaking() && held != null && supportedItem )
|
if ( event.entityPlayer.isSneaking() && held != null && supportedItem )
|
||||||
{
|
{
|
||||||
try
|
NetworkHandler.instance.sendToServer( new PacketClick( event.x, event.y, event.z, event.face, 0, 0, 0 ) );
|
||||||
{
|
|
||||||
NetworkHandler.instance.sendToServer( new PacketClick( event.x, event.y, event.z, event.face, 0, 0, 0 ) );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
// :P
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -171,14 +162,7 @@ public class PartPlacement
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player.swingItem();
|
player.swingItem();
|
||||||
try
|
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
|
||||||
{
|
|
||||||
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -225,15 +209,8 @@ public class PartPlacement
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player.swingItem();
|
player.swingItem();
|
||||||
try
|
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
|
||||||
{
|
return true;
|
||||||
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -262,14 +239,7 @@ public class PartPlacement
|
||||||
{
|
{
|
||||||
if ( world.isRemote )
|
if ( world.isRemote )
|
||||||
{
|
{
|
||||||
try
|
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
|
||||||
{
|
|
||||||
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -328,14 +298,7 @@ public class PartPlacement
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player.swingItem();
|
player.swingItem();
|
||||||
try
|
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
|
||||||
{
|
|
||||||
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -409,14 +372,7 @@ public class PartPlacement
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player.swingItem();
|
player.swingItem();
|
||||||
try
|
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
|
||||||
{
|
|
||||||
NetworkHandler.instance.sendToServer( new PacketPartPlacement( x, y, z, face, getEyeOffset( player ) ) );
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package appeng.parts.automation;
|
package appeng.parts.automation;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
|
@ -36,7 +35,6 @@ import appeng.api.parts.IPartHost;
|
||||||
import appeng.api.parts.IPartRenderHelper;
|
import appeng.api.parts.IPartRenderHelper;
|
||||||
import appeng.api.storage.data.IAEItemStack;
|
import appeng.api.storage.data.IAEItemStack;
|
||||||
import appeng.client.texture.CableBusTextures;
|
import appeng.client.texture.CableBusTextures;
|
||||||
import appeng.core.AELog;
|
|
||||||
import appeng.core.settings.TickRates;
|
import appeng.core.settings.TickRates;
|
||||||
import appeng.core.sync.packets.PacketTransitionEffect;
|
import appeng.core.sync.packets.PacketTransitionEffect;
|
||||||
import appeng.hooks.TickHandler;
|
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 ) );
|
||||||
{
|
|
||||||
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)
|
for (ItemStack snaggedItem : out)
|
||||||
{
|
{
|
||||||
|
@ -393,15 +384,8 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
|
||||||
IAEItemStack stack = AEItemStack.create( ((EntityItem) entity).getEntityItem() );
|
IAEItemStack stack = AEItemStack.create( ((EntityItem) entity).getEntityItem() );
|
||||||
if ( stack != null )
|
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 ) );
|
||||||
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 );
|
Buffer.add( stack );
|
||||||
storeBuffer();
|
storeBuffer();
|
||||||
|
|
|
@ -19,7 +19,6 @@ import appeng.api.networking.crafting.ICraftingRequester;
|
||||||
import appeng.api.networking.energy.IEnergyGrid;
|
import appeng.api.networking.energy.IEnergyGrid;
|
||||||
import appeng.api.networking.security.BaseActionSource;
|
import appeng.api.networking.security.BaseActionSource;
|
||||||
import appeng.api.networking.security.MachineSource;
|
import appeng.api.networking.security.MachineSource;
|
||||||
import appeng.api.networking.ticking.IGridTickable;
|
|
||||||
import appeng.api.networking.ticking.TickRateModulation;
|
import appeng.api.networking.ticking.TickRateModulation;
|
||||||
import appeng.api.networking.ticking.TickingRequest;
|
import appeng.api.networking.ticking.TickingRequest;
|
||||||
import appeng.api.parts.IPartCollisionHelper;
|
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.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
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 MultiCraftingTracker cratingTracker = new MultiCraftingTracker( this, 9 );
|
||||||
final BaseActionSource mySrc;
|
final BaseActionSource mySrc;
|
||||||
|
|
||||||
public PartExportBus(ItemStack is) {
|
public PartExportBus(ItemStack is)
|
||||||
|
{
|
||||||
super( PartExportBus.class, is );
|
super( PartExportBus.class, is );
|
||||||
settings.registerSetting( Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE );
|
settings.registerSetting( Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE );
|
||||||
settings.registerSetting( Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
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.energy.IEnergySource;
|
||||||
import appeng.api.networking.security.BaseActionSource;
|
import appeng.api.networking.security.BaseActionSource;
|
||||||
import appeng.api.networking.security.MachineSource;
|
import appeng.api.networking.security.MachineSource;
|
||||||
import appeng.api.networking.ticking.IGridTickable;
|
|
||||||
import appeng.api.networking.ticking.TickRateModulation;
|
import appeng.api.networking.ticking.TickRateModulation;
|
||||||
import appeng.api.networking.ticking.TickingRequest;
|
import appeng.api.networking.ticking.TickingRequest;
|
||||||
import appeng.api.parts.IPartCollisionHelper;
|
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.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class PartImportBus extends PartSharedItemBus implements IGridTickable, IInventoryDestination
|
public class PartImportBus extends PartSharedItemBus implements IInventoryDestination
|
||||||
{
|
{
|
||||||
|
|
||||||
final BaseActionSource mySrc;
|
final BaseActionSource mySrc;
|
||||||
|
|
|
@ -6,7 +6,6 @@ import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import appeng.api.config.RedstoneMode;
|
import appeng.api.config.RedstoneMode;
|
||||||
import appeng.api.config.Upgrades;
|
import appeng.api.config.Upgrades;
|
||||||
import appeng.api.implementations.tiles.ISegmentedInventory;
|
|
||||||
import appeng.api.util.IConfigManager;
|
import appeng.api.util.IConfigManager;
|
||||||
import appeng.parts.PartBasicState;
|
import appeng.parts.PartBasicState;
|
||||||
import appeng.tile.inventory.IAEAppEngInventory;
|
import appeng.tile.inventory.IAEAppEngInventory;
|
||||||
|
@ -14,7 +13,7 @@ import appeng.tile.inventory.InvOperation;
|
||||||
import appeng.util.ConfigManager;
|
import appeng.util.ConfigManager;
|
||||||
import appeng.util.IConfigManagerHost;
|
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 );
|
final IConfigManager settings = new ConfigManager( this );
|
||||||
|
|
|
@ -16,7 +16,6 @@ import net.minecraft.util.Vec3;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
import appeng.api.config.Actionable;
|
import appeng.api.config.Actionable;
|
||||||
import appeng.api.config.Upgrades;
|
import appeng.api.config.Upgrades;
|
||||||
import appeng.api.implementations.tiles.ISegmentedInventory;
|
|
||||||
import appeng.api.implementations.tiles.ITileStorageMonitorable;
|
import appeng.api.implementations.tiles.ITileStorageMonitorable;
|
||||||
import appeng.api.networking.IGridNode;
|
import appeng.api.networking.IGridNode;
|
||||||
import appeng.api.networking.crafting.ICraftingLink;
|
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.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
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
|
ISidedInventory, IAEAppEngInventory, ITileStorageMonitorable, IPriorityHost
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
@Interface(iface = "buildcraft.api.transport.IPipeConnection", iname = "BC")
|
@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
|
@Override
|
||||||
|
|
|
@ -4,7 +4,6 @@ import java.util.Stack;
|
||||||
|
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
|
@ -9,10 +9,9 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||||
import appeng.client.texture.CableBusTextures;
|
import appeng.client.texture.CableBusTextures;
|
||||||
import appeng.core.sync.GuiBridge;
|
import appeng.core.sync.GuiBridge;
|
||||||
import appeng.tile.inventory.AppEngInternalInventory;
|
import appeng.tile.inventory.AppEngInternalInventory;
|
||||||
import appeng.tile.inventory.IAEAppEngInventory;
|
|
||||||
import appeng.tile.inventory.InvOperation;
|
import appeng.tile.inventory.InvOperation;
|
||||||
|
|
||||||
public class PartCraftingTerminal extends PartTerminal implements IAEAppEngInventory
|
public class PartCraftingTerminal extends PartTerminal
|
||||||
{
|
{
|
||||||
|
|
||||||
final AppEngInternalInventory craftingGrid = new AppEngInternalInventory( this, 9 );
|
final AppEngInternalInventory craftingGrid = new AppEngInternalInventory( this, 9 );
|
||||||
|
|
|
@ -12,10 +12,9 @@ import appeng.api.storage.data.IAEItemStack;
|
||||||
import appeng.client.texture.CableBusTextures;
|
import appeng.client.texture.CableBusTextures;
|
||||||
import appeng.core.sync.GuiBridge;
|
import appeng.core.sync.GuiBridge;
|
||||||
import appeng.tile.inventory.AppEngInternalInventory;
|
import appeng.tile.inventory.AppEngInternalInventory;
|
||||||
import appeng.tile.inventory.IAEAppEngInventory;
|
|
||||||
import appeng.tile.inventory.InvOperation;
|
import appeng.tile.inventory.InvOperation;
|
||||||
|
|
||||||
public class PartPatternTerminal extends PartTerminal implements IAEAppEngInventory
|
public class PartPatternTerminal extends PartTerminal
|
||||||
{
|
{
|
||||||
|
|
||||||
final AppEngInternalInventory crafting = new AppEngInternalInventory( this, 9 );
|
final AppEngInternalInventory crafting = new AppEngInternalInventory( this, 9 );
|
||||||
|
|
|
@ -12,7 +12,7 @@ import net.minecraft.world.gen.ChunkProviderGenerate;
|
||||||
import appeng.api.AEApi;
|
import appeng.api.AEApi;
|
||||||
import appeng.core.AEConfig;
|
import appeng.core.AEConfig;
|
||||||
|
|
||||||
public class StorageChunkProvider extends ChunkProviderGenerate implements IChunkProvider
|
public class StorageChunkProvider extends ChunkProviderGenerate
|
||||||
{
|
{
|
||||||
|
|
||||||
final static Block[] blocks;
|
final static Block[] blocks;
|
||||||
|
|
|
@ -6,7 +6,6 @@ import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.inventory.ISidedInventory;
|
|
||||||
import net.minecraft.inventory.InventoryCrafting;
|
import net.minecraft.inventory.InventoryCrafting;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
@ -45,7 +44,6 @@ import appeng.tile.TileEvent;
|
||||||
import appeng.tile.events.TileEventType;
|
import appeng.tile.events.TileEventType;
|
||||||
import appeng.tile.grid.AENetworkInvTile;
|
import appeng.tile.grid.AENetworkInvTile;
|
||||||
import appeng.tile.inventory.AppEngInternalInventory;
|
import appeng.tile.inventory.AppEngInternalInventory;
|
||||||
import appeng.tile.inventory.IAEAppEngInventory;
|
|
||||||
import appeng.tile.inventory.InvOperation;
|
import appeng.tile.inventory.InvOperation;
|
||||||
import appeng.util.ConfigManager;
|
import appeng.util.ConfigManager;
|
||||||
import appeng.util.IConfigManagerHost;
|
import appeng.util.IConfigManagerHost;
|
||||||
|
@ -55,7 +53,7 @@ import appeng.util.item.AEItemStack;
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
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
|
IGridTickable, ICraftingMachine, IPowerChannelState
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -177,7 +175,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IAEAppEn
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_READ)
|
@TileEvent(TileEventType.NETWORK_READ)
|
||||||
public boolean readFromStream_TileMolecularAssembler(ByteBuf data) throws IOException
|
public boolean readFromStream_TileMolecularAssembler(ByteBuf data)
|
||||||
{
|
{
|
||||||
boolean oldPower = isPowered;
|
boolean oldPower = isPowered;
|
||||||
isPowered = data.readBoolean();
|
isPowered = data.readBoolean();
|
||||||
|
@ -185,7 +183,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IAEAppEn
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_WRITE)
|
@TileEvent(TileEventType.NETWORK_WRITE)
|
||||||
public void writeToStream_TileMolecularAssembler(ByteBuf data) throws IOException
|
public void writeToStream_TileMolecularAssembler(ByteBuf data)
|
||||||
{
|
{
|
||||||
data.writeBoolean( isPowered );
|
data.writeBoolean( isPowered );
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,11 +15,10 @@ public class AETileEventHandler
|
||||||
{
|
{
|
||||||
|
|
||||||
private final Method method;
|
private final Method method;
|
||||||
private final TileEventType type;
|
|
||||||
|
|
||||||
public AETileEventHandler(Method m, TileEventType which) {
|
public AETileEventHandler(Method m, TileEventType which)
|
||||||
|
{
|
||||||
method = m;
|
method = m;
|
||||||
type = which;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TICK
|
// TICK
|
||||||
|
@ -86,7 +85,7 @@ public class AETileEventHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
// NETWORK
|
// NETWORK
|
||||||
public void writeToStream(AEBaseTile tile, ByteBuf data) throws IOException
|
public void writeToStream(AEBaseTile tile, ByteBuf data)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,14 +49,14 @@ public class TileCrank extends AEBaseTile implements ICustomCollision
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_READ)
|
@TileEvent(TileEventType.NETWORK_READ)
|
||||||
public boolean readFromStream_TileCrank(ByteBuf data) throws java.io.IOException
|
public boolean readFromStream_TileCrank(ByteBuf data)
|
||||||
{
|
{
|
||||||
rotation = data.readInt();
|
rotation = data.readInt();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_WRITE)
|
@TileEvent(TileEventType.NETWORK_WRITE)
|
||||||
public void writeToStream_TileCrank(ByteBuf data) throws java.io.IOException
|
public void writeToStream_TileCrank(ByteBuf data)
|
||||||
{
|
{
|
||||||
data.writeInt( rotation );
|
data.writeInt( rotation );
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,6 @@ import appeng.api.config.Upgrades;
|
||||||
import appeng.api.implementations.IUpgradeableHost;
|
import appeng.api.implementations.IUpgradeableHost;
|
||||||
import appeng.api.storage.ICellWorkbenchItem;
|
import appeng.api.storage.ICellWorkbenchItem;
|
||||||
import appeng.api.util.IConfigManager;
|
import appeng.api.util.IConfigManager;
|
||||||
import appeng.api.util.IConfigurableObject;
|
|
||||||
import appeng.tile.AEBaseTile;
|
import appeng.tile.AEBaseTile;
|
||||||
import appeng.tile.TileEvent;
|
import appeng.tile.TileEvent;
|
||||||
import appeng.tile.events.TileEventType;
|
import appeng.tile.events.TileEventType;
|
||||||
|
@ -23,7 +22,7 @@ import appeng.tile.inventory.InvOperation;
|
||||||
import appeng.util.ConfigManager;
|
import appeng.util.ConfigManager;
|
||||||
import appeng.util.IConfigManagerHost;
|
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 );
|
final AppEngInternalInventory cell = new AppEngInternalInventory( this, 1 );
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class TileCharger extends AENetworkPowerTile implements ICrankable
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_READ)
|
@TileEvent(TileEventType.NETWORK_READ)
|
||||||
public boolean readFromStream_TileCharger(ByteBuf data) throws IOException
|
public boolean readFromStream_TileCharger(ByteBuf data)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,13 +18,12 @@ import appeng.tile.AEBaseInvTile;
|
||||||
import appeng.tile.TileEvent;
|
import appeng.tile.TileEvent;
|
||||||
import appeng.tile.events.TileEventType;
|
import appeng.tile.events.TileEventType;
|
||||||
import appeng.tile.inventory.AppEngInternalInventory;
|
import appeng.tile.inventory.AppEngInternalInventory;
|
||||||
import appeng.tile.inventory.IAEAppEngInventory;
|
|
||||||
import appeng.tile.inventory.InvOperation;
|
import appeng.tile.inventory.InvOperation;
|
||||||
import appeng.util.ConfigManager;
|
import appeng.util.ConfigManager;
|
||||||
import appeng.util.IConfigManagerHost;
|
import appeng.util.IConfigManagerHost;
|
||||||
import appeng.util.Platform;
|
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 };
|
final int[] sides = new int[] { 0, 1 };
|
||||||
|
|
|
@ -12,7 +12,6 @@ import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
import appeng.api.config.Actionable;
|
import appeng.api.config.Actionable;
|
||||||
import appeng.api.config.Upgrades;
|
import appeng.api.config.Upgrades;
|
||||||
import appeng.api.implementations.tiles.ISegmentedInventory;
|
|
||||||
import appeng.api.implementations.tiles.ITileStorageMonitorable;
|
import appeng.api.implementations.tiles.ITileStorageMonitorable;
|
||||||
import appeng.api.networking.IGridNode;
|
import appeng.api.networking.IGridNode;
|
||||||
import appeng.api.networking.crafting.ICraftingLink;
|
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.AECableType;
|
||||||
import appeng.api.util.DimensionalCoord;
|
import appeng.api.util.DimensionalCoord;
|
||||||
import appeng.api.util.IConfigManager;
|
import appeng.api.util.IConfigManager;
|
||||||
import appeng.api.util.IConfigurableObject;
|
|
||||||
import appeng.helpers.DualityInterface;
|
import appeng.helpers.DualityInterface;
|
||||||
import appeng.helpers.IInterfaceHost;
|
import appeng.helpers.IInterfaceHost;
|
||||||
import appeng.helpers.IPriorityHost;
|
import appeng.helpers.IPriorityHost;
|
||||||
|
@ -45,8 +43,8 @@ import appeng.util.inv.IInventoryDestination;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
|
||||||
public class TileInterface extends AENetworkInvTile implements IGridTickable, ISegmentedInventory, ITileStorageMonitorable, IStorageMonitorable,
|
public class TileInterface extends AENetworkInvTile implements IGridTickable, ITileStorageMonitorable, IStorageMonitorable,
|
||||||
IInventoryDestination, IInterfaceHost, IConfigurableObject, IPriorityHost
|
IInventoryDestination, IInterfaceHost, IPriorityHost
|
||||||
{
|
{
|
||||||
|
|
||||||
ForgeDirection pointAt = ForgeDirection.UNKNOWN;
|
ForgeDirection pointAt = ForgeDirection.UNKNOWN;
|
||||||
|
|
|
@ -4,7 +4,6 @@ import appeng.helpers.Splotch;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -90,13 +89,13 @@ public class TilePaint extends AEBaseTile
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_WRITE)
|
@TileEvent(TileEventType.NETWORK_WRITE)
|
||||||
public void writeToStream_TilePaint(ByteBuf data) throws IOException
|
public void writeToStream_TilePaint(ByteBuf data)
|
||||||
{
|
{
|
||||||
writeBuffer( data );
|
writeBuffer( data );
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_READ)
|
@TileEvent(TileEventType.NETWORK_READ)
|
||||||
public boolean readFromStream_TilePaint(ByteBuf data) throws IOException
|
public boolean readFromStream_TilePaint(ByteBuf data)
|
||||||
{
|
{
|
||||||
readBuffer( data );
|
readBuffer( data );
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -2,7 +2,6 @@ package appeng.tile.misc;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
@ -35,7 +34,7 @@ public class TileQuartzGrowthAccelerator extends AENetworkTile implements IPower
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_READ)
|
@TileEvent(TileEventType.NETWORK_READ)
|
||||||
public boolean readFromStream_TileQuartzGrowthAccelerator(ByteBuf data) throws IOException
|
public boolean readFromStream_TileQuartzGrowthAccelerator(ByteBuf data)
|
||||||
{
|
{
|
||||||
boolean hadPower = hasPower;
|
boolean hadPower = hasPower;
|
||||||
hasPower = data.readBoolean();
|
hasPower = data.readBoolean();
|
||||||
|
@ -43,7 +42,7 @@ public class TileQuartzGrowthAccelerator extends AENetworkTile implements IPower
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_WRITE)
|
@TileEvent(TileEventType.NETWORK_WRITE)
|
||||||
public void writeToStream_TileQuartzGrowthAccelerator(ByteBuf data) throws IOException
|
public void writeToStream_TileQuartzGrowthAccelerator(ByteBuf data)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,7 +3,6 @@ package appeng.tile.misc;
|
||||||
import appeng.helpers.PlayerSecurityWrapper;
|
import appeng.helpers.PlayerSecurityWrapper;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -123,7 +122,7 @@ public class TileSecurity extends AENetworkTile implements ITerminalHost, IAEApp
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_READ)
|
@TileEvent(TileEventType.NETWORK_READ)
|
||||||
public boolean readFromStream_TileSecurity(ByteBuf data) throws IOException
|
public boolean readFromStream_TileSecurity(ByteBuf data)
|
||||||
{
|
{
|
||||||
boolean wasActive = isActive;
|
boolean wasActive = isActive;
|
||||||
isActive = data.readBoolean();
|
isActive = data.readBoolean();
|
||||||
|
@ -135,7 +134,7 @@ public class TileSecurity extends AENetworkTile implements ITerminalHost, IAEApp
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_WRITE)
|
@TileEvent(TileEventType.NETWORK_WRITE)
|
||||||
public void writeToStream_TileSecurity(ByteBuf data) throws IOException
|
public void writeToStream_TileSecurity(ByteBuf data)
|
||||||
{
|
{
|
||||||
data.writeBoolean( gridProxy.isActive() );
|
data.writeBoolean( gridProxy.isActive() );
|
||||||
data.writeByte( paintedColor.ordinal() );
|
data.writeByte( paintedColor.ordinal() );
|
||||||
|
|
|
@ -2,8 +2,6 @@ package appeng.tile.misc;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
@ -47,7 +45,7 @@ public class TileVibrationChamber extends AENetworkInvTile implements IGridTicka
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_READ)
|
@TileEvent(TileEventType.NETWORK_READ)
|
||||||
public boolean readFromStream_TileVibrationChamber(ByteBuf data) throws IOException
|
public boolean readFromStream_TileVibrationChamber(ByteBuf data)
|
||||||
{
|
{
|
||||||
boolean wasOn = isOn;
|
boolean wasOn = isOn;
|
||||||
isOn = data.readBoolean();
|
isOn = data.readBoolean();
|
||||||
|
@ -55,7 +53,7 @@ public class TileVibrationChamber extends AENetworkInvTile implements IGridTicka
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_WRITE)
|
@TileEvent(TileEventType.NETWORK_WRITE)
|
||||||
public void writeToStream_TileVibrationChamber(ByteBuf data) throws IOException
|
public void writeToStream_TileVibrationChamber(ByteBuf data)
|
||||||
{
|
{
|
||||||
data.writeBoolean( burnTime > 0 );
|
data.writeBoolean( burnTime > 0 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,6 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
import appeng.api.config.Actionable;
|
import appeng.api.config.Actionable;
|
||||||
import appeng.api.networking.GridFlags;
|
import appeng.api.networking.GridFlags;
|
||||||
import appeng.api.networking.energy.IAEPowerStorage;
|
|
||||||
import appeng.api.networking.events.MENetworkControllerChange;
|
import appeng.api.networking.events.MENetworkControllerChange;
|
||||||
import appeng.api.networking.events.MENetworkEventSubscribe;
|
import appeng.api.networking.events.MENetworkEventSubscribe;
|
||||||
import appeng.api.networking.events.MENetworkPowerStatusChange;
|
import appeng.api.networking.events.MENetworkPowerStatusChange;
|
||||||
|
@ -20,7 +19,7 @@ import appeng.tile.grid.AENetworkPowerTile;
|
||||||
import appeng.tile.inventory.AppEngInternalInventory;
|
import appeng.tile.inventory.AppEngInternalInventory;
|
||||||
import appeng.tile.inventory.InvOperation;
|
import appeng.tile.inventory.InvOperation;
|
||||||
|
|
||||||
public class TileController extends AENetworkPowerTile implements IAEPowerStorage
|
public class TileController extends AENetworkPowerTile
|
||||||
{
|
{
|
||||||
|
|
||||||
boolean isValid = false;
|
boolean isValid = false;
|
||||||
|
|
|
@ -2,7 +2,6 @@ package appeng.tile.networking;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
|
@ -62,7 +61,7 @@ public class TileWireless extends AENetworkInvTile implements IWirelessAccessPoi
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_READ)
|
@TileEvent(TileEventType.NETWORK_READ)
|
||||||
public boolean readFromStream_TileWireless(ByteBuf data) throws IOException
|
public boolean readFromStream_TileWireless(ByteBuf data)
|
||||||
{
|
{
|
||||||
int old = clientFlags;
|
int old = clientFlags;
|
||||||
clientFlags = data.readByte();
|
clientFlags = data.readByte();
|
||||||
|
@ -71,7 +70,7 @@ public class TileWireless extends AENetworkInvTile implements IWirelessAccessPoi
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_WRITE)
|
@TileEvent(TileEventType.NETWORK_WRITE)
|
||||||
public void writeToStream_TileWireless(ByteBuf data) throws IOException
|
public void writeToStream_TileWireless(ByteBuf data)
|
||||||
{
|
{
|
||||||
clientFlags = 0;
|
clientFlags = 0;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ package appeng.tile.qnb;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
|
@ -63,7 +62,7 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_WRITE)
|
@TileEvent(TileEventType.NETWORK_WRITE)
|
||||||
public void writeToStream_TileQuantumBridge(ByteBuf data) throws IOException
|
public void writeToStream_TileQuantumBridge(ByteBuf data)
|
||||||
{
|
{
|
||||||
int out = constructed;
|
int out = constructed;
|
||||||
|
|
||||||
|
@ -77,7 +76,7 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_READ)
|
@TileEvent(TileEventType.NETWORK_READ)
|
||||||
public boolean readFromStream_TileQuantumBridge(ByteBuf data) throws IOException
|
public boolean readFromStream_TileQuantumBridge(ByteBuf data)
|
||||||
{
|
{
|
||||||
int oldValue = constructed;
|
int oldValue = constructed;
|
||||||
constructed = data.readByte();
|
constructed = data.readByte();
|
||||||
|
|
|
@ -20,7 +20,6 @@ import appeng.api.networking.spatial.ISpatialCache;
|
||||||
import appeng.api.util.AECableType;
|
import appeng.api.util.AECableType;
|
||||||
import appeng.api.util.DimensionalCoord;
|
import appeng.api.util.DimensionalCoord;
|
||||||
import appeng.hooks.TickHandler;
|
import appeng.hooks.TickHandler;
|
||||||
import appeng.items.storage.ItemSpatialStorageCell;
|
|
||||||
import appeng.me.cache.SpatialPylonCache;
|
import appeng.me.cache.SpatialPylonCache;
|
||||||
import appeng.tile.TileEvent;
|
import appeng.tile.TileEvent;
|
||||||
import appeng.tile.events.TileEventType;
|
import appeng.tile.events.TileEventType;
|
||||||
|
|
|
@ -2,7 +2,6 @@ package appeng.tile.spatial;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
@ -54,7 +53,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_READ)
|
@TileEvent(TileEventType.NETWORK_READ)
|
||||||
public boolean readFromStream_TileSpatialPylon(ByteBuf data) throws IOException
|
public boolean readFromStream_TileSpatialPylon(ByteBuf data)
|
||||||
{
|
{
|
||||||
int old = displayBits;
|
int old = displayBits;
|
||||||
displayBits = data.readByte();
|
displayBits = data.readByte();
|
||||||
|
@ -62,7 +61,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_WRITE)
|
@TileEvent(TileEventType.NETWORK_WRITE)
|
||||||
public void writeToStream_TileSpatialPylon(ByteBuf data) throws IOException
|
public void writeToStream_TileSpatialPylon(ByteBuf data)
|
||||||
{
|
{
|
||||||
data.writeByte( displayBits );
|
data.writeByte( displayBits );
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@ import appeng.api.networking.IGridNode;
|
||||||
import appeng.api.networking.security.*;
|
import appeng.api.networking.security.*;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -168,7 +167,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_WRITE)
|
@TileEvent(TileEventType.NETWORK_WRITE)
|
||||||
public void writeToStream_TileChest(ByteBuf data) throws IOException
|
public void writeToStream_TileChest(ByteBuf data)
|
||||||
{
|
{
|
||||||
if ( worldObj.getTotalWorldTime() - lastStateChange > 8 )
|
if ( worldObj.getTotalWorldTime() - lastStateChange > 8 )
|
||||||
state = 0;
|
state = 0;
|
||||||
|
@ -199,7 +198,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_READ)
|
@TileEvent(TileEventType.NETWORK_READ)
|
||||||
public boolean readFromStream_TileChest(ByteBuf data) throws IOException
|
public boolean readFromStream_TileChest(ByteBuf data)
|
||||||
{
|
{
|
||||||
int oldState = state;
|
int oldState = state;
|
||||||
ItemStack oldType = storageType;
|
ItemStack oldType = storageType;
|
||||||
|
|
|
@ -2,7 +2,6 @@ package appeng.tile.storage;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -88,7 +87,7 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive, IPrior
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_WRITE)
|
@TileEvent(TileEventType.NETWORK_WRITE)
|
||||||
public void writeToStream_TileDrive(ByteBuf data) throws IOException
|
public void writeToStream_TileDrive(ByteBuf data)
|
||||||
{
|
{
|
||||||
if ( worldObj.getTotalWorldTime() - lastStateChange > 8 )
|
if ( worldObj.getTotalWorldTime() - lastStateChange > 8 )
|
||||||
state = 0;
|
state = 0;
|
||||||
|
@ -107,7 +106,7 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive, IPrior
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_READ)
|
@TileEvent(TileEventType.NETWORK_READ)
|
||||||
public boolean readFromStream_TileDrive(ByteBuf data) throws IOException
|
public boolean readFromStream_TileDrive(ByteBuf data)
|
||||||
{
|
{
|
||||||
int oldState = state;
|
int oldState = state;
|
||||||
state = data.readInt();
|
state = data.readInt();
|
||||||
|
|
|
@ -2,8 +2,6 @@ package appeng.tile.storage;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
@ -21,13 +19,13 @@ public class TileSkyChest extends AEBaseInvTile
|
||||||
final AppEngInternalInventory inv = new AppEngInternalInventory( this, 9 * 4 );
|
final AppEngInternalInventory inv = new AppEngInternalInventory( this, 9 * 4 );
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_WRITE)
|
@TileEvent(TileEventType.NETWORK_WRITE)
|
||||||
public void writeToStream_TileSkyChest(ByteBuf data) throws IOException
|
public void writeToStream_TileSkyChest(ByteBuf data)
|
||||||
{
|
{
|
||||||
data.writeBoolean( playerOpen > 0 );
|
data.writeBoolean( playerOpen > 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@TileEvent(TileEventType.NETWORK_READ)
|
@TileEvent(TileEventType.NETWORK_READ)
|
||||||
public boolean readFromStream_TileSkyChest(ByteBuf data) throws IOException
|
public boolean readFromStream_TileSkyChest(ByteBuf data)
|
||||||
{
|
{
|
||||||
int wasOpen = playerOpen;
|
int wasOpen = playerOpen;
|
||||||
playerOpen = data.readBoolean() ? 1 : 0;
|
playerOpen = data.readBoolean() ? 1 : 0;
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
package appeng.util.inv;
|
package appeng.util.inv;
|
||||||
|
|
||||||
import net.minecraft.inventory.IInventory;
|
|
||||||
import net.minecraft.inventory.ISidedInventory;
|
import net.minecraft.inventory.ISidedInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
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;
|
private final ForgeDirection dir;
|
||||||
|
|
|
@ -92,7 +92,7 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
|
||||||
countRequestable += i;
|
countRequestable += i;
|
||||||
}
|
}
|
||||||
|
|
||||||
void putPacketValue(ByteBuf tag, long num) throws IOException
|
void putPacketValue(ByteBuf tag, long num)
|
||||||
{
|
{
|
||||||
if ( num <= 255 )
|
if ( num <= 255 )
|
||||||
tag.writeByte( (byte) (num + Byte.MIN_VALUE) );
|
tag.writeByte( (byte) (num + Byte.MIN_VALUE) );
|
||||||
|
@ -104,7 +104,7 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
|
||||||
tag.writeLong( num );
|
tag.writeLong( num );
|
||||||
}
|
}
|
||||||
|
|
||||||
static long getPacketValue(byte type, ByteBuf tag) throws IOException
|
static long getPacketValue(byte type, ByteBuf tag)
|
||||||
{
|
{
|
||||||
if ( type == 0 )
|
if ( type == 0 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 38dd8952cea1985838347f741b895368d41948e3
|
Subproject commit b0a451fecd97583367e12a98439dafac29e7ae97
|
Loading…
Reference in a new issue