From 974fdde1f52377a054b3ad650d090ad2b3c47704 Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 12 Nov 2013 15:54:05 -0500 Subject: [PATCH] updated api files --- APIs/ic2/api/energy/tile/IMetaDelegate.java | 2 - APIs/ic2/api/item/Items.java | 872 +++++++----------- .../recipe/ICannerBottleRecipeManager.java | 51 - .../recipe/ICannerEnrichRecipeManager.java | 54 -- .../api/recipe/ICraftingRecipeManager.java | 26 - APIs/ic2/api/recipe/ILiquidAcceptManager.java | 10 - APIs/ic2/api/recipe/IListRecipeManager.java | 36 - .../ic2/api/recipe/IMachineRecipeManager.java | 40 - APIs/ic2/api/recipe/IPatternStorage.java | 15 - APIs/ic2/api/recipe/IRecipeInput.java | 31 - APIs/ic2/api/recipe/IScrapboxManager.java | 13 - .../ic2/api/recipe/ISemiFluidFuelManager.java | 32 - APIs/ic2/api/recipe/RecipeInputItemStack.java | 38 - APIs/ic2/api/recipe/RecipeInputOreDict.java | 45 - APIs/ic2/api/recipe/RecipeOutput.java | 21 - APIs/ic2/api/recipe/Recipes.java | 55 -- APIs/ic2/api/tile/ExplosionWhitelist.java | 46 - APIs/ic2/api/tile/IEnergyStorage.java | 61 -- APIs/ic2/api/tile/IWrenchable.java | 59 -- .../TileEntityUniversalElectrical.java | 9 +- .../compatibility/UniversalNetwork.java | 36 +- .../core/UniversalElectricity.java | 3 + .../core/item/ItemElectric.java | 230 +++-- .../core/vector/Quaternion.java | 332 ++++--- .../core/vector/Vector3.java | 16 +- .../prefab/tile/TileEntityElectrical.java | 40 +- 26 files changed, 708 insertions(+), 1465 deletions(-) delete mode 100644 APIs/ic2/api/recipe/ICannerBottleRecipeManager.java delete mode 100644 APIs/ic2/api/recipe/ICannerEnrichRecipeManager.java delete mode 100644 APIs/ic2/api/recipe/ICraftingRecipeManager.java delete mode 100644 APIs/ic2/api/recipe/ILiquidAcceptManager.java delete mode 100644 APIs/ic2/api/recipe/IListRecipeManager.java delete mode 100644 APIs/ic2/api/recipe/IMachineRecipeManager.java delete mode 100644 APIs/ic2/api/recipe/IPatternStorage.java delete mode 100644 APIs/ic2/api/recipe/IRecipeInput.java delete mode 100644 APIs/ic2/api/recipe/IScrapboxManager.java delete mode 100644 APIs/ic2/api/recipe/ISemiFluidFuelManager.java delete mode 100644 APIs/ic2/api/recipe/RecipeInputItemStack.java delete mode 100644 APIs/ic2/api/recipe/RecipeInputOreDict.java delete mode 100644 APIs/ic2/api/recipe/RecipeOutput.java delete mode 100644 APIs/ic2/api/recipe/Recipes.java delete mode 100644 APIs/ic2/api/tile/ExplosionWhitelist.java delete mode 100644 APIs/ic2/api/tile/IEnergyStorage.java delete mode 100644 APIs/ic2/api/tile/IWrenchable.java diff --git a/APIs/ic2/api/energy/tile/IMetaDelegate.java b/APIs/ic2/api/energy/tile/IMetaDelegate.java index 8f4e830c..0cb1a34d 100644 --- a/APIs/ic2/api/energy/tile/IMetaDelegate.java +++ b/APIs/ic2/api/energy/tile/IMetaDelegate.java @@ -26,8 +26,6 @@ public interface IMetaDelegate extends IEnergyTile { /** * Get the sub-TileEntities belonging to this Meta TileEntity. * - * @note the list has to be consistent between the EnergyNet Load and Unload events. - * * @return sub-TileEntity array */ List getSubTiles(); diff --git a/APIs/ic2/api/item/Items.java b/APIs/ic2/api/item/Items.java index 5e695160..0d3f7534 100644 --- a/APIs/ic2/api/item/Items.java +++ b/APIs/ic2/api/item/Items.java @@ -42,538 +42,346 @@ public final class Items { /* Possible values: - // ores - copperOre; // Copper Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreCopper, null with enableWorldGenOreCopper=false - tinOre; // Tin Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreTin, null with enableWorldGenOreTin=false - uraniumOre; // Tin Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreUranium, null with enableWorldGenOreUranium=false - leadOre; // Lead Ore Block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreLead, null with enableWorldGenOreLead=false - - // rubber related - - Rubber wood block, meta reflects the state, meta in ItemStack set to 0, ore dictionary: woodRubber (with meta 0), null with enableWorldGenTreeRubber=false - dropped (as an item) -> metadata 0 - block, no resin spot -> metadata 0 or 1 - block, wet resin spot -> metadata 2-5 (according to the side) - block, dry resin spot -> metadata 8-11 (wet state + 6) - - rubberWood; - rubberLeaves; // Rubber Leaves block, currently not meta sensitive, meta in ItemStack set to 0, null with enableWorldGenTreeRubber=false - rubberSapling; // Rubber Sapling block, currently not meta sensitive, meta in ItemStack set to 0, null with enableWorldGenTreeRubber=false - resinSheet; // Resin Sheet block, currently not meta sensitive - rubberTrampoline; // Rubber Trampoline block, meta reflects internal state, meta in ItemStack set to 0 - - // building/storage - ironFence; // Iron Fence block, currently not meta sensitive - - reinforcedStone; // Reinforced Stone block, currently not meta sensitive - reinforcedGlass; // Reinforced Glass block, currently not meta sensitive - reinforcedDoorBlock; // Reinforced Door block, meta reflects the state (see vanilla doors), meta in ItemStack set to 0 - - constructionreinforcedFoam; // Construction Reinforced Foam block, currently not meta sensitive - constructionFoam; // Construction Foam block, currently not meta sensitive - constructionFoamWall; // Construction Foam Wall block, meta = color, implements IPaintableBlock - scaffold; // Scaffold block, meta reflects internal physical model data - ironScaffold; // Scaffold block, meta reflects internal physical model data - - bronzeBlock; // Bronze block, meta sensitive - copperBlock; // Copper block, meta sensitive - tinBlock; // Tin block, meta sensitive - uraniumBlock; // Uranium block, meta sensitive - leadBlock; // Uranium block, meta sensitive - - // cables (when placed as a block, inventory items are different; TE implements IEnergyConductor) - - copperCableBlock; // Copper Cable block, meta sensitive - insulatedCopperCableBlock; // Insulated Copper Cable block, meta sensitive - - goldCableBlock; // Gold Cable block, meta sensitive - insulatedGoldCableBlock; // Insulated Gold Cable block, meta sensitive - doubleInsulatedGoldCableBlock; // Double Insulated Gold Cable block, meta sensitive - - ironCableBlock; // Iron Cable block, meta sensitive - insulatedIronCableBlock; // Insulated Iron Cable block, meta sensitive - doubleInsulatedIronCableBlock; // Double Insulated Iron Cable block, meta sensitive - trippleInsulatedIronCableBlock; // Tripple Insulated Iron Cable block, meta sensitive - - glassFiberCableBlock; // Glass Fiber Cable block, meta sensitive - - tinCableBlock; // Tin Cable block, meta sensitive - insulatedtinCableBlock; // Insulated Tin Cable item, meta sensitive - detectorCableBlock; // Detector Cable block, meta sensitive - splitterCableBlock; // Splitter Cable block, meta sensitive - - // generators + related (TE implements IEnergySource ex. reactorChamber) - - generator; // Generator block, meta sensitive - geothermalGenerator; // Geothermal Generator block, meta sensitive - waterMill; // Water Mill block, meta sensitive - solarPanel; // Solar Panel block, meta sensitive - windMill; // Wind Mill block, meta sensitive - nuclearReactor; // Nuclear Reactor block, meta sensitive - reactorChamber; // Reactor Chamber block, currently not meta sensitive - RTGenerator; // Radioisotope Thermoelectric Generator block, meta sensitive - semifluidGenerator; // Semifluid Generator block, meta sensitive - - - // energy storages (TE implements IEnergySource and IEnergyConductor) - - batBox; // BatBox block, meta sensitive - cesuUnit; // CESU Unit block, meta sensitive - mfeUnit; // MFE Unit block, meta sensitive - mfsUnit; // MFS Unit block, meta sensitive - - // transformers (TE implements IEnergySource and IEnergyConductor) - - lvTransformer; // LV Transformer block, meta sensitive - mvTransformer; // MV Transformer block, meta sensitive - hvTransformer; // HV Transformer block, meta sensitive - evTransformer; // EV Transformer block, meta sensitive - - // machines + related (TE implements IEnergySink ex. machine, miningPipe, miningPipeTip) - - machine; // Machine block, meta sensitive - advancedMachine; // Advanced Machine block, meta sensitive - - ironFurnace; // Iron Furnace block, meta sensitive - electroFurnace; // Electro Furnace block, meta sensitive - macerator; // Macerator block, meta sensitive - extractor; // Extractor block, meta sensitive - compressor; // Compressor block, meta sensitive - canner; // Canner block, meta sensitive - miner; // Miner block, meta sensitive - pump; // Pump block, meta sensitive - magnetizer; // Magnetizer block, meta sensitive - electrolyzer; // Electrolyzer block, meta sensitive - recycler; // Recycler block, meta sensitive - inductionFurnace; // Induction Furnace block, meta sensitive - massFabricator; // Mass Fabricator block, meta sensitive - terraformer; // Terraformer block, meta sensitive - teleporter; // Teleporter block, meta sensitive - teslaCoil; // Tesla Coil block, meta sensitive - luminator; // Passive (dark) Luminator block, meta = facing - activeLuminator; // Active (bright) Luminator block, meta = facing - centrifuge; // Centrifuge block, meta sensitive - metalformer; // MetalFormer block ,meta sensitive - orewashingplant; // Ore Wasching Plant,Meta sensitive - patternstorage; // Pattern Storage,Meta sensitive - scanner; // Scanner,Meta sensitive - replicator; // Replicator,Meta sensitive - - miningPipe; // Mining Pipe block, currently not meta sensitive, meta in ItemStack set to 0 - miningPipeTip; // Mining Pipe Tip block, currently not meta sensitive, meta in ItemStack set to 0 - - - // personal blocks - - personalSafe; // Personal Safe block, meta sensitive - tradeOMat; // Trade-O-Mat block, meta sensitive - energyOMat; // Energy-O-Mat block, meta sensitive - - // explosives - - industrialTnt; // Industrial TNT block, currently not meta sensitive - nuke; // Nuke block, currently not meta sensitive - dynamiteStick; // Dynamite Stick block, meta = placement, meta in ItemStack set to 0 - dynamiteStickWithRemote; // Dynamite Stick with Remote block, meta = placement, meta in ItemStack set to 0 - - // Agriculture Stuff - - crop; // Crop Block, empty, not meta sensitive - cropmatron; // Cropmatron machien block, meta sensititve - - // ----- items ----- - - // rubber + related - resin; // Resin item, currently not meta sensitive - rubber; // Rubber item, currently not meta sensitive, ore dictionary: itemRubber - - FluidCell; - - // Lithium -> Tritium - - reactorLithiumCell; // LithiumCell use in Reaktor, , meta = damage value - TritiumCell; // Tritium, currently not meta sensitive - - // Nuclear Fuel - - UranFuel; // , currently not meta sensitive - MOXFuel; // , currently not meta sensitive - Plutonium; // , currently not meta sensitive - smallPlutonium; // , currently not meta sensitive - Uran235; // , currently not meta sensitive - smallUran235; // , currently not meta sensitive - Uran238; // , currently not meta sensitive - - reactorDepletedUraniumSimple; // Depleted Uranium Cell items, currently not meta sensitive - reactorDepletedUraniumDual; - reactorDepletedUraniumQuad; - reactorDepletedMOXSimple; // Depleted MOX Cell items, currently not meta sensitive - reactorDepletedMOXDual; - reactorDepletedMOXQuad; - reactorMOXSimple; // Depleted MOX Cell items, currently not meta sensitive - reactorMOXDual; - reactorMOXQuad; - RTGPellets; - - - // Recipe Parts - - coil; // Coil, meta sensitive - elemotor; // electric motor, meta sensitive - powerunit; // Item Power Unit, meta sensitive - powerunitsmall; // Item Power Unit, meta sensitive - - - // ItemCasing - - casingcopper; // Copper ItemCasing, meta sensitive - casingtin; // Tin ItemCasing, meta sensitive - casingbronze; // Bronze ItemCasing, meta sensitive - casinggold; // Gold ItemCasing, meta sensitive - casingiron; // Iron ItemCasing, meta sensitive - @Deprecated - casingadviron; // Refined Iron ItemCasing, meta sensitive - casinglead; // Lead ItemCasing, meta sensitive - - // Crushed Ore - crushedIronOre; // Crushed Iron Ore, meta sensitive - crushedCopperOre; // Crushed Copper Ore, meta sensitive - crushedGoldOre; // Crushed Gold Ore, meta sensitive - crushedTinOre; // Crushed Tin Ore, meta sensitive - crushedUraniumOre; // Crushed Uranium Ore, meta sensitive - crushedSilverOre; // Crushed Silver Ore, meta sensitive - crushedLeadOre; // Crushed Lead Ore, meta sensitive - - - //Purify Crushed Ore - purifiedCrushedIronOre; // Purify Crushed Iron Ore, meta sensitive - purifiedCrushedCopperOre; // Purify Crushed Copper Ore, meta sensitive - purifiedCrushedGoldOre; // Purify Crushed Gold Ore, meta sensitive - purifiedCrushedTinOre; // Purify Crushed Tin Ore, meta sensitive - purifiedCrushedUraniumOre; // Purify Crushed Uranium Ore, meta sensitive - purifiedCrushedSilverOre; // Purify Crushed Silver Ore, meta sensitive - purifiedCrushedLeadOre; // Purify Crushed Lead Ore, meta sensitive - - // dusts - stoneDust; - bronzeDust; // Bronze Dust item, meta sensitive, ore dictionary: dustBronze - clayDust; // Clay Dust item, meta sensitive, ore dictionary: dustClay - coalDust; // Coal Dust item, meta sensitive, ore dictionary: dustCoal - copperDust; // Copper Dust item, meta sensitive, ore dictionary: dustCopper - goldDust; // Gold Dust item, meta sensitive, ore dictionary: dustGold - ironDust; // Iron Dust item, meta sensitive, ore dictionary: dustIron - silverDust; // Silver Dust item, meta sensitive, ore dictionary: dustSilver - tinDust; // Tin Dust item, meta sensitive, ore dictionary: dustTin - hydratedCoalDust; // Hydrated Coal Dust item, meta sensitive - leadDust; // Lead Dust item, meta sensitive, ore dictionary: dustLead - obsidianDust; // Obsidian Dust item, meta sensitive, ore dictionary: dustObsidian - lapiDust; // Lapi Dust item, meta sensitive, ore dictionary: dustLapi - sulfurDust; // Sulfur Dust item, meta sensitive, ore dictionary: dustSulfur - lithiumDust; // Lithium dust, meta sensitive, ore dictionary: dustLithium - - // small dusts - - smallIronDust; // Small Iron Dust item, meta sensitive - smallCopperDust; // Small Copper Dust item, meta sensitive - smallGoldDust; // Small Gold Dust item, meta sensitive - smallTinDust; // Small Tin Dust item, meta sensitive - smallSilverDust; // Small Silver Dust item, meta sensitive - smallLeadDust; // Small Lead Dust item, meta sensitive - smallSulfurDust; // Small Sulfur Dust item, meta sensitive - smallLithiumDust; // Small Lithium Dust item, meta sensitive - - - // ingots - @Deprecated - refinedIronIngot; // Refined Iron Ingot item, currently not meta sensitive, ore dictionary: ingotRefinedIron - copperIngot; // Copper Ingot item, currently not meta sensitive, ore dictionary: ingotCopper - tinIngot; // Tin Ingot item, currently not meta sensitive, ore dictionary: ingotTin - bronzeIngot; // Bronze Ingot item, currently not meta sensitive, ore dictionary: ingotBronze - mixedMetalIngot; // Mixed Metal Ingot item, currently not meta sensitive - leadIngot; // Lead Ingot item, currently not meta sensitive - - - // tools/weapons (without electric tools) - treetap; // Treetap item, meta = damage value - wrench; // Wrench item, meta = damage value - cutter; // Insulation Cutter item, meta = damage value - constructionFoamSprayer; // Construction Foam Sprayer item, meta = charges (as of v1.45) - - bronzePickaxe; // Bronze Pickaxe item, meta = damage value - bronzeAxe; // Bronze Axe item, meta = damage value - bronzeSword; // Bronze Sword item, meta = damage value - bronzeShovel; // Bronze Shovel item, meta = damage value - bronzeHoe; // Bronze Hoe item, meta = damage value - - ForgeHammer; // Refine Iron Hammer item, meta = damage value - - // el. tools/devices/weapons - miningDrill; // Mining Drill item, meta = damage value for charge level - diamondDrill; // Diamond Tipped Mining Drill item, meta = damage value for charge level - chainsaw; // Chainsaw item, meta = damage value for charge level - electricWrench; // Electric Wrench item, meta = damage value for charge level - electricTreetap; // Electric Treetap item, meta = damage value for charge level - miningLaser; // Mining Laser item, meta = damage value for charge level - - ecMeter; // EC-Mater item, meta = itemdata db index (as of v1.45) - odScanner; // Ore Density Scanner item, meta = damage value for charge level - ovScanner; // Ore Value Scanner item, meta = damage value for charge level - obscurator; // Obscurator item, meta = damage value for charge level - - frequencyTransmitter; // Frequency Transmitter item, meta = itemdata db index (as of v1.45) - - nanoSaber; // Idle Nano Saber item, meta = damage value for charge level - enabledNanoSaber; // Enabled Nano Saber item, meta = damage value for charge level - - toolbox; // Open/Empty toolbox, meta = Open (0) / Closed (1) - - // armor/wearable - hazmatHelmet; // Hazmat Helmet item, meta = damage value - hazmatChestplate; // Hazmat Chestplate item, meta = damage value - hazmatLeggings; // Hazmat Leggings item, meta = damage value - hazmatBoots; // Hazmat Boots item, meta = damage value - - bronzeHelmet; // Bronze Helmet Armor item, meta = damage value - bronzeChestplate; // Bronze Chestplate Armor item, meta = damage value - bronzeLeggings; // Bronze Leggings Armor item, meta = damage value - bronzeBoots; // Bronze Boots Armor item, meta = damage value - - compositeArmor; // Composite Armor item, meta = damage value for charge level - - nanoHelmet; // Nano Helmet Armor item, meta = damage value for charge level - nanoBodyarmor; // Nano Bodyarmor item, meta = damage value for charge level - nanoLeggings; // Nano Leggings Armor item, meta = damage value for charge level - nanoBoots; // Nano Boots Armor item, meta = damage value for charge level - - quantumHelmet; // Quantum Helmet Armor item, meta = damage value for charge level - quantumBodyarmor; // Quantum Bodyarmor item, meta = damage value for charge level - quantumLeggings; // Quantum Leggings Armor item, meta = damage value for charge level - quantumBoots; // Quantum Boots Armor item, meta = damage value for charge level - - jetpack; // Jetpack item, meta = damage value for fuel level - electricJetpack; // Electric Jetpack item, meta = damage value for charge level - - batPack; // BatPack item, meta = damage value for charge level - advbatPack; // Adv.BatPack item, meta = damage value for charge level - lapPack; // LapPack item, meta = damage value for charge level - energyPack; // EnergyPack item, meta = damage value for charge level - - cfPack; // CF Pack item, meta = charges (as of v1.45) - solarHelmet; // Solar Helmet, currently not meta sensitive - staticBoots; // Static Boots, currently not meta sensitive - nightvisionGoggles; // Nightvision Goggles, meta = damage value for charge level - - // batteries - reBattery; // Empty RE Battery item, currently not meta sensitive - chargedReBattery; // RE Battery item, meta = damage value for charge level - advBattery; // Adv Batteryitem, meta = damage value for charge level - energyCrystal; // Energy Crystal item, meta = damage value for charge level - lapotronCrystal; // Lapotron Crystal item, meta = damage value for charge level - suBattery; // SU Battery item, meta = damage value for charge level - - // cables - copperCableItem; // Copper Cable item, meta sensitive - insulatedCopperCableItem; // Insulated Copper Cable item, meta sensitive - - goldCableItem; // Gold Cable item, meta sensitive - insulatedGoldCableItem; // Insulated Gold Cable item, meta sensitive - - @Deprecated - doubleInsulatedGoldCableItem; // Double Insulated Gold Cable item, meta sensitive - - ironCableItem; // Iron Cable item, meta sensitive - insulatedIronCableItem; // Insulated Iron Cable item, meta sensitive - - @Deprecated - doubleInsulatedIronCableItem; // Double Insulated Iron Cable item, meta sensitive - @Deprecated - trippleInsulatedIronCableItem; // Tripple Insulated Iron Cable item, meta sensitive - insulatedTinCableItem; - glassFiberCableItem; // Glass Fiber Cable item, meta sensitive - tinCableItem; // Tin Cable item, meta sensitive - - - detectorCableItem; // Detector Cable item, meta sensitive - splitterCableItem; // Splitter Cable item, meta sensitive - - // cells/containers (without reactor components) - - cell; // Empty Cell item, meta sensitive - lavaCell; // Lava Cell item, meta sensitive - waterCell; // Water Cell item, meta sensitive - UuMatterCell; // UUMatter Cell item, meta sensitive - CFCell; // constructionFoam Cell item, meta sensitive - - - fuelRod; // Empy Fuel Rod item, currently not meta sensitive - hydratedCoalCell; // Hydrated Coal Cell item, currently not meta sensitive - bioCell; // Bio Cell item, currently not meta sensitive - coalfuelCell; // Coalfuel Cell item, currently not meta sensitive - biofuelCell; // Biofuel Cell item, currently not meta sensitive - electrolyzedWaterCell; // Electrolyzed Water Cell item, currently not meta sensitive - airCell; // Compressed Air item, currently not meta sensitive - - fuelCan; // Empty Fuel Can item, currently not meta sensitive - filledFuelCan; // Fuel Can item, meta = fuel value (as of v1.45) - - tinCan; // Empty Tin Can item, currently not meta sensitive - filledTinCan; // Filled Tin Can item, currently not meta sensitive - - // reactor components - reactorUraniumSimple; // Uranium Cell items, meta = consumed uranium ticks - reactorUraniumDual; - reactorUraniumQuad; - - reactorCoolantSimple; - reactorCoolantTriple ; // Coolant Cell item, NBT for heat-storage, meta is 0-10000 for display - reactorCoolantSix; - - reactorPlating; // Integrated Reactor Plating item, currently not meta sensitive - reactorPlatingHeat; - reactorPlatingExplosive; - - reactorHeatSwitch; // Integrated Heat Disperser item, NBT for heat-storage, meta is 0-10000 for display - reactorHeatSwitchCore; - reactorHeatSwitchSpread; - reactorHeatSwitchDiamond; - - reactorVent; // Heat Venting component, NBT for heat-storage, meta is 0-10000 for display - reactorVentCore; - reactorVentGold; - reactorVentSpread;// Special: Does not store heat - reactorVentDiamond; - - reactorReflector; // Increase efficiency without additional ticks, NBT for heat-storage, meta is 0-10000 for display - reactorReflectorThick; // Increase efficiency without additional ticks, NBT for heat-storage, meta is 0-10000 for display - reactorCondensator; // Consumes redstone to absorb heat, NBT for storage, meta is 0-10000 for display - reactorCondensatorLap; // Consumes redstone/lapis to absorb heat, mNBT for storage, meta is 0-10000 for display - - // terraformer blueprints - terraformerBlueprint; // Empty Terraformer Blueprint item, currently not meta sensitive - cultivationTerraformerBlueprint; // Cultivation Terraformer Blueprint item, currently not meta sensitive - irrigationTerraformerBlueprint; // Irrigation Terraformer Blueprint item, currently not meta sensitive - chillingTerraformerBlueprint; // Chilling Terraformer Blueprint item, currently not meta sensitive - desertificationTerraformerBlueprint; // Desertification Terraformer Blueprint item, currently not meta sensitive - flatificatorTerraformerBlueprint; // Flatificator Terraformer Blueprint item, currently not meta sensitive - mushroomTerraformerBlueprint; // Mushroom Terraformer Blueprint item, currently not meta sensitive - - // diamond chain - coalBall; // Coal Ball item, currently not meta sensitive - compressedCoalBall; // Compressed Coal Ball item, currently not meta sensitive - coalChunk; // Coal Chunk item, currently not meta sensitive - industrialDiamond; // Industrial Diamond item, currently not meta sensitive, DEPRECATED - - // recycler chain - scrap; // Scrap item, currently not meta sensitive - scrapBox; // Scrap Box item, currently not meta sensitive - - // fuel production chain - hydratedCoalClump; // Hydrated Coal Clump item, currently not meta sensitive - plantBall; // Plant Ball item, currently not meta sensitive - compressedPlantBall; // Compressed Plant Ball item, currently not meta sensitive - - // painting - painter; // Painter item, currently not meta sensitive - - blackPainter; // Black Painter item, meta = damage value - redPainter; // Red Painter item, meta = damage value - greenPainter; // Green Painter item, meta = damage value - brownPainter; // Brown Painter item, meta = damage value - bluePainter; // Blue Painter item, meta = damage value - purplePainter; // Purple Painter item, meta = damage value - cyanPainter; // Cyan Painter item, meta = damage value - lightGreyPainter; // Light Grey Painter item, meta = damage value - darkGreyPainter; // Dark Grey Painter item, meta = damage value - pinkPainter; // Pink Painter item, meta = damage value - limePainter; // Lime Painter item, meta = damage value - yellowPainter; // Yellow Painter item, meta = damage value - cloudPainter; // Cloud Painter item, meta = damage value - magentaPainter; // Magenta Painter item, meta = damage value - orangePainter; // Orange Painter item, meta = damage value - whitePainter; // White Painter item, meta = damage value - - // explosives + related - dynamite; // Throwable Dynamite item, currently not meta sensitive - stickyDynamite; // Throwable Sticky Dynamite item, currently not meta sensitive - - remote; // Dynamite Remote item, currently not meta sensitive - - // misc intermediate recipe ingredients - electronicCircuit; // Electronic Circuit item, currently not meta sensitive - advancedCircuit; // Advanced Circuit item, currently not meta sensitive - - advancedAlloy; // Advanced Alloy item, currently not meta sensitive - - carbonFiber; // Raw Carbon Fiber item, currently not meta sensitive - carbonMesh; // Raw Carbon Mesh item, currently not meta sensitive - carbonPlate; // Carbon Plate item, currently not meta sensitive - - matter; // UUA item, currently not meta sensitive - iridiumOre; // Iridium Ore item, currently not meta sensitive - iridiumPlate; // Iridium Plate item, currently not meta sensitive - - - // Metal Plates - - platecopper; // Metal plate item, meta sensitive - platetin; // Metal plate item, meta sensitive - platebronze; // Metal plate item, meta sensitive - plategold; // Metal plate item, meta sensitive - plateiron; // Metal plate item, meta sensitive - platelead; // Metal plate item, meta sensitive - platelapi; // Metal plate item, meta sensitive - plateobsidian; // Metal plate item, meta sensitive - plateadviron; // Metal plate item, meta sensitive - - // Metal Dense Plates - denseplatecopper; // Metal dense plate item, meta sensitive - denseplatetin; // Metal dense plate item, meta sensitive - denseplatebronze; // Metal dense plate item, meta sensitive - denseplategold; // Metal dense plate item, meta sensitive - denseplateiron; // Metal dense plate item, meta sensitive - @Deprecated - denseplateadviron; // Metal dense plate item, meta sensitive - denseplatelead; // Metal dense plate item, meta sensitive - denseplatelapi; // Metal dense plate item, meta sensitive - denseplateobsidian; // Metal dense plate item, meta sensitive - - - - // upgrade modules - overclockerUpgrade; // overclocker upgrade item, meta sensitive - transformerUpgrade; // transformer upgrade item, meta sensitive - energyStorageUpgrade; // energy storage upgrade item, meta sensitive - ejectorUpgrade; // ejector upgrade item, meta sensitive - - // misc - coin; // Coin item, currently not meta sensitive - reinforcedDoor; // Reinforced Door item, currently not meta sensitive - constructionFoamPowder; // Construction Foam Powder item, currently not meta sensitive - grinPowder; // Poisonous ingrident, currently not meta sensitive - debug; // Debug item, currently not meta sensitive - boatCarbon; // Carbon Fiber Canoe item, meta sensitive - boatRubber; // Rubber Dinghy item, meta sensitive - boatRubberBroken; // Damaged Rubber Dinghy item, meta sensitive - boatElectric; // Electric Boat item, meta sensitive - - //Agriculture - cropSeed; // Crop seeds, stuff stored in NBT, don't use for crafting recipes! - cropnalyzer; // Cropnalyzer handheld device - fertilizer; // Basic IC2Item, used to provide nutrients toCropBlocks - hydratingCell; // Cell used to hydrate Crops, meta = Content, 0= Full, 9999 = Near empty - electricHoe; // Electric Hoe, Metadata indicates charge level - terraWart; // Mystic opposite of NEtherWart, cures StatusEffects, simply consumeable - weedEx; // Spraying can of WEED-EX, meta indicates usages left - - //Boozeception - mugEmpty; // Simple stone mug - coffeeBeans; // Harvested CoffeeBeans - coffeePowder; // Processed Coffee Beans, used to craft drinkable Coffee - mugCoffee; // Mug of Coffee, Meta indicates status 0 = cold, 1 = Normal, 2 = Sugar'd - hops; // Hops, harvested freshly from crop - barrel; // Carried Barrel, metadata encrypts the information about the liquid inside - blockBarrel; // Unobtainable "placed barrel", TileEntity controlling the Fermentation process - mugBooze; // Mug filled with booze, metadata encrypts the information about the liquid inside + ----- blocks ----- + + ores + copperOre Copper Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreCopper, null with enableWorldGenOreCopper=false + tinOre Tin Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreTin, null with enableWorldGenOreTin=false + uraniumOre Tin Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreUranium, null with enableWorldGenOreUranium=false + + rubber related + Rubber wood block, meta reflects the state, meta in ItemStack set to 0, ore dictionary: woodRubber (with meta 0), null with enableWorldGenTreeRubber=false + dropped (as an item) -> metadata 0 + block, no resin spot -> metadata 0 or 1 + block, wet resin spot -> metadata 2-5 (according to the side) + block, dry resin spot -> metadata 8-11 (wet state + 6) + + rubberWood + rubberLeaves Rubber Leaves block, currently not meta sensitive, meta in ItemStack set to 0, null with enableWorldGenTreeRubber=false + rubberSapling Rubber Sapling block, currently not meta sensitive, meta in ItemStack set to 0, null with enableWorldGenTreeRubber=false + resinSheet Resin Sheet block, currently not meta sensitive + rubberTrampoline Rubber Trampoline block, meta reflects internal state, meta in ItemStack set to 0 + + building/storage + ironFence Iron Fence block, currently not meta sensitive + + reinforcedStone Reinforced Stone block, currently not meta sensitive + reinforcedGlass Reinforced Glass block, currently not meta sensitive + reinforcedDoorBlock Reinforced Door block, meta reflects the state (see vanilla doors), meta in ItemStack set to 0 + + constructionFoam Construction Foam block, currently not meta sensitive + constructionFoamWall Construction Foam Wall block, meta = color, implements IPaintableBlock + scaffold Scaffold block, meta reflects internal physical model data + + bronzeBlock Bronze block, meta sensitive + copperBlock Copper block, meta sensitive + tinBlock Tin block, meta sensitive + uraniumBlock Uranium block, meta sensitive + + cables (when placed as a block, inventory items are different TE implements IEnergyConductor) + copperCableBlock Copper Cable block, meta sensitive + insulatedCopperCableBlock Insulated Copper Cable block, meta sensitive + + goldCableBlock Gold Cable block, meta sensitive + insulatedGoldCableBlock Insulated Gold Cable block, meta sensitive + doubleInsulatedGoldCableBlock Double Insulated Gold Cable block, meta sensitive + + ironCableBlock Iron Cable block, meta sensitive + insulatedIronCableBlock Insulated Iron Cable block, meta sensitive + doubleInsulatedIronCableBlock Double Insulated Iron Cable block, meta sensitive + trippleInsulatedIronCableBlock Tripple Insulated Iron Cable block, meta sensitive + + glassFiberCableBlock Glass Fiber Cable block, meta sensitive + + tinCableBlock Tin Cable block, meta sensitive + + detectorCableBlock Detector Cable block, meta sensitive + splitterCableBlock Splitter Cable block, meta sensitive + + generators + related (TE implements IEnergySource ex. reactorChamber) + generator Generator block, meta sensitive + geothermalGenerator Geothermal Generator block, meta sensitive + waterMill Water Mill block, meta sensitive + solarPanel Solar Panel block, meta sensitive + windMill Wind Mill block, meta sensitive + nuclearReactor Nuclear Reactor block, meta sensitive + reactorChamber Reactor Chamber block, currently not meta sensitive + + energy storages (TE implements IEnergySource and IEnergyConductor) + batBox BatBox block, meta sensitive + mfeUnit MFE Unit block, meta sensitive + mfsUnit MFS Unit block, meta sensitive + + transformers (TE implements IEnergySource and IEnergyConductor) + lvTransformer LV Transformer block, meta sensitive + mvTransformer MV Transformer block, meta sensitive + hvTransformer HV Transformer block, meta sensitive + + machines + related (TE implements IEnergySink ex. machine, miningPipe, miningPipeTip) + machine Machine block, meta sensitive + advancedMachine Advanced Machine block, meta sensitive + + ironFurnace Iron Furnace block, meta sensitive + electroFurnace Electro Furnace block, meta sensitive + macerator Macerator block, meta sensitive + extractor Extractor block, meta sensitive + compressor Compressor block, meta sensitive + canner Canner block, meta sensitive + miner Miner block, meta sensitive + pump Pump block, meta sensitive + magnetizer Magnetizer block, meta sensitive + electrolyzer Electrolyzer block, meta sensitive + recycler Recycler block, meta sensitive + inductionFurnace Induction Furnace block, meta sensitive + massFabricator Mass Fabricator block, meta sensitive + terraformer Terraformer block, meta sensitive + teleporter Teleporter block, meta sensitive + teslaCoil Tesla Coil block, meta sensitive + luminator Passive (dark) Luminator block, meta = facing + activeLuminator Active (bright) Luminator block, meta = facing + + miningPipe Mining Pipe block, currently not meta sensitive, meta in ItemStack set to 0 + miningPipeTip Mining Pipe Tip block, currently not meta sensitive, meta in ItemStack set to 0 + + personal blocks + personalSafe Personal Safe block, meta sensitive + tradeOMat Trade-O-Mat block, meta sensitive + energyOMat Energy-O-Mat block, meta sensitive + + explosives + industrialTnt Industrial TNT block, currently not meta sensitive + nuke Nuke block, currently not meta sensitive + dynamiteStick Dynamite Stick block, meta = placement, meta in ItemStack set to 0 + dynamiteStickWithRemote Dynamite Stick with Remote block, meta = placement, meta in ItemStack set to 0 + + Agriculture Stuff + crop Crop Block, empty, not meta sensitive + + + ----- items ----- + + rubber + related + resin Resin item, currently not meta sensitive + rubber Rubber item, currently not meta sensitive, ore dictionary: itemRubber + + ore drops + uraniumDrop Uranium Drop item, currently not meta sensitive, ore dictionary: itemDropUranium + + dusts + bronzeDust Bronze Dust item, currently not meta sensitive + clayDust Clay Dust item, currently not meta sensitive + coalDust Coal Dust item, currently not meta sensitive + copperDust Copper Dust item, currently not meta sensitive + goldDust Gold Dust item, currently not meta sensitive + ironDust Iron Dust item, currently not meta sensitive + silverDust Silver Dust item, currently not meta sensitive + smallIronDust Small Iron Dust item, currently not meta sensitive + tinDust Tin Dust item, currently not meta sensitive + hydratedCoalDust Hydrated Coal Dust item, currently not meta sensitive + + ingots + refinedIronIngot Refined Iron Ingot item, currently not meta sensitive, ore dictionary: ingotRefinedIron + copperIngot Copper Ingot item, currently not meta sensitive, ore dictionary: ingotCopper + tinIngot Tin Ingot item, currently not meta sensitive, ore dictionary: ingotTin + bronzeIngot Bronze Ingot item, currently not meta sensitive, ore dictionary: ingotBronze + mixedMetalIngot Mixed Metal Ingot item, currently not meta sensitive + uraniumIngot Uranium Ingot item, currently not meta sensitive, ore dictionary: ingotUranium + + tools/weapons (without electric tools) + treetap Treetap item, meta = damage value + wrench Wrench item, meta = damage value + cutter Insulation Cutter item, meta = damage value + constructionFoamSprayer Construction Foam Sprayer item, meta = charges (as of v1.45) + + bronzePickaxe Bronze Pickaxe item, meta = damage value + bronzeAxe Bronze Axe item, meta = damage value + bronzeSword Bronze Sword item, meta = damage value + bronzeShovel Bronze Shovel item, meta = damage value + bronzeHoe Bronze Hoe item, meta = damage value + + el. tools/devices/weapons + miningDrill Mining Drill item, meta = visual charge indicator, implements IElectricItem + diamondDrill Diamond Tipped Mining Drill item, meta = visual charge indicator, implements IElectricItem + chainsaw Chainsaw item, meta = visual charge indicator, implements IElectricItem + electricWrench Electric Wrench item, meta = visual charge indicator, implements IElectricItem + electricTreetap Electric Treetap item, meta = visual charge indicator, implements IElectricItem + miningLaser Mining Laser item, meta = visual charge indicator, implements IElectricItem + + ecMeter EC-Mater item, currently not meta sensitive + odScanner Ore Density Scanner item, meta = damage value for charge level, implements IElectricItem + ovScanner Ore Value Scanner item, meta = visual charge indicator, implements IElectricItem + + frequencyTransmitter Frequency Transmitter item, currently not meta sensitive + + nanoSaber Idle Nano Saber item, meta = visual charge indicator, implements IElectricItem + enabledNanoSaber Enabled Nano Saber item, meta = visual charge indicator, implements IElectricItem + + armor/wearable + rubberBoots Rubber Boots item, meta = damage value + + bronzeHelmet Bronze Helmet Armor item, meta = damage value + bronzeChestplate Bronze Chestplate Armor item, meta = damage value + bronzeLeggings Bronze Leggings Armor item, meta = damage value + bronzeBoots Bronze Boots Armor item, meta = damage value + + compositeArmor Composite Armor item, meta = damage value for charge level + + nanoHelmet Nano Helmet Armor item, meta = visual charge indicator, implements IElectricItem + nanoBodyarmor Nano Bodyarmor item, meta = visual charge indicator, implements IElectricItem + nanoLeggings Nano Leggings Armor item, meta = visual charge indicator, implements IElectricItem + nanoBoots Nano Boots Armor item, meta = visual charge indicator, implements IElectricItem + + quantumHelmet Quantum Helmet Armor item, meta = visual charge indicator, implements IElectricItem + quantumBodyarmor Quantum Bodyarmor item, meta = visual charge indicator, implements IElectricItem + quantumLeggings Quantum Leggings Armor item, meta = visual charge indicator, implements IElectricItem + quantumBoots Quantum Boots Armor item, meta = visual charge indicator, implements IElectricItem + + jetpack Jetpack item, meta = damage value for fuel level + electricJetpack Electric Jetpack item, meta = visual charge indicator, implements IElectricItem + + batPack BatPack item, meta = visual charge indicator, implements IElectricItem, can provide energy + lapPack LapPack item, meta = visual charge indicator, implements IElectricItem, can provide energy + + cfPack CF Pack item, meta = charges (as of v1.45) + + solarHelmet Solar Helmet item, currently not meta sensitive + staticBoots Static Boots item, currently not meta sensitive + + batteries + reBattery Empty RE Battery item, currently not meta sensitive, implements IElectricItem + chargedReBattery RE Battery item, meta = visual charge indicator, implements IElectricItem, can provide energy + energyCrystal Energy Crystal item, meta = visual charge indicator, implements IElectricItem, can provide energy + lapotronCrystal Lapotron Crystal item, meta = visual charge indicator, implements IElectricItem, can provide energy + suBattery SU Battery item, currently not meta sensitive + + cables + copperCableItem Copper Cable item, meta sensitive + insulatedCopperCableItem Insulated Copper Cable item, meta sensitive + + goldCableItem Gold Cable item, meta sensitive + insulatedGoldCableItem Insulated Gold Cable item, meta sensitive + doubleInsulatedGoldCableItem Double Insulated Gold Cable item, meta sensitive + + ironCableItem Iron Cable item, meta sensitive + insulatedIronCableItem Insulated Iron Cable item, meta sensitive + doubleInsulatedIronCableItem Double Insulated Iron Cable item, meta sensitive + trippleInsulatedIronCableItem Tripple Insulated Iron Cable item, meta sensitive + + glassFiberCableItem Glass Fiber Cable item, meta sensitive + + tinCableItem Tin Cable item, meta sensitive + + detectorCableItem Detector Cable item, meta sensitive + splitterCableItem Splitter Cable item, meta sensitive + + cells/containers (without reactor components) + cell Empty Cell item, currently not meta sensitive + lavaCell Lava Cell item, currently not meta sensitive + hydratedCoalCell Hydrated Coal Cell item, currently not meta sensitive + bioCell Bio Cell item, currently not meta sensitive + coalfuelCell Coalfuel Cell item, currently not meta sensitive + biofuelCell Biofuel Cell item, currently not meta sensitive + waterCell Water Cell item, currently not meta sensitive + electrolyzedWaterCell Electrolyzed Water Cell item, currently not meta sensitive + + fuelCan Empty Fuel Can item, currently not meta sensitive + filledFuelCan Fuel Can item, meta = fuel value (as of v1.45) + + tinCan Empty Tin Can item, currently not meta sensitive + filledTinCan Filled Tin Can item, currently not meta sensitive + + reactor components + uraniumCell Uranium Cell item, meta = damage value + coolingCell Cooling Cell item, meta = damage value + + depletedIsotopeCell Depleted Isotope Cell item, meta = damage value + reEnrichedUraniumCell Re-Enriched Uranium Cell item, currently not meta sensitive + nearDepletedUraniumCell Near-Depleted Uranium Cell item, currently not meta sensitive + + integratedReactorPlating Integrated Reactor Plating item, meta = damage value + integratedHeatDisperser Integrated Heat Disperser item, meta = damage value + + terraformer blueprints + terraformerBlueprint Empty Terraformer Blueprint item, currently not meta sensitive + cultivationTerraformerBlueprint Cultivation Terraformer Blueprint item, currently not meta sensitive + irrigationTerraformerBlueprint Irrigation Terraformer Blueprint item, currently not meta sensitive + chillingTerraformerBlueprint Chilling Terraformer Blueprint item, currently not meta sensitive + desertificationTerraformerBlueprint Desertification Terraformer Blueprint item, currently not meta sensitive + flatificatorTerraformerBlueprint Flatificator Terraformer Blueprint item, currently not meta sensitive + mushroomTerraformerBlueprint Mushroom Terraformer Blueprint item, currently not meta sensitive + + diamond chain + coalBall Coal Ball item, currently not meta sensitive + compressedCoalBall Compressed Coal Ball item, currently not meta sensitive + coalChunk Coal Chunk item, currently not meta sensitive + industrialDiamond Industrial Diamond item, currently not meta sensitive, DEPRECATED + + recycler chain + scrap Scrap item, currently not meta sensitive + scrapBox Scrap Box item, currently not meta sensitive + + fuel production chain + hydratedCoalClump Hydrated Coal Clump item, currently not meta sensitive + plantBall Plant Ball item, currently not meta sensitive + compressedPlantBall Compressed Plant Ball item, currently not meta sensitive + + painting + painter Painter item, currently not meta sensitive + + blackPainter Black Painter item, meta = damage value + redPainter Red Painter item, meta = damage value + greenPainter Green Painter item, meta = damage value + brownPainter Brown Painter item, meta = damage value + bluePainter Blue Painter item, meta = damage value + purplePainter Purple Painter item, meta = damage value + cyanPainter Cyan Painter item, meta = damage value + lightGreyPainter Light Grey Painter item, meta = damage value + darkGreyPainter Dark Grey Painter item, meta = damage value + pinkPainter Pink Painter item, meta = damage value + limePainter Lime Painter item, meta = damage value + yellowPainter Yellow Painter item, meta = damage value + cloudPainter Cloud Painter item, meta = damage value + magentaPainter Magenta Painter item, meta = damage value + orangePainter Orange Painter item, meta = damage value + whitePainter White Painter item, meta = damage value + + explosives + related + dynamite Throwable Dynamite item, currently not meta sensitive + stickyDynamite Throwable Sticky Dynamite item, currently not meta sensitive + + remote Dynamite Remote item, currently not meta sensitive + + misc intermediate recipe ingredients + electronicCircuit Electronic Circuit item, currently not meta sensitive + advancedCircuit Advanced Circuit item, currently not meta sensitive + + advancedAlloy Advanced Alloy item, currently not meta sensitive + + carbonFiber Raw Carbon Fiber item, currently not meta sensitive + carbonMesh Raw Carbon Mesh item, currently not meta sensitive + carbonPlate Carbon Plate item, currently not meta sensitive + + matter UU-Matter item, currently not meta sensitive + iridiumOre Iridium Ore item, currently not meta sensitive + iridiumPlate Iridium Plate item, currently not meta sensitive + + upgrade modules + overclockerUpgrade overclocker upgrade item, meta sensitive + transformerUpgrade transformer upgrade item, meta sensitive + energyStorageUpgrade energy storage upgrade item, meta sensitive + + misc + coin Coin item, currently not meta sensitive + reinforcedDoor Reinforced Door item, currently not meta sensitive + constructionFoamPellet Construction Foam Pellet item, currently not meta sensitive + cropSeed Crop seeds, stuff stored in NBT, don't use for crafting recipes! + cropnalyzer Cropnalyzer handheld device + fertilizer Basic IC2Item, used to provide nutrients toCropBlocks + hydratingCell Cell used to hydrate Crops, meta = Content, 0 = Full, 9999 = Near empty + electricHoe Electric Hoe, meta = charge level + solarHelmet Solar Helmet item, currently not meta sensitive + terraWart Terra Wart item, cures potion effects + weedEx Weed-EX can, meta = uses left */ diff --git a/APIs/ic2/api/recipe/ICannerBottleRecipeManager.java b/APIs/ic2/api/recipe/ICannerBottleRecipeManager.java deleted file mode 100644 index 97fd9457..00000000 --- a/APIs/ic2/api/recipe/ICannerBottleRecipeManager.java +++ /dev/null @@ -1,51 +0,0 @@ -package ic2.api.recipe; - -import java.util.Map; - -import net.minecraft.item.ItemStack; - -public interface ICannerBottleRecipeManager { - /** - * Adds a recipe to the machine. - * - * @param container Container to be filled - * @param fill Item to fill into the container - * @param output Filled container - */ - public void addRecipe(IRecipeInput container, IRecipeInput fill, ItemStack output); - - /** - * Gets the recipe output for the given input. - * - * @param container Container to be filled - * @param fill Item to fill into the container - * @param adjustInput modify the input according to the recipe's requirements - * @param acceptTest allow either container or fill to be null to see if either of them is part of a recipe - * @return Recipe output, or null if none - */ - public RecipeOutput getOutputFor(ItemStack container, ItemStack fill, boolean adjustInput, boolean acceptTest); - - /** - * Gets a list of recipes. - * - * You're a mad evil scientist if you ever modify this. - * - * @return List of recipes - */ - public Map getRecipes(); - - - public static class Input { - public Input(IRecipeInput container, IRecipeInput fill) { - this.container = container; - this.fill = fill; - } - - public boolean matches(ItemStack container, ItemStack fill) { - return this.container.matches(container) && this.fill.matches(fill); - } - - public final IRecipeInput container; - public final IRecipeInput fill; - } -} diff --git a/APIs/ic2/api/recipe/ICannerEnrichRecipeManager.java b/APIs/ic2/api/recipe/ICannerEnrichRecipeManager.java deleted file mode 100644 index 0f05ad79..00000000 --- a/APIs/ic2/api/recipe/ICannerEnrichRecipeManager.java +++ /dev/null @@ -1,54 +0,0 @@ -package ic2.api.recipe; - -import java.util.Map; - -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fluids.FluidStack; - -public interface ICannerEnrichRecipeManager { - /** - * Adds a recipe to the machine. - * - * @param input Fluid input - * @param additive Item to enrich the fluid with - * @param output Output fluid - */ - public void addRecipe(FluidStack input, IRecipeInput additive, FluidStack output); - - /** - * Gets the recipe output for the given input. - * - * @param input Fluid input - * @param additive Item to enrich the fluid with - * @param adjustInput modify the input according to the recipe's requirements - * @param acceptTest allow input or additive to be null to see if either of them is part of a recipe - * @return Recipe output, or null if none, output fluid in nbt - */ - public RecipeOutput getOutputFor(FluidStack input, ItemStack additive, boolean adjustInput, boolean acceptTest); - - /** - * Gets a list of recipes. - * - * You're a mad evil scientist if you ever modify this. - * - * @return List of recipes - */ - public Map getRecipes(); - - - public static class Input { - public Input(FluidStack fluid, IRecipeInput additive) { - this.fluid = fluid; - this.additive = additive; - } - - public boolean matches(FluidStack fluid, ItemStack additive) { - return (this.fluid == null || this.fluid.isFluidEqual(fluid)) && - this.additive.matches(additive); - } - - public final FluidStack fluid; - public final IRecipeInput additive; - } -} diff --git a/APIs/ic2/api/recipe/ICraftingRecipeManager.java b/APIs/ic2/api/recipe/ICraftingRecipeManager.java deleted file mode 100644 index 756eaf63..00000000 --- a/APIs/ic2/api/recipe/ICraftingRecipeManager.java +++ /dev/null @@ -1,26 +0,0 @@ -package ic2.api.recipe; - -import net.minecraft.item.ItemStack; - -/** - * Recipe manager interface for crafting recipes. - * - * @author Richard - */ -public interface ICraftingRecipeManager { - /** - * Adds a shaped crafting recipe. - * - * @param output Recipe output - * @param input Recipe input format - */ - public void addRecipe(ItemStack output, Object... input); - - /** - * Adds a shapeless crafting recipe. - * - * @param output Recipe output - * @param input Recipe input - */ - public void addShapelessRecipe(ItemStack output, Object... input); -} diff --git a/APIs/ic2/api/recipe/ILiquidAcceptManager.java b/APIs/ic2/api/recipe/ILiquidAcceptManager.java deleted file mode 100644 index 4f377b90..00000000 --- a/APIs/ic2/api/recipe/ILiquidAcceptManager.java +++ /dev/null @@ -1,10 +0,0 @@ -package ic2.api.recipe; - -import java.util.Set; - -import net.minecraftforge.fluids.Fluid; - -public interface ILiquidAcceptManager { - boolean acceptsFluid(Fluid fluid); - Set getAcceptedFluids(); -} diff --git a/APIs/ic2/api/recipe/IListRecipeManager.java b/APIs/ic2/api/recipe/IListRecipeManager.java deleted file mode 100644 index 5c0d3062..00000000 --- a/APIs/ic2/api/recipe/IListRecipeManager.java +++ /dev/null @@ -1,36 +0,0 @@ -package ic2.api.recipe; - -import java.util.List; - -import net.minecraft.item.ItemStack; - -/** - * Recipe manager interface for basic lists. - * - * @author Richard - */ -public interface IListRecipeManager extends Iterable { - /** - * Adds a stack to the list. - * - * @param stack Stack to add - */ - public void add(ItemStack stack); - - /** - * Checks whether the specified stack is in the list. - * - * @param stack Stack to check - * @return Whether the stack is in the list - */ - public boolean contains(ItemStack stack); - - /** - * Gets the list of stacks. - * - * You're a mad evil scientist if you ever modify this. - * - * @return List of stacks - */ - public List getStacks(); -} diff --git a/APIs/ic2/api/recipe/IMachineRecipeManager.java b/APIs/ic2/api/recipe/IMachineRecipeManager.java deleted file mode 100644 index a788e09a..00000000 --- a/APIs/ic2/api/recipe/IMachineRecipeManager.java +++ /dev/null @@ -1,40 +0,0 @@ -package ic2.api.recipe; - -import java.util.Map; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -/** - * Recipe manager interface for basic machines. - * - * @author RichardG, Player - */ -public interface IMachineRecipeManager { - /** - * Adds a recipe to the machine. - * - * @param input Recipe input - * @param metadata meta data for additional recipe properties, may be null - * @param outputs Recipe outputs, zero or more depending on the machine - */ - public void addRecipe(IRecipeInput input, NBTTagCompound metadata, ItemStack... outputs); - - /** - * Gets the recipe output for the given input. - * - * @param input Recipe input - * @param adjustInput modify the input according to the recipe's requirements - * @return Recipe output, or null if none - */ - public RecipeOutput getOutputFor(ItemStack input, boolean adjustInput); - - /** - * Gets a list of recipes. - * - * You're a mad evil scientist if you ever modify this. - * - * @return List of recipes - */ - public Map getRecipes(); -} diff --git a/APIs/ic2/api/recipe/IPatternStorage.java b/APIs/ic2/api/recipe/IPatternStorage.java deleted file mode 100644 index f51f0de7..00000000 --- a/APIs/ic2/api/recipe/IPatternStorage.java +++ /dev/null @@ -1,15 +0,0 @@ -package ic2.api.recipe; - -import net.minecraft.item.ItemStack; - -public interface IPatternStorage { - - boolean transferPattern(ItemStack itemstack, int amountUU , int amountEU); - - int[] getPatternvalus(ItemStack itemstack); - - short getPatternCount(); - - ItemStack getPatternItemstack(int index); - -} diff --git a/APIs/ic2/api/recipe/IRecipeInput.java b/APIs/ic2/api/recipe/IRecipeInput.java deleted file mode 100644 index 0c842d63..00000000 --- a/APIs/ic2/api/recipe/IRecipeInput.java +++ /dev/null @@ -1,31 +0,0 @@ -package ic2.api.recipe; - -import java.util.List; - -import net.minecraft.item.ItemStack; - -public interface IRecipeInput { - /** - * Check if subject matches this recipe input, ignoring the amount. - * - * @param subject ItemStack to check - * @return true if it matches the requirement - */ - boolean matches(ItemStack subject); - - /** - * Determine the minimum input stack size. - * - * @return input amount required - */ - int getAmount(); - - /** - * List all possible inputs (best effort). - * - * The stack size is undefined, use getAmount to get the correct one. - * - * @return list of inputs, may be incomplete - */ - List getInputs(); -} diff --git a/APIs/ic2/api/recipe/IScrapboxManager.java b/APIs/ic2/api/recipe/IScrapboxManager.java deleted file mode 100644 index 41b694dc..00000000 --- a/APIs/ic2/api/recipe/IScrapboxManager.java +++ /dev/null @@ -1,13 +0,0 @@ -package ic2.api.recipe; - -import java.util.Map; - -import net.minecraft.item.ItemStack; - -public interface IScrapboxManager { - void addDrop(ItemStack drop, float rawChance); - - ItemStack getDrop(ItemStack input, boolean adjustInput); - - Map getDrops(); -} diff --git a/APIs/ic2/api/recipe/ISemiFluidFuelManager.java b/APIs/ic2/api/recipe/ISemiFluidFuelManager.java deleted file mode 100644 index cf6af654..00000000 --- a/APIs/ic2/api/recipe/ISemiFluidFuelManager.java +++ /dev/null @@ -1,32 +0,0 @@ -package ic2.api.recipe; - -import java.util.Map; - -import net.minecraftforge.fluids.Fluid; - - -public interface ISemiFluidFuelManager extends ILiquidAcceptManager { - /** - * Add a new fluid to the semi fluid generator. - * - * @param fluidName the fluid to burn - * @param amount amount of fluid to consume per tick - * @param power amount of energy generated per tick - */ - void addFluid(String fluidName, int amount, double power); - - BurnProperty getBurnProperty(Fluid fluid); - - Map getBurnProperties(); - - - public static class BurnProperty { - public BurnProperty(int amount, double power) { - this.amount = amount; - this.power = power; - } - - public final int amount; - public final double power; - } -} diff --git a/APIs/ic2/api/recipe/RecipeInputItemStack.java b/APIs/ic2/api/recipe/RecipeInputItemStack.java deleted file mode 100644 index a2a9195d..00000000 --- a/APIs/ic2/api/recipe/RecipeInputItemStack.java +++ /dev/null @@ -1,38 +0,0 @@ -package ic2.api.recipe; - -import java.util.Arrays; -import java.util.List; - -import net.minecraft.item.ItemStack; - -import net.minecraftforge.oredict.OreDictionary; - -public class RecipeInputItemStack implements IRecipeInput { - public RecipeInputItemStack(ItemStack input) { - this(input, input.stackSize); - } - - public RecipeInputItemStack(ItemStack input, int amount) { - this.input = input; - this.amount = amount; - } - - @Override - public boolean matches(ItemStack subject) { - return subject.itemID == input.itemID && - (subject.getItemDamage() == input.getItemDamage() || input.getItemDamage() == OreDictionary.WILDCARD_VALUE); - } - - @Override - public int getAmount() { - return amount; - } - - @Override - public List getInputs() { - return Arrays.asList(input); - } - - public final ItemStack input; - public final int amount; -} diff --git a/APIs/ic2/api/recipe/RecipeInputOreDict.java b/APIs/ic2/api/recipe/RecipeInputOreDict.java deleted file mode 100644 index eb804b2a..00000000 --- a/APIs/ic2/api/recipe/RecipeInputOreDict.java +++ /dev/null @@ -1,45 +0,0 @@ -package ic2.api.recipe; - -import java.util.List; - -import net.minecraft.item.ItemStack; - -import net.minecraftforge.oredict.OreDictionary; - -public class RecipeInputOreDict implements IRecipeInput { - public RecipeInputOreDict(String input) { - this(input, 1); - } - - public RecipeInputOreDict(String input, int amount) { - this.input = input; - this.amount = amount; - } - - @Override - public boolean matches(ItemStack subject) { - List inputs = OreDictionary.getOres(input); - - for (ItemStack input : inputs) { - if (subject.itemID == input.itemID && - (subject.getItemDamage() == input.getItemDamage() || input.getItemDamage() == OreDictionary.WILDCARD_VALUE)) { - return true; - } - } - - return false; - } - - @Override - public int getAmount() { - return amount; - } - - @Override - public List getInputs() { - return OreDictionary.getOres(input); - } - - public final String input; - public final int amount; -} diff --git a/APIs/ic2/api/recipe/RecipeOutput.java b/APIs/ic2/api/recipe/RecipeOutput.java deleted file mode 100644 index e0ee71ab..00000000 --- a/APIs/ic2/api/recipe/RecipeOutput.java +++ /dev/null @@ -1,21 +0,0 @@ -package ic2.api.recipe; - -import java.util.Arrays; -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public final class RecipeOutput { - public RecipeOutput(NBTTagCompound metadata, List items) { - this.metadata = metadata; - this.items = items; - } - - public RecipeOutput(NBTTagCompound metadata, ItemStack... items) { - this(metadata, Arrays.asList(items)); - } - - public final List items; - public final NBTTagCompound metadata; -} diff --git a/APIs/ic2/api/recipe/Recipes.java b/APIs/ic2/api/recipe/Recipes.java deleted file mode 100644 index 849c4cab..00000000 --- a/APIs/ic2/api/recipe/Recipes.java +++ /dev/null @@ -1,55 +0,0 @@ -package ic2.api.recipe; - - - -/** - * General recipe registry. - * - * @author Richard - */ -public class Recipes { - public static IMachineRecipeManager macerator; - public static IMachineRecipeManager extractor; - public static IMachineRecipeManager compressor; - public static IMachineRecipeManager centrifuge; - public static IMachineRecipeManager recycler; - public static IMachineRecipeManager metalformerExtruding; - public static IMachineRecipeManager metalformerCutting; - public static IMachineRecipeManager metalformerRolling; - public static IMachineRecipeManager oreWashing; - public static IMachineRecipeManager Scanner; - public static ICannerBottleRecipeManager cannerBottle; - public static ICannerEnrichRecipeManager cannerEnrich; - - /** - * Reference amplifier values: - * - * 5000: Scrap - * 45000: Scrapbox - * - * As Parameter for the Amplification Value you have to use the NBTTagCompound - * - * NBTTagCompound nbt = new NBTTagCompound(); - * nbt.setInteger("amplification", aValue); - * matterAmplifier.addRecipe(yourStack, nbt); - */ - public static IMachineRecipeManager matterAmplifier; - /** - * Reference scrap box chance values: - * - * 0.1: Diamond - * 0.5: Cake, Gold Helmet, Iron Ore, Gold Ore - * 1.0: Wooden tools, Soul Sand, Sign, Leather, Feather, Bone - * 1.5: Apple, Bread - * 2.0: Netherrack, Rotten Flesh - * 3.0: Grass, Gravel - * 4.0: Stick - * 5.0: Dirt, Wooden Hoe - */ - public static IScrapboxManager scrapboxDrops; - public static IListRecipeManager recyclerBlacklist; - public static ICraftingRecipeManager advRecipes; - - public static ISemiFluidFuelManager semiFluidGenerator; - -} diff --git a/APIs/ic2/api/tile/ExplosionWhitelist.java b/APIs/ic2/api/tile/ExplosionWhitelist.java deleted file mode 100644 index 01322b6c..00000000 --- a/APIs/ic2/api/tile/ExplosionWhitelist.java +++ /dev/null @@ -1,46 +0,0 @@ -package ic2.api.tile; - -import java.util.*; - -import net.minecraft.block.Block; - -/** - * Blocks on this whitelist will not resist an explosion but won't be destroyed. - * - * The explosion code by default ignores blocks which absorb more than 1000 explosion power to - * prevent abusing personal safes, Trade-O-Mats and other blocks to serve as a cheap and - * invulnerable reactor chambers. Said blocks will not shield the explosion and won't get - * destroyed. - */ -public final class ExplosionWhitelist { - /** - * Add a block to the whitelist. - * - * @param block block to add - */ - public static void addWhitelistedBlock(Block block) { - whitelist.add(block); - } - - /** - * Remove a block from the whitelist. - * - * @param block block to remove - */ - public static void removeWhitelistedBlock(Block block) { - whitelist.remove(block); - } - - /** - * Check if a block is on the whitelist. - * - * @param block block to check if whitelisted - * @return Whether the block is whitelisted - */ - public static boolean isBlockWhitelisted(Block block) { - return whitelist.contains(block); - } - - private static Set whitelist = new HashSet(); -} - diff --git a/APIs/ic2/api/tile/IEnergyStorage.java b/APIs/ic2/api/tile/IEnergyStorage.java deleted file mode 100644 index d20eb047..00000000 --- a/APIs/ic2/api/tile/IEnergyStorage.java +++ /dev/null @@ -1,61 +0,0 @@ -package ic2.api.tile; - -import net.minecraftforge.common.ForgeDirection; - -/** - * Interface implemented by the tile entity of energy storage blocks. - */ -public interface IEnergyStorage { - /** - * Get the amount of energy currently stored in the block. - * - * @return Energy stored in the block - */ - public int getStored(); - - /** - * Set the amount of energy currently stored in the block. - * - * @param energy stored energy - */ - public void setStored(int energy); - - /** - * Add the specified amount of energy. - * - * Use negative values to decrease. - * - * @param amount of energy to add - * @return Energy stored in the block after adding the specified amount - */ - public int addEnergy(int amount); - - /** - * Get the maximum amount of energy the block can store. - * - * @return Maximum energy stored - */ - public int getCapacity(); - - /** - * Get the block's energy output. - * - * @return Energy output in EU/t - */ - public int getOutput(); - - /** - * Get the block's energy output. - * - * @return Energy output in EU/t - */ - public double getOutputEnergyUnitsPerTick(); - - /** - * Get whether this block can have its energy used by an adjacent teleporter. - * - * @param side side the teleporter is draining energy from - * @return Whether the block is teleporter compatible - */ - public boolean isTeleporterCompatible(ForgeDirection side); -} diff --git a/APIs/ic2/api/tile/IWrenchable.java b/APIs/ic2/api/tile/IWrenchable.java deleted file mode 100644 index f0144169..00000000 --- a/APIs/ic2/api/tile/IWrenchable.java +++ /dev/null @@ -1,59 +0,0 @@ -package ic2.api.tile; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -/** - * Allows a tile entity to make use of the wrench's removal and rotation functions. - */ -public interface IWrenchable { - /** - * Determine if the wrench can be used to set the block's facing. - * Called before wrenchCanRemove(). - * - * @param entityPlayer player using the wrench, may be null - * @param side block's side the wrench was clicked on - * @return Whether the wrenching was done and the wrench should be damaged - */ - boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side); - - /** - * Get the block's facing. - * - * @return Block facing - */ - short getFacing(); - - /** - * Set the block's facing - * - * @param facing facing to set the block to - */ - void setFacing(short facing); - - /** - * Determine if the wrench can be used to remove the block. - * Called if wrenchSetFacing fails. - * - * @param entityPlayer player using the wrench, may be null - * @return Whether the wrenching was done and the wrench should be damaged - */ - boolean wrenchCanRemove(EntityPlayer entityPlayer); - - /** - * Determine the probability to drop the block as it is. - * The first entry in getBlockDropped will be replaced by blockid:meta if the drop is successful. - * - * @return Probability from 0 to 1 - */ - float getWrenchDropRate(); - - /** - * Determine the item the block will drop when the wrenching is successful. - * - * @param entityPlayer player using the wrench, may be null - * @return Item to drop, may be null - */ - ItemStack getWrenchDrop(EntityPlayer entityPlayer); -} - diff --git a/APIs/universalelectricity/compatibility/TileEntityUniversalElectrical.java b/APIs/universalelectricity/compatibility/TileEntityUniversalElectrical.java index 6767b89b..0811e3bb 100644 --- a/APIs/universalelectricity/compatibility/TileEntityUniversalElectrical.java +++ b/APIs/universalelectricity/compatibility/TileEntityUniversalElectrical.java @@ -174,9 +174,12 @@ public abstract class TileEntityUniversalElectrical extends TileEntityElectrical if (receiver != null) { - float bc3Provide = provide * Compatibility.TO_BC_RATIO; - float energyUsed = Math.min(receiver.receiveEnergy(this.bcBlockType, bc3Provide, outputDirection.getOpposite()), bc3Provide); - this.provideElectricity((bc3Provide - (energyUsed * Compatibility.TO_BC_RATIO)), true); + if (receiver.powerRequest() > 0) + { + float bc3Provide = provide * Compatibility.TO_BC_RATIO; + float energyUsed = Math.min(receiver.receiveEnergy(this.bcBlockType, bc3Provide, outputDirection.getOpposite()), bc3Provide); + this.provideElectricity(energyUsed * Compatibility.TO_BC_RATIO, true); + } } return true; diff --git a/APIs/universalelectricity/compatibility/UniversalNetwork.java b/APIs/universalelectricity/compatibility/UniversalNetwork.java index a1442c04..c89e34d0 100644 --- a/APIs/universalelectricity/compatibility/UniversalNetwork.java +++ b/APIs/universalelectricity/compatibility/UniversalNetwork.java @@ -62,6 +62,8 @@ public class UniversalNetwork extends ElectricityNetwork if (totalEnergyRequest > 0) { + boolean markRefresh = false; + for (TileEntity tileEntity : avaliableEnergyTiles) { if (tileEntity != null && !tileEntity.isInvalid()) @@ -114,13 +116,16 @@ public class UniversalNetwork extends ElectricityNetwork TileEntity conductor = VectorHelper.getConnectorFromSide(tileEntity.worldObj, new Vector3(tileEntity), direction); PowerReceiver receiver = electricalTile.getPowerReceiver(direction); - if (this.getConductors().contains(conductor)) + if (receiver != null) { - float energyToSend = totalUsableEnergy * ((receiver.powerRequest() * Compatibility.TO_BC_RATIO) / totalEnergyRequest); - - if (energyToSend > 0) + if (this.getConductors().contains(conductor)) { - remainingUsableEnergy -= receiver.receiveEnergy(Type.PIPE, energyToSend * Compatibility.TO_BC_RATIO, direction); + float energyToSend = totalUsableEnergy * ((receiver.powerRequest() * Compatibility.TO_BC_RATIO) / totalEnergyRequest); + + if (energyToSend > 0) + { + remainingUsableEnergy -= receiver.receiveEnergy(Type.PIPE, energyToSend * Compatibility.TO_BC_RATIO, direction); + } } } } @@ -129,10 +134,14 @@ public class UniversalNetwork extends ElectricityNetwork } else { - this.refresh(); - break; + markRefresh = true; } } + + if(markRefresh) + { + this.refresh(); + } } } } @@ -176,9 +185,14 @@ public class UniversalNetwork extends ElectricityNetwork { for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) { - if (((IEnergySink) tileEntity).acceptsEnergyFrom(VectorHelper.getTileEntityFromSide(tileEntity.worldObj, new Vector3(tileEntity), direction), ForgeDirection.values()[(direction.ordinal() + 2) % 6]) && this.getConductors().contains(VectorHelper.getConnectorFromSide(tileEntity.worldObj, new Vector3(tileEntity), direction))) + if (((IEnergySink) tileEntity).acceptsEnergyFrom(VectorHelper.getTileEntityFromSide(tileEntity.worldObj, new Vector3(tileEntity), direction), direction) && this.getConductors().contains(VectorHelper.getConnectorFromSide(tileEntity.worldObj, new Vector3(tileEntity), direction))) { - requests.add(ElectricityPack.getFromWatts((float) (Math.min(((IEnergySink) tileEntity).demandedEnergyUnits(), ((IEnergySink) tileEntity).getMaxSafeInput()) * Compatibility.IC2_RATIO), 120)); + ElectricityPack pack = ElectricityPack.getFromWatts((float) (Math.min(((IEnergySink) tileEntity).demandedEnergyUnits(), ((IEnergySink) tileEntity).getMaxSafeInput()) * Compatibility.IC2_RATIO), 1); + + if (pack.getWatts() > 0) + { + requests.add(pack); + } } } @@ -191,7 +205,7 @@ public class UniversalNetwork extends ElectricityNetwork { if (((IPowerReceptor) tileEntity).getPowerReceiver(direction) != null) { - ElectricityPack pack = ElectricityPack.getFromWatts(((IPowerReceptor) tileEntity).getPowerReceiver(direction).powerRequest() * Compatibility.BC3_RATIO, 120); + ElectricityPack pack = ElectricityPack.getFromWatts(((IPowerReceptor) tileEntity).getPowerReceiver(direction).powerRequest() * Compatibility.BC3_RATIO, 1); if (pack.getWatts() > 0) { @@ -281,7 +295,7 @@ public class UniversalNetwork extends ElectricityNetwork possibleDirections = new ArrayList(); } - if (((IEnergyAcceptor) acceptor).acceptsEnergyFrom(VectorHelper.getTileEntityFromSide(acceptor.worldObj, new Vector3(acceptor), ForgeDirection.getOrientation(i)), ForgeDirection.values()[(i + 2) % 6]) && this.getConductors().contains(VectorHelper.getConnectorFromSide(acceptor.worldObj, new Vector3(acceptor), ForgeDirection.getOrientation(i)))) + if (((IEnergyAcceptor) acceptor).acceptsEnergyFrom(VectorHelper.getTileEntityFromSide(acceptor.worldObj, new Vector3(acceptor), ForgeDirection.getOrientation(i)), ForgeDirection.getOrientation(i)) && this.getConductors().contains(VectorHelper.getConnectorFromSide(acceptor.worldObj, new Vector3(acceptor), ForgeDirection.getOrientation(i)))) { possibleDirections.add(ForgeDirection.getOrientation(i)); } diff --git a/APIs/universalelectricity/core/UniversalElectricity.java b/APIs/universalelectricity/core/UniversalElectricity.java index a2016d70..cb430a6a 100644 --- a/APIs/universalelectricity/core/UniversalElectricity.java +++ b/APIs/universalelectricity/core/UniversalElectricity.java @@ -35,6 +35,9 @@ public class UniversalElectricity * explode under high voltage and react to different amounts of voltage differently. */ public static boolean isVoltageSensitive = false; + + //TODO: Enable this next major MC version + //public static float DEFAULT_VOLTAGE = 1; /** * Set this value to true if your mod contains and has the ability to transfer electricity via diff --git a/APIs/universalelectricity/core/item/ItemElectric.java b/APIs/universalelectricity/core/item/ItemElectric.java index 2d4d2b1a..a281c465 100644 --- a/APIs/universalelectricity/core/item/ItemElectric.java +++ b/APIs/universalelectricity/core/item/ItemElectric.java @@ -6,146 +6,144 @@ import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagDouble; +import net.minecraft.nbt.NBTTagFloat; import net.minecraft.world.World; import universalelectricity.core.electricity.ElectricityDisplay; import universalelectricity.core.electricity.ElectricityDisplay.ElectricUnit; -/** - * Extend from this class if your item requires electricity or to be charged. Optionally, you can +/** Extend from this class if your item requires electricity or to be charged. Optionally, you can * implement IItemElectric instead. - * - * @author Calclavia - * - */ + * + * @author Calclavia */ public abstract class ItemElectric extends Item implements IItemElectric { - public ItemElectric(int id) - { - super(id); - this.setMaxStackSize(1); - this.setMaxDamage(100); - this.setNoRepair(); - } + public ItemElectric(int id) + { + super(id); + this.setMaxStackSize(1); + this.setMaxDamage(100); + this.setNoRepair(); + } - @Override - public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List list, boolean par4) - { - String color = ""; - float joules = this.getElectricityStored(itemStack); + @Override + public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List list, boolean par4) + { + String color = ""; + float joules = this.getElectricityStored(itemStack); - if (joules <= this.getMaxElectricityStored(itemStack) / 3) - { - color = "\u00a74"; - } - else if (joules > this.getMaxElectricityStored(itemStack) * 2 / 3) - { - color = "\u00a72"; - } - else - { - color = "\u00a76"; - } + if (joules <= this.getMaxElectricityStored(itemStack) / 3) + { + color = "\u00a74"; + } + else if (joules > this.getMaxElectricityStored(itemStack) * 2 / 3) + { + color = "\u00a72"; + } + else + { + color = "\u00a76"; + } - list.add(color + ElectricityDisplay.getDisplayShort(joules, ElectricUnit.JOULES) + "/" + ElectricityDisplay.getDisplayShort(this.getMaxElectricityStored(itemStack), ElectricUnit.JOULES)); - } + list.add(color + ElectricityDisplay.getDisplayShort(joules, ElectricUnit.JOULES) + "/" + ElectricityDisplay.getDisplayShort(this.getMaxElectricityStored(itemStack), ElectricUnit.JOULES)); + } - /** - * Makes sure the item is uncharged when it is crafted and not charged. Change this if you do - * not want this to happen! - */ - @Override - public void onCreated(ItemStack itemStack, World par2World, EntityPlayer par3EntityPlayer) - { - this.setElectricity(itemStack, 0); - } + /** Makes sure the item is uncharged when it is crafted and not charged. Change this if you do + * not want this to happen! */ + @Override + public void onCreated(ItemStack itemStack, World par2World, EntityPlayer par3EntityPlayer) + { + this.setElectricity(itemStack, 0); + } - @Override - public float recharge(ItemStack itemStack, float energy, boolean doReceive) - { - float rejectedElectricity = Math.max((this.getElectricityStored(itemStack) + energy) - this.getMaxElectricityStored(itemStack), 0); - float energyToReceive = energy - rejectedElectricity; + @Override + public float recharge(ItemStack itemStack, float energy, boolean doReceive) + { + float rejectedElectricity = Math.max((this.getElectricityStored(itemStack) + energy) - this.getMaxElectricityStored(itemStack), 0); + float energyToReceive = energy - rejectedElectricity; - if (doReceive) - { - this.setElectricity(itemStack, this.getElectricityStored(itemStack) + energyToReceive); - } + if (doReceive) + { + this.setElectricity(itemStack, this.getElectricityStored(itemStack) + energyToReceive); + } - return energyToReceive; - } + return energyToReceive; + } - @Override - public float discharge(ItemStack itemStack, float energy, boolean doTransfer) - { - float energyToTransfer = Math.min(this.getElectricityStored(itemStack), energy); + @Override + public float discharge(ItemStack itemStack, float energy, boolean doTransfer) + { + float energyToTransfer = Math.min(this.getElectricityStored(itemStack), energy); - if (doTransfer) - { - this.setElectricity(itemStack, this.getElectricityStored(itemStack) - energyToTransfer); - } + if (doTransfer) + { + this.setElectricity(itemStack, this.getElectricityStored(itemStack) - energyToTransfer); + } - return energyToTransfer; - } + return energyToTransfer; + } - @Override - public float getVoltage(ItemStack itemStack) - { - return 120; - } + @Override + public float getVoltage(ItemStack itemStack) + { + return 0.120f; + } - @Override - public void setElectricity(ItemStack itemStack, float joules) - { - // Saves the frequency in the ItemStack - if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } + @Override + public void setElectricity(ItemStack itemStack, float joules) + { + // Saves the frequency in the ItemStack + if (itemStack.getTagCompound() == null) + { + itemStack.setTagCompound(new NBTTagCompound()); + } - float electricityStored = Math.max(Math.min(joules, this.getMaxElectricityStored(itemStack)), 0); - itemStack.getTagCompound().setFloat("electricity", electricityStored); + float electricityStored = Math.max(Math.min(joules, this.getMaxElectricityStored(itemStack)), 0); + itemStack.getTagCompound().setFloat("electricity", electricityStored); - /** - * Sets the damage as a percentage to render the bar properly. - */ - itemStack.setItemDamage((int) (100 - (electricityStored / getMaxElectricityStored(itemStack)) * 100)); - } + /** Sets the damage as a percentage to render the bar properly. */ + itemStack.setItemDamage((int) (100 - (electricityStored / getMaxElectricityStored(itemStack)) * 100)); + } - @Override - public float getTransfer(ItemStack itemStack) - { - return this.getMaxElectricityStored(itemStack) - this.getElectricityStored(itemStack); - } + @Override + public float getTransfer(ItemStack itemStack) + { + return this.getMaxElectricityStored(itemStack) - this.getElectricityStored(itemStack); + } - /** - * This function is called to get the electricity stored in this item - * - * @return - The amount of electricity stored in watts - */ - @Override - public float getElectricityStored(ItemStack itemStack) - { - if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } + /** Gets the energy stored in the item. Energy is stored using item NBT */ + @Override + public float getElectricityStored(ItemStack itemStack) + { + if (itemStack.getTagCompound() == null) + { + itemStack.setTagCompound(new NBTTagCompound()); + } + float energyStored = 0f; + if (itemStack.getTagCompound().hasKey("electricity")) + { + NBTBase obj = itemStack.getTagCompound().getTag("electricity"); + if (obj instanceof NBTTagDouble) + { + energyStored = (float) ((NBTTagDouble) obj).data; + } + else if (obj instanceof NBTTagFloat) + { + energyStored = ((NBTTagFloat) obj).data; + } + } - float electricityStored = itemStack.getTagCompound().getFloat("electricity"); + /** Sets the damage as a percentage to render the bar properly. */ + itemStack.setItemDamage((int) (100 - (energyStored / getMaxElectricityStored(itemStack)) * 100)); + return energyStored; + } - /** - * Sets the damage as a percentage to render the bar properly. - */ - itemStack.setItemDamage((int) (100 - (electricityStored / getMaxElectricityStored(itemStack)) * 100)); - return electricityStored; - } - - @Override - public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) - { - // Add an uncharged version of the electric item - par3List.add(ElectricItemHelper.getUncharged(new ItemStack(this))); - // Add an electric item to the creative list that is fully charged - ItemStack chargedItem = new ItemStack(this); - par3List.add(ElectricItemHelper.getWithCharge(chargedItem, this.getMaxElectricityStored(chargedItem))); - } + @Override + public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) + { + par3List.add(ElectricItemHelper.getUncharged(new ItemStack(this))); + par3List.add(ElectricItemHelper.getWithCharge(new ItemStack(this), this.getMaxElectricityStored(new ItemStack(this)))); + } } diff --git a/APIs/universalelectricity/core/vector/Quaternion.java b/APIs/universalelectricity/core/vector/Quaternion.java index 43f4fcd4..170a3970 100644 --- a/APIs/universalelectricity/core/vector/Quaternion.java +++ b/APIs/universalelectricity/core/vector/Quaternion.java @@ -1,179 +1,213 @@ package universalelectricity.core.vector; -import universalelectricity.core.vector.Vector3; - -/** Simple quaternion class designed to be used for rotation of objects. - * - * @author DarkGuardsman */ -public class Quaternion +/** + * Quaternion class designed to be used for the rotation of objects. + * + * Do not use in MC 1.6.4, subject to change! + * + * @author DarkGuardsman, Calclavia + */ +public class Quaternion implements Cloneable { - public static final float TOLERANCE = 0.00001f; - float x, y, z, w; + public static final float TOLERANCE = 0.00001f; + public double x, y, z, w; - public Quaternion() - { - this(0, 0, 0, 1); - } + public Quaternion() + { + this(0, 0, 0, 1); + } - public Quaternion(float x, float y, float z, float w) - { - this.x = x; - this.y = y; - this.z = z; - this.w = w; - } + public Quaternion(Quaternion copy) + { + this(copy.x, copy.y, copy.z, copy.w); + } - public Quaternion(Vector3 vec, float w) - { - this((float) vec.x, (float) vec.y, (float) vec.z, w); - } + public Quaternion(double x, double y, double z, double w) + { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } - public void set(Quaternion quaternion) - { - w = quaternion.w; - x = quaternion.x; - y = quaternion.y; - z = quaternion.z; - } + /** + * Convert from Euler Angles. Basically we create 3 Quaternions, one for pitch, one for yaw, one + * for roll and multiply those together. the calculation below does the same, just shorter + */ + public Quaternion(float pitch, float yaw, float roll) + { + float p = (float) (pitch * (Math.PI / 180) / 2.0); + float y = (float) (yaw * (Math.PI / 180) / 2.0); + float r = (float) (roll * (Math.PI / 180) / 2.0); - public void set(float x, float y, float z, float w) - { - this.x = x; - this.y = y; - this.z = z; - this.w = w; - } + float sinp = (float) Math.sin(p); + float siny = (float) Math.sin(y); + float sinr = (float) Math.sin(r); + float cosp = (float) Math.cos(p); + float cosy = (float) Math.cos(y); + float cosr = (float) Math.cos(r); - /** Normalizes the Quaternion only if its outside the min errors range */ - public void normalise() - { - // Don't normalize if we don't have to - double mag2 = w * w + x * x + y * y + z * z; - if (Math.abs(mag2) > TOLERANCE && Math.abs(mag2 - 1.0f) > TOLERANCE) - { - float mag = (float) Math.sqrt(mag2); - w /= mag; - x /= mag; - y /= mag; - z /= mag; - } - } + this.x = sinr * cosp * cosy - cosr * sinp * siny; + this.y = cosr * sinp * cosy + sinr * cosp * siny; + this.z = cosr * cosp * siny - sinr * sinp * cosy; + this.w = cosr * cosp * cosy + sinr * sinp * siny; - /** Gets the inverse of this Quaternion */ - public Quaternion getConj() - { - return new Quaternion(-x, -y, -z, w); - } + this.normalize(); + } - public void conj() - { - x = -x; - y = -y; - z = -z; - } + public Quaternion(Vector3 vector, double w) + { + this(vector.x, vector.y, vector.z, w); + } - /** Multiplying q1 with q2 applies the rotation q2 to q1 */ - public Quaternion multi(Quaternion rq) - { - return new Quaternion(w * rq.x + x * rq.w + y * rq.z - z * rq.y, w * rq.y + y * rq.w + z * rq.x - x * rq.z, w * rq.z + z * rq.w + x * rq.y - y * rq.x, w * rq.w - x * rq.x - y * rq.y - z * rq.z); - } + public static Quaternion IDENTITY() + { + return new Quaternion(); + } - public void multLocal(Quaternion q) - { - Quaternion temp = this.multi(q); - this.set(temp); - } + public Quaternion set(Quaternion quaternion) + { + this.w = quaternion.w; + this.x = quaternion.x; + this.y = quaternion.y; + this.z = quaternion.z; + return this; + } - /** Multi a vector against this in other words applying rotation */ - public Vector3 multi(Vector3 vec) - { - Vector3 vn = vec.clone(); + public Quaternion set(double x, double y, double z, double w) + { + return this.set(new Quaternion(x, y, z, w)); + } - Quaternion vecQuat = new Quaternion(0, 0, 0, 1), resQuat; - vecQuat.x = (float) vn.x; - vecQuat.y = (float) vn.y; - vecQuat.z = (float) vn.z; - vecQuat.w = 0.0f; + public Quaternion normalize() + { + double magnitude = this.magnitude(); + this.x /= magnitude; + this.y /= magnitude; + this.z /= magnitude; + this.w /= magnitude; + return this; + } - resQuat = vecQuat.multi(this.getConj()); - resQuat = this.multi(resQuat); + public double magnitude() + { + return Math.sqrt(this.magnitudeSquared()); + } - return new Vector3(resQuat.x, resQuat.y, resQuat.z); - } + public double magnitudeSquared() + { + return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w; + } - public void FromAxis(Vector3 v, float angle) - { - angle *= 0.5f; - Vector3 vn = v.clone(); - vn.normalize(); + public Quaternion inverse() + { + double d = this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w; + return new Quaternion(this.x / d, -this.y / d, -this.z / d, -this.w / d); + } - float sinAngle = (float) Math.sin(angle); + /** + * Gets the conjugate of this Quaternion + */ + public Quaternion getConjugate() + { + return this.clone().conjugate(); + } - x = (float) (vn.x * sinAngle); - y = (float) (vn.y * sinAngle); - z = (float) (vn.z * sinAngle); - w = (float) Math.cos(angle); - } + public Quaternion conjugate() + { + this.y = -this.y; + this.z = -this.z; + this.w = -this.w; + return this; + } - // Convert from Euler Angles - public void FromEuler(float pitch, float yaw, float roll) - { - // Basically we create 3 Quaternions, one for pitch, one for yaw, one for roll - // and multiply those together. - // the calculation below does the same, just shorter + /** + * Let the current quaternion be "a". Multiplying the a with b applies the rotation a to b. + */ + public Quaternion getMultiply(Quaternion b) + { + return this.clone().multiply(b); + } - float p = (float) (pitch * (Math.PI / 180) / 2.0); - float y = (float) (yaw * (Math.PI / 180) / 2.0); - float r = (float) (roll * (Math.PI / 180) / 2.0); + public Quaternion multiply(Quaternion b) + { + Quaternion a = this; + double newX = a.x * b.x - a.y * b.y - a.z * b.z - a.w * b.w; + double newY = a.x * b.y + a.y * b.x + a.z * b.w - a.w * b.z; + double newZ = a.x * b.z - a.y * b.w + a.z * b.x + a.w * b.y; + double newW = a.x * b.w + a.y * b.z - a.z * b.y + a.w * b.x; + this.set(newX, newY, newZ, newW); + return this; + } - float sinp = (float) Math.sin(p); - float siny = (float) Math.sin(y); - float sinr = (float) Math.sin(r); - float cosp = (float) Math.cos(p); - float cosy = (float) Math.cos(y); - float cosr = (float) Math.cos(r); + public Quaternion divide(Quaternion b) + { + Quaternion a = this; + return a.inverse().multiply(b); + } - x = sinr * cosp * cosy - cosr * sinp * siny; - y = cosr * sinp * cosy + sinr * cosp * siny; - z = cosr * cosp * siny - sinr * sinp * cosy; - w = cosr * cosp * cosy + sinr * sinp * siny; + /** Multi a vector against this in other words applying rotation */ + public Vector3 multi(Vector3 vec) + { + Vector3 vn = vec.clone(); - normalise(); - } + Quaternion vecQuat = new Quaternion(0, 0, 0, 1), resQuat; + vecQuat.x = (float) vn.x; + vecQuat.y = (float) vn.y; + vecQuat.z = (float) vn.z; + vecQuat.w = 0.0f; - /* Convert to Matrix - public Matrix4 getMatrix() - { - float x2 = (float) (x * x); - float y2 = (float) (y * y); - float z2 = (float) (z * z); - float xy = (float) (x * y); - float xz = (float) (x * z); - float yz = (float) (y * z); - float wx = (float) (w * x); - float wy = (float) (w * y); - float wz = (float) (w * z); + resQuat = vecQuat.multiply(this.getConjugate()); + resQuat = this.multiply(resQuat); - // This calculation would be a lot more complicated for non-unit length quaternions - // Note: The constructor of Matrix4 expects the Matrix in column-major format like expected - // by - // OpenGL - return new Matrix4(1.0f - 2.0f * (y2 + z2), 2.0f * (xy - wz), 2.0f * (xz + wy), 0.0f, 2.0f * (xy + wz), 1.0f - 2.0f * (x2 + z2), 2.0f * (yz - wx), 0.0f, 2.0f * (xz - wy), 2.0f * (yz + wx), 1.0f - 2.0f * (x2 + y2), 0.0f, 0.0f, 0.0f, 0.0f, 1.0f); - }*/ + return new Vector3(resQuat.x, resQuat.y, resQuat.z); + } - // Convert to Axis/Angles - public void getAxisAngle(Vector3 axis, float angle) - { - float scale = (float) Math.sqrt(x * x + y * y + z * z); - x = x / scale; - y = y / scale; - z = z / scale; - angle = (float) (Math.acos(w) * 2.0f); - } + public static Quaternion fromAxis(Vector3 vector, double angle) + { + angle *= 0.5f; + Vector3 vn = vector.clone().normalize(); + float sinAngle = (float) Math.sin(angle); + return new Quaternion(vn.x * sinAngle, vn.y * sinAngle, vn.z * sinAngle, Math.cos(angle)); + } - @Override - public String toString() - { - return "<" + x + "x " + y + "y " + z + "z @" + w + ">"; - } + /* + * Convert to Matrix public Matrix4 getMatrix() { float x2 = (float) (x * x); float y2 = (float) + * (y * y); float z2 = (float) (z * z); float xy = (float) (x * y); float xz = (float) (x * z); + * float yz = (float) (y * z); float wx = (float) (w * x); float wy = (float) (w * y); float wz + * = (float) (w * z); + * + * // This calculation would be a lot more complicated for non-unit length quaternions // Note: + * The constructor of Matrix4 expects the Matrix in column-major format like expected // by // + * OpenGL return new Matrix4(1.0f - 2.0f * (y2 + z2), 2.0f * (xy - wz), 2.0f * (xz + wy), 0.0f, + * 2.0f * (xy + wz), 1.0f - 2.0f * (x2 + z2), 2.0f * (yz - wx), 0.0f, 2.0f * (xz - wy), 2.0f * + * (yz + wx), 1.0f - 2.0f * (x2 + y2), 0.0f, 0.0f, 0.0f, 0.0f, 1.0f); } + */ + + /** + * Convert to Axis/Angles + * + * @param axis - The axis of rotation + * @param angle - The angle of rotation + */ + public void getAxisAngle(Vector3 axis, float angle) + { + float scale = (float) axis.getMagnitude(); + this.x = this.x / scale; + this.y = this.y / scale; + this.z = this.z / scale; + angle = (float) (Math.acos(this.w) * 2.0f); + } + + @Override + public Quaternion clone() + { + return new Quaternion(this); + } + + @Override + public String toString() + { + return "Quaternion [" + x + ", " + y + ", " + z + ", " + w + "]"; + } } diff --git a/APIs/universalelectricity/core/vector/Vector3.java b/APIs/universalelectricity/core/vector/Vector3.java index 6e63c731..65361a43 100644 --- a/APIs/universalelectricity/core/vector/Vector3.java +++ b/APIs/universalelectricity/core/vector/Vector3.java @@ -712,7 +712,7 @@ public class Vector3 implements Cloneable { // Somehow this destroys the playerPosition vector -.- MovingObjectPosition pickedBlock = this.rayTraceBlocks(world, rotationYaw, rotationPitch, collisionFlag, reachDistance); - MovingObjectPosition pickedEntity = this.rayTraceEntities(world, rotationYaw, rotationPitch, collisionFlag, reachDistance); + MovingObjectPosition pickedEntity = this.rayTraceEntities(world, rotationYaw, rotationPitch, reachDistance); if (pickedBlock == null) { @@ -740,8 +740,8 @@ public class Vector3 implements Cloneable public MovingObjectPosition rayTraceBlocks(World world, float rotationYaw, float rotationPitch, boolean collisionFlag, double reachDistance) { - Vector3 lookVector = getDeltaPositionFromRotation(rotationYaw, rotationPitch); - Vector3 reachPoint = translate(this, Vector3.scale(lookVector, reachDistance)); + Vector3 lookVector = this.getDeltaPositionFromRotation(rotationYaw, rotationPitch); + Vector3 reachPoint = this.clone().translate(lookVector.clone().scale(reachDistance)); return world.rayTraceBlocks_do_do(this.toVec3(), reachPoint.toVec3(), collisionFlag, !collisionFlag); } @@ -756,11 +756,19 @@ public class Vector3 implements Cloneable return this.rayTraceEntities(world, getDeltaPositionFromRotation(rotationYaw, rotationPitch).scale(reachDistance)); } + /** + * Does an entity raytrace. + * + * @param world - The world object. + * @param target - The rotation in terms of Vector3. Convert using + * getDeltaPositionFromRotation() + * @return The target hit. + */ public MovingObjectPosition rayTraceEntities(World world, Vector3 target) { MovingObjectPosition pickedEntity = null; Vec3 startingPosition = this.toVec3(); - Vec3 look = target.clone().difference(this).normalize().toVec3(); + Vec3 look = target.toVec3(); double reachDistance = this.distance(target); Vec3 reachPoint = Vec3.createVectorHelper(startingPosition.xCoord + look.xCoord * reachDistance, startingPosition.yCoord + look.yCoord * reachDistance, startingPosition.zCoord + look.zCoord * reachDistance); diff --git a/APIs/universalelectricity/prefab/tile/TileEntityElectrical.java b/APIs/universalelectricity/prefab/tile/TileEntityElectrical.java index 84beadfe..f7ac5c2a 100644 --- a/APIs/universalelectricity/prefab/tile/TileEntityElectrical.java +++ b/APIs/universalelectricity/prefab/tile/TileEntityElectrical.java @@ -62,22 +62,32 @@ public abstract class TileEntityElectrical extends TileEntityAdvanced implements if (provide > 0) { - TileEntity outputTile = VectorHelper.getConnectorFromSide(this.worldObj, new Vector3(this), outputDirection); - IElectricityNetwork outputNetwork = ElectricityHelper.getNetworkFromTileEntity(outputTile, outputDirection); + TileEntity outputTile = VectorHelper.getConnectorFromSide(this.worldObj, new Vector3(this), outputDirection); + IElectricityNetwork outputNetwork = ElectricityHelper.getNetworkFromTileEntity(outputTile, outputDirection); + if (outputNetwork != null) + { + ElectricityPack powerRequest = outputNetwork.getRequest(this); - if (outputNetwork != null) - { - ElectricityPack powerRequest = outputNetwork.getRequest(this); - - if (powerRequest.getWatts() > 0) - { - ElectricityPack sendPack = ElectricityPack.min(ElectricityPack.getFromWatts(this.getEnergyStored(), this.getVoltage()), ElectricityPack.getFromWatts(provide, this.getVoltage())); - float rejectedPower = outputNetwork.produce(sendPack, this); - this.provideElectricity(sendPack.getWatts() - rejectedPower, true); - } - - return true; - } + if (powerRequest.getWatts() > 0) + { + ElectricityPack sendPack = ElectricityPack.min(ElectricityPack.getFromWatts(this.getEnergyStored(), this.getVoltage()), ElectricityPack.getFromWatts(provide, this.getVoltage())); + float rejectedPower = outputNetwork.produce(sendPack, this); + this.provideElectricity(sendPack.getWatts() - rejectedPower, true); + return true; + } + } + else if (outputTile instanceof IElectrical) + { + float requestedEnergy = ((IElectrical) outputTile).getRequest(outputDirection.getOpposite()); + + if (requestedEnergy > 0) + { + ElectricityPack sendPack = ElectricityPack.min(ElectricityPack.getFromWatts(this.getEnergyStored(), this.getVoltage()), ElectricityPack.getFromWatts(provide, this.getVoltage())); + float acceptedEnergy = ((IElectrical) outputTile).receiveElectricity(outputDirection.getOpposite(), sendPack, true); + this.setEnergyStored(this.getEnergyStored() - acceptedEnergy); + return true; + } + } } }