diff --git a/client/gui/implementations/GuiMEMonitorable.java b/client/gui/implementations/GuiMEMonitorable.java index 27a53081..41a1e996 100644 --- a/client/gui/implementations/GuiMEMonitorable.java +++ b/client/gui/implementations/GuiMEMonitorable.java @@ -184,7 +184,6 @@ public class GuiMEMonitorable extends AEBaseMEGui { fontRenderer.drawString( myName.getLocal(), 8, 6, 4210752 ); fontRenderer.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 ); - fontRenderer.drawString( GuiText.SecurityCardEditor.getLocal(), 8, ySize - 96 + 3 - reservedSpace, 4210752 ); } } diff --git a/client/gui/implementations/GuiSecurity.java b/client/gui/implementations/GuiSecurity.java index 83d53e39..d2c24df1 100644 --- a/client/gui/implementations/GuiSecurity.java +++ b/client/gui/implementations/GuiSecurity.java @@ -7,6 +7,7 @@ import appeng.api.config.SecurityPermissions; import appeng.api.storage.IStorageMonitorable; import appeng.client.gui.widgets.GuiToggleButton; import appeng.container.implementations.ContainerSecurity; +import appeng.core.localization.GuiText; import appeng.core.sync.packets.PacketValueConfig; import cpw.mods.fml.common.network.PacketDispatcher; @@ -86,4 +87,11 @@ public class GuiSecurity extends GuiMEMonitorable return "guis/security.png"; } + @Override + public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) + { + super.drawFG( offsetX, offsetY, mouseX, mouseY ); + fontRenderer.drawString( GuiText.SecurityCardEditor.getLocal(), 8, ySize - 96 + 3 - reservedSpace, 4210752 ); + } + } diff --git a/container/slot/SlotRestrictedInput.java b/container/slot/SlotRestrictedInput.java index 3e63a1ba..623c45b1 100644 --- a/container/slot/SlotRestrictedInput.java +++ b/container/slot/SlotRestrictedInput.java @@ -13,6 +13,7 @@ import appeng.api.implementations.items.ISpatialStorageCell; import appeng.api.implementations.items.IStorageComponent; import appeng.api.implementations.items.IUpgradeModule; import appeng.api.storage.ICellWorkbenchItem; +import appeng.parts.automation.UpgradeInventory; import appeng.util.Platform; public class SlotRestrictedInput extends AppEngSlot @@ -92,7 +93,7 @@ public class SlotRestrictedInput extends AppEngSlot if ( i.getItem() == null ) return false; - if ( !inventory.isItemValidForSlot( this.getSlotIndex(), i ) ) + if ( !inventory.isItemValidForSlot( this.getSlotIndex(), i ) && !(inventory instanceof UpgradeInventory) ) return false; IAppEngApi api = AEApi.instance(); diff --git a/core/Registration.java b/core/Registration.java index 77150dc1..69a8fb27 100644 --- a/core/Registration.java +++ b/core/Registration.java @@ -24,17 +24,10 @@ import appeng.api.util.AEColor; import appeng.api.util.AEItemDefinition; import appeng.block.grindstone.BlockCrank; import appeng.block.grindstone.BlockGrinder; -import appeng.block.mac.BlockContainmentWall; -import appeng.block.mac.BlockCraftingAccelerator; -import appeng.block.mac.BlockHeatVent; -import appeng.block.mac.BlockPatternProvider; import appeng.block.misc.BlockCellWorkbench; import appeng.block.misc.BlockCharger; import appeng.block.misc.BlockCondenser; -import appeng.block.misc.BlockInscriber; import appeng.block.misc.BlockInterface; -import appeng.block.misc.BlockNetworkEmitter; -import appeng.block.misc.BlockQuartzCrystalizer; import appeng.block.misc.BlockQuartzTorch; import appeng.block.misc.BlockSecurity; import appeng.block.misc.BlockTinyTNT; @@ -45,7 +38,6 @@ import appeng.block.networking.BlockCreativeEnergyCell; import appeng.block.networking.BlockDenseEnergyCell; import appeng.block.networking.BlockEnergyAcceptor; import appeng.block.networking.BlockEnergyCell; -import appeng.block.networking.BlockWireless; import appeng.block.qnb.BlockQuantumLinkChamber; import appeng.block.qnb.BlockQuantumRing; import appeng.block.solids.BlockFluix; @@ -82,7 +74,6 @@ import appeng.helpers.AETrading; import appeng.helpers.PartPlacement; import appeng.helpers.QuartzWorldGen; import appeng.helpers.TickHandler; -import appeng.items.ItemEncodedPattern; import appeng.items.materials.ItemMaterial; import appeng.items.materials.MaterialType; import appeng.items.parts.ItemFacade; @@ -98,7 +89,6 @@ import appeng.items.tools.powered.ToolChargedStaff; import appeng.items.tools.powered.ToolEntropyManipulator; import appeng.items.tools.powered.ToolMassCannon; import appeng.items.tools.powered.ToolPortableCell; -import appeng.items.tools.powered.ToolWirelessTerminal; import appeng.items.tools.quartz.ToolQuartzAxe; import appeng.items.tools.quartz.ToolQuartzCuttingKnife; import appeng.items.tools.quartz.ToolQuartzHoe; @@ -229,17 +219,17 @@ public class Registration blocks.blockGrindStone = addFeature( BlockGrinder.class ); blocks.blockCrankHandle = addFeature( BlockCrank.class ); - blocks.blockInscriber = addFeature( BlockInscriber.class ); - blocks.blockWireless = addFeature( BlockWireless.class ); + // blocks.blockInscriber = addFeature( BlockInscriber.class ); + // blocks.blockWireless = addFeature( BlockWireless.class ); blocks.blockTinyTNT = addFeature( BlockTinyTNT.class ); - blocks.blockQuartzCrystalizer = addFeature( BlockQuartzCrystalizer.class ); - blocks.blockNetworkEmitter = addFeature( BlockNetworkEmitter.class ); + // blocks.blockQuartzCrystalizer = addFeature( BlockQuartzCrystalizer.class ); + // blocks.blockNetworkEmitter = addFeature( BlockNetworkEmitter.class ); - blocks.blockPatternProvider = addFeature( BlockPatternProvider.class ); - blocks.blockAssemblerFieldWall = addFeature( BlockContainmentWall.class ); - blocks.blockHeatVent = addFeature( BlockHeatVent.class ); - blocks.blockCraftingCPU = addFeature( BlockCraftingAccelerator.class ); + // blocks.blockPatternProvider = addFeature( BlockPatternProvider.class ); + // blocks.blockAssemblerFieldWall = addFeature( BlockContainmentWall.class ); + // blocks.blockHeatVent = addFeature( BlockHeatVent.class ); + // blocks.blockCraftingCPU = addFeature( BlockCraftingAccelerator.class ); blocks.blockQuantumRing = addFeature( BlockQuantumRing.class ); blocks.blockQuantumLink = addFeature( BlockQuantumLinkChamber.class ); @@ -263,7 +253,7 @@ public class Registration blocks.blockSecurity = addFeature( BlockSecurity.class ); - items.itemEncodedAsemblerPattern = addFeature( ItemEncodedPattern.class ); + // items.itemEncodedAsemblerPattern = addFeature( ItemEncodedPattern.class ); items.itemCellCreative = addFeature( ItemCreativeStorageCell.class ); @@ -296,7 +286,7 @@ public class Registration items.itemMemoryCard = addFeature( ToolMemoryCard.class ); items.itemChargedStaff = addFeature( ToolChargedStaff.class ); items.itemEntropyManipulator = addFeature( ToolEntropyManipulator.class ); - items.itemWirelessTerminal = addFeature( ToolWirelessTerminal.class ); + // items.itemWirelessTerminal = addFeature( ToolWirelessTerminal.class ); items.itemNetworkTool = addFeature( ToolNetworkTool.class ); items.itemPortableCell = addFeature( ToolPortableCell.class ); items.itemBiometricCard = addFeature( ToolBiometricCard.class ); diff --git a/items/parts/PartType.java b/items/parts/PartType.java index 7608edad..52b8f324 100644 --- a/items/parts/PartType.java +++ b/items/parts/PartType.java @@ -6,9 +6,7 @@ import appeng.api.parts.IPart; import appeng.api.util.AEColor; import appeng.core.features.AEFeature; import appeng.core.localization.GuiText; -import appeng.parts.automation.PartAnnihilationPlane; import appeng.parts.automation.PartExportBus; -import appeng.parts.automation.PartFormationPlane; import appeng.parts.automation.PartImportBus; import appeng.parts.automation.PartLevelEmitter; import appeng.parts.misc.PartCableAnchor; @@ -21,8 +19,6 @@ import appeng.parts.networking.PartCableGlass; import appeng.parts.networking.PartCableSmart; import appeng.parts.networking.PartDenseCable; import appeng.parts.networking.PartQuartzFiber; -import appeng.parts.p2p.PartP2PBCPower; -import appeng.parts.p2p.PartP2PIC2Power; import appeng.parts.p2p.PartP2PItems; import appeng.parts.p2p.PartP2PLiquids; import appeng.parts.p2p.PartP2PRedstone; @@ -65,9 +61,9 @@ public enum PartType LevelEmitter(AEFeature.LevelEmiter, PartLevelEmitter.class), - AnnihilationPlane(AEFeature.AnnihilationPlane, PartAnnihilationPlane.class), + // AnnihilationPlane(AEFeature.AnnihilationPlane, PartAnnihilationPlane.class), - FormationPlane(AEFeature.FormationPlane, PartFormationPlane.class), + // FormationPlane(AEFeature.FormationPlane, PartFormationPlane.class), P2PTunnelME(AEFeature.P2PTunnelME, PartP2PTunnelME.class, GuiText.METunnel), @@ -77,9 +73,9 @@ public enum PartType P2PTunnelLiquids(AEFeature.P2PTunnelLiquids, PartP2PLiquids.class, GuiText.FluidTunnel), - P2PTunnelMJ(AEFeature.P2PTunnelMJ, PartP2PBCPower.class, GuiText.MJTunnel), + // P2PTunnelMJ(AEFeature.P2PTunnelMJ, PartP2PBCPower.class, GuiText.MJTunnel), - P2PTunnelEU(AEFeature.P2PTunnelEU, PartP2PIC2Power.class, GuiText.EUTunnel), + // P2PTunnelEU(AEFeature.P2PTunnelEU, PartP2PIC2Power.class, GuiText.EUTunnel), CraftingMonitor(AEFeature.Crafting, PartCraftingMonitor.class), diff --git a/items/tools/powered/ToolMassCannon.java b/items/tools/powered/ToolMassCannon.java index 0b40f26c..c1ee5b80 100644 --- a/items/tools/powered/ToolMassCannon.java +++ b/items/tools/powered/ToolMassCannon.java @@ -79,20 +79,21 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell if ( cu != null ) shots += cu.getInstalledUpgrades( Upgrades.SPEED ); - for (int sh = 0; sh < shots; sh++) + IMEInventory inv = AEApi.instance().registries().cell().getCellInventory( item, StorageChannel.ITEMS ); + if ( inv != null ) { - extractAEPower( item, 1600 ); - - if ( Platform.isClient() ) - return item; - - IMEInventory inv = AEApi.instance().registries().cell().getCellInventory( item, StorageChannel.ITEMS ); - if ( inv != null ) + IItemList itemList = inv.getAvailableItems( new ItemList() ); + IAEStack aeammo = itemList.getFirstItem(); + if ( aeammo instanceof IAEItemStack ) { - IItemList itemList = inv.getAvailableItems( new ItemList() ); - IAEStack aeammo = itemList.getFirstItem(); - if ( aeammo instanceof IAEItemStack ) + shots = Math.min( shots, (int) aeammo.getStackSize() ); + for (int sh = 0; sh < shots; sh++) { + extractAEPower( item, 1600 ); + + if ( Platform.isClient() ) + return item; + aeammo.setStackSize( 1 ); ItemStack ammo = ((IAEItemStack) aeammo).getItemStack(); if ( ammo == null ) @@ -250,7 +251,8 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell } else { - p.sendChatToPlayer( PlayerMessages.AmmoDepleted.get() ); + if ( Platform.isServer() ) + p.sendChatToPlayer( PlayerMessages.AmmoDepleted.get() ); return item; } } diff --git a/items/tools/powered/ToolPortableCell.java b/items/tools/powered/ToolPortableCell.java index a7431152..1ac8d40a 100644 --- a/items/tools/powered/ToolPortableCell.java +++ b/items/tools/powered/ToolPortableCell.java @@ -85,9 +85,6 @@ public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell, { Item i = requsetedAddition.getItem(); - if ( i instanceof IStorageCell ) - return !((IStorageCell) i).storableInStorageCell(); - return false; } diff --git a/util/item/AEFluidStack.java b/util/item/AEFluidStack.java index f337efd7..7399c0b1 100644 --- a/util/item/AEFluidStack.java +++ b/util/item/AEFluidStack.java @@ -51,7 +51,10 @@ public final class AEFluidStack extends AEStack implements IAEFlu } private AEFluidStack(AEFluidStack is) { + + fluid = is.fluid; stackSize = is.stackSize; + // priority = is.priority; setCraftable( is.isCraftable() ); setCountRequestable( is.getCountRequestable() ); @@ -64,6 +67,10 @@ public final class AEFluidStack extends AEStack implements IAEFlu throw new RuntimeException( "Invalid Itemstack." ); fluid = is.getFluid(); + + if ( fluid == null ) + throw new RuntimeException( "Fluid is null." ); + stackSize = is.amount; setCraftable( false ); setCountRequestable( 0 );