From 0fecf28b65804832454c9bad2c87fc8d4aa9bc08 Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Mon, 18 Mar 2019 18:39:23 +0100 Subject: [PATCH] Refractored Code +added Solar Factory -removed unnessecary solar and essentia generator classes +started gtnh researches +added tooltip clearance on solars (maximal output) Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> --- build.properties | 4 +- .../api/java/baubles/api/BaubleType.java | 0 .../api/java/baubles/api/BaublesApi.java | 0 .../java}/api/java/baubles/api/IBauble.java | 0 .../api/java/baubles/api/package-info.java | 0 .../java}/api/java/ic2/api/Direction.class | Bin .../java}/api/java/ic2/api/Direction.java | 0 .../api/java/ic2/api/crops/BaseSeed.class | Bin .../api/java/ic2/api/crops/BaseSeed.java | 0 .../api/java/ic2/api/crops/CropCard.class | Bin .../api/java/ic2/api/crops/CropCard.java | 0 .../java}/api/java/ic2/api/crops/Crops.class | Bin .../java}/api/java/ic2/api/crops/Crops.java | 0 .../api/java/ic2/api/crops/ICropTile.class | Bin .../api/java/ic2/api/crops/ICropTile.java | 0 .../api/java/ic2/api/crops/package-info.class | Bin .../api/java/ic2/api/crops/package-info.java | 0 .../api/java/ic2/api/energy/EnergyNet.class | Bin .../api/java/ic2/api/energy/EnergyNet.java | 0 .../api/java/ic2/api/energy/IEnergyNet.class | Bin .../api/java/ic2/api/energy/IEnergyNet.java | 0 .../api/java/ic2/api/energy/NodeStats.class | Bin .../api/java/ic2/api/energy/NodeStats.java | 0 .../api/energy/event/EnergyTileEvent.class | Bin .../ic2/api/energy/event/EnergyTileEvent.java | 0 .../energy/event/EnergyTileLoadEvent.class | Bin .../api/energy/event/EnergyTileLoadEvent.java | 0 .../energy/event/EnergyTileUnloadEvent.class | Bin .../energy/event/EnergyTileUnloadEvent.java | 0 .../ic2/api/energy/event/package-info.class | Bin .../ic2/api/energy/event/package-info.java | 0 .../java/ic2/api/energy/package-info.class | Bin .../api/java/ic2/api/energy/package-info.java | 0 .../ic2/api/energy/prefab/BasicSink.class | Bin .../java/ic2/api/energy/prefab/BasicSink.java | 0 .../ic2/api/energy/prefab/BasicSource.class | Bin .../ic2/api/energy/prefab/BasicSource.java | 0 .../ic2/api/energy/prefab/package-info.class | Bin .../ic2/api/energy/prefab/package-info.java | 0 .../ic2/api/energy/tile/IEnergyAcceptor.class | Bin .../ic2/api/energy/tile/IEnergyAcceptor.java | 0 .../api/energy/tile/IEnergyConductor.class | Bin .../ic2/api/energy/tile/IEnergyConductor.java | 0 .../ic2/api/energy/tile/IEnergyEmitter.class | Bin .../ic2/api/energy/tile/IEnergyEmitter.java | 0 .../ic2/api/energy/tile/IEnergySink.class | Bin .../java/ic2/api/energy/tile/IEnergySink.java | 0 .../ic2/api/energy/tile/IEnergySource.class | Bin .../ic2/api/energy/tile/IEnergySource.java | 0 .../ic2/api/energy/tile/IEnergyTile.class | Bin .../java/ic2/api/energy/tile/IEnergyTile.java | 0 .../ic2/api/energy/tile/IHeatSource.class | Bin .../java/ic2/api/energy/tile/IHeatSource.java | 0 .../ic2/api/energy/tile/IKineticSource.class | Bin .../ic2/api/energy/tile/IKineticSource.java | 0 .../ic2/api/energy/tile/IMetaDelegate.class | Bin .../ic2/api/energy/tile/IMetaDelegate.java | 0 .../ic2/api/energy/tile/package-info.class | Bin .../ic2/api/energy/tile/package-info.java | 0 .../java}/api/java/ic2/api/energy/usage.txt | 0 .../java/ic2/api/event/ExplosionEvent.class | Bin .../java/ic2/api/event/ExplosionEvent.java | 0 .../event/LaserEvent$LaserExplodesEvent.class | Bin .../LaserEvent$LaserHitsBlockEvent.class | Bin .../LaserEvent$LaserHitsEntityEvent.class | Bin .../event/LaserEvent$LaserShootEvent.class | Bin .../api/java/ic2/api/event/LaserEvent.class | Bin .../api/java/ic2/api/event/LaserEvent.java | 0 .../api/java/ic2/api/event/PaintEvent.class | Bin .../api/java/ic2/api/event/PaintEvent.java | 0 .../java/ic2/api/event/RetextureEvent.class | Bin .../java/ic2/api/event/RetextureEvent.java | 0 .../api/java/ic2/api/event/package-info.class | Bin .../api/java/ic2/api/event/package-info.java | 0 .../ic2/api/info/IEnergyValueProvider.class | Bin .../ic2/api/info/IEnergyValueProvider.java | 0 .../ic2/api/info/IFuelValueProvider.class | Bin .../java/ic2/api/info/IFuelValueProvider.java | 0 .../java}/api/java/ic2/api/info/Info.class | Bin .../java}/api/java/ic2/api/info/Info.java | 0 .../api/java/ic2/api/info/package-info.class | Bin .../api/java/ic2/api/info/package-info.java | 0 .../api/java/ic2/api/item/ElectricItem.class | Bin .../api/java/ic2/api/item/ElectricItem.java | 0 .../api/item/IBackupElectricItemManager.class | Bin .../api/item/IBackupElectricItemManager.java | 0 .../ic2/api/item/IBlockCuttingBlade.class | Bin .../java/ic2/api/item/IBlockCuttingBlade.java | 0 .../api/java/ic2/api/item/IBoxable.class | Bin .../java}/api/java/ic2/api/item/IBoxable.java | 0 .../api/java/ic2/api/item/IC2Items.class | Bin .../java}/api/java/ic2/api/item/IC2Items.java | 0 .../java/ic2/api/item/ICustomDamageItem.class | Bin .../java/ic2/api/item/ICustomDamageItem.java | 0 .../api/java/ic2/api/item/IDebuggable.class | Bin .../api/java/ic2/api/item/IDebuggable.java | 0 .../api/java/ic2/api/item/IElectricItem.class | Bin .../api/java/ic2/api/item/IElectricItem.java | 0 .../ic2/api/item/IElectricItemManager.class | Bin .../ic2/api/item/IElectricItemManager.java | 0 .../api/java/ic2/api/item/IItemHudInfo.class | Bin .../api/java/ic2/api/item/IItemHudInfo.java | 0 .../api/item/IKineticRotor$GearboxType.class | Bin .../api/java/ic2/api/item/IKineticRotor.class | Bin .../api/java/ic2/api/item/IKineticRotor.java | 0 .../ic2/api/item/ILatheItem$ILatheTool.class | Bin .../api/java/ic2/api/item/ILatheItem.class | Bin .../api/java/ic2/api/item/ILatheItem.java | 0 .../api/java/ic2/api/item/IMetalArmor.class | Bin .../api/java/ic2/api/item/IMetalArmor.java | 0 .../ic2/api/item/ISpecialElectricItem.class | Bin .../ic2/api/item/ISpecialElectricItem.java | 0 .../java/ic2/api/item/ITerraformingBP.class | Bin .../java/ic2/api/item/ITerraformingBP.java | 0 .../api/java/ic2/api/item/ItemWrapper.class | Bin .../api/java/ic2/api/item/ItemWrapper.java | 0 .../api/java/ic2/api/item/package-info.class | Bin .../api/java/ic2/api/item/package-info.java | 0 ...NetworkClientTileEntityEventListener.class | Bin ...INetworkClientTileEntityEventListener.java | 0 .../api/network/INetworkDataProvider.class | Bin .../ic2/api/network/INetworkDataProvider.java | 0 .../network/INetworkItemEventListener.class | Bin .../network/INetworkItemEventListener.java | 0 .../INetworkTileEntityEventListener.class | Bin .../INetworkTileEntityEventListener.java | 0 .../api/network/INetworkUpdateListener.class | Bin .../api/network/INetworkUpdateListener.java | 0 .../java/ic2/api/network/NetworkHelper.class | Bin .../java/ic2/api/network/NetworkHelper.java | 0 .../java/ic2/api/network/package-info.class | Bin .../java/ic2/api/network/package-info.java | 0 .../java}/api/java/ic2/api/package-info.class | Bin .../java}/api/java/ic2/api/package-info.java | 0 .../api/java/ic2/api/reactor/IReactor.class | Bin .../api/java/ic2/api/reactor/IReactor.java | 0 .../ic2/api/reactor/IReactorChamber.class | Bin .../java/ic2/api/reactor/IReactorChamber.java | 0 .../ic2/api/reactor/IReactorComponent.class | Bin .../ic2/api/reactor/IReactorComponent.java | 0 .../java/ic2/api/reactor/package-info.class | Bin .../java/ic2/api/reactor/package-info.java | 0 .../ICannerBottleRecipeManager$Input.class | Bin .../recipe/ICannerBottleRecipeManager.class | Bin .../recipe/ICannerBottleRecipeManager.java | 0 .../ICannerEnrichRecipeManager$Input.class | Bin .../recipe/ICannerEnrichRecipeManager.class | Bin .../recipe/ICannerEnrichRecipeManager.java | 0 .../api/recipe/ICraftingRecipeManager.class | Bin .../api/recipe/ICraftingRecipeManager.java | 0 .../IFluidHeatManager$BurnProperty.class | Bin .../ic2/api/recipe/IFluidHeatManager.class | Bin .../ic2/api/recipe/IFluidHeatManager.java | 0 .../ic2/api/recipe/ILiquidAcceptManager.class | Bin .../ic2/api/recipe/ILiquidAcceptManager.java | 0 ...xchangerManager$HeatExchangeProperty.class | Bin .../recipe/ILiquidHeatExchangerManager.class | Bin .../recipe/ILiquidHeatExchangerManager.java | 0 .../ic2/api/recipe/IListRecipeManager.class | Bin .../ic2/api/recipe/IListRecipeManager.java | 0 .../api/recipe/IMachineRecipeManager.class | Bin .../ic2/api/recipe/IMachineRecipeManager.java | 0 .../api/recipe/IMachineRecipeManagerExt.class | Bin .../api/recipe/IMachineRecipeManagerExt.java | 0 .../java/ic2/api/recipe/IPatternStorage.class | Bin .../java/ic2/api/recipe/IPatternStorage.java | 0 .../java/ic2/api/recipe/IRecipeInput.class | Bin .../api/java/ic2/api/recipe/IRecipeInput.java | 0 .../ic2/api/recipe/IScrapboxManager.class | Bin .../java/ic2/api/recipe/IScrapboxManager.java | 0 .../ISemiFluidFuelManager$BurnProperty.class | Bin .../api/recipe/ISemiFluidFuelManager.class | Bin .../ic2/api/recipe/ISemiFluidFuelManager.java | 0 .../recipe/RecipeInputFluidContainer.class | Bin .../api/recipe/RecipeInputFluidContainer.java | 0 .../ic2/api/recipe/RecipeInputItemStack.class | Bin .../ic2/api/recipe/RecipeInputItemStack.java | 0 .../ic2/api/recipe/RecipeInputOreDict.class | Bin .../ic2/api/recipe/RecipeInputOreDict.java | 0 .../java/ic2/api/recipe/RecipeOutput.class | Bin .../api/java/ic2/api/recipe/RecipeOutput.java | 0 .../api/java/ic2/api/recipe/Recipes.class | Bin .../api/java/ic2/api/recipe/Recipes.java | 0 .../java/ic2/api/recipe/package-info.class | Bin .../api/java/ic2/api/recipe/package-info.java | 0 .../ic2/api/tile/ExplosionWhitelist.class | Bin .../java/ic2/api/tile/ExplosionWhitelist.java | 0 .../java/ic2/api/tile/IEnergyStorage.class | Bin .../api/java/ic2/api/tile/IEnergyStorage.java | 0 .../api/java/ic2/api/tile/IWrenchable.class | Bin .../api/java/ic2/api/tile/IWrenchable.java | 0 .../api/java/ic2/api/tile/package-info.class | Bin .../api/java/ic2/api/tile/package-info.java | 0 .../api/java/ic2/api/util/IKeyboard.class | Bin .../api/java/ic2/api/util/IKeyboard.java | 0 .../java}/api/java/ic2/api/util/Keys.class | Bin .../java}/api/java/ic2/api/util/Keys.java | 0 .../api/java/ic2/api/util/package-info.class | Bin .../api/java/ic2/api/util/package-info.java | 0 .../java/thaumcraft/api/BlockCoordinates.java | 0 .../api/java/thaumcraft/api/IArchitect.java | 0 .../api/java/thaumcraft/api/IGoggles.java | 0 .../api/java/thaumcraft/api/IRepairable.java | 0 .../thaumcraft/api/IRepairableExtended.java | 0 .../api/java/thaumcraft/api/IRunicArmor.java | 0 .../api/java/thaumcraft/api/IScribeTools.java | 0 .../java/thaumcraft/api/IVisDiscountGear.java | 0 .../api/java/thaumcraft/api/IWarpingGear.java | 0 .../api/java/thaumcraft/api/ItemApi.java | 0 .../api/java/thaumcraft/api/ItemRunic.java | 0 .../java/thaumcraft/api/ThaumcraftApi.java | 0 .../thaumcraft/api/ThaumcraftApiHelper.java | 0 .../java/thaumcraft/api/TileThaumcraft.java | 0 .../java/thaumcraft/api/WorldCoordinates.java | 0 .../java/thaumcraft/api/aspects/Aspect.java | 0 .../thaumcraft/api/aspects/AspectList.java | 0 .../api/aspects/AspectSourceHelper.java | 0 .../api/aspects/IAspectContainer.java | 0 .../thaumcraft/api/aspects/IAspectSource.java | 0 .../api/aspects/IEssentiaContainerItem.java | 0 .../api/aspects/IEssentiaTransport.java | 0 .../api/crafting/CrucibleRecipe.java | 0 .../api/crafting/IArcaneRecipe.java | 0 .../api/crafting/IInfusionStabiliser.java | 0 .../crafting/InfusionEnchantmentRecipe.java | 0 .../api/crafting/InfusionRecipe.java | 0 .../api/crafting/ShapedArcaneRecipe.java | 0 .../api/crafting/ShapelessArcaneRecipe.java | 0 .../DamageSourceIndirectThaumcraftEntity.java | 0 .../damagesource/DamageSourceThaumcraft.java | 0 .../thaumcraft/api/entities/IEldritchMob.java | 0 .../thaumcraft/api/entities/ITaintedMob.java | 0 .../internal/DummyInternalMethodHandler.java | 0 .../api/internal/IInternalMethodHandler.java | 0 .../api/internal/WeightedRandomLoot.java | 0 .../api/java/thaumcraft/api/nodes/INode.java | 0 .../java/thaumcraft/api/nodes/IRevealer.java | 0 .../thaumcraft/api/nodes/NodeModifier.java | 0 .../java/thaumcraft/api/nodes/NodeType.java | 0 .../api/java/thaumcraft/api/package-info.java | 0 .../api/potions/PotionFluxTaint.java | 0 .../api/potions/PotionVisExhaust.java | 0 .../api/research/IScanEventHandler.java | 0 .../api/research/ResearchCategories.java | 0 .../api/research/ResearchCategoryList.java | 0 .../thaumcraft/api/research/ResearchItem.java | 0 .../thaumcraft/api/research/ResearchPage.java | 0 .../thaumcraft/api/research/ScanResult.java | 0 .../thaumcraft/api/visnet/TileVisNode.java | 0 .../thaumcraft/api/visnet/VisNetHandler.java | 0 .../api/wands/FocusUpgradeType.java | 0 .../api/wands/IWandRodOnUpdate.java | 0 .../api/wands/IWandTriggerManager.java | 0 .../java/thaumcraft/api/wands/IWandable.java | 0 .../thaumcraft/api/wands/ItemFocusBasic.java | 0 .../java/thaumcraft/api/wands/StaffRod.java | 0 .../java/thaumcraft/api/wands/WandCap.java | 0 .../java/thaumcraft/api/wands/WandRod.java | 0 .../api/wands/WandTriggerRegistry.java | 0 src/main/java/emt/EMT.java | 164 ++- src/main/java/emt/block/BlockBase.java | 30 +- .../java/emt/block/BlockBaseContainer.java | 223 ++-- .../java/emt/block/BlockElectricCloud.java | 122 +- .../emt/block/BlockEssentiaGenerators.java | 141 +-- src/main/java/emt/block/BlockMachines.java | 196 ++-- .../java/emt/block/BlockPortableNode.java | 104 +- .../java/emt/block/BlockReflectedGen.java | 110 -- src/main/java/emt/block/BlockShield.java | 96 +- src/main/java/emt/block/BlockSolars.java | 328 ++---- src/main/java/emt/client/EMTKeys.java | 13 +- .../emt/client/gui/GuiEtherealMacerator.java | 41 +- .../java/emt/client/gui/GuiGenerator.java | 114 +- .../gui/GuiIndustrialWandRecharger.java | 41 +- src/main/java/emt/client/gui/GuiSolar.java | 198 ++-- .../emt/client/gui/config/EMTGuiConfig.java | 28 +- .../emt/client/gui/config/EMTGuiFactory.java | 30 +- .../gui/container/ConainerGenerator.java | 131 ++- .../container/ContainerEtheralMacerator.java | 121 +- .../ContainerIndustrialWandRecharge.java | 90 +- .../client/gui/container/ContainerSolars.java | 105 +- .../emt/client/model/ModelSpecialArmor.java | 192 ++-- .../java/emt/client/model/ModelWings.java | 111 +- .../java/emt/client/renderer/RenderLaser.java | 103 +- .../emt/client/renderer/RenderShield.java | 129 ++- src/main/java/emt/command/CommandOutputs.java | 119 +- src/main/java/emt/entity/EntityArcher.java | 148 +-- .../java/emt/entity/EntityEnergyBall.java | 352 +++--- src/main/java/emt/entity/EntityLaser.java | 445 ++++---- src/main/java/emt/entity/EntityShield.java | 158 +-- .../gthandler/common/blocks/EMT_GT_Block.java | 30 +- .../common/implementations/EssentiaHatch.java | 54 +- .../automation/EssentiaFiller.java | 146 ++- .../common/items/EMT_CasingBlock.java | 23 +- .../common/loader/EMT_GT_Loader.java | 27 +- .../generator/EMT_Large_Essentia_Gen.java | 598 +++++----- .../java/emt/init/EMTAutogeneratedGens.java | 32 - src/main/java/emt/init/EMTBlocks.java | 92 +- src/main/java/emt/init/EMTEntities.java | 44 +- src/main/java/emt/init/EMTItems.java | 229 ++-- src/main/java/emt/init/EMTRecipes.java | 772 +++++++------ src/main/java/emt/init/EMTResearches.java | 444 ++++---- src/main/java/emt/init/EMTTiles.java | 120 +- .../init/EMT_GTNH_Recipes_And_Researches.java | 216 ++++ src/main/java/emt/init/Registry.java | 48 +- src/main/java/emt/item/ItemBase.java | 28 +- .../emt/item/ItemElectricScribingTools.java | 84 +- src/main/java/emt/item/ItemIC2Baubles.java | 207 ++-- src/main/java/emt/item/ItemMaterials.java | 331 +++--- src/main/java/emt/item/ItemOneRing.java | 352 +++--- .../boots/ItemElectricBootsTraveller.java | 408 ++++--- .../armor/boots/ItemNanoBootsTraveller.java | 70 +- .../boots/ItemQuantumBootsTraveller.java | 70 +- .../ItemInfusedQuantumChestplate.java | 1010 ++++++++--------- .../armor/goggles/ItemElectricGoggles.java | 274 +++-- .../item/armor/goggles/ItemNanoGoggles.java | 64 +- .../armor/goggles/ItemQuantumGoggles.java | 130 +-- .../goggles/ItemSolarHelmetRevealing.java | 151 ++- .../emt/item/armor/wings/ItemFeatherWing.java | 179 ++- .../emt/item/armor/wings/ItemNanoWing.java | 250 ++-- .../emt/item/armor/wings/ItemQuantumWing.java | 10 +- .../wings/ItemThaumiumReinforcedWing.java | 70 +- .../item/block/ItemBlockElectricCloud.java | 40 +- .../block/ItemBlockEssentiaGenerators.java | 173 ++- .../emt/item/block/ItemBlockMachines.java | 86 +- .../java/emt/item/block/ItemBlockSolars.java | 546 +++++---- .../java/emt/item/focus/ItemBaseFocus.java | 165 ++- .../java/emt/item/focus/ItemChargeFocus.java | 119 +- .../emt/item/focus/ItemChristmasFocus.java | 70 +- .../emt/item/focus/ItemEnergyBallFocus.java | 62 +- .../emt/item/focus/ItemExplosionFocus.java | 84 +- .../java/emt/item/focus/ItemShieldFocus.java | 84 +- .../emt/item/focus/ItemWandChargingFocus.java | 94 +- .../emt/item/tool/ItemElectricHoeGrowth.java | 208 ++-- .../emt/item/tool/ItemElectricThorHammer.java | 2 +- .../java/emt/item/tool/ItemThorHammer.java | 126 +- .../emt/item/tool/ItemThorHammerBroken.java | 81 +- .../tool/chainsaw/ItemDiamondChainsaw.java | 424 ++++--- .../tool/chainsaw/ItemStreamChainsaw.java | 125 +- .../tool/chainsaw/ItemThaumiumChainsaw.java | 60 +- .../item/tool/drill/ItemRockbreakerDrill.java | 304 +++-- .../item/tool/drill/ItemThaumiumDrill.java | 206 ++-- .../tool/omnitool/ItemOmnitoolDiamond.java | 82 +- .../item/tool/omnitool/ItemOmnitoolIron.java | 269 +++-- .../tool/omnitool/ItemOmnitoolThaumium.java | 82 +- src/main/java/emt/network/PacketEMTKeys.java | 28 +- src/main/java/emt/proxy/ClientProxy.java | 54 +- src/main/java/emt/proxy/CommonProxy.java | 96 +- .../emt/tile/DefinitelyNotAIC2Source.java | 65 +- src/main/java/emt/tile/TileElectricCloud.java | 64 +- src/main/java/emt/tile/TileEntityEMT.java | 76 +- .../emt/tile/TileEntityEtherealMacerator.java | 456 ++++---- .../TileEntityIndustrialWandRecharge.java | 314 +++-- .../java/emt/tile/TileEntityPortableNode.java | 22 +- .../generator/TileEntityAerGenerator.java | 12 - .../generator/TileEntityArborGenerator.java | 12 - .../generator/TileEntityAuramGenerator.java | 12 - .../generator/TileEntityBaseGenerator.java | 77 +- .../TileEntityCompressedGenerator.java | 18 +- .../generator/TileEntityIgnisGenerator.java | 12 - .../generator/TileEntityLucrumGenerator.java | 12 - .../TileEntityPotentiaGenerator.java | 12 - .../generator/TileEntityReflexionGen.java | 25 - src/main/java/emt/tile/solar/Solars.java | 155 +++ .../emt/tile/solar/TileEntitySolarBase.java | 295 ++++- .../tile/solar/air/TileEntityAirSolar.java | 39 - .../solar/air/TileEntityDoubleAirSolar.java | 27 - .../solar/air/TileEntityTripleAirSolar.java | 27 - .../compressed/TileEntityCompressedSolar.java | 33 - .../TileEntityDoubleCompressedSolar.java | 33 - .../TileEntityTripleCompressedSolar.java | 33 - .../tile/solar/dark/TileEntityDarkSolar.java | 49 - .../solar/dark/TileEntityDoubleDarkSolar.java | 28 - .../solar/dark/TileEntityTripleDarkSolar.java | 28 - .../earth/TileEntityDoubleEarthSolar.java | 28 - .../solar/earth/TileEntityEarthSolar.java | 38 - .../earth/TileEntityTripleEarthSolar.java | 28 - .../solar/fire/TileEntityDoubleFireSolar.java | 28 - .../tile/solar/fire/TileEntityFireSolar.java | 66 -- .../solar/fire/TileEntityTripleFireSolar.java | 28 - .../order/TileEntityDoubleOrderSolar.java | 27 - .../solar/order/TileEntityOrderSolar.java | 49 - .../order/TileEntityTripleOrderSolar.java | 28 - .../water/TileEntityDoubleWaterSolar.java | 28 - .../water/TileEntityTripleWaterSolar.java | 28 - .../solar/water/TileEntityWaterSolar.java | 57 - .../java/emt/util/EMTClientEventHandler.java | 60 +- src/main/java/emt/util/EMTConfigHandler.java | 401 ++++--- .../java/emt/util/EMTCraftingAspects.java | 98 +- src/main/java/emt/util/EMTCreativeTab.java | 16 +- .../emt/util/EMTDungeonChestGenerator.java | 16 +- src/main/java/emt/util/EMTEventHandler.java | 180 +-- src/main/java/emt/util/EMTRandomHelper.java | 128 +-- .../java/emt/util/EMTResearchAspects.java | 94 +- src/main/java/emt/util/EMTResearchItem.java | 94 +- src/main/java/emt/util/EMTTextHelper.java | 68 +- src/main/resources/assets/emt/lang/en_US.lang | 1 + src/main/resources/mcmod.info | 36 +- 397 files changed, 8693 insertions(+), 9288 deletions(-) rename src/{ => main/java}/api/java/baubles/api/BaubleType.java (100%) rename src/{ => main/java}/api/java/baubles/api/BaublesApi.java (100%) rename src/{ => main/java}/api/java/baubles/api/IBauble.java (100%) rename src/{ => main/java}/api/java/baubles/api/package-info.java (100%) rename src/{ => main/java}/api/java/ic2/api/Direction.class (100%) rename src/{ => main/java}/api/java/ic2/api/Direction.java (100%) rename src/{ => main/java}/api/java/ic2/api/crops/BaseSeed.class (100%) rename src/{ => main/java}/api/java/ic2/api/crops/BaseSeed.java (100%) rename src/{ => main/java}/api/java/ic2/api/crops/CropCard.class (100%) rename src/{ => main/java}/api/java/ic2/api/crops/CropCard.java (100%) rename src/{ => main/java}/api/java/ic2/api/crops/Crops.class (100%) rename src/{ => main/java}/api/java/ic2/api/crops/Crops.java (100%) rename src/{ => main/java}/api/java/ic2/api/crops/ICropTile.class (100%) rename src/{ => main/java}/api/java/ic2/api/crops/ICropTile.java (100%) rename src/{ => main/java}/api/java/ic2/api/crops/package-info.class (100%) rename src/{ => main/java}/api/java/ic2/api/crops/package-info.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/EnergyNet.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/EnergyNet.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/IEnergyNet.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/IEnergyNet.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/NodeStats.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/NodeStats.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/event/EnergyTileEvent.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/event/EnergyTileEvent.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/event/EnergyTileLoadEvent.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/event/EnergyTileLoadEvent.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/event/EnergyTileUnloadEvent.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/event/EnergyTileUnloadEvent.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/event/package-info.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/event/package-info.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/package-info.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/package-info.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/prefab/BasicSink.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/prefab/BasicSink.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/prefab/BasicSource.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/prefab/BasicSource.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/prefab/package-info.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/prefab/package-info.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/IEnergyAcceptor.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/IEnergyAcceptor.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/IEnergyConductor.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/IEnergyConductor.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/IEnergyEmitter.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/IEnergyEmitter.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/IEnergySink.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/IEnergySink.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/IEnergySource.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/IEnergySource.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/IEnergyTile.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/IEnergyTile.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/IHeatSource.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/IHeatSource.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/IKineticSource.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/IKineticSource.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/IMetaDelegate.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/IMetaDelegate.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/package-info.class (100%) rename src/{ => main/java}/api/java/ic2/api/energy/tile/package-info.java (100%) rename src/{ => main/java}/api/java/ic2/api/energy/usage.txt (100%) rename src/{ => main/java}/api/java/ic2/api/event/ExplosionEvent.class (100%) rename src/{ => main/java}/api/java/ic2/api/event/ExplosionEvent.java (100%) rename src/{ => main/java}/api/java/ic2/api/event/LaserEvent$LaserExplodesEvent.class (100%) rename src/{ => main/java}/api/java/ic2/api/event/LaserEvent$LaserHitsBlockEvent.class (100%) rename src/{ => main/java}/api/java/ic2/api/event/LaserEvent$LaserHitsEntityEvent.class (100%) rename src/{ => main/java}/api/java/ic2/api/event/LaserEvent$LaserShootEvent.class (100%) rename src/{ => main/java}/api/java/ic2/api/event/LaserEvent.class (100%) rename src/{ => main/java}/api/java/ic2/api/event/LaserEvent.java (100%) rename src/{ => main/java}/api/java/ic2/api/event/PaintEvent.class (100%) rename src/{ => main/java}/api/java/ic2/api/event/PaintEvent.java (100%) rename src/{ => main/java}/api/java/ic2/api/event/RetextureEvent.class (100%) rename src/{ => main/java}/api/java/ic2/api/event/RetextureEvent.java (100%) rename src/{ => main/java}/api/java/ic2/api/event/package-info.class (100%) rename src/{ => main/java}/api/java/ic2/api/event/package-info.java (100%) rename src/{ => main/java}/api/java/ic2/api/info/IEnergyValueProvider.class (100%) rename src/{ => main/java}/api/java/ic2/api/info/IEnergyValueProvider.java (100%) rename src/{ => main/java}/api/java/ic2/api/info/IFuelValueProvider.class (100%) rename src/{ => main/java}/api/java/ic2/api/info/IFuelValueProvider.java (100%) rename src/{ => main/java}/api/java/ic2/api/info/Info.class (100%) rename src/{ => main/java}/api/java/ic2/api/info/Info.java (100%) rename src/{ => main/java}/api/java/ic2/api/info/package-info.class (100%) rename src/{ => main/java}/api/java/ic2/api/info/package-info.java (100%) rename src/{ => main/java}/api/java/ic2/api/item/ElectricItem.class (100%) rename src/{ => main/java}/api/java/ic2/api/item/ElectricItem.java (100%) rename src/{ => main/java}/api/java/ic2/api/item/IBackupElectricItemManager.class (100%) rename src/{ => main/java}/api/java/ic2/api/item/IBackupElectricItemManager.java (100%) rename src/{ => main/java}/api/java/ic2/api/item/IBlockCuttingBlade.class (100%) rename src/{ => main/java}/api/java/ic2/api/item/IBlockCuttingBlade.java (100%) rename src/{ => main/java}/api/java/ic2/api/item/IBoxable.class (100%) rename src/{ => main/java}/api/java/ic2/api/item/IBoxable.java (100%) rename src/{ => main/java}/api/java/ic2/api/item/IC2Items.class (100%) rename src/{ => main/java}/api/java/ic2/api/item/IC2Items.java (100%) rename src/{ => main/java}/api/java/ic2/api/item/ICustomDamageItem.class (100%) rename src/{ => main/java}/api/java/ic2/api/item/ICustomDamageItem.java (100%) rename src/{ => main/java}/api/java/ic2/api/item/IDebuggable.class (100%) rename src/{ => main/java}/api/java/ic2/api/item/IDebuggable.java (100%) rename src/{ => main/java}/api/java/ic2/api/item/IElectricItem.class (100%) rename src/{ => main/java}/api/java/ic2/api/item/IElectricItem.java (100%) rename src/{ => main/java}/api/java/ic2/api/item/IElectricItemManager.class (100%) rename src/{ => main/java}/api/java/ic2/api/item/IElectricItemManager.java (100%) rename src/{ => main/java}/api/java/ic2/api/item/IItemHudInfo.class (100%) rename src/{ => main/java}/api/java/ic2/api/item/IItemHudInfo.java (100%) rename src/{ => main/java}/api/java/ic2/api/item/IKineticRotor$GearboxType.class (100%) rename src/{ => main/java}/api/java/ic2/api/item/IKineticRotor.class (100%) rename src/{ => main/java}/api/java/ic2/api/item/IKineticRotor.java (100%) rename src/{ => main/java}/api/java/ic2/api/item/ILatheItem$ILatheTool.class (100%) rename src/{ => main/java}/api/java/ic2/api/item/ILatheItem.class (100%) rename src/{ => main/java}/api/java/ic2/api/item/ILatheItem.java (100%) rename src/{ => main/java}/api/java/ic2/api/item/IMetalArmor.class (100%) rename src/{ => main/java}/api/java/ic2/api/item/IMetalArmor.java (100%) rename src/{ => main/java}/api/java/ic2/api/item/ISpecialElectricItem.class (100%) rename src/{ => main/java}/api/java/ic2/api/item/ISpecialElectricItem.java (100%) rename src/{ => main/java}/api/java/ic2/api/item/ITerraformingBP.class (100%) rename src/{ => main/java}/api/java/ic2/api/item/ITerraformingBP.java (100%) rename src/{ => main/java}/api/java/ic2/api/item/ItemWrapper.class (100%) rename src/{ => main/java}/api/java/ic2/api/item/ItemWrapper.java (100%) rename src/{ => main/java}/api/java/ic2/api/item/package-info.class (100%) rename src/{ => main/java}/api/java/ic2/api/item/package-info.java (100%) rename src/{ => main/java}/api/java/ic2/api/network/INetworkClientTileEntityEventListener.class (100%) rename src/{ => main/java}/api/java/ic2/api/network/INetworkClientTileEntityEventListener.java (100%) rename src/{ => main/java}/api/java/ic2/api/network/INetworkDataProvider.class (100%) rename src/{ => main/java}/api/java/ic2/api/network/INetworkDataProvider.java (100%) rename src/{ => main/java}/api/java/ic2/api/network/INetworkItemEventListener.class (100%) rename src/{ => main/java}/api/java/ic2/api/network/INetworkItemEventListener.java (100%) rename src/{ => main/java}/api/java/ic2/api/network/INetworkTileEntityEventListener.class (100%) rename src/{ => main/java}/api/java/ic2/api/network/INetworkTileEntityEventListener.java (100%) rename src/{ => main/java}/api/java/ic2/api/network/INetworkUpdateListener.class (100%) rename src/{ => main/java}/api/java/ic2/api/network/INetworkUpdateListener.java (100%) rename src/{ => main/java}/api/java/ic2/api/network/NetworkHelper.class (100%) rename src/{ => main/java}/api/java/ic2/api/network/NetworkHelper.java (100%) rename src/{ => main/java}/api/java/ic2/api/network/package-info.class (100%) rename src/{ => main/java}/api/java/ic2/api/network/package-info.java (100%) rename src/{ => main/java}/api/java/ic2/api/package-info.class (100%) rename src/{ => main/java}/api/java/ic2/api/package-info.java (100%) rename src/{ => main/java}/api/java/ic2/api/reactor/IReactor.class (100%) rename src/{ => main/java}/api/java/ic2/api/reactor/IReactor.java (100%) rename src/{ => main/java}/api/java/ic2/api/reactor/IReactorChamber.class (100%) rename src/{ => main/java}/api/java/ic2/api/reactor/IReactorChamber.java (100%) rename src/{ => main/java}/api/java/ic2/api/reactor/IReactorComponent.class (100%) rename src/{ => main/java}/api/java/ic2/api/reactor/IReactorComponent.java (100%) rename src/{ => main/java}/api/java/ic2/api/reactor/package-info.class (100%) rename src/{ => main/java}/api/java/ic2/api/reactor/package-info.java (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/ICannerBottleRecipeManager$Input.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/ICannerBottleRecipeManager.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/ICannerBottleRecipeManager.java (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/ICannerEnrichRecipeManager$Input.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.java (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/ICraftingRecipeManager.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/ICraftingRecipeManager.java (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/IFluidHeatManager$BurnProperty.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/IFluidHeatManager.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/IFluidHeatManager.java (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/ILiquidAcceptManager.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/ILiquidAcceptManager.java (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/ILiquidHeatExchangerManager$HeatExchangeProperty.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.java (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/IListRecipeManager.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/IListRecipeManager.java (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/IMachineRecipeManager.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/IMachineRecipeManager.java (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/IMachineRecipeManagerExt.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/IMachineRecipeManagerExt.java (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/IPatternStorage.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/IPatternStorage.java (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/IRecipeInput.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/IRecipeInput.java (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/IScrapboxManager.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/IScrapboxManager.java (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/ISemiFluidFuelManager$BurnProperty.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/ISemiFluidFuelManager.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/ISemiFluidFuelManager.java (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/RecipeInputFluidContainer.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/RecipeInputFluidContainer.java (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/RecipeInputItemStack.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/RecipeInputItemStack.java (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/RecipeInputOreDict.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/RecipeInputOreDict.java (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/RecipeOutput.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/RecipeOutput.java (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/Recipes.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/Recipes.java (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/package-info.class (100%) rename src/{ => main/java}/api/java/ic2/api/recipe/package-info.java (100%) rename src/{ => main/java}/api/java/ic2/api/tile/ExplosionWhitelist.class (100%) rename src/{ => main/java}/api/java/ic2/api/tile/ExplosionWhitelist.java (100%) rename src/{ => main/java}/api/java/ic2/api/tile/IEnergyStorage.class (100%) rename src/{ => main/java}/api/java/ic2/api/tile/IEnergyStorage.java (100%) rename src/{ => main/java}/api/java/ic2/api/tile/IWrenchable.class (100%) rename src/{ => main/java}/api/java/ic2/api/tile/IWrenchable.java (100%) rename src/{ => main/java}/api/java/ic2/api/tile/package-info.class (100%) rename src/{ => main/java}/api/java/ic2/api/tile/package-info.java (100%) rename src/{ => main/java}/api/java/ic2/api/util/IKeyboard.class (100%) rename src/{ => main/java}/api/java/ic2/api/util/IKeyboard.java (100%) rename src/{ => main/java}/api/java/ic2/api/util/Keys.class (100%) rename src/{ => main/java}/api/java/ic2/api/util/Keys.java (100%) rename src/{ => main/java}/api/java/ic2/api/util/package-info.class (100%) rename src/{ => main/java}/api/java/ic2/api/util/package-info.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/BlockCoordinates.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/IArchitect.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/IGoggles.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/IRepairable.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/IRepairableExtended.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/IRunicArmor.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/IScribeTools.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/IVisDiscountGear.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/IWarpingGear.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/ItemApi.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/ItemRunic.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/ThaumcraftApi.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/ThaumcraftApiHelper.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/TileThaumcraft.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/WorldCoordinates.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/aspects/Aspect.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/aspects/AspectList.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/aspects/AspectSourceHelper.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/aspects/IAspectContainer.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/aspects/IAspectSource.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/aspects/IEssentiaContainerItem.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/aspects/IEssentiaTransport.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/crafting/CrucibleRecipe.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/crafting/IArcaneRecipe.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/crafting/IInfusionStabiliser.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/crafting/InfusionRecipe.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/crafting/ShapedArcaneRecipe.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/crafting/ShapelessArcaneRecipe.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/damagesource/DamageSourceIndirectThaumcraftEntity.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/damagesource/DamageSourceThaumcraft.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/entities/IEldritchMob.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/entities/ITaintedMob.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/internal/DummyInternalMethodHandler.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/internal/IInternalMethodHandler.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/internal/WeightedRandomLoot.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/nodes/INode.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/nodes/IRevealer.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/nodes/NodeModifier.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/nodes/NodeType.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/package-info.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/potions/PotionFluxTaint.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/potions/PotionVisExhaust.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/research/IScanEventHandler.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/research/ResearchCategories.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/research/ResearchCategoryList.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/research/ResearchItem.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/research/ResearchPage.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/research/ScanResult.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/visnet/TileVisNode.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/visnet/VisNetHandler.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/wands/FocusUpgradeType.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/wands/IWandRodOnUpdate.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/wands/IWandTriggerManager.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/wands/IWandable.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/wands/ItemFocusBasic.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/wands/StaffRod.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/wands/WandCap.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/wands/WandRod.java (100%) rename src/{ => main/java}/api/java/thaumcraft/api/wands/WandTriggerRegistry.java (100%) delete mode 100644 src/main/java/emt/block/BlockReflectedGen.java delete mode 100644 src/main/java/emt/init/EMTAutogeneratedGens.java create mode 100644 src/main/java/emt/init/EMT_GTNH_Recipes_And_Researches.java delete mode 100644 src/main/java/emt/tile/generator/TileEntityAerGenerator.java delete mode 100644 src/main/java/emt/tile/generator/TileEntityArborGenerator.java delete mode 100644 src/main/java/emt/tile/generator/TileEntityAuramGenerator.java delete mode 100644 src/main/java/emt/tile/generator/TileEntityIgnisGenerator.java delete mode 100644 src/main/java/emt/tile/generator/TileEntityLucrumGenerator.java delete mode 100644 src/main/java/emt/tile/generator/TileEntityPotentiaGenerator.java delete mode 100644 src/main/java/emt/tile/generator/TileEntityReflexionGen.java create mode 100644 src/main/java/emt/tile/solar/Solars.java delete mode 100644 src/main/java/emt/tile/solar/air/TileEntityAirSolar.java delete mode 100644 src/main/java/emt/tile/solar/air/TileEntityDoubleAirSolar.java delete mode 100644 src/main/java/emt/tile/solar/air/TileEntityTripleAirSolar.java delete mode 100644 src/main/java/emt/tile/solar/compressed/TileEntityCompressedSolar.java delete mode 100644 src/main/java/emt/tile/solar/compressed/TileEntityDoubleCompressedSolar.java delete mode 100644 src/main/java/emt/tile/solar/compressed/TileEntityTripleCompressedSolar.java delete mode 100644 src/main/java/emt/tile/solar/dark/TileEntityDarkSolar.java delete mode 100644 src/main/java/emt/tile/solar/dark/TileEntityDoubleDarkSolar.java delete mode 100644 src/main/java/emt/tile/solar/dark/TileEntityTripleDarkSolar.java delete mode 100644 src/main/java/emt/tile/solar/earth/TileEntityDoubleEarthSolar.java delete mode 100644 src/main/java/emt/tile/solar/earth/TileEntityEarthSolar.java delete mode 100644 src/main/java/emt/tile/solar/earth/TileEntityTripleEarthSolar.java delete mode 100644 src/main/java/emt/tile/solar/fire/TileEntityDoubleFireSolar.java delete mode 100644 src/main/java/emt/tile/solar/fire/TileEntityFireSolar.java delete mode 100644 src/main/java/emt/tile/solar/fire/TileEntityTripleFireSolar.java delete mode 100644 src/main/java/emt/tile/solar/order/TileEntityDoubleOrderSolar.java delete mode 100644 src/main/java/emt/tile/solar/order/TileEntityOrderSolar.java delete mode 100644 src/main/java/emt/tile/solar/order/TileEntityTripleOrderSolar.java delete mode 100644 src/main/java/emt/tile/solar/water/TileEntityDoubleWaterSolar.java delete mode 100644 src/main/java/emt/tile/solar/water/TileEntityTripleWaterSolar.java delete mode 100644 src/main/java/emt/tile/solar/water/TileEntityWaterSolar.java diff --git a/build.properties b/build.properties index 5cdda96..45f04ba 100644 --- a/build.properties +++ b/build.properties @@ -1,5 +1,5 @@ package_group=emt mc_version=1.7.10 forge_version=10.13.4.1614 -mod_version=1.2.7.5 -mod_name=ElectroMagicTools +mod_version=1.2.7.6 +mod_name=ElectroMagicTools \ No newline at end of file diff --git a/src/api/java/baubles/api/BaubleType.java b/src/main/java/api/java/baubles/api/BaubleType.java similarity index 100% rename from src/api/java/baubles/api/BaubleType.java rename to src/main/java/api/java/baubles/api/BaubleType.java diff --git a/src/api/java/baubles/api/BaublesApi.java b/src/main/java/api/java/baubles/api/BaublesApi.java similarity index 100% rename from src/api/java/baubles/api/BaublesApi.java rename to src/main/java/api/java/baubles/api/BaublesApi.java diff --git a/src/api/java/baubles/api/IBauble.java b/src/main/java/api/java/baubles/api/IBauble.java similarity index 100% rename from src/api/java/baubles/api/IBauble.java rename to src/main/java/api/java/baubles/api/IBauble.java diff --git a/src/api/java/baubles/api/package-info.java b/src/main/java/api/java/baubles/api/package-info.java similarity index 100% rename from src/api/java/baubles/api/package-info.java rename to src/main/java/api/java/baubles/api/package-info.java diff --git a/src/api/java/ic2/api/Direction.class b/src/main/java/api/java/ic2/api/Direction.class similarity index 100% rename from src/api/java/ic2/api/Direction.class rename to src/main/java/api/java/ic2/api/Direction.class diff --git a/src/api/java/ic2/api/Direction.java b/src/main/java/api/java/ic2/api/Direction.java similarity index 100% rename from src/api/java/ic2/api/Direction.java rename to src/main/java/api/java/ic2/api/Direction.java diff --git a/src/api/java/ic2/api/crops/BaseSeed.class b/src/main/java/api/java/ic2/api/crops/BaseSeed.class similarity index 100% rename from src/api/java/ic2/api/crops/BaseSeed.class rename to src/main/java/api/java/ic2/api/crops/BaseSeed.class diff --git a/src/api/java/ic2/api/crops/BaseSeed.java b/src/main/java/api/java/ic2/api/crops/BaseSeed.java similarity index 100% rename from src/api/java/ic2/api/crops/BaseSeed.java rename to src/main/java/api/java/ic2/api/crops/BaseSeed.java diff --git a/src/api/java/ic2/api/crops/CropCard.class b/src/main/java/api/java/ic2/api/crops/CropCard.class similarity index 100% rename from src/api/java/ic2/api/crops/CropCard.class rename to src/main/java/api/java/ic2/api/crops/CropCard.class diff --git a/src/api/java/ic2/api/crops/CropCard.java b/src/main/java/api/java/ic2/api/crops/CropCard.java similarity index 100% rename from src/api/java/ic2/api/crops/CropCard.java rename to src/main/java/api/java/ic2/api/crops/CropCard.java diff --git a/src/api/java/ic2/api/crops/Crops.class b/src/main/java/api/java/ic2/api/crops/Crops.class similarity index 100% rename from src/api/java/ic2/api/crops/Crops.class rename to src/main/java/api/java/ic2/api/crops/Crops.class diff --git a/src/api/java/ic2/api/crops/Crops.java b/src/main/java/api/java/ic2/api/crops/Crops.java similarity index 100% rename from src/api/java/ic2/api/crops/Crops.java rename to src/main/java/api/java/ic2/api/crops/Crops.java diff --git a/src/api/java/ic2/api/crops/ICropTile.class b/src/main/java/api/java/ic2/api/crops/ICropTile.class similarity index 100% rename from src/api/java/ic2/api/crops/ICropTile.class rename to src/main/java/api/java/ic2/api/crops/ICropTile.class diff --git a/src/api/java/ic2/api/crops/ICropTile.java b/src/main/java/api/java/ic2/api/crops/ICropTile.java similarity index 100% rename from src/api/java/ic2/api/crops/ICropTile.java rename to src/main/java/api/java/ic2/api/crops/ICropTile.java diff --git a/src/api/java/ic2/api/crops/package-info.class b/src/main/java/api/java/ic2/api/crops/package-info.class similarity index 100% rename from src/api/java/ic2/api/crops/package-info.class rename to src/main/java/api/java/ic2/api/crops/package-info.class diff --git a/src/api/java/ic2/api/crops/package-info.java b/src/main/java/api/java/ic2/api/crops/package-info.java similarity index 100% rename from src/api/java/ic2/api/crops/package-info.java rename to src/main/java/api/java/ic2/api/crops/package-info.java diff --git a/src/api/java/ic2/api/energy/EnergyNet.class b/src/main/java/api/java/ic2/api/energy/EnergyNet.class similarity index 100% rename from src/api/java/ic2/api/energy/EnergyNet.class rename to src/main/java/api/java/ic2/api/energy/EnergyNet.class diff --git a/src/api/java/ic2/api/energy/EnergyNet.java b/src/main/java/api/java/ic2/api/energy/EnergyNet.java similarity index 100% rename from src/api/java/ic2/api/energy/EnergyNet.java rename to src/main/java/api/java/ic2/api/energy/EnergyNet.java diff --git a/src/api/java/ic2/api/energy/IEnergyNet.class b/src/main/java/api/java/ic2/api/energy/IEnergyNet.class similarity index 100% rename from src/api/java/ic2/api/energy/IEnergyNet.class rename to src/main/java/api/java/ic2/api/energy/IEnergyNet.class diff --git a/src/api/java/ic2/api/energy/IEnergyNet.java b/src/main/java/api/java/ic2/api/energy/IEnergyNet.java similarity index 100% rename from src/api/java/ic2/api/energy/IEnergyNet.java rename to src/main/java/api/java/ic2/api/energy/IEnergyNet.java diff --git a/src/api/java/ic2/api/energy/NodeStats.class b/src/main/java/api/java/ic2/api/energy/NodeStats.class similarity index 100% rename from src/api/java/ic2/api/energy/NodeStats.class rename to src/main/java/api/java/ic2/api/energy/NodeStats.class diff --git a/src/api/java/ic2/api/energy/NodeStats.java b/src/main/java/api/java/ic2/api/energy/NodeStats.java similarity index 100% rename from src/api/java/ic2/api/energy/NodeStats.java rename to src/main/java/api/java/ic2/api/energy/NodeStats.java diff --git a/src/api/java/ic2/api/energy/event/EnergyTileEvent.class b/src/main/java/api/java/ic2/api/energy/event/EnergyTileEvent.class similarity index 100% rename from src/api/java/ic2/api/energy/event/EnergyTileEvent.class rename to src/main/java/api/java/ic2/api/energy/event/EnergyTileEvent.class diff --git a/src/api/java/ic2/api/energy/event/EnergyTileEvent.java b/src/main/java/api/java/ic2/api/energy/event/EnergyTileEvent.java similarity index 100% rename from src/api/java/ic2/api/energy/event/EnergyTileEvent.java rename to src/main/java/api/java/ic2/api/energy/event/EnergyTileEvent.java diff --git a/src/api/java/ic2/api/energy/event/EnergyTileLoadEvent.class b/src/main/java/api/java/ic2/api/energy/event/EnergyTileLoadEvent.class similarity index 100% rename from src/api/java/ic2/api/energy/event/EnergyTileLoadEvent.class rename to src/main/java/api/java/ic2/api/energy/event/EnergyTileLoadEvent.class diff --git a/src/api/java/ic2/api/energy/event/EnergyTileLoadEvent.java b/src/main/java/api/java/ic2/api/energy/event/EnergyTileLoadEvent.java similarity index 100% rename from src/api/java/ic2/api/energy/event/EnergyTileLoadEvent.java rename to src/main/java/api/java/ic2/api/energy/event/EnergyTileLoadEvent.java diff --git a/src/api/java/ic2/api/energy/event/EnergyTileUnloadEvent.class b/src/main/java/api/java/ic2/api/energy/event/EnergyTileUnloadEvent.class similarity index 100% rename from src/api/java/ic2/api/energy/event/EnergyTileUnloadEvent.class rename to src/main/java/api/java/ic2/api/energy/event/EnergyTileUnloadEvent.class diff --git a/src/api/java/ic2/api/energy/event/EnergyTileUnloadEvent.java b/src/main/java/api/java/ic2/api/energy/event/EnergyTileUnloadEvent.java similarity index 100% rename from src/api/java/ic2/api/energy/event/EnergyTileUnloadEvent.java rename to src/main/java/api/java/ic2/api/energy/event/EnergyTileUnloadEvent.java diff --git a/src/api/java/ic2/api/energy/event/package-info.class b/src/main/java/api/java/ic2/api/energy/event/package-info.class similarity index 100% rename from src/api/java/ic2/api/energy/event/package-info.class rename to src/main/java/api/java/ic2/api/energy/event/package-info.class diff --git a/src/api/java/ic2/api/energy/event/package-info.java b/src/main/java/api/java/ic2/api/energy/event/package-info.java similarity index 100% rename from src/api/java/ic2/api/energy/event/package-info.java rename to src/main/java/api/java/ic2/api/energy/event/package-info.java diff --git a/src/api/java/ic2/api/energy/package-info.class b/src/main/java/api/java/ic2/api/energy/package-info.class similarity index 100% rename from src/api/java/ic2/api/energy/package-info.class rename to src/main/java/api/java/ic2/api/energy/package-info.class diff --git a/src/api/java/ic2/api/energy/package-info.java b/src/main/java/api/java/ic2/api/energy/package-info.java similarity index 100% rename from src/api/java/ic2/api/energy/package-info.java rename to src/main/java/api/java/ic2/api/energy/package-info.java diff --git a/src/api/java/ic2/api/energy/prefab/BasicSink.class b/src/main/java/api/java/ic2/api/energy/prefab/BasicSink.class similarity index 100% rename from src/api/java/ic2/api/energy/prefab/BasicSink.class rename to src/main/java/api/java/ic2/api/energy/prefab/BasicSink.class diff --git a/src/api/java/ic2/api/energy/prefab/BasicSink.java b/src/main/java/api/java/ic2/api/energy/prefab/BasicSink.java similarity index 100% rename from src/api/java/ic2/api/energy/prefab/BasicSink.java rename to src/main/java/api/java/ic2/api/energy/prefab/BasicSink.java diff --git a/src/api/java/ic2/api/energy/prefab/BasicSource.class b/src/main/java/api/java/ic2/api/energy/prefab/BasicSource.class similarity index 100% rename from src/api/java/ic2/api/energy/prefab/BasicSource.class rename to src/main/java/api/java/ic2/api/energy/prefab/BasicSource.class diff --git a/src/api/java/ic2/api/energy/prefab/BasicSource.java b/src/main/java/api/java/ic2/api/energy/prefab/BasicSource.java similarity index 100% rename from src/api/java/ic2/api/energy/prefab/BasicSource.java rename to src/main/java/api/java/ic2/api/energy/prefab/BasicSource.java diff --git a/src/api/java/ic2/api/energy/prefab/package-info.class b/src/main/java/api/java/ic2/api/energy/prefab/package-info.class similarity index 100% rename from src/api/java/ic2/api/energy/prefab/package-info.class rename to src/main/java/api/java/ic2/api/energy/prefab/package-info.class diff --git a/src/api/java/ic2/api/energy/prefab/package-info.java b/src/main/java/api/java/ic2/api/energy/prefab/package-info.java similarity index 100% rename from src/api/java/ic2/api/energy/prefab/package-info.java rename to src/main/java/api/java/ic2/api/energy/prefab/package-info.java diff --git a/src/api/java/ic2/api/energy/tile/IEnergyAcceptor.class b/src/main/java/api/java/ic2/api/energy/tile/IEnergyAcceptor.class similarity index 100% rename from src/api/java/ic2/api/energy/tile/IEnergyAcceptor.class rename to src/main/java/api/java/ic2/api/energy/tile/IEnergyAcceptor.class diff --git a/src/api/java/ic2/api/energy/tile/IEnergyAcceptor.java b/src/main/java/api/java/ic2/api/energy/tile/IEnergyAcceptor.java similarity index 100% rename from src/api/java/ic2/api/energy/tile/IEnergyAcceptor.java rename to src/main/java/api/java/ic2/api/energy/tile/IEnergyAcceptor.java diff --git a/src/api/java/ic2/api/energy/tile/IEnergyConductor.class b/src/main/java/api/java/ic2/api/energy/tile/IEnergyConductor.class similarity index 100% rename from src/api/java/ic2/api/energy/tile/IEnergyConductor.class rename to src/main/java/api/java/ic2/api/energy/tile/IEnergyConductor.class diff --git a/src/api/java/ic2/api/energy/tile/IEnergyConductor.java b/src/main/java/api/java/ic2/api/energy/tile/IEnergyConductor.java similarity index 100% rename from src/api/java/ic2/api/energy/tile/IEnergyConductor.java rename to src/main/java/api/java/ic2/api/energy/tile/IEnergyConductor.java diff --git a/src/api/java/ic2/api/energy/tile/IEnergyEmitter.class b/src/main/java/api/java/ic2/api/energy/tile/IEnergyEmitter.class similarity index 100% rename from src/api/java/ic2/api/energy/tile/IEnergyEmitter.class rename to src/main/java/api/java/ic2/api/energy/tile/IEnergyEmitter.class diff --git a/src/api/java/ic2/api/energy/tile/IEnergyEmitter.java b/src/main/java/api/java/ic2/api/energy/tile/IEnergyEmitter.java similarity index 100% rename from src/api/java/ic2/api/energy/tile/IEnergyEmitter.java rename to src/main/java/api/java/ic2/api/energy/tile/IEnergyEmitter.java diff --git a/src/api/java/ic2/api/energy/tile/IEnergySink.class b/src/main/java/api/java/ic2/api/energy/tile/IEnergySink.class similarity index 100% rename from src/api/java/ic2/api/energy/tile/IEnergySink.class rename to src/main/java/api/java/ic2/api/energy/tile/IEnergySink.class diff --git a/src/api/java/ic2/api/energy/tile/IEnergySink.java b/src/main/java/api/java/ic2/api/energy/tile/IEnergySink.java similarity index 100% rename from src/api/java/ic2/api/energy/tile/IEnergySink.java rename to src/main/java/api/java/ic2/api/energy/tile/IEnergySink.java diff --git a/src/api/java/ic2/api/energy/tile/IEnergySource.class b/src/main/java/api/java/ic2/api/energy/tile/IEnergySource.class similarity index 100% rename from src/api/java/ic2/api/energy/tile/IEnergySource.class rename to src/main/java/api/java/ic2/api/energy/tile/IEnergySource.class diff --git a/src/api/java/ic2/api/energy/tile/IEnergySource.java b/src/main/java/api/java/ic2/api/energy/tile/IEnergySource.java similarity index 100% rename from src/api/java/ic2/api/energy/tile/IEnergySource.java rename to src/main/java/api/java/ic2/api/energy/tile/IEnergySource.java diff --git a/src/api/java/ic2/api/energy/tile/IEnergyTile.class b/src/main/java/api/java/ic2/api/energy/tile/IEnergyTile.class similarity index 100% rename from src/api/java/ic2/api/energy/tile/IEnergyTile.class rename to src/main/java/api/java/ic2/api/energy/tile/IEnergyTile.class diff --git a/src/api/java/ic2/api/energy/tile/IEnergyTile.java b/src/main/java/api/java/ic2/api/energy/tile/IEnergyTile.java similarity index 100% rename from src/api/java/ic2/api/energy/tile/IEnergyTile.java rename to src/main/java/api/java/ic2/api/energy/tile/IEnergyTile.java diff --git a/src/api/java/ic2/api/energy/tile/IHeatSource.class b/src/main/java/api/java/ic2/api/energy/tile/IHeatSource.class similarity index 100% rename from src/api/java/ic2/api/energy/tile/IHeatSource.class rename to src/main/java/api/java/ic2/api/energy/tile/IHeatSource.class diff --git a/src/api/java/ic2/api/energy/tile/IHeatSource.java b/src/main/java/api/java/ic2/api/energy/tile/IHeatSource.java similarity index 100% rename from src/api/java/ic2/api/energy/tile/IHeatSource.java rename to src/main/java/api/java/ic2/api/energy/tile/IHeatSource.java diff --git a/src/api/java/ic2/api/energy/tile/IKineticSource.class b/src/main/java/api/java/ic2/api/energy/tile/IKineticSource.class similarity index 100% rename from src/api/java/ic2/api/energy/tile/IKineticSource.class rename to src/main/java/api/java/ic2/api/energy/tile/IKineticSource.class diff --git a/src/api/java/ic2/api/energy/tile/IKineticSource.java b/src/main/java/api/java/ic2/api/energy/tile/IKineticSource.java similarity index 100% rename from src/api/java/ic2/api/energy/tile/IKineticSource.java rename to src/main/java/api/java/ic2/api/energy/tile/IKineticSource.java diff --git a/src/api/java/ic2/api/energy/tile/IMetaDelegate.class b/src/main/java/api/java/ic2/api/energy/tile/IMetaDelegate.class similarity index 100% rename from src/api/java/ic2/api/energy/tile/IMetaDelegate.class rename to src/main/java/api/java/ic2/api/energy/tile/IMetaDelegate.class diff --git a/src/api/java/ic2/api/energy/tile/IMetaDelegate.java b/src/main/java/api/java/ic2/api/energy/tile/IMetaDelegate.java similarity index 100% rename from src/api/java/ic2/api/energy/tile/IMetaDelegate.java rename to src/main/java/api/java/ic2/api/energy/tile/IMetaDelegate.java diff --git a/src/api/java/ic2/api/energy/tile/package-info.class b/src/main/java/api/java/ic2/api/energy/tile/package-info.class similarity index 100% rename from src/api/java/ic2/api/energy/tile/package-info.class rename to src/main/java/api/java/ic2/api/energy/tile/package-info.class diff --git a/src/api/java/ic2/api/energy/tile/package-info.java b/src/main/java/api/java/ic2/api/energy/tile/package-info.java similarity index 100% rename from src/api/java/ic2/api/energy/tile/package-info.java rename to src/main/java/api/java/ic2/api/energy/tile/package-info.java diff --git a/src/api/java/ic2/api/energy/usage.txt b/src/main/java/api/java/ic2/api/energy/usage.txt similarity index 100% rename from src/api/java/ic2/api/energy/usage.txt rename to src/main/java/api/java/ic2/api/energy/usage.txt diff --git a/src/api/java/ic2/api/event/ExplosionEvent.class b/src/main/java/api/java/ic2/api/event/ExplosionEvent.class similarity index 100% rename from src/api/java/ic2/api/event/ExplosionEvent.class rename to src/main/java/api/java/ic2/api/event/ExplosionEvent.class diff --git a/src/api/java/ic2/api/event/ExplosionEvent.java b/src/main/java/api/java/ic2/api/event/ExplosionEvent.java similarity index 100% rename from src/api/java/ic2/api/event/ExplosionEvent.java rename to src/main/java/api/java/ic2/api/event/ExplosionEvent.java diff --git a/src/api/java/ic2/api/event/LaserEvent$LaserExplodesEvent.class b/src/main/java/api/java/ic2/api/event/LaserEvent$LaserExplodesEvent.class similarity index 100% rename from src/api/java/ic2/api/event/LaserEvent$LaserExplodesEvent.class rename to src/main/java/api/java/ic2/api/event/LaserEvent$LaserExplodesEvent.class diff --git a/src/api/java/ic2/api/event/LaserEvent$LaserHitsBlockEvent.class b/src/main/java/api/java/ic2/api/event/LaserEvent$LaserHitsBlockEvent.class similarity index 100% rename from src/api/java/ic2/api/event/LaserEvent$LaserHitsBlockEvent.class rename to src/main/java/api/java/ic2/api/event/LaserEvent$LaserHitsBlockEvent.class diff --git a/src/api/java/ic2/api/event/LaserEvent$LaserHitsEntityEvent.class b/src/main/java/api/java/ic2/api/event/LaserEvent$LaserHitsEntityEvent.class similarity index 100% rename from src/api/java/ic2/api/event/LaserEvent$LaserHitsEntityEvent.class rename to src/main/java/api/java/ic2/api/event/LaserEvent$LaserHitsEntityEvent.class diff --git a/src/api/java/ic2/api/event/LaserEvent$LaserShootEvent.class b/src/main/java/api/java/ic2/api/event/LaserEvent$LaserShootEvent.class similarity index 100% rename from src/api/java/ic2/api/event/LaserEvent$LaserShootEvent.class rename to src/main/java/api/java/ic2/api/event/LaserEvent$LaserShootEvent.class diff --git a/src/api/java/ic2/api/event/LaserEvent.class b/src/main/java/api/java/ic2/api/event/LaserEvent.class similarity index 100% rename from src/api/java/ic2/api/event/LaserEvent.class rename to src/main/java/api/java/ic2/api/event/LaserEvent.class diff --git a/src/api/java/ic2/api/event/LaserEvent.java b/src/main/java/api/java/ic2/api/event/LaserEvent.java similarity index 100% rename from src/api/java/ic2/api/event/LaserEvent.java rename to src/main/java/api/java/ic2/api/event/LaserEvent.java diff --git a/src/api/java/ic2/api/event/PaintEvent.class b/src/main/java/api/java/ic2/api/event/PaintEvent.class similarity index 100% rename from src/api/java/ic2/api/event/PaintEvent.class rename to src/main/java/api/java/ic2/api/event/PaintEvent.class diff --git a/src/api/java/ic2/api/event/PaintEvent.java b/src/main/java/api/java/ic2/api/event/PaintEvent.java similarity index 100% rename from src/api/java/ic2/api/event/PaintEvent.java rename to src/main/java/api/java/ic2/api/event/PaintEvent.java diff --git a/src/api/java/ic2/api/event/RetextureEvent.class b/src/main/java/api/java/ic2/api/event/RetextureEvent.class similarity index 100% rename from src/api/java/ic2/api/event/RetextureEvent.class rename to src/main/java/api/java/ic2/api/event/RetextureEvent.class diff --git a/src/api/java/ic2/api/event/RetextureEvent.java b/src/main/java/api/java/ic2/api/event/RetextureEvent.java similarity index 100% rename from src/api/java/ic2/api/event/RetextureEvent.java rename to src/main/java/api/java/ic2/api/event/RetextureEvent.java diff --git a/src/api/java/ic2/api/event/package-info.class b/src/main/java/api/java/ic2/api/event/package-info.class similarity index 100% rename from src/api/java/ic2/api/event/package-info.class rename to src/main/java/api/java/ic2/api/event/package-info.class diff --git a/src/api/java/ic2/api/event/package-info.java b/src/main/java/api/java/ic2/api/event/package-info.java similarity index 100% rename from src/api/java/ic2/api/event/package-info.java rename to src/main/java/api/java/ic2/api/event/package-info.java diff --git a/src/api/java/ic2/api/info/IEnergyValueProvider.class b/src/main/java/api/java/ic2/api/info/IEnergyValueProvider.class similarity index 100% rename from src/api/java/ic2/api/info/IEnergyValueProvider.class rename to src/main/java/api/java/ic2/api/info/IEnergyValueProvider.class diff --git a/src/api/java/ic2/api/info/IEnergyValueProvider.java b/src/main/java/api/java/ic2/api/info/IEnergyValueProvider.java similarity index 100% rename from src/api/java/ic2/api/info/IEnergyValueProvider.java rename to src/main/java/api/java/ic2/api/info/IEnergyValueProvider.java diff --git a/src/api/java/ic2/api/info/IFuelValueProvider.class b/src/main/java/api/java/ic2/api/info/IFuelValueProvider.class similarity index 100% rename from src/api/java/ic2/api/info/IFuelValueProvider.class rename to src/main/java/api/java/ic2/api/info/IFuelValueProvider.class diff --git a/src/api/java/ic2/api/info/IFuelValueProvider.java b/src/main/java/api/java/ic2/api/info/IFuelValueProvider.java similarity index 100% rename from src/api/java/ic2/api/info/IFuelValueProvider.java rename to src/main/java/api/java/ic2/api/info/IFuelValueProvider.java diff --git a/src/api/java/ic2/api/info/Info.class b/src/main/java/api/java/ic2/api/info/Info.class similarity index 100% rename from src/api/java/ic2/api/info/Info.class rename to src/main/java/api/java/ic2/api/info/Info.class diff --git a/src/api/java/ic2/api/info/Info.java b/src/main/java/api/java/ic2/api/info/Info.java similarity index 100% rename from src/api/java/ic2/api/info/Info.java rename to src/main/java/api/java/ic2/api/info/Info.java diff --git a/src/api/java/ic2/api/info/package-info.class b/src/main/java/api/java/ic2/api/info/package-info.class similarity index 100% rename from src/api/java/ic2/api/info/package-info.class rename to src/main/java/api/java/ic2/api/info/package-info.class diff --git a/src/api/java/ic2/api/info/package-info.java b/src/main/java/api/java/ic2/api/info/package-info.java similarity index 100% rename from src/api/java/ic2/api/info/package-info.java rename to src/main/java/api/java/ic2/api/info/package-info.java diff --git a/src/api/java/ic2/api/item/ElectricItem.class b/src/main/java/api/java/ic2/api/item/ElectricItem.class similarity index 100% rename from src/api/java/ic2/api/item/ElectricItem.class rename to src/main/java/api/java/ic2/api/item/ElectricItem.class diff --git a/src/api/java/ic2/api/item/ElectricItem.java b/src/main/java/api/java/ic2/api/item/ElectricItem.java similarity index 100% rename from src/api/java/ic2/api/item/ElectricItem.java rename to src/main/java/api/java/ic2/api/item/ElectricItem.java diff --git a/src/api/java/ic2/api/item/IBackupElectricItemManager.class b/src/main/java/api/java/ic2/api/item/IBackupElectricItemManager.class similarity index 100% rename from src/api/java/ic2/api/item/IBackupElectricItemManager.class rename to src/main/java/api/java/ic2/api/item/IBackupElectricItemManager.class diff --git a/src/api/java/ic2/api/item/IBackupElectricItemManager.java b/src/main/java/api/java/ic2/api/item/IBackupElectricItemManager.java similarity index 100% rename from src/api/java/ic2/api/item/IBackupElectricItemManager.java rename to src/main/java/api/java/ic2/api/item/IBackupElectricItemManager.java diff --git a/src/api/java/ic2/api/item/IBlockCuttingBlade.class b/src/main/java/api/java/ic2/api/item/IBlockCuttingBlade.class similarity index 100% rename from src/api/java/ic2/api/item/IBlockCuttingBlade.class rename to src/main/java/api/java/ic2/api/item/IBlockCuttingBlade.class diff --git a/src/api/java/ic2/api/item/IBlockCuttingBlade.java b/src/main/java/api/java/ic2/api/item/IBlockCuttingBlade.java similarity index 100% rename from src/api/java/ic2/api/item/IBlockCuttingBlade.java rename to src/main/java/api/java/ic2/api/item/IBlockCuttingBlade.java diff --git a/src/api/java/ic2/api/item/IBoxable.class b/src/main/java/api/java/ic2/api/item/IBoxable.class similarity index 100% rename from src/api/java/ic2/api/item/IBoxable.class rename to src/main/java/api/java/ic2/api/item/IBoxable.class diff --git a/src/api/java/ic2/api/item/IBoxable.java b/src/main/java/api/java/ic2/api/item/IBoxable.java similarity index 100% rename from src/api/java/ic2/api/item/IBoxable.java rename to src/main/java/api/java/ic2/api/item/IBoxable.java diff --git a/src/api/java/ic2/api/item/IC2Items.class b/src/main/java/api/java/ic2/api/item/IC2Items.class similarity index 100% rename from src/api/java/ic2/api/item/IC2Items.class rename to src/main/java/api/java/ic2/api/item/IC2Items.class diff --git a/src/api/java/ic2/api/item/IC2Items.java b/src/main/java/api/java/ic2/api/item/IC2Items.java similarity index 100% rename from src/api/java/ic2/api/item/IC2Items.java rename to src/main/java/api/java/ic2/api/item/IC2Items.java diff --git a/src/api/java/ic2/api/item/ICustomDamageItem.class b/src/main/java/api/java/ic2/api/item/ICustomDamageItem.class similarity index 100% rename from src/api/java/ic2/api/item/ICustomDamageItem.class rename to src/main/java/api/java/ic2/api/item/ICustomDamageItem.class diff --git a/src/api/java/ic2/api/item/ICustomDamageItem.java b/src/main/java/api/java/ic2/api/item/ICustomDamageItem.java similarity index 100% rename from src/api/java/ic2/api/item/ICustomDamageItem.java rename to src/main/java/api/java/ic2/api/item/ICustomDamageItem.java diff --git a/src/api/java/ic2/api/item/IDebuggable.class b/src/main/java/api/java/ic2/api/item/IDebuggable.class similarity index 100% rename from src/api/java/ic2/api/item/IDebuggable.class rename to src/main/java/api/java/ic2/api/item/IDebuggable.class diff --git a/src/api/java/ic2/api/item/IDebuggable.java b/src/main/java/api/java/ic2/api/item/IDebuggable.java similarity index 100% rename from src/api/java/ic2/api/item/IDebuggable.java rename to src/main/java/api/java/ic2/api/item/IDebuggable.java diff --git a/src/api/java/ic2/api/item/IElectricItem.class b/src/main/java/api/java/ic2/api/item/IElectricItem.class similarity index 100% rename from src/api/java/ic2/api/item/IElectricItem.class rename to src/main/java/api/java/ic2/api/item/IElectricItem.class diff --git a/src/api/java/ic2/api/item/IElectricItem.java b/src/main/java/api/java/ic2/api/item/IElectricItem.java similarity index 100% rename from src/api/java/ic2/api/item/IElectricItem.java rename to src/main/java/api/java/ic2/api/item/IElectricItem.java diff --git a/src/api/java/ic2/api/item/IElectricItemManager.class b/src/main/java/api/java/ic2/api/item/IElectricItemManager.class similarity index 100% rename from src/api/java/ic2/api/item/IElectricItemManager.class rename to src/main/java/api/java/ic2/api/item/IElectricItemManager.class diff --git a/src/api/java/ic2/api/item/IElectricItemManager.java b/src/main/java/api/java/ic2/api/item/IElectricItemManager.java similarity index 100% rename from src/api/java/ic2/api/item/IElectricItemManager.java rename to src/main/java/api/java/ic2/api/item/IElectricItemManager.java diff --git a/src/api/java/ic2/api/item/IItemHudInfo.class b/src/main/java/api/java/ic2/api/item/IItemHudInfo.class similarity index 100% rename from src/api/java/ic2/api/item/IItemHudInfo.class rename to src/main/java/api/java/ic2/api/item/IItemHudInfo.class diff --git a/src/api/java/ic2/api/item/IItemHudInfo.java b/src/main/java/api/java/ic2/api/item/IItemHudInfo.java similarity index 100% rename from src/api/java/ic2/api/item/IItemHudInfo.java rename to src/main/java/api/java/ic2/api/item/IItemHudInfo.java diff --git a/src/api/java/ic2/api/item/IKineticRotor$GearboxType.class b/src/main/java/api/java/ic2/api/item/IKineticRotor$GearboxType.class similarity index 100% rename from src/api/java/ic2/api/item/IKineticRotor$GearboxType.class rename to src/main/java/api/java/ic2/api/item/IKineticRotor$GearboxType.class diff --git a/src/api/java/ic2/api/item/IKineticRotor.class b/src/main/java/api/java/ic2/api/item/IKineticRotor.class similarity index 100% rename from src/api/java/ic2/api/item/IKineticRotor.class rename to src/main/java/api/java/ic2/api/item/IKineticRotor.class diff --git a/src/api/java/ic2/api/item/IKineticRotor.java b/src/main/java/api/java/ic2/api/item/IKineticRotor.java similarity index 100% rename from src/api/java/ic2/api/item/IKineticRotor.java rename to src/main/java/api/java/ic2/api/item/IKineticRotor.java diff --git a/src/api/java/ic2/api/item/ILatheItem$ILatheTool.class b/src/main/java/api/java/ic2/api/item/ILatheItem$ILatheTool.class similarity index 100% rename from src/api/java/ic2/api/item/ILatheItem$ILatheTool.class rename to src/main/java/api/java/ic2/api/item/ILatheItem$ILatheTool.class diff --git a/src/api/java/ic2/api/item/ILatheItem.class b/src/main/java/api/java/ic2/api/item/ILatheItem.class similarity index 100% rename from src/api/java/ic2/api/item/ILatheItem.class rename to src/main/java/api/java/ic2/api/item/ILatheItem.class diff --git a/src/api/java/ic2/api/item/ILatheItem.java b/src/main/java/api/java/ic2/api/item/ILatheItem.java similarity index 100% rename from src/api/java/ic2/api/item/ILatheItem.java rename to src/main/java/api/java/ic2/api/item/ILatheItem.java diff --git a/src/api/java/ic2/api/item/IMetalArmor.class b/src/main/java/api/java/ic2/api/item/IMetalArmor.class similarity index 100% rename from src/api/java/ic2/api/item/IMetalArmor.class rename to src/main/java/api/java/ic2/api/item/IMetalArmor.class diff --git a/src/api/java/ic2/api/item/IMetalArmor.java b/src/main/java/api/java/ic2/api/item/IMetalArmor.java similarity index 100% rename from src/api/java/ic2/api/item/IMetalArmor.java rename to src/main/java/api/java/ic2/api/item/IMetalArmor.java diff --git a/src/api/java/ic2/api/item/ISpecialElectricItem.class b/src/main/java/api/java/ic2/api/item/ISpecialElectricItem.class similarity index 100% rename from src/api/java/ic2/api/item/ISpecialElectricItem.class rename to src/main/java/api/java/ic2/api/item/ISpecialElectricItem.class diff --git a/src/api/java/ic2/api/item/ISpecialElectricItem.java b/src/main/java/api/java/ic2/api/item/ISpecialElectricItem.java similarity index 100% rename from src/api/java/ic2/api/item/ISpecialElectricItem.java rename to src/main/java/api/java/ic2/api/item/ISpecialElectricItem.java diff --git a/src/api/java/ic2/api/item/ITerraformingBP.class b/src/main/java/api/java/ic2/api/item/ITerraformingBP.class similarity index 100% rename from src/api/java/ic2/api/item/ITerraformingBP.class rename to src/main/java/api/java/ic2/api/item/ITerraformingBP.class diff --git a/src/api/java/ic2/api/item/ITerraformingBP.java b/src/main/java/api/java/ic2/api/item/ITerraformingBP.java similarity index 100% rename from src/api/java/ic2/api/item/ITerraformingBP.java rename to src/main/java/api/java/ic2/api/item/ITerraformingBP.java diff --git a/src/api/java/ic2/api/item/ItemWrapper.class b/src/main/java/api/java/ic2/api/item/ItemWrapper.class similarity index 100% rename from src/api/java/ic2/api/item/ItemWrapper.class rename to src/main/java/api/java/ic2/api/item/ItemWrapper.class diff --git a/src/api/java/ic2/api/item/ItemWrapper.java b/src/main/java/api/java/ic2/api/item/ItemWrapper.java similarity index 100% rename from src/api/java/ic2/api/item/ItemWrapper.java rename to src/main/java/api/java/ic2/api/item/ItemWrapper.java diff --git a/src/api/java/ic2/api/item/package-info.class b/src/main/java/api/java/ic2/api/item/package-info.class similarity index 100% rename from src/api/java/ic2/api/item/package-info.class rename to src/main/java/api/java/ic2/api/item/package-info.class diff --git a/src/api/java/ic2/api/item/package-info.java b/src/main/java/api/java/ic2/api/item/package-info.java similarity index 100% rename from src/api/java/ic2/api/item/package-info.java rename to src/main/java/api/java/ic2/api/item/package-info.java diff --git a/src/api/java/ic2/api/network/INetworkClientTileEntityEventListener.class b/src/main/java/api/java/ic2/api/network/INetworkClientTileEntityEventListener.class similarity index 100% rename from src/api/java/ic2/api/network/INetworkClientTileEntityEventListener.class rename to src/main/java/api/java/ic2/api/network/INetworkClientTileEntityEventListener.class diff --git a/src/api/java/ic2/api/network/INetworkClientTileEntityEventListener.java b/src/main/java/api/java/ic2/api/network/INetworkClientTileEntityEventListener.java similarity index 100% rename from src/api/java/ic2/api/network/INetworkClientTileEntityEventListener.java rename to src/main/java/api/java/ic2/api/network/INetworkClientTileEntityEventListener.java diff --git a/src/api/java/ic2/api/network/INetworkDataProvider.class b/src/main/java/api/java/ic2/api/network/INetworkDataProvider.class similarity index 100% rename from src/api/java/ic2/api/network/INetworkDataProvider.class rename to src/main/java/api/java/ic2/api/network/INetworkDataProvider.class diff --git a/src/api/java/ic2/api/network/INetworkDataProvider.java b/src/main/java/api/java/ic2/api/network/INetworkDataProvider.java similarity index 100% rename from src/api/java/ic2/api/network/INetworkDataProvider.java rename to src/main/java/api/java/ic2/api/network/INetworkDataProvider.java diff --git a/src/api/java/ic2/api/network/INetworkItemEventListener.class b/src/main/java/api/java/ic2/api/network/INetworkItemEventListener.class similarity index 100% rename from src/api/java/ic2/api/network/INetworkItemEventListener.class rename to src/main/java/api/java/ic2/api/network/INetworkItemEventListener.class diff --git a/src/api/java/ic2/api/network/INetworkItemEventListener.java b/src/main/java/api/java/ic2/api/network/INetworkItemEventListener.java similarity index 100% rename from src/api/java/ic2/api/network/INetworkItemEventListener.java rename to src/main/java/api/java/ic2/api/network/INetworkItemEventListener.java diff --git a/src/api/java/ic2/api/network/INetworkTileEntityEventListener.class b/src/main/java/api/java/ic2/api/network/INetworkTileEntityEventListener.class similarity index 100% rename from src/api/java/ic2/api/network/INetworkTileEntityEventListener.class rename to src/main/java/api/java/ic2/api/network/INetworkTileEntityEventListener.class diff --git a/src/api/java/ic2/api/network/INetworkTileEntityEventListener.java b/src/main/java/api/java/ic2/api/network/INetworkTileEntityEventListener.java similarity index 100% rename from src/api/java/ic2/api/network/INetworkTileEntityEventListener.java rename to src/main/java/api/java/ic2/api/network/INetworkTileEntityEventListener.java diff --git a/src/api/java/ic2/api/network/INetworkUpdateListener.class b/src/main/java/api/java/ic2/api/network/INetworkUpdateListener.class similarity index 100% rename from src/api/java/ic2/api/network/INetworkUpdateListener.class rename to src/main/java/api/java/ic2/api/network/INetworkUpdateListener.class diff --git a/src/api/java/ic2/api/network/INetworkUpdateListener.java b/src/main/java/api/java/ic2/api/network/INetworkUpdateListener.java similarity index 100% rename from src/api/java/ic2/api/network/INetworkUpdateListener.java rename to src/main/java/api/java/ic2/api/network/INetworkUpdateListener.java diff --git a/src/api/java/ic2/api/network/NetworkHelper.class b/src/main/java/api/java/ic2/api/network/NetworkHelper.class similarity index 100% rename from src/api/java/ic2/api/network/NetworkHelper.class rename to src/main/java/api/java/ic2/api/network/NetworkHelper.class diff --git a/src/api/java/ic2/api/network/NetworkHelper.java b/src/main/java/api/java/ic2/api/network/NetworkHelper.java similarity index 100% rename from src/api/java/ic2/api/network/NetworkHelper.java rename to src/main/java/api/java/ic2/api/network/NetworkHelper.java diff --git a/src/api/java/ic2/api/network/package-info.class b/src/main/java/api/java/ic2/api/network/package-info.class similarity index 100% rename from src/api/java/ic2/api/network/package-info.class rename to src/main/java/api/java/ic2/api/network/package-info.class diff --git a/src/api/java/ic2/api/network/package-info.java b/src/main/java/api/java/ic2/api/network/package-info.java similarity index 100% rename from src/api/java/ic2/api/network/package-info.java rename to src/main/java/api/java/ic2/api/network/package-info.java diff --git a/src/api/java/ic2/api/package-info.class b/src/main/java/api/java/ic2/api/package-info.class similarity index 100% rename from src/api/java/ic2/api/package-info.class rename to src/main/java/api/java/ic2/api/package-info.class diff --git a/src/api/java/ic2/api/package-info.java b/src/main/java/api/java/ic2/api/package-info.java similarity index 100% rename from src/api/java/ic2/api/package-info.java rename to src/main/java/api/java/ic2/api/package-info.java diff --git a/src/api/java/ic2/api/reactor/IReactor.class b/src/main/java/api/java/ic2/api/reactor/IReactor.class similarity index 100% rename from src/api/java/ic2/api/reactor/IReactor.class rename to src/main/java/api/java/ic2/api/reactor/IReactor.class diff --git a/src/api/java/ic2/api/reactor/IReactor.java b/src/main/java/api/java/ic2/api/reactor/IReactor.java similarity index 100% rename from src/api/java/ic2/api/reactor/IReactor.java rename to src/main/java/api/java/ic2/api/reactor/IReactor.java diff --git a/src/api/java/ic2/api/reactor/IReactorChamber.class b/src/main/java/api/java/ic2/api/reactor/IReactorChamber.class similarity index 100% rename from src/api/java/ic2/api/reactor/IReactorChamber.class rename to src/main/java/api/java/ic2/api/reactor/IReactorChamber.class diff --git a/src/api/java/ic2/api/reactor/IReactorChamber.java b/src/main/java/api/java/ic2/api/reactor/IReactorChamber.java similarity index 100% rename from src/api/java/ic2/api/reactor/IReactorChamber.java rename to src/main/java/api/java/ic2/api/reactor/IReactorChamber.java diff --git a/src/api/java/ic2/api/reactor/IReactorComponent.class b/src/main/java/api/java/ic2/api/reactor/IReactorComponent.class similarity index 100% rename from src/api/java/ic2/api/reactor/IReactorComponent.class rename to src/main/java/api/java/ic2/api/reactor/IReactorComponent.class diff --git a/src/api/java/ic2/api/reactor/IReactorComponent.java b/src/main/java/api/java/ic2/api/reactor/IReactorComponent.java similarity index 100% rename from src/api/java/ic2/api/reactor/IReactorComponent.java rename to src/main/java/api/java/ic2/api/reactor/IReactorComponent.java diff --git a/src/api/java/ic2/api/reactor/package-info.class b/src/main/java/api/java/ic2/api/reactor/package-info.class similarity index 100% rename from src/api/java/ic2/api/reactor/package-info.class rename to src/main/java/api/java/ic2/api/reactor/package-info.class diff --git a/src/api/java/ic2/api/reactor/package-info.java b/src/main/java/api/java/ic2/api/reactor/package-info.java similarity index 100% rename from src/api/java/ic2/api/reactor/package-info.java rename to src/main/java/api/java/ic2/api/reactor/package-info.java diff --git a/src/api/java/ic2/api/recipe/ICannerBottleRecipeManager$Input.class b/src/main/java/api/java/ic2/api/recipe/ICannerBottleRecipeManager$Input.class similarity index 100% rename from src/api/java/ic2/api/recipe/ICannerBottleRecipeManager$Input.class rename to src/main/java/api/java/ic2/api/recipe/ICannerBottleRecipeManager$Input.class diff --git a/src/api/java/ic2/api/recipe/ICannerBottleRecipeManager.class b/src/main/java/api/java/ic2/api/recipe/ICannerBottleRecipeManager.class similarity index 100% rename from src/api/java/ic2/api/recipe/ICannerBottleRecipeManager.class rename to src/main/java/api/java/ic2/api/recipe/ICannerBottleRecipeManager.class diff --git a/src/api/java/ic2/api/recipe/ICannerBottleRecipeManager.java b/src/main/java/api/java/ic2/api/recipe/ICannerBottleRecipeManager.java similarity index 100% rename from src/api/java/ic2/api/recipe/ICannerBottleRecipeManager.java rename to src/main/java/api/java/ic2/api/recipe/ICannerBottleRecipeManager.java diff --git a/src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager$Input.class b/src/main/java/api/java/ic2/api/recipe/ICannerEnrichRecipeManager$Input.class similarity index 100% rename from src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager$Input.class rename to src/main/java/api/java/ic2/api/recipe/ICannerEnrichRecipeManager$Input.class diff --git a/src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.class b/src/main/java/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.class similarity index 100% rename from src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.class rename to src/main/java/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.class diff --git a/src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.java b/src/main/java/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.java similarity index 100% rename from src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.java rename to src/main/java/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.java diff --git a/src/api/java/ic2/api/recipe/ICraftingRecipeManager.class b/src/main/java/api/java/ic2/api/recipe/ICraftingRecipeManager.class similarity index 100% rename from src/api/java/ic2/api/recipe/ICraftingRecipeManager.class rename to src/main/java/api/java/ic2/api/recipe/ICraftingRecipeManager.class diff --git a/src/api/java/ic2/api/recipe/ICraftingRecipeManager.java b/src/main/java/api/java/ic2/api/recipe/ICraftingRecipeManager.java similarity index 100% rename from src/api/java/ic2/api/recipe/ICraftingRecipeManager.java rename to src/main/java/api/java/ic2/api/recipe/ICraftingRecipeManager.java diff --git a/src/api/java/ic2/api/recipe/IFluidHeatManager$BurnProperty.class b/src/main/java/api/java/ic2/api/recipe/IFluidHeatManager$BurnProperty.class similarity index 100% rename from src/api/java/ic2/api/recipe/IFluidHeatManager$BurnProperty.class rename to src/main/java/api/java/ic2/api/recipe/IFluidHeatManager$BurnProperty.class diff --git a/src/api/java/ic2/api/recipe/IFluidHeatManager.class b/src/main/java/api/java/ic2/api/recipe/IFluidHeatManager.class similarity index 100% rename from src/api/java/ic2/api/recipe/IFluidHeatManager.class rename to src/main/java/api/java/ic2/api/recipe/IFluidHeatManager.class diff --git a/src/api/java/ic2/api/recipe/IFluidHeatManager.java b/src/main/java/api/java/ic2/api/recipe/IFluidHeatManager.java similarity index 100% rename from src/api/java/ic2/api/recipe/IFluidHeatManager.java rename to src/main/java/api/java/ic2/api/recipe/IFluidHeatManager.java diff --git a/src/api/java/ic2/api/recipe/ILiquidAcceptManager.class b/src/main/java/api/java/ic2/api/recipe/ILiquidAcceptManager.class similarity index 100% rename from src/api/java/ic2/api/recipe/ILiquidAcceptManager.class rename to src/main/java/api/java/ic2/api/recipe/ILiquidAcceptManager.class diff --git a/src/api/java/ic2/api/recipe/ILiquidAcceptManager.java b/src/main/java/api/java/ic2/api/recipe/ILiquidAcceptManager.java similarity index 100% rename from src/api/java/ic2/api/recipe/ILiquidAcceptManager.java rename to src/main/java/api/java/ic2/api/recipe/ILiquidAcceptManager.java diff --git a/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager$HeatExchangeProperty.class b/src/main/java/api/java/ic2/api/recipe/ILiquidHeatExchangerManager$HeatExchangeProperty.class similarity index 100% rename from src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager$HeatExchangeProperty.class rename to src/main/java/api/java/ic2/api/recipe/ILiquidHeatExchangerManager$HeatExchangeProperty.class diff --git a/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.class b/src/main/java/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.class similarity index 100% rename from src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.class rename to src/main/java/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.class diff --git a/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.java b/src/main/java/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.java similarity index 100% rename from src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.java rename to src/main/java/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.java diff --git a/src/api/java/ic2/api/recipe/IListRecipeManager.class b/src/main/java/api/java/ic2/api/recipe/IListRecipeManager.class similarity index 100% rename from src/api/java/ic2/api/recipe/IListRecipeManager.class rename to src/main/java/api/java/ic2/api/recipe/IListRecipeManager.class diff --git a/src/api/java/ic2/api/recipe/IListRecipeManager.java b/src/main/java/api/java/ic2/api/recipe/IListRecipeManager.java similarity index 100% rename from src/api/java/ic2/api/recipe/IListRecipeManager.java rename to src/main/java/api/java/ic2/api/recipe/IListRecipeManager.java diff --git a/src/api/java/ic2/api/recipe/IMachineRecipeManager.class b/src/main/java/api/java/ic2/api/recipe/IMachineRecipeManager.class similarity index 100% rename from src/api/java/ic2/api/recipe/IMachineRecipeManager.class rename to src/main/java/api/java/ic2/api/recipe/IMachineRecipeManager.class diff --git a/src/api/java/ic2/api/recipe/IMachineRecipeManager.java b/src/main/java/api/java/ic2/api/recipe/IMachineRecipeManager.java similarity index 100% rename from src/api/java/ic2/api/recipe/IMachineRecipeManager.java rename to src/main/java/api/java/ic2/api/recipe/IMachineRecipeManager.java diff --git a/src/api/java/ic2/api/recipe/IMachineRecipeManagerExt.class b/src/main/java/api/java/ic2/api/recipe/IMachineRecipeManagerExt.class similarity index 100% rename from src/api/java/ic2/api/recipe/IMachineRecipeManagerExt.class rename to src/main/java/api/java/ic2/api/recipe/IMachineRecipeManagerExt.class diff --git a/src/api/java/ic2/api/recipe/IMachineRecipeManagerExt.java b/src/main/java/api/java/ic2/api/recipe/IMachineRecipeManagerExt.java similarity index 100% rename from src/api/java/ic2/api/recipe/IMachineRecipeManagerExt.java rename to src/main/java/api/java/ic2/api/recipe/IMachineRecipeManagerExt.java diff --git a/src/api/java/ic2/api/recipe/IPatternStorage.class b/src/main/java/api/java/ic2/api/recipe/IPatternStorage.class similarity index 100% rename from src/api/java/ic2/api/recipe/IPatternStorage.class rename to src/main/java/api/java/ic2/api/recipe/IPatternStorage.class diff --git a/src/api/java/ic2/api/recipe/IPatternStorage.java b/src/main/java/api/java/ic2/api/recipe/IPatternStorage.java similarity index 100% rename from src/api/java/ic2/api/recipe/IPatternStorage.java rename to src/main/java/api/java/ic2/api/recipe/IPatternStorage.java diff --git a/src/api/java/ic2/api/recipe/IRecipeInput.class b/src/main/java/api/java/ic2/api/recipe/IRecipeInput.class similarity index 100% rename from src/api/java/ic2/api/recipe/IRecipeInput.class rename to src/main/java/api/java/ic2/api/recipe/IRecipeInput.class diff --git a/src/api/java/ic2/api/recipe/IRecipeInput.java b/src/main/java/api/java/ic2/api/recipe/IRecipeInput.java similarity index 100% rename from src/api/java/ic2/api/recipe/IRecipeInput.java rename to src/main/java/api/java/ic2/api/recipe/IRecipeInput.java diff --git a/src/api/java/ic2/api/recipe/IScrapboxManager.class b/src/main/java/api/java/ic2/api/recipe/IScrapboxManager.class similarity index 100% rename from src/api/java/ic2/api/recipe/IScrapboxManager.class rename to src/main/java/api/java/ic2/api/recipe/IScrapboxManager.class diff --git a/src/api/java/ic2/api/recipe/IScrapboxManager.java b/src/main/java/api/java/ic2/api/recipe/IScrapboxManager.java similarity index 100% rename from src/api/java/ic2/api/recipe/IScrapboxManager.java rename to src/main/java/api/java/ic2/api/recipe/IScrapboxManager.java diff --git a/src/api/java/ic2/api/recipe/ISemiFluidFuelManager$BurnProperty.class b/src/main/java/api/java/ic2/api/recipe/ISemiFluidFuelManager$BurnProperty.class similarity index 100% rename from src/api/java/ic2/api/recipe/ISemiFluidFuelManager$BurnProperty.class rename to src/main/java/api/java/ic2/api/recipe/ISemiFluidFuelManager$BurnProperty.class diff --git a/src/api/java/ic2/api/recipe/ISemiFluidFuelManager.class b/src/main/java/api/java/ic2/api/recipe/ISemiFluidFuelManager.class similarity index 100% rename from src/api/java/ic2/api/recipe/ISemiFluidFuelManager.class rename to src/main/java/api/java/ic2/api/recipe/ISemiFluidFuelManager.class diff --git a/src/api/java/ic2/api/recipe/ISemiFluidFuelManager.java b/src/main/java/api/java/ic2/api/recipe/ISemiFluidFuelManager.java similarity index 100% rename from src/api/java/ic2/api/recipe/ISemiFluidFuelManager.java rename to src/main/java/api/java/ic2/api/recipe/ISemiFluidFuelManager.java diff --git a/src/api/java/ic2/api/recipe/RecipeInputFluidContainer.class b/src/main/java/api/java/ic2/api/recipe/RecipeInputFluidContainer.class similarity index 100% rename from src/api/java/ic2/api/recipe/RecipeInputFluidContainer.class rename to src/main/java/api/java/ic2/api/recipe/RecipeInputFluidContainer.class diff --git a/src/api/java/ic2/api/recipe/RecipeInputFluidContainer.java b/src/main/java/api/java/ic2/api/recipe/RecipeInputFluidContainer.java similarity index 100% rename from src/api/java/ic2/api/recipe/RecipeInputFluidContainer.java rename to src/main/java/api/java/ic2/api/recipe/RecipeInputFluidContainer.java diff --git a/src/api/java/ic2/api/recipe/RecipeInputItemStack.class b/src/main/java/api/java/ic2/api/recipe/RecipeInputItemStack.class similarity index 100% rename from src/api/java/ic2/api/recipe/RecipeInputItemStack.class rename to src/main/java/api/java/ic2/api/recipe/RecipeInputItemStack.class diff --git a/src/api/java/ic2/api/recipe/RecipeInputItemStack.java b/src/main/java/api/java/ic2/api/recipe/RecipeInputItemStack.java similarity index 100% rename from src/api/java/ic2/api/recipe/RecipeInputItemStack.java rename to src/main/java/api/java/ic2/api/recipe/RecipeInputItemStack.java diff --git a/src/api/java/ic2/api/recipe/RecipeInputOreDict.class b/src/main/java/api/java/ic2/api/recipe/RecipeInputOreDict.class similarity index 100% rename from src/api/java/ic2/api/recipe/RecipeInputOreDict.class rename to src/main/java/api/java/ic2/api/recipe/RecipeInputOreDict.class diff --git a/src/api/java/ic2/api/recipe/RecipeInputOreDict.java b/src/main/java/api/java/ic2/api/recipe/RecipeInputOreDict.java similarity index 100% rename from src/api/java/ic2/api/recipe/RecipeInputOreDict.java rename to src/main/java/api/java/ic2/api/recipe/RecipeInputOreDict.java diff --git a/src/api/java/ic2/api/recipe/RecipeOutput.class b/src/main/java/api/java/ic2/api/recipe/RecipeOutput.class similarity index 100% rename from src/api/java/ic2/api/recipe/RecipeOutput.class rename to src/main/java/api/java/ic2/api/recipe/RecipeOutput.class diff --git a/src/api/java/ic2/api/recipe/RecipeOutput.java b/src/main/java/api/java/ic2/api/recipe/RecipeOutput.java similarity index 100% rename from src/api/java/ic2/api/recipe/RecipeOutput.java rename to src/main/java/api/java/ic2/api/recipe/RecipeOutput.java diff --git a/src/api/java/ic2/api/recipe/Recipes.class b/src/main/java/api/java/ic2/api/recipe/Recipes.class similarity index 100% rename from src/api/java/ic2/api/recipe/Recipes.class rename to src/main/java/api/java/ic2/api/recipe/Recipes.class diff --git a/src/api/java/ic2/api/recipe/Recipes.java b/src/main/java/api/java/ic2/api/recipe/Recipes.java similarity index 100% rename from src/api/java/ic2/api/recipe/Recipes.java rename to src/main/java/api/java/ic2/api/recipe/Recipes.java diff --git a/src/api/java/ic2/api/recipe/package-info.class b/src/main/java/api/java/ic2/api/recipe/package-info.class similarity index 100% rename from src/api/java/ic2/api/recipe/package-info.class rename to src/main/java/api/java/ic2/api/recipe/package-info.class diff --git a/src/api/java/ic2/api/recipe/package-info.java b/src/main/java/api/java/ic2/api/recipe/package-info.java similarity index 100% rename from src/api/java/ic2/api/recipe/package-info.java rename to src/main/java/api/java/ic2/api/recipe/package-info.java diff --git a/src/api/java/ic2/api/tile/ExplosionWhitelist.class b/src/main/java/api/java/ic2/api/tile/ExplosionWhitelist.class similarity index 100% rename from src/api/java/ic2/api/tile/ExplosionWhitelist.class rename to src/main/java/api/java/ic2/api/tile/ExplosionWhitelist.class diff --git a/src/api/java/ic2/api/tile/ExplosionWhitelist.java b/src/main/java/api/java/ic2/api/tile/ExplosionWhitelist.java similarity index 100% rename from src/api/java/ic2/api/tile/ExplosionWhitelist.java rename to src/main/java/api/java/ic2/api/tile/ExplosionWhitelist.java diff --git a/src/api/java/ic2/api/tile/IEnergyStorage.class b/src/main/java/api/java/ic2/api/tile/IEnergyStorage.class similarity index 100% rename from src/api/java/ic2/api/tile/IEnergyStorage.class rename to src/main/java/api/java/ic2/api/tile/IEnergyStorage.class diff --git a/src/api/java/ic2/api/tile/IEnergyStorage.java b/src/main/java/api/java/ic2/api/tile/IEnergyStorage.java similarity index 100% rename from src/api/java/ic2/api/tile/IEnergyStorage.java rename to src/main/java/api/java/ic2/api/tile/IEnergyStorage.java diff --git a/src/api/java/ic2/api/tile/IWrenchable.class b/src/main/java/api/java/ic2/api/tile/IWrenchable.class similarity index 100% rename from src/api/java/ic2/api/tile/IWrenchable.class rename to src/main/java/api/java/ic2/api/tile/IWrenchable.class diff --git a/src/api/java/ic2/api/tile/IWrenchable.java b/src/main/java/api/java/ic2/api/tile/IWrenchable.java similarity index 100% rename from src/api/java/ic2/api/tile/IWrenchable.java rename to src/main/java/api/java/ic2/api/tile/IWrenchable.java diff --git a/src/api/java/ic2/api/tile/package-info.class b/src/main/java/api/java/ic2/api/tile/package-info.class similarity index 100% rename from src/api/java/ic2/api/tile/package-info.class rename to src/main/java/api/java/ic2/api/tile/package-info.class diff --git a/src/api/java/ic2/api/tile/package-info.java b/src/main/java/api/java/ic2/api/tile/package-info.java similarity index 100% rename from src/api/java/ic2/api/tile/package-info.java rename to src/main/java/api/java/ic2/api/tile/package-info.java diff --git a/src/api/java/ic2/api/util/IKeyboard.class b/src/main/java/api/java/ic2/api/util/IKeyboard.class similarity index 100% rename from src/api/java/ic2/api/util/IKeyboard.class rename to src/main/java/api/java/ic2/api/util/IKeyboard.class diff --git a/src/api/java/ic2/api/util/IKeyboard.java b/src/main/java/api/java/ic2/api/util/IKeyboard.java similarity index 100% rename from src/api/java/ic2/api/util/IKeyboard.java rename to src/main/java/api/java/ic2/api/util/IKeyboard.java diff --git a/src/api/java/ic2/api/util/Keys.class b/src/main/java/api/java/ic2/api/util/Keys.class similarity index 100% rename from src/api/java/ic2/api/util/Keys.class rename to src/main/java/api/java/ic2/api/util/Keys.class diff --git a/src/api/java/ic2/api/util/Keys.java b/src/main/java/api/java/ic2/api/util/Keys.java similarity index 100% rename from src/api/java/ic2/api/util/Keys.java rename to src/main/java/api/java/ic2/api/util/Keys.java diff --git a/src/api/java/ic2/api/util/package-info.class b/src/main/java/api/java/ic2/api/util/package-info.class similarity index 100% rename from src/api/java/ic2/api/util/package-info.class rename to src/main/java/api/java/ic2/api/util/package-info.class diff --git a/src/api/java/ic2/api/util/package-info.java b/src/main/java/api/java/ic2/api/util/package-info.java similarity index 100% rename from src/api/java/ic2/api/util/package-info.java rename to src/main/java/api/java/ic2/api/util/package-info.java diff --git a/src/api/java/thaumcraft/api/BlockCoordinates.java b/src/main/java/api/java/thaumcraft/api/BlockCoordinates.java similarity index 100% rename from src/api/java/thaumcraft/api/BlockCoordinates.java rename to src/main/java/api/java/thaumcraft/api/BlockCoordinates.java diff --git a/src/api/java/thaumcraft/api/IArchitect.java b/src/main/java/api/java/thaumcraft/api/IArchitect.java similarity index 100% rename from src/api/java/thaumcraft/api/IArchitect.java rename to src/main/java/api/java/thaumcraft/api/IArchitect.java diff --git a/src/api/java/thaumcraft/api/IGoggles.java b/src/main/java/api/java/thaumcraft/api/IGoggles.java similarity index 100% rename from src/api/java/thaumcraft/api/IGoggles.java rename to src/main/java/api/java/thaumcraft/api/IGoggles.java diff --git a/src/api/java/thaumcraft/api/IRepairable.java b/src/main/java/api/java/thaumcraft/api/IRepairable.java similarity index 100% rename from src/api/java/thaumcraft/api/IRepairable.java rename to src/main/java/api/java/thaumcraft/api/IRepairable.java diff --git a/src/api/java/thaumcraft/api/IRepairableExtended.java b/src/main/java/api/java/thaumcraft/api/IRepairableExtended.java similarity index 100% rename from src/api/java/thaumcraft/api/IRepairableExtended.java rename to src/main/java/api/java/thaumcraft/api/IRepairableExtended.java diff --git a/src/api/java/thaumcraft/api/IRunicArmor.java b/src/main/java/api/java/thaumcraft/api/IRunicArmor.java similarity index 100% rename from src/api/java/thaumcraft/api/IRunicArmor.java rename to src/main/java/api/java/thaumcraft/api/IRunicArmor.java diff --git a/src/api/java/thaumcraft/api/IScribeTools.java b/src/main/java/api/java/thaumcraft/api/IScribeTools.java similarity index 100% rename from src/api/java/thaumcraft/api/IScribeTools.java rename to src/main/java/api/java/thaumcraft/api/IScribeTools.java diff --git a/src/api/java/thaumcraft/api/IVisDiscountGear.java b/src/main/java/api/java/thaumcraft/api/IVisDiscountGear.java similarity index 100% rename from src/api/java/thaumcraft/api/IVisDiscountGear.java rename to src/main/java/api/java/thaumcraft/api/IVisDiscountGear.java diff --git a/src/api/java/thaumcraft/api/IWarpingGear.java b/src/main/java/api/java/thaumcraft/api/IWarpingGear.java similarity index 100% rename from src/api/java/thaumcraft/api/IWarpingGear.java rename to src/main/java/api/java/thaumcraft/api/IWarpingGear.java diff --git a/src/api/java/thaumcraft/api/ItemApi.java b/src/main/java/api/java/thaumcraft/api/ItemApi.java similarity index 100% rename from src/api/java/thaumcraft/api/ItemApi.java rename to src/main/java/api/java/thaumcraft/api/ItemApi.java diff --git a/src/api/java/thaumcraft/api/ItemRunic.java b/src/main/java/api/java/thaumcraft/api/ItemRunic.java similarity index 100% rename from src/api/java/thaumcraft/api/ItemRunic.java rename to src/main/java/api/java/thaumcraft/api/ItemRunic.java diff --git a/src/api/java/thaumcraft/api/ThaumcraftApi.java b/src/main/java/api/java/thaumcraft/api/ThaumcraftApi.java similarity index 100% rename from src/api/java/thaumcraft/api/ThaumcraftApi.java rename to src/main/java/api/java/thaumcraft/api/ThaumcraftApi.java diff --git a/src/api/java/thaumcraft/api/ThaumcraftApiHelper.java b/src/main/java/api/java/thaumcraft/api/ThaumcraftApiHelper.java similarity index 100% rename from src/api/java/thaumcraft/api/ThaumcraftApiHelper.java rename to src/main/java/api/java/thaumcraft/api/ThaumcraftApiHelper.java diff --git a/src/api/java/thaumcraft/api/TileThaumcraft.java b/src/main/java/api/java/thaumcraft/api/TileThaumcraft.java similarity index 100% rename from src/api/java/thaumcraft/api/TileThaumcraft.java rename to src/main/java/api/java/thaumcraft/api/TileThaumcraft.java diff --git a/src/api/java/thaumcraft/api/WorldCoordinates.java b/src/main/java/api/java/thaumcraft/api/WorldCoordinates.java similarity index 100% rename from src/api/java/thaumcraft/api/WorldCoordinates.java rename to src/main/java/api/java/thaumcraft/api/WorldCoordinates.java diff --git a/src/api/java/thaumcraft/api/aspects/Aspect.java b/src/main/java/api/java/thaumcraft/api/aspects/Aspect.java similarity index 100% rename from src/api/java/thaumcraft/api/aspects/Aspect.java rename to src/main/java/api/java/thaumcraft/api/aspects/Aspect.java diff --git a/src/api/java/thaumcraft/api/aspects/AspectList.java b/src/main/java/api/java/thaumcraft/api/aspects/AspectList.java similarity index 100% rename from src/api/java/thaumcraft/api/aspects/AspectList.java rename to src/main/java/api/java/thaumcraft/api/aspects/AspectList.java diff --git a/src/api/java/thaumcraft/api/aspects/AspectSourceHelper.java b/src/main/java/api/java/thaumcraft/api/aspects/AspectSourceHelper.java similarity index 100% rename from src/api/java/thaumcraft/api/aspects/AspectSourceHelper.java rename to src/main/java/api/java/thaumcraft/api/aspects/AspectSourceHelper.java diff --git a/src/api/java/thaumcraft/api/aspects/IAspectContainer.java b/src/main/java/api/java/thaumcraft/api/aspects/IAspectContainer.java similarity index 100% rename from src/api/java/thaumcraft/api/aspects/IAspectContainer.java rename to src/main/java/api/java/thaumcraft/api/aspects/IAspectContainer.java diff --git a/src/api/java/thaumcraft/api/aspects/IAspectSource.java b/src/main/java/api/java/thaumcraft/api/aspects/IAspectSource.java similarity index 100% rename from src/api/java/thaumcraft/api/aspects/IAspectSource.java rename to src/main/java/api/java/thaumcraft/api/aspects/IAspectSource.java diff --git a/src/api/java/thaumcraft/api/aspects/IEssentiaContainerItem.java b/src/main/java/api/java/thaumcraft/api/aspects/IEssentiaContainerItem.java similarity index 100% rename from src/api/java/thaumcraft/api/aspects/IEssentiaContainerItem.java rename to src/main/java/api/java/thaumcraft/api/aspects/IEssentiaContainerItem.java diff --git a/src/api/java/thaumcraft/api/aspects/IEssentiaTransport.java b/src/main/java/api/java/thaumcraft/api/aspects/IEssentiaTransport.java similarity index 100% rename from src/api/java/thaumcraft/api/aspects/IEssentiaTransport.java rename to src/main/java/api/java/thaumcraft/api/aspects/IEssentiaTransport.java diff --git a/src/api/java/thaumcraft/api/crafting/CrucibleRecipe.java b/src/main/java/api/java/thaumcraft/api/crafting/CrucibleRecipe.java similarity index 100% rename from src/api/java/thaumcraft/api/crafting/CrucibleRecipe.java rename to src/main/java/api/java/thaumcraft/api/crafting/CrucibleRecipe.java diff --git a/src/api/java/thaumcraft/api/crafting/IArcaneRecipe.java b/src/main/java/api/java/thaumcraft/api/crafting/IArcaneRecipe.java similarity index 100% rename from src/api/java/thaumcraft/api/crafting/IArcaneRecipe.java rename to src/main/java/api/java/thaumcraft/api/crafting/IArcaneRecipe.java diff --git a/src/api/java/thaumcraft/api/crafting/IInfusionStabiliser.java b/src/main/java/api/java/thaumcraft/api/crafting/IInfusionStabiliser.java similarity index 100% rename from src/api/java/thaumcraft/api/crafting/IInfusionStabiliser.java rename to src/main/java/api/java/thaumcraft/api/crafting/IInfusionStabiliser.java diff --git a/src/api/java/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java b/src/main/java/api/java/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java similarity index 100% rename from src/api/java/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java rename to src/main/java/api/java/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java diff --git a/src/api/java/thaumcraft/api/crafting/InfusionRecipe.java b/src/main/java/api/java/thaumcraft/api/crafting/InfusionRecipe.java similarity index 100% rename from src/api/java/thaumcraft/api/crafting/InfusionRecipe.java rename to src/main/java/api/java/thaumcraft/api/crafting/InfusionRecipe.java diff --git a/src/api/java/thaumcraft/api/crafting/ShapedArcaneRecipe.java b/src/main/java/api/java/thaumcraft/api/crafting/ShapedArcaneRecipe.java similarity index 100% rename from src/api/java/thaumcraft/api/crafting/ShapedArcaneRecipe.java rename to src/main/java/api/java/thaumcraft/api/crafting/ShapedArcaneRecipe.java diff --git a/src/api/java/thaumcraft/api/crafting/ShapelessArcaneRecipe.java b/src/main/java/api/java/thaumcraft/api/crafting/ShapelessArcaneRecipe.java similarity index 100% rename from src/api/java/thaumcraft/api/crafting/ShapelessArcaneRecipe.java rename to src/main/java/api/java/thaumcraft/api/crafting/ShapelessArcaneRecipe.java diff --git a/src/api/java/thaumcraft/api/damagesource/DamageSourceIndirectThaumcraftEntity.java b/src/main/java/api/java/thaumcraft/api/damagesource/DamageSourceIndirectThaumcraftEntity.java similarity index 100% rename from src/api/java/thaumcraft/api/damagesource/DamageSourceIndirectThaumcraftEntity.java rename to src/main/java/api/java/thaumcraft/api/damagesource/DamageSourceIndirectThaumcraftEntity.java diff --git a/src/api/java/thaumcraft/api/damagesource/DamageSourceThaumcraft.java b/src/main/java/api/java/thaumcraft/api/damagesource/DamageSourceThaumcraft.java similarity index 100% rename from src/api/java/thaumcraft/api/damagesource/DamageSourceThaumcraft.java rename to src/main/java/api/java/thaumcraft/api/damagesource/DamageSourceThaumcraft.java diff --git a/src/api/java/thaumcraft/api/entities/IEldritchMob.java b/src/main/java/api/java/thaumcraft/api/entities/IEldritchMob.java similarity index 100% rename from src/api/java/thaumcraft/api/entities/IEldritchMob.java rename to src/main/java/api/java/thaumcraft/api/entities/IEldritchMob.java diff --git a/src/api/java/thaumcraft/api/entities/ITaintedMob.java b/src/main/java/api/java/thaumcraft/api/entities/ITaintedMob.java similarity index 100% rename from src/api/java/thaumcraft/api/entities/ITaintedMob.java rename to src/main/java/api/java/thaumcraft/api/entities/ITaintedMob.java diff --git a/src/api/java/thaumcraft/api/internal/DummyInternalMethodHandler.java b/src/main/java/api/java/thaumcraft/api/internal/DummyInternalMethodHandler.java similarity index 100% rename from src/api/java/thaumcraft/api/internal/DummyInternalMethodHandler.java rename to src/main/java/api/java/thaumcraft/api/internal/DummyInternalMethodHandler.java diff --git a/src/api/java/thaumcraft/api/internal/IInternalMethodHandler.java b/src/main/java/api/java/thaumcraft/api/internal/IInternalMethodHandler.java similarity index 100% rename from src/api/java/thaumcraft/api/internal/IInternalMethodHandler.java rename to src/main/java/api/java/thaumcraft/api/internal/IInternalMethodHandler.java diff --git a/src/api/java/thaumcraft/api/internal/WeightedRandomLoot.java b/src/main/java/api/java/thaumcraft/api/internal/WeightedRandomLoot.java similarity index 100% rename from src/api/java/thaumcraft/api/internal/WeightedRandomLoot.java rename to src/main/java/api/java/thaumcraft/api/internal/WeightedRandomLoot.java diff --git a/src/api/java/thaumcraft/api/nodes/INode.java b/src/main/java/api/java/thaumcraft/api/nodes/INode.java similarity index 100% rename from src/api/java/thaumcraft/api/nodes/INode.java rename to src/main/java/api/java/thaumcraft/api/nodes/INode.java diff --git a/src/api/java/thaumcraft/api/nodes/IRevealer.java b/src/main/java/api/java/thaumcraft/api/nodes/IRevealer.java similarity index 100% rename from src/api/java/thaumcraft/api/nodes/IRevealer.java rename to src/main/java/api/java/thaumcraft/api/nodes/IRevealer.java diff --git a/src/api/java/thaumcraft/api/nodes/NodeModifier.java b/src/main/java/api/java/thaumcraft/api/nodes/NodeModifier.java similarity index 100% rename from src/api/java/thaumcraft/api/nodes/NodeModifier.java rename to src/main/java/api/java/thaumcraft/api/nodes/NodeModifier.java diff --git a/src/api/java/thaumcraft/api/nodes/NodeType.java b/src/main/java/api/java/thaumcraft/api/nodes/NodeType.java similarity index 100% rename from src/api/java/thaumcraft/api/nodes/NodeType.java rename to src/main/java/api/java/thaumcraft/api/nodes/NodeType.java diff --git a/src/api/java/thaumcraft/api/package-info.java b/src/main/java/api/java/thaumcraft/api/package-info.java similarity index 100% rename from src/api/java/thaumcraft/api/package-info.java rename to src/main/java/api/java/thaumcraft/api/package-info.java diff --git a/src/api/java/thaumcraft/api/potions/PotionFluxTaint.java b/src/main/java/api/java/thaumcraft/api/potions/PotionFluxTaint.java similarity index 100% rename from src/api/java/thaumcraft/api/potions/PotionFluxTaint.java rename to src/main/java/api/java/thaumcraft/api/potions/PotionFluxTaint.java diff --git a/src/api/java/thaumcraft/api/potions/PotionVisExhaust.java b/src/main/java/api/java/thaumcraft/api/potions/PotionVisExhaust.java similarity index 100% rename from src/api/java/thaumcraft/api/potions/PotionVisExhaust.java rename to src/main/java/api/java/thaumcraft/api/potions/PotionVisExhaust.java diff --git a/src/api/java/thaumcraft/api/research/IScanEventHandler.java b/src/main/java/api/java/thaumcraft/api/research/IScanEventHandler.java similarity index 100% rename from src/api/java/thaumcraft/api/research/IScanEventHandler.java rename to src/main/java/api/java/thaumcraft/api/research/IScanEventHandler.java diff --git a/src/api/java/thaumcraft/api/research/ResearchCategories.java b/src/main/java/api/java/thaumcraft/api/research/ResearchCategories.java similarity index 100% rename from src/api/java/thaumcraft/api/research/ResearchCategories.java rename to src/main/java/api/java/thaumcraft/api/research/ResearchCategories.java diff --git a/src/api/java/thaumcraft/api/research/ResearchCategoryList.java b/src/main/java/api/java/thaumcraft/api/research/ResearchCategoryList.java similarity index 100% rename from src/api/java/thaumcraft/api/research/ResearchCategoryList.java rename to src/main/java/api/java/thaumcraft/api/research/ResearchCategoryList.java diff --git a/src/api/java/thaumcraft/api/research/ResearchItem.java b/src/main/java/api/java/thaumcraft/api/research/ResearchItem.java similarity index 100% rename from src/api/java/thaumcraft/api/research/ResearchItem.java rename to src/main/java/api/java/thaumcraft/api/research/ResearchItem.java diff --git a/src/api/java/thaumcraft/api/research/ResearchPage.java b/src/main/java/api/java/thaumcraft/api/research/ResearchPage.java similarity index 100% rename from src/api/java/thaumcraft/api/research/ResearchPage.java rename to src/main/java/api/java/thaumcraft/api/research/ResearchPage.java diff --git a/src/api/java/thaumcraft/api/research/ScanResult.java b/src/main/java/api/java/thaumcraft/api/research/ScanResult.java similarity index 100% rename from src/api/java/thaumcraft/api/research/ScanResult.java rename to src/main/java/api/java/thaumcraft/api/research/ScanResult.java diff --git a/src/api/java/thaumcraft/api/visnet/TileVisNode.java b/src/main/java/api/java/thaumcraft/api/visnet/TileVisNode.java similarity index 100% rename from src/api/java/thaumcraft/api/visnet/TileVisNode.java rename to src/main/java/api/java/thaumcraft/api/visnet/TileVisNode.java diff --git a/src/api/java/thaumcraft/api/visnet/VisNetHandler.java b/src/main/java/api/java/thaumcraft/api/visnet/VisNetHandler.java similarity index 100% rename from src/api/java/thaumcraft/api/visnet/VisNetHandler.java rename to src/main/java/api/java/thaumcraft/api/visnet/VisNetHandler.java diff --git a/src/api/java/thaumcraft/api/wands/FocusUpgradeType.java b/src/main/java/api/java/thaumcraft/api/wands/FocusUpgradeType.java similarity index 100% rename from src/api/java/thaumcraft/api/wands/FocusUpgradeType.java rename to src/main/java/api/java/thaumcraft/api/wands/FocusUpgradeType.java diff --git a/src/api/java/thaumcraft/api/wands/IWandRodOnUpdate.java b/src/main/java/api/java/thaumcraft/api/wands/IWandRodOnUpdate.java similarity index 100% rename from src/api/java/thaumcraft/api/wands/IWandRodOnUpdate.java rename to src/main/java/api/java/thaumcraft/api/wands/IWandRodOnUpdate.java diff --git a/src/api/java/thaumcraft/api/wands/IWandTriggerManager.java b/src/main/java/api/java/thaumcraft/api/wands/IWandTriggerManager.java similarity index 100% rename from src/api/java/thaumcraft/api/wands/IWandTriggerManager.java rename to src/main/java/api/java/thaumcraft/api/wands/IWandTriggerManager.java diff --git a/src/api/java/thaumcraft/api/wands/IWandable.java b/src/main/java/api/java/thaumcraft/api/wands/IWandable.java similarity index 100% rename from src/api/java/thaumcraft/api/wands/IWandable.java rename to src/main/java/api/java/thaumcraft/api/wands/IWandable.java diff --git a/src/api/java/thaumcraft/api/wands/ItemFocusBasic.java b/src/main/java/api/java/thaumcraft/api/wands/ItemFocusBasic.java similarity index 100% rename from src/api/java/thaumcraft/api/wands/ItemFocusBasic.java rename to src/main/java/api/java/thaumcraft/api/wands/ItemFocusBasic.java diff --git a/src/api/java/thaumcraft/api/wands/StaffRod.java b/src/main/java/api/java/thaumcraft/api/wands/StaffRod.java similarity index 100% rename from src/api/java/thaumcraft/api/wands/StaffRod.java rename to src/main/java/api/java/thaumcraft/api/wands/StaffRod.java diff --git a/src/api/java/thaumcraft/api/wands/WandCap.java b/src/main/java/api/java/thaumcraft/api/wands/WandCap.java similarity index 100% rename from src/api/java/thaumcraft/api/wands/WandCap.java rename to src/main/java/api/java/thaumcraft/api/wands/WandCap.java diff --git a/src/api/java/thaumcraft/api/wands/WandRod.java b/src/main/java/api/java/thaumcraft/api/wands/WandRod.java similarity index 100% rename from src/api/java/thaumcraft/api/wands/WandRod.java rename to src/main/java/api/java/thaumcraft/api/wands/WandRod.java diff --git a/src/api/java/thaumcraft/api/wands/WandTriggerRegistry.java b/src/main/java/api/java/thaumcraft/api/wands/WandTriggerRegistry.java similarity index 100% rename from src/api/java/thaumcraft/api/wands/WandTriggerRegistry.java rename to src/main/java/api/java/thaumcraft/api/wands/WandTriggerRegistry.java diff --git a/src/main/java/emt/EMT.java b/src/main/java/emt/EMT.java index 5a4ee9d..131a26a 100644 --- a/src/main/java/emt/EMT.java +++ b/src/main/java/emt/EMT.java @@ -12,10 +12,10 @@ import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; import cpw.mods.fml.relauncher.Side; import emt.command.CommandOutputs; import emt.init.EMTEntities; -import emt.init.EMTResearches; import emt.init.Registry; import emt.network.PacketEMTKeys; import emt.proxy.CommonProxy; +import emt.tile.solar.Solars; import emt.util.*; import net.minecraft.creativetab.CreativeTabs; import net.minecraftforge.common.MinecraftForge; @@ -23,98 +23,78 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @Mod( - modid = EMT.MOD_ID, - name = EMT.NAME, - version = EMT.VERSION, - guiFactory = EMT.GUI_FACTORY, - dependencies = EMT.DEPENDS + modid = EMT.MOD_ID, + name = EMT.NAME, + version = EMT.VERSION, + guiFactory = EMT.GUI_FACTORY, + dependencies = EMT.DEPENDS ) -public class EMT -{ - public static final String NAME = "Electro-Magic Tools"; - public static final String MOD_ID = "EMT"; - public static final String VERSION = "@version@"; - public static final String TEXTURE_PATH = "emt"; - public static final String GUI_FACTORY = "emt.client.gui.config.EMTGuiFactory"; - public static final String CLIENT_PROXY = "emt.proxy.ClientProxy"; - public static final String COMMON_PROXY = "emt.proxy.CommonProxy"; - public static final String CHANNEL = "EMT"; - public static final String DEPENDS = - "required-after:Thaumcraft;" + - "required-after:IC2;" + - "required-after:gregtech;"+ - "after:Avaritia;"+ - "after:MagicBees;"+ - "after:ForbiddenMagic;"; - @SidedProxy(clientSide="emt.proxy.ClientProxy", serverSide="emt.proxy.CommonProxy") - public static CommonProxy proxy; - public static final CreativeTabs TAB = new EMTCreativeTab("EMT.creativeTab"); - public static final Logger LOGGER = LogManager.getLogger("Electro-Magic Tools"); - public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel("EMT"); - @Mod.Instance("EMT") - public static EMT instance; - - public boolean isSimulating() - { - return !FMLCommonHandler.instance().getEffectiveSide().isClient(); - } - - @Mod.EventHandler - public void preInit(FMLPreInitializationEvent event) - { - LOGGER.info("Starting planning the world domination|start preinit"); - EMTConfigHandler.init(event.getSuggestedConfigurationFile()); - FMLCommonHandler.instance().bus().register(new EMTEventHandler()); - if (FMLCommonHandler.instance().getSide().isClient()) { - FMLCommonHandler.instance().bus().register(new EMTClientEventHandler()); +public class EMT { + public static final String NAME = "Electro-Magic Tools"; + public static final String MOD_ID = "EMT"; + public static final String VERSION = "@version@"; + public static final String TEXTURE_PATH = "emt"; + public static final String GUI_FACTORY = "emt.client.gui.config.EMTGuiFactory"; + public static final String CLIENT_PROXY = "emt.proxy.ClientProxy"; + public static final String COMMON_PROXY = "emt.proxy.CommonProxy"; + public static final String CHANNEL = "EMT"; + public static final String DEPENDS = + "required-after:Thaumcraft;" + + "required-after:IC2;" + + "required-after:gregtech;" + + "after:Avaritia;" + + "after:MagicBees;" + + "after:ForbiddenMagic;" + + "after:dreamcraft;"; + public static final CreativeTabs TAB = new EMTCreativeTab("EMT.creativeTab"); + public static final Logger LOGGER = LogManager.getLogger("Electro-Magic Tools"); + public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel("EMT"); + @SidedProxy(clientSide = "emt.proxy.ClientProxy", serverSide = "emt.proxy.CommonProxy") + public static CommonProxy proxy; + @Mod.Instance("EMT") + public static EMT instance; + + public boolean isSimulating() { + return !FMLCommonHandler.instance().getEffectiveSide().isClient(); } - Registry.registerPreInit(); - EMTEssentiasOutputs.addPrimalOutputs(); - //EMTEssentiasOutputs.addOutputs(); - registerPackets(); - LOGGER.info("Planning complete|end preinit"); - } - - @Mod.EventHandler - public void load(FMLInitializationEvent event) - { - LOGGER.info("Execute the plan|start init"); - Registry.registerInit(); - //LOGGER.info("Gathering allies"); - //LOGGER.info("Loading the proxies"); - proxy.load(); - //LOGGER.info("Making mobs drop additional items"); - MinecraftForge.EVENT_BUS.register(new EMTEventHandler()); - if (FMLCommonHandler.instance().getSide().isClient()) { - MinecraftForge.EVENT_BUS.register(new EMTClientEventHandler()); + + @Mod.EventHandler + public void preInit(FMLPreInitializationEvent event) { + EMTConfigHandler.init(event.getSuggestedConfigurationFile()); + FMLCommonHandler.instance().bus().register(new EMTEventHandler()); + if (FMLCommonHandler.instance().getSide().isClient()) { + FMLCommonHandler.instance().bus().register(new EMTClientEventHandler()); + } + Registry.registerPreInit(); + EMTEssentiasOutputs.addPrimalOutputs(); + registerPackets(); + Solars.populateCache(); + } + + @Mod.EventHandler + public void load(FMLInitializationEvent event) { + Registry.registerInit(); + proxy.load(); + MinecraftForge.EVENT_BUS.register(new EMTEventHandler()); + if (FMLCommonHandler.instance().getSide().isClient()) { + MinecraftForge.EVENT_BUS.register(new EMTClientEventHandler()); + } + EMTDungeonChestGenerator.generateLoot(); + EMTEntities.registerEMTEntities(); + NetworkRegistry.INSTANCE.registerGuiHandler(this, proxy); + } + + @Mod.EventHandler + public void postInit(FMLPostInitializationEvent event) { + Registry.registerLate(); + } + + @Mod.EventHandler + public void onFMLServerStart(FMLServerStartingEvent event) { + event.registerServerCommand(new CommandOutputs()); + } + + public void registerPackets() { + INSTANCE.registerMessage(PacketEMTKeys.class, PacketEMTKeys.class, 0, Side.SERVER); } - //LOGGER.info("Adding dungeon loot"); - EMTDungeonChestGenerator.generateLoot(); - //LOGGER.info("Registering entities"); - EMTEntities.registerEMTEntities(); - //LOGGER.info("Registering the GUI Handler"); - NetworkRegistry.INSTANCE.registerGuiHandler(this, proxy); - LOGGER.info("Allies gathered.|end init"); - } - - @Mod.EventHandler - public void postInit(FMLPostInitializationEvent event) - { - LOGGER.info("Starting the world takeover|start postinit"); - EMTEssentiasOutputs.addOutputs(); - Registry.registerLate(); - EMTResearches.register(); - LOGGER.info("World takeover complete. Enjoy!|end postinit"); - } - - @Mod.EventHandler - public void onFMLServerStart(FMLServerStartingEvent event) - { - event.registerServerCommand(new CommandOutputs()); - } - - public void registerPackets() - { - INSTANCE.registerMessage(PacketEMTKeys.class, PacketEMTKeys.class, 0, Side.SERVER); - } } diff --git a/src/main/java/emt/block/BlockBase.java b/src/main/java/emt/block/BlockBase.java index 7182f0d..53a1535 100644 --- a/src/main/java/emt/block/BlockBase.java +++ b/src/main/java/emt/block/BlockBase.java @@ -5,21 +5,21 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; public abstract class BlockBase extends Block { - public final String name; + public final String name; - public BlockBase(String unlocName, Material material, String textureName, SoundType soundType, float hardness) { - super(material); - name = unlocName; - setBlockName(EMT.MOD_ID + ".block." + unlocName); - if (textureName != null) { - setBlockTextureName(EMT.TEXTURE_PATH + ":" + textureName); - } - setCreativeTab(EMT.TAB); - setStepSound(soundType); - setHardness(hardness); - } + public BlockBase(String unlocName, Material material, String textureName, SoundType soundType, float hardness) { + super(material); + name = unlocName; + setBlockName(EMT.MOD_ID + ".block." + unlocName); + if (textureName != null) { + setBlockTextureName(EMT.TEXTURE_PATH + ":" + textureName); + } + setCreativeTab(EMT.TAB); + setStepSound(soundType); + setHardness(hardness); + } - public BlockBase(String unlocName, Material material, SoundType soundType, float hardness) { - this(unlocName, material, null, soundType, hardness); - } + public BlockBase(String unlocName, Material material, SoundType soundType, float hardness) { + this(unlocName, material, null, soundType, hardness); + } } \ No newline at end of file diff --git a/src/main/java/emt/block/BlockBaseContainer.java b/src/main/java/emt/block/BlockBaseContainer.java index 05a5401..b47f6ce 100644 --- a/src/main/java/emt/block/BlockBaseContainer.java +++ b/src/main/java/emt/block/BlockBaseContainer.java @@ -17,137 +17,142 @@ import net.minecraft.world.World; public abstract class BlockBaseContainer extends BlockContainer { - @SideOnly(Side.CLIENT) - IconSet[] iconSets; + public int instance; + public int countOfMetas; + @SideOnly(Side.CLIENT) + IconSet[] iconSets; - public int instance; - public int countOfMetas; + public BlockBaseContainer(String unlocName, Material material, SoundType soundType, float hardness) { + this(unlocName, material, soundType, 1, hardness); + } - public BlockBaseContainer(String unlocName, Material material, SoundType soundType, float hardness) { - this(unlocName, material, soundType, 1, hardness); - } + public BlockBaseContainer(String unlocName, Material material, SoundType soundType, int countOfMetas, float hardness) { + this(unlocName, material, soundType, countOfMetas, 0, hardness); + } - public BlockBaseContainer(String unlocName, Material material, SoundType soundType, int countOfMetas, float hardness) { - this(unlocName, material, soundType, countOfMetas, 0, hardness); - } + public BlockBaseContainer(String unlocName, Material material, SoundType soundType, int countOfMetas, int curInstance, float hardness) { + super(material); + this.setBlockName(EMT.MOD_ID + "." + unlocName); + this.setCreativeTab(EMT.TAB); + this.setStepSound(soundType); + this.setHardness(hardness); - public BlockBaseContainer(String unlocName, Material material, SoundType soundType, int countOfMetas, int curInstance, float hardness) { - super(material); - this.setBlockName(EMT.MOD_ID + "." + unlocName); - this.setCreativeTab(EMT.TAB); - this.setStepSound(soundType); - this.setHardness(hardness); + this.countOfMetas = countOfMetas; + this.instance = curInstance; - this.countOfMetas = countOfMetas; - this.instance = curInstance; + if (FMLCommonHandler.instance().getSide() == Side.CLIENT) { + iconSets = new IconSet[countOfMetas]; - if (FMLCommonHandler.instance().getSide() == Side.CLIENT) { - iconSets = new IconSet[countOfMetas]; + for (int meta = 0; meta < countOfMetas; meta++) { + iconSets[meta] = new IconSet(); + } + } + } - for (int meta = 0; meta < countOfMetas; meta++) { - iconSets[meta] = new IconSet(); - } - } - } - - public IconSet[] getIconSets() { - return iconSets; - } + public IconSet[] getIconSets() { + return iconSets; + } - @Override - public TileEntity createNewTileEntity(World world, int meta) { - return null; - } + @Override + public TileEntity createNewTileEntity(World world, int meta) { + return null; + } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(IBlockAccess access, int x, int y, int z, int side) { - TileEntityEMT tile = (TileEntityEMT) access.getTileEntity(x, y, z); - int meta = access.getBlockMetadata(x, y, z); + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess access, int x, int y, int z, int side) { + TileEntityEMT tile = (TileEntityEMT) access.getTileEntity(x, y, z); + int meta = access.getBlockMetadata(x, y, z); - IconSet set = iconSets[meta]; + if (meta >= countOfMetas) + return null; - if (side == 0) { - return set.bottom; - } - else if (side == 1) { - return set.top; - } - else if (side != tile.facing) { - return set.side; - } - else if (tile.isOn) { - if (set.frontOn != null) { - return set.frontOn; - } + IconSet set = iconSets[meta]; - if (set.frontOff != null) { - return set.frontOff; - } + if (side == 0) { + return set.bottom; + } else if (side == 1) { + return set.top; + } else if (side != tile.facing) { + return set.side; + } else if (tile.isOn) { + if (set.frontOn != null) { + return set.frontOn; + } - return set.side; - } - else { - if (set.frontOff != null) { - return set.frontOff; - } + if (set.frontOff != null) { + return set.frontOff; + } - return set.side; - } - } + return set.side; + } else { + if (set.frontOff != null) { + return set.frontOff; + } - @Override - public IIcon getIcon(int side, int meta) { - IconSet set = iconSets[meta]; + return set.side; + } + } - if (side < 1) { - return set.bottom; - } - if (side == 1) { - return set.top; - } - if (side == 3) { - return set.frontOff; - } + @Override + public IIcon getIcon(int side, int meta) { - return set.side; - } + if (meta >= countOfMetas) + return null; - @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack itemStack) { - int facing = MathHelper.floor_double(entity.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; - TileEntityEMT tile = (TileEntityEMT) world.getTileEntity(x, y, z); + IconSet set = iconSets[meta]; - switch (facing) { - case 0: - tile.facing = 2; - break; + if (side < 1) { + return set.bottom; + } + if (side == 1) { + return set.top; + } + if (side == 3) { + return set.frontOff; + } - case 1: - tile.facing = 5; - break; + return set.side; + } - case 2: - tile.facing = 3; - break; + @Override + public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack itemStack) { + int facing = MathHelper.floor_double(entity.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + TileEntityEMT tile = (TileEntityEMT) world.getTileEntity(x, y, z); - case 3: - tile.facing = 4; - break; - } - } + if (tile == null) + return; - @Override - public int damageDropped(int meta) { - return meta; - } + switch (facing) { + case 0: + tile.facing = 2; + break; - @SideOnly(Side.CLIENT) - public static class IconSet { - public IIcon top; - public IIcon bottom; - public IIcon side; - public IIcon frontOff; - public IIcon frontOn; - } + case 1: + tile.facing = 5; + break; + + case 2: + tile.facing = 3; + break; + + case 3: + tile.facing = 4; + break; + } + } + + @Override + public int damageDropped(int meta) { + return meta; + } + + @SideOnly(Side.CLIENT) + public static class IconSet { + public IIcon top; + public IIcon bottom; + public IIcon side; + public IIcon frontOff; + public IIcon frontOn; + } } diff --git a/src/main/java/emt/block/BlockElectricCloud.java b/src/main/java/emt/block/BlockElectricCloud.java index 1ebbb2c..5b32a7d 100644 --- a/src/main/java/emt/block/BlockElectricCloud.java +++ b/src/main/java/emt/block/BlockElectricCloud.java @@ -1,7 +1,5 @@ package emt.block; -import java.util.Random; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import emt.EMT; @@ -16,78 +14,80 @@ import net.minecraft.world.World; import thaumcraft.client.fx.ParticleEngine; import thaumcraft.client.fx.particles.FXSparkle; +import java.util.Random; + public class BlockElectricCloud extends BlockBase { - public IIcon icon; + public IIcon icon; - public BlockElectricCloud(String unlocName) { - super(unlocName, Material.cloth, soundTypeCloth, 0.1f); - setBlockBounds(0.3f, 0.3f, 0.3f, 0.7f, 0.7f, 0.7f); - } + public BlockElectricCloud(String unlocName) { + super(unlocName, Material.cloth, soundTypeCloth, 0.1f); + setBlockBounds(0.3f, 0.3f, 0.3f, 0.7f, 0.7f, 0.7f); + } - @SideOnly(Side.CLIENT) - @Override - public void randomDisplayTick(World world, int x, int y, int z, Random rnd) { - FXSparkle ef = new FXSparkle(world, x + 0.5F, y + 0.5F, z + 0.5F, x + 0.5F + (rnd.nextFloat() - rnd.nextFloat()) / 3.0F, y + 0.5F + (rnd.nextFloat() - rnd.nextFloat()) / 3.0F, z + 0.5F + (rnd.nextFloat() - rnd.nextFloat()) / 3.0F, 1.0F, 6, 3); - ef.setGravity(0.05F); - ParticleEngine.instance.addEffect(world, ef); - } + @SideOnly(Side.CLIENT) + @Override + public void randomDisplayTick(World world, int x, int y, int z, Random rnd) { + FXSparkle ef = new FXSparkle(world, x + 0.5F, y + 0.5F, z + 0.5F, x + 0.5F + (rnd.nextFloat() - rnd.nextFloat()) / 3.0F, y + 0.5F + (rnd.nextFloat() - rnd.nextFloat()) / 3.0F, z + 0.5F + (rnd.nextFloat() - rnd.nextFloat()) / 3.0F, 1.0F, 6, 3); + ef.setGravity(0.05F); + ParticleEngine.instance.addEffect(world, ef); + } - @Override - public TileEntity createTileEntity(World world, int metadata) { - return new TileElectricCloud(); - } + @Override + public TileEntity createTileEntity(World world, int metadata) { + return new TileElectricCloud(); + } - @Override - public String getUnlocalizedName() { - return "tile.EMT." + super.getUnlocalizedName().substring(15); - } + @Override + public String getUnlocalizedName() { + return "tile.EMT." + super.getUnlocalizedName().substring(15); + } - @Override - public void registerBlockIcons(IIconRegister ir) { - icon = ir.registerIcon(EMT.TEXTURE_PATH + ":empty"); - } + @Override + public void registerBlockIcons(IIconRegister ir) { + icon = ir.registerIcon(EMT.TEXTURE_PATH + ":empty"); + } - @Override - public IIcon getIcon(int side, int meta) { - return icon; - } + @Override + public IIcon getIcon(int side, int meta) { + return icon; + } - public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) { - return null; - } + public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) { + return null; + } - @Override - public int getLightValue() { - return 15; - } + @Override + public int getLightValue() { + return 15; + } - @Override - public boolean isAir(IBlockAccess world, int x, int y, int z) { - return false; - } + @Override + public boolean isAir(IBlockAccess world, int x, int y, int z) { + return false; + } - @Override - public boolean hasTileEntity() { - return true; - } + @Override + public boolean hasTileEntity() { + return true; + } - @Override - public boolean hasTileEntity(int metadata) { - return true; - } + @Override + public boolean hasTileEntity(int metadata) { + return true; + } - @Override - public int getRenderType() { - return -1; - } + @Override + public int getRenderType() { + return -1; + } - @Override - public boolean renderAsNormalBlock() { - return false; - } + @Override + public boolean renderAsNormalBlock() { + return false; + } - @Override - public boolean isOpaqueCube() { - return false; - } + @Override + public boolean isOpaqueCube() { + return false; + } } diff --git a/src/main/java/emt/block/BlockEssentiaGenerators.java b/src/main/java/emt/block/BlockEssentiaGenerators.java index 58a3ba6..32ce416 100644 --- a/src/main/java/emt/block/BlockEssentiaGenerators.java +++ b/src/main/java/emt/block/BlockEssentiaGenerators.java @@ -3,7 +3,7 @@ package emt.block; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import emt.EMT; -import emt.tile.generator.*; +import emt.tile.generator.TileEntityBaseGenerator; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; import net.minecraft.client.particle.EntitySmokeFX; @@ -20,88 +20,73 @@ import java.util.Random; public class BlockEssentiaGenerators extends BlockBaseContainer { - private static int subtypes=6; - - public BlockEssentiaGenerators(String name) { - super(name, Material.iron, soundTypeMetal, subtypes, 4.0F); - } + private static int subtypes = 6; - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister ir) { - super.registerBlockIcons(ir); - this.blockIcon = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/top"); + public BlockEssentiaGenerators(String name) { + super(name, Material.iron, soundTypeMetal, subtypes, 4.0F); + } - for (int meta = 0; meta < subtypes; meta++) { - iconSets[meta].top = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/top"); - iconSets[meta].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/top"); - iconSets[meta].side = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/side"); - } + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister ir) { + super.registerBlockIcons(ir); + this.blockIcon = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/top"); - iconSets[0].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/potentiafront"); - iconSets[1].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/ignisfront"); - iconSets[2].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/auramfront"); - iconSets[3].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/arborfront"); - iconSets[4].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/aerfront"); - iconSets[5].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/aerfront"); - } + for (int meta = 0; meta < subtypes; meta++) { + iconSets[meta].top = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/top"); + iconSets[meta].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/top"); + iconSets[meta].side = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/side"); + } - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item id, CreativeTabs tab, List list) { - list.add(new ItemStack(id, 1, 0)); - list.add(new ItemStack(id, 1, 1)); - list.add(new ItemStack(id, 1, 2)); - list.add(new ItemStack(id, 1, 3)); - list.add(new ItemStack(id, 1, 4)); - list.add(new ItemStack(id, 1, 5)); - } + iconSets[0].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/potentiafront"); + iconSets[1].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/ignisfront"); + iconSets[2].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/auramfront"); + iconSets[3].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/arborfront"); + iconSets[4].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/aerfront"); + iconSets[5].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/aerfront"); + } - @Override - public TileEntity createTileEntity(World world, int meta) { - switch (meta) { - case 0: - return new TileEntityPotentiaGenerator(); - case 1: - return new TileEntityIgnisGenerator(); - case 2: - return new TileEntityAuramGenerator(); - case 3: - return new TileEntityArborGenerator(); - case 4: - return new TileEntityAerGenerator(); - case 5: - return new TileEntityLucrumGenerator(); - } - return super.createTileEntity(world, meta); - } + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item id, CreativeTabs tab, List list) { + list.add(new ItemStack(id, 1, 0)); + list.add(new ItemStack(id, 1, 1)); + list.add(new ItemStack(id, 1, 2)); + list.add(new ItemStack(id, 1, 3)); + list.add(new ItemStack(id, 1, 4)); + list.add(new ItemStack(id, 1, 5)); + } - @SideOnly(Side.CLIENT) - public void randomDisplayTick(World world, int x, int y, int z, Random random) { - TileEntityBaseGenerator te = (TileEntityBaseGenerator) world.getTileEntity(x, y, z); - if (te.isActive) { - int color = te.aspect.getColor(); - float r = (float) (color >> 16 & 0xff) / 255F; - float g = (float) (color >> 8 & 0xff) / 255F; - float b = (float) (color & 0xff) / 255F; + @Override + public TileEntity createTileEntity(World world, int meta) { + return new TileEntityBaseGenerator(meta); + } - EntitySmokeFX fx = new EntitySmokeFX(world, x + 0.5f, y + 1.1, z + 0.5f, 0, 0.1, 0, 3); - fx.setRBGColorF(r, g, b); - Minecraft.getMinecraft().effectRenderer.addEffect(fx); - } - } - - public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer player, int s, float f1, float f2, float f3) - { - if (player.isSneaking()) { - return false; - } - if (world.isRemote) { - return true; - } - TileEntity tileentity = world.getTileEntity(i, j, k); - if (tileentity != null) { - player.openGui(emt.EMT.instance, 1, world, i, j, k); - } - return true; - } + @SideOnly(Side.CLIENT) + public void randomDisplayTick(World world, int x, int y, int z, Random random) { + TileEntityBaseGenerator te = (TileEntityBaseGenerator) world.getTileEntity(x, y, z); + if (te.isActive) { + int color = te.aspect.getColor(); + float r = (float) (color >> 16 & 0xff) / 255F; + float g = (float) (color >> 8 & 0xff) / 255F; + float b = (float) (color & 0xff) / 255F; + + EntitySmokeFX fx = new EntitySmokeFX(world, x + 0.5f, y + 1.1, z + 0.5f, 0, 0.1, 0, 3); + fx.setRBGColorF(r, g, b); + Minecraft.getMinecraft().effectRenderer.addEffect(fx); + } + } + + public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer player, int s, float f1, float f2, float f3) { + if (player.isSneaking()) { + return false; + } + if (world.isRemote) { + return true; + } + TileEntity tileentity = world.getTileEntity(i, j, k); + if (tileentity != null) { + player.openGui(emt.EMT.instance, 1, world, i, j, k); + } + return true; + } } diff --git a/src/main/java/emt/block/BlockMachines.java b/src/main/java/emt/block/BlockMachines.java index 20c0b23..41cd7f2 100644 --- a/src/main/java/emt/block/BlockMachines.java +++ b/src/main/java/emt/block/BlockMachines.java @@ -1,11 +1,12 @@ package emt.block; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import emt.EMT; import emt.gthandler.common.implementations.automation.EssentiaFiller; +import emt.tile.TileEntityEtherealMacerator; +import emt.tile.TileEntityIndustrialWandRecharge; import ic2.api.item.IC2Items; - -import java.util.List; -import java.util.Random; - import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -18,120 +19,115 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import emt.EMT; -import emt.tile.TileEntityEtherealMacerator; -import emt.tile.TileEntityIndustrialWandRecharge; + +import java.util.List; +import java.util.Random; public class BlockMachines extends BlockBaseContainer { - public BlockMachines(String name) { - super(name, Material.iron, soundTypeMetal, 3, 4.0F); - } + public BlockMachines(String name) { + super(name, Material.iron, soundTypeMetal, 3, 4.0F); + } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister ir) { - super.registerBlockIcons(ir); - - this.blockIcon = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/top"); + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister ir) { + super.registerBlockIcons(ir); - iconSets[0].top = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/top"); - iconSets[1].top = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop"); - iconSets[2].top = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop"); + this.blockIcon = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/top"); - iconSets[0].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/side"); - iconSets[1].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmacerator"); - iconSets[2].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop"); + iconSets[0].top = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/top"); + iconSets[1].top = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop"); + iconSets[2].top = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop"); - iconSets[0].side = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/side"); - iconSets[1].side = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmacerator"); - iconSets[2].side = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop"); + iconSets[0].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/side"); + iconSets[1].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmacerator"); + iconSets[2].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop"); - iconSets[0].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/wandcharger"); - iconSets[1].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratorfront"); - iconSets[2].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop"); + iconSets[0].side = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/side"); + iconSets[1].side = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmacerator"); + iconSets[2].side = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop"); - iconSets[0].frontOn = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/wandcharger"); - iconSets[1].frontOn = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratorfrontactive"); - iconSets[2].frontOn = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop"); - } + iconSets[0].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/wandcharger"); + iconSets[1].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratorfront"); + iconSets[2].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop"); - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item id, CreativeTabs tab, List list) { - list.add(new ItemStack(id, 1, 0)); - list.add(new ItemStack(id, 1, 1)); - list.add(new ItemStack(id, 1, 2)); - } + iconSets[0].frontOn = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/wandcharger"); + iconSets[1].frontOn = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratorfrontactive"); + iconSets[2].frontOn = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop"); + } - @Override - public TileEntity createTileEntity(World world, int meta) { - if (meta == 0) { - return new TileEntityIndustrialWandRecharge(); - } - else if (meta == 1) { - return new TileEntityEtherealMacerator(); - } - else if (meta == 2){ - return new EssentiaFiller(); - } - return super.createTileEntity(world, meta); - } + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item id, CreativeTabs tab, List list) { + list.add(new ItemStack(id, 1, 0)); + list.add(new ItemStack(id, 1, 1)); + list.add(new ItemStack(id, 1, 2)); + } - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) { - if (!world.isRemote && world.getTileEntity(x, y, z) instanceof TileEntityIndustrialWandRecharge) { - player.openGui(EMT.instance, 0, world, x, y, z); - } - else if (!world.isRemote && world.getTileEntity(x, y, z) instanceof TileEntityEtherealMacerator) { - player.openGui(EMT.instance, 1, world, x, y, z); - } - return true; - } + @Override + public TileEntity createTileEntity(World world, int meta) { + if (meta == 0) { + return new TileEntityIndustrialWandRecharge(); + } else if (meta == 1) { + return new TileEntityEtherealMacerator(); + } else if (meta == 2) { + return new EssentiaFiller(); + } + return super.createTileEntity(world, meta); + } - @Override - public Item getItemDropped(int meta, Random random, int fortune) { - return IC2Items.getItem("machine").getItem(); - } + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) { + if (!world.isRemote && world.getTileEntity(x, y, z) instanceof TileEntityIndustrialWandRecharge) { + player.openGui(EMT.instance, 0, world, x, y, z); + } else if (!world.isRemote && world.getTileEntity(x, y, z) instanceof TileEntityEtherealMacerator) { + player.openGui(EMT.instance, 1, world, x, y, z); + } + return true; + } - @Override - public void breakBlock(World world, int x, int y, int z, Block block, int meta) { - dropItems(world, x, y, z); - world.removeTileEntity(x, y, z); - super.breakBlock(world, x, y, z, block, meta); - } + @Override + public Item getItemDropped(int meta, Random random, int fortune) { + return IC2Items.getItem("machine").getItem(); + } - private void dropItems(World world, int x, int y, int z) { - Random rand = world.rand; - - TileEntity tileEntity = world.getTileEntity(x, y, z); - if (!(tileEntity instanceof IInventory)) { - return; - } - IInventory inventory = (IInventory) tileEntity; + @Override + public void breakBlock(World world, int x, int y, int z, Block block, int meta) { + dropItems(world, x, y, z); + world.removeTileEntity(x, y, z); + super.breakBlock(world, x, y, z, block, meta); + } - for (int i = 0; i < inventory.getSizeInventory(); i++) { - ItemStack item = inventory.getStackInSlot(i); + private void dropItems(World world, int x, int y, int z) { + Random rand = world.rand; - if (item != null && item.stackSize > 0) { - float rx = rand.nextFloat() * 0.8F + 0.1F; - float ry = rand.nextFloat() * 0.8F + 0.1F; - float rz = rand.nextFloat() * 0.8F + 0.1F; + TileEntity tileEntity = world.getTileEntity(x, y, z); + if (!(tileEntity instanceof IInventory)) { + return; + } + IInventory inventory = (IInventory) tileEntity; - EntityItem entityItem = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); + for (int i = 0; i < inventory.getSizeInventory(); i++) { + ItemStack item = inventory.getStackInSlot(i); - if (item.hasTagCompound()) { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); - } + if (item != null && item.stackSize > 0) { + float rx = rand.nextFloat() * 0.8F + 0.1F; + float ry = rand.nextFloat() * 0.8F + 0.1F; + float rz = rand.nextFloat() * 0.8F + 0.1F; - float factor = 0.05F; - entityItem.motionX = rand.nextGaussian() * factor; - entityItem.motionY = rand.nextGaussian() * factor + 0.2F; - entityItem.motionZ = rand.nextGaussian() * factor; - world.spawnEntityInWorld(entityItem); - item.stackSize = 0; - } - } - } + EntityItem entityItem = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); + + if (item.hasTagCompound()) { + entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); + } + + float factor = 0.05F; + entityItem.motionX = rand.nextGaussian() * factor; + entityItem.motionY = rand.nextGaussian() * factor + 0.2F; + entityItem.motionZ = rand.nextGaussian() * factor; + world.spawnEntityInWorld(entityItem); + item.stackSize = 0; + } + } + } } diff --git a/src/main/java/emt/block/BlockPortableNode.java b/src/main/java/emt/block/BlockPortableNode.java index a9d4794..a4188a1 100644 --- a/src/main/java/emt/block/BlockPortableNode.java +++ b/src/main/java/emt/block/BlockPortableNode.java @@ -17,68 +17,68 @@ import java.util.Random; public class BlockPortableNode extends BlockAiry { - public IIcon texture; + public IIcon texture; - public BlockPortableNode(String name) { - this.setCreativeTab(EMT.TAB); - setBlockName(EMT.MOD_ID + "." + name); - setBlockUnbreakable(); - } + public BlockPortableNode(String name) { + this.setCreativeTab(EMT.TAB); + setBlockName(EMT.MOD_ID + "." + name); + setBlockUnbreakable(); + } - @Override - public TileEntity createTileEntity(World world, int meta) { - return new TileEntityPortableNode(); - } + @Override + public TileEntity createTileEntity(World world, int meta) { + return new TileEntityPortableNode(); + } - @Override - public int quantityDropped(Random par1Random) { - return 0; - } + @Override + public int quantityDropped(Random par1Random) { + return 0; + } - @Override - public boolean isOpaqueCube() { - return false; - } + @Override + public boolean isOpaqueCube() { + return false; + } - @Override - public boolean renderAsNormalBlock() { - return false; - } + @Override + public boolean renderAsNormalBlock() { + return false; + } - @Override - protected boolean canSilkHarvest() { - return false; - } + @Override + protected boolean canSilkHarvest() { + return false; + } - public boolean canEntityDestroy(World world, int x, int y, int z, Entity entity) { - return false; - } + public boolean canEntityDestroy(World world, int x, int y, int z, Entity entity) { + return false; + } - public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) { - } + public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) { + } - @SideOnly(Side.CLIENT) - @Override - public void registerBlockIcons(IIconRegister ri) { - texture = ri.registerIcon(EMT.TEXTURE_PATH + ":portablenode"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerBlockIcons(IIconRegister ri) { + texture = ri.registerIcon(EMT.TEXTURE_PATH + ":portablenode"); + } - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) { - return texture; - } + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) { + return texture; + } - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) { - if (!world.isRemote && player.isSneaking() && player.getHeldItem() == null) { - world.setBlockToAir(x, y, z); - world.removeTileEntity(x, y, z); - } - return true; - } + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) { + if (!world.isRemote && player.isSneaking() && player.getHeldItem() == null) { + world.setBlockToAir(x, y, z); + world.removeTileEntity(x, y, z); + } + return true; + } - @Override - public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { - return null; - } + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return null; + } } diff --git a/src/main/java/emt/block/BlockReflectedGen.java b/src/main/java/emt/block/BlockReflectedGen.java deleted file mode 100644 index 3338bb4..0000000 --- a/src/main/java/emt/block/BlockReflectedGen.java +++ /dev/null @@ -1,110 +0,0 @@ -package emt.block; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import emt.EMT; -import emt.tile.generator.TileEntityBaseGenerator; -import emt.tile.generator.TileEntityReflexionGen; -import net.minecraft.block.material.Material; -import net.minecraft.client.Minecraft; -import net.minecraft.client.particle.EntitySmokeFX; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -import java.util.List; -import java.util.Random; - -public class BlockReflectedGen - extends BlockBaseContainer -{ - private int subtypes; - private static int overalltypes = TileEntityReflexionGen.L.size(); - public static short Set; - private int[] posInList; - - public BlockReflectedGen(String name, short Set) - { - super(name, Material.iron, soundTypeMetal, 16, 4.0F); - this.Set = Set; - this.subtypes = 16; - - if ((Set*16) > overalltypes) - subtypes= ((Set-1)*16)+overalltypes-((Set-1)*16); - - posInList= new int[subtypes]; - if ((Set*16) < overalltypes) - for (int i=0; i overalltypes) - for (int i=0; i> 16 & 0xFF) / 255.0F; - float g = (color >> 8 & 0xFF) / 255.0F; - float b = (color & 0xFF) / 255.0F; - - EntitySmokeFX fx = new EntitySmokeFX(world, x + 0.5F, y + 1.1D, z + 0.5F, 0.0D, 0.1D, 0.0D, 3.0F); - fx.setRBGColorF(r, g, b); - Minecraft.getMinecraft().effectRenderer.addEffect(fx); - } - } - - public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer player, int s, float f1, float f2, float f3) - { - if (player.isSneaking()) { - return false; - } - if (world.isRemote) { - return true; - } - TileEntity tileentity = world.getTileEntity(i, j, k); - if (tileentity != null) { - player.openGui(EMT.instance, 1, world, i, j, k); - } - return true; - } -} diff --git a/src/main/java/emt/block/BlockShield.java b/src/main/java/emt/block/BlockShield.java index ade2674..9ca3a7f 100644 --- a/src/main/java/emt/block/BlockShield.java +++ b/src/main/java/emt/block/BlockShield.java @@ -16,62 +16,62 @@ import java.util.Random; public class BlockShield extends Block { - public BlockShield(String name) { - super(Material.rock); - setBlockName(EMT.MOD_ID + "." + name); - this.setCreativeTab(EMT.TAB); - this.setHardness(1F); - this.setResistance(10000000000000000000000000000000000000F); - } + public BlockShield(String name) { + super(Material.rock); + setBlockName(EMT.MOD_ID + "." + name); + this.setCreativeTab(EMT.TAB); + this.setHardness(1F); + this.setResistance(10000000000000000000000000000000000000F); + } - @Override - public int quantityDropped(Random par1Random) { - return 0; - } + @Override + public int quantityDropped(Random par1Random) { + return 0; + } - @Override - @SideOnly(Side.CLIENT) - public int getRenderBlockPass() { - return 0; - } + @Override + @SideOnly(Side.CLIENT) + public int getRenderBlockPass() { + return 0; + } - @SideOnly(Side.CLIENT) - @Override - public void registerBlockIcons(IIconRegister iconRegister) { - this.blockIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":shield"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerBlockIcons(IIconRegister iconRegister) { + this.blockIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":shield"); + } - @Override - public boolean isOpaqueCube() { - return false; - } + @Override + public boolean isOpaqueCube() { + return false; + } - @Override - public boolean renderAsNormalBlock() { - return false; - } + @Override + public boolean renderAsNormalBlock() { + return false; + } - @Override - protected boolean canSilkHarvest() { - return false; - } + @Override + protected boolean canSilkHarvest() { + return false; + } - @Override - public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) { - return false; - } + @Override + public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) { + return false; + } - @Override - public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) { - return false; - } + @Override + public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) { + return false; + } - @Override - public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) { - return false; - } + @Override + public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) { + return false; + } - @Override - public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) { - } + @Override + public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) { + } } diff --git a/src/main/java/emt/block/BlockSolars.java b/src/main/java/emt/block/BlockSolars.java index 5adc12b..7268650 100644 --- a/src/main/java/emt/block/BlockSolars.java +++ b/src/main/java/emt/block/BlockSolars.java @@ -3,27 +3,7 @@ package emt.block; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import emt.EMT; -import emt.tile.solar.air.TileEntityAirSolar; -import emt.tile.solar.air.TileEntityDoubleAirSolar; -import emt.tile.solar.air.TileEntityTripleAirSolar; -import emt.tile.solar.compressed.TileEntityCompressedSolar; -import emt.tile.solar.compressed.TileEntityDoubleCompressedSolar; -import emt.tile.solar.compressed.TileEntityTripleCompressedSolar; -import emt.tile.solar.dark.TileEntityDarkSolar; -import emt.tile.solar.dark.TileEntityDoubleDarkSolar; -import emt.tile.solar.dark.TileEntityTripleDarkSolar; -import emt.tile.solar.earth.TileEntityDoubleEarthSolar; -import emt.tile.solar.earth.TileEntityEarthSolar; -import emt.tile.solar.earth.TileEntityTripleEarthSolar; -import emt.tile.solar.fire.TileEntityDoubleFireSolar; -import emt.tile.solar.fire.TileEntityFireSolar; -import emt.tile.solar.fire.TileEntityTripleFireSolar; -import emt.tile.solar.order.TileEntityDoubleOrderSolar; -import emt.tile.solar.order.TileEntityOrderSolar; -import emt.tile.solar.order.TileEntityTripleOrderSolar; -import emt.tile.solar.water.TileEntityDoubleWaterSolar; -import emt.tile.solar.water.TileEntityTripleWaterSolar; -import emt.tile.solar.water.TileEntityWaterSolar; +import emt.tile.solar.Solars; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -36,208 +16,138 @@ import net.minecraft.util.IIcon; import net.minecraft.world.World; import java.util.List; +import java.util.Objects; public class BlockSolars extends BlockBaseContainer { - public BlockSolars(String name, int countOfMetas, int instance) { - super(name, Material.iron, soundTypeMetal, countOfMetas, instance, 4.0F); - } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister ir) { - IIcon solarTop = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/solartop"); - IIcon doubleSolarTop = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/doublesolartop"); - IIcon tripleSolarTop = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/triplesolartop"); - IIcon bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/bottom"); + public BlockSolars(String name, int countOfMetas, int instance) { + super(name, Material.iron, soundTypeMetal, countOfMetas, instance, 4.0F); + } - if(instance == 0) { - iconSets[0].top = solarTop; - iconSets[1].top = doubleSolarTop; - iconSets[2].top = tripleSolarTop; - iconSets[3].top = solarTop; - iconSets[4].top = doubleSolarTop; - iconSets[5].top = tripleSolarTop; - iconSets[6].top = solarTop; - iconSets[7].top = doubleSolarTop; - iconSets[8].top = tripleSolarTop; - iconSets[9].top = solarTop; - iconSets[10].top = doubleSolarTop; - iconSets[11].top = tripleSolarTop; - iconSets[12].top = solarTop; - iconSets[13].top = doubleSolarTop; - iconSets[14].top = tripleSolarTop; - iconSets[15].top = solarTop; - - iconSets[0].bottom = bottom; - iconSets[1].bottom = bottom; - iconSets[2].bottom = bottom; - iconSets[3].bottom = bottom; - iconSets[4].bottom = bottom; - iconSets[5].bottom = bottom; - iconSets[6].bottom = bottom; - iconSets[7].bottom = bottom; - iconSets[8].bottom = bottom; - iconSets[9].bottom = bottom; - iconSets[10].bottom = bottom; - iconSets[11].bottom = bottom; - iconSets[12].bottom = bottom; - iconSets[13].bottom = bottom; - iconSets[14].bottom = bottom; - iconSets[15].bottom = bottom; - - IIcon side = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/side"); - IIcon waterSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/water/waterside"); - IIcon darkSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/dark/darkside"); - IIcon orderSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/order/orderside"); - IIcon fireSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/fire/fireside"); - IIcon airSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/air/airside"); - - iconSets[0].side = side; - iconSets[1].side = side; - iconSets[2].side = side; - iconSets[3].side = waterSide; - iconSets[4].side = waterSide; - iconSets[5].side = waterSide; - iconSets[6].side = darkSide; - iconSets[7].side = darkSide; - iconSets[8].side = darkSide; - iconSets[9].side = orderSide; - iconSets[10].side = orderSide; - iconSets[11].side = orderSide; - iconSets[12].side = fireSide; - iconSets[13].side = fireSide; - iconSets[14].side = fireSide; - iconSets[15].side = airSide; - } - if(instance == 1) { - iconSets[0].top = doubleSolarTop; - iconSets[1].top = tripleSolarTop; - iconSets[2].top = solarTop; - iconSets[3].top = doubleSolarTop; - iconSets[4].top = tripleSolarTop; + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister ir) { + IIcon solarTop = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/solartop"); + IIcon doubleSolarTop = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/doublesolartop"); + IIcon tripleSolarTop = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/triplesolartop"); - iconSets[0].bottom = bottom; - iconSets[1].bottom = bottom; - iconSets[2].bottom = bottom; - iconSets[3].bottom = bottom; - iconSets[4].bottom = bottom; + IIcon bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/bottom"); - IIcon airSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/air/airside"); - IIcon earthSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/earth/earthside"); - - iconSets[0].side = airSide; - iconSets[1].side = airSide; - iconSets[2].side = earthSide; - iconSets[3].side = earthSide; - iconSets[4].side = earthSide; - } - } + IIcon side = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/side"); + IIcon waterSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/water/waterside"); + IIcon darkSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/dark/darkside"); + IIcon orderSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/order/orderside"); + IIcon fireSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/fire/fireside"); + IIcon airSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/air/airside"); + IIcon earthSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/earth/earthside"); - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item id, CreativeTabs tab, List list) { - if (instance == 0) { - for (int meta = 0; meta < 16; meta++) { - list.add(new ItemStack(id, 1, meta)); - } - } + IIcon[] sides = {side, orderSide, darkSide, airSide, earthSide, waterSide, fireSide}; - if (instance == 1) { - for (int meta = 0; meta < 5; meta++) { - list.add(new ItemStack(id, 1, meta)); - } - } + if (instance != 1 && instance != 0) + for (int i = 0; i < countOfMetas; i++) { + iconSets[i].bottom = bottom; + iconSets[i].side = sides[(Objects.requireNonNull(Solars.getTileEntitySolarBase(instance, i)).aspect)]; + iconSets[i].top = tripleSolarTop; + } + else if (instance == 0) { + for (int i = 0; i < countOfMetas; i++) { + iconSets[i].bottom = bottom; + } + iconSets[0].top = solarTop; + iconSets[1].top = doubleSolarTop; + iconSets[2].top = tripleSolarTop; + iconSets[3].top = solarTop; + iconSets[4].top = doubleSolarTop; + iconSets[5].top = tripleSolarTop; + iconSets[6].top = solarTop; + iconSets[7].top = doubleSolarTop; + iconSets[8].top = tripleSolarTop; + iconSets[9].top = solarTop; + iconSets[10].top = doubleSolarTop; + iconSets[11].top = tripleSolarTop; + iconSets[12].top = solarTop; + iconSets[13].top = doubleSolarTop; + iconSets[14].top = tripleSolarTop; + iconSets[15].top = solarTop; + iconSets[0].side = side; + iconSets[1].side = side; + iconSets[2].side = side; + iconSets[3].side = waterSide; + iconSets[4].side = waterSide; + iconSets[5].side = waterSide; + iconSets[6].side = darkSide; + iconSets[7].side = darkSide; + iconSets[8].side = darkSide; + iconSets[9].side = orderSide; + iconSets[10].side = orderSide; + iconSets[11].side = orderSide; + iconSets[12].side = fireSide; + iconSets[13].side = fireSide; + iconSets[14].side = fireSide; + iconSets[15].side = airSide; + } else { + iconSets[0].top = doubleSolarTop; + iconSets[1].top = tripleSolarTop; + iconSets[2].top = solarTop; + iconSets[3].top = doubleSolarTop; + iconSets[4].top = tripleSolarTop; + for (int i = 0; i < countOfMetas; i++) { + iconSets[i].bottom = bottom; + } + iconSets[0].side = airSide; + iconSets[1].side = airSide; + iconSets[2].side = earthSide; + iconSets[3].side = earthSide; + iconSets[4].side = earthSide; + } + } - } + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item id, CreativeTabs tab, List list) { + for (int meta = 0; meta < countOfMetas; meta++) { + list.add(new ItemStack(id, 1, meta)); + } + } - @Override - public IIcon getIcon(int side, int meta) { - if (side < 1) { - return iconSets[meta].bottom; - } - if (side == 1) { - return iconSets[meta].top; - } + @Override + public IIcon getIcon(int side, int meta) { - return iconSets[meta].side; - } + if (meta >= countOfMetas) + return null; - @Override - public TileEntity createTileEntity(World world, int meta) { - if (instance == 0) { - switch (meta) { - case 0: - return new TileEntityCompressedSolar(); - case 1: - return new TileEntityDoubleCompressedSolar(); - case 2: - return new TileEntityTripleCompressedSolar(); - case 3: - return new TileEntityWaterSolar(); - case 4: - return new TileEntityDoubleWaterSolar(); - case 5: - return new TileEntityTripleWaterSolar(); - case 6: - return new TileEntityDarkSolar(); - case 7: - return new TileEntityDoubleDarkSolar(); - case 8: - return new TileEntityTripleDarkSolar(); - case 9: - return new TileEntityOrderSolar(); - case 10: - return new TileEntityDoubleOrderSolar(); - case 11: - return new TileEntityTripleOrderSolar(); - case 12: - return new TileEntityFireSolar(); - case 13: - return new TileEntityDoubleFireSolar(); - case 14: - return new TileEntityTripleFireSolar(); - case 15: - return new TileEntityAirSolar(); - } - } + if (side < 1) { + return iconSets[meta].bottom; + } + if (side == 1) { + return iconSets[meta].top; + } - if (instance == 1) { + return iconSets[meta].side; + } - switch (meta) { - case 0: - return new TileEntityDoubleAirSolar(); - case 1: - return new TileEntityTripleAirSolar(); - case 2: - return new TileEntityEarthSolar(); - case 3: - return new TileEntityDoubleEarthSolar(); - case 4: - return new TileEntityTripleEarthSolar(); - } - } + @Override + public TileEntity createTileEntity(World world, int meta) { + return Solars.getTileEntitySolarBase(instance, meta); + } - return super.createTileEntity(world, meta); - } + @Override + public void breakBlock(World world, int x, int y, int z, Block block, int meta) { + world.removeTileEntity(x, y, z); + super.breakBlock(world, x, y, z, block, meta); + } - @Override - public void breakBlock(World world, int x, int y, int z, Block block, int meta) { - world.removeTileEntity(x, y, z); - super.breakBlock(world, x, y, z, block, meta); - } - - @Override - public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer player, int s, float f1, float f2, float f3) - { - if (player.isSneaking()) { - return false; - } - if (world.isRemote) { - return true; - } - TileEntity tileentity = world.getTileEntity(i, j, k); - if (tileentity != null) { - player.openGui(emt.EMT.instance, 1, world, i, j, k); - } - return true; - } + @Override + public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer player, int s, float f1, float f2, float f3) { + if (player.isSneaking()) { + return false; + } + if (world.isRemote) { + return true; + } + TileEntity tileentity = world.getTileEntity(i, j, k); + if (tileentity != null) { + player.openGui(emt.EMT.instance, 1, world, i, j, k); + } + return true; + } } diff --git a/src/main/java/emt/client/EMTKeys.java b/src/main/java/emt/client/EMTKeys.java index b58fb58..99f0dee 100644 --- a/src/main/java/emt/client/EMTKeys.java +++ b/src/main/java/emt/client/EMTKeys.java @@ -1,16 +1,15 @@ package emt.client; -import org.lwjgl.input.Keyboard; - import cpw.mods.fml.client.registry.ClientRegistry; import emt.util.EMTTextHelper; import net.minecraft.client.settings.KeyBinding; +import org.lwjgl.input.Keyboard; public class EMTKeys { - public static KeyBinding keyUnequip; + public static KeyBinding keyUnequip; - public static void registerKeys() { - keyUnequip = new KeyBinding(EMTTextHelper.localize("gui.EMT.key.unequip"), Keyboard.KEY_Z, "EMT"); - ClientRegistry.registerKeyBinding(keyUnequip); - } + public static void registerKeys() { + keyUnequip = new KeyBinding(EMTTextHelper.localize("gui.EMT.key.unequip"), Keyboard.KEY_Z, "EMT"); + ClientRegistry.registerKeyBinding(keyUnequip); + } } \ No newline at end of file diff --git a/src/main/java/emt/client/gui/GuiEtherealMacerator.java b/src/main/java/emt/client/gui/GuiEtherealMacerator.java index 3a989eb..5378d49 100644 --- a/src/main/java/emt/client/gui/GuiEtherealMacerator.java +++ b/src/main/java/emt/client/gui/GuiEtherealMacerator.java @@ -1,35 +1,34 @@ package emt.client.gui; +import emt.EMT; +import emt.client.gui.container.ContainerEtheralMacerator; +import emt.tile.TileEntityEtherealMacerator; +import emt.util.EMTTextHelper; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; -import emt.EMT; -import emt.client.gui.container.ContainerEtheralMacerator; -import emt.tile.TileEntityEtherealMacerator; -import emt.util.EMTTextHelper; - public class GuiEtherealMacerator extends GuiContainer { - public GuiEtherealMacerator(InventoryPlayer inventory, TileEntityEtherealMacerator te) { - super(new ContainerEtheralMacerator(inventory, te)); - xSize = 176; - ySize = 165; - } + public static final ResourceLocation texture = new ResourceLocation(EMT.TEXTURE_PATH, "textures/guis/etherealmacerator.png"); - public static final ResourceLocation texture = new ResourceLocation(EMT.TEXTURE_PATH, "textures/guis/etherealmacerator.png"); + public GuiEtherealMacerator(InventoryPlayer inventory, TileEntityEtherealMacerator te) { + super(new ContainerEtheralMacerator(inventory, te)); + xSize = 176; + ySize = 165; + } - @Override - public void drawGuiContainerBackgroundLayer(float f, int j, int i) { - GL11.glColor4f(1F, 1F, 1F, 1F); - Minecraft.getMinecraft().getTextureManager().bindTexture(texture); - drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - } + @Override + public void drawGuiContainerBackgroundLayer(float f, int j, int i) { + GL11.glColor4f(1F, 1F, 1F, 1F); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + } - protected void drawGuiContainerForegroundLayer(int par1, int par2) { - this.fontRendererObj.drawString(EMTTextHelper.localize("gui.EMT.etherealMacerator.title"), 6, 6, 4210752); - this.fontRendererObj.drawString(EMTTextHelper.localize("gui.EMT.inventory"), 8, this.ySize - 96 + 2, 4210752); - } + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + this.fontRendererObj.drawString(EMTTextHelper.localize("gui.EMT.etherealMacerator.title"), 6, 6, 4210752); + this.fontRendererObj.drawString(EMTTextHelper.localize("gui.EMT.inventory"), 8, this.ySize - 96 + 2, 4210752); + } } diff --git a/src/main/java/emt/client/gui/GuiGenerator.java b/src/main/java/emt/client/gui/GuiGenerator.java index 6e54a10..41070f9 100644 --- a/src/main/java/emt/client/gui/GuiGenerator.java +++ b/src/main/java/emt/client/gui/GuiGenerator.java @@ -9,67 +9,61 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; public class GuiGenerator extends GuiContainer { - - private static ResourceLocation tex = new ResourceLocation(EMT.TEXTURE_PATH, "textures/guis/generator.png"); - - TileEntityBaseGenerator tileentity; - private boolean allowUserInput; - private int xSize; - private int ySize; - public GuiGenerator(InventoryPlayer invPlayer, TileEntityBaseGenerator entity) { - super(new ConainerGenerator(invPlayer, entity)); - this.tileentity = entity; - this.allowUserInput = false; - this.xSize = 194; - this.ySize = 168; - } + private static ResourceLocation tex = new ResourceLocation(EMT.TEXTURE_PATH, "textures/guis/generator.png"); - - protected void drawGuiContainerForegroundLayer(int par1, int par2) - { - String formatPanelName = I18n.format(this.tileentity.getInventoryName(), new Object[0]); - int nmPos = (this.xSize - this.fontRendererObj.getStringWidth(formatPanelName)) / 2; - this.fontRendererObj.drawStringWithShadow(formatPanelName, nmPos, 7, 6618118); - - String storageString = I18n.format("emt.Storage", new Object[0]); - String fuel=I18n.format("emt.Fuel", new Object[0]); - if (this.tileentity.maxstorage<1000) - this.fontRendererObj.drawString(storageString + this.tileentity.storage + "/" + this.tileentity.maxstorage +"EU", 36, 22, 0); - else if (10000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 10000000) - this.fontRendererObj.drawString(storageString + (this.tileentity.mpshownstroage) + "/" + (this.tileentity.maxstorage/1000) +"kEU", 36, 22, 0); - else if (10000000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 1000000000) - this.fontRendererObj.drawString(storageString + (this.tileentity.mpshownstroage/1000) + "/" + (this.tileentity.maxstorage/1000000) +"MEU", 36, 22, 0); - else if (1000000000 <= this.tileentity.maxstorage) - this.fontRendererObj.drawString(storageString + (this.tileentity.mpshownstroage/1000000) + "/" + (this.tileentity.maxstorage/1000000000) +"GEU", 36, 22, 0); - if(this.tileentity.isActive) - this.fontRendererObj.drawString(I18n.format("emt.Generating",new Object[0])+Double.toString(this.tileentity.generating/20/20)+" EU/t", 36, 35, 0); - else - this.fontRendererObj.drawString(I18n.format("emt.Generating",new Object[0])+"0 EU/t",36, 35, 0); - this.fontRendererObj.drawString(fuel+": "+Integer.toString(this.tileentity.fuel),36,48,0); - this.fontRendererObj.drawString(fuel+"/t: "+Integer.toString((this.tileentity.fuel*20*20)-this.tileentity.tick),36,63,0); - } + TileEntityBaseGenerator tileentity; + private int xSize; + private int ySize; - @Override - protected void drawGuiContainerBackgroundLayer(float f, int i, int j) - { - // GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - - this.mc.renderEngine.bindTexture(tex); - - int h = (this.width - this.xSize) / 2; - int k = (this.height - this.ySize) / 2; - drawTexturedModalRect(h, k, 0, 0, this.xSize, this.ySize); - if (this.tileentity.storage > 0) - { - int l = this.tileentity.gaugeEnergyScaled(33); - drawTexturedModalRect(h + 18, k + 23, 195, 0, l, 14); - } - - if (this.tileentity.fuel > 0) - { - int l = this.tileentity.gaugeFuelScaled(33); - drawTexturedModalRect(h + 18, k + 42, 195, 0, l, 14); - } - } + public GuiGenerator(InventoryPlayer invPlayer, TileEntityBaseGenerator entity) { + super(new ConainerGenerator(invPlayer, entity)); + this.tileentity = entity; + this.allowUserInput = false; + this.xSize = 194; + this.ySize = 168; + } + + + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + String formatPanelName = I18n.format(this.tileentity.getInventoryName()); + int nmPos = (this.xSize - this.fontRendererObj.getStringWidth(formatPanelName)) / 2; + this.fontRendererObj.drawStringWithShadow(formatPanelName, nmPos, 7, 6618118); + String storageString = I18n.format("emt.Storage"); + String fuel = I18n.format("emt.Fuel"); + if (this.tileentity.maxstorage < 1000) + this.fontRendererObj.drawString(storageString + this.tileentity.mpshownstroage * 1000 + "/" + this.tileentity.maxstorage + "EU", 36, 22, 0); + else if (10000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 10000000) + this.fontRendererObj.drawString(storageString + (this.tileentity.mpshownstroage) + "/" + (this.tileentity.maxstorage / 1000) + "kEU", 36, 22, 0); + else if (10000000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 1000000000) + this.fontRendererObj.drawString(storageString + (this.tileentity.mpshownstroage / 1000) + "/" + (this.tileentity.maxstorage / 1000000) + "MEU", 36, 22, 0); + else if (1000000000 <= this.tileentity.maxstorage) + this.fontRendererObj.drawString(storageString + (this.tileentity.mpshownstroage / 1000000) + "/" + (this.tileentity.maxstorage / 1000000000) + "GEU", 36, 22, 0); + if (this.tileentity.isActive) + this.fontRendererObj.drawString(I18n.format("emt.Generating") + Double.toString(this.tileentity.generating / 20 / 20) + " EU/t", 36, 35, 0); + else + this.fontRendererObj.drawString(I18n.format("emt.Generating") + "0 EU/t", 36, 35, 0); + this.fontRendererObj.drawString(fuel + ": " + Integer.toString(this.tileentity.fuel), 36, 48, 0); + this.fontRendererObj.drawString(fuel + "/t: " + Integer.toString((this.tileentity.fuel * 20 * 20) - this.tileentity.tick), 36, 63, 0); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float f, int i, int j) { + // GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + + this.mc.renderEngine.bindTexture(tex); + + int h = (this.width - this.xSize) / 2; + int k = (this.height - this.ySize) / 2; + drawTexturedModalRect(h, k, 0, 0, this.xSize, this.ySize); + if (this.tileentity.mpshownstroage > 0) { + int l = this.tileentity.gaugeEnergyScaled(33); + drawTexturedModalRect(h + 18, k + 23, 195, 0, l, 14); + } + + if (this.tileentity.fuel > 0) { + int l = this.tileentity.gaugeFuelScaled(33); + drawTexturedModalRect(h + 18, k + 42, 195, 0, l, 14); + } + } } diff --git a/src/main/java/emt/client/gui/GuiIndustrialWandRecharger.java b/src/main/java/emt/client/gui/GuiIndustrialWandRecharger.java index 5529b0d..9366338 100644 --- a/src/main/java/emt/client/gui/GuiIndustrialWandRecharger.java +++ b/src/main/java/emt/client/gui/GuiIndustrialWandRecharger.java @@ -1,35 +1,34 @@ package emt.client.gui; +import emt.EMT; +import emt.client.gui.container.ContainerIndustrialWandRecharge; +import emt.tile.TileEntityIndustrialWandRecharge; +import emt.util.EMTTextHelper; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; -import emt.EMT; -import emt.client.gui.container.ContainerIndustrialWandRecharge; -import emt.tile.TileEntityIndustrialWandRecharge; -import emt.util.EMTTextHelper; - public class GuiIndustrialWandRecharger extends GuiContainer { - public GuiIndustrialWandRecharger(InventoryPlayer inventory, TileEntityIndustrialWandRecharge te) { - super(new ContainerIndustrialWandRecharge(inventory, te)); - xSize = 176; - ySize = 165; - } + public static final ResourceLocation texture = new ResourceLocation(EMT.TEXTURE_PATH, "textures/guis/wandcharger.png"); - public static final ResourceLocation texture = new ResourceLocation(EMT.TEXTURE_PATH, "textures/guis/wandcharger.png"); + public GuiIndustrialWandRecharger(InventoryPlayer inventory, TileEntityIndustrialWandRecharge te) { + super(new ContainerIndustrialWandRecharge(inventory, te)); + xSize = 176; + ySize = 165; + } - @Override - public void drawGuiContainerBackgroundLayer(float f, int j, int i) { - GL11.glColor4f(1F, 1F, 1F, 1F); - Minecraft.getMinecraft().getTextureManager().bindTexture(texture); - drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - } + @Override + public void drawGuiContainerBackgroundLayer(float f, int j, int i) { + GL11.glColor4f(1F, 1F, 1F, 1F); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + } - protected void drawGuiContainerForegroundLayer(int par1, int par2) { - this.fontRendererObj.drawString(EMTTextHelper.localize("gui.EMT.wandRecharge.title"), 6, 6, 4210752); - this.fontRendererObj.drawString(EMTTextHelper.localize("gui.EMT.inventory"), 8, this.ySize - 96 + 2, 4210752); - } + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + this.fontRendererObj.drawString(EMTTextHelper.localize("gui.EMT.wandRecharge.title"), 6, 6, 4210752); + this.fontRendererObj.drawString(EMTTextHelper.localize("gui.EMT.inventory"), 8, this.ySize - 96 + 2, 4210752); + } } diff --git a/src/main/java/emt/client/gui/GuiSolar.java b/src/main/java/emt/client/gui/GuiSolar.java index 60ede66..e49a98c 100644 --- a/src/main/java/emt/client/gui/GuiSolar.java +++ b/src/main/java/emt/client/gui/GuiSolar.java @@ -10,106 +10,102 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; public class GuiSolar extends GuiContainer { - - private static ResourceLocation tex = new ResourceLocation(EMT.TEXTURE_PATH, "textures/guis/solar.png"); - - TileEntitySolarBase tileentity; - private boolean allowUserInput; - private int xSize; - private int ySize; - private String color; - private int cColor; - - public GuiSolar(InventoryPlayer invPlayer, TileEntitySolarBase entity) { - super(new ContainerSolars(invPlayer, entity)); - this.tileentity = entity; - this.allowUserInput = false; - this.xSize = 194; - this.ySize = 168; - } - @Override - protected void drawGuiContainerBackgroundLayer(float f, int i, int j) - { - color = this.tileentity.getInventoryName().replaceAll("Solar", "").replaceAll("Compressed", "").replaceAll("Triple", "").replaceAll("Double", "").trim(); - if (color != null) - switch (color) - { - case "Aer": { - GL11.glColor4f(1.0f, 0.86f, 0.0f, 1.0f); - break; - } - case "Terra": { - GL11.glColor4f(0.0f, 0.66f, 0.08f, 1.0f); - cColor=8224255; - break; - } - case "Ordo": { - GL11.glColor4f(0.8f, 0.8f, 0.8f, 1.0f); - break; - } - case "Perditio": { - GL11.glColor4f(0.33F, 0.33F, 0.33F, 1.0F); - break; - } - case "Ignis": { - GL11.glColor4f(0.82f, 0.11f, 0.11f, 1.0f); - break; - } - case "Aqua": { - GL11.glColor4f(0.27f, 0.65f, 1.0f, 1.0f); - break; - } - default: { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - break; - } - } - else - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - - - this.mc.renderEngine.bindTexture(tex); - - int h = (this.width - this.xSize) / 2; - int k = (this.height - this.ySize) / 2; - drawTexturedModalRect(h, k, 0, 0, this.xSize, this.ySize); - if (this.tileentity.mp_storage > 0) - { - int l = this.tileentity.gaugeEnergyScaled(33); - drawTexturedModalRect(h + 18, k + 23, 195, 0, l, 14); - } - if (this.tileentity.generating>9) - drawTexturedModalRect(h + 18, k + 42, 195, 20, 11, 14); - } - - @Override - protected void drawGuiContainerForegroundLayer(int par1, int par2) - { - String formatPanelName = I18n.format(this.tileentity.getInventoryName(), new Object[0]); - int nmPos = (this.xSize - this.fontRendererObj.getStringWidth(formatPanelName)) / 2; - - if(!color.equals("Terra")) - this.fontRendererObj.drawStringWithShadow(formatPanelName, 0, 7, 6618118); - else - this.fontRendererObj.drawStringWithShadow(formatPanelName, 0, 7, cColor); - - String storageString = I18n.format("emt.Storage", new Object[0]); - - if (this.tileentity.maxstorage<1000) - this.fontRendererObj.drawString(storageString + this.tileentity.storage + "/" + this.tileentity.maxstorage +"EU", 36, 22, 0); - else if (10000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 10000000) - this.fontRendererObj.drawString(storageString + (this.tileentity.mp_storage) + "/" + (this.tileentity.maxstorage/1000) +"kEU", 36, 22, 0); - else if (10000000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 1000000000) - this.fontRendererObj.drawString(storageString + (this.tileentity.mp_storage/1000) + "/" + (this.tileentity.maxstorage/1000000) +"MEU", 36, 22, 0); - else if (1000000000 <= this.tileentity.maxstorage) - this.fontRendererObj.drawString(storageString + (this.tileentity.mp_storage/1000000) + "/" + (this.tileentity.maxstorage/1000000000) +"GEU", 36, 22, 0); - if(this.tileentity.isActive) - if (Double.toString(this.tileentity.generating).length()>5) - this.fontRendererObj.drawString(I18n.format("emt.Generating",new Object[0])+Double.toString(this.tileentity.generating).substring(0, 4)+" EU/t", 36, 35, 0); - else - this.fontRendererObj.drawString(I18n.format("emt.Generating",new Object[0])+Double.toString(this.tileentity.generating)+" EU/t", 36, 35, 0); - else - this.fontRendererObj.drawString(I18n.format("emt.Generating",new Object[0])+"0 EU/t",36, 35, 0); - } + private static ResourceLocation tex = new ResourceLocation(EMT.TEXTURE_PATH, "textures/guis/solar.png"); + + TileEntitySolarBase tileentity; + private boolean allowUserInput; + private int xSize; + private int ySize; + private String color; + private int cColor; + + public GuiSolar(InventoryPlayer invPlayer, TileEntitySolarBase entity) { + super(new ContainerSolars(invPlayer, entity)); + this.tileentity = entity; + this.allowUserInput = false; + this.xSize = 194; + this.ySize = 168; + } + + @Override + protected void drawGuiContainerBackgroundLayer(float f, int i, int j) { + color = this.tileentity.getInventoryName().replaceAll("Solar", "").replaceAll("Compressed", "").replaceAll("Triple", "").replaceAll("Double", "").trim(); + if (color != null) + switch (color) { + case "Aer": { + GL11.glColor4f(1.0f, 0.86f, 0.0f, 1.0f); + break; + } + case "Terra": { + GL11.glColor4f(0.0f, 0.66f, 0.08f, 1.0f); + cColor = 8224255; + break; + } + case "Ordo": { + GL11.glColor4f(0.8f, 0.8f, 0.8f, 1.0f); + break; + } + case "Perditio": { + GL11.glColor4f(0.33F, 0.33F, 0.33F, 1.0F); + break; + } + case "Ignis": { + GL11.glColor4f(0.82f, 0.11f, 0.11f, 1.0f); + break; + } + case "Aqua": { + GL11.glColor4f(0.27f, 0.65f, 1.0f, 1.0f); + break; + } + default: { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + break; + } + } + else + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + + + this.mc.renderEngine.bindTexture(tex); + + int h = (this.width - this.xSize) / 2; + int k = (this.height - this.ySize) / 2; + drawTexturedModalRect(h, k, 0, 0, this.xSize, this.ySize); + if (this.tileentity.mp_storage > 0) { + int l = this.tileentity.gaugeEnergyScaled(33); + drawTexturedModalRect(h + 18, k + 23, 195, 0, l, 14); + } + if (this.tileentity.generating > 9) + drawTexturedModalRect(h + 18, k + 42, 195, 20, 11, 14); + } + + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + String formatPanelName = I18n.format(this.tileentity.getInventoryName(), new Object[0]); + int nmPos = (this.xSize - this.fontRendererObj.getStringWidth(formatPanelName)) / 2; + + if (!color.equals("Terra")) + this.fontRendererObj.drawStringWithShadow(formatPanelName, 0, 7, 6618118); + else + this.fontRendererObj.drawStringWithShadow(formatPanelName, 0, 7, cColor); + + String storageString = I18n.format("emt.Storage", new Object[0]); + + if (this.tileentity.maxstorage < 1000) + this.fontRendererObj.drawString(storageString + this.tileentity.storage + "/" + this.tileentity.maxstorage + "EU", 36, 22, 0); + else if (10000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 10000000) + this.fontRendererObj.drawString(storageString + (this.tileentity.mp_storage) + "/" + (this.tileentity.maxstorage / 1000) + "kEU", 36, 22, 0); + else if (10000000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 1000000000) + this.fontRendererObj.drawString(storageString + (this.tileentity.mp_storage / 1000) + "/" + (this.tileentity.maxstorage / 1000000) + "MEU", 36, 22, 0); + else if (1000000000 <= this.tileentity.maxstorage) + this.fontRendererObj.drawString(storageString + (this.tileentity.mp_storage / 1000000) + "/" + (this.tileentity.maxstorage / 1000000000) + "GEU", 36, 22, 0); + if (this.tileentity.isActive) +// if (Double.toString(this.tileentity.generating).length()>5) +// this.fontRendererObj.drawString(I18n.format("emt.Generating",new Object[0])+Double.toString(this.tileentity.generating).substring(0, 4)+" EU/t", 36, 35, 0); +// else + this.fontRendererObj.drawString(I18n.format("emt.Generating", new Object[0]) + Double.toString(this.tileentity.generating) + " EU/t", 36, 35, 0); + else + this.fontRendererObj.drawString(I18n.format("emt.Generating", new Object[0]) + "0 EU/t", 36, 35, 0); + } } diff --git a/src/main/java/emt/client/gui/config/EMTGuiConfig.java b/src/main/java/emt/client/gui/config/EMTGuiConfig.java index 5d7bf80..253cba9 100644 --- a/src/main/java/emt/client/gui/config/EMTGuiConfig.java +++ b/src/main/java/emt/client/gui/config/EMTGuiConfig.java @@ -8,27 +8,27 @@ import net.minecraft.util.StatCollector; import net.minecraftforge.common.config.ConfigCategory; import net.minecraftforge.common.config.ConfigElement; -import static emt.util.EMTConfigHandler.*; - import java.util.ArrayList; import java.util.List; import java.util.Locale; +import static emt.util.EMTConfigHandler.*; + public class EMTGuiConfig extends GuiConfig { - public EMTGuiConfig(GuiScreen parentScreen) { - super(parentScreen, getConfigElements(parentScreen), EMT.MOD_ID, false, false, StatCollector.translateToLocal("gui." + EMT.MOD_ID + ".config.title")); - } + public EMTGuiConfig(GuiScreen parentScreen) { + super(parentScreen, getConfigElements(parentScreen), EMT.MOD_ID, false, false, StatCollector.translateToLocal("gui." + EMT.MOD_ID + ".config.title")); + } - @SuppressWarnings("rawtypes") - private static List getConfigElements(GuiScreen parent) { - List list = new ArrayList(); + @SuppressWarnings("rawtypes") + private static List getConfigElements(GuiScreen parent) { + List list = new ArrayList(); - list.add(new ConfigElement(config.getCategory(RANDOM.toLowerCase(Locale.US)))); - list.add(new ConfigElement(config.getCategory(VALUES.toLowerCase(Locale.US)))); - list.add(new ConfigElement(config.getCategory(RESEARCH.toLowerCase(Locale.US)))); - list.add(new ConfigElement(config.getCategory(OUTPUTS.toLowerCase(Locale.US)))); + list.add(new ConfigElement(config.getCategory(RANDOM.toLowerCase(Locale.US)))); + list.add(new ConfigElement(config.getCategory(VALUES.toLowerCase(Locale.US)))); + list.add(new ConfigElement(config.getCategory(RESEARCH.toLowerCase(Locale.US)))); + list.add(new ConfigElement(config.getCategory(OUTPUTS.toLowerCase(Locale.US)))); - return list; - } + return list; + } } diff --git a/src/main/java/emt/client/gui/config/EMTGuiFactory.java b/src/main/java/emt/client/gui/config/EMTGuiFactory.java index 5ef75c6..363f299 100644 --- a/src/main/java/emt/client/gui/config/EMTGuiFactory.java +++ b/src/main/java/emt/client/gui/config/EMTGuiFactory.java @@ -8,23 +8,23 @@ import java.util.Set; public class EMTGuiFactory implements IModGuiFactory { - @Override - public void initialize(Minecraft minecraftInstance) { + @Override + public void initialize(Minecraft minecraftInstance) { - } + } - @Override - public Class mainConfigGuiClass() { - return EMTGuiConfig.class; - } + @Override + public Class mainConfigGuiClass() { + return EMTGuiConfig.class; + } - @Override - public Set runtimeGuiCategories() { - return null; - } + @Override + public Set runtimeGuiCategories() { + return null; + } - @Override - public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) { - return null; - } + @Override + public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) { + return null; + } } diff --git a/src/main/java/emt/client/gui/container/ConainerGenerator.java b/src/main/java/emt/client/gui/container/ConainerGenerator.java index 8d55dda..dcb18dd 100644 --- a/src/main/java/emt/client/gui/container/ConainerGenerator.java +++ b/src/main/java/emt/client/gui/container/ConainerGenerator.java @@ -5,64 +5,89 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import thaumcraft.api.aspects.Aspect; + +import java.util.Locale; public class ConainerGenerator - extends Container -{ - private TileEntityBaseGenerator tileentity; - - public ConainerGenerator(InventoryPlayer inventoryplayer, TileEntityBaseGenerator tileentity) - { - this.tileentity = tileentity; - } - - public void addCraftingToCrafters(ICrafting icrafting) - { - - super.addCraftingToCrafters(icrafting); - icrafting.sendProgressBarUpdate(this, 0, (short) (this.tileentity.generating/400)); - icrafting.sendProgressBarUpdate(this, 1, (byte) this.tileentity.fuel); - icrafting.sendProgressBarUpdate(this, 2, (short) this.tileentity.mpshownstroage); - } - - public void detectAndSendChanges() - { - super.detectAndSendChanges(); - for (int i = 0; i < this.crafters.size(); i++) - { - ICrafting icrafting = (ICrafting)this.crafters.get(i); - - icrafting.sendProgressBarUpdate(this, 0, (short) (this.tileentity.generating/400)); - icrafting.sendProgressBarUpdate(this, 1, (byte) this.tileentity.fuel); - icrafting.sendProgressBarUpdate(this, 2, (short) (this.tileentity.storage/1000)); + extends Container { + private TileEntityBaseGenerator tileentity; + + public ConainerGenerator(InventoryPlayer inventoryplayer, TileEntityBaseGenerator tileentity) { + this.tileentity = tileentity; } - } - - public void updateProgressBar(int i, int j) - { - if (i == 0) { - this.tileentity.generating = (((int)j)*400); + + public void detectAndSendChanges() { + for (int i = 0; i < this.crafters.size(); i++) { + ICrafting icrafting = (ICrafting) this.crafters.get(i); + + icrafting.sendProgressBarUpdate(this, 0, (short) (this.tileentity.generating / 400)); + icrafting.sendProgressBarUpdate(this, 1, (byte) this.tileentity.fuel); + icrafting.sendProgressBarUpdate(this, 2, (short) (this.tileentity.storage / 1000)); + icrafting.sendProgressBarUpdate(this, 3, (byte) encryptAspect(this.tileentity.aspect)); + icrafting.sendProgressBarUpdate(this, 4, (byte) (this.tileentity.isActive ? 1 : 0)); + } } - if (i == 1) { - this.tileentity.fuel=((byte) j); + + private byte encryptAspect(Aspect aspect) { + switch (aspect.getTag().toUpperCase(Locale.US)) { + case "POTENTIA": + return 0; + case "IGNIS": + return 1; + case "AURAM": + return 2; + case "ARBOR": + return 3; + case "AER": + return 4; + case "LUCRUM": + return 5; + } + return 0; } - if (i == 2) { - this.tileentity.mpshownstroage=(short) j; + + public void updateProgressBar(int i, int j) { + if (i == 0) { + this.tileentity.generating = (((int) j) * 400); + } else if (i == 1) { + this.tileentity.fuel = ((byte) j); + } else if (i == 2) { + this.tileentity.mpshownstroage = (short) j; + } else if (i == 3 && this.tileentity.aspect == null) + switch (j) { + case 0: + this.tileentity.aspect = Aspect.ENERGY; + break; + case 1: + this.tileentity.aspect = Aspect.FIRE; + break; + case 2: + this.tileentity.aspect = Aspect.AURA; + break; + case 3: + this.tileentity.aspect = Aspect.TREE; + break; + case 4: + this.tileentity.aspect = Aspect.AIR; + break; + case 5: + this.tileentity.aspect = Aspect.GREED; + break; + } + else if (i == 4) { + this.tileentity.isActive = ((byte) j) == ((byte) 1); + } + } + + + public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) { + return null; + } + + public boolean canInteractWith(EntityPlayer entityplayer) { + this.detectAndSendChanges(); + return this.tileentity.isUseableByPlayer(entityplayer); } - } - - - - public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) - { - return null; - } - - public boolean canInteractWith(EntityPlayer entityplayer) - { - this.detectAndSendChanges(); - return this.tileentity.isUseableByPlayer(entityplayer); - } } \ No newline at end of file diff --git a/src/main/java/emt/client/gui/container/ContainerEtheralMacerator.java b/src/main/java/emt/client/gui/container/ContainerEtheralMacerator.java index 46d85e7..a558e89 100644 --- a/src/main/java/emt/client/gui/container/ContainerEtheralMacerator.java +++ b/src/main/java/emt/client/gui/container/ContainerEtheralMacerator.java @@ -12,77 +12,72 @@ import thaumcraft.common.container.SlotOutput; public class ContainerEtheralMacerator extends Container { - TileEntityEtherealMacerator te; + TileEntityEtherealMacerator te; - public ContainerEtheralMacerator(InventoryPlayer inventory, TileEntity te) { - this.te = ((TileEntityEtherealMacerator) te); - addSlotToContainer(new Slot(this.te, 0, 56, 26)); - addSlotToContainer(new SlotOutput(this.te, 2, 116, 26)); - addSlotToContainer(new SlotOutput(this.te, 1, 116, 53)); - for (int i = 0; i < 3; i++) { - for (int j = 0; j < 9; j++) { - addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); - } - } - for (int i = 0; i < 9; i++) { - addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 142)); - } - } + public ContainerEtheralMacerator(InventoryPlayer inventory, TileEntity te) { + this.te = ((TileEntityEtherealMacerator) te); + addSlotToContainer(new Slot(this.te, 0, 56, 26)); + addSlotToContainer(new SlotOutput(this.te, 2, 116, 26)); + addSlotToContainer(new SlotOutput(this.te, 1, 116, 53)); + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 9; j++) { + addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + for (int i = 0; i < 9; i++) { + addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 142)); + } + } - @Override - public boolean canInteractWith(EntityPlayer player) { - return this.te.isUseableByPlayer(player); - } + @Override + public boolean canInteractWith(EntityPlayer player) { + return this.te.isUseableByPlayer(player); + } - @Override - public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) { - ItemStack itemstack = null; - Slot slot = (Slot) this.inventorySlots.get(par2); + @Override + public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) { + ItemStack itemstack = null; + Slot slot = (Slot) this.inventorySlots.get(par2); - if (slot != null && slot.getHasStack()) { - ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); - if (par2 == 1) { - if (!this.mergeItemStack(itemstack1, 2, 38, true)) { - return null; - } + if (par2 == 1) { + if (!this.mergeItemStack(itemstack1, 2, 38, true)) { + return null; + } - slot.onSlotChange(itemstack1, itemstack); - } - else if (par2 != 0) { - if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null) { - if (!this.mergeItemStack(itemstack1, 0, 1, false)) { - return null; - } - } - else if (par2 >= 2 && par2 < 29) { - if (!this.mergeItemStack(itemstack1, 29, 38, false)) { - return null; - } - } - else if (par2 >= 29 && par2 < 38 && !this.mergeItemStack(itemstack1, 2, 29, false)) { - return null; - } - } - else if (!this.mergeItemStack(itemstack1, 3, 38, false)) { - return null; - } + slot.onSlotChange(itemstack1, itemstack); + } else if (par2 != 0) { + if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null) { + if (!this.mergeItemStack(itemstack1, 0, 1, false)) { + return null; + } + } else if (par2 >= 2 && par2 < 29) { + if (!this.mergeItemStack(itemstack1, 29, 38, false)) { + return null; + } + } else if (par2 >= 29 && par2 < 38 && !this.mergeItemStack(itemstack1, 2, 29, false)) { + return null; + } + } else if (!this.mergeItemStack(itemstack1, 3, 38, false)) { + return null; + } - if (itemstack1.stackSize == 0) { - slot.putStack((ItemStack) null); - } - else { - slot.onSlotChanged(); - } + if (itemstack1.stackSize == 0) { + slot.putStack((ItemStack) null); + } else { + slot.onSlotChanged(); + } - if (itemstack1.stackSize == itemstack.stackSize) { - return null; - } + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } - slot.onPickupFromSlot(par1EntityPlayer, itemstack1); - } + slot.onPickupFromSlot(par1EntityPlayer, itemstack1); + } - return itemstack; - } + return itemstack; + } } diff --git a/src/main/java/emt/client/gui/container/ContainerIndustrialWandRecharge.java b/src/main/java/emt/client/gui/container/ContainerIndustrialWandRecharge.java index 6aa26b3..a64abcb 100644 --- a/src/main/java/emt/client/gui/container/ContainerIndustrialWandRecharge.java +++ b/src/main/java/emt/client/gui/container/ContainerIndustrialWandRecharge.java @@ -9,63 +9,61 @@ import net.minecraft.item.ItemStack; public class ContainerIndustrialWandRecharge extends Container { - TileEntityIndustrialWandRecharge charger; + TileEntityIndustrialWandRecharge charger; - public ContainerIndustrialWandRecharge(InventoryPlayer invPlayer, TileEntityIndustrialWandRecharge entity) { - this.charger = entity; + public ContainerIndustrialWandRecharge(InventoryPlayer invPlayer, TileEntityIndustrialWandRecharge entity) { + this.charger = entity; - for (int x = 0; x < 9; x++) { - this.addSlotToContainer(new Slot(invPlayer, x, 8 + x * 18, 142)); - } + for (int x = 0; x < 9; x++) { + this.addSlotToContainer(new Slot(invPlayer, x, 8 + x * 18, 142)); + } - for (int y = 0; y < 3; y++) { - for (int x = 0; x < 9; x++) { - this.addSlotToContainer(new Slot(invPlayer, 9 + x + y * 9, 8 + x * 18, 84 + y * 18)); - } - } + for (int y = 0; y < 3; y++) { + for (int x = 0; x < 9; x++) { + this.addSlotToContainer(new Slot(invPlayer, 9 + x + y * 9, 8 + x * 18, 84 + y * 18)); + } + } - this.addSlotToContainer(new Slot(charger, 0, 80, 35)); - } + this.addSlotToContainer(new Slot(charger, 0, 80, 35)); + } - @Override - public boolean canInteractWith(EntityPlayer player) { - return charger.isUseableByPlayer(player); - } + @Override + public boolean canInteractWith(EntityPlayer player) { + return charger.isUseableByPlayer(player); + } - @Override - public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) { - ItemStack itemstack = null; - Slot slot = (Slot) this.inventorySlots.get(par2); + @Override + public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) { + ItemStack itemstack = null; + Slot slot = (Slot) this.inventorySlots.get(par2); - if (slot != null && slot.getHasStack()) { - ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); - if (par2 == 36) { - if (!this.mergeItemStack(itemstack1, 0, 35, false)) { - return null; - } + if (par2 == 36) { + if (!this.mergeItemStack(itemstack1, 0, 35, false)) { + return null; + } - slot.onSlotChange(itemstack1, itemstack); - } - else if (!charger.isItemValidForSlot(0, itemstack1) || !this.mergeItemStack(itemstack1, 36, 37, false)) { - return null; - } + slot.onSlotChange(itemstack1, itemstack); + } else if (!charger.isItemValidForSlot(0, itemstack1) || !this.mergeItemStack(itemstack1, 36, 37, false)) { + return null; + } - if (itemstack1.stackSize == 0) { - slot.putStack((ItemStack) null); - } - else { - slot.onSlotChanged(); - } + if (itemstack1.stackSize == 0) { + slot.putStack((ItemStack) null); + } else { + slot.onSlotChanged(); + } - if (itemstack1.stackSize == itemstack.stackSize) { - return null; - } + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } - slot.onPickupFromSlot(par1EntityPlayer, itemstack1); - } + slot.onPickupFromSlot(par1EntityPlayer, itemstack1); + } - return itemstack; - } + return itemstack; + } } diff --git a/src/main/java/emt/client/gui/container/ContainerSolars.java b/src/main/java/emt/client/gui/container/ContainerSolars.java index 0461dbb..79e19b1 100644 --- a/src/main/java/emt/client/gui/container/ContainerSolars.java +++ b/src/main/java/emt/client/gui/container/ContainerSolars.java @@ -7,66 +7,53 @@ import net.minecraft.inventory.Container; import net.minecraft.inventory.ICrafting; import net.minecraft.item.ItemStack; -public class ContainerSolars - extends Container -{ - private TileEntitySolarBase tileentity; - - public ContainerSolars(InventoryPlayer inventoryplayer, TileEntitySolarBase tileentity) - { - this.tileentity = tileentity; - } - - public void addCraftingToCrafters(ICrafting icrafting) - { - super.addCraftingToCrafters(icrafting); - icrafting.sendProgressBarUpdate(this, 0, (short) this.tileentity.generating); - icrafting.sendProgressBarUpdate(this, 1, (short) this.tileentity.mp_storage); - } - - public void detectAndSendChanges() - { - super.detectAndSendChanges(); - short help = 0; - if (this.tileentity.generating < 326D && this.tileentity.generating > 9D) - help = (short) (this.tileentity.generating*100*-1); - else - help = (short) (this.tileentity.generating); - - for (int i = 0; i < this.crafters.size(); i++) - { - ICrafting icrafting = (ICrafting)this.crafters.get(i); - - icrafting.sendProgressBarUpdate(this, 0, help); - icrafting.sendProgressBarUpdate(this, 1, (short) (this.tileentity.getSourceStored()/1000)); - } - } - - public void updateProgressBar(int i, int j) - { +import java.nio.ByteBuffer; - if (i == 0) { - if (j < 0) { - double help= j; - help=help/100*-1; - this.tileentity.generating = help; - } - else - this.tileentity.generating=j; +public class ContainerSolars + extends Container { + byte[] generating = new byte[8]; + byte[] mpStorage = new byte[8]; + private TileEntitySolarBase tileentity; + + public ContainerSolars(InventoryPlayer inventoryplayer, TileEntitySolarBase tileentity) { + this.tileentity = tileentity; } - if (i == 1) { - this.tileentity.mp_storage = (short) (j); + + public void detectAndSendChanges() { + byte[] generating = ByteBuffer.allocate(8).putDouble(this.tileentity.generating).array(); + byte[] mpStorage = ByteBuffer.allocate(8).putDouble(this.tileentity.getSourceStored() / 1000).array(); + for (int i = 0; i < this.crafters.size(); i++) { + ICrafting icrafting = (ICrafting) this.crafters.get(i); + + for (int j = 0; j < generating.length; j++) { + icrafting.sendProgressBarUpdate(this, j, generating[j]); + } + + for (int j = 0; j < mpStorage.length; j++) { + icrafting.sendProgressBarUpdate(this, 8 + j, mpStorage[j]); + } + } + } + + public void updateProgressBar(int i, int j) { + if (i < 8) { + generating[i] = (byte) j; + if (i == 7) + this.tileentity.generating = ByteBuffer.wrap(generating).getDouble(); + } + if (i > 7 && i < 16) { + mpStorage[i - 8] = (byte) j; + if (i == 15) + this.tileentity.mp_storage = (long) ByteBuffer.wrap(mpStorage).getDouble(); + } + } + + public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) { + return null; + } + + public boolean canInteractWith(EntityPlayer entityplayer) { + this.detectAndSendChanges(); + return this.tileentity.isUseableByPlayer(entityplayer); } - } - - public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) - { - return null; - } - - public boolean canInteractWith(EntityPlayer entityplayer) - { - this.detectAndSendChanges(); - return this.tileentity.isUseableByPlayer(entityplayer); - } } \ No newline at end of file diff --git a/src/main/java/emt/client/model/ModelSpecialArmor.java b/src/main/java/emt/client/model/ModelSpecialArmor.java index f475018..798c640 100644 --- a/src/main/java/emt/client/model/ModelSpecialArmor.java +++ b/src/main/java/emt/client/model/ModelSpecialArmor.java @@ -10,111 +10,111 @@ import net.minecraft.item.EnumAction; @SideOnly(Side.CLIENT) public class ModelSpecialArmor extends ModelBiped { - public ModelRenderer rightWing; - public ModelRenderer leftWing; - public ModelRenderer center; - public ModelRenderer jetpack; - public boolean isJumping; - public int type = 0;// 0 - Nothing, 1 - Jetpack, 2 - Wings + public ModelRenderer rightWing; + public ModelRenderer leftWing; + public ModelRenderer center; + public ModelRenderer jetpack; + public boolean isJumping; + public int type = 0;// 0 - Nothing, 1 - Jetpack, 2 - Wings - public ModelSpecialArmor() { - this(1, 0); - } + public ModelSpecialArmor() { + this(1, 0); + } - public ModelSpecialArmor(float scale, int type) { - this(scale, 0.0F, type); - } + public ModelSpecialArmor(float scale, int type) { + this(scale, 0.0F, type); + } - public ModelSpecialArmor(float scale, float offset, int type) { - super(scale, offset, type == 1? 128 : 64, type == 0? 32 : type == 1? 96 : 64); - this.type = type; - switch (this.type) { - case 1: - this.textureWidth = 128; - this.textureHeight = 96; - this.jetpack = new ModelRenderer(this, 16, 69); - this.jetpack.setTextureSize(64, 48); - this.jetpack.addBox(-4.0F, -12.0F, -2.0F, 8, 12 * 2, 4, scale * 2); - this.jetpack.setRotationPoint(0.0F, 0.0F + offset, 0.0F); - break; + public ModelSpecialArmor(float scale, float offset, int type) { + super(scale, offset, type == 1 ? 128 : 64, type == 0 ? 32 : type == 1 ? 96 : 64); + this.type = type; + switch (this.type) { + case 1: + this.textureWidth = 128; + this.textureHeight = 96; + this.jetpack = new ModelRenderer(this, 16, 69); + this.jetpack.setTextureSize(64, 48); + this.jetpack.addBox(-4.0F, -12.0F, -2.0F, 8, 12 * 2, 4, scale * 2); + this.jetpack.setRotationPoint(0.0F, 0.0F + offset, 0.0F); + break; - case 2: - this.textureWidth = 64; - this.textureHeight = 64; - rightWing = new ModelRenderer(this, 24, 0 + 32); - rightWing.addBox(-11F, -1F, 0F, 11, 13, 1); - rightWing.setRotationPoint(-2F, 0F, 3F); - rightWing.setTextureSize(64, 32); - rightWing.mirror = false; - setRotation(rightWing, 0F, 0.1570796F, 0F); - - leftWing = new ModelRenderer(this, 0, 0 + 32); - leftWing.addBox(0F, -1F, 0F, 11, 13, 1); - leftWing.setRotationPoint(2F, 0F, 3F); - leftWing.setTextureSize(64, 32); - leftWing.mirror = true; - setRotation(leftWing, 0F, -0.1570796F, 0F); + case 2: + this.textureWidth = 64; + this.textureHeight = 64; + rightWing = new ModelRenderer(this, 24, 0 + 32); + rightWing.addBox(-11F, -1F, 0F, 11, 13, 1); + rightWing.setRotationPoint(-2F, 0F, 3F); + rightWing.setTextureSize(64, 32); + rightWing.mirror = false; + setRotation(rightWing, 0F, 0.1570796F, 0F); - center = new ModelRenderer(this, 0, 14 + 32); - center.addBox(0F, 0F, 1F, 8, 14, 1); - center.setRotationPoint(-4F, 0F, 3F); - center.setTextureSize(64, 32); - center.mirror = true; - setRotation(center, 0F, 0F, 0F); - break; - } - } + leftWing = new ModelRenderer(this, 0, 0 + 32); + leftWing.addBox(0F, -1F, 0F, 11, 13, 1); + leftWing.setRotationPoint(2F, 0F, 3F); + leftWing.setTextureSize(64, 32); + leftWing.mirror = true; + setRotation(leftWing, 0F, -0.1570796F, 0F); - private void setRotation(ModelRenderer model, float x, float y, float z) { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } + center = new ModelRenderer(this, 0, 14 + 32); + center.addBox(0F, 0F, 1F, 8, 14, 1); + center.setRotationPoint(-4F, 0F, 3F); + center.setTextureSize(64, 32); + center.mirror = true; + setRotation(center, 0F, 0F, 0F); + break; + } + } - public void render(Entity entity, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale) { - EntityPlayer player = (EntityPlayer)entity; - this.heldItemRight = player.inventory.getCurrentItem() != null? 1 : 0; - this.isRiding = player.isRiding(); - this.isSneak = player.isSneaking(); - this.aimedBow = player.inventory.getCurrentItem() != null && player.inventory.getCurrentItem().getItem().getItemUseAction(player.inventory.getCurrentItem()) == EnumAction.bow && player.isUsingItem(); - this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale, entity); + private void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } - this.bipedBody.render(scale); - this.bipedRightArm.render(scale); - this.bipedLeftArm.render(scale); - switch (this.type) { - case 1: - this.jetpack.render(scale); - break; - case 2: - this.center.render(scale); - this.leftWing.render(scale); - this.rightWing.render(scale); - } + public void render(Entity entity, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale) { + EntityPlayer player = (EntityPlayer) entity; + this.heldItemRight = player.inventory.getCurrentItem() != null ? 1 : 0; + this.isRiding = player.isRiding(); + this.isSneak = player.isSneaking(); + this.aimedBow = player.inventory.getCurrentItem() != null && player.inventory.getCurrentItem().getItem().getItemUseAction(player.inventory.getCurrentItem()) == EnumAction.bow && player.isUsingItem(); + this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale, entity); - } + this.bipedBody.render(scale); + this.bipedRightArm.render(scale); + this.bipedLeftArm.render(scale); + switch (this.type) { + case 1: + this.jetpack.render(scale); + break; + case 2: + this.center.render(scale); + this.leftWing.render(scale); + this.rightWing.render(scale); + } - public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity entity) { - super.setRotationAngles(p_78087_1_, p_78087_2_, p_78087_3_, p_78087_4_, p_78087_5_, p_78087_6_, entity); - if (this.isJumping) { - this.rightWing.rotateAngleY = 0.5f; - this.leftWing.rotateAngleY = -0.5f; - } + } - if (this.isSneak) { - switch (this.type) { - case 1: - this.jetpack.rotateAngleX = 0.5F; - break; - case 2: - this.center.offsetY -= 0.1; - this.rightWing.offsetY -= 0.1; - this.leftWing.offsetY -= 0.1; - this.center.rotateAngleX = 0.5F; - this.rightWing.rotateAngleX = 0.5F; - this.leftWing.rotateAngleX = 0.5F; - break; - } - } - } + public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity entity) { + super.setRotationAngles(p_78087_1_, p_78087_2_, p_78087_3_, p_78087_4_, p_78087_5_, p_78087_6_, entity); + if (this.isJumping) { + this.rightWing.rotateAngleY = 0.5f; + this.leftWing.rotateAngleY = -0.5f; + } + + if (this.isSneak) { + switch (this.type) { + case 1: + this.jetpack.rotateAngleX = 0.5F; + break; + case 2: + this.center.offsetY -= 0.1; + this.rightWing.offsetY -= 0.1; + this.leftWing.offsetY -= 0.1; + this.center.rotateAngleX = 0.5F; + this.rightWing.rotateAngleX = 0.5F; + this.leftWing.rotateAngleX = 0.5F; + break; + } + } + } } \ No newline at end of file diff --git a/src/main/java/emt/client/model/ModelWings.java b/src/main/java/emt/client/model/ModelWings.java index b2d215c..66ef90a 100644 --- a/src/main/java/emt/client/model/ModelWings.java +++ b/src/main/java/emt/client/model/ModelWings.java @@ -6,70 +6,69 @@ import net.minecraft.entity.Entity; public class ModelWings extends ModelBiped { - ModelRenderer rightWing; - ModelRenderer leftWing; - ModelRenderer center; + public boolean isJumping = false; + ModelRenderer rightWing; + ModelRenderer leftWing; + ModelRenderer center; - public boolean isJumping = false; + public ModelWings() { + textureWidth = 64; + textureHeight = 64; - public ModelWings() { - textureWidth = 64; - textureHeight = 64; + rightWing = new ModelRenderer(this, 24, 0); + rightWing.addBox(-11F, -1F, -1.5F, 11, 13, 1); + rightWing.setRotationPoint(-2F, 0F, 3F); + rightWing.setTextureSize(64, 32); + rightWing.mirror = false; + setRotation(rightWing, 0F, 0.1570796F, 0F); - rightWing = new ModelRenderer(this, 24, 0); - rightWing.addBox(-11F, -1F, -1.5F, 11, 13, 1); - rightWing.setRotationPoint(-2F, 0F, 3F); - rightWing.setTextureSize(64, 32); - rightWing.mirror = false; - setRotation(rightWing, 0F, 0.1570796F, 0F); + leftWing = new ModelRenderer(this, 0, 0); + leftWing.addBox(0F, -1F, -1.5F, 11, 13, 1); + leftWing.setRotationPoint(2F, 0F, 3F); + leftWing.setTextureSize(64, 32); + leftWing.mirror = true; + setRotation(leftWing, 0F, -0.1570796F, 0F); - leftWing = new ModelRenderer(this, 0, 0); - leftWing.addBox(0F, -1F, -1.5F, 11, 13, 1); - leftWing.setRotationPoint(2F, 0F, 3F); - leftWing.setTextureSize(64, 32); - leftWing.mirror = true; - setRotation(leftWing, 0F, -0.1570796F, 0F); + center = new ModelRenderer(this, 0, 14); + center.addBox(0F, 0F, -0.5F, 8, 14, 1); + center.setRotationPoint(-4F, 0F, 3F); + center.setTextureSize(64, 32); + center.mirror = true; + setRotation(center, 0F, 0F, 0F); - center = new ModelRenderer(this, 0, 14); - center.addBox(0F, 0F, -0.5F, 8, 14, 1); - center.setRotationPoint(-4F, 0F, 3F); - center.setTextureSize(64, 32); - center.mirror = true; - setRotation(center, 0F, 0F, 0F); + this.bipedBody.addChild(rightWing); + this.bipedBody.addChild(leftWing); + this.bipedBody.addChild(center); + } - this.bipedBody.addChild(rightWing); - this.bipedBody.addChild(leftWing); - this.bipedBody.addChild(center); - } + @Override + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + this.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + rightWing.render(f5); + leftWing.render(f5); + center.render(f5); + } - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - this.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - rightWing.render(f5); - leftWing.render(f5); - center.render(f5); - } + private void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } - private void setRotation(ModelRenderer model, float x, float y, float z) { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } + public void setRotationAngles(float f, float f1, float pt, float f3, float f4, float f5, Entity entity) { - public void setRotationAngles(float f, float f1, float pt, float f3, float f4, float f5, Entity entity) { + if (isJumping) { + this.rightWing.rotateAngleY = 0.5f; + this.leftWing.rotateAngleY = -0.5f; + } - if (isJumping) { - this.rightWing.rotateAngleY = 0.5f; - this.leftWing.rotateAngleY = -0.5f; - } - - if (entity.isSneaking()) { - this.center.offsetY -= 0.1; - this.rightWing.offsetY -= 0.1; - this.leftWing.offsetY -= 0.1; - this.center.rotateAngleX = 0.5F; - this.rightWing.rotateAngleX = 0.5F; - this.leftWing.rotateAngleX = 0.5F; - } - } + if (entity.isSneaking()) { + this.center.offsetY -= 0.1; + this.rightWing.offsetY -= 0.1; + this.leftWing.offsetY -= 0.1; + this.center.rotateAngleX = 0.5F; + this.rightWing.rotateAngleX = 0.5F; + this.leftWing.rotateAngleX = 0.5F; + } + } } diff --git a/src/main/java/emt/client/renderer/RenderLaser.java b/src/main/java/emt/client/renderer/RenderLaser.java index 854b057..bbd7cba 100644 --- a/src/main/java/emt/client/renderer/RenderLaser.java +++ b/src/main/java/emt/client/renderer/RenderLaser.java @@ -1,5 +1,7 @@ package emt.client.renderer; +import emt.EMT; +import emt.entity.EntityLaser; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; @@ -7,63 +9,60 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import emt.EMT; -import emt.entity.EntityLaser; - public class RenderLaser extends Render { - private static final ResourceLocation laserTexture = new ResourceLocation(EMT.TEXTURE_PATH, "textures/models/lasermodel.png"); + private static final ResourceLocation laserTexture = new ResourceLocation(EMT.TEXTURE_PATH, "textures/models/lasermodel.png"); - @Override - public void doRender(Entity entityLaser, double x, double y, double z, float par8, float pTick) { - this.bindEntityTexture(entityLaser); - GL11.glPushMatrix(); - GL11.glTranslated(x, y, z); - GL11.glRotatef(entityLaser.rotationYaw - 90, 0, 1, 0); - GL11.glRotatef(entityLaser.rotationPitch, 0, 0, 1); - Tessellator tess = Tessellator.instance; - byte b0 = 0; - float f2 = 0.4f; - float f3 = 0.7f; - float f4 = (float) (0 + b0 * 10) / 32f; - float f5 = (float) (5 + b0 * 10) / 32f; - float f10 = 0.05625F; - GL11.glEnable(GL12.GL_RESCALE_NORMAL); + @Override + public void doRender(Entity entityLaser, double x, double y, double z, float par8, float pTick) { + this.bindEntityTexture(entityLaser); + GL11.glPushMatrix(); + GL11.glTranslated(x, y, z); + GL11.glRotatef(entityLaser.rotationYaw - 90, 0, 1, 0); + GL11.glRotatef(entityLaser.rotationPitch, 0, 0, 1); + Tessellator tess = Tessellator.instance; + byte b0 = 0; + float f2 = 0.4f; + float f3 = 0.7f; + float f4 = (float) (0 + b0 * 10) / 32f; + float f5 = (float) (5 + b0 * 10) / 32f; + float f10 = 0.05625F; + GL11.glEnable(GL12.GL_RESCALE_NORMAL); - GL11.glRotatef(45, 1, 0, 0); - GL11.glScalef(f10, f10, f10); - GL11.glTranslatef(-4, 0, 0); - GL11.glPushAttrib(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_LIGHTING); + GL11.glRotatef(45, 1, 0, 0); + GL11.glScalef(f10, f10, f10); + GL11.glTranslatef(-4, 0, 0); + GL11.glPushAttrib(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_LIGHTING); - for (int i = 0; i < 4; ++i) { - GL11.glRotatef(90, 1, 0, 0); - GL11.glNormal3f(0, 0, f10); - tess.startDrawingQuads(); - tess.addVertexWithUV(-8, 0, 0, f2, f4); - tess.addVertexWithUV(8, 0, 0, f3, f4); - tess.addVertexWithUV(8, 4, 0, f3, f5); - tess.addVertexWithUV(-8, 4, 0, f2, f5); - tess.draw(); - - tess.startDrawingQuads(); - tess.addVertexWithUV(8, 0, 0, f2, f4); - tess.addVertexWithUV(-8, 0, 0, f3, f4); - tess.addVertexWithUV(-8, 4, 0, f3, f5); - tess.addVertexWithUV(8, 4, 0, f2, f5); - tess.draw(); - } - GL11.glPopAttrib(); - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - GL11.glPopMatrix(); - } + for (int i = 0; i < 4; ++i) { + GL11.glRotatef(90, 1, 0, 0); + GL11.glNormal3f(0, 0, f10); + tess.startDrawingQuads(); + tess.addVertexWithUV(-8, 0, 0, f2, f4); + tess.addVertexWithUV(8, 0, 0, f3, f4); + tess.addVertexWithUV(8, 4, 0, f3, f5); + tess.addVertexWithUV(-8, 4, 0, f2, f5); + tess.draw(); - protected ResourceLocation getArrowTextures(EntityLaser entityLaser) { - return laserTexture; - } + tess.startDrawingQuads(); + tess.addVertexWithUV(8, 0, 0, f2, f4); + tess.addVertexWithUV(-8, 0, 0, f3, f4); + tess.addVertexWithUV(-8, 4, 0, f3, f5); + tess.addVertexWithUV(8, 4, 0, f2, f5); + tess.draw(); + } + GL11.glPopAttrib(); + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + GL11.glPopMatrix(); + } - @Override - protected ResourceLocation getEntityTexture(Entity entity) { - return this.getArrowTextures((EntityLaser) entity); - } + protected ResourceLocation getArrowTextures(EntityLaser entityLaser) { + return laserTexture; + } + + @Override + protected ResourceLocation getEntityTexture(Entity entity) { + return this.getArrowTextures((EntityLaser) entity); + } } diff --git a/src/main/java/emt/client/renderer/RenderShield.java b/src/main/java/emt/client/renderer/RenderShield.java index 271127e..2fe0e05 100644 --- a/src/main/java/emt/client/renderer/RenderShield.java +++ b/src/main/java/emt/client/renderer/RenderShield.java @@ -1,10 +1,5 @@ package emt.client.renderer; -import static org.lwjgl.opengl.GL11.*; - -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; - import emt.EMT; import emt.entity.EntityShield; import net.minecraft.client.Minecraft; @@ -14,86 +9,90 @@ import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + +import static org.lwjgl.opengl.GL11.*; public class RenderShield extends Render { - private static final ResourceLocation shieldTexture = new ResourceLocation(EMT.TEXTURE_PATH, "textures/models/shield.png"); - static int glCallList; + private static final ResourceLocation shieldTexture = new ResourceLocation(EMT.TEXTURE_PATH, "textures/models/shield.png"); + static int glCallList; - static { - glCallList = GLAllocation.generateDisplayLists(3); - GL11.glPushMatrix(); - GL11.glNewList(glCallList, GL11.GL_COMPILE); + static { + glCallList = GLAllocation.generateDisplayLists(3); + GL11.glPushMatrix(); + GL11.glNewList(glCallList, GL11.GL_COMPILE); - Tessellator tessellator = Tessellator.instance; + Tessellator tessellator = Tessellator.instance; - float sin1; - float cos1; + float sin1; + float cos1; - float sin2; - float cos2; + float sin2; + float cos2; - float hsin1 = -1; - float hcos1 = 0; + float hsin1 = -1; + float hcos1 = 0; - float hsin2; - float hcos2; + float hsin2; + float hcos2; - tessellator.startDrawingQuads(); - for (float h = -90; h < 90; h += 15) { - sin1 = 0; - cos1 = 1; + tessellator.startDrawingQuads(); + for (float h = -90; h < 90; h += 15) { + sin1 = 0; + cos1 = 1; - hsin2 = MathHelper.sin((float) Math.toRadians(h + 15)); - hcos2 = MathHelper.cos((float) Math.toRadians(h + 15)); + hsin2 = MathHelper.sin((float) Math.toRadians(h + 15)); + hcos2 = MathHelper.cos((float) Math.toRadians(h + 15)); - for (float angle = 0; angle < 360; angle += 15) { - sin2 = MathHelper.sin((float) Math.toRadians(angle + 15)); - cos2 = MathHelper.cos((float) Math.toRadians(angle + 15)); + for (float angle = 0; angle < 360; angle += 15) { + sin2 = MathHelper.sin((float) Math.toRadians(angle + 15)); + cos2 = MathHelper.cos((float) Math.toRadians(angle + 15)); - tessellator.addVertexWithUV(sin1 * hcos1 * 2, hsin1 * 2, cos1 * hcos1 * 2, 1, 1); - tessellator.addVertexWithUV(sin1 * hcos2 * 2, hsin2 * 2, cos1 * hcos2 * 2, 1, 0); - tessellator.addVertexWithUV(sin2 * hcos2 * 2, hsin2 * 2, cos2 * hcos2 * 2, 0, 0); - tessellator.addVertexWithUV(sin2 * hcos1 * 2, hsin1 * 2, cos2 * hcos1 * 2, 0, 1); + tessellator.addVertexWithUV(sin1 * hcos1 * 2, hsin1 * 2, cos1 * hcos1 * 2, 1, 1); + tessellator.addVertexWithUV(sin1 * hcos2 * 2, hsin2 * 2, cos1 * hcos2 * 2, 1, 0); + tessellator.addVertexWithUV(sin2 * hcos2 * 2, hsin2 * 2, cos2 * hcos2 * 2, 0, 0); + tessellator.addVertexWithUV(sin2 * hcos1 * 2, hsin1 * 2, cos2 * hcos1 * 2, 0, 1); - sin1 = sin2; - cos1 = cos2; - } + sin1 = sin2; + cos1 = cos2; + } - hsin1 = hsin2; - hcos1 = hcos2; - } - tessellator.draw(); + hsin1 = hsin2; + hcos1 = hcos2; + } + tessellator.draw(); - GL11.glEndList(); - } + GL11.glEndList(); + } - @Override - public void doRender(Entity entityShield, double x, double y, double z, float par8, float par9) { - this.bindEntityTexture(entityShield); + @Override + public void doRender(Entity entityShield, double x, double y, double z, float par8, float par9) { + this.bindEntityTexture(entityShield); - glEnable(GL_ALPHA_TEST); - glAlphaFunc(GL_GREATER, 0); - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glPushAttrib(GL_LIGHTING); - glDisable(GL_LIGHTING); - glDisable(GL_CULL_FACE); + glEnable(GL_ALPHA_TEST); + glAlphaFunc(GL_GREATER, 0); + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glPushAttrib(GL_LIGHTING); + glDisable(GL_LIGHTING); + glDisable(GL_CULL_FACE); - glPushMatrix(); - if (((EntityShield) entityShield).owner != null && !Minecraft.getMinecraft().thePlayer.getDisplayName().equals(((EntityShield) entityShield).owner.getDisplayName())) { - glTranslated(x, y, z); - } + glPushMatrix(); + if (((EntityShield) entityShield).owner != null && !Minecraft.getMinecraft().thePlayer.getDisplayName().equals(((EntityShield) entityShield).owner.getDisplayName())) { + glTranslated(x, y, z); + } - glCallList(this.glCallList); + glCallList(this.glCallList); - glPopMatrix(); - glPopAttrib(); - glDisable(GL12.GL_RESCALE_NORMAL); - } + glPopMatrix(); + glPopAttrib(); + glDisable(GL12.GL_RESCALE_NORMAL); + } - @Override - protected ResourceLocation getEntityTexture(Entity texture) { - return shieldTexture; - } + @Override + protected ResourceLocation getEntityTexture(Entity texture) { + return shieldTexture; + } } diff --git a/src/main/java/emt/command/CommandOutputs.java b/src/main/java/emt/command/CommandOutputs.java index a4155d1..e34a3eb 100644 --- a/src/main/java/emt/command/CommandOutputs.java +++ b/src/main/java/emt/command/CommandOutputs.java @@ -17,6 +17,65 @@ import java.util.List; public class CommandOutputs extends CommandBase { + public static ItemStack mkbook() { + String text = EMTTextHelper.localize("gui.EMT.book.aspect.output.essentia.eu") + ": \n"; + String text2 = EMTTextHelper.localize("gui.EMT.book.aspect.output.essentia.eu") + " /t: \n"; + String text3 = EMTTextHelper.localize("gui.EMT.book.aspect.output.essentia.eu") + " /t singleblock: \n"; + + final String title = EMTTextHelper.localize("gui.EMT.book.aspect.output.eu.title"); + + final ArrayList singleblock = new ArrayList(); + final ArrayList bookL = new ArrayList(); + final ArrayList bookL2 = new ArrayList(); + + byte counter = 0; + + for (final Aspect aspect : Aspect.aspects.values()) { + ++counter; + + if (aspect.equals(Aspect.ENERGY) || aspect.equals(Aspect.TREE) || aspect.equals(Aspect.FIRE) || aspect.equals(Aspect.AURA) || aspect.equals(Aspect.GREED) || aspect.equals(Aspect.AIR)) + text3 += aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag()) / 20D / 20D) + "EU\n"; + + if (counter < 12) { + text2 += aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag()) / 20D) + "EU/t\n"; + text += aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag())) + "EU\n"; + } else { + text2 += aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag()) / 20D) + "EU\n"; + text += aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag())) + "EU\n"; + bookL.add(text); + bookL2.add(text2); + text2 = ""; + text = ""; + counter = 0; + } + } + + singleblock.add(text3); + + if (counter != 0) { + bookL.add(text); + bookL2.add(text2); + } + + final ItemStack book = new ItemStack(Items.written_book); + book.setTagInfo("author", new NBTTagString("Tombenpotter, bartimaeusnek")); + book.setTagInfo("title", new NBTTagString(title)); + final NBTTagCompound nbttagcompound = book.getTagCompound(); + final NBTTagList bookPages = new NBTTagList(); + + for (int i = 0; i < singleblock.size(); i++) { + bookPages.appendTag(new NBTTagString(singleblock.get(i))); + } + for (int i = 0; i < bookL.size(); i++) { + bookPages.appendTag(new NBTTagString(bookL.get(i))); + } + for (int i = 0; i < bookL2.size(); i++) { + bookPages.appendTag(new NBTTagString(bookL2.get(i))); + } + nbttagcompound.setTag("pages", bookPages); + return book; + } + @Override public String getCommandName() { return "emt_outputs"; @@ -54,64 +113,4 @@ public class CommandOutputs extends CommandBase { command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()).entityDropItem(book, 0); } - - public static ItemStack mkbook(){ - String text = EMTTextHelper.localize("gui.EMT.book.aspect.output.essentia.eu") + ": \n"; - String text2 = EMTTextHelper.localize("gui.EMT.book.aspect.output.essentia.eu") + " /t: \n"; - String text3 = EMTTextHelper.localize("gui.EMT.book.aspect.output.essentia.eu") + " /t singleblock: \n"; - - final String title = EMTTextHelper.localize("gui.EMT.book.aspect.output.eu.title"); - - final ArrayList singleblock = new ArrayList(); - final ArrayList bookL = new ArrayList(); - final ArrayList bookL2 = new ArrayList(); - - byte counter = 0; - - for (final Aspect aspect : Aspect.aspects.values()) { - ++counter; - - if (aspect.equals(Aspect.ENERGY)||aspect.equals(Aspect.TREE)||aspect.equals(Aspect.FIRE)||aspect.equals(Aspect.AURA)||aspect.equals(Aspect.GREED)||aspect.equals(Aspect.AIR)) - text3 = text3 + aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag())/20D/20D) + "EU\n"; - - if (counter < 12){ - text2 = text2 + aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag())/20D) + "EU/t\n"; - text = text + aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag())) + "EU\n"; - } - else { - text2 = text2+ aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag())/20D) + "EU\n"; - text = text + aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag())) + "EU\n"; - bookL.add(text); - bookL2.add(text2); - text2 = new String(""); - text = new String(""); - counter = 0; - } - } - - singleblock.add(text3); - - if (counter != 0){ - bookL.add(text); - bookL2.add(text2); - } - - final ItemStack book = new ItemStack(Items.written_book); - book.setTagInfo("author", new NBTTagString("Tombenpotter, bartimaeusnek")); - book.setTagInfo("title", new NBTTagString(title)); - final NBTTagCompound nbttagcompound = book.getTagCompound(); - final NBTTagList bookPages = new NBTTagList(); - - for (int i = 0; i < singleblock.size(); i++) { - bookPages.appendTag(new NBTTagString(singleblock.get(i))); - } - for (int i = 0; i < bookL.size(); i++) { - bookPages.appendTag(new NBTTagString(bookL.get(i))); - } - for (int i = 0; i < bookL2.size(); i++) { - bookPages.appendTag(new NBTTagString(bookL2.get(i))); - } - nbttagcompound.setTag("pages", bookPages); - return book; - } } diff --git a/src/main/java/emt/entity/EntityArcher.java b/src/main/java/emt/entity/EntityArcher.java index af8fb8e..0dd8141 100644 --- a/src/main/java/emt/entity/EntityArcher.java +++ b/src/main/java/emt/entity/EntityArcher.java @@ -24,95 +24,95 @@ import net.minecraftforge.common.IExtendedEntityProperties; public class EntityArcher extends EntitySnowman implements IExtendedEntityProperties { - public EntityArcher(World world) { - super(world); - - this.tasks.addTask(1, new EntityAISwimming(this)); - this.tasks.addTask(2, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); - this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, true, false, IMob.mobSelector)); - this.tasks.addTask(4, new EntityAIWander(this, 0.30D)); - } + public EntityArcher(World world) { + super(world); - @Override - protected void applyEntityAttributes() { - super.applyEntityAttributes(); - - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30D); - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(40.0D); - } + this.tasks.addTask(1, new EntityAISwimming(this)); + this.tasks.addTask(2, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); + this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, true, false, IMob.mobSelector)); + this.tasks.addTask(4, new EntityAIWander(this, 0.30D)); + } - @Override - public void onDeath(DamageSource damageSource) { - super.onDeath(damageSource); - - this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 1, true); - this.setDead(); - } + @Override + protected void applyEntityAttributes() { + super.applyEntityAttributes(); - @Override - protected Item getDropItem() { - return Items.arrow; - } + this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30D); + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(40.0D); + } - @Override - protected void dropFewItems(boolean hitByPlayer, int levelOfLooting) { - int j; - int k; + @Override + public void onDeath(DamageSource damageSource) { + super.onDeath(damageSource); - j = this.rand.nextInt(3 + levelOfLooting); + this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 1, true); + this.setDead(); + } - for (k = 0; k < j; ++k) { - this.dropItem(Items.arrow, 1); - } - j = this.rand.nextInt(3 + levelOfLooting); + @Override + protected Item getDropItem() { + return Items.arrow; + } - for (k = 0; k < j; ++k) { - this.dropItem(Items.bone, 1); - } - } + @Override + protected void dropFewItems(boolean hitByPlayer, int levelOfLooting) { + int j; + int k; - @Override - protected void dropRareDrop(int ch) { - this.entityDropItem(new ItemStack(Items.snowball, 1, 1), 0.0F); - } + j = this.rand.nextInt(3 + levelOfLooting); - protected void addRandomArmor() { - super.addRandomArmor(); - this.setCurrentItemOrArmor(0, new ItemStack(Items.bow)); - } + for (k = 0; k < j; ++k) { + this.dropItem(Items.arrow, 1); + } + j = this.rand.nextInt(3 + levelOfLooting); - @Override - public void attackEntityWithRangedAttack(EntityLivingBase entity, float par2) { - EntityArrow entityarrow = new EntityArrow(this.worldObj, this, entity, 1.6F, (float) (14 - this.worldObj.difficultySetting.getDifficultyId() * 4)); - int powerLevel = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, this.getHeldItem()); - int punchLevel = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, this.getHeldItem()); - entityarrow.setDamage((double) (par2 * 2.0F) + this.rand.nextGaussian() * 0.25D + (double) ((float) this.worldObj.difficultySetting.getDifficultyId() * 0.11F)); + for (k = 0; k < j; ++k) { + this.dropItem(Items.bone, 1); + } + } - if (powerLevel > 0) { - entityarrow.setDamage(entityarrow.getDamage() + (double) powerLevel * 0.5D + 0.5D); - } + @Override + protected void dropRareDrop(int ch) { + this.entityDropItem(new ItemStack(Items.snowball, 1, 1), 0.0F); + } - if (punchLevel > 0) { - entityarrow.setKnockbackStrength(punchLevel); - } + protected void addRandomArmor() { + super.addRandomArmor(); + this.setCurrentItemOrArmor(0, new ItemStack(Items.bow)); + } - if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, this.getHeldItem()) > 0) { - entityarrow.setFire(100); - } + @Override + public void attackEntityWithRangedAttack(EntityLivingBase entity, float par2) { + EntityArrow entityarrow = new EntityArrow(this.worldObj, this, entity, 1.6F, (float) (14 - this.worldObj.difficultySetting.getDifficultyId() * 4)); + int powerLevel = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, this.getHeldItem()); + int punchLevel = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, this.getHeldItem()); + entityarrow.setDamage((double) (par2 * 2.0F) + this.rand.nextGaussian() * 0.25D + (double) ((float) this.worldObj.difficultySetting.getDifficultyId() * 0.11F)); - this.playSound("random.bow", 1.0F, 1.0F / (this.getRNG().nextFloat() * 0.4F + 0.8F)); - this.worldObj.spawnEntityInWorld(entityarrow); - } + if (powerLevel > 0) { + entityarrow.setDamage(entityarrow.getDamage() + (double) powerLevel * 0.5D + 0.5D); + } - @Override - public void saveNBTData(NBTTagCompound compound) { - } + if (punchLevel > 0) { + entityarrow.setKnockbackStrength(punchLevel); + } - @Override - public void loadNBTData(NBTTagCompound compound) { - } + if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, this.getHeldItem()) > 0) { + entityarrow.setFire(100); + } - @Override - public void init(Entity entity, World world) { - } + this.playSound("random.bow", 1.0F, 1.0F / (this.getRNG().nextFloat() * 0.4F + 0.8F)); + this.worldObj.spawnEntityInWorld(entityarrow); + } + + @Override + public void saveNBTData(NBTTagCompound compound) { + } + + @Override + public void loadNBTData(NBTTagCompound compound) { + } + + @Override + public void init(Entity entity, World world) { + } } diff --git a/src/main/java/emt/entity/EntityEnergyBall.java b/src/main/java/emt/entity/EntityEnergyBall.java index f39fe69..a77909f 100644 --- a/src/main/java/emt/entity/EntityEnergyBall.java +++ b/src/main/java/emt/entity/EntityEnergyBall.java @@ -20,213 +20,215 @@ import thaumcraft.common.Thaumcraft; import java.util.ArrayList; public class EntityEnergyBall extends Entity implements IProjectile, IEntityAdditionalSpawnData { - public static final int RADIUS = 8; - public static final int MAX_TICKS_IN_TILE = 60; - - public EntityLivingBase shootingEntity; - - public boolean inTile = false; - public int ticksAlive = 1; /** Pls, don't ask me why 1 =) **/ - public int ticksInAir = 1; - public double accelerationX = 0; - public double accelerationY = 0; - public double accelerationZ = 0; + public static final int RADIUS = 8; + public static final int MAX_TICKS_IN_TILE = 60; - public EntityEnergyBall(World world, EntityLivingBase shootingEntity, double rotX, double rotY, double rotZ) { - this(world, shootingEntity); + public EntityLivingBase shootingEntity; - rotX += this.rand.nextGaussian() * 0.4D; - rotY += this.rand.nextGaussian() * 0.4D; - rotZ += this.rand.nextGaussian() * 0.4D; - double len = (double) MathHelper.sqrt_double((rotX * rotX) + (rotY * rotY) + (rotZ * rotZ)); - this.accelerationX = rotX / len * 0.1D; - this.accelerationY = rotY / len * 0.1D; - this.accelerationZ = rotZ / len * 0.1D; - } + public boolean inTile = false; + public int ticksAlive = 1; + /** + * Pls, don't ask me why 1 =) + **/ + public int ticksInAir = 1; + public double accelerationX = 0; + public double accelerationY = 0; + public double accelerationZ = 0; - public EntityEnergyBall(World world, EntityLivingBase shootingEntity) { - this(world); + public EntityEnergyBall(World world, EntityLivingBase shootingEntity, double rotX, double rotY, double rotZ) { + this(world, shootingEntity); - this.shootingEntity = shootingEntity; - this.setLocationAndAngles(shootingEntity.posX, shootingEntity.posY + shootingEntity.getEyeHeight(), shootingEntity.posZ, shootingEntity.rotationYaw, shootingEntity.rotationPitch); - } + rotX += this.rand.nextGaussian() * 0.4D; + rotY += this.rand.nextGaussian() * 0.4D; + rotZ += this.rand.nextGaussian() * 0.4D; + double len = (double) MathHelper.sqrt_double((rotX * rotX) + (rotY * rotY) + (rotZ * rotZ)); + this.accelerationX = rotX / len * 0.1D; + this.accelerationY = rotY / len * 0.1D; + this.accelerationZ = rotZ / len * 0.1D; + } - public EntityEnergyBall(World world) { - super(world); + public EntityEnergyBall(World world, EntityLivingBase shootingEntity) { + this(world); - this.setSize(1.0F, 1.0F); - this.ignoreFrustumCheck = true; - this.setPosition(this.posX, this.posY, this.posZ); - this.yOffset = 0.0F; - this.motionX = this.motionY = this.motionZ = 0.0D; - } + this.shootingEntity = shootingEntity; + this.setLocationAndAngles(shootingEntity.posX, shootingEntity.posY + shootingEntity.getEyeHeight(), shootingEntity.posZ, shootingEntity.rotationYaw, shootingEntity.rotationPitch); + } - @Override - public void writeSpawnData(ByteBuf buffer) { - buffer.writeDouble(accelerationX); - buffer.writeDouble(accelerationY); - buffer.writeDouble(accelerationZ); - } + public EntityEnergyBall(World world) { + super(world); - @Override - public void readSpawnData(ByteBuf buffer) { - accelerationX = buffer.readDouble(); - accelerationY = buffer.readDouble(); - accelerationZ = buffer.readDouble(); - } + this.setSize(1.0F, 1.0F); + this.ignoreFrustumCheck = true; + this.setPosition(this.posX, this.posY, this.posZ); + this.yOffset = 0.0F; + this.motionX = this.motionY = this.motionZ = 0.0D; + } - @Override - public void onUpdate() { - super.onUpdate(); + @Override + public void writeSpawnData(ByteBuf buffer) { + buffer.writeDouble(accelerationX); + buffer.writeDouble(accelerationY); + buffer.writeDouble(accelerationZ); + } - /** If in Tile **/ - if (this.inTile) { - this.ticksAlive++; + @Override + public void readSpawnData(ByteBuf buffer) { + accelerationX = buffer.readDouble(); + accelerationY = buffer.readDouble(); + accelerationZ = buffer.readDouble(); + } - if (this.ticksAlive >= MAX_TICKS_IN_TILE) { - this.setDead(); - } + @Override + public void onUpdate() { + super.onUpdate(); - /** Generating Coords for every Entity **/ - ArrayList entities = new ArrayList(); + /** If in Tile **/ + if (this.inTile) { + this.ticksAlive++; - int chunkSize = ((RADIUS - 1) >> 4) + 2; + if (this.ticksAlive >= MAX_TICKS_IN_TILE) { + this.setDead(); + } - for (int chX = -chunkSize; chX < chunkSize; chX++) { - for (int chZ = -chunkSize; chZ < chunkSize; chZ++) { - Chunk chunk = worldObj.getChunkFromChunkCoords(chX + (int) (this.posX / 16), chZ + (int) (this.posZ / 16)); + /** Generating Coords for every Entity **/ + ArrayList entities = new ArrayList(); - if (chunk.isChunkLoaded && chunk.hasEntities) { - for (int i = 0; i < chunk.entityLists.length; i++) { - for (int k = 0; k < chunk.entityLists[i].size(); k++) { - Entity entity = (Entity) chunk.entityLists[i].get(k); - double width = entity.posX - this.posX; - double height = entity.posY - this.posY; - double length = entity.posZ - this.posZ; - double hyp = MathHelper.sqrt_double((width * width) + (length * length) + (height * height)); + int chunkSize = ((RADIUS - 1) >> 4) + 2; - if (hyp <= RADIUS) { - entities.add(entity); - /** Closer - Harder */ - entity.attackEntityFrom(DamageSource.magic, (float) (RADIUS - hyp)); - - if(worldObj.isRemote) { - Thaumcraft.proxy.bolt(worldObj, this, entity); - } - - } - } - } - } - } - } - /************************************************************************/ - } - /** If not in Tile **/ - else { - /** Collision detection **/ - Vec3 vec3 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); - Vec3 vec3next = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); - MovingObjectPosition mop = this.worldObj.rayTraceBlocks(vec3, vec3next); + for (int chX = -chunkSize; chX < chunkSize; chX++) { + for (int chZ = -chunkSize; chZ < chunkSize; chZ++) { + Chunk chunk = worldObj.getChunkFromChunkCoords(chX + (int) (this.posX / 16), chZ + (int) (this.posZ / 16)); - this.ticksInAir++; - if (mop != null) { - inTile = true; - } + if (chunk.isChunkLoaded && chunk.hasEntities) { + for (int i = 0; i < chunk.entityLists.length; i++) { + for (int k = 0; k < chunk.entityLists[i].size(); k++) { + Entity entity = (Entity) chunk.entityLists[i].get(k); + double width = entity.posX - this.posX; + double height = entity.posY - this.posY; + double length = entity.posZ - this.posZ; + double hyp = MathHelper.sqrt_double((width * width) + (length * length) + (height * height)); - /** Updating position */ - this.posX += this.motionX; - this.posY += this.motionY; - this.posZ += this.motionZ; - float f1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - this.rotationYaw = (float) (Math.atan2(this.motionZ, this.motionX) * 180.0D / Math.PI) + 90.0F; + if (hyp <= RADIUS) { + entities.add(entity); + /** Closer - Harder */ + entity.attackEntityFrom(DamageSource.magic, (float) (RADIUS - hyp)); - for (this.rotationPitch = (float) (Math.atan2((double) f1, this.motionY) * 180.0D / Math.PI) - 90.0F; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) { - ; - } + if (worldObj.isRemote) { + Thaumcraft.proxy.bolt(worldObj, this, entity); + } - while (this.rotationPitch - this.prevRotationPitch >= 180.0F) { - this.prevRotationPitch += 360.0F; - } + } + } + } + } + } + } + /************************************************************************/ + } + /** If not in Tile **/ + else { + /** Collision detection **/ + Vec3 vec3 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + Vec3 vec3next = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition mop = this.worldObj.rayTraceBlocks(vec3, vec3next); - while (this.rotationYaw - this.prevRotationYaw < -180.0F) { - this.prevRotationYaw -= 360.0F; - } + this.ticksInAir++; + if (mop != null) { + inTile = true; + } - while (this.rotationYaw - this.prevRotationYaw >= 180.0F) { - this.prevRotationYaw += 360.0F; - } + /** Updating position */ + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + float f1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + this.rotationYaw = (float) (Math.atan2(this.motionZ, this.motionX) * 180.0D / Math.PI) + 90.0F; - this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F; - this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F; + for (this.rotationPitch = (float) (Math.atan2((double) f1, this.motionY) * 180.0D / Math.PI) - 90.0F; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) { + ; + } - double factor = this.getMotionFactor(); - this.motionX += this.accelerationX; - this.motionY += this.accelerationY; - this.motionZ += this.accelerationZ; - this.motionX *= factor; - this.motionY *= factor; - this.motionZ *= factor; - this.setPosition(this.posX, this.posY, this.posZ); - /************************************************************************/ - } + while (this.rotationPitch - this.prevRotationPitch >= 180.0F) { + this.prevRotationPitch += 360.0F; + } - for(int i = 0; i < 3 && worldObj.isRemote; i ++) { - float rndX = (float) ((((worldObj.rand.nextFloat() - 0.5f) * 2) * (RADIUS - 4)) + posX); - float rndY = (float) ((((worldObj.rand.nextFloat() - 0.5f) * 2) * (RADIUS - 4)) + posY); - float rndZ = (float) ((((worldObj.rand.nextFloat() - 0.5f) * 2) * (RADIUS - 4)) + posZ); - Thaumcraft.proxy.nodeBolt(worldObj, (float)posX, (float)posY, (float)posZ, rndX, rndY, rndZ); - } - } + while (this.rotationYaw - this.prevRotationYaw < -180.0F) { + this.prevRotationYaw -= 360.0F; + } - protected float getMotionFactor() { - return 0.85F; - } + while (this.rotationYaw - this.prevRotationYaw >= 180.0F) { + this.prevRotationYaw += 360.0F; + } - @Override - public boolean canBeCollidedWith() { - return true; - } + this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F; + this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F; - @SideOnly(Side.CLIENT) - public int getBrightnessForRender(float p_70070_1_) { - return 240; - } + double factor = this.getMotionFactor(); + this.motionX += this.accelerationX; + this.motionY += this.accelerationY; + this.motionZ += this.accelerationZ; + this.motionX *= factor; + this.motionY *= factor; + this.motionZ *= factor; + this.setPosition(this.posX, this.posY, this.posZ); + /************************************************************************/ + } - @SideOnly(Side.CLIENT) - @Override - public boolean isInRangeToRender3d(double x, double y, double z) { - return true; - } + for (int i = 0; i < 3 && worldObj.isRemote; i++) { + float rndX = (float) ((((worldObj.rand.nextFloat() - 0.5f) * 2) * (RADIUS - 4)) + posX); + float rndY = (float) ((((worldObj.rand.nextFloat() - 0.5f) * 2) * (RADIUS - 4)) + posY); + float rndZ = (float) ((((worldObj.rand.nextFloat() - 0.5f) * 2) * (RADIUS - 4)) + posZ); + Thaumcraft.proxy.nodeBolt(worldObj, (float) posX, (float) posY, (float) posZ, rndX, rndY, rndZ); + } + } - @Override - protected void entityInit() { - } + protected float getMotionFactor() { + return 0.85F; + } - @Override - public void writeEntityToNBT(NBTTagCompound nbt) { - nbt.setByte("inTile", (byte) (this.inTile ? 1 : 0)); - nbt.setTag("direction", this.newDoubleNBTList(new double[] { this.motionX, this.motionY, this.motionZ })); - } + @Override + public boolean canBeCollidedWith() { + return true; + } - @Override - public void readEntityFromNBT(NBTTagCompound nbt) { - if (!inTile) { - this.inTile = nbt.getByte("inTile") == 1; - } + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float p_70070_1_) { + return 240; + } - if (nbt.hasKey("direction", 9)) { - NBTTagList nbttaglist = nbt.getTagList("direction", 6); - this.motionX = nbttaglist.func_150309_d(0); - this.motionY = nbttaglist.func_150309_d(1); - this.motionZ = nbttaglist.func_150309_d(2); - } - else { - this.setDead(); - } - } + @SideOnly(Side.CLIENT) + @Override + public boolean isInRangeToRender3d(double x, double y, double z) { + return true; + } - @Override - public void setThrowableHeading(double x, double y, double z, float p1, float p2) { - } + @Override + protected void entityInit() { + } + + @Override + public void writeEntityToNBT(NBTTagCompound nbt) { + nbt.setByte("inTile", (byte) (this.inTile ? 1 : 0)); + nbt.setTag("direction", this.newDoubleNBTList(new double[]{this.motionX, this.motionY, this.motionZ})); + } + + @Override + public void readEntityFromNBT(NBTTagCompound nbt) { + if (!inTile) { + this.inTile = nbt.getByte("inTile") == 1; + } + + if (nbt.hasKey("direction", 9)) { + NBTTagList nbttaglist = nbt.getTagList("direction", 6); + this.motionX = nbttaglist.func_150309_d(0); + this.motionY = nbttaglist.func_150309_d(1); + this.motionZ = nbttaglist.func_150309_d(2); + } else { + this.setDead(); + } + } + + @Override + public void setThrowableHeading(double x, double y, double z, float p1, float p2) { + } } diff --git a/src/main/java/emt/entity/EntityLaser.java b/src/main/java/emt/entity/EntityLaser.java index d254ca1..b3c47db 100644 --- a/src/main/java/emt/entity/EntityLaser.java +++ b/src/main/java/emt/entity/EntityLaser.java @@ -19,270 +19,267 @@ import net.minecraft.world.World; import java.util.List; public class EntityLaser extends Entity implements IThrowableEntity, IProjectile { - private Block inTile; - public Entity shootingEntity; - - private int xTile; - private int yTile; - private int zTile; - private int meta; - private boolean inGround = false; - private int ticksInGround; - private int ticksInAir; - private float explosionStrength = 2f; + public Entity shootingEntity; + private Block inTile; + private int xTile; + private int yTile; + private int zTile; + private int meta; + private boolean inGround = false; + private int ticksInGround; + private int ticksInAir; + private float explosionStrength = 2f; - public EntityLaser(World world) { - super(world); + public EntityLaser(World world) { + super(world); - this.renderDistanceWeight = 10.0D; - this.setSize(0.5F, 0.5F); - } + this.renderDistanceWeight = 10.0D; + this.setSize(0.5F, 0.5F); + } - public EntityLaser(World world, EntityLivingBase entity, float speed) { - super(world); - this.renderDistanceWeight = 10.0D; - this.shootingEntity = entity; + public EntityLaser(World world, EntityLivingBase entity, float speed) { + super(world); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = entity; - this.setSize(0.5F, 0.5F); - this.setLocationAndAngles(entity.posX, entity.posY + (double) entity.getEyeHeight(), entity.posZ, entity.rotationYaw, entity.rotationPitch); - this.posX -= (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F); - this.posY -= 0.10000000149011612D; - this.posZ -= (double) (MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F); - this.yOffset = 0.0F; - - this.motionX = (double) (-MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI)); - this.motionZ = (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI)); - this.motionY = (double) (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI)); - - this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, speed, 1.0F); - } - - public void setExplosionStrengthModifier(float f) { - explosionStrength = f; - } + this.setSize(0.5F, 0.5F); + this.setLocationAndAngles(entity.posX, entity.posY + (double) entity.getEyeHeight(), entity.posZ, entity.rotationYaw, entity.rotationPitch); + this.posX -= (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F); + this.posY -= 0.10000000149011612D; + this.posZ -= (double) (MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F); + this.yOffset = 0.0F; - @Override - protected void entityInit() { - } + this.motionX = (double) (-MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI)); + this.motionZ = (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI)); + this.motionY = (double) (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI)); - @Override - public void setThrowableHeading(double x, double y, double z, float speed, float scale) { - this.motionX = x * speed; - this.motionY = y * speed; - this.motionZ = z * speed; - this.ticksInGround = 0; - } + this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, speed, 1.0F); + } - @SideOnly(Side.CLIENT) - public void setPositionAndRotation2(double x, double y, double z, float rotX, float rotY, int rotZ) { - this.setPosition(x, y, z); - this.setRotation(rotX, rotY); - } + public void setExplosionStrengthModifier(float f) { + explosionStrength = f; + } - @SideOnly(Side.CLIENT) - @Override - public void setVelocity(double velX, double velY, double velZ) { - this.motionX = velX; - this.motionY = velY; - this.motionZ = velZ; + @Override + protected void entityInit() { + } - } + @Override + public void setThrowableHeading(double x, double y, double z, float speed, float scale) { + this.motionX = x * speed; + this.motionY = y * speed; + this.motionZ = z * speed; + this.ticksInGround = 0; + } - @Override - public void onUpdate() { - super.onUpdate(); + @SideOnly(Side.CLIENT) + public void setPositionAndRotation2(double x, double y, double z, float rotX, float rotY, int rotZ) { + this.setPosition(x, y, z); + this.setRotation(rotX, rotY); + } - Block block = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile); - - if (block.getMaterial() != Material.air) { - block.setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile); - AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile); + @SideOnly(Side.CLIENT) + @Override + public void setVelocity(double velX, double velY, double velZ) { + this.motionX = velX; + this.motionY = velY; + this.motionZ = velZ; - if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) { - this.inGround = true; - } - } + } - block.setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile); - AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile); + @Override + public void onUpdate() { + super.onUpdate(); - if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) { - this.inGround = true; - } + Block block = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile); - if (this.inGround) { - int k = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile); - if (!this.worldObj.isRemote) { - this.worldObj.createExplosion(this, (int) this.posX, (int) this.posY, (int) this.posZ, explosionStrength, true); - this.setDead(); - } + if (block.getMaterial() != Material.air) { + block.setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile); + AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile); - if (block == this.inTile && k == this.meta) { - ++this.ticksInGround; + if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) { + this.inGround = true; + } + } - if (this.ticksInGround == 1200) { - this.setDead(); - } - } - else { - this.inGround = false; - this.motionX *= (double) (this.rand.nextFloat() * 0.2F); - this.motionY *= (double) (this.rand.nextFloat() * 0.2F); - this.motionZ *= (double) (this.rand.nextFloat() * 0.2F); - this.ticksInGround = 0; - this.ticksInAir = 0; - } - } - else { - ++this.ticksInAir; - Vec3 vec3 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); - Vec3 vec3next = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); - MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec3, vec3next, false, true, false); - vec3 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); - vec3next = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + block.setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile); + AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile); - if (movingobjectposition != null) { - vec3next = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); - } + if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) { + this.inGround = true; + } - Entity entity = null; - List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); - double d0 = 0.0D; - int l; - float down; + if (this.inGround) { + int k = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile); + if (!this.worldObj.isRemote) { + this.worldObj.createExplosion(this, (int) this.posX, (int) this.posY, (int) this.posZ, explosionStrength, true); + this.setDead(); + } - for (l = 0; l < list.size(); ++l) { - Entity entity1 = (Entity) list.get(l); + if (block == this.inTile && k == this.meta) { + ++this.ticksInGround; - if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) { - down = 0.3F; - AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand((double) down, (double) down, (double) down); - MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec3next, vec3); + if (this.ticksInGround == 1200) { + this.setDead(); + } + } else { + this.inGround = false; + this.motionX *= (double) (this.rand.nextFloat() * 0.2F); + this.motionY *= (double) (this.rand.nextFloat() * 0.2F); + this.motionZ *= (double) (this.rand.nextFloat() * 0.2F); + this.ticksInGround = 0; + this.ticksInAir = 0; + } + } else { + ++this.ticksInAir; + Vec3 vec3 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + Vec3 vec3next = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec3, vec3next, false, true, false); + vec3 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + vec3next = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); - if (movingobjectposition1 != null) { - double d1 = vec3next.distanceTo(movingobjectposition1.hitVec); + if (movingobjectposition != null) { + vec3next = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); + } - if (d1 < d0 || d0 == 0.0D) { - entity = entity1; - d0 = d1; - } - } - } - } + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + int l; + float down; - if (entity != null) { - movingobjectposition = new MovingObjectPosition(entity); - } + for (l = 0; l < list.size(); ++l) { + Entity entity1 = (Entity) list.get(l); - if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) { - EntityPlayer entityplayer = (EntityPlayer) movingobjectposition.entityHit; + if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) { + down = 0.3F; + AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand((double) down, (double) down, (double) down); + MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec3next, vec3); - if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer) this.shootingEntity).canAttackPlayer(entityplayer)) { - movingobjectposition = null; - } - } + if (movingobjectposition1 != null) { + double d1 = vec3next.distanceTo(movingobjectposition1.hitVec); - float f2; - float f3; + if (d1 < d0 || d0 == 0.0D) { + entity = entity1; + d0 = d1; + } + } + } + } - if (movingobjectposition != null) { - if (movingobjectposition.entityHit != null) { - f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); - if (!this.worldObj.isRemote) { - this.worldObj.createExplosion(this, (int) this.posX, (int) this.posY, (int) this.posZ, explosionStrength, true); - this.setDead(); - } - } - else { - this.xTile = movingobjectposition.blockX; - this.yTile = movingobjectposition.blockY; - this.zTile = movingobjectposition.blockZ; - this.inTile = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile); - this.meta = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile); - this.motionX = movingobjectposition.hitVec.xCoord - this.posX; - this.motionY = movingobjectposition.hitVec.yCoord - this.posY; - this.motionZ = movingobjectposition.hitVec.zCoord - this.posZ; - f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); - this.posX -= this.motionX / (double) f2 * 0.05000000074505806D; - this.posY -= this.motionY / (double) f2 * 0.05000000074505806D; - this.posZ -= this.motionZ / (double) f2 * 0.05000000074505806D; - this.inGround = true; - } - } + if (entity != null) { + movingobjectposition = new MovingObjectPosition(entity); + } - this.posX += this.motionX; - this.posY += this.motionY; - this.posZ += this.motionZ; - f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); + if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) { + EntityPlayer entityplayer = (EntityPlayer) movingobjectposition.entityHit; - for (this.rotationPitch = (float) (Math.atan2(this.motionY, (double) f2) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F); + if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer) this.shootingEntity).canAttackPlayer(entityplayer)) { + movingobjectposition = null; + } + } - while (this.rotationPitch - this.prevRotationPitch >= 180.0F) { - this.prevRotationPitch += 360.0F; - } + float f2; + float f3; - while (this.rotationYaw - this.prevRotationYaw < -180.0F) { - this.prevRotationYaw -= 360.0F; - } + if (movingobjectposition != null) { + if (movingobjectposition.entityHit != null) { + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); + if (!this.worldObj.isRemote) { + this.worldObj.createExplosion(this, (int) this.posX, (int) this.posY, (int) this.posZ, explosionStrength, true); + this.setDead(); + } + } else { + this.xTile = movingobjectposition.blockX; + this.yTile = movingobjectposition.blockY; + this.zTile = movingobjectposition.blockZ; + this.inTile = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile); + this.meta = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile); + this.motionX = movingobjectposition.hitVec.xCoord - this.posX; + this.motionY = movingobjectposition.hitVec.yCoord - this.posY; + this.motionZ = movingobjectposition.hitVec.zCoord - this.posZ; + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); + this.posX -= this.motionX / (double) f2 * 0.05000000074505806D; + this.posY -= this.motionY / (double) f2 * 0.05000000074505806D; + this.posZ -= this.motionZ / (double) f2 * 0.05000000074505806D; + this.inGround = true; + } + } - while (this.rotationYaw - this.prevRotationYaw >= 180.0F) { - this.prevRotationYaw += 360.0F; - } + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); + + for (this.rotationPitch = (float) (Math.atan2(this.motionY, (double) f2) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) + ; + + while (this.rotationPitch - this.prevRotationPitch >= 180.0F) { + this.prevRotationPitch += 360.0F; + } + + while (this.rotationYaw - this.prevRotationYaw < -180.0F) { + this.prevRotationYaw -= 360.0F; + } + + while (this.rotationYaw - this.prevRotationYaw >= 180.0F) { + this.prevRotationYaw += 360.0F; + } - if (this.isInWater()) { - for (int j1 = 0; j1 < 4; ++j1) { - f3 = 0.25F; - this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double) f3, this.posY - this.motionY * (double) f3, this.posZ - this.motionZ * (double) f3, this.motionX, this.motionY, this.motionZ); - } + if (this.isInWater()) { + for (int j1 = 0; j1 < 4; ++j1) { + f3 = 0.25F; + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double) f3, this.posY - this.motionY * (double) f3, this.posZ - this.motionZ * (double) f3, this.motionX, this.motionY, this.motionZ); + } - } - this.setPosition(this.posX, this.posY, this.posZ); - } - } + } + this.setPosition(this.posX, this.posY, this.posZ); + } + } - @Override - public void writeEntityToNBT(NBTTagCompound nbt) { - nbt.setShort("xTile", (short) this.xTile); - nbt.setShort("yTile", (short) this.yTile); - nbt.setShort("zTile", (short) this.zTile); - nbt.setShort("inTile", (short) Block.getIdFromBlock(this.inTile)); - nbt.setByte("inData", (byte) this.meta); - nbt.setBoolean("inGround", this.inGround); - nbt.setFloat("explosionStrength", this.explosionStrength); - } + @Override + public void writeEntityToNBT(NBTTagCompound nbt) { + nbt.setShort("xTile", (short) this.xTile); + nbt.setShort("yTile", (short) this.yTile); + nbt.setShort("zTile", (short) this.zTile); + nbt.setShort("inTile", (short) Block.getIdFromBlock(this.inTile)); + nbt.setByte("inData", (byte) this.meta); + nbt.setBoolean("inGround", this.inGround); + nbt.setFloat("explosionStrength", this.explosionStrength); + } - @Override - public void readEntityFromNBT(NBTTagCompound nbt) { - this.xTile = nbt.getShort("xTile"); - this.yTile = nbt.getShort("yTile"); - this.zTile = nbt.getShort("zTile"); - this.inTile = Block.getBlockById(nbt.getShort("inTile")); - this.meta = nbt.getByte("inData") & 255; - this.inGround = nbt.getBoolean("inGround"); - this.explosionStrength = nbt.getFloat("explosionStrength"); - } + @Override + public void readEntityFromNBT(NBTTagCompound nbt) { + this.xTile = nbt.getShort("xTile"); + this.yTile = nbt.getShort("yTile"); + this.zTile = nbt.getShort("zTile"); + this.inTile = Block.getBlockById(nbt.getShort("inTile")); + this.meta = nbt.getByte("inData") & 255; + this.inGround = nbt.getBoolean("inGround"); + this.explosionStrength = nbt.getFloat("explosionStrength"); + } - public void onCollide(Entity entity) { - if (!this.worldObj.isRemote) { - this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, explosionStrength, true); - } - } + public void onCollide(Entity entity) { + if (!this.worldObj.isRemote) { + this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, explosionStrength, true); + } + } - @SideOnly(Side.CLIENT) - @Override - public float getShadowSize() { - return 0.0F; - } + @SideOnly(Side.CLIENT) + @Override + public float getShadowSize() { + return 0.0F; + } - @Override - public Entity getThrower() { - return shootingEntity; - } + @Override + public Entity getThrower() { + return shootingEntity; + } - @Override - public void setThrower(Entity entity) { - shootingEntity = entity; - } + @Override + public void setThrower(Entity entity) { + shootingEntity = entity; + } } \ No newline at end of file diff --git a/src/main/java/emt/entity/EntityShield.java b/src/main/java/emt/entity/EntityShield.java index 1124e24..dd0fabe 100644 --- a/src/main/java/emt/entity/EntityShield.java +++ b/src/main/java/emt/entity/EntityShield.java @@ -9,99 +9,99 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; public class EntityShield extends Entity { - public EntityPlayer owner; + public EntityPlayer owner; - public boolean needCheck = true; + public boolean needCheck = true; - public EntityShield(World world) { - super(world); - this.ignoreFrustumCheck = true; - } + public EntityShield(World world) { + super(world); + this.ignoreFrustumCheck = true; + } - public EntityShield(World world, EntityPlayer player) { - super(world); - this.setSize(4, 4); - owner = player; - this.dataWatcher.updateObject(11, owner.getDisplayName()); - this.setPosition(player.posX, player.posY, player.posZ); - this.ignoreFrustumCheck = true; - } + public EntityShield(World world, EntityPlayer player) { + super(world); + this.setSize(4, 4); + owner = player; + this.dataWatcher.updateObject(11, owner.getDisplayName()); + this.setPosition(player.posX, player.posY, player.posZ); + this.ignoreFrustumCheck = true; + } - @Override - protected void entityInit() { - this.dataWatcher.addObject(11, ""); - } + @Override + protected void entityInit() { + this.dataWatcher.addObject(11, ""); + } - @Override - protected void readEntityFromNBT(NBTTagCompound nbt) { - } + @Override + protected void readEntityFromNBT(NBTTagCompound nbt) { + } - @Override - protected void writeEntityToNBT(NBTTagCompound nbt) { - } + @Override + protected void writeEntityToNBT(NBTTagCompound nbt) { + } - @Override - public AxisAlignedBB getBoundingBox() { - return this.boundingBox; - } + @Override + public AxisAlignedBB getBoundingBox() { + return this.boundingBox; + } - @Override - public boolean canBePushed() { - return true; - } + @Override + public boolean canBePushed() { + return true; + } - @Override - public boolean canBeCollidedWith() { - return true; - } + @Override + public boolean canBeCollidedWith() { + return true; + } - @Override - public void setPosition(double x, double y, double z) { - this.posX = x; - this.posY = y + 0.5f; - this.posZ = z; - float f = this.width / 2.0F; - float f1 = this.height; - this.boundingBox.setBounds(x - (double) f, y - (double) this.yOffset - 2 + (double) this.ySize, z - (double) f, x + (double) f, y - (double) this.yOffset - 2 + (double) this.ySize + (double) f1, z + (double) f); - } + @Override + public void setPosition(double x, double y, double z) { + this.posX = x; + this.posY = y + 0.5f; + this.posZ = z; + float f = this.width / 2.0F; + float f1 = this.height; + this.boundingBox.setBounds(x - (double) f, y - (double) this.yOffset - 2 + (double) this.ySize, z - (double) f, x + (double) f, y - (double) this.yOffset - 2 + (double) this.ySize + (double) f1, z + (double) f); + } - @Override - public void onUpdate() { - super.onUpdate(); + @Override + public void onUpdate() { + super.onUpdate(); - if (needCheck && owner == null) { - owner = this.worldObj.getPlayerEntityByName(dataWatcher.getWatchableObjectString(11)); - needCheck = false; - } - if (!needCheck && owner == null) { - this.setDead(); - return; - } + if (needCheck && owner == null) { + owner = this.worldObj.getPlayerEntityByName(dataWatcher.getWatchableObjectString(11)); + needCheck = false; + } + if (!needCheck && owner == null) { + this.setDead(); + return; + } - if (!this.worldObj.isRemote && owner != null) { - this.setPosition(owner.posX, owner.posY, owner.posZ); - if (!owner.isUsingItem()) { - this.setDead(); - } - } - } + if (!this.worldObj.isRemote && owner != null) { + this.setPosition(owner.posX, owner.posY, owner.posZ); + if (!owner.isUsingItem()) { + this.setDead(); + } + } + } - @SideOnly(Side.CLIENT) - public int getBrightnessForRender(float p_70070_1_) { - return 240; - } + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float p_70070_1_) { + return 240; + } - public void applyEntityCollision(Entity entity) { - if (entity.riddenByEntity != this && entity.ridingEntity != this) { - double ePosX = entity.posX - this.posX; - double ePosZ = entity.posZ - this.posZ; - entity.addVelocity(ePosX / 5D, 0.0D, ePosZ / 5D); - } - } + public void applyEntityCollision(Entity entity) { + if (entity.riddenByEntity != this && entity.ridingEntity != this) { + double ePosX = entity.posX - this.posX; + double ePosZ = entity.posZ - this.posZ; + entity.addVelocity(ePosX / 5D, 0.0D, ePosZ / 5D); + } + } - @SideOnly(Side.CLIENT) - @Override - public boolean isInRangeToRender3d(double x, double y, double z) { - return true; - } + @SideOnly(Side.CLIENT) + @Override + public boolean isInRangeToRender3d(double x, double y, double z) { + return true; + } } diff --git a/src/main/java/emt/gthandler/common/blocks/EMT_GT_Block.java b/src/main/java/emt/gthandler/common/blocks/EMT_GT_Block.java index 350b776..c2c708b 100644 --- a/src/main/java/emt/gthandler/common/blocks/EMT_GT_Block.java +++ b/src/main/java/emt/gthandler/common/blocks/EMT_GT_Block.java @@ -7,28 +7,30 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EnumCreatureType; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; import java.util.List; public class EMT_GT_Block extends Block { + @SideOnly(Side.CLIENT) + private IIcon[] texture; + private String[] textureNames; + private String name; + public EMT_GT_Block(String name, String[] texture) { super(Material.anvil); this.setHardness(15.0F); this.setResistance(30.0F); this.name = name; - this.textureNames=texture; + this.textureNames = texture; this.setCreativeTab(EMT.TAB); } - @SideOnly(Side.CLIENT) - private IIcon[] texture; - private String[] textureNames; - private String name; - @Override public int damageDropped(final int meta) { return meta; @@ -36,7 +38,7 @@ public class EMT_GT_Block extends Block { @Override public void getSubBlocks(final Item item, final CreativeTabs tab, final List list) { - for (int i = 0; i < textureNames.length; i ++) { + for (int i = 0; i < textureNames.length; i++) { list.add(new ItemStack(item, 1, i)); } } @@ -49,7 +51,7 @@ public class EMT_GT_Block extends Block { @Override @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister par1IconRegister){ + public void registerBlockIcons(IIconRegister par1IconRegister) { texture = new IIcon[textureNames.length]; for (int i = 0; i < textureNames.length; i++) { texture[i] = par1IconRegister.registerIcon(textureNames[i]); @@ -62,7 +64,17 @@ public class EMT_GT_Block extends Block { } @Override - public String getUnlocalizedName(){ + public String getUnlocalizedName() { return name; } + + @Override + public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) { + return false; + } + + @Override + public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) { + return false; + } } diff --git a/src/main/java/emt/gthandler/common/implementations/EssentiaHatch.java b/src/main/java/emt/gthandler/common/implementations/EssentiaHatch.java index 00bbc9d..c2618ba 100644 --- a/src/main/java/emt/gthandler/common/implementations/EssentiaHatch.java +++ b/src/main/java/emt/gthandler/common/implementations/EssentiaHatch.java @@ -18,19 +18,8 @@ import java.util.ArrayList; public class EssentiaHatch extends GT_MetaTileEntity_Hatch_Input { + private static int ApTe = (int) Math.ceil(Aspect.aspects.size() / GT_Values.V.length); private AspectList current = new AspectList(); - private static int ApTe = (int) Math.ceil(Aspect.aspects.size()/GT_Values.V.length); - - public boolean addAspectList(final AspectList A){ - - if ((this.mTier+1)*ApTe > A.size()+current.size()){ - if (current.visSize() + A.visSize() < (this.mTier+1)*ApTe*64) - current.add(A); - return true; - }else - return false; - - } public EssentiaHatch(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier); @@ -44,7 +33,18 @@ public class EssentiaHatch extends GT_MetaTileEntity_Hatch_Input { super(aName, aTier, aDescription, aTextures); } - public void setCurrent(AspectList List){ + public boolean addAspectList(final AspectList A) { + + if ((this.mTier + 1) * ApTe > A.size() + current.size()) { + if (current.visSize() + A.visSize() < (this.mTier + 1) * ApTe * 64) + current.add(A); + return true; + } else + return false; + + } + + public void setCurrent(AspectList List) { this.current = List; } @@ -53,7 +53,7 @@ public class EssentiaHatch extends GT_MetaTileEntity_Hatch_Input { } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new EssentiaHatch("Essentia Hatch "+ GT_Values.VN[this.mTier],this.mTier,this.getDescription(),this.mTextures); + return new EssentiaHatch("Essentia Hatch " + GT_Values.VN[this.mTier], this.mTier, this.getDescription(), this.mTextures); } @@ -74,11 +74,11 @@ public class EssentiaHatch extends GT_MetaTileEntity_Hatch_Input { ArrayList list = new ArrayList(); list.add("This Essentia-Hatch contains:"); for (final Aspect A : this.current.aspects.keySet()) - list.add(A.getName()+": "+Integer.toString(current.getAmount(A))); + list.add(A.getName() + ": " + Integer.toString(current.getAmount(A))); String[] ret = new String[list.size()]; for (int i = 0; i < list.size(); i++) { - ret[i]=list.get(i); + ret[i] = list.get(i); } return ret; @@ -96,12 +96,12 @@ public class EssentiaHatch extends GT_MetaTileEntity_Hatch_Input { } @Override - public String[] getDescription(){ //this is the fucking tooltip -_-' - return new String[] { + public String[] getDescription() { //this is the fucking tooltip -_-' + return new String[]{ "Essentia Hatch for usage in Multiblocks", "Can only be filled with the Essentia Filler", - "Can hold "+Integer.toString((ApTe*(mTier+1)))+" Different Essentia Types", - "Can hold "+Integer.toString((64*ApTe*(mTier+1)))+" Essentia in total" + "Can hold " + Integer.toString((ApTe * (mTier + 1))) + " Different Essentia Types", + "Can hold " + Integer.toString((64 * ApTe * (mTier + 1))) + " Essentia in total" }; } @@ -111,13 +111,11 @@ public class EssentiaHatch extends GT_MetaTileEntity_Hatch_Input { } @Override - public void saveNBTData(NBTTagCompound var1){ + public void saveNBTData(NBTTagCompound var1) { NBTTagList tlist = new NBTTagList(); - var1.setTag("Aspects", tlist); Aspect[] aspectA = current.getAspects(); - - for(int i = 0; i < aspectA.length; ++i) { + for (int i = 0; i < aspectA.length; ++i) { Aspect aspect = aspectA[i]; if (aspect != null) { NBTTagCompound f = new NBTTagCompound(); @@ -126,16 +124,16 @@ public class EssentiaHatch extends GT_MetaTileEntity_Hatch_Input { tlist.appendTag(f); } } - + var1.setTag("Aspects", tlist); super.saveNBTData(var1); } @Override - public void loadNBTData(NBTTagCompound var1){ + public void loadNBTData(NBTTagCompound var1) { current = new AspectList(); NBTTagList tlist = var1.getTagList("Aspects", 10); - for(int j = 0; j < tlist.tagCount(); ++j) { + for (int j = 0; j < tlist.tagCount(); ++j) { NBTTagCompound rs = tlist.getCompoundTagAt(j); if (rs.hasKey("key")) { current.add(Aspect.getAspect(rs.getString("key")), rs.getInteger("amount")); @@ -147,7 +145,7 @@ public class EssentiaHatch extends GT_MetaTileEntity_Hatch_Input { public int fuelleft() { int ret = 0; - for (final Aspect A : current.aspects.keySet()){ + for (final Aspect A : current.aspects.keySet()) { ret += current.getAmount(A); } return ret; diff --git a/src/main/java/emt/gthandler/common/implementations/automation/EssentiaFiller.java b/src/main/java/emt/gthandler/common/implementations/automation/EssentiaFiller.java index 50cb8c2..7849b72 100644 --- a/src/main/java/emt/gthandler/common/implementations/automation/EssentiaFiller.java +++ b/src/main/java/emt/gthandler/common/implementations/automation/EssentiaFiller.java @@ -4,6 +4,8 @@ import emt.gthandler.common.implementations.EssentiaHatch; import emt.tile.TileEntityEMT; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; import thaumcraft.api.ThaumcraftApiHelper; @@ -20,73 +22,101 @@ public class EssentiaFiller extends TileEntityEMT implements IAspectContainer, I private byte tick = 0; @Override - public void updateEntity(){ - ++tick; - fillfrompipe(); - if (tick %20 == 0){ - TileEntity T = this.worldObj.getTileEntity(xCoord,yCoord+1,zCoord); - if (checkTE(T)){ - tick = 0; - return; - } - if (T == null) - T = this.worldObj.getTileEntity(xCoord+1,yCoord,zCoord); - if (checkTE(T)) { - tick = 0; - return; - } - if (T == null) - T = this.worldObj.getTileEntity(xCoord,yCoord,zCoord+1); - if (checkTE(T)) { - tick = 0; - return; - } - if (T == null) - T = this.worldObj.getTileEntity(xCoord,yCoord-1,zCoord); - if (checkTE(T)) { - tick = 0; - return; - } - if (T == null) - T = this.worldObj.getTileEntity(xCoord-1,yCoord,zCoord); - if (checkTE(T)) { - tick = 0; - return; - } - if (T == null) - T = this.worldObj.getTileEntity(xCoord,yCoord,zCoord-1); - if (checkTE(T)) { - tick = 0; - return; + public void writeToNBT(NBTTagCompound tagCompound) { + super.writeToNBT(tagCompound); + NBTTagList tlist = new NBTTagList(); + Aspect[] aspectA = current.getAspects(); + for (int i = 0; i < aspectA.length; ++i) { + Aspect aspect = aspectA[i]; + if (aspect != null) { + NBTTagCompound f = new NBTTagCompound(); + f.setString("key", aspect.getTag()); + f.setInteger("amount", current.getAmount(aspect)); + tlist.appendTag(f); + } } + tagCompound.setTag("Aspects", tlist); + + } + + @Override + public void readFromNBT(NBTTagCompound tagCompound) { + super.readFromNBT(tagCompound); + current = new AspectList(); + NBTTagList tlist = tagCompound.getTagList("Aspects", 10); + for (int j = 0; j < tlist.tagCount(); ++j) { + NBTTagCompound rs = tlist.getCompoundTagAt(j); + if (rs.hasKey("key")) { + current.add(Aspect.getAspect(rs.getString("key")), rs.getInteger("amount")); + } } } - private boolean checkTE(final TileEntity T){ + @Override + public void updateEntity() { + ++tick; + fillfrompipe(); + if (tick % 20 == 0) { + TileEntity T = this.worldObj.getTileEntity(xCoord, yCoord + 1, zCoord); + if (checkTE(T)) { + tick = 0; + return; + } + if (T == null) + T = this.worldObj.getTileEntity(xCoord + 1, yCoord, zCoord); + if (checkTE(T)) { + tick = 0; + return; + } + if (T == null) + T = this.worldObj.getTileEntity(xCoord, yCoord, zCoord + 1); + if (checkTE(T)) { + tick = 0; + return; + } + if (T == null) + T = this.worldObj.getTileEntity(xCoord, yCoord - 1, zCoord); + if (checkTE(T)) { + tick = 0; + return; + } + if (T == null) + T = this.worldObj.getTileEntity(xCoord - 1, yCoord, zCoord); + if (checkTE(T)) { + tick = 0; + return; + } + if (T == null) + T = this.worldObj.getTileEntity(xCoord, yCoord, zCoord - 1); + if (checkTE(T)) { + tick = 0; + return; + } + } + } + + private boolean checkTE(final TileEntity T) { if (T == null) return false; if (this.current.visSize() > 0) - if (T instanceof IGregTechTileEntity) { - IMetaTileEntity M = ((IGregTechTileEntity) T).getMetaTileEntity(); - if (M instanceof EssentiaHatch){ - if (((EssentiaHatch)M).addAspectList(current)) - this.current=new AspectList(); - return true; + if (T instanceof IGregTechTileEntity) { + IMetaTileEntity M = ((IGregTechTileEntity) T).getMetaTileEntity(); + if (M instanceof EssentiaHatch) { + if (((EssentiaHatch) M).addAspectList(current)) + this.current = new AspectList(); + return true; + } } - } return false; } - public void fillfrompipe() - { + public void fillfrompipe() { TileEntity[] te = new TileEntity[ForgeDirection.VALID_DIRECTIONS.length]; - for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) - { + for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) { te[i] = ThaumcraftApiHelper.getConnectableTile(this.worldObj, this.xCoord, this.yCoord, this.zCoord, ForgeDirection.VALID_DIRECTIONS[i]); - if (te[i] != null) - { - IEssentiaTransport pipe = (IEssentiaTransport)te[i]; + if (te[i] != null) { + IEssentiaTransport pipe = (IEssentiaTransport) te[i]; if (!pipe.canOutputTo(ForgeDirection.VALID_DIRECTIONS[i])) { return; } @@ -114,7 +144,7 @@ public class EssentiaFiller extends TileEntityEMT implements IAspectContainer, I @Override public int addToContainer(Aspect aspect, int i) { - current.add(aspect,i); + current.add(aspect, i); return 0; } @@ -139,14 +169,14 @@ public class EssentiaFiller extends TileEntityEMT implements IAspectContainer, I for (Aspect a : aspectList.aspects.keySet()) if (current.aspects.containsKey(a)) { ret.add(true); - }else + } else ret.add(false); return !ret.contains(false); } @Override public int containerContains(Aspect aspect) { - return current.aspects.containsKey(aspect) ? current.getAmount(aspect) : 0; + return current.aspects.containsKey(aspect) ? current.getAmount(aspect) : 0; } @Override @@ -186,7 +216,7 @@ public class EssentiaFiller extends TileEntityEMT implements IAspectContainer, I @Override public int addEssentia(Aspect aspect, int i, ForgeDirection forgeDirection) { - current.add(aspect,i); + current.add(aspect, i); return 0; } @@ -198,7 +228,7 @@ public class EssentiaFiller extends TileEntityEMT implements IAspectContainer, I @Override public int getEssentiaAmount(ForgeDirection forgeDirection) { int ret = 0; - for (final Aspect A : current.aspects.keySet()){ + for (final Aspect A : current.aspects.keySet()) { ret += current.getAmount(A); } return ret; diff --git a/src/main/java/emt/gthandler/common/items/EMT_CasingBlock.java b/src/main/java/emt/gthandler/common/items/EMT_CasingBlock.java index 4cfde21..8536682 100644 --- a/src/main/java/emt/gthandler/common/items/EMT_CasingBlock.java +++ b/src/main/java/emt/gthandler/common/items/EMT_CasingBlock.java @@ -17,25 +17,24 @@ public class EMT_CasingBlock extends ItemBlock { public static final Block[] EMT_GT_BLOCKS = {new EMT_GT_Block("EMT_GTBLOCK_CASEING", new String[] { - EMT.TEXTURE_PATH+":machines/side", - EMT.TEXTURE_PATH+":machines/GT/inner", - EMT.TEXTURE_PATH+":machines/GT/siderawI", - EMT.TEXTURE_PATH+":machines/GT/rawcoreI", - EMT.TEXTURE_PATH+":machines/GT/siderawII", - EMT.TEXTURE_PATH+":machines/GT/rawcoreII", + EMT.TEXTURE_PATH + ":machines/side", + EMT.TEXTURE_PATH + ":machines/GT/inner", + EMT.TEXTURE_PATH + ":machines/GT/siderawI", + EMT.TEXTURE_PATH + ":machines/GT/rawcoreI", + EMT.TEXTURE_PATH + ":machines/GT/siderawII", + EMT.TEXTURE_PATH + ":machines/GT/rawcoreII", } )}; + protected final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); + protected final String mNoTileEntityToolTip = GT_LanguageManager.addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!"); - public EMT_CasingBlock(final Block par1){ + public EMT_CasingBlock(final Block par1) { super(par1); this.setMaxDamage(0); this.setHasSubtypes(true); this.setCreativeTab(EMT.TAB); } - protected final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); - protected final String mNoTileEntityToolTip = GT_LanguageManager.addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!"); - @Override public int getMetadata(final int aMeta) { return aMeta; @@ -55,7 +54,7 @@ public class EMT_CasingBlock extends ItemBlock { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass) { - return this.field_150939_a.getIcon(0,stack.getItemDamage()); + return this.field_150939_a.getIcon(0, stack.getItemDamage()); } @Override @@ -67,6 +66,6 @@ public class EMT_CasingBlock extends ItemBlock { @Override @SideOnly(Side.CLIENT) public IIcon getIconFromDamageForRenderPass(int p_77618_1_, int p_77618_2_) { - return this.field_150939_a.getIcon(0,p_77618_2_); + return this.field_150939_a.getIcon(0, p_77618_2_); } } diff --git a/src/main/java/emt/gthandler/common/loader/EMT_GT_Loader.java b/src/main/java/emt/gthandler/common/loader/EMT_GT_Loader.java index 8af4100..ba695c8 100644 --- a/src/main/java/emt/gthandler/common/loader/EMT_GT_Loader.java +++ b/src/main/java/emt/gthandler/common/loader/EMT_GT_Loader.java @@ -23,30 +23,31 @@ public class EMT_GT_Loader implements Runnable { public static final int TIERS = GT_Values.VN.length; - public static int aIDoffset = 13000-TIERS-1; + public static int aIDoffset = 13000 - TIERS - 1; public static ItemStack[] EHatch = new ItemStack[TIERS]; public static ItemStack LEG; + @Override public void run() { - + for (int i = 0; i < TIERS; i++) { - EHatch[i] = new EssentiaHatch(aIDoffset+i,"Essentia Hatch "+ GT_Values.VN[i],"Essentia Hatch "+ GT_Values.VN[i],i).getStackForm(1L); + EHatch[i] = new EssentiaHatch(aIDoffset + i, "Essentia Hatch " + GT_Values.VN[i], "Essentia Hatch " + GT_Values.VN[i], i).getStackForm(1L); } - GameRegistry.registerBlock(EMT_CasingBlock.EMT_GT_BLOCKS[0],EMT_CasingBlock.class,"EMT_GTBLOCK_CASEING"); - LEG = new EMT_Large_Essentia_Gen(aIDoffset+TIERS+1,"Large Essentia Generator","Large Essentia Generator").getStackForm(1L); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt,Materials.Indium,1L),GT_OreDictUnificator.get(OrePrefixes.stickLong,Materials.Tungsten,4L)},Materials.SolderingAlloy.getMolten(576L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0],1,3),100, (int)(GT_Values.V[5]-(GT_Values.V[5]/10))); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0],1,3),GT_OreDictUnificator.get(OrePrefixes.plate,Materials.Iridium,8L)},Materials.Osmiridium.getMolten(576L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0],1,5),100, (int)(GT_Values.V[5]-(GT_Values.V[5]/10))); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt,Materials.Iridium,1L),GT_OreDictUnificator.get(OrePrefixes.stickLong,Materials.Osmiridium,4L)},Materials.SolderingAlloy.getMolten(576L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0],1,2),100, (int)(GT_Values.V[5]-(GT_Values.V[5]/10))); + GameRegistry.registerBlock(EMT_CasingBlock.EMT_GT_BLOCKS[0], EMT_CasingBlock.class, "EMT_GTBLOCK_CASEING"); + LEG = new EMT_Large_Essentia_Gen(aIDoffset + TIERS + 1, "Large Essentia Generator", "Large Essentia Generator").getStackForm(1L); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Indium, 1L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Tungsten, 4L)}, Materials.SolderingAlloy.getMolten(576L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 3), 100, (int) (GT_Values.V[5] - (GT_Values.V[5] / 10))); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 3), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 8L)}, Materials.Osmiridium.getMolten(576L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 5), 100, (int) (GT_Values.V[5] - (GT_Values.V[5] / 10))); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Iridium, 1L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Osmiridium, 4L)}, Materials.SolderingAlloy.getMolten(576L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 2), 100, (int) (GT_Values.V[5] - (GT_Values.V[5] / 10))); if (Loader.isModLoaded("ThaumicTinkerer")) - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0],1,2), GT_ModHandler.getModItem("ThaumicTinkerer","kamiResource",2L,2)},Materials.Concrete.getMolten(2304L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0],1,4),100, (int)(GT_Values.V[5]-(GT_Values.V[5]/10))); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 2), GT_ModHandler.getModItem("ThaumicTinkerer", "kamiResource", 2L, 2)}, Materials.Concrete.getMolten(2304L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 4), 100, (int) (GT_Values.V[5] - (GT_Values.V[5] / 10))); else - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0],1,2), Materials.ElectrumFlux.getPlates(8)},Materials.Concrete.getMolten(2304L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0],1,4),100, (int)(GT_Values.V[5]-(GT_Values.V[5]/10))); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 2), Materials.ElectrumFlux.getPlates(8)}, Materials.Concrete.getMolten(2304L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 4), 100, (int) (GT_Values.V[5] - (GT_Values.V[5] / 10))); for (int i = 0; i < ItemList.HATCHES_INPUT.length; i++) - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.HATCHES_INPUT[i].get(1L), new ItemStack(ConfigBlocks.blockTube,1,4)},Materials.Thaumium.getMolten(288L),EHatch[i],100,(int)(GT_Values.V[i]-(GT_Values.V[i]/10))); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.HATCHES_INPUT[i].get(1L), new ItemStack(ConfigBlocks.blockTube, 1, 4)}, Materials.Thaumium.getMolten(288L), EHatch[i], 100, (int) (GT_Values.V[i] - (GT_Values.V[i] / 10))); } - public void runlate(){ - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Items.book), GT_OreDictUnificator.get(OrePrefixes.circuit,Materials.Basic,1L), new ItemStack(ConfigItems.itemShard,1, OreDictionary.WILDCARD_VALUE)},GT_Values.NF,mkbook(),128,64); + public void runlate() { + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Items.book), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1L), new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE)}, GT_Values.NF, mkbook(), 128, 64); } } diff --git a/src/main/java/emt/gthandler/common/tileentities/machines/multi/generator/EMT_Large_Essentia_Gen.java b/src/main/java/emt/gthandler/common/tileentities/machines/multi/generator/EMT_Large_Essentia_Gen.java index ecafd0c..fc927b9 100644 --- a/src/main/java/emt/gthandler/common/tileentities/machines/multi/generator/EMT_Large_Essentia_Gen.java +++ b/src/main/java/emt/gthandler/common/tileentities/machines/multi/generator/EMT_Large_Essentia_Gen.java @@ -25,217 +25,213 @@ import java.util.ArrayList; public class EMT_Large_Essentia_Gen extends GT_MetaTileEntity_MultiBlockBase { - public ArrayList mEssentiaHatches = new ArrayList(); - private static final byte CASING_INDEX = 2; - private byte tick = 0; - private boolean has_lube = false; + private static final byte CASING_INDEX = 2; + public ArrayList mEssentiaHatches = new ArrayList(); + private byte tick = 0; + private boolean has_lube = false; - public EMT_Large_Essentia_Gen(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } + public EMT_Large_Essentia_Gen(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } - public EMT_Large_Essentia_Gen(String aName) { - super(aName); - } + public EMT_Large_Essentia_Gen(String aName) { + super(aName); + } - @Override - public String[] getDescription() { - return new String[]{ - "Controller Block for the Large Essentia Generator.", - "Produces energy from magical essentia decay.", - "Size(WxHxD): 7x4x7, Controller (Bottom, Center)", - "Top-Middle 5x1x5 layer are Muffler Hatches", - "Middle 5x2x5 layer are Essentia Diffusion Cells", - "Everything from here on goes either in the bottom or on the sides", - "1x Fluid Input Hatch", - "1x Essentia Input Hatch", - "1x Dynamo Hatches", - "1x Maintenance Hatch", - "The outer hull is made out of Magic Containing Casings", - "Produces 20x more than the singleblock generator per essentia", - "Causes magical and serious conventional pollution", - "Needs 1L Lubricant per second or will cause way more conventional pollution", - "Needs 10 " + EMTTextHelper.LIGHT_BLUE +"Aqua"+ EMTTextHelper.LIGHT_GRAY +" cVis per second or will cause way more magical pollution", - "Added by EMT", - "Made by bartimaeusnek" - }; - } + @Override + public String[] getDescription() { + return new String[]{ + "Controller Block for the Large Essentia Generator.", + "Produces energy from magical essentia decay.", + "Size(WxHxD): 7x4x7, Controller (Bottom, Center)", + "Top-Middle 5x1x5 layer are Muffler Hatches", + "Middle 5x2x5 layer are Essentia Diffusion Cells", + "Everything from here on goes either in the bottom or on the sides", + "1x Fluid Input Hatch", + "1x Essentia Input Hatch", + "1x Dynamo Hatches", + "1x Maintenance Hatch", + "The outer hull is made out of Magic Containing Casings", + "Produces 20x more than the singleblock generator per essentia", + "Causes magical and serious conventional pollution", + "Needs 1L Lubricant per second or will cause way more conventional pollution", + "Needs 10 " + EMTTextHelper.LIGHT_BLUE + "Aqua" + EMTTextHelper.LIGHT_GRAY + " cVis per second or will cause way more magical pollution", + "Added by EMT", + "Made by bartimaeusnek" + }; + } - public int getCurrentEfficiency(ItemStack itemStack) { - return this.mEfficiency - (this.getIdealStatus() - this.getRepairStatus()) * this.getMaxEfficiency(itemStack) / 10; - } + public int getCurrentEfficiency(ItemStack itemStack) { + return this.mEfficiency - (this.getIdealStatus() - this.getRepairStatus()) * this.getMaxEfficiency(itemStack) / 10; + } - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone){ - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[CASING_INDEX], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER)}; - } - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[CASING_INDEX]}; - } + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[CASING_INDEX], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER)}; + } + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[CASING_INDEX]}; + } - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity arg0) { - return new EMT_Large_Essentia_Gen(this.mName); - } + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity arg0) { + return new EMT_Large_Essentia_Gen(this.mName); + } - @Override - public int[] getAccessibleSlotsFromSide(int p_94128_1_) { - // TODO Auto-generated method stub - return new int[0]; - } + @Override + public int[] getAccessibleSlotsFromSide(int p_94128_1_) { + // TODO Auto-generated method stub + return new int[0]; + } - @Override - public boolean canInsertItem(int p_102007_1_, ItemStack p_102007_2_, int p_102007_3_) { - // TODO Auto-generated method stub - return false; - } + @Override + public boolean canInsertItem(int p_102007_1_, ItemStack p_102007_2_, int p_102007_3_) { + // TODO Auto-generated method stub + return false; + } - @Override - public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) { - // TODO Auto-generated method stub - return false; - } + @Override + public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) { + // TODO Auto-generated method stub + return false; + } - @Override - public int getSizeInventory() { - return 0; - } + @Override + public int getSizeInventory() { + return 0; + } - @Override - public ItemStack getStackInSlot(int p_70301_1_) { - // TODO Auto-generated method stub - return null; - } + @Override + public ItemStack getStackInSlot(int p_70301_1_) { + // TODO Auto-generated method stub + return null; + } - @Override - public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) { - // TODO Auto-generated method stub - return null; - } + @Override + public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) { + // TODO Auto-generated method stub + return null; + } - @Override - public ItemStack getStackInSlotOnClosing(int p_70304_1_) { - // TODO Auto-generated method stub - return null; - } + @Override + public ItemStack getStackInSlotOnClosing(int p_70304_1_) { + // TODO Auto-generated method stub + return null; + } - @Override - public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) { - // TODO Auto-generated method stub - - } + @Override + public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) { + // TODO Auto-generated method stub - @Override - public String getInventoryName() { - // TODO Auto-generated method stub - return this.mName; - } + } - @Override - public boolean hasCustomInventoryName() { - // TODO Auto-generated method stub - return true; - } + @Override + public String getInventoryName() { + // TODO Auto-generated method stub + return this.mName; + } - @Override - public int getInventoryStackLimit() { - // TODO Auto-generated method stub - return 0; - } + @Override + public boolean hasCustomInventoryName() { + // TODO Auto-generated method stub + return true; + } - @Override - public void markDirty() { - // TODO Auto-generated method stub - - } + @Override + public int getInventoryStackLimit() { + // TODO Auto-generated method stub + return 0; + } - @Override - public boolean isUseableByPlayer(EntityPlayer p_70300_1_) { - // TODO Auto-generated method stub - return true; - } + @Override + public void markDirty() { + // TODO Auto-generated method stub - @Override - public void openInventory() { - // TODO Auto-generated method stub - - } + } - @Override - public void closeInventory() { - // TODO Auto-generated method stub - - } + @Override + public boolean isUseableByPlayer(EntityPlayer p_70300_1_) { + // TODO Auto-generated method stub + return true; + } - @Override - public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { - // TODO Auto-generated method stub - return false; - } + @Override + public void openInventory() { + // TODO Auto-generated method stub - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack arg1) { + } - final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 3; - final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 3; + @Override + public void closeInventory() { + // TODO Auto-generated method stub - for (int x = -3; x <= 3; x++) { - for (int z = -3; z <= 3; z++) { - for (int h = 0; h <= 3; h++) { - final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, h, zDir + z); + } - if (!((x == -3) || (x == 3) || (z == -3) || (z == 3))) { - // Muffler on top. - if ((h == 3)) { - if (!this.addMufflerToMachineList(tTileEntity, CASING_INDEX)) { - return false; - } - } else if (h != 0) { - //inside Special Blocks - if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z) != EMT_CasingBlock.EMT_GT_BLOCKS[0]) - return false; - else if ((aBaseMetaTileEntity.getMetaIDOffset(xDir + x, h, zDir + z) != 1)) - return false; - } - else - if (!(this.addEssetiaHatchToList(tTileEntity,CASING_INDEX)||this.addDynamoToMachineList(tTileEntity,CASING_INDEX)||this.addMaintenanceToMachineList(tTileEntity,CASING_INDEX)||this.addInputToMachineList(tTileEntity,CASING_INDEX))) - //ground still casings - if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z) != EMT_CasingBlock.EMT_GT_BLOCKS[0]) - return false; - else if ((aBaseMetaTileEntity.getMetaIDOffset(xDir + x, h, zDir + z) != 0)) - return false; + @Override + public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { + // TODO Auto-generated method stub + return false; + } - } - else if (h != 0) { - //walls - if (!(this.addEssetiaHatchToList(tTileEntity,CASING_INDEX)||this.addDynamoToMachineList(tTileEntity,CASING_INDEX)||this.addMaintenanceToMachineList(tTileEntity,CASING_INDEX)||this.addInputToMachineList(tTileEntity,CASING_INDEX))) - if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z) != EMT_CasingBlock.EMT_GT_BLOCKS[0]) - return false; - else if ((aBaseMetaTileEntity.getMetaIDOffset(xDir + x, h, zDir + z) != 0)) - return false; - } - else if (h == 0 ){ - //top and bottom corners - if (!(this.addEssetiaHatchToList(tTileEntity,CASING_INDEX)||this.addDynamoToMachineList(tTileEntity,CASING_INDEX)||this.addMaintenanceToMachineList(tTileEntity,CASING_INDEX)||this.addInputToMachineList(tTileEntity,CASING_INDEX))) - if (((xDir + x) != 0) || ((zDir + z) != 0)) //controller - if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z) != EMT_CasingBlock.EMT_GT_BLOCKS[0]) - return false; - else if ((aBaseMetaTileEntity.getMetaIDOffset(xDir + x, h, zDir + z) != 0)) - return false; - } + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack arg1) { - } - } - } + final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 3; + final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 3; - if (this.mDynamoHatches.size() != 1) - return false; + for (int x = -3; x <= 3; x++) { + for (int z = -3; z <= 3; z++) { + for (int h = 0; h <= 3; h++) { + final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, h, zDir + z); - if (this.mInputHatches.size() != 1) - return false; + if (!(Math.abs(x) == 3 || Math.abs(z) == 3)) { + // Muffler on top. + if ((h == 3)) { + if (!this.addMufflerToMachineList(tTileEntity, CASING_INDEX)) { + return false; + } + } else if (h != 0) { + //inside Special Blocks + if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z) != EMT_CasingBlock.EMT_GT_BLOCKS[0]) + return false; + else if ((aBaseMetaTileEntity.getMetaIDOffset(xDir + x, h, zDir + z) != 1)) + return false; + } else if (!(this.addEssetiaHatchToList(tTileEntity, CASING_INDEX) || this.addDynamoToMachineList(tTileEntity, CASING_INDEX) || this.addMaintenanceToMachineList(tTileEntity, CASING_INDEX) || this.addInputToMachineList(tTileEntity, CASING_INDEX))) + //ground still casings + if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z) != EMT_CasingBlock.EMT_GT_BLOCKS[0]) + return false; + else if ((aBaseMetaTileEntity.getMetaIDOffset(xDir + x, h, zDir + z) != 0)) + return false; - if (this.mMaintenanceHatches.size() != 1) - return false; + } else if (h != 0) { + //walls + if (!(this.addEssetiaHatchToList(tTileEntity, CASING_INDEX) || this.addDynamoToMachineList(tTileEntity, CASING_INDEX) || this.addMaintenanceToMachineList(tTileEntity, CASING_INDEX) || this.addInputToMachineList(tTileEntity, CASING_INDEX))) + if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z) != EMT_CasingBlock.EMT_GT_BLOCKS[0]) + return false; + else if ((aBaseMetaTileEntity.getMetaIDOffset(xDir + x, h, zDir + z) != 0)) + return false; + } else if (h == 0) { + //top and bottom corners + if (!(this.addEssetiaHatchToList(tTileEntity, CASING_INDEX) || this.addDynamoToMachineList(tTileEntity, CASING_INDEX) || this.addMaintenanceToMachineList(tTileEntity, CASING_INDEX) || this.addInputToMachineList(tTileEntity, CASING_INDEX))) + if (((xDir + x) != 0) || ((zDir + z) != 0)) //controller + if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z) != EMT_CasingBlock.EMT_GT_BLOCKS[0]) + return false; + else if ((aBaseMetaTileEntity.getMetaIDOffset(xDir + x, h, zDir + z) != 0)) + return false; + } + + } + } + } + + if (this.mDynamoHatches.size() != 1) + return false; + + if (this.mInputHatches.size() != 1) + return false; + + if (this.mMaintenanceHatches.size() != 1) + return false; /* //repair shit debug shit @@ -246,62 +242,68 @@ public class EMT_Large_Essentia_Gen extends GT_MetaTileEntity_MultiBlockBase { this.mSolderingTool = true; this.mCrowbar = true; */ - return true; - } + return true; + } - private boolean addEssetiaHatchToList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex){ - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } else if (aMetaTileEntity instanceof EssentiaHatch) { - ((EssentiaHatch)aMetaTileEntity).updateTexture(aBaseCasingIndex); - return this.mEssentiaHatches.add((EssentiaHatch)aMetaTileEntity); - } else { - return false; - } - } - } + public boolean addInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity instanceof EssentiaHatch) + return addEssetiaHatchToList(aTileEntity, aBaseCasingIndex); + return super.addInputToMachineList(aTileEntity, aBaseCasingIndex); + } + + private boolean addEssetiaHatchToList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } else if (aMetaTileEntity instanceof EssentiaHatch) { + ((EssentiaHatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + return this.mEssentiaHatches.add((EssentiaHatch) aMetaTileEntity); + } else { + return false; + } + } + } - private void make_energy(){ - AspectList fuel = this.mEssentiaHatches.get(0).getAspects(); - double cached = 0; + private void make_energy() { + AspectList fuel = this.mEssentiaHatches.get(0).getAspects(); + double cached = 0; - ++tick; + ++tick; - //make energy - for (final Aspect A : fuel.aspects.keySet()) { - if (fuel.getAmount(A) > 0 ) { - double burnvalue = EMTEssentiasOutputs.outputs.get(A.getTag()).doubleValue(); - cached += (burnvalue / 20D); - cached = Math.ceil(cached); + //make energy + for (final Aspect A : fuel.aspects.keySet()) { + if (fuel.getAmount(A) > 0) { + double burnvalue = EMTEssentiasOutputs.outputs.get(A.getTag()).doubleValue(); + cached += (burnvalue / 20D); + cached = Math.ceil(cached); - if (tick % 20 == 0) { //every second consume 1 essentia - //consume essentia and remove it from the Aspect List if its 0 - this.mEssentiaHatches.get(0).getAspects().reduce(A, 1); - if (this.mEssentiaHatches.get(0).getAspects().getAmount(A)==0) - this.mEssentiaHatches.get(0).getAspects().remove(A); - } - } - } + if (tick % 20 == 0) { //every second consume 1 essentia + //consume essentia and remove it from the Aspect List if its 0 + this.mEssentiaHatches.get(0).getAspects().reduce(A, 1); + if (this.mEssentiaHatches.get(0).getAspects().getAmount(A) == 0) + this.mEssentiaHatches.get(0).getAspects().remove(A); + } + } + } - if (tick % 20 == 0){ - //consume lubricant - if (has_lube) - this.mInputHatches.get(0).getFluid().amount -= 1; + if (tick % 20 == 0) { + //consume lubricant + if (has_lube) + this.mInputHatches.get(0).getFluid().amount -= 1; - tick = 0; //reset ticktimer - } + tick = 0; //reset ticktimer + } - //transfer energy into mEU - this.mEUt = (int) Math.ceil(cached); - } + //transfer energy into mEU + this.mEUt = (int) Math.ceil(cached); + } - @Override - public boolean checkRecipe(ItemStack arg0) { + @Override + public boolean checkRecipe(ItemStack arg0) { /* if (!this.getBaseMetaTileEntity().isActive()) if (this.mEfficiency > 100) @@ -309,96 +311,96 @@ public class EMT_Large_Essentia_Gen extends GT_MetaTileEntity_MultiBlockBase { else this.mEfficiency = 100; */ - if (this.mEssentiaHatches.get(0).fuelleft() > 0){ - this.mMaxProgresstime=1; - this.mProgresstime=0; - } + if (this.mEssentiaHatches.get(0).fuelleft() > 0) { + this.mMaxProgresstime = 1; + this.mProgresstime = 0; + } - return this.mEssentiaHatches.get(0).fuelleft() > 0; - } + return this.mEssentiaHatches.get(0).fuelleft() > 0; + } - @Override - public boolean onRunningTick(ItemStack aStack) { + @Override + public boolean onRunningTick(ItemStack aStack) { - if (tick % 20 == 0) {//every second - //highers eff to max by 0.16% every running tick = 3,2% every second - if (this.mEfficiency < this.getMaxEfficiency(null) - 320) - this.mEfficiency += 320; - else - this.mEfficiency = getMaxEfficiency(null); + if (tick % 20 == 0) {//every second + //highers eff to max by 0.16% every running tick = 3,2% every second + if (this.mEfficiency < this.getMaxEfficiency(null) - 320) + this.mEfficiency += 320; + else + this.mEfficiency = getMaxEfficiency(null); - //check for Lubricant - this.has_lube = this.mInputHatches.get(0).getFluid() != null && this.mInputHatches.get(0).getFluid().isFluidEqual(Materials.Lubricant.getFluid(1L)) && this.mInputHatches.get(0).getFluidAmount() > 0; - } + //check for Lubricant + this.has_lube = this.mInputHatches.get(0).getFluid() != null && this.mInputHatches.get(0).getFluid().isFluidEqual(Materials.Lubricant.getFluid(1L)) && this.mInputHatches.get(0).getFluidAmount() > 0; + } - if (tick % 2 == 0) {//every 2nd tick + if (tick % 2 == 0) {//every 2nd tick - final XSTR R = new XSTR(); - final World WORLD=this.getBaseMetaTileEntity().getWorld(); - int x = this.getBaseMetaTileEntity().getXCoord(); - int y = this.getBaseMetaTileEntity().getYCoord(); - int z = this.getBaseMetaTileEntity().getZCoord(); + final XSTR R = new XSTR(); + final World WORLD = this.getBaseMetaTileEntity().getWorld(); + int x = this.getBaseMetaTileEntity().getXCoord(); + int y = this.getBaseMetaTileEntity().getYCoord(); + int z = this.getBaseMetaTileEntity().getZCoord(); - //if out of aqua, make much flux but to not stop. - boolean outOfcVis = VisNetHandler.drainVis(WORLD, x, y, z, Aspect.WATER, 10) <= 9; + //if out of aqua, make much flux but to not stop. + boolean outOfcVis = VisNetHandler.drainVis(WORLD, x, y, z, Aspect.WATER, 10) <= 9; - //Random Change of a bit of Flux Gas. - final int RANDOMHATCH = R.nextInt(this.mMufflerHatches.size()); + //Random Change of a bit of Flux Gas. + final int RANDOMHATCH = R.nextInt(this.mMufflerHatches.size()); - //gets a chanche to release flux gas based on missing efficiency, min 1% - if ((R.nextInt(getMaxEfficiency(null)) > (this.mEfficiency > 100 ? this.mEfficiency : 100)) || outOfcVis) { - x = this.mMufflerHatches.get(RANDOMHATCH).getBaseMetaTileEntity().getXCoord(); - y = this.mMufflerHatches.get(RANDOMHATCH).getBaseMetaTileEntity().getYCoord() + 1; - z = this.mMufflerHatches.get(RANDOMHATCH).getBaseMetaTileEntity().getZCoord(); - WORLD.setBlock(x, y, z, ConfigBlocks.blockFluxGas, R.nextInt(8), 3); - } - } + //gets a chanche to release flux gas based on missing efficiency, min 1% + if ((R.nextInt(getMaxEfficiency(null)) > (this.mEfficiency > 100 ? this.mEfficiency : 100)) || outOfcVis) { + x = this.mMufflerHatches.get(RANDOMHATCH).getBaseMetaTileEntity().getXCoord(); + y = this.mMufflerHatches.get(RANDOMHATCH).getBaseMetaTileEntity().getYCoord() + 1; + z = this.mMufflerHatches.get(RANDOMHATCH).getBaseMetaTileEntity().getZCoord(); + WORLD.setBlock(x, y, z, ConfigBlocks.blockFluxGas, R.nextInt(8), 3); + } + } - make_energy(); - ++this.mProgresstime; - return super.onRunningTick(aStack); - } + make_energy(); + ++this.mProgresstime; + return super.onRunningTick(aStack); + } - @Override - public boolean explodesOnComponentBreak(ItemStack arg0) { - return false; - } + @Override + public boolean explodesOnComponentBreak(ItemStack arg0) { + return false; + } - @Override - public int getDamageToComponent(ItemStack arg0) { - // TODO Auto-generated method stub - return 0; - } + @Override + public int getDamageToComponent(ItemStack arg0) { + // TODO Auto-generated method stub + return 0; + } - @Override - public int getMaxEfficiency(ItemStack arg0) { - // TODO Auto-generated method stub - return 10000; - } + @Override + public int getMaxEfficiency(ItemStack arg0) { + // TODO Auto-generated method stub + return 10000; + } - @Override - public int getPollutionPerTick(ItemStack arg0) { - return has_lube ? 50 : 1000; - } + @Override + public int getPollutionPerTick(ItemStack arg0) { + return has_lube ? 50 : 1000; + } - @Override - public boolean isCorrectMachinePart(ItemStack arg0) { - // TODO Auto-generated method stub - return true; - } + @Override + public boolean isCorrectMachinePart(ItemStack arg0) { + // TODO Auto-generated method stub + return true; + } - @Override - public boolean isGivingInformation() { - return true; - } + @Override + public boolean isGivingInformation() { + return true; + } - @Override - public String[] getInfoData() { - String[] old = super.getInfoData(); - old[2]="Produces "+EMTTextHelper.RED+mEUt+EMTTextHelper.WHITE+"EU/t"; - return old; - } + @Override + public String[] getInfoData() { + String[] old = super.getInfoData(); + old[2] = "Produces " + EMTTextHelper.RED + mEUt + EMTTextHelper.WHITE + "EU/t"; + return old; + } /* @Override public void explodeMultiblock() { diff --git a/src/main/java/emt/init/EMTAutogeneratedGens.java b/src/main/java/emt/init/EMTAutogeneratedGens.java deleted file mode 100644 index 55cd985..0000000 --- a/src/main/java/emt/init/EMTAutogeneratedGens.java +++ /dev/null @@ -1,32 +0,0 @@ -package emt.init; - -import cpw.mods.fml.common.registry.GameRegistry; -import emt.block.BlockReflectedGen; -import emt.tile.generator.TileEntityBaseGenerator; -import emt.tile.generator.TileEntityReflexionGen; - -public class EMTAutogeneratedGens - implements Runnable -{ - public static BlockReflectedGen[] BRG; - public static TileEntityReflexionGen TFG = new TileEntityReflexionGen(); - private static short sets; - - public void run() - { - sets = (short)(TileEntityReflexionGen.L.size() / 16); - if (TileEntityReflexionGen.L.size() % 16 != 0) { - sets = (short)(sets + 1); - } - BRG = new BlockReflectedGen[sets]; - for (short i = 0; i < sets; ++i) { - BRG[i] = new BlockReflectedGen("EGenerator.Set." + Short.toString(i), i); - } - // for (int i = 0; i < TileEntityReflexionGen.L.size(); i++) { - GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "TileEntityBaseGenerator");// + TileEntityReflexionGen.L.get(i)); - //} - for (short i = 0; i < sets; i = (short)(i + 1)) { - GameRegistry.registerBlock(BRG[i], "EGenerator.Set." + Short.toString(i)); - } - } -} diff --git a/src/main/java/emt/init/EMTBlocks.java b/src/main/java/emt/init/EMTBlocks.java index 41a183f..b23e548 100644 --- a/src/main/java/emt/init/EMTBlocks.java +++ b/src/main/java/emt/init/EMTBlocks.java @@ -1,68 +1,70 @@ package emt.init; import cpw.mods.fml.common.registry.GameRegistry; -import emt.block.BlockElectricCloud; -import emt.block.BlockEssentiaGenerators; -import emt.block.BlockMachines; -import emt.block.BlockPortableNode; -import emt.block.BlockShield; -import emt.block.BlockSolars; +import emt.block.*; import emt.item.block.ItemBlockElectricCloud; import emt.item.block.ItemBlockEssentiaGenerators; import emt.item.block.ItemBlockMachines; import emt.item.block.ItemBlockSolars; +import emt.tile.solar.Solars; import ic2.api.item.IC2Items; import net.minecraft.block.Block; - -import static thaumcraft.api.ThaumcraftApi.*; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; +import static thaumcraft.api.ThaumcraftApi.registerObjectTag; + public class EMTBlocks { - public static Block portableNode, essentiaGens, shield, emtSolars, emtMachines, emtSolars2, electricCloud; + public static Block portableNode, essentiaGens, shield, emtMachines, electricCloud; - public static void registerBlocks() { - portableNode = new BlockPortableNode("portablenode"); - GameRegistry.registerBlock(portableNode, "PortableNode"); + public static Block[] solars = new Block[Solars.getCountOfInstances()]; - shield = new BlockShield("shield"); - GameRegistry.registerBlock(shield, "ShieldBlock"); + public static void registerBlocks() { + portableNode = new BlockPortableNode("portablenode"); + GameRegistry.registerBlock(portableNode, "PortableNode"); - emtSolars = new BlockSolars("solar", 16, 0); - GameRegistry.registerBlock(emtSolars, ItemBlockSolars.class, "EMTSolars"); + shield = new BlockShield("shield"); + GameRegistry.registerBlock(shield, "ShieldBlock"); - emtSolars2 = new BlockSolars("solar2", 5, 1); - GameRegistry.registerBlock(emtSolars2, ItemBlockSolars.class, "EMTSolars2"); + for (int i = 0; i < solars.length; i++) { + if (i == 0) { + solars[i] = new BlockSolars("solar", Solars.getCountOfMetas(i), i); + GameRegistry.registerBlock(solars[i], ItemBlockSolars.class, "EMTSolars"); + } else { + solars[i] = new BlockSolars("solar" + (i + 1), Solars.getCountOfMetas(i), i); + GameRegistry.registerBlock(solars[i], ItemBlockSolars.class, "EMTSolars" + (i + 1)); + } + } - emtMachines = new BlockMachines("machine"); - GameRegistry.registerBlock(emtMachines, ItemBlockMachines.class, "EMTMachines"); + emtMachines = new BlockMachines("machine"); + GameRegistry.registerBlock(emtMachines, ItemBlockMachines.class, "EMTMachines"); - essentiaGens = new BlockEssentiaGenerators("essentia"); - GameRegistry.registerBlock(essentiaGens, ItemBlockEssentiaGenerators.class, "EssentiaGenerators"); + essentiaGens = new BlockEssentiaGenerators("essentia"); + GameRegistry.registerBlock(essentiaGens, ItemBlockEssentiaGenerators.class, "EssentiaGenerators"); - electricCloud = new BlockElectricCloud("electricCloud"); - GameRegistry.registerBlock(electricCloud, ItemBlockElectricCloud.class, "electricCloud"); - } + electricCloud = new BlockElectricCloud("electricCloud"); + GameRegistry.registerBlock(electricCloud, ItemBlockElectricCloud.class, "electricCloud"); + } - public static void addAspects() { - registerObjectTag(IC2Items.getItem("rubberTrampoline"), new AspectList().add(Aspect.AIR, 5)); - registerObjectTag(IC2Items.getItem("ironFence"), new AspectList().add(Aspect.ENERGY, 1).add(Aspect.METAL, 2).add(Aspect.WEATHER, 1)); - registerObjectTag(IC2Items.getItem("reinforcedGlass"), new AspectList().add(Aspect.METAL, 2).add(Aspect.COLD, 2)); - registerObjectTag(IC2Items.getItem("scaffold"), new AspectList().add(Aspect.TREE, 4)); - registerObjectTag(IC2Items.getItem("ironScaffold"), new AspectList().add(Aspect.METAL, 4)); - registerObjectTag(IC2Items.getItem("generator"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 2).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("waterMill"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 1).add(Aspect.WATER, 2).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("solarPanel"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 1).add(Aspect.LIGHT, 2).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("windMill"), new AspectList().add(Aspect.ENERGY, 1).add(Aspect.WEATHER, 3).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("batBox"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 3).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("cesuUnit"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 4).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("mfeUnit"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 5).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("mfsUnit"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 7).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("ironFurnace"), new AspectList().add(Aspect.METAL, 2).add(Aspect.FIRE, 2).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("electroFurnace"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 1).add(Aspect.FIRE, 3).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("macerator"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 2).add(Aspect.MINE, 2).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("extractor"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 1).add(Aspect.CRAFT, 2).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("compressor"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 2).add(Aspect.VOID, 3).add(Aspect.MECHANISM, 1)); - } + public static void addAspects() { + registerObjectTag(IC2Items.getItem("rubberTrampoline"), new AspectList().add(Aspect.AIR, 5)); + registerObjectTag(IC2Items.getItem("ironFence"), new AspectList().add(Aspect.ENERGY, 1).add(Aspect.METAL, 2).add(Aspect.WEATHER, 1)); + registerObjectTag(IC2Items.getItem("reinforcedGlass"), new AspectList().add(Aspect.METAL, 2).add(Aspect.COLD, 2)); + registerObjectTag(IC2Items.getItem("scaffold"), new AspectList().add(Aspect.TREE, 4)); + registerObjectTag(IC2Items.getItem("ironScaffold"), new AspectList().add(Aspect.METAL, 4)); + registerObjectTag(IC2Items.getItem("generator"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 2).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("waterMill"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 1).add(Aspect.WATER, 2).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("solarPanel"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 1).add(Aspect.LIGHT, 2).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("windMill"), new AspectList().add(Aspect.ENERGY, 1).add(Aspect.WEATHER, 3).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("batBox"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 3).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("cesuUnit"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 4).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("mfeUnit"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 5).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("mfsUnit"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 7).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("ironFurnace"), new AspectList().add(Aspect.METAL, 2).add(Aspect.FIRE, 2).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("electroFurnace"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 1).add(Aspect.FIRE, 3).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("macerator"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 2).add(Aspect.MINE, 2).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("extractor"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 1).add(Aspect.CRAFT, 2).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("compressor"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 2).add(Aspect.VOID, 3).add(Aspect.MECHANISM, 1)); + } } diff --git a/src/main/java/emt/init/EMTEntities.java b/src/main/java/emt/init/EMTEntities.java index 48c8914..882bcc7 100644 --- a/src/main/java/emt/init/EMTEntities.java +++ b/src/main/java/emt/init/EMTEntities.java @@ -12,29 +12,29 @@ import net.minecraft.entity.EntityList.EntityEggInfo; public class EMTEntities { - private static int startEID = 300; - private static int entityIDs = 0; + private static int startEID = 300; + private static int entityIDs = 0; - private static int getUniqueEntityID() { - do { - startEID++; - } - while (EntityList.getStringFromID(startEID) != null); - return startEID; - } + private static int getUniqueEntityID() { + do { + startEID++; + } + while (EntityList.getStringFromID(startEID) != null); + return startEID; + } - public static void registerEntityEgg(Class entity, int colPrim, int colSec) { - int id = getUniqueEntityID(); - EntityList.IDtoClassMapping.put(id, entity); - EntityList.entityEggs.put(id, new EntityEggInfo(id, colPrim, colSec)); - return; - } + public static void registerEntityEgg(Class entity, int colPrim, int colSec) { + int id = getUniqueEntityID(); + EntityList.IDtoClassMapping.put(id, entity); + EntityList.entityEggs.put(id, new EntityEggInfo(id, colPrim, colSec)); + return; + } - public static void registerEMTEntities() { - EntityRegistry.registerModEntity(EntityLaser.class, "laser", entityIDs++, EMT.instance, 80, 3, true); - EntityRegistry.registerModEntity(EntityArcher.class, "archer", entityIDs++, EMT.instance, 80, 3, true); - registerEntityEgg(EntityArcher.class, 0x99111F, 0xE5685); - EntityRegistry.registerModEntity(EntityShield.class, "shield", entityIDs++, EMT.instance, 80, 3, true); - EntityRegistry.registerModEntity(EntityEnergyBall.class, "energyBall", entityIDs++, EMT.instance, 80, 60, true); - } + public static void registerEMTEntities() { + EntityRegistry.registerModEntity(EntityLaser.class, "laser", entityIDs++, EMT.instance, 80, 3, true); + EntityRegistry.registerModEntity(EntityArcher.class, "archer", entityIDs++, EMT.instance, 80, 3, true); + registerEntityEgg(EntityArcher.class, 0x99111F, 0xE5685); + EntityRegistry.registerModEntity(EntityShield.class, "shield", entityIDs++, EMT.instance, 80, 3, true); + EntityRegistry.registerModEntity(EntityEnergyBall.class, "energyBall", entityIDs++, EMT.instance, 80, 60, true); + } } diff --git a/src/main/java/emt/init/EMTItems.java b/src/main/java/emt/init/EMTItems.java index f3394ac..94050f2 100644 --- a/src/main/java/emt/init/EMTItems.java +++ b/src/main/java/emt/init/EMTItems.java @@ -1,6 +1,5 @@ package emt.init; -import ic2.core.init.InternalName; import cpw.mods.fml.common.registry.GameRegistry; import emt.EMT; import emt.item.ItemElectricScribingTools; @@ -19,12 +18,7 @@ import emt.item.armor.wings.ItemFeatherWing; import emt.item.armor.wings.ItemNanoWing; import emt.item.armor.wings.ItemQuantumWing; import emt.item.armor.wings.ItemThaumiumReinforcedWing; -import emt.item.focus.ItemChargeFocus; -import emt.item.focus.ItemChristmasFocus; -import emt.item.focus.ItemExplosionFocus; -import emt.item.focus.ItemEnergyBallFocus; -import emt.item.focus.ItemShieldFocus; -import emt.item.focus.ItemWandChargingFocus; +import emt.item.focus.*; import emt.item.tool.ItemElectricHoeGrowth; import emt.item.tool.ItemElectricThorHammer; import emt.item.tool.ItemThorHammer; @@ -37,6 +31,7 @@ import emt.item.tool.drill.ItemThaumiumDrill; import emt.item.tool.omnitool.ItemOmnitoolDiamond; import emt.item.tool.omnitool.ItemOmnitoolIron; import emt.item.tool.omnitool.ItemOmnitoolThaumium; +import ic2.core.init.InternalName; import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; @@ -46,147 +41,147 @@ import thaumcraft.api.ThaumcraftApi; public class EMTItems { - public static Item onering; - public static Item materials; - public static Item craftingComponents; - public static Item focusChristmas; - public static Item thaumiumDrill; - public static Item thaumiumChainsaw; - public static Item quantumThaumicHelmet; - public static Item diamondChainsaw; - public static Item ironOmnitool; - public static Item diamondOmnitool; - public static Item thaumiumOmnitool; - public static Item nanoThaumicHelmet; - public static Item explosionFocus; - public static Item christmasFocus; - public static Item shieldFocus; - public static Item energyBallFocus; - public static Item electricGoggles; - public static Item streamChainsaw; - public static Item rockbreakerDrill; - public static Item solarHelmetRevealing; - public static Item thorHammer; - public static Item taintedThorHammer; - public static Item electricThorHammer; - public static Item electricBootsTraveller; - public static Item quantumBootsTraveller; - public static Item nanoBootsTraveller; - public static Item electricScribingTools; - public static Item itemEMTItems; - public static Item electricHoeGrowth; - public static Item chargeFocus; - public static Item emtBauble; - public static Item wandChargeFocus; - public static Item featherWing; - public static Item thaumiumWing; - public static Item nanoWing; - public static Item quantumWing; - public static Item quantumArmor; - public static ItemArmor.ArmorMaterial featherWingMaterial = EnumHelper.addArmorMaterial("FEATEHRWiNG", 1, new int[] { 2, 2, 2, 2 }, 6); + public static Item onering; + public static Item materials; + public static Item craftingComponents; + public static Item focusChristmas; + public static Item thaumiumDrill; + public static Item thaumiumChainsaw; + public static Item quantumThaumicHelmet; + public static Item diamondChainsaw; + public static Item ironOmnitool; + public static Item diamondOmnitool; + public static Item thaumiumOmnitool; + public static Item nanoThaumicHelmet; + public static Item explosionFocus; + public static Item christmasFocus; + public static Item shieldFocus; + public static Item energyBallFocus; + public static Item electricGoggles; + public static Item streamChainsaw; + public static Item rockbreakerDrill; + public static Item solarHelmetRevealing; + public static Item thorHammer; + public static Item taintedThorHammer; + public static Item electricThorHammer; + public static Item electricBootsTraveller; + public static Item quantumBootsTraveller; + public static Item nanoBootsTraveller; + public static Item electricScribingTools; + public static Item itemEMTItems; + public static Item electricHoeGrowth; + public static Item chargeFocus; + public static Item emtBauble; + public static Item wandChargeFocus; + public static Item featherWing; + public static Item thaumiumWing; + public static Item nanoWing; + public static Item quantumWing; + public static Item quantumArmor; + public static ItemArmor.ArmorMaterial featherWingMaterial = EnumHelper.addArmorMaterial("FEATEHRWiNG", 1, new int[]{2, 2, 2, 2}, 6); - public static void registerItems() { - itemEMTItems = new ItemMaterials(); - GameRegistry.registerItem(itemEMTItems, "EMTItems"); - OreDictionary.registerOre("plateThaumium", new ItemStack(itemEMTItems, 1, 5)); - OreDictionary.registerOre("slimeball", new ItemStack(itemEMTItems, 1, 8)); + public static void registerItems() { + itemEMTItems = new ItemMaterials(); + GameRegistry.registerItem(itemEMTItems, "EMTItems"); + OreDictionary.registerOre("plateThaumium", new ItemStack(itemEMTItems, 1, 5)); + OreDictionary.registerOre("slimeball", new ItemStack(itemEMTItems, 1, 8)); - emtBauble = new ItemIC2Baubles().setUnlocalizedName(EMT.MOD_ID + ".bauble"); - GameRegistry.registerItem(emtBauble, "EMTBaubles"); + emtBauble = new ItemIC2Baubles().setUnlocalizedName(EMT.MOD_ID + ".bauble"); + GameRegistry.registerItem(emtBauble, "EMTBaubles"); - onering = new ItemOneRing(); - GameRegistry.registerItem(onering, "BaseBaubles"); + onering = new ItemOneRing(); + GameRegistry.registerItem(onering, "BaseBaubles"); - quantumArmor = new ItemInfusedQuantumChestplate(InternalName.itemArmorQuantumChestplate, 1).setUnlocalizedName(EMT.MOD_ID + ".quantum"); + quantumArmor = new ItemInfusedQuantumChestplate(InternalName.itemArmorQuantumChestplate, 1).setUnlocalizedName(EMT.MOD_ID + ".quantum"); - electricGoggles = new ItemElectricGoggles(ItemArmor.ArmorMaterial.IRON, 3, 0).setUnlocalizedName(EMT.MOD_ID + ".goggles.electric"); - GameRegistry.registerItem(electricGoggles, "ElectricGogglesRevealing"); + electricGoggles = new ItemElectricGoggles(ItemArmor.ArmorMaterial.IRON, 3, 0).setUnlocalizedName(EMT.MOD_ID + ".goggles.electric"); + GameRegistry.registerItem(electricGoggles, "ElectricGogglesRevealing"); - nanoThaumicHelmet = new ItemNanoGoggles(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(EMT.MOD_ID + ".goggles.nano"); - GameRegistry.registerItem(nanoThaumicHelmet, "NanosuitGogglesRevealing"); + nanoThaumicHelmet = new ItemNanoGoggles(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(EMT.MOD_ID + ".goggles.nano"); + GameRegistry.registerItem(nanoThaumicHelmet, "NanosuitGogglesRevealing"); - quantumThaumicHelmet = new ItemQuantumGoggles(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(EMT.MOD_ID + ".goggles.quantum"); - GameRegistry.registerItem(quantumThaumicHelmet, "QuantumGogglesRevealing"); + quantumThaumicHelmet = new ItemQuantumGoggles(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(EMT.MOD_ID + ".goggles.quantum"); + GameRegistry.registerItem(quantumThaumicHelmet, "QuantumGogglesRevealing"); - solarHelmetRevealing = new ItemSolarHelmetRevealing(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(EMT.MOD_ID + ".goggles.solar"); - GameRegistry.registerItem(solarHelmetRevealing, "SolarHelmetRevealing"); + solarHelmetRevealing = new ItemSolarHelmetRevealing(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(EMT.MOD_ID + ".goggles.solar"); + GameRegistry.registerItem(solarHelmetRevealing, "SolarHelmetRevealing"); - electricBootsTraveller = new ItemElectricBootsTraveller(ItemArmor.ArmorMaterial.IRON, 3, 3).setUnlocalizedName(EMT.MOD_ID + ".boots.traveller.electric"); - GameRegistry.registerItem(electricBootsTraveller, "ElectricBootsTraveller"); + electricBootsTraveller = new ItemElectricBootsTraveller(ItemArmor.ArmorMaterial.IRON, 3, 3).setUnlocalizedName(EMT.MOD_ID + ".boots.traveller.electric"); + GameRegistry.registerItem(electricBootsTraveller, "ElectricBootsTraveller"); - nanoBootsTraveller = new ItemNanoBootsTraveller(ItemArmor.ArmorMaterial.DIAMOND, 3, 3).setUnlocalizedName(EMT.MOD_ID + ".boots.traveller.nano"); - GameRegistry.registerItem(nanoBootsTraveller, "NanoBootsTraveller"); + nanoBootsTraveller = new ItemNanoBootsTraveller(ItemArmor.ArmorMaterial.DIAMOND, 3, 3).setUnlocalizedName(EMT.MOD_ID + ".boots.traveller.nano"); + GameRegistry.registerItem(nanoBootsTraveller, "NanoBootsTraveller"); - quantumBootsTraveller = new ItemQuantumBootsTraveller(ItemArmor.ArmorMaterial.DIAMOND, 3, 3).setUnlocalizedName(EMT.MOD_ID + ".boots.traveller.quantum"); - GameRegistry.registerItem(quantumBootsTraveller, "QuantumBootsTraveller"); + quantumBootsTraveller = new ItemQuantumBootsTraveller(ItemArmor.ArmorMaterial.DIAMOND, 3, 3).setUnlocalizedName(EMT.MOD_ID + ".boots.traveller.quantum"); + GameRegistry.registerItem(quantumBootsTraveller, "QuantumBootsTraveller"); - electricScribingTools = new ItemElectricScribingTools().setUnlocalizedName(EMT.MOD_ID + ".scribingtools.electric"); - GameRegistry.registerItem(electricScribingTools, "ElectricScribingTools"); + electricScribingTools = new ItemElectricScribingTools().setUnlocalizedName(EMT.MOD_ID + ".scribingtools.electric"); + GameRegistry.registerItem(electricScribingTools, "ElectricScribingTools"); - featherWing = new ItemFeatherWing(featherWingMaterial, 7, 1).setUnlocalizedName(EMT.MOD_ID + ".wing.feather"); - GameRegistry.registerItem(featherWing, "FeatherWing"); + featherWing = new ItemFeatherWing(featherWingMaterial, 7, 1).setUnlocalizedName(EMT.MOD_ID + ".wing.feather"); + GameRegistry.registerItem(featherWing, "FeatherWing"); - thaumiumWing = new ItemThaumiumReinforcedWing(ThaumcraftApi.armorMatThaumium, 7, 1).setUnlocalizedName(EMT.MOD_ID + ".wing.thaumium"); - GameRegistry.registerItem(thaumiumWing, "ThaumiumWing"); + thaumiumWing = new ItemThaumiumReinforcedWing(ThaumcraftApi.armorMatThaumium, 7, 1).setUnlocalizedName(EMT.MOD_ID + ".wing.thaumium"); + GameRegistry.registerItem(thaumiumWing, "ThaumiumWing"); - nanoWing = new ItemNanoWing(ItemArmor.ArmorMaterial.DIAMOND, 7, 1).setUnlocalizedName(EMT.MOD_ID + ".wing.nano"); - GameRegistry.registerItem(nanoWing, "NanosuitWing"); + nanoWing = new ItemNanoWing(ItemArmor.ArmorMaterial.DIAMOND, 7, 1).setUnlocalizedName(EMT.MOD_ID + ".wing.nano"); + GameRegistry.registerItem(nanoWing, "NanosuitWing"); - quantumWing = new ItemQuantumWing(ItemArmor.ArmorMaterial.DIAMOND, 7, 1).setUnlocalizedName(EMT.MOD_ID + ".wing.quantum"); - GameRegistry.registerItem(quantumWing, "QuantumWing"); + quantumWing = new ItemQuantumWing(ItemArmor.ArmorMaterial.DIAMOND, 7, 1).setUnlocalizedName(EMT.MOD_ID + ".wing.quantum"); + GameRegistry.registerItem(quantumWing, "QuantumWing"); - thorHammer = new ItemThorHammer().setUnlocalizedName(EMT.MOD_ID + ".hammer"); - GameRegistry.registerItem(thorHammer, "Mjolnir"); + thorHammer = new ItemThorHammer().setUnlocalizedName(EMT.MOD_ID + ".hammer"); + GameRegistry.registerItem(thorHammer, "Mjolnir"); - taintedThorHammer = new ItemThorHammerBroken().setUnlocalizedName(EMT.MOD_ID + ".hammer.broken"); - GameRegistry.registerItem(taintedThorHammer, "TaintedMjolnir"); + taintedThorHammer = new ItemThorHammerBroken().setUnlocalizedName(EMT.MOD_ID + ".hammer.broken"); + GameRegistry.registerItem(taintedThorHammer, "TaintedMjolnir"); - electricThorHammer = new ItemElectricThorHammer().setUnlocalizedName(EMT.MOD_ID + ".hammer.electric"); - GameRegistry.registerItem(electricThorHammer, "SuperchargedMjolnir"); + electricThorHammer = new ItemElectricThorHammer().setUnlocalizedName(EMT.MOD_ID + ".hammer.electric"); + GameRegistry.registerItem(electricThorHammer, "SuperchargedMjolnir"); - thaumiumDrill = new ItemThaumiumDrill().setUnlocalizedName(EMT.MOD_ID + ".drill.thaumium"); - GameRegistry.registerItem(thaumiumDrill, "ThaumiumDrill"); + thaumiumDrill = new ItemThaumiumDrill().setUnlocalizedName(EMT.MOD_ID + ".drill.thaumium"); + GameRegistry.registerItem(thaumiumDrill, "ThaumiumDrill"); - diamondChainsaw = new ItemDiamondChainsaw().setUnlocalizedName(EMT.MOD_ID + ".chainsaw.diamond"); - GameRegistry.registerItem(diamondChainsaw, "DiamondChainsaw"); + diamondChainsaw = new ItemDiamondChainsaw().setUnlocalizedName(EMT.MOD_ID + ".chainsaw.diamond"); + GameRegistry.registerItem(diamondChainsaw, "DiamondChainsaw"); - thaumiumChainsaw = new ItemThaumiumChainsaw().setUnlocalizedName(EMT.MOD_ID + ".chainsaw.thaumium"); - GameRegistry.registerItem(thaumiumChainsaw, "ThaumiumChainsaw"); + thaumiumChainsaw = new ItemThaumiumChainsaw().setUnlocalizedName(EMT.MOD_ID + ".chainsaw.thaumium"); + GameRegistry.registerItem(thaumiumChainsaw, "ThaumiumChainsaw"); - ironOmnitool = new ItemOmnitoolIron().setUnlocalizedName(EMT.MOD_ID + ".omnitool.iron"); - GameRegistry.registerItem(ironOmnitool, "Omnitool"); + ironOmnitool = new ItemOmnitoolIron().setUnlocalizedName(EMT.MOD_ID + ".omnitool.iron"); + GameRegistry.registerItem(ironOmnitool, "Omnitool"); - diamondOmnitool = new ItemOmnitoolDiamond().setUnlocalizedName(EMT.MOD_ID + ".omnitool.diamond"); - GameRegistry.registerItem(diamondOmnitool, "Diamond Omnitool"); + diamondOmnitool = new ItemOmnitoolDiamond().setUnlocalizedName(EMT.MOD_ID + ".omnitool.diamond"); + GameRegistry.registerItem(diamondOmnitool, "Diamond Omnitool"); - thaumiumOmnitool = new ItemOmnitoolThaumium().setUnlocalizedName(EMT.MOD_ID + ".omnitool.thaumium"); - GameRegistry.registerItem(thaumiumOmnitool, "ThaumiumOmnitool"); + thaumiumOmnitool = new ItemOmnitoolThaumium().setUnlocalizedName(EMT.MOD_ID + ".omnitool.thaumium"); + GameRegistry.registerItem(thaumiumOmnitool, "ThaumiumOmnitool"); - streamChainsaw = new ItemStreamChainsaw().setUnlocalizedName(EMT.MOD_ID + ".chainsaw.stream"); - GameRegistry.registerItem(streamChainsaw, "ChainsawStream"); + streamChainsaw = new ItemStreamChainsaw().setUnlocalizedName(EMT.MOD_ID + ".chainsaw.stream"); + GameRegistry.registerItem(streamChainsaw, "ChainsawStream"); - rockbreakerDrill = new ItemRockbreakerDrill().setUnlocalizedName(EMT.MOD_ID + ".drill.rockbreaker"); - GameRegistry.registerItem(rockbreakerDrill, "DrillRockbreaker"); + rockbreakerDrill = new ItemRockbreakerDrill().setUnlocalizedName(EMT.MOD_ID + ".drill.rockbreaker"); + GameRegistry.registerItem(rockbreakerDrill, "DrillRockbreaker"); - electricHoeGrowth = new ItemElectricHoeGrowth().setUnlocalizedName(EMT.MOD_ID + ".hoeofgrowth.electric"); - GameRegistry.registerItem(electricHoeGrowth, "ElectricHoeGrowth"); + electricHoeGrowth = new ItemElectricHoeGrowth().setUnlocalizedName(EMT.MOD_ID + ".hoeofgrowth.electric"); + GameRegistry.registerItem(electricHoeGrowth, "ElectricHoeGrowth"); - explosionFocus = new ItemExplosionFocus(); - GameRegistry.registerItem(explosionFocus, "ExplosionFocus"); + explosionFocus = new ItemExplosionFocus(); + GameRegistry.registerItem(explosionFocus, "ExplosionFocus"); - christmasFocus = new ItemChristmasFocus(); - GameRegistry.registerItem(christmasFocus, "ChristmasFocus"); + christmasFocus = new ItemChristmasFocus(); + GameRegistry.registerItem(christmasFocus, "ChristmasFocus"); - shieldFocus = new ItemShieldFocus(); - GameRegistry.registerItem(shieldFocus, "ShieldFocus"); + shieldFocus = new ItemShieldFocus(); + GameRegistry.registerItem(shieldFocus, "ShieldFocus"); - chargeFocus = new ItemChargeFocus(); - GameRegistry.registerItem(chargeFocus, "ChargingFocus"); + chargeFocus = new ItemChargeFocus(); + GameRegistry.registerItem(chargeFocus, "ChargingFocus"); - wandChargeFocus = new ItemWandChargingFocus(); - GameRegistry.registerItem(wandChargeFocus, "WandChargingFocus"); - - energyBallFocus = new ItemEnergyBallFocus(); - GameRegistry.registerItem(energyBallFocus, "EnergyBallFocus"); - } + wandChargeFocus = new ItemWandChargingFocus(); + GameRegistry.registerItem(wandChargeFocus, "WandChargingFocus"); + + energyBallFocus = new ItemEnergyBallFocus(); + GameRegistry.registerItem(energyBallFocus, "EnergyBallFocus"); + } } \ No newline at end of file diff --git a/src/main/java/emt/init/EMTRecipes.java b/src/main/java/emt/init/EMTRecipes.java index cf138ba..4b18b38 100644 --- a/src/main/java/emt/init/EMTRecipes.java +++ b/src/main/java/emt/init/EMTRecipes.java @@ -5,9 +5,6 @@ import emt.EMT; import emt.util.EMTConfigHandler; import emt.util.EMTCraftingAspects; import emt.util.EMTResearchAspects; - -import static emt.util.EMTRandomHelper.*; - import ic2.api.item.IC2Items; import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputItemStack; @@ -20,9 +17,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.oredict.OreDictionary; - -import static thaumcraft.api.ThaumcraftApi.*; - import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.api.crafting.CrucibleRecipe; @@ -35,466 +29,464 @@ import thaumcraft.common.config.ConfigItems; import java.util.Iterator; +import static emt.util.EMTRandomHelper.getChargedItem; +import static thaumcraft.api.ThaumcraftApi.*; + public class EMTRecipes { - public static ItemStack uuMCell = new ItemStack(EMTItems.itemEMTItems, 1, 15); - - private static void registerShapedRecipes() { - - /** Crafting Recipes **/ - ironOmnitool = GameRegistry.addShapedRecipe(getChargedItem(EMTItems.ironOmnitool, 10), "X", "Z", "Y", 'X', new ItemStack(IC2Items.getItem("chainsaw").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Y', new ItemStack(IC2Items.getItem("miningDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Z', IC2Items.getItem("plateiron")); - diamondChainsaw = GameRegistry.addShapedRecipe(getChargedItem(EMTItems.diamondChainsaw, 10), " X ", "XYX", 'X', new ItemStack(Items.diamond), 'Y', new ItemStack(IC2Items.getItem("chainsaw").getItem(), 1, OreDictionary.WILDCARD_VALUE)); - ductTape = GameRegistry.addShapedRecipe(new ItemStack(EMTItems.itemEMTItems, 1, 9), "XXX", "YYY", "XXX", 'X', new ItemStack(EMTItems.itemEMTItems, 1, 8), 'Y', new ItemStack(Items.paper)); - featherMesh = GameRegistry.addShapedRecipe(new ItemStack(EMTItems.itemEMTItems, 1, 7), "XYX", "YXY", "XYX", 'X', new ItemStack(Items.feather), 'Y', new ItemStack(EMTItems.itemEMTItems, 1, 9)); - featherWing = GameRegistry.addShapedRecipe(new ItemStack(EMTItems.itemEMTItems, 1, 12), "XYZ", "XYZ", "XYZ", 'X', new ItemStack(EMTItems.itemEMTItems, 1, 7), 'Y', new ItemStack(EMTItems.itemEMTItems, 1, 8), 'Z', new ItemStack(EMTItems.itemEMTItems, 1, 11)); - featherWings = GameRegistry.addShapedRecipe(new ItemStack(EMTItems.featherWing), "XX", 'X', new ItemStack(EMTItems.itemEMTItems, 1, 12)); - taintedFeathers = GameRegistry.addShapedRecipe(new ItemStack(EMTItems.itemEMTItems, 1, 13), " X ", "XYX", " X ", 'X', new ItemStack(ConfigItems.itemResource, 1, 12), 'Y', new ItemStack(Items.feather)); - - GameRegistry.addRecipe(IC2Items.getItem("nanoHelmet"), "XYX", "XZX", 'X', IC2Items.getItem("carbonPlate"), 'Y', new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Z', new ItemStack(IC2Items.getItem("nightvisionGoggles").getItem(), 1, OreDictionary.WILDCARD_VALUE)); - GameRegistry.addShapedRecipe(IC2Items.getItem("generator"), "X", "Y", "Z", 'X', new ItemStack(IC2Items.getItem("chargedReBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Y', IC2Items.getItem("machine"), 'Z', new ItemStack(Blocks.furnace)); - GameRegistry.addShapedRecipe(IC2Items.getItem("generator"), "X", "Y", "Z", 'X', IC2Items.getItem("reBattery"), 'Y', IC2Items.getItem("machine"), 'Z', new ItemStack(Blocks.furnace)); - - /** OreDict Crafting Recipes **/ - for (int i = 0; i < OreDictionary.getOres("logWood").size(); i++) { - cardboard = GameRegistry.addShapedRecipe(new ItemStack(EMTItems.itemEMTItems, 1, 11), "XXX", "YYY", "XXX", 'X', new ItemStack(Items.paper), 'Y', OreDictionary.getOres("logWood").get(i)); - } - for (int i = 0; i < OreDictionary.getOres("itemRubber").size(); i++) { - rubberBall = GameRegistry.addShapedRecipe(new ItemStack(EMTItems.itemEMTItems, 1, 10), "XX", "XX", 'X', OreDictionary.getOres("itemRubber").get(i)); - } - - /** Smelting Recipes **/ - GameRegistry.addSmelting(new ItemStack(EMTItems.itemEMTItems, 1, 1), new ItemStack(ConfigItems.itemResource, 1, 6), 0.0F); - GameRegistry.addSmelting(new ItemStack(EMTItems.itemEMTItems, 1, 2), new ItemStack(ConfigItems.itemResource, 1, 6), 0.0F); - GameRegistry.addSmelting(new ItemStack(EMTItems.itemEMTItems, 1, 3), new ItemStack(ConfigItems.itemResource, 1, 3), 0.0F); - GameRegistry.addSmelting(new ItemStack(EMTItems.itemEMTItems, 1, 4), new ItemStack(ConfigItems.itemResource, 1, 3), 0.0F); - GameRegistry.addSmelting(new ItemStack(EMTItems.itemEMTItems, 1, 10), new ItemStack(EMTItems.itemEMTItems, 2, 8), 0.0F); - } - - private static void registerShaplessRecipes() { - } - - private static void registerSmeltingRecipes() { - } - - public static void registerEarlyRecipes() { - registerShapedRecipes(); - registerShaplessRecipes(); - registerSmeltingRecipes(); - } - - public static void registerUUMInfusionRecipes() { - - ItemStack iridium = IC2Items.getItem("iridiumOre").copy(); - iridium.stackSize = 2; - uraniumToIridium = addInfusionCraftingRecipe("UU-Matter Infusion", iridium, 4, EMTCraftingAspects.uuMatterInfusions, IC2Items.getItem("Uran238"), new ItemStack[] { uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell }); - - ItemStack uranium = IC2Items.getItem("Uran238").copy(); - uranium.stackSize = 2; - diamondToUranium = addInfusionCraftingRecipe("UU-Matter Infusion", uranium, 4, EMTCraftingAspects.lesserUUMInfusions, new ItemStack(Items.diamond), new ItemStack[] { uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell }); - - ItemStack diamond = new ItemStack(Items.diamond).copy(); - diamond.stackSize = 1; - goldToDiamond = addInfusionCraftingRecipe("UU-Matter Infusion", diamond, 4, EMTCraftingAspects.cheapUUMInfusions, new ItemStack(Items.gold_ingot), new ItemStack[] { uuMCell, uuMCell, uuMCell, uuMCell }); - - ItemStack gold = new ItemStack(Items.gold_ingot).copy(); - gold.stackSize = 2; - ironToGold = addInfusionCraftingRecipe("UU-Matter Infusion", gold, 4, EMTCraftingAspects.cheapestUUMInfusions, new ItemStack(Items.iron_ingot), new ItemStack[] { uuMCell, uuMCell, uuMCell }); - - ItemStack ironOre = new ItemStack(Blocks.iron_ore).copy(); - ironOre.stackSize = 16; - stoneBricksToIronOre = addInfusionCraftingRecipe("UU-Matter Infusion", ironOre, 4, EMTCraftingAspects.cheapUUMInfusions, new ItemStack(Blocks.stonebrick), new ItemStack[] { uuMCell, uuMCell }); - - /** - * ItemStack copperOre = Items.getItem("copperOre").copy(); BUGGED IN - * 1.6 IF IC2 OREGEN IS DISABLED - **/ - ItemStack copperOre = IC2Items.getItem("crushedCopperOre").copy(); - copperOre.stackSize = 32; - arcaneStoneToCopperOre = addInfusionCraftingRecipe("UU-Matter Infusion", copperOre, 4, EMTCraftingAspects.cheapUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 6), new ItemStack[] { uuMCell, uuMCell }); - - /** - * ItemStack tinOre = Items.getItem("tinOre").copy(); BUGGED IN 1.6 IF - * IC2 OREGEN IS DISABLED - **/ - ItemStack tinOre = IC2Items.getItem("crushedTinOre").copy(); - tinOre.stackSize = 32; - arcaneStoneBricksToTinOre = addInfusionCraftingRecipe("UU-Matter Infusion", tinOre, 4, EMTCraftingAspects.cheapUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 7), new ItemStack[] { uuMCell, uuMCell }); - - /** - * ItemStack leadOre = Items.getItem("leadOre").copy(); BUGGED IN 1.6 IF - * IC2 OREGEN IS DISABLED - **/ - ItemStack leadOre = IC2Items.getItem("crushedLeadOre").copy(); - leadOre.stackSize = 32; - amberBlockToLeadOre = addInfusionCraftingRecipe("UU-Matter Infusion", leadOre, 4, EMTCraftingAspects.cheapUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticOpaque, 1, 0), new ItemStack[] { uuMCell, uuMCell }); - - ItemStack uraniumOre = IC2Items.getItem("uraniumOre").copy(); - uraniumOre.stackSize = 8; - amberBricksToUraniumOre = addInfusionCraftingRecipe("UU-Matter Infusion", uraniumOre, 4, EMTCraftingAspects.lesserUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticOpaque, 1, 1), new ItemStack[] { uuMCell, uuMCell, uuMCell }); - - ItemStack coal = new ItemStack(Items.coal, 1, 0).copy(); - coal.stackSize = 16; - charcoalToCoal = addInfusionCraftingRecipe("UU-Matter Infusion", coal, 4, EMTCraftingAspects.cheapUUMInfusions, new ItemStack(Items.coal, 1, 1), new ItemStack[] { uuMCell, uuMCell }); - - ItemStack stickyResin = IC2Items.getItem("resin").copy(); - stickyResin.stackSize = 21; - shardToResin = addInfusionCraftingRecipe("UU-Matter Infusion", stickyResin, 4, EMTCraftingAspects.cheapUUMInfusions, new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[] { uuMCell, uuMCell, uuMCell }); - - ItemStack redstone = new ItemStack(Items.redstone).copy(); - redstone.stackSize = 24; - shardToRedstone = addInfusionCraftingRecipe("UU-Matter Infusion", redstone, 4, EMTCraftingAspects.cheapUUMInfusions, new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[] { uuMCell, uuMCell, uuMCell }); - - ItemStack lapisLazuli = new ItemStack(Items.dye, 1, 4).copy(); - lapisLazuli.stackSize = 8; - shardToLapis = addInfusionCraftingRecipe("UU-Matter Infusion", lapisLazuli, 4, EMTCraftingAspects.cheapUUMInfusions, new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[] { uuMCell, uuMCell, uuMCell }); + public static ItemStack uuMCell = new ItemStack(EMTItems.itemEMTItems, 1, 15); + public static IRecipe ironOmnitool; + public static IRecipe diamondChainsaw; + public static IRecipe ductTape; + public static IRecipe rubberBall; + public static IRecipe featherMesh; + public static IRecipe cardboard; + public static IRecipe featherWing; + public static IRecipe featherWings; + public static IRecipe taintedFeathers; + public static InfusionRecipe uraniumToIridium; + public static InfusionRecipe diamondToUranium; + public static InfusionRecipe goldToDiamond; + public static InfusionRecipe ironToGold; + public static InfusionRecipe stoneBricksToIronOre; + public static InfusionRecipe arcaneStoneToCopperOre; + public static InfusionRecipe arcaneStoneBricksToTinOre; + public static InfusionRecipe amberBlockToLeadOre; + public static InfusionRecipe amberBricksToUraniumOre; + public static InfusionRecipe charcoalToCoal; + public static InfusionRecipe shardToResin; + public static InfusionRecipe shardToRedstone; + public static InfusionRecipe shardToLapis; + public static InfusionRecipe glowstoneDustToBlock; + public static InfusionRecipe infusedQuantumArmor; + public static InfusionRecipe thaumiumDrill; + public static InfusionRecipe thaumiumChainsaw; + public static InfusionRecipe thaumicQuantumHelmet; + public static InfusionRecipe thaumiumOmnitool; + public static InfusionRecipe thaumicNanoHelmet; + public static InfusionRecipe explosionFocus; + public static InfusionRecipe shieldFocus; + public static InfusionRecipe potentiaGenerator; + public static InfusionRecipe streamChainsaw; + public static InfusionRecipe rockbreakerDrill; + public static InfusionRecipe thorHammer; + public static InfusionRecipe superchargedThorHammer; + public static InfusionRecipe wandRecharger; + public static InfusionRecipe solarHelmetRevealing; + public static InfusionRecipe electricBootsTravel; + public static InfusionRecipe nanoBootsTravel; + public static InfusionRecipe quantumBootsTravel; + public static InfusionRecipe diamondOmnitoolToThaumium; + public static InfusionRecipe etheralProcessor; + public static InfusionRecipe tripleCompressedSolar; + public static InfusionRecipe electricHoeGrowth; + public static InfusionRecipe chargeFocus; + public static InfusionRecipe wandChargeFocus; + public static InfusionRecipe energyBallFocus; + public static InfusionRecipe inventoryChargingRing; + public static InfusionRecipe armorChargingRing; + public static InfusionRecipe nanoWings; + public static InfusionRecipe quantumWings; + public static InfusionRecipe lucrumGenerator; + public static ShapelessArcaneRecipe diamondOmnitool; + public static ShapelessArcaneRecipe tinyUranium; + public static ShapedArcaneRecipe christmasFocus; + public static ShapedArcaneRecipe electricGoggles; + public static ShapedArcaneRecipe electricGoggles2; + public static ShapedArcaneRecipe shieldBlock; + public static ShapedArcaneRecipe compressedSolar; + public static ShapedArcaneRecipe doubleCompressedSolar; + public static ShapedArcaneRecipe ironOmnitoolToDiamond; + public static ShapedArcaneRecipe electricScribingTools; + public static ShapedArcaneRecipe thaumiumWing; + public static ShapedArcaneRecipe thaumiumWings; + public static CrucibleRecipe ignisGenerator; + public static CrucibleRecipe auramGenerator; + public static CrucibleRecipe arborGenerator; + public static CrucibleRecipe aerGenerator; + public static CrucibleRecipe waterSolar; + public static CrucibleRecipe doubleWaterSolar; + public static CrucibleRecipe tripleWaterSolar; + public static CrucibleRecipe darkSolar; + public static CrucibleRecipe doubleDarkSolar; + public static CrucibleRecipe tripleDarkSolar; + public static CrucibleRecipe orderSolar; + public static CrucibleRecipe doubleOrderSolar; + public static CrucibleRecipe tripleOrderSolar; + public static CrucibleRecipe fireSolar; + public static CrucibleRecipe doubleFireSolar; + public static CrucibleRecipe tripleFireSolar; + public static CrucibleRecipe airSolar; + public static CrucibleRecipe doubleAirSolar; + public static CrucibleRecipe tripleAirSolar; + public static CrucibleRecipe earthSolar; + public static CrucibleRecipe doubleEarthSolar; + public static CrucibleRecipe tripleEarthSolar; + public static CrucibleRecipe portableNode; + public static CrucibleRecipe uuMCrystal; + public static IRecipe thaumiumPlate; + + private static void registerShapedRecipes() { + + /** Crafting Recipes **/ + ironOmnitool = GameRegistry.addShapedRecipe(getChargedItem(EMTItems.ironOmnitool, 10), "X", "Z", "Y", 'X', new ItemStack(IC2Items.getItem("chainsaw").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Y', new ItemStack(IC2Items.getItem("miningDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Z', IC2Items.getItem("plateiron")); + diamondChainsaw = GameRegistry.addShapedRecipe(getChargedItem(EMTItems.diamondChainsaw, 10), " X ", "XYX", 'X', new ItemStack(Items.diamond), 'Y', new ItemStack(IC2Items.getItem("chainsaw").getItem(), 1, OreDictionary.WILDCARD_VALUE)); + ductTape = GameRegistry.addShapedRecipe(new ItemStack(EMTItems.itemEMTItems, 1, 9), "XXX", "YYY", "XXX", 'X', new ItemStack(EMTItems.itemEMTItems, 1, 8), 'Y', new ItemStack(Items.paper)); + featherMesh = GameRegistry.addShapedRecipe(new ItemStack(EMTItems.itemEMTItems, 1, 7), "XYX", "YXY", "XYX", 'X', new ItemStack(Items.feather), 'Y', new ItemStack(EMTItems.itemEMTItems, 1, 9)); + featherWing = GameRegistry.addShapedRecipe(new ItemStack(EMTItems.itemEMTItems, 1, 12), "XYZ", "XYZ", "XYZ", 'X', new ItemStack(EMTItems.itemEMTItems, 1, 7), 'Y', new ItemStack(EMTItems.itemEMTItems, 1, 8), 'Z', new ItemStack(EMTItems.itemEMTItems, 1, 11)); + featherWings = GameRegistry.addShapedRecipe(new ItemStack(EMTItems.featherWing), "XX", 'X', new ItemStack(EMTItems.itemEMTItems, 1, 12)); + taintedFeathers = GameRegistry.addShapedRecipe(new ItemStack(EMTItems.itemEMTItems, 1, 13), " X ", "XYX", " X ", 'X', new ItemStack(ConfigItems.itemResource, 1, 12), 'Y', new ItemStack(Items.feather)); + + GameRegistry.addRecipe(IC2Items.getItem("nanoHelmet"), "XYX", "XZX", 'X', IC2Items.getItem("carbonPlate"), 'Y', new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Z', new ItemStack(IC2Items.getItem("nightvisionGoggles").getItem(), 1, OreDictionary.WILDCARD_VALUE)); + GameRegistry.addShapedRecipe(IC2Items.getItem("generator"), "X", "Y", "Z", 'X', new ItemStack(IC2Items.getItem("chargedReBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Y', IC2Items.getItem("machine"), 'Z', new ItemStack(Blocks.furnace)); + GameRegistry.addShapedRecipe(IC2Items.getItem("generator"), "X", "Y", "Z", 'X', IC2Items.getItem("reBattery"), 'Y', IC2Items.getItem("machine"), 'Z', new ItemStack(Blocks.furnace)); + + /** OreDict Crafting Recipes **/ + for (int i = 0; i < OreDictionary.getOres("logWood").size(); i++) { + cardboard = GameRegistry.addShapedRecipe(new ItemStack(EMTItems.itemEMTItems, 1, 11), "XXX", "YYY", "XXX", 'X', new ItemStack(Items.paper), 'Y', OreDictionary.getOres("logWood").get(i)); + } + for (int i = 0; i < OreDictionary.getOres("itemRubber").size(); i++) { + rubberBall = GameRegistry.addShapedRecipe(new ItemStack(EMTItems.itemEMTItems, 1, 10), "XX", "XX", 'X', OreDictionary.getOres("itemRubber").get(i)); + } + + /** Smelting Recipes **/ + GameRegistry.addSmelting(new ItemStack(EMTItems.itemEMTItems, 1, 1), new ItemStack(ConfigItems.itemResource, 1, 6), 0.0F); + GameRegistry.addSmelting(new ItemStack(EMTItems.itemEMTItems, 1, 2), new ItemStack(ConfigItems.itemResource, 1, 6), 0.0F); + GameRegistry.addSmelting(new ItemStack(EMTItems.itemEMTItems, 1, 3), new ItemStack(ConfigItems.itemResource, 1, 3), 0.0F); + GameRegistry.addSmelting(new ItemStack(EMTItems.itemEMTItems, 1, 4), new ItemStack(ConfigItems.itemResource, 1, 3), 0.0F); + GameRegistry.addSmelting(new ItemStack(EMTItems.itemEMTItems, 1, 10), new ItemStack(EMTItems.itemEMTItems, 2, 8), 0.0F); + } + + private static void registerShaplessRecipes() { + } + + private static void registerSmeltingRecipes() { + } + + public static void registerEarlyRecipes() { + registerShapedRecipes(); + registerShaplessRecipes(); + registerSmeltingRecipes(); + } + + public static void registerUUMInfusionRecipes() { + + ItemStack iridium = IC2Items.getItem("iridiumOre").copy(); + iridium.stackSize = 2; + uraniumToIridium = addInfusionCraftingRecipe("UU-Matter Infusion", iridium, 4, EMTCraftingAspects.uuMatterInfusions, IC2Items.getItem("Uran238"), new ItemStack[]{uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell}); + + ItemStack uranium = IC2Items.getItem("Uran238").copy(); + uranium.stackSize = 2; + diamondToUranium = addInfusionCraftingRecipe("UU-Matter Infusion", uranium, 4, EMTCraftingAspects.lesserUUMInfusions, new ItemStack(Items.diamond), new ItemStack[]{uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell}); + + ItemStack diamond = new ItemStack(Items.diamond).copy(); + diamond.stackSize = 1; + goldToDiamond = addInfusionCraftingRecipe("UU-Matter Infusion", diamond, 4, EMTCraftingAspects.cheapUUMInfusions, new ItemStack(Items.gold_ingot), new ItemStack[]{uuMCell, uuMCell, uuMCell, uuMCell}); + + ItemStack gold = new ItemStack(Items.gold_ingot).copy(); + gold.stackSize = 2; + ironToGold = addInfusionCraftingRecipe("UU-Matter Infusion", gold, 4, EMTCraftingAspects.cheapestUUMInfusions, new ItemStack(Items.iron_ingot), new ItemStack[]{uuMCell, uuMCell, uuMCell}); + + ItemStack ironOre = new ItemStack(Blocks.iron_ore).copy(); + ironOre.stackSize = 16; + stoneBricksToIronOre = addInfusionCraftingRecipe("UU-Matter Infusion", ironOre, 4, EMTCraftingAspects.cheapUUMInfusions, new ItemStack(Blocks.stonebrick), new ItemStack[]{uuMCell, uuMCell}); + + /** + * ItemStack copperOre = Items.getItem("copperOre").copy(); BUGGED IN + * 1.6 IF IC2 OREGEN IS DISABLED + **/ + ItemStack copperOre = IC2Items.getItem("crushedCopperOre").copy(); + copperOre.stackSize = 32; + arcaneStoneToCopperOre = addInfusionCraftingRecipe("UU-Matter Infusion", copperOre, 4, EMTCraftingAspects.cheapUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 6), new ItemStack[]{uuMCell, uuMCell}); + + /** + * ItemStack tinOre = Items.getItem("tinOre").copy(); BUGGED IN 1.6 IF + * IC2 OREGEN IS DISABLED + **/ + ItemStack tinOre = IC2Items.getItem("crushedTinOre").copy(); + tinOre.stackSize = 32; + arcaneStoneBricksToTinOre = addInfusionCraftingRecipe("UU-Matter Infusion", tinOre, 4, EMTCraftingAspects.cheapUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 7), new ItemStack[]{uuMCell, uuMCell}); + + /** + * ItemStack leadOre = Items.getItem("leadOre").copy(); BUGGED IN 1.6 IF + * IC2 OREGEN IS DISABLED + **/ + ItemStack leadOre = IC2Items.getItem("crushedLeadOre").copy(); + leadOre.stackSize = 32; + amberBlockToLeadOre = addInfusionCraftingRecipe("UU-Matter Infusion", leadOre, 4, EMTCraftingAspects.cheapUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticOpaque, 1, 0), new ItemStack[]{uuMCell, uuMCell}); + + ItemStack uraniumOre = IC2Items.getItem("uraniumOre").copy(); + uraniumOre.stackSize = 8; + amberBricksToUraniumOre = addInfusionCraftingRecipe("UU-Matter Infusion", uraniumOre, 4, EMTCraftingAspects.lesserUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticOpaque, 1, 1), new ItemStack[]{uuMCell, uuMCell, uuMCell}); + + ItemStack coal = new ItemStack(Items.coal, 1, 0).copy(); + coal.stackSize = 16; + charcoalToCoal = addInfusionCraftingRecipe("UU-Matter Infusion", coal, 4, EMTCraftingAspects.cheapUUMInfusions, new ItemStack(Items.coal, 1, 1), new ItemStack[]{uuMCell, uuMCell}); - ItemStack glowstone = new ItemStack(Blocks.glowstone).copy(); - glowstone.stackSize = 1; - glowstoneDustToBlock = addInfusionCraftingRecipe("UU-Matter Infusion", glowstone, 4, EMTCraftingAspects.cheapestUUMInfusions, new ItemStack(Items.glowstone_dust), new ItemStack[] { uuMCell }); - } + ItemStack stickyResin = IC2Items.getItem("resin").copy(); + stickyResin.stackSize = 21; + shardToResin = addInfusionCraftingRecipe("UU-Matter Infusion", stickyResin, 4, EMTCraftingAspects.cheapUUMInfusions, new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{uuMCell, uuMCell, uuMCell}); - public static void registerLateRecipes() { - /** Infusion Recipes **/ - lucrumGenerator = addInfusionCraftingRecipe("Lucrum Generator", new ItemStack(EMTBlocks.essentiaGens, 1, 5), 10, new AspectList().add(Aspect.GREED, 64).add(Aspect.EXCHANGE, 128), new ItemStack(EMTBlocks.essentiaGens, 1, 0), - new ItemStack[] {new ItemStack(Blocks.gold_block),new ItemStack(Blocks.gold_block),new ItemStack(Blocks.gold_block),new ItemStack(Blocks.gold_block),new ItemStack(Blocks.gold_block),new ItemStack(Blocks.gold_block)}); - - thaumiumDrill = addInfusionCraftingRecipe("Thaumium Drill", getChargedItem(EMTItems.thaumiumDrill, 10), 5, EMTCraftingAspects.thaumiumDrillCrafting, new ItemStack(IC2Items.getItem("diamondDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE), - new ItemStack[] { new ItemStack(Items.diamond), new ItemStack(Items.diamond), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), IC2Items.getItem("denseplateiron") }); + ItemStack redstone = new ItemStack(Items.redstone).copy(); + redstone.stackSize = 24; + shardToRedstone = addInfusionCraftingRecipe("UU-Matter Infusion", redstone, 4, EMTCraftingAspects.cheapUUMInfusions, new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{uuMCell, uuMCell, uuMCell}); - thaumiumChainsaw = addInfusionCraftingRecipe("Thaumium Chainsaw", getChargedItem(EMTItems.thaumiumChainsaw, 10), 5, EMTCraftingAspects.thaumiumChainsawCrafting, new ItemStack(EMTItems.diamondChainsaw, 1, OreDictionary.WILDCARD_VALUE), - new ItemStack[] { new ItemStack(Items.diamond), new ItemStack(Items.diamond), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), IC2Items.getItem("denseplateiron") }); + ItemStack lapisLazuli = new ItemStack(Items.dye, 1, 4).copy(); + lapisLazuli.stackSize = 8; + shardToLapis = addInfusionCraftingRecipe("UU-Matter Infusion", lapisLazuli, 4, EMTCraftingAspects.cheapUUMInfusions, new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{uuMCell, uuMCell, uuMCell}); - thaumicQuantumHelmet = addInfusionCraftingRecipe("Quantum Goggles of Revealing", getChargedItem(EMTItems.quantumThaumicHelmet, 10), 6, EMTCraftingAspects.thaumicQuantumHelmetCrafting, new ItemStack(EMTItems.nanoThaumicHelmet, 1, OreDictionary.WILDCARD_VALUE), - new ItemStack[] { new ItemStack(Items.diamond), new ItemStack(Items.milk_bucket), new ItemStack(IC2Items.getItem("quantumHelmet").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("advancedCircuit") }); + ItemStack glowstone = new ItemStack(Blocks.glowstone).copy(); + glowstone.stackSize = 1; + glowstoneDustToBlock = addInfusionCraftingRecipe("UU-Matter Infusion", glowstone, 4, EMTCraftingAspects.cheapestUUMInfusions, new ItemStack(Items.glowstone_dust), new ItemStack[]{uuMCell}); + } - thaumicNanoHelmet = addInfusionCraftingRecipe("Nanosuit Goggles of Revealing", getChargedItem(EMTItems.nanoThaumicHelmet, 10), 5, EMTCraftingAspects.thaumicNanoHelmetCrafting, new ItemStack(EMTItems.electricGoggles, 1, OreDictionary.WILDCARD_VALUE), - new ItemStack[] { new ItemStack(Items.diamond), new ItemStack(Items.gold_ingot), new ItemStack(IC2Items.getItem("nanoHelmet").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), IC2Items.getItem("carbonPlate"), IC2Items.getItem("electronicCircuit") }); + public static void registerLateRecipes() { + /** Infusion Recipes **/ + lucrumGenerator = addInfusionCraftingRecipe("Lucrum Generator", new ItemStack(EMTBlocks.essentiaGens, 1, 5), 10, new AspectList().add(Aspect.GREED, 64).add(Aspect.EXCHANGE, 128), new ItemStack(EMTBlocks.essentiaGens, 1, 0), + new ItemStack[]{new ItemStack(Blocks.gold_block), new ItemStack(Blocks.gold_block), new ItemStack(Blocks.gold_block), new ItemStack(Blocks.gold_block), new ItemStack(Blocks.gold_block), new ItemStack(Blocks.gold_block)}); - thaumiumOmnitool = addInfusionCraftingRecipe("Thaumium Omnitool", getChargedItem(EMTItems.thaumiumOmnitool, 10), 6, EMTCraftingAspects.thaumiumOmnitoolCrafting, new ItemStack(EMTItems.thaumiumChainsaw, 1, OreDictionary.WILDCARD_VALUE), - new ItemStack[] { new ItemStack(EMTItems.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), IC2Items.getItem("carbonPlate"), IC2Items.getItem("plateobsidian") }); + thaumiumDrill = addInfusionCraftingRecipe("Thaumium Drill", getChargedItem(EMTItems.thaumiumDrill, 10), 5, EMTCraftingAspects.thaumiumDrillCrafting, new ItemStack(IC2Items.getItem("diamondDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(Items.diamond), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), IC2Items.getItem("denseplateiron")}); - diamondOmnitoolToThaumium = addInfusionCraftingRecipe("Thaumium Omnitool", new ItemStack(EMTItems.thaumiumOmnitool), 6, EMTCraftingAspects.thaumiumOmnitoolCrafting, new ItemStack(EMTItems.diamondOmnitool, 1, OreDictionary.WILDCARD_VALUE), - new ItemStack[] { new ItemStack(Blocks.diamond_block), new ItemStack(ConfigBlocks.blockMetalDevice, 1, 9), new ItemStack(ConfigBlocks.blockMetalDevice, 1, 9), new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("carbonPlate"), IC2Items.getItem("advancedCircuit") }); + thaumiumChainsaw = addInfusionCraftingRecipe("Thaumium Chainsaw", getChargedItem(EMTItems.thaumiumChainsaw, 10), 5, EMTCraftingAspects.thaumiumChainsawCrafting, new ItemStack(EMTItems.diamondChainsaw, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(Items.diamond), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), IC2Items.getItem("denseplateiron")}); - explosionFocus = addInfusionCraftingRecipe("Explosion Focus", new ItemStack(EMTItems.explosionFocus), 6, EMTCraftingAspects.laserFocusCrafting, new ItemStack(ConfigItems.itemFocusHellbat, 1), - new ItemStack[] { new ItemStack(IC2Items.getItem("miningLaser").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.arrow), new ItemStack(Items.gunpowder), new ItemStack(Items.firework_charge), new ItemStack(ConfigItems.itemResource, 1, 1) }); + thaumicQuantumHelmet = addInfusionCraftingRecipe("Quantum Goggles of Revealing", getChargedItem(EMTItems.quantumThaumicHelmet, 10), 6, EMTCraftingAspects.thaumicQuantumHelmetCrafting, new ItemStack(EMTItems.nanoThaumicHelmet, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(Items.milk_bucket), new ItemStack(IC2Items.getItem("quantumHelmet").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("advancedCircuit")}); - shieldFocus = addInfusionCraftingRecipe("Shield Focus", new ItemStack(EMTItems.shieldFocus), 4, EMTCraftingAspects.shieldFocusCrafting, new ItemStack(ConfigItems.itemFocusPortableHole, 1), - new ItemStack[] { IC2Items.getItem("reinforcedStone"), IC2Items.getItem("reinforcedGlass"), IC2Items.getItem("reinforcedStone"), IC2Items.getItem("reinforcedGlass"), new ItemStack(Blocks.soul_sand), new ItemStack(Blocks.obsidian), new ItemStack(Blocks.obsidian) }); + thaumicNanoHelmet = addInfusionCraftingRecipe("Nanosuit Goggles of Revealing", getChargedItem(EMTItems.nanoThaumicHelmet, 10), 5, EMTCraftingAspects.thaumicNanoHelmetCrafting, new ItemStack(EMTItems.electricGoggles, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(Items.gold_ingot), new ItemStack(IC2Items.getItem("nanoHelmet").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), IC2Items.getItem("carbonPlate"), IC2Items.getItem("electronicCircuit")}); - potentiaGenerator = addInfusionCraftingRecipe("Potentia Generator", new ItemStack(EMTBlocks.essentiaGens, 1, 0), 6, EMTCraftingAspects.potentiaGeneratorCrafting, IC2Items.getItem("semifluidGenerator"), - new ItemStack[] { new ItemStack(Items.diamond), new ItemStack(ConfigItems.itemFocusTrade), new ItemStack(Blocks.hopper), new ItemStack(ConfigBlocks.blockJar), IC2Items.getItem("mvTransformer"), IC2Items.getItem("advancedMachine"), IC2Items.getItem("orewashingplant"), IC2Items.getItem("scrap") }); + thaumiumOmnitool = addInfusionCraftingRecipe("Thaumium Omnitool", getChargedItem(EMTItems.thaumiumOmnitool, 10), 6, EMTCraftingAspects.thaumiumOmnitoolCrafting, new ItemStack(EMTItems.thaumiumChainsaw, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[]{new ItemStack(EMTItems.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), IC2Items.getItem("carbonPlate"), IC2Items.getItem("plateobsidian")}); - streamChainsaw = addInfusionCraftingRecipe("Chainsaw of the Stream", getChargedItem(EMTItems.streamChainsaw, 10), 6, EMTCraftingAspects.streamChaisnawCrafting, new ItemStack(EMTItems.thaumiumChainsaw, 1, OreDictionary.WILDCARD_VALUE), - new ItemStack[] { new ItemStack(Items.water_bucket), new ItemStack(ConfigItems.itemAxeElemental), new ItemStack(ConfigBlocks.blockMagicalLog), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("overclockerUpgrade") }); + diamondOmnitoolToThaumium = addInfusionCraftingRecipe("Thaumium Omnitool", new ItemStack(EMTItems.thaumiumOmnitool), 6, EMTCraftingAspects.thaumiumOmnitoolCrafting, new ItemStack(EMTItems.diamondOmnitool, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[]{new ItemStack(Blocks.diamond_block), new ItemStack(ConfigBlocks.blockMetalDevice, 1, 9), new ItemStack(ConfigBlocks.blockMetalDevice, 1, 9), new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("carbonPlate"), IC2Items.getItem("advancedCircuit")}); - rockbreakerDrill = addInfusionCraftingRecipe("Drill of the Rockbreaker", getChargedItem(EMTItems.rockbreakerDrill, 10), 6, EMTCraftingAspects.rockbreakerDrillCrafting, new ItemStack(EMTItems.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[] { new ItemStack(Items.flint_and_steel), new ItemStack(Items.fire_charge), - new ItemStack(ConfigItems.itemPickElemental), new ItemStack(ConfigItems.itemShovelElemental), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("reinforcedStone"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("overclockerUpgrade") }); + explosionFocus = addInfusionCraftingRecipe("Explosion Focus", new ItemStack(EMTItems.explosionFocus), 6, EMTCraftingAspects.laserFocusCrafting, new ItemStack(ConfigItems.itemFocusHellbat, 1), + new ItemStack[]{new ItemStack(IC2Items.getItem("miningLaser").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.arrow), new ItemStack(Items.gunpowder), new ItemStack(Items.firework_charge), new ItemStack(ConfigItems.itemResource, 1, 1)}); - thorHammer = addInfusionCraftingRecipe("Mjolnir", new ItemStack(EMTItems.thorHammer), 7, EMTCraftingAspects.thorHammerCrafting, new ItemStack(EMTItems.taintedThorHammer, 1, OreDictionary.WILDCARD_VALUE), - new ItemStack[] { new ItemStack(EMTItems.itemEMTItems, 1, 6), new ItemStack(EMTItems.itemEMTItems, 1, 6), new ItemStack(ConfigItems.itemSwordElemental), new ItemStack(ConfigItems.itemResource, 1, 1), new ItemStack(ConfigItems.itemFocusShock), IC2Items.getItem("rubber") }); + shieldFocus = addInfusionCraftingRecipe("Shield Focus", new ItemStack(EMTItems.shieldFocus), 4, EMTCraftingAspects.shieldFocusCrafting, new ItemStack(ConfigItems.itemFocusPortableHole, 1), + new ItemStack[]{IC2Items.getItem("reinforcedStone"), IC2Items.getItem("reinforcedGlass"), IC2Items.getItem("reinforcedStone"), IC2Items.getItem("reinforcedGlass"), new ItemStack(Blocks.soul_sand), new ItemStack(Blocks.obsidian), new ItemStack(Blocks.obsidian)}); - superchargedThorHammer = addInfusionCraftingRecipe("Supercharged Mjolnir", getChargedItem(EMTItems.electricThorHammer, 10), 10, EMTCraftingAspects.superchargedThorHammerCrafting, new ItemStack(EMTItems.thorHammer, 1, OreDictionary.WILDCARD_VALUE), - new ItemStack[] { new ItemStack(EMTItems.itemEMTItems, 1, 6), new ItemStack(EMTItems.itemEMTItems, 1, 6), new ItemStack(Blocks.web), new ItemStack(ConfigItems.itemFocusHellbat), new ItemStack(ConfigItems.itemSwordElemental), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate"), - IC2Items.getItem("iridiumPlate"), new ItemStack(IC2Items.getItem("nanoSaber").getItem(), 1, OreDictionary.WILDCARD_VALUE) }); + potentiaGenerator = addInfusionCraftingRecipe("Potentia Generator", new ItemStack(EMTBlocks.essentiaGens, 1, 0), 6, EMTCraftingAspects.potentiaGeneratorCrafting, IC2Items.getItem("semifluidGenerator"), + new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(ConfigItems.itemFocusTrade), new ItemStack(Blocks.hopper), new ItemStack(ConfigBlocks.blockJar), IC2Items.getItem("mvTransformer"), IC2Items.getItem("advancedMachine"), IC2Items.getItem("orewashingplant"), IC2Items.getItem("scrap")}); - wandRecharger = addInfusionCraftingRecipe("Industrial Wand Charging Station", new ItemStack(EMTBlocks.emtMachines, 1, 0), 6, EMTCraftingAspects.wandCharger, new ItemStack(ConfigBlocks.blockStoneDevice, 1, 5), - new ItemStack[] { IC2Items.getItem("replicator"), IC2Items.getItem("iridiumPlate"), new ItemStack(Blocks.diamond_block), new ItemStack(ConfigItems.itemShard, 1, 5), new ItemStack(ConfigBlocks.blockJar) }); + streamChainsaw = addInfusionCraftingRecipe("Chainsaw of the Stream", getChargedItem(EMTItems.streamChainsaw, 10), 6, EMTCraftingAspects.streamChaisnawCrafting, new ItemStack(EMTItems.thaumiumChainsaw, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[]{new ItemStack(Items.water_bucket), new ItemStack(ConfigItems.itemAxeElemental), new ItemStack(ConfigBlocks.blockMagicalLog), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("overclockerUpgrade")}); - solarHelmetRevealing = addInfusionCraftingRecipe("Solar Helmet of Revealing", getChargedItem(EMTItems.solarHelmetRevealing, 10), 5, EMTCraftingAspects.solarHelmetRevealing, new ItemStack(EMTItems.quantumThaumicHelmet, 1, OreDictionary.WILDCARD_VALUE), - new ItemStack[] { new ItemStack(EMTBlocks.emtSolars, 1, 1), IC2Items.getItem("glassFiberCableItem"), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemShard, 1, 4) }); + rockbreakerDrill = addInfusionCraftingRecipe("Drill of the Rockbreaker", getChargedItem(EMTItems.rockbreakerDrill, 10), 6, EMTCraftingAspects.rockbreakerDrillCrafting, new ItemStack(EMTItems.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.flint_and_steel), new ItemStack(Items.fire_charge), + new ItemStack(ConfigItems.itemPickElemental), new ItemStack(ConfigItems.itemShovelElemental), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("reinforcedStone"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("overclockerUpgrade")}); - electricBootsTravel = addInfusionCraftingRecipe("Electric Boots of the Traveller", getChargedItem(EMTItems.electricBootsTraveller, 10), 2, EMTCraftingAspects.electricBootsTravel, new ItemStack(ConfigItems.itemBootsTraveller), - new ItemStack[] { new ItemStack(Items.diamond), IC2Items.getItem("elemotor"), IC2Items.getItem("coil"), IC2Items.getItem("hazmatBoots"), new ItemStack(IC2Items.getItem("advBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE) }); + thorHammer = addInfusionCraftingRecipe("Mjolnir", new ItemStack(EMTItems.thorHammer), 7, EMTCraftingAspects.thorHammerCrafting, new ItemStack(EMTItems.taintedThorHammer, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[]{new ItemStack(EMTItems.itemEMTItems, 1, 6), new ItemStack(EMTItems.itemEMTItems, 1, 6), new ItemStack(ConfigItems.itemSwordElemental), new ItemStack(ConfigItems.itemResource, 1, 1), new ItemStack(ConfigItems.itemFocusShock), IC2Items.getItem("rubber")}); - nanoBootsTravel = addInfusionCraftingRecipe("Nano Boots of the Traveller", getChargedItem(EMTItems.nanoBootsTraveller, 10), 2, EMTCraftingAspects.nanoBootsTravel, new ItemStack(EMTItems.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), - new ItemStack[] { new ItemStack(Items.diamond), new ItemStack(IC2Items.getItem("nanoBoots").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE) }); + superchargedThorHammer = addInfusionCraftingRecipe("Supercharged Mjolnir", getChargedItem(EMTItems.electricThorHammer, 10), 10, EMTCraftingAspects.superchargedThorHammerCrafting, new ItemStack(EMTItems.thorHammer, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[]{new ItemStack(EMTItems.itemEMTItems, 1, 6), new ItemStack(EMTItems.itemEMTItems, 1, 6), new ItemStack(Blocks.web), new ItemStack(ConfigItems.itemFocusHellbat), new ItemStack(ConfigItems.itemSwordElemental), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate"), + IC2Items.getItem("iridiumPlate"), new ItemStack(IC2Items.getItem("nanoSaber").getItem(), 1, OreDictionary.WILDCARD_VALUE)}); - quantumBootsTravel = addInfusionCraftingRecipe("Quantum Boots of the Traveller", getChargedItem(EMTItems.quantumBootsTraveller, 10), 2, EMTCraftingAspects.quantumBootsTravel, new ItemStack(EMTItems.nanoBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), - new ItemStack[] { new ItemStack(Blocks.diamond_block), new ItemStack(IC2Items.getItem("quantumBoots").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate") }); + wandRecharger = addInfusionCraftingRecipe("Industrial Wand Charging Station", new ItemStack(EMTBlocks.emtMachines, 1, 0), 6, EMTCraftingAspects.wandCharger, new ItemStack(ConfigBlocks.blockStoneDevice, 1, 5), + new ItemStack[]{IC2Items.getItem("replicator"), IC2Items.getItem("iridiumPlate"), new ItemStack(Blocks.diamond_block), new ItemStack(ConfigItems.itemShard, 1, 5), new ItemStack(ConfigBlocks.blockJar)}); - etheralProcessor = addInfusionCraftingRecipe("Etheral Processor", new ItemStack(EMTBlocks.emtMachines, 1, 1), 3, EMTCraftingAspects.etherealProcessor, IC2Items.getItem("macerator"), - new ItemStack[] { IC2Items.getItem("electroFurnace"), new ItemStack(ConfigBlocks.blockMetalDevice, 1, 9), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.iron_block), new ItemStack(Blocks.iron_block), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5) }); + solarHelmetRevealing = addInfusionCraftingRecipe("Solar Helmet of Revealing", getChargedItem(EMTItems.solarHelmetRevealing, 10), 5, EMTCraftingAspects.solarHelmetRevealing, new ItemStack(EMTItems.quantumThaumicHelmet, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[]{new ItemStack(EMTBlocks.solars[0], 1, 1), IC2Items.getItem("glassFiberCableItem"), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemShard, 1, 4)}); - tripleCompressedSolar = addInfusionCraftingRecipe("Compressed Solars", new ItemStack(EMTBlocks.emtSolars, 1, 2), 2, EMTCraftingAspects.compressedSolars, new ItemStack(EMTBlocks.emtSolars, 1, 1), new ItemStack[] { new ItemStack(EMTBlocks.emtSolars, 1, 1), new ItemStack(EMTBlocks.emtSolars, 1, 1), new ItemStack(EMTBlocks.emtSolars, 1, 1), - new ItemStack(EMTBlocks.emtSolars, 1, 1), new ItemStack(EMTBlocks.emtSolars, 1, 1), new ItemStack(EMTBlocks.emtSolars, 1, 1), new ItemStack(EMTBlocks.emtSolars, 1, 1), new ItemStack(EMTBlocks.emtSolars, 1, 1) }); + electricBootsTravel = addInfusionCraftingRecipe("Electric Boots of the Traveller", getChargedItem(EMTItems.electricBootsTraveller, 10), 2, EMTCraftingAspects.electricBootsTravel, new ItemStack(ConfigItems.itemBootsTraveller), + new ItemStack[]{new ItemStack(Items.diamond), IC2Items.getItem("elemotor"), IC2Items.getItem("coil"), IC2Items.getItem("hazmatBoots"), new ItemStack(IC2Items.getItem("advBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE)}); - electricHoeGrowth = addInfusionCraftingRecipe("Electric Hoe of Growth", getChargedItem(EMTItems.electricHoeGrowth, 10), 4, EMTCraftingAspects.electricHoeGrowth, new ItemStack(ConfigItems.itemHoeElemental), - new ItemStack[] { new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("electricHoe").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.dye, 1, 15), IC2Items.getItem("elemotor"), IC2Items.getItem("coil"), new ItemStack(Blocks.sapling, 1, OreDictionary.WILDCARD_VALUE) }); + nanoBootsTravel = addInfusionCraftingRecipe("Nano Boots of the Traveller", getChargedItem(EMTItems.nanoBootsTraveller, 10), 2, EMTCraftingAspects.nanoBootsTravel, new ItemStack(EMTItems.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(IC2Items.getItem("nanoBoots").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE)}); - chargeFocus = addInfusionCraftingRecipe("Wand Focus: Charging", new ItemStack(EMTItems.chargeFocus), 4, EMTCraftingAspects.chargeFocus, new ItemStack(IC2Items.getItem("advBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), - new ItemStack[] { IC2Items.getItem("generator"), IC2Items.getItem("batBox"), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE) }); + quantumBootsTravel = addInfusionCraftingRecipe("Quantum Boots of the Traveller", getChargedItem(EMTItems.quantumBootsTraveller, 10), 2, EMTCraftingAspects.quantumBootsTravel, new ItemStack(EMTItems.nanoBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[]{new ItemStack(Blocks.diamond_block), new ItemStack(IC2Items.getItem("quantumBoots").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate")}); - wandChargeFocus = addInfusionCraftingRecipe("Wand Focus: Wand Charging", new ItemStack(EMTItems.wandChargeFocus), 5, EMTCraftingAspects.wandChargeFocus, new ItemStack(EMTBlocks.emtMachines, 1, 0), - new ItemStack[] { new ItemStack(EMTItems.chargeFocus), new ItemStack(IC2Items.getItem("energyPack").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate") }); - - energyBallFocus = addInfusionCraftingRecipe("Wand Focus: Energy Ball", new ItemStack(EMTItems.energyBallFocus), 4, EMTResearchAspects.energyBallFocusResearch, new ItemStack(ConfigItems.itemFocusShock), - new ItemStack[] { new ItemStack(Blocks.tnt), new ItemStack(IC2Items.getItem("advBattery").getItem()), new ItemStack(IC2Items.getItem("advBattery").getItem()), new ItemStack(IC2Items.getItem("advBattery").getItem())}); + etheralProcessor = addInfusionCraftingRecipe("Etheral Processor", new ItemStack(EMTBlocks.emtMachines, 1, 1), 3, EMTCraftingAspects.etherealProcessor, IC2Items.getItem("macerator"), + new ItemStack[]{IC2Items.getItem("electroFurnace"), new ItemStack(ConfigBlocks.blockMetalDevice, 1, 9), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.iron_block), new ItemStack(Blocks.iron_block), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5)}); - inventoryChargingRing = addInfusionCraftingRecipe("Inventory Charging Ring", new ItemStack(EMTItems.emtBauble, 1, 1), 6, EMTCraftingAspects.inventoryChargingRing, new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1), - new ItemStack[] { new ItemStack(EMTItems.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("generator"), IC2Items.getItem("geothermalGenerator"), IC2Items.getItem("solarPanel"), ic2.core.Ic2Items.WindKineticGenerator, ic2.core.Ic2Items.WaterKineticGenerator, IC2Items.getItem("nuclearReactor") }); + tripleCompressedSolar = addInfusionCraftingRecipe("Compressed Solars", new ItemStack(EMTBlocks.solars[0], 1, 2), 2, EMTCraftingAspects.compressedSolars, new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack[]{new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 1), + new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 1)}); - armorChargingRing = addInfusionCraftingRecipe("Armor Charging Ring", new ItemStack(EMTItems.emtBauble, 1, 0), 6, EMTCraftingAspects.armorChargingRing, new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1), - new ItemStack[] { new ItemStack(EMTItems.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("generator"), IC2Items.getItem("geothermalGenerator"), IC2Items.getItem("solarPanel"), ic2.core.Ic2Items.WindKineticGenerator, ic2.core.Ic2Items.WaterKineticGenerator, IC2Items.getItem("nuclearReactor") }); + electricHoeGrowth = addInfusionCraftingRecipe("Electric Hoe of Growth", getChargedItem(EMTItems.electricHoeGrowth, 10), 4, EMTCraftingAspects.electricHoeGrowth, new ItemStack(ConfigItems.itemHoeElemental), + new ItemStack[]{new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("electricHoe").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.dye, 1, 15), IC2Items.getItem("elemotor"), IC2Items.getItem("coil"), new ItemStack(Blocks.sapling, 1, OreDictionary.WILDCARD_VALUE)}); - nanoWings = addInfusionCraftingRecipe("Nanosuit Wings", getChargedItem(EMTItems.nanoWing, 10), 4, EMTCraftingAspects.nanoWing, new ItemStack(EMTItems.thaumiumWing), - new ItemStack[] { IC2Items.getItem("carbonPlate"), IC2Items.getItem("carbonPlate"), IC2Items.getItem("carbonPlate"), new ItemStack(IC2Items.getItem("nanoBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemResource, 1, 1) }); + chargeFocus = addInfusionCraftingRecipe("Wand Focus: Charging", new ItemStack(EMTItems.chargeFocus), 4, EMTCraftingAspects.chargeFocus, new ItemStack(IC2Items.getItem("advBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[]{IC2Items.getItem("generator"), IC2Items.getItem("batBox"), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE)}); - quantumWings = addInfusionCraftingRecipe("Quantum Wings", getChargedItem(EMTItems.quantumWing, 10), 6, EMTCraftingAspects.quantumWing, new ItemStack(EMTItems.nanoWing, 1, OreDictionary.WILDCARD_VALUE), - new ItemStack[] { IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), new ItemStack(IC2Items.getItem("quantumBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemResource, 1, 1) }); + wandChargeFocus = addInfusionCraftingRecipe("Wand Focus: Wand Charging", new ItemStack(EMTItems.wandChargeFocus), 5, EMTCraftingAspects.wandChargeFocus, new ItemStack(EMTBlocks.emtMachines, 1, 0), + new ItemStack[]{new ItemStack(EMTItems.chargeFocus), new ItemStack(IC2Items.getItem("energyPack").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate")}); - infusedQuantumArmor = addInfusionCraftingRecipe("Infused Quantum Armor", getChargedItem(EMTItems.quantumArmor, 10), 5, EMTCraftingAspects.quantumWing, new ItemStack(IC2Items.getItem("quantumBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), - new ItemStack[] { new ItemStack(Items.diamond), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), new ItemStack(EMTBlocks.shield), new ItemStack(EMTBlocks.shield) }); + energyBallFocus = addInfusionCraftingRecipe("Wand Focus: Energy Ball", new ItemStack(EMTItems.energyBallFocus), 4, EMTResearchAspects.energyBallFocusResearch, new ItemStack(ConfigItems.itemFocusShock), + new ItemStack[]{new ItemStack(Blocks.tnt), new ItemStack(IC2Items.getItem("advBattery").getItem()), new ItemStack(IC2Items.getItem("advBattery").getItem()), new ItemStack(IC2Items.getItem("advBattery").getItem())}); - /** Arcane Worktable Recipes **/ + inventoryChargingRing = addInfusionCraftingRecipe("Inventory Charging Ring", new ItemStack(EMTItems.emtBauble, 1, 1), 6, EMTCraftingAspects.inventoryChargingRing, new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1), + new ItemStack[]{new ItemStack(EMTItems.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("generator"), IC2Items.getItem("geothermalGenerator"), IC2Items.getItem("solarPanel"), ic2.core.Ic2Items.WindKineticGenerator, ic2.core.Ic2Items.WaterKineticGenerator, IC2Items.getItem("nuclearReactor")}); - diamondOmnitool = addShapelessArcaneCraftingRecipe("Diamond Omnitool", getChargedItem(EMTItems.diamondOmnitool, 10), EMTCraftingAspects.diamondOmnitoolCrafting, new ItemStack(EMTItems.diamondChainsaw, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("diamondDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE)); + armorChargingRing = addInfusionCraftingRecipe("Armor Charging Ring", new ItemStack(EMTItems.emtBauble, 1, 0), 6, EMTCraftingAspects.armorChargingRing, new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1), + new ItemStack[]{new ItemStack(EMTItems.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("generator"), IC2Items.getItem("geothermalGenerator"), IC2Items.getItem("solarPanel"), ic2.core.Ic2Items.WindKineticGenerator, ic2.core.Ic2Items.WaterKineticGenerator, IC2Items.getItem("nuclearReactor")}); - ironOmnitoolToDiamond = addArcaneCraftingRecipe("Diamond Omnitool", new ItemStack(EMTItems.diamondOmnitool), EMTCraftingAspects.diamondOmnitoolCrafting, "XAX", "XBX", "XAX", 'X', new ItemStack(Items.diamond), 'A', IC2Items.getItem("advancedCircuit"), 'B', new ItemStack(EMTItems.ironOmnitool, 1, OreDictionary.WILDCARD_VALUE)); + nanoWings = addInfusionCraftingRecipe("Nanosuit Wings", getChargedItem(EMTItems.nanoWing, 10), 4, EMTCraftingAspects.nanoWing, new ItemStack(EMTItems.thaumiumWing), + new ItemStack[]{IC2Items.getItem("carbonPlate"), IC2Items.getItem("carbonPlate"), IC2Items.getItem("carbonPlate"), new ItemStack(IC2Items.getItem("nanoBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemResource, 1, 1)}); - christmasFocus = addArcaneCraftingRecipe("Kris-tmas Focus", new ItemStack(EMTItems.christmasFocus), EMTCraftingAspects.christmasFocusCrafting, "XYX", "YZY", "XYX", 'X', new ItemStack(Blocks.snow), 'Y', new ItemStack(Blocks.pumpkin), 'Z', new ItemStack(ConfigItems.itemFocusFrost)); + quantumWings = addInfusionCraftingRecipe("Quantum Wings", getChargedItem(EMTItems.quantumWing, 10), 6, EMTCraftingAspects.quantumWing, new ItemStack(EMTItems.nanoWing, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[]{IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), new ItemStack(IC2Items.getItem("quantumBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemResource, 1, 1)}); - electricGoggles = addArcaneCraftingRecipe("Electric Goggles", getChargedItem(EMTItems.electricGoggles, 10), EMTCraftingAspects.electricGogglesCrafting, " Y ", "AZA", "BXB", 'Z', new ItemStack(ConfigItems.itemGoggles), 'X', IC2Items.getItem("electronicCircuit"), 'Y', new ItemStack(Items.diamond_helmet), 'A', - new ItemStack(IC2Items.getItem("reBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'B', Items.repeater); + infusedQuantumArmor = addInfusionCraftingRecipe("Infused Quantum Armor", getChargedItem(EMTItems.quantumArmor, 10), 5, EMTCraftingAspects.quantumWing, new ItemStack(IC2Items.getItem("quantumBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[]{new ItemStack(Items.diamond), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), new ItemStack(EMTBlocks.shield), new ItemStack(EMTBlocks.shield)}); - electricGoggles2 = addArcaneCraftingRecipe("Electric Goggles", getChargedItem(EMTItems.electricGoggles, 10), EMTCraftingAspects.electricGogglesCrafting, " Y ", "AZA", "BXB", 'Z', new ItemStack(ConfigItems.itemGoggles), 'X', IC2Items.getItem("electronicCircuit"), 'Y', new ItemStack(Items.diamond_helmet), 'A', - new ItemStack(IC2Items.getItem("chargedReBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'B', Items.repeater); + /** Arcane Worktable Recipes **/ - shieldBlock = addArcaneCraftingRecipe("Shield Block", new ItemStack(EMTBlocks.shield, 6), EMTCraftingAspects.shieldBlockCrafting, "XYX", "X X", "XYX", 'X', new ItemStack(Blocks.glass), 'Y', new ItemStack(Blocks.obsidian)); + diamondOmnitool = addShapelessArcaneCraftingRecipe("Diamond Omnitool", getChargedItem(EMTItems.diamondOmnitool, 10), EMTCraftingAspects.diamondOmnitoolCrafting, new ItemStack(EMTItems.diamondChainsaw, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("diamondDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE)); - tinyUranium = addShapelessArcaneCraftingRecipe("Tiny Uranium", new ItemStack(IC2Items.getItem("smallUran235").getItem(), 7), EMTCraftingAspects.tinyUraniumCrafting, IC2Items.getItem("Uran238")); + ironOmnitoolToDiamond = addArcaneCraftingRecipe("Diamond Omnitool", new ItemStack(EMTItems.diamondOmnitool), EMTCraftingAspects.diamondOmnitoolCrafting, "XAX", "XBX", "XAX", 'X', new ItemStack(Items.diamond), 'A', IC2Items.getItem("advancedCircuit"), 'B', new ItemStack(EMTItems.ironOmnitool, 1, OreDictionary.WILDCARD_VALUE)); - compressedSolar = addArcaneCraftingRecipe("Compressed Solars", new ItemStack(EMTBlocks.emtSolars, 1, 0), EMTCraftingAspects.compressedSolars, "XXX", "XXX", "XXX", 'X', IC2Items.getItem("solarPanel")); + christmasFocus = addArcaneCraftingRecipe("Kris-tmas Focus", new ItemStack(EMTItems.christmasFocus), EMTCraftingAspects.christmasFocusCrafting, "XYX", "YZY", "XYX", 'X', new ItemStack(Blocks.snow), 'Y', new ItemStack(Blocks.pumpkin), 'Z', new ItemStack(ConfigItems.itemFocusFrost)); - doubleCompressedSolar = addArcaneCraftingRecipe("Compressed Solars", new ItemStack(EMTBlocks.emtSolars, 1, 1), EMTCraftingAspects.compressedSolars, "XXX", "XXX", "XXX", 'X', new ItemStack(EMTBlocks.emtSolars, 1, 0)); + electricGoggles = addArcaneCraftingRecipe("Electric Goggles", getChargedItem(EMTItems.electricGoggles, 10), EMTCraftingAspects.electricGogglesCrafting, " Y ", "AZA", "BXB", 'Z', new ItemStack(ConfigItems.itemGoggles), 'X', IC2Items.getItem("electronicCircuit"), 'Y', new ItemStack(Items.diamond_helmet), 'A', + new ItemStack(IC2Items.getItem("reBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'B', Items.repeater); - electricScribingTools = addArcaneCraftingRecipe("Electric Scribing Tools", getChargedItem(EMTItems.electricScribingTools, 10), EMTCraftingAspects.electricScribingTools, "YXY", "XZX", "YXY", 'Y', IC2Items.getItem("electronicCircuit"), 'X', new ItemStack(ConfigItems.itemInkwell), 'Z', - new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE)); + electricGoggles2 = addArcaneCraftingRecipe("Electric Goggles", getChargedItem(EMTItems.electricGoggles, 10), EMTCraftingAspects.electricGogglesCrafting, " Y ", "AZA", "BXB", 'Z', new ItemStack(ConfigItems.itemGoggles), 'X', IC2Items.getItem("electronicCircuit"), 'Y', new ItemStack(Items.diamond_helmet), 'A', + new ItemStack(IC2Items.getItem("chargedReBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'B', Items.repeater); - thaumiumWing = addArcaneCraftingRecipe("Thaumium Reinforced Wings", new ItemStack(EMTItems.itemEMTItems, 1, 14), EMTCraftingAspects.thaumiumWing, "XYZ", "XYZ", "XYZ", 'X', new ItemStack(EMTItems.itemEMTItems, 1, 13), 'Y', new ItemStack(EMTItems.itemEMTItems, 1, 5), 'Z', IC2Items.getItem("plateiron")); + shieldBlock = addArcaneCraftingRecipe("Shield Block", new ItemStack(EMTBlocks.shield, 6), EMTCraftingAspects.shieldBlockCrafting, "XYX", "X X", "XYX", 'X', new ItemStack(Blocks.glass), 'Y', new ItemStack(Blocks.obsidian)); - thaumiumWings = addArcaneCraftingRecipe("Thaumium Reinforced Wings", new ItemStack(EMTItems.thaumiumWing), EMTCraftingAspects.thaumiumWing, "XX", 'X', new ItemStack(EMTItems.itemEMTItems, 1, 14)); + tinyUranium = addShapelessArcaneCraftingRecipe("Tiny Uranium", new ItemStack(IC2Items.getItem("smallUran235").getItem(), 7), EMTCraftingAspects.tinyUraniumCrafting, IC2Items.getItem("Uran238")); - /** Crucible Recipes **/ + compressedSolar = addArcaneCraftingRecipe("Compressed Solars", new ItemStack(EMTBlocks.solars[0], 1, 0), EMTCraftingAspects.compressedSolars, "XXX", "XXX", "XXX", 'X', IC2Items.getItem("solarPanel")); - ignisGenerator = addCrucibleRecipe("Ignis Generator", new ItemStack(EMTBlocks.essentiaGens, 1, 1), new ItemStack(EMTBlocks.essentiaGens, 1, 0), EMTCraftingAspects.ignisGeneratorCrafting); + doubleCompressedSolar = addArcaneCraftingRecipe("Compressed Solars", new ItemStack(EMTBlocks.solars[0], 1, 1), EMTCraftingAspects.compressedSolars, "XXX", "XXX", "XXX", 'X', new ItemStack(EMTBlocks.solars[0], 1, 0)); - auramGenerator = addCrucibleRecipe("Auram Generator", new ItemStack(EMTBlocks.essentiaGens, 1, 2), new ItemStack(EMTBlocks.essentiaGens, 1, 0), EMTCraftingAspects.auramGeneratorCrafting); + electricScribingTools = addArcaneCraftingRecipe("Electric Scribing Tools", getChargedItem(EMTItems.electricScribingTools, 10), EMTCraftingAspects.electricScribingTools, "YXY", "XZX", "YXY", 'Y', IC2Items.getItem("electronicCircuit"), 'X', new ItemStack(ConfigItems.itemInkwell), 'Z', + new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE)); - arborGenerator = addCrucibleRecipe("Arbor Generator", new ItemStack(EMTBlocks.essentiaGens, 1, 3), new ItemStack(EMTBlocks.essentiaGens, 1, 0), EMTCraftingAspects.arborGeneratorCrafting); + thaumiumWing = addArcaneCraftingRecipe("Thaumium Reinforced Wings", new ItemStack(EMTItems.itemEMTItems, 1, 14), EMTCraftingAspects.thaumiumWing, "XYZ", "XYZ", "XYZ", 'X', new ItemStack(EMTItems.itemEMTItems, 1, 13), 'Y', new ItemStack(EMTItems.itemEMTItems, 1, 5), 'Z', IC2Items.getItem("plateiron")); - aerGenerator = addCrucibleRecipe("Aer Generator", new ItemStack(EMTBlocks.essentiaGens, 1, 4), new ItemStack(EMTBlocks.essentiaGens, 1, 0), EMTCraftingAspects.aerGenerator); + thaumiumWings = addArcaneCraftingRecipe("Thaumium Reinforced Wings", new ItemStack(EMTItems.thaumiumWing), EMTCraftingAspects.thaumiumWing, "XX", 'X', new ItemStack(EMTItems.itemEMTItems, 1, 14)); - waterSolar = addCrucibleRecipe("Water Infused Solar Panels", new ItemStack(EMTBlocks.emtSolars, 1, 3), new ItemStack(EMTBlocks.emtSolars, 1, 0), EMTCraftingAspects.waterSolars); + /** Crucible Recipes **/ - doubleWaterSolar = addCrucibleRecipe("Water Infused Solar Panels", new ItemStack(EMTBlocks.emtSolars, 1, 4), new ItemStack(EMTBlocks.emtSolars, 1, 1), EMTCraftingAspects.waterSolars); + ignisGenerator = addCrucibleRecipe("Ignis Generator", new ItemStack(EMTBlocks.essentiaGens, 1, 1), new ItemStack(EMTBlocks.essentiaGens, 1, 0), EMTCraftingAspects.ignisGeneratorCrafting); - tripleWaterSolar = addCrucibleRecipe("Water Infused Solar Panels", new ItemStack(EMTBlocks.emtSolars, 1, 5), new ItemStack(EMTBlocks.emtSolars, 1, 2), EMTCraftingAspects.waterSolars); + auramGenerator = addCrucibleRecipe("Auram Generator", new ItemStack(EMTBlocks.essentiaGens, 1, 2), new ItemStack(EMTBlocks.essentiaGens, 1, 0), EMTCraftingAspects.auramGeneratorCrafting); - darkSolar = addCrucibleRecipe("Entropy Infused Solar Panels", new ItemStack(EMTBlocks.emtSolars, 1, 6), new ItemStack(EMTBlocks.emtSolars, 1, 0), EMTCraftingAspects.darkSolars); + arborGenerator = addCrucibleRecipe("Arbor Generator", new ItemStack(EMTBlocks.essentiaGens, 1, 3), new ItemStack(EMTBlocks.essentiaGens, 1, 0), EMTCraftingAspects.arborGeneratorCrafting); - doubleDarkSolar = addCrucibleRecipe("Entropy Infused Solar Panels", new ItemStack(EMTBlocks.emtSolars, 1, 7), new ItemStack(EMTBlocks.emtSolars, 1, 1), EMTCraftingAspects.darkSolars); + aerGenerator = addCrucibleRecipe("Aer Generator", new ItemStack(EMTBlocks.essentiaGens, 1, 4), new ItemStack(EMTBlocks.essentiaGens, 1, 0), EMTCraftingAspects.aerGenerator); - tripleDarkSolar = addCrucibleRecipe("Entropy Infused Solar Panels", new ItemStack(EMTBlocks.emtSolars, 1, 8), new ItemStack(EMTBlocks.emtSolars, 1, 2), EMTCraftingAspects.darkSolars); + waterSolar = addCrucibleRecipe("Water Infused Solar Panels", new ItemStack(EMTBlocks.solars[0], 1, 3), new ItemStack(EMTBlocks.solars[0], 1, 0), EMTCraftingAspects.waterSolars); - orderSolar = addCrucibleRecipe("Order Infused Solar Panels", new ItemStack(EMTBlocks.emtSolars, 1, 9), new ItemStack(EMTBlocks.emtSolars, 1, 0), EMTCraftingAspects.orderSolars); + doubleWaterSolar = addCrucibleRecipe("Water Infused Solar Panels", new ItemStack(EMTBlocks.solars[0], 1, 4), new ItemStack(EMTBlocks.solars[0], 1, 1), EMTCraftingAspects.waterSolars); - doubleOrderSolar = addCrucibleRecipe("Order Infused Solar Panels", new ItemStack(EMTBlocks.emtSolars, 1, 10), new ItemStack(EMTBlocks.emtSolars, 1, 1), EMTCraftingAspects.orderSolars); + tripleWaterSolar = addCrucibleRecipe("Water Infused Solar Panels", new ItemStack(EMTBlocks.solars[0], 1, 5), new ItemStack(EMTBlocks.solars[0], 1, 2), EMTCraftingAspects.waterSolars); - tripleOrderSolar = addCrucibleRecipe("Order Infused Solar Panels", new ItemStack(EMTBlocks.emtSolars, 1, 11), new ItemStack(EMTBlocks.emtSolars, 1, 2), EMTCraftingAspects.orderSolars); + darkSolar = addCrucibleRecipe("Entropy Infused Solar Panels", new ItemStack(EMTBlocks.solars[0], 1, 6), new ItemStack(EMTBlocks.solars[0], 1, 0), EMTCraftingAspects.darkSolars); - fireSolar = addCrucibleRecipe("Fire Infused Solar Panels", new ItemStack(EMTBlocks.emtSolars, 1, 12), new ItemStack(EMTBlocks.emtSolars, 1, 0), EMTCraftingAspects.fireSolars); + doubleDarkSolar = addCrucibleRecipe("Entropy Infused Solar Panels", new ItemStack(EMTBlocks.solars[0], 1, 7), new ItemStack(EMTBlocks.solars[0], 1, 1), EMTCraftingAspects.darkSolars); - doubleFireSolar = addCrucibleRecipe("Fire Infused Solar Panels", new ItemStack(EMTBlocks.emtSolars, 1, 13), new ItemStack(EMTBlocks.emtSolars, 1, 1), EMTCraftingAspects.fireSolars); + tripleDarkSolar = addCrucibleRecipe("Entropy Infused Solar Panels", new ItemStack(EMTBlocks.solars[0], 1, 8), new ItemStack(EMTBlocks.solars[0], 1, 2), EMTCraftingAspects.darkSolars); - tripleFireSolar = addCrucibleRecipe("Fire Infused Solar Panels", new ItemStack(EMTBlocks.emtSolars, 1, 14), new ItemStack(EMTBlocks.emtSolars, 1, 2), EMTCraftingAspects.fireSolars); + orderSolar = addCrucibleRecipe("Order Infused Solar Panels", new ItemStack(EMTBlocks.solars[0], 1, 9), new ItemStack(EMTBlocks.solars[0], 1, 0), EMTCraftingAspects.orderSolars); - airSolar = addCrucibleRecipe("Air Infused Solar Panels", new ItemStack(EMTBlocks.emtSolars, 1, 15), new ItemStack(EMTBlocks.emtSolars, 1, 0), EMTCraftingAspects.airSolars); + doubleOrderSolar = addCrucibleRecipe("Order Infused Solar Panels", new ItemStack(EMTBlocks.solars[0], 1, 10), new ItemStack(EMTBlocks.solars[0], 1, 1), EMTCraftingAspects.orderSolars); - doubleAirSolar = addCrucibleRecipe("Air Infused Solar Panels", new ItemStack(EMTBlocks.emtSolars2, 1, 0), new ItemStack(EMTBlocks.emtSolars, 1, 1), EMTCraftingAspects.airSolars); + tripleOrderSolar = addCrucibleRecipe("Order Infused Solar Panels", new ItemStack(EMTBlocks.solars[0], 1, 11), new ItemStack(EMTBlocks.solars[0], 1, 2), EMTCraftingAspects.orderSolars); - tripleAirSolar = addCrucibleRecipe("Air Infused Solar Panels", new ItemStack(EMTBlocks.emtSolars2, 1, 1), new ItemStack(EMTBlocks.emtSolars, 1, 2), EMTCraftingAspects.airSolars); + fireSolar = addCrucibleRecipe("Fire Infused Solar Panels", new ItemStack(EMTBlocks.solars[0], 1, 12), new ItemStack(EMTBlocks.solars[0], 1, 0), EMTCraftingAspects.fireSolars); - earthSolar = addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(EMTBlocks.emtSolars2, 1, 2), new ItemStack(EMTBlocks.emtSolars, 1, 0), EMTCraftingAspects.earthSolars); + doubleFireSolar = addCrucibleRecipe("Fire Infused Solar Panels", new ItemStack(EMTBlocks.solars[0], 1, 13), new ItemStack(EMTBlocks.solars[0], 1, 1), EMTCraftingAspects.fireSolars); - doubleEarthSolar = addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(EMTBlocks.emtSolars2, 1, 3), new ItemStack(EMTBlocks.emtSolars, 1, 1), EMTCraftingAspects.earthSolars); + tripleFireSolar = addCrucibleRecipe("Fire Infused Solar Panels", new ItemStack(EMTBlocks.solars[0], 1, 14), new ItemStack(EMTBlocks.solars[0], 1, 2), EMTCraftingAspects.fireSolars); - tripleEarthSolar = addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(EMTBlocks.emtSolars2, 1, 4), new ItemStack(EMTBlocks.emtSolars, 1, 2), EMTCraftingAspects.earthSolars); + airSolar = addCrucibleRecipe("Air Infused Solar Panels", new ItemStack(EMTBlocks.solars[0], 1, 15), new ItemStack(EMTBlocks.solars[0], 1, 0), EMTCraftingAspects.airSolars); - ItemStack itemStack = new ItemStack(ConfigItems.itemJarNode); - ((ItemJarNode) itemStack.getItem()).setAspects(itemStack, new AspectList()); - portableNode = addCrucibleRecipe("Portable Node", new ItemStack(EMTBlocks.portableNode), itemStack, EMTCraftingAspects.portableNode); + doubleAirSolar = addCrucibleRecipe("Air Infused Solar Panels", new ItemStack(EMTBlocks.solars[1], 1, 0), new ItemStack(EMTBlocks.solars[0], 1, 1), EMTCraftingAspects.airSolars); - uuMCrystal = addCrucibleRecipe("UU-Matter Infusion", new ItemStack(EMTItems.itemEMTItems, 1, 15), Ic2Items.uuMatterCell.copy(), EMTCraftingAspects.uuMatterCrystal); + tripleAirSolar = addCrucibleRecipe("Air Infused Solar Panels", new ItemStack(EMTBlocks.solars[1], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 2), EMTCraftingAspects.airSolars); - /** IC2 Stuff related recipes **/ + earthSolar = addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(EMTBlocks.solars[1], 1, 2), new ItemStack(EMTBlocks.solars[0], 1, 0), EMTCraftingAspects.earthSolars); - /* Ore Clusters Macerator Recipes */ - ItemStack ironClusterRecipe = IC2Items.getItem("smallIronDust").copy(); - ironClusterRecipe.stackSize = 22; - ((BasicMachineRecipeManager)Recipes.macerator).addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 16)), null, true, ironClusterRecipe); + doubleEarthSolar = addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(EMTBlocks.solars[1], 1, 3), new ItemStack(EMTBlocks.solars[0], 1, 1), EMTCraftingAspects.earthSolars); - ItemStack goldClusterRecipe = IC2Items.getItem("smallGoldDust").copy(); - goldClusterRecipe.stackSize = 22; - ((BasicMachineRecipeManager)Recipes.macerator).addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 31)), null, true, goldClusterRecipe); + tripleEarthSolar = addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(EMTBlocks.solars[1], 1, 4), new ItemStack(EMTBlocks.solars[0], 1, 2), EMTCraftingAspects.earthSolars); - ItemStack copperClusterRecipe = IC2Items.getItem("smallCopperDust").copy(); - copperClusterRecipe.stackSize = 22; - ((BasicMachineRecipeManager)Recipes.macerator).addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 17)), null, true, copperClusterRecipe); + ItemStack itemStack = new ItemStack(ConfigItems.itemJarNode); + ((ItemJarNode) itemStack.getItem()).setAspects(itemStack, new AspectList()); + portableNode = addCrucibleRecipe("Portable Node", new ItemStack(EMTBlocks.portableNode), itemStack, EMTCraftingAspects.portableNode); - ItemStack tinClusterRecipe = IC2Items.getItem("smallTinDust").copy(); - tinClusterRecipe.stackSize = 22; - ((BasicMachineRecipeManager)Recipes.macerator).addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 18)), null, true, tinClusterRecipe); + uuMCrystal = addCrucibleRecipe("UU-Matter Infusion", new ItemStack(EMTItems.itemEMTItems, 1, 15), Ic2Items.uuMatterCell.copy(), EMTCraftingAspects.uuMatterCrystal); - ItemStack silverClusterRecipe = IC2Items.getItem("smallSilverDust").copy(); - silverClusterRecipe.stackSize = 22; - ((BasicMachineRecipeManager)Recipes.macerator).addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 19)), null, true, silverClusterRecipe); + /** IC2 Stuff related recipes **/ - ItemStack leadClusterRecipe = IC2Items.getItem("smallLeadDust").copy(); - leadClusterRecipe.stackSize = 22; - ((BasicMachineRecipeManager)Recipes.macerator).addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 20)), null, true, leadClusterRecipe); + /* Ore Clusters Macerator Recipes */ + ItemStack ironClusterRecipe = IC2Items.getItem("smallIronDust").copy(); + ironClusterRecipe.stackSize = 22; + ((BasicMachineRecipeManager) Recipes.macerator).addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 16)), null, true, ironClusterRecipe); - /* Thaumium Plates Recipes */ - thaumiumPlate = GameRegistry.addShapedRecipe(new ItemStack(EMTItems.itemEMTItems, 1, 5), "X", "Y", "Z", 'Y', new ItemStack(ConfigItems.itemResource, 1, 2), 'X', new ItemStack(IC2Items.getItem("ForgeHammer").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Z', new ItemStack(Blocks.obsidian)); - Recipes.metalformerRolling.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemResource, 1, 2)), null, new ItemStack(EMTItems.itemEMTItems, 1, 5)); + ItemStack goldClusterRecipe = IC2Items.getItem("smallGoldDust").copy(); + goldClusterRecipe.stackSize = 22; + ((BasicMachineRecipeManager) Recipes.macerator).addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 31)), null, true, goldClusterRecipe); - /* Ore Processing for Amber and Cinnabar */ - if (EMTConfigHandler.removeAmberAndCinnabarMacerating) { - for (Iterator it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext();) { - IRecipeInput input = it.next(); - if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7))) { - it.remove(); - EMT.LOGGER.info("Removing conflicting amber macerating recipe(s)"); - } - } - - for (Iterator it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext();) { - IRecipeInput input = it.next(); - if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0))) { - it.remove(); - EMT.LOGGER.info("Removing Conflicting cinnabar macerating recipe(s)"); - } - } - } - ItemStack crushedAmberRecipe = new ItemStack(EMTItems.itemEMTItems, 1, 1); - crushedAmberRecipe.stackSize = 2; - Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7)), null, crushedAmberRecipe); - - ItemStack crushedCinnabarRecipe = new ItemStack(EMTItems.itemEMTItems, 1, 3); - crushedCinnabarRecipe.stackSize = 2; - Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0)), null, crushedCinnabarRecipe); - - NBTTagCompound waterAmount = new NBTTagCompound(); - waterAmount.setInteger("amount", 1000); - - ItemStack smallCopperDust = IC2Items.getItem("smallCopperDust"); - smallCopperDust.stackSize = 2; - ItemStack smallTinDust = IC2Items.getItem("smallTinDust"); - smallCopperDust.stackSize = 2; - - Recipes.oreWashing.addRecipe(new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 1)), waterAmount, new ItemStack[] { new ItemStack(EMTItems.itemEMTItems, 1, 2), smallCopperDust, IC2Items.getItem("stoneDust") }); - Recipes.oreWashing.addRecipe(new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 3)), waterAmount, new ItemStack[] { new ItemStack(EMTItems.itemEMTItems, 1, 4), smallTinDust, IC2Items.getItem("stoneDust") }); - - NBTTagCompound heatAmount = new NBTTagCompound(); - heatAmount.setInteger("minHeat", 1000); - - Recipes.centrifuge.addRecipe(new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 2)), heatAmount, new ItemStack[] { IC2Items.getItem("smallCopperDust"), new ItemStack(ConfigItems.itemResource, 1, 6) }); - Recipes.centrifuge.addRecipe(new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 4)), heatAmount, new ItemStack[] { IC2Items.getItem("smallTinDust"), new ItemStack(ConfigItems.itemResource, 1, 3) }); - - } - - public static IRecipe ironOmnitool; - public static IRecipe diamondChainsaw; - public static IRecipe ductTape; - public static IRecipe rubberBall; - public static IRecipe featherMesh; - public static IRecipe cardboard; - public static IRecipe featherWing; - public static IRecipe featherWings; - public static IRecipe taintedFeathers; - - public static InfusionRecipe uraniumToIridium; - public static InfusionRecipe diamondToUranium; - public static InfusionRecipe goldToDiamond; - public static InfusionRecipe ironToGold; - public static InfusionRecipe stoneBricksToIronOre; - public static InfusionRecipe arcaneStoneToCopperOre; - public static InfusionRecipe arcaneStoneBricksToTinOre; - public static InfusionRecipe amberBlockToLeadOre; - public static InfusionRecipe amberBricksToUraniumOre; - public static InfusionRecipe charcoalToCoal; - public static InfusionRecipe shardToResin; - public static InfusionRecipe shardToRedstone; - public static InfusionRecipe shardToLapis; - public static InfusionRecipe glowstoneDustToBlock; - public static InfusionRecipe infusedQuantumArmor; - public static InfusionRecipe thaumiumDrill; - public static InfusionRecipe thaumiumChainsaw; - public static InfusionRecipe thaumicQuantumHelmet; - public static InfusionRecipe thaumiumOmnitool; - public static InfusionRecipe thaumicNanoHelmet; - public static InfusionRecipe explosionFocus; - public static InfusionRecipe shieldFocus; - public static InfusionRecipe potentiaGenerator; - public static InfusionRecipe streamChainsaw; - public static InfusionRecipe rockbreakerDrill; - public static InfusionRecipe thorHammer; - public static InfusionRecipe superchargedThorHammer; - public static InfusionRecipe wandRecharger; - public static InfusionRecipe solarHelmetRevealing; - public static InfusionRecipe electricBootsTravel; - public static InfusionRecipe nanoBootsTravel; - public static InfusionRecipe quantumBootsTravel; - public static InfusionRecipe diamondOmnitoolToThaumium; - public static InfusionRecipe etheralProcessor; - public static InfusionRecipe tripleCompressedSolar; - public static InfusionRecipe electricHoeGrowth; - public static InfusionRecipe chargeFocus; - public static InfusionRecipe wandChargeFocus; - public static InfusionRecipe energyBallFocus; - public static InfusionRecipe inventoryChargingRing; - public static InfusionRecipe armorChargingRing; - public static InfusionRecipe nanoWings; - public static InfusionRecipe quantumWings; - public static InfusionRecipe lucrumGenerator; - - public static ShapelessArcaneRecipe diamondOmnitool; - public static ShapelessArcaneRecipe tinyUranium; - public static ShapedArcaneRecipe christmasFocus; - public static ShapedArcaneRecipe electricGoggles; - public static ShapedArcaneRecipe electricGoggles2; - public static ShapedArcaneRecipe shieldBlock; - public static ShapedArcaneRecipe compressedSolar; - public static ShapedArcaneRecipe doubleCompressedSolar; - public static ShapedArcaneRecipe ironOmnitoolToDiamond; - public static ShapedArcaneRecipe electricScribingTools; - public static ShapedArcaneRecipe thaumiumWing; - public static ShapedArcaneRecipe thaumiumWings; - - public static CrucibleRecipe ignisGenerator; - public static CrucibleRecipe auramGenerator; - public static CrucibleRecipe arborGenerator; - public static CrucibleRecipe aerGenerator; - public static CrucibleRecipe waterSolar; - public static CrucibleRecipe doubleWaterSolar; - public static CrucibleRecipe tripleWaterSolar; - public static CrucibleRecipe darkSolar; - public static CrucibleRecipe doubleDarkSolar; - public static CrucibleRecipe tripleDarkSolar; - public static CrucibleRecipe orderSolar; - public static CrucibleRecipe doubleOrderSolar; - public static CrucibleRecipe tripleOrderSolar; - public static CrucibleRecipe fireSolar; - public static CrucibleRecipe doubleFireSolar; - public static CrucibleRecipe tripleFireSolar; - public static CrucibleRecipe airSolar; - public static CrucibleRecipe doubleAirSolar; - public static CrucibleRecipe tripleAirSolar; - public static CrucibleRecipe earthSolar; - public static CrucibleRecipe doubleEarthSolar; - public static CrucibleRecipe tripleEarthSolar; - public static CrucibleRecipe portableNode; - public static CrucibleRecipe uuMCrystal; - - public static IRecipe thaumiumPlate; + ItemStack copperClusterRecipe = IC2Items.getItem("smallCopperDust").copy(); + copperClusterRecipe.stackSize = 22; + ((BasicMachineRecipeManager) Recipes.macerator).addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 17)), null, true, copperClusterRecipe); + + ItemStack tinClusterRecipe = IC2Items.getItem("smallTinDust").copy(); + tinClusterRecipe.stackSize = 22; + ((BasicMachineRecipeManager) Recipes.macerator).addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 18)), null, true, tinClusterRecipe); + + ItemStack silverClusterRecipe = IC2Items.getItem("smallSilverDust").copy(); + silverClusterRecipe.stackSize = 22; + ((BasicMachineRecipeManager) Recipes.macerator).addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 19)), null, true, silverClusterRecipe); + + ItemStack leadClusterRecipe = IC2Items.getItem("smallLeadDust").copy(); + leadClusterRecipe.stackSize = 22; + ((BasicMachineRecipeManager) Recipes.macerator).addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 20)), null, true, leadClusterRecipe); + + /* Thaumium Plates Recipes */ + thaumiumPlate = GameRegistry.addShapedRecipe(new ItemStack(EMTItems.itemEMTItems, 1, 5), "X", "Y", "Z", 'Y', new ItemStack(ConfigItems.itemResource, 1, 2), 'X', new ItemStack(IC2Items.getItem("ForgeHammer").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Z', new ItemStack(Blocks.obsidian)); + Recipes.metalformerRolling.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemResource, 1, 2)), null, new ItemStack(EMTItems.itemEMTItems, 1, 5)); + + /* Ore Processing for Amber and Cinnabar */ + if (EMTConfigHandler.removeAmberAndCinnabarMacerating) { + for (Iterator it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext(); ) { + IRecipeInput input = it.next(); + if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7))) { + it.remove(); + EMT.LOGGER.info("Removing conflicting amber macerating recipe(s)"); + } + } + + for (Iterator it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext(); ) { + IRecipeInput input = it.next(); + if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0))) { + it.remove(); + EMT.LOGGER.info("Removing Conflicting cinnabar macerating recipe(s)"); + } + } + } + ItemStack crushedAmberRecipe = new ItemStack(EMTItems.itemEMTItems, 1, 1); + crushedAmberRecipe.stackSize = 2; + Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7)), null, crushedAmberRecipe); + + ItemStack crushedCinnabarRecipe = new ItemStack(EMTItems.itemEMTItems, 1, 3); + crushedCinnabarRecipe.stackSize = 2; + Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0)), null, crushedCinnabarRecipe); + + NBTTagCompound waterAmount = new NBTTagCompound(); + waterAmount.setInteger("amount", 1000); + + ItemStack smallCopperDust = IC2Items.getItem("smallCopperDust"); + smallCopperDust.stackSize = 2; + ItemStack smallTinDust = IC2Items.getItem("smallTinDust"); + smallCopperDust.stackSize = 2; + + Recipes.oreWashing.addRecipe(new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 1)), waterAmount, new ItemStack(EMTItems.itemEMTItems, 1, 2), smallCopperDust, IC2Items.getItem("stoneDust")); + Recipes.oreWashing.addRecipe(new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 3)), waterAmount, new ItemStack(EMTItems.itemEMTItems, 1, 4), smallTinDust, IC2Items.getItem("stoneDust")); + + NBTTagCompound heatAmount = new NBTTagCompound(); + heatAmount.setInteger("minHeat", 1000); + + Recipes.centrifuge.addRecipe(new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 2)), heatAmount, IC2Items.getItem("smallCopperDust"), new ItemStack(ConfigItems.itemResource, 1, 6)); + Recipes.centrifuge.addRecipe(new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 4)), heatAmount, IC2Items.getItem("smallTinDust"), new ItemStack(ConfigItems.itemResource, 1, 3)); + + } } diff --git a/src/main/java/emt/init/EMTResearches.java b/src/main/java/emt/init/EMTResearches.java index 10444d2..e7a2f46 100644 --- a/src/main/java/emt/init/EMTResearches.java +++ b/src/main/java/emt/init/EMTResearches.java @@ -11,276 +11,276 @@ import thaumcraft.api.research.ResearchCategories; import thaumcraft.api.research.ResearchPage; public class EMTResearches { - public static void register() { - addResearchTab(); - addResearch(); - } + public static void register() { + addResearchTab(); + addResearch(); + } - public static void addResearchTab() { - ResourceLocation background = new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/background.png"); - ResearchCategories.registerCategory("EMT", new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/emt.png"), background); - } + public static void addResearchTab() { + ResourceLocation background = new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/background.png"); + ResearchCategories.registerCategory("EMT", new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/emt.png"), background); + } - public static void addResearch() { - /** Research that can't be disabled **/ - new EMTResearchItem("Electric Magic Tools", 0, 0, 0, new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/emt.png")).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("")); - new EMTResearchItem("Diamond Chainsaw", 5, -6, 0, new ItemStack(EMTItems.diamondChainsaw)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.diamondChainsaw)); - new EMTResearchItem("Thaumium Plate", 6, -6, 0, new ItemStack(EMTItems.itemEMTItems, 1, 5)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumPlate)); - new EMTResearchItem("Macerating Native Ore Clusters", 5, -7, 0, IC2Items.getItem("smallGoldDust")).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("")); - new EMTResearchItem("The Legend", 5, -5, 0, new ItemStack(EMTItems.taintedThorHammer)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("")); - new EMTResearchItem("Lightning Summoner", 6, -5, 0, new ItemStack(EMTItems.itemEMTItems, 1, 6)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("")); - new EMTResearchItem("The One Ring", 6, -7, 0, new ItemStack(EMTItems.onering)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("")); - new EMTResearchItem("Electric Cloud", 4, -7, 0, new ItemStack(EMTBlocks.electricCloud)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage("2")); - new EMTResearchItem("Feather Wings", 0, 2, 0, new ItemStack(EMTItems.featherWing)).setParents("Electric Magic Tools").setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage(EMTRecipes.cardboard), new ResearchPage(EMTRecipes.featherWing), new ResearchPage(EMTRecipes.featherWings)); - /*************************************/ + public static void addResearch() { + /** Research that can't be disabled **/ + new EMTResearchItem("Electric Magic Tools", 0, 0, 0, new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/emt.png")).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("")); + new EMTResearchItem("Diamond Chainsaw", 5, -6, 0, new ItemStack(EMTItems.diamondChainsaw)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.diamondChainsaw)); + new EMTResearchItem("Thaumium Plate", 6, -6, 0, new ItemStack(EMTItems.itemEMTItems, 1, 5)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumPlate)); + new EMTResearchItem("Macerating Native Ore Clusters", 5, -7, 0, IC2Items.getItem("smallGoldDust")).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("")); + new EMTResearchItem("The Legend", 5, -5, 0, new ItemStack(EMTItems.taintedThorHammer)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("")); + new EMTResearchItem("Lightning Summoner", 6, -5, 0, new ItemStack(EMTItems.itemEMTItems, 1, 6)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("")); + new EMTResearchItem("The One Ring", 6, -7, 0, new ItemStack(EMTItems.onering)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("")); + new EMTResearchItem("Electric Cloud", 4, -7, 0, new ItemStack(EMTBlocks.electricCloud)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage("2")); + new EMTResearchItem("Feather Wings", 0, 2, 0, new ItemStack(EMTItems.featherWing)).setParents("Electric Magic Tools").setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage(EMTRecipes.cardboard), new ResearchPage(EMTRecipes.featherWing), new ResearchPage(EMTRecipes.featherWings)); + /*************************************/ - /** Research that can be disabled **/ - if (!EMTConfigHandler.thaumiumDrillResearch) { - new EMTResearchItem("Thaumium Drill", EMTResearchAspects.thaumiumDrillResearch, -1, -2, 1, new ItemStack(EMTItems.thaumiumDrill)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumDrill)); - } + /** Research that can be disabled **/ + if (!EMTConfigHandler.thaumiumDrillResearch) { + new EMTResearchItem("Thaumium Drill", EMTResearchAspects.thaumiumDrillResearch, -1, -2, 1, new ItemStack(EMTItems.thaumiumDrill)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumDrill)); + } - if (!EMTConfigHandler.thaumiumChainsawResearch) { - new EMTResearchItem("Thaumium Chainsaw", EMTResearchAspects.thaumiumChainsawResearch, -2, -2, 1, new ItemStack(EMTItems.thaumiumChainsaw)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumChainsaw)); - } + if (!EMTConfigHandler.thaumiumChainsawResearch) { + new EMTResearchItem("Thaumium Chainsaw", EMTResearchAspects.thaumiumChainsawResearch, -2, -2, 1, new ItemStack(EMTItems.thaumiumChainsaw)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumChainsaw)); + } - if (!EMTConfigHandler.electricGooglesResearch) { - new EMTResearchItem("Electric Goggles", EMTResearchAspects.electricGogglesResearch, 1, -2, 1, new ItemStack(EMTItems.electricGoggles)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.electricGoggles)); - } + if (!EMTConfigHandler.electricGooglesResearch) { + new EMTResearchItem("Electric Goggles", EMTResearchAspects.electricGogglesResearch, 1, -2, 1, new ItemStack(EMTItems.electricGoggles)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.electricGoggles)); + } - if (!EMTConfigHandler.electricGooglesResearch) { - if (!EMTConfigHandler.nanoGooglesResearch) { - ; - new EMTResearchItem("Nanosuit Goggles of Revealing", EMTResearchAspects.thaumicNanoHelmet, 2, -2, 2, new ItemStack(EMTItems.nanoThaumicHelmet)).setParents("Electric Goggles").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumicNanoHelmet)); - } - } + if (!EMTConfigHandler.electricGooglesResearch) { + if (!EMTConfigHandler.nanoGooglesResearch) { + ; + new EMTResearchItem("Nanosuit Goggles of Revealing", EMTResearchAspects.thaumicNanoHelmet, 2, -2, 2, new ItemStack(EMTItems.nanoThaumicHelmet)).setParents("Electric Goggles").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumicNanoHelmet)); + } + } - if (!EMTConfigHandler.electricGooglesResearch) { - if (!EMTConfigHandler.nanoGooglesResearch) { - if (!EMTConfigHandler.quantumGooglesResearch) { - new EMTResearchItem("Quantum Goggles of Revealing", EMTResearchAspects.thaumicQuantumHelmet, 3, -2, 3, new ItemStack(EMTItems.quantumThaumicHelmet)).setParents("Nanosuit Goggles of Revealing").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumicQuantumHelmet)); - } - } - } + if (!EMTConfigHandler.electricGooglesResearch) { + if (!EMTConfigHandler.nanoGooglesResearch) { + if (!EMTConfigHandler.quantumGooglesResearch) { + new EMTResearchItem("Quantum Goggles of Revealing", EMTResearchAspects.thaumicQuantumHelmet, 3, -2, 3, new ItemStack(EMTItems.quantumThaumicHelmet)).setParents("Nanosuit Goggles of Revealing").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumicQuantumHelmet)); + } + } + } - if (!EMTConfigHandler.ironOmnitoolResearch) { - new EMTResearchItem("Iron Omnitool", -2, 0, 0, new ItemStack(EMTItems.ironOmnitool)).setParents("Electric Magic Tools").setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.ironOmnitool)); - } + if (!EMTConfigHandler.ironOmnitoolResearch) { + new EMTResearchItem("Iron Omnitool", -2, 0, 0, new ItemStack(EMTItems.ironOmnitool)).setParents("Electric Magic Tools").setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.ironOmnitool)); + } - if (!EMTConfigHandler.ironOmnitoolResearch) { - if (!EMTConfigHandler.diamondOmnitoolResearch) { - new EMTResearchItem("Diamond Omnitool", EMTResearchAspects.diamondOmnitoolResearch, -4, 0, 1, new ItemStack(EMTItems.diamondOmnitool)).setSecondary().setParents("Iron Omnitool").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.diamondOmnitool), new ResearchPage(EMTRecipes.ironOmnitoolToDiamond)); - } - } + if (!EMTConfigHandler.ironOmnitoolResearch) { + if (!EMTConfigHandler.diamondOmnitoolResearch) { + new EMTResearchItem("Diamond Omnitool", EMTResearchAspects.diamondOmnitoolResearch, -4, 0, 1, new ItemStack(EMTItems.diamondOmnitool)).setSecondary().setParents("Iron Omnitool").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.diamondOmnitool), new ResearchPage(EMTRecipes.ironOmnitoolToDiamond)); + } + } - if (!EMTConfigHandler.thaumiumDrillResearch && !EMTConfigHandler.thaumiumChainsawResearch) { - if (!EMTConfigHandler.thaumiumOmnitoolResearch) { - new EMTResearchItem("Thaumium Omnitool", EMTResearchAspects.thaumiumOmnitoolResearch, -6, 0, 2, new ItemStack(EMTItems.thaumiumOmnitool)).setParentsHidden("Thaumium Drill", "Thaumium Chainsaw").setParents("Diamond Omnitool").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumOmnitool), new ResearchPage(EMTRecipes.diamondOmnitoolToThaumium)); - } - } + if (!EMTConfigHandler.thaumiumDrillResearch && !EMTConfigHandler.thaumiumChainsawResearch) { + if (!EMTConfigHandler.thaumiumOmnitoolResearch) { + new EMTResearchItem("Thaumium Omnitool", EMTResearchAspects.thaumiumOmnitoolResearch, -6, 0, 2, new ItemStack(EMTItems.thaumiumOmnitool)).setParentsHidden("Thaumium Drill", "Thaumium Chainsaw").setParents("Diamond Omnitool").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumOmnitool), new ResearchPage(EMTRecipes.diamondOmnitoolToThaumium)); + } + } - if (!EMTConfigHandler.explosionFocusResearch) { - new EMTResearchItem("Explosion Focus", EMTResearchAspects.laserFocusResearch, 2, 3, 2, new ItemStack(EMTItems.explosionFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.explosionFocus)); - } + if (!EMTConfigHandler.explosionFocusResearch) { + new EMTResearchItem("Explosion Focus", EMTResearchAspects.laserFocusResearch, 2, 3, 2, new ItemStack(EMTItems.explosionFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.explosionFocus)); + } - if (!EMTConfigHandler.christmasFocusResearch) { - new EMTResearchItem("Kris-tmas Focus", EMTResearchAspects.christmasFocusResearch, 3, 3, 1, new ItemStack(EMTItems.christmasFocus)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.christmasFocus)); - } + if (!EMTConfigHandler.christmasFocusResearch) { + new EMTResearchItem("Kris-tmas Focus", EMTResearchAspects.christmasFocusResearch, 3, 3, 1, new ItemStack(EMTItems.christmasFocus)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.christmasFocus)); + } - if (!EMTConfigHandler.shieldFocusResearch) { - new EMTResearchItem("Shield Focus", EMTResearchAspects.shieldFocusResearch, 4, 3, 2, new ItemStack(EMTItems.shieldFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.shieldFocus)); - } + if (!EMTConfigHandler.shieldFocusResearch) { + new EMTResearchItem("Shield Focus", EMTResearchAspects.shieldFocusResearch, 4, 3, 2, new ItemStack(EMTItems.shieldFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.shieldFocus)); + } - if (!EMTConfigHandler.energyBallFocusResearch) { - new EMTResearchItem("Energy Ball Focus", EMTResearchAspects.energyBallFocusResearch, 1, 3, 2, new ItemStack(EMTItems.energyBallFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.energyBallFocus)); - } + if (!EMTConfigHandler.energyBallFocusResearch) { + new EMTResearchItem("Energy Ball Focus", EMTResearchAspects.energyBallFocusResearch, 1, 3, 2, new ItemStack(EMTItems.energyBallFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.energyBallFocus)); + } - if (!EMTConfigHandler.shieldFocusResearch) { - if (!EMTConfigHandler.shieldBlockResearch) { - new EMTResearchItem("Shield Block", EMTResearchAspects.shieldBlockResearch, 4, 5, 1, new ItemStack(EMTBlocks.shield)).setSecondary().setParents("Shield Focus").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.shieldBlock)); - } - } + if (!EMTConfigHandler.shieldFocusResearch) { + if (!EMTConfigHandler.shieldBlockResearch) { + new EMTResearchItem("Shield Block", EMTResearchAspects.shieldBlockResearch, 4, 5, 1, new ItemStack(EMTBlocks.shield)).setSecondary().setParents("Shield Focus").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.shieldBlock)); + } + } - if (!EMTConfigHandler.potentiaGeneratorResearch) { - new EMTResearchItem("Potentia Generator", EMTResearchAspects.potentiaGeneratorResearch, -2, 3, 3, new ItemStack(EMTBlocks.essentiaGens, 1, 0)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.potentiaGenerator)); - } + if (!EMTConfigHandler.potentiaGeneratorResearch) { + new EMTResearchItem("Potentia Generator", EMTResearchAspects.potentiaGeneratorResearch, -2, 3, 3, new ItemStack(EMTBlocks.essentiaGens, 1, 0)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.potentiaGenerator)); + } - if (!EMTConfigHandler.potentiaGeneratorResearch) { - if (!EMTConfigHandler.ignisGeneratorResearch) { - new EMTResearchItem("Ignis Generator", EMTResearchAspects.ignisGeneratorResearch, -3, 4, 1, new ItemStack(EMTBlocks.essentiaGens, 1, 1)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.ignisGenerator)); - } - } + if (!EMTConfigHandler.potentiaGeneratorResearch) { + if (!EMTConfigHandler.ignisGeneratorResearch) { + new EMTResearchItem("Ignis Generator", EMTResearchAspects.ignisGeneratorResearch, -3, 4, 1, new ItemStack(EMTBlocks.essentiaGens, 1, 1)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.ignisGenerator)); + } + } - if (!EMTConfigHandler.potentiaGeneratorResearch) { - if (!EMTConfigHandler.auramGeneratorResearch) { - new EMTResearchItem("Auram Generator", EMTResearchAspects.auramGeneratorResearch, -1, 4, 1, new ItemStack(EMTBlocks.essentiaGens, 1, 2)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.auramGenerator)); - } - } + if (!EMTConfigHandler.potentiaGeneratorResearch) { + if (!EMTConfigHandler.auramGeneratorResearch) { + new EMTResearchItem("Auram Generator", EMTResearchAspects.auramGeneratorResearch, -1, 4, 1, new ItemStack(EMTBlocks.essentiaGens, 1, 2)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.auramGenerator)); + } + } - if (!EMTConfigHandler.potentiaGeneratorResearch) { - if (!EMTConfigHandler.arborGeneratorResearch) { - new EMTResearchItem("Arbor Generator", EMTResearchAspects.arborGeneratorResearch, -2, 5, 1, new ItemStack(EMTBlocks.essentiaGens, 1, 3)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.arborGenerator)); - } - } + if (!EMTConfigHandler.potentiaGeneratorResearch) { + if (!EMTConfigHandler.arborGeneratorResearch) { + new EMTResearchItem("Arbor Generator", EMTResearchAspects.arborGeneratorResearch, -2, 5, 1, new ItemStack(EMTBlocks.essentiaGens, 1, 3)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.arborGenerator)); + } + } - if (!EMTConfigHandler.potentiaGeneratorResearch) { - if (!EMTConfigHandler.lucrumGeneratorResearch) { - new EMTResearchItem("Lucrum Generator", EMTResearchAspects.lucrumGeneratorResearch, -2, 2, 1, new ItemStack(EMTBlocks.essentiaGens, 1, 5)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.lucrumGenerator)); - } - } - - if (!EMTConfigHandler.potentiaGeneratorResearch) { - if (!EMTConfigHandler.aerGeneratorResearch) { - new EMTResearchItem("Aer Generator", EMTResearchAspects.aerGenerator, -2, 6, 1, new ItemStack(EMTBlocks.essentiaGens, 1, 4)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.aerGenerator)); - } - } + if (!EMTConfigHandler.potentiaGeneratorResearch) { + if (!EMTConfigHandler.lucrumGeneratorResearch) { + new EMTResearchItem("Lucrum Generator", EMTResearchAspects.lucrumGeneratorResearch, -2, 2, 1, new ItemStack(EMTBlocks.essentiaGens, 1, 5)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.lucrumGenerator)); + } + } - if (!EMTConfigHandler.potentiaGeneratorResearch) { - if (!EMTConfigHandler.wandChargingSationResearch) { - new EMTResearchItem("Industrial Wand Charging Station", EMTResearchAspects.wandCharger, -4, 2, 3, new ItemStack(EMTBlocks.emtMachines, 1, 0)).setParents("Potentia Generator").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.wandRecharger)); - } - } + if (!EMTConfigHandler.potentiaGeneratorResearch) { + if (!EMTConfigHandler.aerGeneratorResearch) { + new EMTResearchItem("Aer Generator", EMTResearchAspects.aerGenerator, -2, 6, 1, new ItemStack(EMTBlocks.essentiaGens, 1, 4)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.aerGenerator)); + } + } - if (!EMTConfigHandler.thaumiumChainsawResearch) { - if (!EMTConfigHandler.streamChainsawResearch) { - new EMTResearchItem("Chainsaw of the Stream", EMTResearchAspects.streamChainsawResearch, -3, -4, 3, new ItemStack(EMTItems.streamChainsaw)).setParents("Thaumium Chainsaw").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.streamChainsaw)); - } - } + if (!EMTConfigHandler.potentiaGeneratorResearch) { + if (!EMTConfigHandler.wandChargingSationResearch) { + new EMTResearchItem("Industrial Wand Charging Station", EMTResearchAspects.wandCharger, -4, 2, 3, new ItemStack(EMTBlocks.emtMachines, 1, 0)).setParents("Potentia Generator").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.wandRecharger)); + } + } - if (!EMTConfigHandler.thaumiumDrillResearch) { - if (!EMTConfigHandler.rockbreakerDrillResearch) { - new EMTResearchItem("Drill of the Rockbreaker", EMTResearchAspects.rockbreakerDrillResearch, 0, -4, 3, new ItemStack(EMTItems.rockbreakerDrill)).setParents("Thaumium Drill").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.rockbreakerDrill)); - } - } + if (!EMTConfigHandler.thaumiumChainsawResearch) { + if (!EMTConfigHandler.streamChainsawResearch) { + new EMTResearchItem("Chainsaw of the Stream", EMTResearchAspects.streamChainsawResearch, -3, -4, 3, new ItemStack(EMTItems.streamChainsaw)).setParents("Thaumium Chainsaw").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.streamChainsaw)); + } + } - if (!EMTConfigHandler.tinyUraniumResearch) { - new EMTResearchItem("Tiny Uranium", EMTResearchAspects.tinyUraniumResearch, -5, -5, 1, IC2Items.getItem("Uran238")).setSecondary().setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.tinyUranium)); - } + if (!EMTConfigHandler.thaumiumDrillResearch) { + if (!EMTConfigHandler.rockbreakerDrillResearch) { + new EMTResearchItem("Drill of the Rockbreaker", EMTResearchAspects.rockbreakerDrillResearch, 0, -4, 3, new ItemStack(EMTItems.rockbreakerDrill)).setParents("Thaumium Drill").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.rockbreakerDrill)); + } + } - if (!EMTConfigHandler.thorHammerResearch) { - new EMTResearchItem("Mjolnir", EMTResearchAspects.thorHammerResearch, -5, 5, 3, new ItemStack(EMTItems.thorHammer)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thorHammer)); - } + if (!EMTConfigHandler.tinyUraniumResearch) { + new EMTResearchItem("Tiny Uranium", EMTResearchAspects.tinyUraniumResearch, -5, -5, 1, IC2Items.getItem("Uran238")).setSecondary().setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.tinyUranium)); + } - if (!EMTConfigHandler.thorHammerResearch) { - if (!EMTConfigHandler.superchargedThorHammerResearch) { - new EMTResearchItem("Supercharged Mjolnir", EMTResearchAspects.superchargedThorHammerResearch, -6, 6, 3, new ItemStack(EMTItems.electricThorHammer)).setParents("Mjolnir").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.superchargedThorHammer)); - } - } + if (!EMTConfigHandler.thorHammerResearch) { + new EMTResearchItem("Mjolnir", EMTResearchAspects.thorHammerResearch, -5, 5, 3, new ItemStack(EMTItems.thorHammer)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thorHammer)); + } - if (!EMTConfigHandler.compressedSolarsResearch) { - new EMTResearchItem("Compressed Solars", EMTResearchAspects.compressedSolars, -4, -5, 2, new ItemStack(EMTBlocks.emtSolars)).setParentsHidden("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.compressedSolar), new ResearchPage(EMTRecipes.doubleCompressedSolar), new ResearchPage(EMTRecipes.tripleCompressedSolar)); - } + if (!EMTConfigHandler.thorHammerResearch) { + if (!EMTConfigHandler.superchargedThorHammerResearch) { + new EMTResearchItem("Supercharged Mjolnir", EMTResearchAspects.superchargedThorHammerResearch, -6, 6, 3, new ItemStack(EMTItems.electricThorHammer)).setParents("Mjolnir").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.superchargedThorHammer)); + } + } - if (!EMTConfigHandler.compressedSolarsResearch) { - if (!EMTConfigHandler.solarHelmetResearch) { - new EMTResearchItem("Solar Helmet of Revealing", EMTResearchAspects.solarHelmetRevealing, -2, -5, 1, new ItemStack(EMTItems.solarHelmetRevealing)).setSecondary().setParents("Compressed Solars").setParentsHidden("Quantum Goggles of Revealing").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.solarHelmetRevealing)); - } - } + if (!EMTConfigHandler.compressedSolarsResearch) { + new EMTResearchItem("Compressed Solars", EMTResearchAspects.compressedSolars, -4, -5, 2, new ItemStack(EMTBlocks.solars[0])).setParentsHidden("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.compressedSolar), new ResearchPage(EMTRecipes.doubleCompressedSolar), new ResearchPage(EMTRecipes.tripleCompressedSolar)); + } - if (!EMTConfigHandler.electricBootsResearch) { - new EMTResearchItem("Electric Boots of the Traveller", EMTResearchAspects.electricBootsTravel, 2, 0, 1, new ItemStack(EMTItems.electricBootsTraveller)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.electricBootsTravel)); - } + if (!EMTConfigHandler.compressedSolarsResearch) { + if (!EMTConfigHandler.solarHelmetResearch) { + new EMTResearchItem("Solar Helmet of Revealing", EMTResearchAspects.solarHelmetRevealing, -2, -5, 1, new ItemStack(EMTItems.solarHelmetRevealing)).setSecondary().setParents("Compressed Solars").setParentsHidden("Quantum Goggles of Revealing").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.solarHelmetRevealing)); + } + } - if (!EMTConfigHandler.electricBootsResearch) { - if (!EMTConfigHandler.nanoBootsResearch) { - new EMTResearchItem("Nano Boots of the Traveller", EMTResearchAspects.nanoBootsTravel, 4, 0, 2, new ItemStack(EMTItems.nanoBootsTraveller)).setParents("Electric Boots of the Traveller").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.nanoBootsTravel)); - } - } + if (!EMTConfigHandler.electricBootsResearch) { + new EMTResearchItem("Electric Boots of the Traveller", EMTResearchAspects.electricBootsTravel, 2, 0, 1, new ItemStack(EMTItems.electricBootsTraveller)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.electricBootsTravel)); + } - if (!EMTConfigHandler.electricBootsResearch) { - if (!EMTConfigHandler.nanoBootsResearch) { - if (!EMTConfigHandler.quantumBootsResearch) { - new EMTResearchItem("Quantum Boots of the Traveller", EMTResearchAspects.quantumBootsTravel, 6, 0, 3, new ItemStack(EMTItems.quantumBootsTraveller)).setParents("Nano Boots of the Traveller").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.quantumBootsTravel)); - } - } - } + if (!EMTConfigHandler.electricBootsResearch) { + if (!EMTConfigHandler.nanoBootsResearch) { + new EMTResearchItem("Nano Boots of the Traveller", EMTResearchAspects.nanoBootsTravel, 4, 0, 2, new ItemStack(EMTItems.nanoBootsTraveller)).setParents("Electric Boots of the Traveller").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.nanoBootsTravel)); + } + } - if (!EMTConfigHandler.electricScribingToolsResearch) { - new EMTResearchItem("Electric Scribing Tools", EMTResearchAspects.electricScribingTools, -6, -5, 1, new ItemStack(EMTItems.electricScribingTools)).setSecondary().setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.electricScribingTools)); - } + if (!EMTConfigHandler.electricBootsResearch) { + if (!EMTConfigHandler.nanoBootsResearch) { + if (!EMTConfigHandler.quantumBootsResearch) { + new EMTResearchItem("Quantum Boots of the Traveller", EMTResearchAspects.quantumBootsTravel, 6, 0, 3, new ItemStack(EMTItems.quantumBootsTraveller)).setParents("Nano Boots of the Traveller").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.quantumBootsTravel)); + } + } + } - if (!EMTConfigHandler.etherealProcessorResearch) { - new EMTResearchItem("Etheral Processor", EMTResearchAspects.etherealProcessor, -1, 2, 2, new ItemStack(EMTBlocks.emtMachines, 1, 1)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.etheralProcessor)); - } + if (!EMTConfigHandler.electricScribingToolsResearch) { + new EMTResearchItem("Electric Scribing Tools", EMTResearchAspects.electricScribingTools, -6, -5, 1, new ItemStack(EMTItems.electricScribingTools)).setSecondary().setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.electricScribingTools)); + } - if (!EMTConfigHandler.compressedSolarsResearch) { - if (!EMTConfigHandler.waterSolarsResearch) { - new EMTResearchItem("Water Infused Solar Panels", EMTResearchAspects.waterSolars, -7, -7, 1, new ItemStack(EMTBlocks.emtSolars, 1, 3)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.waterSolar), new ResearchPage(EMTRecipes.doubleWaterSolar), new ResearchPage(EMTRecipes.tripleWaterSolar)); - } - } + if (!EMTConfigHandler.etherealProcessorResearch) { + new EMTResearchItem("Etheral Processor", EMTResearchAspects.etherealProcessor, -1, 2, 2, new ItemStack(EMTBlocks.emtMachines, 1, 1)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.etheralProcessor)); + } - if (!EMTConfigHandler.compressedSolarsResearch) { - if (!EMTConfigHandler.darkSolarsResearch) { - new EMTResearchItem("Entropy Infused Solar Panels", EMTResearchAspects.darkSolars, -8, -6, 1, new ItemStack(EMTBlocks.emtSolars, 1, 6)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.darkSolar), new ResearchPage(EMTRecipes.doubleDarkSolar), new ResearchPage(EMTRecipes.tripleDarkSolar)); - } - } + if (!EMTConfigHandler.compressedSolarsResearch) { + if (!EMTConfigHandler.waterSolarsResearch) { + new EMTResearchItem("Water Infused Solar Panels", EMTResearchAspects.waterSolars, -7, -7, 1, new ItemStack(EMTBlocks.solars[0], 1, 3)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.waterSolar), new ResearchPage(EMTRecipes.doubleWaterSolar), new ResearchPage(EMTRecipes.tripleWaterSolar)); + } + } - if (!EMTConfigHandler.compressedSolarsResearch) { - if (!EMTConfigHandler.orderSolarsResearch) { - new EMTResearchItem("Order Infused Solar Panels", EMTResearchAspects.orderSolars, -6, -8, 1, new ItemStack(EMTBlocks.emtSolars, 1, 9)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.orderSolar), new ResearchPage(EMTRecipes.doubleOrderSolar), new ResearchPage(EMTRecipes.tripleOrderSolar)); - } - } + if (!EMTConfigHandler.compressedSolarsResearch) { + if (!EMTConfigHandler.darkSolarsResearch) { + new EMTResearchItem("Entropy Infused Solar Panels", EMTResearchAspects.darkSolars, -8, -6, 1, new ItemStack(EMTBlocks.solars[0], 1, 6)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.darkSolar), new ResearchPage(EMTRecipes.doubleDarkSolar), new ResearchPage(EMTRecipes.tripleDarkSolar)); + } + } - if (!EMTConfigHandler.compressedSolarsResearch) { - if (!EMTConfigHandler.fireSolarsResearch) { - new EMTResearchItem("Fire Infused Solar Panels", EMTResearchAspects.fireSolars, -5, -7, 1, new ItemStack(EMTBlocks.emtSolars, 1, 12)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.fireSolar), new ResearchPage(EMTRecipes.doubleFireSolar), new ResearchPage(EMTRecipes.tripleFireSolar)); - } - } + if (!EMTConfigHandler.compressedSolarsResearch) { + if (!EMTConfigHandler.orderSolarsResearch) { + new EMTResearchItem("Order Infused Solar Panels", EMTResearchAspects.orderSolars, -6, -8, 1, new ItemStack(EMTBlocks.solars[0], 1, 9)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.orderSolar), new ResearchPage(EMTRecipes.doubleOrderSolar), new ResearchPage(EMTRecipes.tripleOrderSolar)); + } + } - if (!EMTConfigHandler.compressedSolarsResearch) { - if (!EMTConfigHandler.airSolarsResearch) { - new EMTResearchItem("Air Infused Solar Panels", EMTResearchAspects.airSolars, -4, -6, 1, new ItemStack(EMTBlocks.emtSolars, 1, 15)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.airSolar), new ResearchPage(EMTRecipes.doubleAirSolar), new ResearchPage(EMTRecipes.tripleAirSolar)); - } - } + if (!EMTConfigHandler.compressedSolarsResearch) { + if (!EMTConfigHandler.fireSolarsResearch) { + new EMTResearchItem("Fire Infused Solar Panels", EMTResearchAspects.fireSolars, -5, -7, 1, new ItemStack(EMTBlocks.solars[0], 1, 12)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.fireSolar), new ResearchPage(EMTRecipes.doubleFireSolar), new ResearchPage(EMTRecipes.tripleFireSolar)); + } + } - if (!EMTConfigHandler.compressedSolarsResearch) { - if (!EMTConfigHandler.earthSolarsResearch) { - new EMTResearchItem("Earth Infused Solar Panels", EMTResearchAspects.earthSolars, -6, -7, 1, new ItemStack(EMTBlocks.emtSolars2, 1, 2)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.earthSolar), new ResearchPage(EMTRecipes.doubleEarthSolar), new ResearchPage(EMTRecipes.tripleEarthSolar)); - } - } + if (!EMTConfigHandler.compressedSolarsResearch) { + if (!EMTConfigHandler.airSolarsResearch) { + new EMTResearchItem("Air Infused Solar Panels", EMTResearchAspects.airSolars, -4, -6, 1, new ItemStack(EMTBlocks.solars[0], 1, 15)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.airSolar), new ResearchPage(EMTRecipes.doubleAirSolar), new ResearchPage(EMTRecipes.tripleAirSolar)); + } + } - if (!EMTConfigHandler.uuMInfusionResearch) { - new EMTResearchItem("UU-Matter Infusion", EMTResearchAspects.uuMInfusion, 5, 5, 3, new ItemStack(EMTItems.itemEMTItems, 1, 15)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.uuMCrystal), new ResearchPage(EMTRecipes.charcoalToCoal), new ResearchPage(EMTRecipes.glowstoneDustToBlock), new ResearchPage(EMTRecipes.stoneBricksToIronOre), new ResearchPage(EMTRecipes.arcaneStoneToCopperOre), new ResearchPage(EMTRecipes.arcaneStoneBricksToTinOre), new ResearchPage(EMTRecipes.amberBlockToLeadOre), new ResearchPage(EMTRecipes.amberBricksToUraniumOre), new ResearchPage(EMTRecipes.shardToResin), new ResearchPage(EMTRecipes.shardToRedstone), new ResearchPage(EMTRecipes.shardToLapis), new ResearchPage(EMTRecipes.ironToGold), new ResearchPage(EMTRecipes.goldToDiamond), new ResearchPage(EMTRecipes.diamondToUranium), new ResearchPage(EMTRecipes.uraniumToIridium)); - } + if (!EMTConfigHandler.compressedSolarsResearch) { + if (!EMTConfigHandler.earthSolarsResearch) { + new EMTResearchItem("Earth Infused Solar Panels", EMTResearchAspects.earthSolars, -6, -7, 1, new ItemStack(EMTBlocks.solars[1], 1, 2)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.earthSolar), new ResearchPage(EMTRecipes.doubleEarthSolar), new ResearchPage(EMTRecipes.tripleEarthSolar)); + } + } - if (!EMTConfigHandler.portableNodeResarch) { - new EMTResearchItem("Portable Node", EMTResearchAspects.portableNode, 2, 5, 3, new ItemStack(EMTBlocks.portableNode)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.portableNode)); - } + if (!EMTConfigHandler.uuMInfusionResearch) { + new EMTResearchItem("UU-Matter Infusion", EMTResearchAspects.uuMInfusion, 5, 5, 3, new ItemStack(EMTItems.itemEMTItems, 1, 15)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.uuMCrystal), new ResearchPage(EMTRecipes.charcoalToCoal), new ResearchPage(EMTRecipes.glowstoneDustToBlock), new ResearchPage(EMTRecipes.stoneBricksToIronOre), new ResearchPage(EMTRecipes.arcaneStoneToCopperOre), new ResearchPage(EMTRecipes.arcaneStoneBricksToTinOre), new ResearchPage(EMTRecipes.amberBlockToLeadOre), new ResearchPage(EMTRecipes.amberBricksToUraniumOre), new ResearchPage(EMTRecipes.shardToResin), new ResearchPage(EMTRecipes.shardToRedstone), new ResearchPage(EMTRecipes.shardToLapis), new ResearchPage(EMTRecipes.ironToGold), new ResearchPage(EMTRecipes.goldToDiamond), new ResearchPage(EMTRecipes.diamondToUranium), new ResearchPage(EMTRecipes.uraniumToIridium)); + } - if (!EMTConfigHandler.electricHoeGrowthResearch) { - new EMTResearchItem("Electric Hoe of Growth", EMTResearchAspects.electricHoeGrowth, -1, -4, 2, new ItemStack(EMTItems.electricHoeGrowth)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.electricHoeGrowth)); - } + if (!EMTConfigHandler.portableNodeResarch) { + new EMTResearchItem("Portable Node", EMTResearchAspects.portableNode, 2, 5, 3, new ItemStack(EMTBlocks.portableNode)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.portableNode)); + } - if (!EMTConfigHandler.chargeFocusResearch) { - new EMTResearchItem("Wand Focus: Charging", EMTResearchAspects.chargeFocus, 5, 3, 2, new ItemStack(EMTItems.chargeFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.chargeFocus)); - } + if (!EMTConfigHandler.electricHoeGrowthResearch) { + new EMTResearchItem("Electric Hoe of Growth", EMTResearchAspects.electricHoeGrowth, -1, -4, 2, new ItemStack(EMTItems.electricHoeGrowth)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.electricHoeGrowth)); + } - if (!EMTConfigHandler.wandChargeFocusResearch) { - new EMTResearchItem("Wand Focus: Wand Charging", EMTResearchAspects.wandChargeFocus, 7, 3, 3, new ItemStack(EMTItems.wandChargeFocus)).setParents("Wand Focus: Charging").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.wandChargeFocus)); - } + if (!EMTConfigHandler.chargeFocusResearch) { + new EMTResearchItem("Wand Focus: Charging", EMTResearchAspects.chargeFocus, 5, 3, 2, new ItemStack(EMTItems.chargeFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.chargeFocus)); + } - if (!EMTConfigHandler.inventoryChargingRing) { - new EMTResearchItem("Inventory Charging Ring", EMTResearchAspects.inventoryChargingRing, 0, -5, 3, new ItemStack(EMTItems.emtBauble, 1, 1)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.inventoryChargingRing)); - } + if (!EMTConfigHandler.wandChargeFocusResearch) { + new EMTResearchItem("Wand Focus: Wand Charging", EMTResearchAspects.wandChargeFocus, 7, 3, 3, new ItemStack(EMTItems.wandChargeFocus)).setParents("Wand Focus: Charging").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.wandChargeFocus)); + } - if (!EMTConfigHandler.armorChargingRing) { - new EMTResearchItem("Armor Charging Ring", EMTResearchAspects.armorChargingRing, 0, -7, 3, new ItemStack(EMTItems.emtBauble, 1, 0)).setSecondary().setParents("Inventory Charging Ring").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.armorChargingRing)); - } + if (!EMTConfigHandler.inventoryChargingRing) { + new EMTResearchItem("Inventory Charging Ring", EMTResearchAspects.inventoryChargingRing, 0, -5, 3, new ItemStack(EMTItems.emtBauble, 1, 1)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.inventoryChargingRing)); + } - if (!EMTConfigHandler.thaumiumWingResearch) { - new EMTResearchItem("Thaumium Reinforced Wings", EMTResearchAspects.thaumiumWing, 0, 4, 0, new ItemStack(EMTItems.thaumiumWing)).setSecondary().setParents("Feather Wings").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumWing), new ResearchPage(EMTRecipes.thaumiumWings)); - } + if (!EMTConfigHandler.armorChargingRing) { + new EMTResearchItem("Armor Charging Ring", EMTResearchAspects.armorChargingRing, 0, -7, 3, new ItemStack(EMTItems.emtBauble, 1, 0)).setSecondary().setParents("Inventory Charging Ring").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.armorChargingRing)); + } - if (!EMTConfigHandler.nanoWingResearch && !EMTConfigHandler.thaumiumWingResearch) { - new EMTResearchItem("Nanosuit Wings", EMTResearchAspects.nanoWing, 0, 6, 2, new ItemStack(EMTItems.nanoWing)).setParents("Thaumium Reinforced Wings").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.nanoWings)); - } + if (!EMTConfigHandler.thaumiumWingResearch) { + new EMTResearchItem("Thaumium Reinforced Wings", EMTResearchAspects.thaumiumWing, 0, 4, 0, new ItemStack(EMTItems.thaumiumWing)).setSecondary().setParents("Feather Wings").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumWing), new ResearchPage(EMTRecipes.thaumiumWings)); + } - if (!EMTConfigHandler.quantumWingsResearch && !EMTConfigHandler.thaumiumWingResearch && !EMTConfigHandler.nanoWingResearch) { - new EMTResearchItem("Quantum Wings", EMTResearchAspects.quantumWing, 0, 8, 3, new ItemStack(EMTItems.quantumWing)).setParents("Nanosuit Wings").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.quantumWings)); - } + if (!EMTConfigHandler.nanoWingResearch && !EMTConfigHandler.thaumiumWingResearch) { + new EMTResearchItem("Nanosuit Wings", EMTResearchAspects.nanoWing, 0, 6, 2, new ItemStack(EMTItems.nanoWing)).setParents("Thaumium Reinforced Wings").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.nanoWings)); + } - if (!EMTConfigHandler.infusedQuantumChestplate && !EMTConfigHandler.thaumiumWingResearch && !EMTConfigHandler.nanoWingResearch && !EMTConfigHandler.quantumWingsResearch) { - new EMTResearchItem("Infused Quantum Armor", EMTResearchAspects.quantumWing, 0, 10, 4, new ItemStack(EMTItems.quantumArmor)).setParents("Quantum Wings").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.infusedQuantumArmor)); - } - /***********************************/ - } + if (!EMTConfigHandler.quantumWingsResearch && !EMTConfigHandler.thaumiumWingResearch && !EMTConfigHandler.nanoWingResearch) { + new EMTResearchItem("Quantum Wings", EMTResearchAspects.quantumWing, 0, 8, 3, new ItemStack(EMTItems.quantumWing)).setParents("Nanosuit Wings").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.quantumWings)); + } + + if (!EMTConfigHandler.infusedQuantumChestplate && !EMTConfigHandler.thaumiumWingResearch && !EMTConfigHandler.nanoWingResearch && !EMTConfigHandler.quantumWingsResearch) { + new EMTResearchItem("Infused Quantum Armor", EMTResearchAspects.quantumWing, 0, 10, 4, new ItemStack(EMTItems.quantumArmor)).setParents("Quantum Wings").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.infusedQuantumArmor)); + } + /***********************************/ + } } diff --git a/src/main/java/emt/init/EMTTiles.java b/src/main/java/emt/init/EMTTiles.java index 343893f..0c9ab68 100644 --- a/src/main/java/emt/init/EMTTiles.java +++ b/src/main/java/emt/init/EMTTiles.java @@ -6,76 +6,60 @@ import emt.tile.TileElectricCloud; import emt.tile.TileEntityEtherealMacerator; import emt.tile.TileEntityIndustrialWandRecharge; import emt.tile.TileEntityPortableNode; -import emt.tile.generator.TileEntityAerGenerator; -import emt.tile.generator.TileEntityArborGenerator; -import emt.tile.generator.TileEntityAuramGenerator; -import emt.tile.generator.TileEntityIgnisGenerator; -import emt.tile.generator.TileEntityLucrumGenerator; -import emt.tile.generator.TileEntityPotentiaGenerator; -import emt.tile.solar.air.TileEntityAirSolar; -import emt.tile.solar.air.TileEntityDoubleAirSolar; -import emt.tile.solar.air.TileEntityTripleAirSolar; -import emt.tile.solar.compressed.TileEntityCompressedSolar; -import emt.tile.solar.compressed.TileEntityDoubleCompressedSolar; -import emt.tile.solar.compressed.TileEntityTripleCompressedSolar; -import emt.tile.solar.dark.TileEntityDarkSolar; -import emt.tile.solar.dark.TileEntityDoubleDarkSolar; -import emt.tile.solar.dark.TileEntityTripleDarkSolar; -import emt.tile.solar.earth.TileEntityDoubleEarthSolar; -import emt.tile.solar.earth.TileEntityEarthSolar; -import emt.tile.solar.earth.TileEntityTripleEarthSolar; -import emt.tile.solar.fire.TileEntityDoubleFireSolar; -import emt.tile.solar.fire.TileEntityFireSolar; -import emt.tile.solar.fire.TileEntityTripleFireSolar; -import emt.tile.solar.order.TileEntityDoubleOrderSolar; -import emt.tile.solar.order.TileEntityOrderSolar; -import emt.tile.solar.order.TileEntityTripleOrderSolar; -import emt.tile.solar.water.TileEntityDoubleWaterSolar; -import emt.tile.solar.water.TileEntityTripleWaterSolar; -import emt.tile.solar.water.TileEntityWaterSolar; +import emt.tile.generator.TileEntityBaseGenerator; +import emt.tile.solar.TileEntitySolarBase; public class EMTTiles { - public static void registerTileEntities() { - - //Essentia Gens - GameRegistry.registerTileEntity(TileEntityPotentiaGenerator.class, "tileentitypotentiagenerator"); - GameRegistry.registerTileEntity(TileEntityIgnisGenerator.class, "tileentityignisgenerator"); - GameRegistry.registerTileEntity(TileEntityAuramGenerator.class, "tileentityauramgenerator"); - GameRegistry.registerTileEntity(TileEntityArborGenerator.class, "tileentityarborgenerator"); - GameRegistry.registerTileEntity(TileEntityAerGenerator.class, "tileentityaergenerator"); - GameRegistry.registerTileEntity(TileEntityLucrumGenerator.class, "tileentitylucrumgenerator"); - - //Machinery - GameRegistry.registerTileEntity(TileEntityIndustrialWandRecharge.class, "tileentityindustrialwandrecharge"); - GameRegistry.registerTileEntity(TileEntityEtherealMacerator.class, "tileentityetherealmacerator"); - GameRegistry.registerTileEntity(EssentiaFiller.class,"EssentiaFillerTE"); + public static void registerTileEntities() { - //Solars - GameRegistry.registerTileEntity(TileEntityCompressedSolar.class, "tileentitycompressedsolar"); - GameRegistry.registerTileEntity(TileEntityDoubleCompressedSolar.class, "tileentitydoublecompressedsolar"); - GameRegistry.registerTileEntity(TileEntityTripleCompressedSolar.class, "tileentitytriplecompressedsolar"); - GameRegistry.registerTileEntity(TileEntityWaterSolar.class, "tileentitywatersolar"); - GameRegistry.registerTileEntity(TileEntityDoubleWaterSolar.class, "tileentitydoublewatersolar"); - GameRegistry.registerTileEntity(TileEntityTripleWaterSolar.class, "tileentitytriplewatersolar"); - GameRegistry.registerTileEntity(TileEntityDarkSolar.class, "tileentitydarksolar"); - GameRegistry.registerTileEntity(TileEntityDoubleDarkSolar.class, "tileentitydoubledarksolar"); - GameRegistry.registerTileEntity(TileEntityTripleDarkSolar.class, "tileentitytripledarksolar"); - GameRegistry.registerTileEntity(TileEntityOrderSolar.class, "tileentityordersolar"); - GameRegistry.registerTileEntity(TileEntityDoubleOrderSolar.class, "tileentitydoubleordersolar"); - GameRegistry.registerTileEntity(TileEntityTripleOrderSolar.class, "tileentitytripleordersolar"); - GameRegistry.registerTileEntity(TileEntityFireSolar.class, "tileentityfiresolar"); - GameRegistry.registerTileEntity(TileEntityDoubleFireSolar.class, "tileentitydoublefiresolar"); - GameRegistry.registerTileEntity(TileEntityTripleFireSolar.class, "tileentitytriplefiresolar"); - GameRegistry.registerTileEntity(TileEntityAirSolar.class, "tileentityairsolar"); - GameRegistry.registerTileEntity(TileEntityDoubleAirSolar.class, "tileentitydoubleairsolar"); - GameRegistry.registerTileEntity(TileEntityTripleAirSolar.class, "tileentitytripleairsolar"); - GameRegistry.registerTileEntity(TileEntityEarthSolar.class, "tileentityearthsolar"); - GameRegistry.registerTileEntity(TileEntityDoubleEarthSolar.class, "tileentitydoubleearthsolar"); - GameRegistry.registerTileEntity(TileEntityTripleEarthSolar.class, "tileentitytripleearthsolar"); - - //Random Stuff - GameRegistry.registerTileEntity(TileEntityPortableNode.class, "tileentityportablenode"); - GameRegistry.registerTileEntity(TileElectricCloud.class, "tileEntityElectricCloud"); - } + + //Essentia Gens + //legacy support + GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentitypotentiagenerator"); + GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentityignisgenerator"); + GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentityauramgenerator"); + GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentityarborgenerator"); + GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentityaergenerator"); + GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentitylucrumgenerator"); + + //new TEs will be called TileEntityEssentiaGenerator + GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "TileEntityEssentiaGenerator"); + + //Machinery + GameRegistry.registerTileEntity(TileEntityIndustrialWandRecharge.class, "tileentityindustrialwandrecharge"); + GameRegistry.registerTileEntity(TileEntityEtherealMacerator.class, "tileentityetherealmacerator"); + GameRegistry.registerTileEntity(EssentiaFiller.class, "EssentiaFillerTE"); + + //Solars + //legacy support + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitycompressedsolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoublecompressedsolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytriplecompressedsolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitywatersolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoublewatersolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytriplewatersolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydarksolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoubledarksolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytripledarksolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentityordersolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoubleordersolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytripleordersolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentityfiresolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoublefiresolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytriplefiresolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentityairsolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoubleairsolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytripleairsolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentityearthsolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoubleearthsolar"); + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytripleearthsolar"); + + //new TEs will be called TileEntityXCompressedSolar + GameRegistry.registerTileEntity(TileEntitySolarBase.class, "TileEntityXCompressedSolar"); + + //Random Stuff + GameRegistry.registerTileEntity(TileEntityPortableNode.class, "tileentityportablenode"); + GameRegistry.registerTileEntity(TileElectricCloud.class, "tileEntityElectricCloud"); + } } diff --git a/src/main/java/emt/init/EMT_GTNH_Recipes_And_Researches.java b/src/main/java/emt/init/EMT_GTNH_Recipes_And_Researches.java new file mode 100644 index 0000000..9340a84 --- /dev/null +++ b/src/main/java/emt/init/EMT_GTNH_Recipes_And_Researches.java @@ -0,0 +1,216 @@ +package emt.init; + +import emt.EMT; +import emt.util.EMTResearchItem; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import net.minecraftforge.oredict.OreDictionary; +import thaumcraft.api.ThaumcraftApi; +import thaumcraft.api.ThaumcraftApiHelper; +import thaumcraft.api.aspects.AspectList; +import thaumcraft.api.crafting.CrucibleRecipe; +import thaumcraft.api.crafting.IArcaneRecipe; +import thaumcraft.api.crafting.InfusionRecipe; +import thaumcraft.api.crafting.ShapedArcaneRecipe; +import thaumcraft.api.research.ResearchItem; +import thaumcraft.api.research.ResearchPage; + +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.LinkedHashMap; + +import static thaumcraft.api.aspects.Aspect.*; + +public class EMT_GTNH_Recipes_And_Researches implements Runnable { + + + private static LinkedHashMap arcaneRecipeLinkedHashMap = new LinkedHashMap<>(); + private static LinkedHashMap infusionRecipeLinkedHashMap = new LinkedHashMap<>(); + private static LinkedHashMap cruciblRecipeLinkedHashMap = new LinkedHashMap<>(); + + private static AspectList getPrimals(int amount) { + return new AspectList().add(ORDER, amount).add(ENTROPY, amount).add(AIR, amount).add(EARTH, amount).add(WATER, amount).add(FIRE, amount); + } + + @Override + public void run() { + +// ItemStack glue =new ItemStack(EMTItems.itemEMTItems,1,8); +// HashSet recipesHashSet = new HashSet<>(); +// recipesHashSet.add(new ShapelessRecipes(glue, Arrays.asList(GT_ModHandler.getModItem("TConstruct","materials",1,36),GT_ModHandler.getModItem("TConstruct","materials",1,36)))); +// recipesHashSet.add(new ShapelessRecipes(glue, Collections.singletonList(GT_ModHandler.getModItem("TConstruct", "materials", 2, 36)))); +// for ( ShapelessRecipes sr : recipesHashSet) +// CraftingManager.getInstance().getRecipeList().add(sr); +// +// //Rubber ball recipes +// GT_Values.RA.addAlloySmelterRecipe(Materials.RubberTreeSap.getDust(4),ItemList.Shape_Mold_Ball.get(0),new ItemStack(EMTItems.itemEMTItems,1,10),200,16); +// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Items.paper,12),new ItemStack(EMTItems.itemEMTItems,1,10)},Materials.Glue.getMolten(6912),new ItemStack(EMTItems.itemEMTItems,1,9),600,30); +// GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0),Materials.Rubber.getMolten(576),new ItemStack(EMTItems.itemEMTItems,1,10),100,30); +// GT_Values.RA.addPulveriserRecipe(new ItemStack(EMTItems.itemEMTItems,1,10),new ItemStack[]{Materials.Rubber.getDust(4)},null,300,2); +// GT_Values.RA.addFormingPressRecipe(Materials.Rubber.getPlates(4),ItemList.Shape_Mold_Ball.get(0),new ItemStack(EMTItems.itemEMTItems,1,10),100,30); + + EMTResearches.addResearchTab(); + runArcaneRecipes(); + runResreaches(); + } + + private void runInfusionRecipes() { + } + + private void runKettleRecipes() { + + } + + private void runArcaneRecipes() { + arcaneRecipeLinkedHashMap.put("DiamondChainsaw", new ShapedArcaneRecipe("DiamondChainsaw", new ItemStack(EMTItems.diamondChainsaw), getPrimals(35), + "sts", + "pmp", + "pbp", + 's', GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Diamond, 1), + 'p', GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 1), + 't', GT_OreDictUnificator.get(OrePrefixes.toolHeadChainsaw, Materials.Thaumium, 1), + 'b', ItemList.Battery_RE_LV_Sodium.get(1), + 'm', ItemList.Electric_Motor_MV.get(1) + )); + arcaneRecipeLinkedHashMap.put("ThaumiumChainsaw", new ShapedArcaneRecipe("ThaumiumChainsaw", new ItemStack(EMTItems.thaumiumChainsaw), getPrimals(35), + "sps", + "pmp", + "ppp", + 's', GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Thaumium, 1), + 'p', GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1), + 'b', ItemList.Battery_RE_LV_Sodium.get(1), + 'm', new ItemStack(EMTItems.diamondChainsaw) + )); + + for (IArcaneRecipe recipe : arcaneRecipeLinkedHashMap.values()) { + ThaumcraftApi.getCraftingRecipes().add(recipe); + } + } + + private void runResreaches() { + HashSet researches = new HashSet<>(); + researches.add(new EMTResearchItem("ElectricMagicTools", 0, 0, 0, new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/emt.png")).setSpecial().setAutoUnlock().setPages(new ResearchPage(""))); + researches.add(new EMTResearchItem("DiamondChainsaw", new AspectList().add(GREED, 12).add(FIRE, 9).add(METAL, 6).add(EARTH, 3), 0, -2, 2, new ItemStack(EMTItems.diamondChainsaw)).setPages(new ResearchPage(arcaneRecipeLinkedHashMap.get("DiamondChainsaw"))).setRound().setParentsHidden("ElectricMagicTools")); + //researches.add(new EMTResearchItem("DiamondChainsaw",new AspectList().add(GREED,12).add(FIRE,9).add(METAL,6).add(EARTH,3),0,-2,2,new ItemStack(EMTItems.diamondChainsaw)).setRound()); + researches.forEach(ResearchItem::registerResearchItem); + } + + class ShapedArcaneRecipeIgnoresNBT extends ShapedArcaneRecipe { + protected String research; + protected ItemStack result; + protected AspectList aspects; + protected Object[] recipe; + protected LinkedHashMap translation = new LinkedHashMap<>(); + int[] rowcolm; + + public ShapedArcaneRecipeIgnoresNBT(String research, ItemStack result, AspectList aspects, Object... recipe) { + super(research, result, aspects, recipe); + this.research = research; + this.result = result; + this.aspects = aspects; + this.recipe = recipe; + int rows = 0; + int colums = 0; + if (!(recipe[0] instanceof String)) + throw new UnsupportedOperationException("The Recipe must start with at least one String for the first row!"); + int i = 0; + rowcolm = new int[3]; + do { + rows++; + colums = Math.max(colums, ((String) recipe[i]).length()); + rowcolm[i] = colums; + i = rows; + } while (recipe[i] instanceof String); + if (rows > 3 || colums > 3) + throw new UnsupportedOperationException("The Recipe must fit in a 3x3 crafting field!"); + rowcolm = Arrays.copyOf(rowcolm, rows); + + int k = 0; + for (int j = i; j < recipe.length; j += 2) { + k++; + if (recipe[j] instanceof Character) + translation.put((Character) recipe[j], recipe[j + 1]); + } + } + + @Override + public boolean matches(IInventory inv, World world, EntityPlayer player) { + if (this.research.length() > 0 && !ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), this.research)) + return false; + else { + for (int y = 0; y < rowcolm.length; y++) { + String rowAsString = ((String) recipe[y]); + for (int x = 0; x < rowcolm[y]; x++) { + Object itemReplacement = translation.get(rowAsString.toCharArray()[x]); + ItemStack slot = ThaumcraftApiHelper.getStackInRowAndColumn(inv, x, y); + if (itemReplacement != null && slot == null) { + return false; + } else if (itemReplacement instanceof String) { + if (!GT_Utility.areStacksEqual(GT_OreDictUnificator.getFirstOre(itemReplacement, 1), GT_OreDictUnificator.get(slot), true)) + if (!OreDictionary.getOres((String) itemReplacement).contains(slot)) + return false; + } else if (itemReplacement instanceof ItemStack) { + if (!GT_Utility.isStackValid(itemReplacement)) { + return false; + } + if (!GT_Utility.areStacksEqual((ItemStack) itemReplacement, slot, true)) + if (!GT_Utility.areUnificationsEqual((ItemStack) itemReplacement, slot, true)) + if (!(((ItemStack) itemReplacement).getItem().equals(slot.getItem()) && ((ItemStack) itemReplacement).getItemDamage() == OreDictionary.WILDCARD_VALUE)) + return false; + } else if (itemReplacement instanceof Collection) { + boolean hit = false; + for (Object o : (Collection) itemReplacement) { + if (GT_Utility.areStacksEqual((ItemStack) o, slot, true) || GT_Utility.areUnificationsEqual((ItemStack) o, slot, true) || (((ItemStack) o).getItem().equals(slot.getItem()) && ((ItemStack) itemReplacement).getItemDamage() == OreDictionary.WILDCARD_VALUE)) + hit = true; + } + if (!hit) { + return false; + } + } + } + } + return true; + } + } + + @Override + public ItemStack getCraftingResult(IInventory iInventory) { + return result; + } + + @Override + public int getRecipeSize() { + return recipe.length; + } + + @Override + public ItemStack getRecipeOutput() { + return result; + } + + @Override + public AspectList getAspects() { + return aspects; + } + + @Override + public AspectList getAspects(IInventory iInventory) { + return aspects; + } + + @Override + public String getResearch() { + return research; + } + } + +} diff --git a/src/main/java/emt/init/Registry.java b/src/main/java/emt/init/Registry.java index 7aa1b67..f1f5a6b 100644 --- a/src/main/java/emt/init/Registry.java +++ b/src/main/java/emt/init/Registry.java @@ -1,29 +1,31 @@ package emt.init; import emt.gthandler.common.loader.EMT_GT_Loader; +import emt.tile.solar.Solars; +import emt.util.EMTEssentiasOutputs; -public class Registry -{ - private static final EMT_GT_Loader gtloader = new EMT_GT_Loader(); - public static void registerPreInit() { - } - - public static void registerInit() - { - EMTBlocks.registerBlocks(); - EMTItems.registerItems(); - EMTTiles.registerTileEntities(); - gtloader.run(); - EMTRecipes.registerEarlyRecipes(); - } - - public static void registerLate() - { - EMTBlocks.addAspects(); - gtloader.runlate(); - EMTRecipes.registerLateRecipes(); - EMTRecipes.registerUUMInfusionRecipes(); - // new EMTAutogeneratedGens().run(); +public class Registry { + private static final EMT_GT_Loader gtloader = new EMT_GT_Loader(); - } + public static void registerPreInit() { + } + + public static void registerInit() { + EMTBlocks.registerBlocks(); + EMTItems.registerItems(); + EMTTiles.registerTileEntities(); + gtloader.run(); + EMTRecipes.registerEarlyRecipes(); + } + + public static void registerLate() { + EMTEssentiasOutputs.addOutputs(); + EMTBlocks.addAspects(); + gtloader.runlate(); + EMTRecipes.registerLateRecipes(); + //new EMT_GTNH_Recipes_And_Researches().run(); + EMTRecipes.registerUUMInfusionRecipes(); + EMTResearches.register(); + Solars.registerReverseRecipes(); + } } diff --git a/src/main/java/emt/item/ItemBase.java b/src/main/java/emt/item/ItemBase.java index f55e430..e91d15d 100644 --- a/src/main/java/emt/item/ItemBase.java +++ b/src/main/java/emt/item/ItemBase.java @@ -8,20 +8,20 @@ import net.minecraft.util.StatCollector; public class ItemBase extends Item { - public ItemBase(String unlocName, String textureName) { - super(); - setUnlocalizedName(EMT.MOD_ID + unlocName); - setTextureName(EMT.TEXTURE_PATH + ":" + textureName); - setCreativeTab(EMT.TAB); - } + public ItemBase(String unlocName, String textureName) { + super(); + setUnlocalizedName(EMT.MOD_ID + unlocName); + setTextureName(EMT.TEXTURE_PATH + ":" + textureName); + setCreativeTab(EMT.TAB); + } - public ItemBase(String unlocName) { - super(); - setUnlocalizedName(EMT.MOD_ID + ".item." + unlocName); - setCreativeTab(EMT.TAB); - } + public ItemBase(String unlocName) { + super(); + setUnlocalizedName(EMT.MOD_ID + ".item." + unlocName); + setCreativeTab(EMT.TAB); + } - public String getItemStackDisplayName(ItemStack stack) { - return (EMTTextHelper.GREEN + StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack) + ".name")).trim(); - } + public String getItemStackDisplayName(ItemStack stack) { + return (EMTTextHelper.GREEN + StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack) + ".name")).trim(); + } } diff --git a/src/main/java/emt/item/ItemElectricScribingTools.java b/src/main/java/emt/item/ItemElectricScribingTools.java index c8ed18a..fd87f3a 100644 --- a/src/main/java/emt/item/ItemElectricScribingTools.java +++ b/src/main/java/emt/item/ItemElectricScribingTools.java @@ -15,54 +15,54 @@ import java.util.List; public class ItemElectricScribingTools extends ItemInkwell implements IElectricItem, IScribeTools { - public static int maxCharge = 400; + public static int maxCharge = 400; - public ItemElectricScribingTools() { - this.setCreativeTab(EMT.TAB); - this.setMaxDamage(400); - this.setMaxStackSize(1); - } + public ItemElectricScribingTools() { + this.setCreativeTab(EMT.TAB); + this.setMaxDamage(400); + this.setMaxStackSize(1); + } - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public double getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public double getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTier(ItemStack itemStack) { - return 3; - } + @Override + public int getTier(ItemStack itemStack) { + return 3; + } - @Override - public double getTransferLimit(ItemStack itemStack) { - return 5; - } + @Override + public double getTransferLimit(ItemStack itemStack) { + return 5; + } - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { - ItemStack itemStack = new ItemStack(this, 1); - if (getChargedItem(itemStack) == this) { - ItemStack charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); - itemList.add(charged); - } - if (getEmptyItem(itemStack) == this) { - itemList.add(new ItemStack(this, 1, getMaxDamage())); - } - } + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + if (getChargedItem(itemStack) == this) { + ItemStack charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); + itemList.add(charged); + } + if (getEmptyItem(itemStack) == this) { + itemList.add(new ItemStack(this, 1, getMaxDamage())); + } + } - @Override - public Item getChargedItem(ItemStack itemStack) { - return this; - } + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } - @Override - public Item getEmptyItem(ItemStack itemStack) { - return this; - } + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } } diff --git a/src/main/java/emt/item/ItemIC2Baubles.java b/src/main/java/emt/item/ItemIC2Baubles.java index 7de1a73..d1ecbf4 100644 --- a/src/main/java/emt/item/ItemIC2Baubles.java +++ b/src/main/java/emt/item/ItemIC2Baubles.java @@ -22,121 +22,120 @@ import java.util.Random; public class ItemIC2Baubles extends ItemBase implements IBauble, IRunicArmor { - public IIcon[] icon = new IIcon[16]; - public static int wornTick; - public Random random = new Random(); + public static int wornTick; + public IIcon[] icon = new IIcon[16]; + public Random random = new Random(); - public ItemIC2Baubles() { - super("bauble"); - this.setHasSubtypes(true); - this.setMaxDamage(0); - this.setMaxStackSize(1); + public ItemIC2Baubles() { + super("bauble"); + this.setHasSubtypes(true); + this.setMaxDamage(0); + this.setMaxStackSize(1); - wornTick = 0; - } + wornTick = 0; + } - @Override - public String getUnlocalizedName(ItemStack itemstack) { - String name = ""; - switch (itemstack.getItemDamage()) { - case 0: { - name = "euMaker.armor"; - break; - } - case 1: { - name = "euMaker.inventory"; - break; - } - default: - name = "nothing"; - break; - } - return getUnlocalizedName() + "." + name; - } + @Override + public String getUnlocalizedName(ItemStack itemstack) { + String name = ""; + switch (itemstack.getItemDamage()) { + case 0: { + name = "euMaker.armor"; + break; + } + case 1: { + name = "euMaker.inventory"; + break; + } + default: + name = "nothing"; + break; + } + return getUnlocalizedName() + "." + name; + } - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister ri) { - this.icon[0] = ri.registerIcon(EMT.TEXTURE_PATH + ":armoreumaker"); - this.icon[1] = ri.registerIcon(EMT.TEXTURE_PATH + ":inventoryeumaker"); - } + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister ri) { + this.icon[0] = ri.registerIcon(EMT.TEXTURE_PATH + ":armoreumaker"); + this.icon[1] = ri.registerIcon(EMT.TEXTURE_PATH + ":inventoryeumaker"); + } - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int meta) { - return this.icon[meta]; - } + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int meta) { + return this.icon[meta]; + } - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) { - list.add(new ItemStack(this, 1, 0)); - list.add(new ItemStack(this, 1, 1)); - } + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) { + list.add(new ItemStack(this, 1, 0)); + list.add(new ItemStack(this, 1, 1)); + } - @Override - public BaubleType getBaubleType(ItemStack stack) { - if (stack.getItemDamage() <= 1) { - return BaubleType.RING; - } - else { - return null; - } - } + @Override + public BaubleType getBaubleType(ItemStack stack) { + if (stack.getItemDamage() <= 1) { + return BaubleType.RING; + } else { + return null; + } + } - @Override - public void onWornTick(ItemStack stack, EntityLivingBase player) { - if (!player.worldObj.isRemote) { - if (stack != null) { - if (stack.getItemDamage() == 0) { - if (player instanceof EntityPlayer) { - int energyLeft = EMTConfigHandler.armorBaubleProduction; - for (int i = 0; i < ((EntityPlayer) player).inventory.armorInventory.length; i++) { - if (energyLeft > 0) { - if ((((EntityPlayer) player).inventory.armorInventory[i] != null) && (((EntityPlayer) player).inventory.armorInventory[i].getItem() instanceof IElectricItem)) { - double sentPacket = ElectricItem.manager.charge(((EntityPlayer) player).inventory.armorInventory[i], energyLeft, 4, false, false); - energyLeft -= sentPacket; - } - } - } - } - } - } - if (stack != null) { - if (stack.getItemDamage() == 1) { - if (player instanceof EntityPlayer) { - int energyLeft = EMTConfigHandler.inventoryBaubleProdution; - for (int i = 0; i < ((EntityPlayer) player).inventory.mainInventory.length; i++) { - if (energyLeft > 0) { - if ((((EntityPlayer) player).inventory.mainInventory[i] != null) && (((EntityPlayer) player).inventory.mainInventory[i].getItem() instanceof IElectricItem)) { - double sentPacket = ElectricItem.manager.charge(((EntityPlayer) player).inventory.mainInventory[i], energyLeft, 4, false, false); - energyLeft -= sentPacket; - } - } - } - } - } - } - } - } + @Override + public void onWornTick(ItemStack stack, EntityLivingBase player) { + if (!player.worldObj.isRemote) { + if (stack != null) { + if (stack.getItemDamage() == 0) { + if (player instanceof EntityPlayer) { + int energyLeft = EMTConfigHandler.armorBaubleProduction; + for (int i = 0; i < ((EntityPlayer) player).inventory.armorInventory.length; i++) { + if (energyLeft > 0) { + if ((((EntityPlayer) player).inventory.armorInventory[i] != null) && (((EntityPlayer) player).inventory.armorInventory[i].getItem() instanceof IElectricItem)) { + double sentPacket = ElectricItem.manager.charge(((EntityPlayer) player).inventory.armorInventory[i], energyLeft, 4, false, false); + energyLeft -= sentPacket; + } + } + } + } + } + } + if (stack != null) { + if (stack.getItemDamage() == 1) { + if (player instanceof EntityPlayer) { + int energyLeft = EMTConfigHandler.inventoryBaubleProdution; + for (int i = 0; i < ((EntityPlayer) player).inventory.mainInventory.length; i++) { + if (energyLeft > 0) { + if ((((EntityPlayer) player).inventory.mainInventory[i] != null) && (((EntityPlayer) player).inventory.mainInventory[i].getItem() instanceof IElectricItem)) { + double sentPacket = ElectricItem.manager.charge(((EntityPlayer) player).inventory.mainInventory[i], energyLeft, 4, false, false); + energyLeft -= sentPacket; + } + } + } + } + } + } + } + } - @Override - public void onEquipped(ItemStack stack, EntityLivingBase player) { - } + @Override + public void onEquipped(ItemStack stack, EntityLivingBase player) { + } - @Override - public void onUnequipped(ItemStack stack, EntityLivingBase player) { - } + @Override + public void onUnequipped(ItemStack stack, EntityLivingBase player) { + } - @Override - public boolean canEquip(ItemStack stack, EntityLivingBase player) { - return true; - } + @Override + public boolean canEquip(ItemStack stack, EntityLivingBase player) { + return true; + } - @Override - public boolean canUnequip(ItemStack stack, EntityLivingBase player) { - return true; - } + @Override + public boolean canUnequip(ItemStack stack, EntityLivingBase player) { + return true; + } - @Override - public int getRunicCharge(ItemStack itemStack) { - return 0; - } + @Override + public int getRunicCharge(ItemStack itemStack) { + return 0; + } } diff --git a/src/main/java/emt/item/ItemMaterials.java b/src/main/java/emt/item/ItemMaterials.java index 276abf5..83a529c 100644 --- a/src/main/java/emt/item/ItemMaterials.java +++ b/src/main/java/emt/item/ItemMaterials.java @@ -28,180 +28,179 @@ import java.util.List; public class ItemMaterials extends Item { - public IIcon[] icon = new IIcon[16]; + public IIcon[] icon = new IIcon[16]; - public ItemMaterials() { - this.setCreativeTab(EMT.TAB); - this.setMaxDamage(0); - this.setMaxStackSize(64); - setHasSubtypes(true); - } + public ItemMaterials() { + this.setCreativeTab(EMT.TAB); + this.setMaxDamage(0); + this.setMaxStackSize(64); + setHasSubtypes(true); + } - @Override - public String getUnlocalizedName(ItemStack itemstack) { - String name = null; - switch (itemstack.getItemDamage()) { - case 0: - name = "oreClusterUranium"; - break; - case 1: - name = "crushedOreAmber"; - break; - case 2: - name = "purifiedOreAmber"; - break; - case 3: - name = "crushedOreCinnabar"; - break; - case 4: - name = "purifiedOreCinnabar"; - break; - case 5: - name = "thaumiumPlate"; - break; - case 6: - name = "lightningSummoner"; - break; - case 7: - name = "featherMesh"; - break; - case 8: - name = "glue"; - break; - case 9: - name = "ductTape"; - break; - case 10: - name = "rubberBall"; - break; - case 11: - name = "cardboard"; - break; - case 12: - name = "featherGluedCardboardWing"; - break; - case 13: - name = "taintedFeather"; - break; - case 14: - name = "thaumiumWing"; - break; - case 15: - name = "uumatterDrop"; - break; - default: - name = "nothing"; - break; - } - return "item." + EMT.MOD_ID + "." + name; - } + @Override + public String getUnlocalizedName(ItemStack itemstack) { + String name = null; + switch (itemstack.getItemDamage()) { + case 0: + name = "oreClusterUranium"; + break; + case 1: + name = "crushedOreAmber"; + break; + case 2: + name = "purifiedOreAmber"; + break; + case 3: + name = "crushedOreCinnabar"; + break; + case 4: + name = "purifiedOreCinnabar"; + break; + case 5: + name = "thaumiumPlate"; + break; + case 6: + name = "lightningSummoner"; + break; + case 7: + name = "featherMesh"; + break; + case 8: + name = "glue"; + break; + case 9: + name = "ductTape"; + break; + case 10: + name = "rubberBall"; + break; + case 11: + name = "cardboard"; + break; + case 12: + name = "featherGluedCardboardWing"; + break; + case 13: + name = "taintedFeather"; + break; + case 14: + name = "thaumiumWing"; + break; + case 15: + name = "uumatterDrop"; + break; + default: + name = "nothing"; + break; + } + return "item." + EMT.MOD_ID + "." + name; + } - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister ri) { - this.icon[0] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/clusteruranium"); - this.icon[1] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/crushedamber"); - this.icon[2] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/purifiedamber"); - this.icon[3] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/crushedcinnabar"); - this.icon[4] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/purifiedcinnabar"); - this.icon[5] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/thaumiumplate"); - this.icon[6] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/lightningsummoner"); - this.icon[7] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/feathermesh"); - this.icon[8] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/glue"); - this.icon[9] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/ducttape"); - this.icon[10] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/rubberball"); - this.icon[11] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/cardboard"); - this.icon[12] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/cardboardsheet"); - this.icon[13] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/taintedfeather"); - this.icon[14] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/thaumiumWing"); - this.icon[15] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/uumatterdrop"); - } + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister ri) { + this.icon[0] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/clusteruranium"); + this.icon[1] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/crushedamber"); + this.icon[2] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/purifiedamber"); + this.icon[3] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/crushedcinnabar"); + this.icon[4] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/purifiedcinnabar"); + this.icon[5] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/thaumiumplate"); + this.icon[6] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/lightningsummoner"); + this.icon[7] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/feathermesh"); + this.icon[8] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/glue"); + this.icon[9] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/ducttape"); + this.icon[10] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/rubberball"); + this.icon[11] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/cardboard"); + this.icon[12] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/cardboardsheet"); + this.icon[13] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/taintedfeather"); + this.icon[14] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/thaumiumWing"); + this.icon[15] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/uumatterdrop"); + } - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int meta) { - return this.icon[meta]; - } + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int meta) { + return this.icon[meta]; + } - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) { - for (int i = 1; i <= 15; i++) { - list.add(new ItemStack(this, 1, i)); - } - } + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) { + for (int i = 1; i <= 15; i++) { + list.add(new ItemStack(this, 1, i)); + } + } - public void onUsingTick(ItemStack stack, EntityPlayer player, int count) { - if (stack != null && stack.getItemDamage() == 6 && this.getMaxItemUseDuration(stack) - count >= 40) { - World world = player.worldObj; - player.swingItem(); - float f = 1.0F; - float f1 = player.prevRotationPitch + ((player.rotationPitch - player.prevRotationPitch) * f); - float f2 = player.prevRotationYaw + ((player.rotationYaw - player.prevRotationYaw) * f); - double playerX = player.prevPosX + ((player.posX - player.prevPosX) * f); - double playerY = (player.prevPosY + ((player.posY - player.prevPosY) * f) + 1.6200000000000001D) - player.yOffset; - double playerZ = player.prevPosZ + ((player.posZ - player.prevPosZ) * f); - Vec3 playerLoc = Vec3.createVectorHelper(playerX, playerY, playerZ); - float f3 = MathHelper.cos((-f2 * 0.01745329F) - 3.141593F); - float f4 = MathHelper.sin((-f2 * 0.01745329F) - 3.141593F); - float f5 = -MathHelper.cos(-f1 * 0.01745329F); - float f6 = MathHelper.sin(-f1 * 0.01745329F); - float f7 = f4 * f5; - float f8 = f6; - float f9 = f3 * f5; - float d3 = 5000; - Vec3 vec3d1 = playerLoc.addVector(f7 * d3, f8 * d3, f9 * d3); - MovingObjectPosition movingobjectposition = player.worldObj.rayTraceBlocks(playerLoc, vec3d1, true); - if (movingobjectposition != null) { - if (movingobjectposition.typeOfHit == MovingObjectType.BLOCK) { - int x2 = movingobjectposition.blockX; - int y2 = movingobjectposition.blockY; - int z2 = movingobjectposition.blockZ; - world.spawnEntityInWorld(new EntityLightningBolt(world, x2, y2, z2)); - } - else if (movingobjectposition.typeOfHit == MovingObjectType.ENTITY) { - Entity entityhit = movingobjectposition.entityHit; - double x = entityhit.posX; - double y = entityhit.posY; - double z = entityhit.posZ; - world.spawnEntityInWorld(new EntityLightningBolt(world, x, y, z)); - } - if (!player.capabilities.isCreativeMode) { - player.inventory.consumeInventoryItem(this); - } - } - player.stopUsingItem(); - } - } + public void onUsingTick(ItemStack stack, EntityPlayer player, int count) { + if (stack != null && stack.getItemDamage() == 6 && this.getMaxItemUseDuration(stack) - count >= 40) { + World world = player.worldObj; + player.swingItem(); + float f = 1.0F; + float f1 = player.prevRotationPitch + ((player.rotationPitch - player.prevRotationPitch) * f); + float f2 = player.prevRotationYaw + ((player.rotationYaw - player.prevRotationYaw) * f); + double playerX = player.prevPosX + ((player.posX - player.prevPosX) * f); + double playerY = (player.prevPosY + ((player.posY - player.prevPosY) * f) + 1.6200000000000001D) - player.yOffset; + double playerZ = player.prevPosZ + ((player.posZ - player.prevPosZ) * f); + Vec3 playerLoc = Vec3.createVectorHelper(playerX, playerY, playerZ); + float f3 = MathHelper.cos((-f2 * 0.01745329F) - 3.141593F); + float f4 = MathHelper.sin((-f2 * 0.01745329F) - 3.141593F); + float f5 = -MathHelper.cos(-f1 * 0.01745329F); + float f6 = MathHelper.sin(-f1 * 0.01745329F); + float f7 = f4 * f5; + float f8 = f6; + float f9 = f3 * f5; + float d3 = 5000; + Vec3 vec3d1 = playerLoc.addVector(f7 * d3, f8 * d3, f9 * d3); + MovingObjectPosition movingobjectposition = player.worldObj.rayTraceBlocks(playerLoc, vec3d1, true); + if (movingobjectposition != null) { + if (movingobjectposition.typeOfHit == MovingObjectType.BLOCK) { + int x2 = movingobjectposition.blockX; + int y2 = movingobjectposition.blockY; + int z2 = movingobjectposition.blockZ; + world.spawnEntityInWorld(new EntityLightningBolt(world, x2, y2, z2)); + } else if (movingobjectposition.typeOfHit == MovingObjectType.ENTITY) { + Entity entityhit = movingobjectposition.entityHit; + double x = entityhit.posX; + double y = entityhit.posY; + double z = entityhit.posZ; + world.spawnEntityInWorld(new EntityLightningBolt(world, x, y, z)); + } + if (!player.capabilities.isCreativeMode) { + player.inventory.consumeInventoryItem(this); + } + } + player.stopUsingItem(); + } + } - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { - if (stack.getItemDamage() == 6) { - ArrowNockEvent event = new ArrowNockEvent(player, stack); - MinecraftForge.EVENT_BUS.post(event); - if (event.isCanceled()) { - return event.result; - } - player.setItemInUse(stack, this.getMaxItemUseDuration(stack)); - } - return stack; - } + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { + if (stack.getItemDamage() == 6) { + ArrowNockEvent event = new ArrowNockEvent(player, stack); + MinecraftForge.EVENT_BUS.post(event); + if (event.isCanceled()) { + return event.result; + } + player.setItemInUse(stack, this.getMaxItemUseDuration(stack)); + } + return stack; + } - public int getMaxItemUseDuration(ItemStack stack) { - if (stack.getItemDamage() == 6) - return 72000; - return super.getMaxItemUseDuration(stack); - } + public int getMaxItemUseDuration(ItemStack stack) { + if (stack.getItemDamage() == 6) + return 72000; + return super.getMaxItemUseDuration(stack); + } - public EnumAction getItemUseAction(ItemStack stack) { - if (stack.getItemDamage() == 6) - return EnumAction.bow; - return EnumAction.none; - } + public EnumAction getItemUseAction(ItemStack stack) { + if (stack.getItemDamage() == 6) + return EnumAction.bow; + return EnumAction.none; + } - public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) { - super.onUpdate(stack, world, entity, par4, par5); - if ((!entity.worldObj.isRemote) && ((stack.getItemDamage() == 13)) && ((entity instanceof EntityLivingBase)) && (!((EntityLivingBase) entity).isEntityUndead()) && (!((EntityLivingBase) entity).isPotionActive(Config.potionTaintPoisonID)) && (world.rand.nextInt(4321) <= stack.stackSize)) { - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Config.potionTaintPoisonID, 120, 0, false)); - if ((entity instanceof EntityPlayer)) { - InventoryUtils.consumeInventoryItem((EntityPlayer) entity, stack.getItem(), stack.getItemDamage()); - } - } - } + public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) { + super.onUpdate(stack, world, entity, par4, par5); + if ((!entity.worldObj.isRemote) && ((stack.getItemDamage() == 13)) && ((entity instanceof EntityLivingBase)) && (!((EntityLivingBase) entity).isEntityUndead()) && (!((EntityLivingBase) entity).isPotionActive(Config.potionTaintPoisonID)) && (world.rand.nextInt(4321) <= stack.stackSize)) { + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Config.potionTaintPoisonID, 120, 0, false)); + if ((entity instanceof EntityPlayer)) { + InventoryUtils.consumeInventoryItem((EntityPlayer) entity, stack.getItem(), stack.getItemDamage()); + } + } + } } \ No newline at end of file diff --git a/src/main/java/emt/item/ItemOneRing.java b/src/main/java/emt/item/ItemOneRing.java index 8e4b8ec..8effa81 100644 --- a/src/main/java/emt/item/ItemOneRing.java +++ b/src/main/java/emt/item/ItemOneRing.java @@ -23,113 +23,104 @@ import thaumcraft.api.IWarpingGear; import java.util.List; import java.util.Random; -public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRunicArmor -{ - private static final String NBT_TAG_FORGE_DATA = "EMT"; - private static final String NBT_TAG_MIND_CORRUPTION = "MindCorruption"; - private static final String NBT_TAG_WARP = "warp"; - public IIcon[] icon = new IIcon[16]; - public Random random = new Random(); +public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRunicArmor { + private static final String NBT_TAG_FORGE_DATA = "EMT"; + private static final String NBT_TAG_MIND_CORRUPTION = "MindCorruption"; + private static final String NBT_TAG_WARP = "warp"; + public IIcon[] icon = new IIcon[16]; + public Random random = new Random(); - public int getWarp(ItemStack itemstack, EntityPlayer player) - { - return getItemWarpLevel(itemstack, false); - } - - public ItemOneRing() { - super("bauble"); - this.setHasSubtypes(true); - this.setMaxDamage(0); - this.setMaxStackSize(1); - } - - @Override - public String getUnlocalizedName(ItemStack itemstack) { - String name = ""; - switch (itemstack.getItemDamage()) { - case 0: { - name = "oneRing"; - break; - } - default: - name = "nothing"; - break; - } - return "item." + EMT.MOD_ID + ".bauble." + name; - } - - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister ri) { - this.icon[0] = ri.registerIcon(EMT.TEXTURE_PATH + ":onering"); - } - - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int meta) { - return this.icon[meta]; - } - - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) { - list.add(new ItemStack(this, 1, 0)); - } - - @Override - public BaubleType getBaubleType(ItemStack stack) { - if (stack.getItemDamage() <= 0) { - return BaubleType.RING; - } - else { - return null; - } - } - - private NBTTagCompound getOrSetForgeTag(EntityPlayer pPlayer) - { - NBTTagCompound tPlayerNBT = pPlayer.getEntityData(); - NBTTagCompound forgeTag = new NBTTagCompound(); - - // getCompoundTag already returns the contents of "ForgeData" TagCompound. Changed this to - // save our value in EMT Sub-Tag - if (tPlayerNBT.hasKey( NBT_TAG_FORGE_DATA )) - forgeTag = tPlayerNBT.getCompoundTag( NBT_TAG_FORGE_DATA ); - else - tPlayerNBT.setTag( NBT_TAG_FORGE_DATA, forgeTag ); - - return forgeTag; - } - - private int getItemWarpLevel(ItemStack stack, boolean increment) - { - NBTTagCompound tWarpTag = new NBTTagCompound(); - int tWarpLevel = 0; - if (stack.hasTagCompound()) - { - if (stack.getTagCompound().hasKey( NBT_TAG_WARP )) - { - tWarpLevel = stack.getTagCompound().getInteger( NBT_TAG_WARP ); - if (increment) - stack.getTagCompound().setInteger( NBT_TAG_WARP , ++tWarpLevel); - } - } - else - { - tWarpTag.setInteger( NBT_TAG_WARP, 0 ); - stack.setTagCompound( tWarpTag ); + public ItemOneRing() { + super("bauble"); + this.setHasSubtypes(true); + this.setMaxDamage(0); + this.setMaxStackSize(1); } - return tWarpLevel; - } + public int getWarp(ItemStack itemstack, EntityPlayer player) { + return getItemWarpLevel(itemstack, false); + } - @Override - public void onWornTick(ItemStack stack, EntityLivingBase player) { - if (!player.isInvisible()) { - player.setInvisible(true); - ((EntityPlayer) player).capabilities.disableDamage = true; - } + @Override + public String getUnlocalizedName(ItemStack itemstack) { + String name = ""; + switch (itemstack.getItemDamage()) { + case 0: { + name = "oneRing"; + break; + } + default: + name = "nothing"; + break; + } + return "item." + EMT.MOD_ID + ".bauble." + name; + } - // Stop doing this 20 times per second... - if ( random.nextInt(20) > 0) - return; + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister ri) { + this.icon[0] = ri.registerIcon(EMT.TEXTURE_PATH + ":onering"); + } + + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int meta) { + return this.icon[meta]; + } + + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) { + list.add(new ItemStack(this, 1, 0)); + } + + @Override + public BaubleType getBaubleType(ItemStack stack) { + if (stack.getItemDamage() <= 0) { + return BaubleType.RING; + } else { + return null; + } + } + + private NBTTagCompound getOrSetForgeTag(EntityPlayer pPlayer) { + NBTTagCompound tPlayerNBT = pPlayer.getEntityData(); + NBTTagCompound forgeTag = new NBTTagCompound(); + + // getCompoundTag already returns the contents of "ForgeData" TagCompound. Changed this to + // save our value in EMT Sub-Tag + if (tPlayerNBT.hasKey(NBT_TAG_FORGE_DATA)) + forgeTag = tPlayerNBT.getCompoundTag(NBT_TAG_FORGE_DATA); + else + tPlayerNBT.setTag(NBT_TAG_FORGE_DATA, forgeTag); + + return forgeTag; + } + + private int getItemWarpLevel(ItemStack stack, boolean increment) { + NBTTagCompound tWarpTag = new NBTTagCompound(); + int tWarpLevel = 0; + if (stack.hasTagCompound()) { + if (stack.getTagCompound().hasKey(NBT_TAG_WARP)) { + tWarpLevel = stack.getTagCompound().getInteger(NBT_TAG_WARP); + if (increment) + stack.getTagCompound().setInteger(NBT_TAG_WARP, ++tWarpLevel); + } + } else { + tWarpTag.setInteger(NBT_TAG_WARP, 0); + stack.setTagCompound(tWarpTag); + } + + return tWarpLevel; + } + + @Override + public void onWornTick(ItemStack stack, EntityLivingBase player) { + if (!player.isInvisible()) { + player.setInvisible(true); + ((EntityPlayer) player).capabilities.disableDamage = true; + } + + // Stop doing this 20 times per second... + if (random.nextInt(20) > 0) + return; /* Why dump to a new tag when you can just grab the tag and work with it? NBTTagCompound tag = new NBTTagCompound(); @@ -137,111 +128,104 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun NBTTagCompound forgeTag = tag.getCompoundTag("ForgeData"); */ - // Retrieve Players NBT Data + // Retrieve Players NBT Data - NBTTagCompound forgeTag = getOrSetForgeTag((EntityPlayer)player); + NBTTagCompound forgeTag = getOrSetForgeTag((EntityPlayer) player); - int corruption = 0; + int corruption = 0; - // get corruption levels, init to 0 if not existing yet - if (forgeTag.hasKey( NBT_TAG_MIND_CORRUPTION )) - corruption = forgeTag.getInteger( NBT_TAG_MIND_CORRUPTION ); - else - forgeTag.setInteger( NBT_TAG_MIND_CORRUPTION, 0); + // get corruption levels, init to 0 if not existing yet + if (forgeTag.hasKey(NBT_TAG_MIND_CORRUPTION)) + corruption = forgeTag.getInteger(NBT_TAG_MIND_CORRUPTION); + else + forgeTag.setInteger(NBT_TAG_MIND_CORRUPTION, 0); - if (!player.worldObj.isRemote) { - //EMT.LOGGER.info( String.format( "Total Corruption: %d ItemWarpLevel: %d", corruption, getItemWarpLevel( stack, false ) )); + if (!player.worldObj.isRemote) { + //EMT.LOGGER.info( String.format( "Total Corruption: %d ItemWarpLevel: %d", corruption, getItemWarpLevel( stack, false ) )); - if (corruption == 0) { - ((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "You have worn the Ring. Your soul has now been forever " + EMTTextHelper.PURPLE + "tainted. " + EMTTextHelper.RED + EMTTextHelper.ITALIC + "Beware of wearing the ring. The tainting will only " + EMTTextHelper.RED + EMTTextHelper.ITALIC + "increase, and strange things will start happening.")); - } - // First effect should become active after ~5 Minutes - else if (corruption > 300 && corruption < 1400 && random.nextInt(100) == 0) { - ((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring somehow feels heavy")); - if (random.nextBoolean()) - player.addPotionEffect(new PotionEffect(Potion.blindness.id, 500, 2, false)); - else - player.addPotionEffect(new PotionEffect(Potion.confusion.id, 500, 2, false)); - } - else if (corruption >= 1400 && corruption < 3800 && random.nextInt(100) == 0) { - ((EntityPlayer) player).capabilities.disableDamage = false; - player.addPotionEffect(new PotionEffect(Potion.poison.id, 500, 2, false)); - } - else if (corruption >= 3800 && corruption < 6500 && random.nextInt(100) == 0) { - ((EntityPlayer) player).capabilities.disableDamage = false; - player.motionY += 2d; - } - else if (corruption >= 6500 && random.nextInt(10000) == 0) { - ((EntityPlayer) player).capabilities.disableDamage = false; - player.addPotionEffect(new PotionEffect(Potion.wither.id, 100, 4, false)); - } + if (corruption == 0) { + ((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "You have worn the Ring. Your soul has now been forever " + EMTTextHelper.PURPLE + "tainted. " + EMTTextHelper.RED + EMTTextHelper.ITALIC + "Beware of wearing the ring. The tainting will only " + EMTTextHelper.RED + EMTTextHelper.ITALIC + "increase, and strange things will start happening.")); + } + // First effect should become active after ~5 Minutes + else if (corruption > 300 && corruption < 1400 && random.nextInt(100) == 0) { + ((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring somehow feels heavy")); + if (random.nextBoolean()) + player.addPotionEffect(new PotionEffect(Potion.blindness.id, 500, 2, false)); + else + player.addPotionEffect(new PotionEffect(Potion.confusion.id, 500, 2, false)); + } else if (corruption >= 1400 && corruption < 3800 && random.nextInt(100) == 0) { + ((EntityPlayer) player).capabilities.disableDamage = false; + player.addPotionEffect(new PotionEffect(Potion.poison.id, 500, 2, false)); + } else if (corruption >= 3800 && corruption < 6500 && random.nextInt(100) == 0) { + ((EntityPlayer) player).capabilities.disableDamage = false; + player.motionY += 2d; + } else if (corruption >= 6500 && random.nextInt(10000) == 0) { + ((EntityPlayer) player).capabilities.disableDamage = false; + player.addPotionEffect(new PotionEffect(Potion.wither.id, 100, 4, false)); + } - if (corruption >= 300) - { - if ( random.nextInt( 100 ) == 0) - { - getItemWarpLevel( stack, true ); - ((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring suddenly starts to glow purple")); + if (corruption >= 300) { + if (random.nextInt(100) == 0) { + getItemWarpLevel(stack, true); + ((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring suddenly starts to glow purple")); + } + } } - } - } - forgeTag.setInteger( NBT_TAG_MIND_CORRUPTION, ++corruption); - //tag.setTag( NBT_TAG_FORGE_DATA, forgeTag); - //((EntityPlayer) player).readFromNBT(tag); - } + forgeTag.setInteger(NBT_TAG_MIND_CORRUPTION, ++corruption); + //tag.setTag( NBT_TAG_FORGE_DATA, forgeTag); + //((EntityPlayer) player).readFromNBT(tag); + } - @Override - public void onEquipped(ItemStack stack, EntityLivingBase player) { - // This purges all corruption once the ring is put on / a second ring is equipped? + @Override + public void onEquipped(ItemStack stack, EntityLivingBase player) { + // This purges all corruption once the ring is put on / a second ring is equipped? /* NBTTagCompound tag = new NBTTagCompound(); ((EntityPlayer) player).writeToNBT(tag); tag.getCompoundTag( NBT_TAG_FORGE_DATA ).setInteger( NBT_TAG_MIND_CORRUPTION, 0); ((EntityPlayer) player).readFromNBT(tag); */ - } + } - @Override - public void onUnequipped(ItemStack stack, EntityLivingBase player) { - player.setInvisible(false); - if (!((EntityPlayer) player).capabilities.isCreativeMode) - ((EntityPlayer) player).capabilities.disableDamage = false; + @Override + public void onUnequipped(ItemStack stack, EntityLivingBase player) { + player.setInvisible(false); + if (!((EntityPlayer) player).capabilities.isCreativeMode) + ((EntityPlayer) player).capabilities.disableDamage = false; /* Wtf? Remove ForgeData tag? There are more mods using this tag than just emt! ((EntityPlayer) player).writeToNBT(tag); tag.removeTag( NBT_TAG_FORGE_DATA ); ((EntityPlayer) player).readFromNBT(tag); */ - player.addPotionEffect(new PotionEffect(Potion.confusion.id, 200, 1, false)); - } - - @Override - public boolean canEquip(ItemStack stack, EntityLivingBase player) { - return stack.getItemDamage() == 0 && player instanceof EntityPlayer; - } - - @Override - public boolean canUnequip(ItemStack stack, EntityLivingBase player) { - // So, how this was written, you basically could not unequip the ring for 600 ticks after you equipped it, but afterwards you could? - // Let's make it a random chance to remove it instead... - - // NBTTagCompound tag = getOrSetForgeTag((EntityPlayer) player); - // return (tag.getCompoundTag( NBT_TAG_FORGE_DATA ).getInteger( NBT_TAG_MIND_CORRUPTION ) > 600); - boolean tRet = false; - if (random.nextInt( 5 ) == 0) - { - tRet = true; - ((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.GREEN + "You removed the Ring. Maybe you should think twice before using it next time?")); + player.addPotionEffect(new PotionEffect(Potion.confusion.id, 200, 1, false)); } - else - ( (EntityPlayer) player ).addChatMessage( new ChatComponentText( EMTTextHelper.PURPLE + "Nooo, don't remove me! I give you great power!" ) ); - return tRet; - } + @Override + public boolean canEquip(ItemStack stack, EntityLivingBase player) { + return stack.getItemDamage() == 0 && player instanceof EntityPlayer; + } - @Override - public int getRunicCharge(ItemStack itemStack) { - return 0; - } + @Override + public boolean canUnequip(ItemStack stack, EntityLivingBase player) { + // So, how this was written, you basically could not unequip the ring for 600 ticks after you equipped it, but afterwards you could? + // Let's make it a random chance to remove it instead... + + // NBTTagCompound tag = getOrSetForgeTag((EntityPlayer) player); + // return (tag.getCompoundTag( NBT_TAG_FORGE_DATA ).getInteger( NBT_TAG_MIND_CORRUPTION ) > 600); + boolean tRet = false; + if (random.nextInt(5) == 0) { + tRet = true; + ((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.GREEN + "You removed the Ring. Maybe you should think twice before using it next time?")); + } else + ((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "Nooo, don't remove me! I give you great power!")); + + return tRet; + } + + @Override + public int getRunicCharge(ItemStack itemStack) { + return 0; + } } diff --git a/src/main/java/emt/item/armor/boots/ItemElectricBootsTraveller.java b/src/main/java/emt/item/armor/boots/ItemElectricBootsTraveller.java index 30ddeb8..0aa0de6 100644 --- a/src/main/java/emt/item/armor/boots/ItemElectricBootsTraveller.java +++ b/src/main/java/emt/item/armor/boots/ItemElectricBootsTraveller.java @@ -32,231 +32,217 @@ import java.util.List; public class ItemElectricBootsTraveller extends ItemArmor implements IRunicArmor, IElectricItem, IVisDiscountGear, IMetalArmor, ISpecialArmor { - public int maxCharge = 100000; - public int energyPerDamage = 1000; - public int visDiscount = 2; - public float speedBonus = 0.055F; - public float jumpBonus = 0.3F; - public double transferLimit = 100; + public int maxCharge = 100000; + public int energyPerDamage = 1000; + public int visDiscount = 2; + public float speedBonus = 0.055F; + public float jumpBonus = 0.3F; + public double transferLimit = 100; - public ItemElectricBootsTraveller(ArmorMaterial material, int par3, int par4) { - super(material, par3, par4); - this.setMaxDamage(27); - this.setMaxStackSize(1); - this.setCreativeTab(EMT.TAB); - MinecraftForge.EVENT_BUS.register(this); - } - - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { - ItemStack itemStack = new ItemStack(this, 1); - if (getChargedItem(itemStack) == this) { - ItemStack charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); - itemList.add(charged); - } - if (getEmptyItem(itemStack) == this) { - itemList.add(new ItemStack(this, 1, getMaxDamage())); - } - } - - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/boots_electric"); - } - - @Override - public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { - if (source.isUnblockable()) { - return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 0); - } - else { - double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio(); - int energyPerDamage = getEnergyPerDamage(); - double damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; - return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, (int) damageLimit); - } - } - - @Override - public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { - if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) { - return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio()); - } - else { - return 0; - } - } - - @Override - public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { - ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false); - } - - public double getDamageAbsorptionRatio() { - return 0.5D; - } - - private double getBaseAbsorptionRatio() { - return 0.15D; - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { - list.add(EMTTextHelper.localize("tooltip.EMT.visDiscount") + ": " + String.valueOf(visDiscount) + "%"); - } - - @Override - public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { - return visDiscount; - } - - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { - if ((!player.capabilities.isFlying) && (player.moveForward > 0.0F)) { - if ((player.worldObj.isRemote) && (!player.isSneaking())) { - if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(Integer.valueOf(player.getEntityId()))) { - Thaumcraft.instance.entityEventHandler.prevStep.put(Integer.valueOf(player.getEntityId()), Float.valueOf(player.stepHeight)); - } - player.stepHeight = 1.0F; - } - - if (((player.onGround || player.capabilities.isFlying) && player.moveForward > 0F)) { - player.moveFlying(0F, 1F, speedBonus); - player.jumpMovementFactor = jumpBonus; - } - } - } - - @SubscribeEvent - public void onPlayerJump(LivingEvent.LivingJumpEvent event) { - if (event.entityLiving instanceof EntityPlayer) { - EntityPlayer player = (EntityPlayer) event.entityLiving; - boolean hasArmor = player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem() == this; - - if (hasArmor) - player.motionY += jumpBonus; - } - } - - // make the boots worth upgrading - public float getMaxHealthyDropDist() - { - return 20.0F; - } - - public float getMinimumDropDist() - { - return 4.0f; - } - - @SubscribeEvent - public void onLivingFall(LivingFallEvent event) - { - if( ( EMT.instance.isSimulating() ) && ( ( event.entity instanceof EntityLivingBase ) ) ) - { - if( event.entity instanceof EntityPlayer ) - { - EntityPlayer entity = (EntityPlayer) event.entity; - if( ( entity.inventory.armorInventory[0] != null ) && ( entity.inventory.armorInventory[0].getItem() instanceof ItemElectricBootsTraveller ) ) - { - ItemElectricBootsTraveller tUsedBoots = (ItemElectricBootsTraveller)entity.inventory.armorInventory[0].getItem(); - ItemStack stack = entity.inventory.armorInventory[0]; - - // Check if we dropped the minimum amount; To cover the jump-boost bonus without penalty - if ( tUsedBoots.getMinimumDropDist() > event.distance ) - { - event.setCanceled( true ); - } - else - { - float tEnergyDemand = tUsedBoots.energyPerDamage * (( ( event.distance > tUsedBoots.getMaxHealthyDropDist() ) ? event.distance * 3 : event.distance ) - 4.0F); - if( tEnergyDemand <= ElectricItem.manager.getCharge( stack ) ) - { - //EMT.LOGGER.info( String.format("FD: %f DMG: %f EPD: %d HDD: %f", event.distance, tEnergyDemand, tUsedBoots.energyPerDamage, tUsedBoots.getMaxHealthyDropDist() )); - ElectricItem.manager.discharge( stack, tEnergyDemand, Integer.MAX_VALUE, true, false, false ); - event.setCanceled( true ); - } - } - } - } + public ItemElectricBootsTraveller(ArmorMaterial material, int par3, int par4) { + super(material, par3, par4); + this.setMaxDamage(27); + this.setMaxStackSize(1); + this.setCreativeTab(EMT.TAB); + MinecraftForge.EVENT_BUS.register(this); } - } - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return EMT.TEXTURE_PATH + ":textures/models/electricboots.png"; - } + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + if (getChargedItem(itemStack) == this) { + ItemStack charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); + itemList.add(charged); + } + if (getEmptyItem(itemStack) == this) { + itemList.add(new ItemStack(this, 1, getMaxDamage())); + } + } - @Override - public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) { - return true; - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/boots_electric"); + } - @Override - public boolean isRepairable() { - return false; - } + @Override + public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { + if (source.isUnblockable()) { + return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 0); + } else { + double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio(); + int energyPerDamage = getEnergyPerDamage(); + double damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; + return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, (int) damageLimit); + } + } - @Override - public int getItemEnchantability() { - if (EMTConfigHandler.enchanting == false) { - return 0; - } - else { - return 4; - } - } + @Override + public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { + if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) { + return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio()); + } else { + return 0; + } + } - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - if (EMTConfigHandler.enchanting == false) { - return false; - } - else { - return true; - } - } + @Override + public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { + ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false); + } - public int getEnergyPerDamage() { - return energyPerDamage; - } + public double getDamageAbsorptionRatio() { + return 0.5D; + } - /* IC2 API METHODS */ + private double getBaseAbsorptionRatio() { + return 0.15D; + } - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add(EMTTextHelper.localize("tooltip.EMT.visDiscount") + ": " + String.valueOf(visDiscount) + "%"); + } - @Override - public double getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { + return visDiscount; + } - @Override - public int getTier(ItemStack itemStack) { - return 2; - } + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { + if ((!player.capabilities.isFlying) && (player.moveForward > 0.0F)) { + if ((player.worldObj.isRemote) && (!player.isSneaking())) { + if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(Integer.valueOf(player.getEntityId()))) { + Thaumcraft.instance.entityEventHandler.prevStep.put(Integer.valueOf(player.getEntityId()), Float.valueOf(player.stepHeight)); + } + player.stepHeight = 1.0F; + } - @Override - public double getTransferLimit(ItemStack itemStack) { - return transferLimit; - } + if (((player.onGround || player.capabilities.isFlying) && player.moveForward > 0F)) { + player.moveFlying(0F, 1F, speedBonus); + player.jumpMovementFactor = jumpBonus; + } + } + } - @Override - public Item getChargedItem(ItemStack itemStack) { - return this; - } + @SubscribeEvent + public void onPlayerJump(LivingEvent.LivingJumpEvent event) { + if (event.entityLiving instanceof EntityPlayer) { + EntityPlayer player = (EntityPlayer) event.entityLiving; + boolean hasArmor = player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem() == this; - @Override - public Item getEmptyItem(ItemStack itemStack) { - return this; - } + if (hasArmor) + player.motionY += jumpBonus; + } + } - @Override - public int getRunicCharge(ItemStack itemStack) { - return 0; - } + // make the boots worth upgrading + public float getMaxHealthyDropDist() { + return 20.0F; + } + + public float getMinimumDropDist() { + return 4.0f; + } + + @SubscribeEvent + public void onLivingFall(LivingFallEvent event) { + if ((EMT.instance.isSimulating()) && ((event.entity instanceof EntityLivingBase))) { + if (event.entity instanceof EntityPlayer) { + EntityPlayer entity = (EntityPlayer) event.entity; + if ((entity.inventory.armorInventory[0] != null) && (entity.inventory.armorInventory[0].getItem() instanceof ItemElectricBootsTraveller)) { + ItemElectricBootsTraveller tUsedBoots = (ItemElectricBootsTraveller) entity.inventory.armorInventory[0].getItem(); + ItemStack stack = entity.inventory.armorInventory[0]; + + // Check if we dropped the minimum amount; To cover the jump-boost bonus without penalty + if (tUsedBoots.getMinimumDropDist() > event.distance) { + event.setCanceled(true); + } else { + float tEnergyDemand = tUsedBoots.energyPerDamage * (((event.distance > tUsedBoots.getMaxHealthyDropDist()) ? event.distance * 3 : event.distance) - 4.0F); + if (tEnergyDemand <= ElectricItem.manager.getCharge(stack)) { + //EMT.LOGGER.info( String.format("FD: %f DMG: %f EPD: %d HDD: %f", event.distance, tEnergyDemand, tUsedBoots.energyPerDamage, tUsedBoots.getMaxHealthyDropDist() )); + ElectricItem.manager.discharge(stack, tEnergyDemand, Integer.MAX_VALUE, true, false, false); + event.setCanceled(true); + } + } + } + } + } + } + + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return EMT.TEXTURE_PATH + ":textures/models/electricboots.png"; + } + + @Override + public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) { + return true; + } + + @Override + public boolean isRepairable() { + return false; + } + + @Override + public int getItemEnchantability() { + if (EMTConfigHandler.enchanting == false) { + return 0; + } else { + return 4; + } + } + + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + if (EMTConfigHandler.enchanting == false) { + return false; + } else { + return true; + } + } + + public int getEnergyPerDamage() { + return energyPerDamage; + } + + /* IC2 API METHODS */ + + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } + + @Override + public double getMaxCharge(ItemStack itemStack) { + return maxCharge; + } + + @Override + public int getTier(ItemStack itemStack) { + return 2; + } + + @Override + public double getTransferLimit(ItemStack itemStack) { + return transferLimit; + } + + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } + + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } + + @Override + public int getRunicCharge(ItemStack itemStack) { + return 0; + } } diff --git a/src/main/java/emt/item/armor/boots/ItemNanoBootsTraveller.java b/src/main/java/emt/item/armor/boots/ItemNanoBootsTraveller.java index ef3819e..b4cf4a6 100644 --- a/src/main/java/emt/item/armor/boots/ItemNanoBootsTraveller.java +++ b/src/main/java/emt/item/armor/boots/ItemNanoBootsTraveller.java @@ -10,46 +10,44 @@ import net.minecraft.item.ItemStack; public class ItemNanoBootsTraveller extends ItemElectricBootsTraveller { - public ItemNanoBootsTraveller(ArmorMaterial material, int par3, int par4) { - super(material, par3, par4); - maxCharge = 1000000; - speedBonus = (float) EMTConfigHandler.nanoBootsSpeed; - jumpBonus = (float) EMTConfigHandler.nanoBootsJump; - visDiscount = 4; - transferLimit = 1600; - energyPerDamage = 5000; - } + public ItemNanoBootsTraveller(ArmorMaterial material, int par3, int par4) { + super(material, par3, par4); + maxCharge = 1000000; + speedBonus = (float) EMTConfigHandler.nanoBootsSpeed; + jumpBonus = (float) EMTConfigHandler.nanoBootsJump; + visDiscount = 4; + transferLimit = 1600; + energyPerDamage = 5000; + } - @Override - public float getMaxHealthyDropDist() - { - return (float) EMTConfigHandler.nanoBootsMaxDrop; - } + @Override + public float getMaxHealthyDropDist() { + return (float) EMTConfigHandler.nanoBootsMaxDrop; + } - @Override - public float getMinimumDropDist() - { - return (float) EMTConfigHandler.nanoBootsMinDrop; - } + @Override + public float getMinimumDropDist() { + return (float) EMTConfigHandler.nanoBootsMinDrop; + } - @Override - public double getDamageAbsorptionRatio() { - return 0.9D; - } + @Override + public double getDamageAbsorptionRatio() { + return 0.9D; + } - @Override - public int getTier(ItemStack itemStack) { - return 3; - } + @Override + public int getTier(ItemStack itemStack) { + return 3; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/boots_nano"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/boots_nano"); + } - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return EMT.TEXTURE_PATH + ":textures/models/nanobootstravel.png"; - } + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return EMT.TEXTURE_PATH + ":textures/models/nanobootstravel.png"; + } } diff --git a/src/main/java/emt/item/armor/boots/ItemQuantumBootsTraveller.java b/src/main/java/emt/item/armor/boots/ItemQuantumBootsTraveller.java index 64a6c8b..28870bf 100644 --- a/src/main/java/emt/item/armor/boots/ItemQuantumBootsTraveller.java +++ b/src/main/java/emt/item/armor/boots/ItemQuantumBootsTraveller.java @@ -10,46 +10,44 @@ import net.minecraft.item.ItemStack; public class ItemQuantumBootsTraveller extends ItemElectricBootsTraveller { - public ItemQuantumBootsTraveller(ArmorMaterial material, int par3, int par4) { - super(material, par3, par4); - maxCharge = 10000000; - speedBonus = (float) EMTConfigHandler.quantumBootsSpeed; - jumpBonus = (float) EMTConfigHandler.quantumBootsJump; - visDiscount = 5; - transferLimit = 12000; - energyPerDamage = 20000; - } + public ItemQuantumBootsTraveller(ArmorMaterial material, int par3, int par4) { + super(material, par3, par4); + maxCharge = 10000000; + speedBonus = (float) EMTConfigHandler.quantumBootsSpeed; + jumpBonus = (float) EMTConfigHandler.quantumBootsJump; + visDiscount = 5; + transferLimit = 12000; + energyPerDamage = 20000; + } - @Override - public float getMaxHealthyDropDist() - { - return (float) EMTConfigHandler.quantumBootsMaxDrop; - } + @Override + public float getMaxHealthyDropDist() { + return (float) EMTConfigHandler.quantumBootsMaxDrop; + } - @Override - public float getMinimumDropDist() - { - return (float) EMTConfigHandler.quantumBootsMinDrop; - } + @Override + public float getMinimumDropDist() { + return (float) EMTConfigHandler.quantumBootsMinDrop; + } - @Override - public double getDamageAbsorptionRatio() { - return 1D; - } + @Override + public double getDamageAbsorptionRatio() { + return 1D; + } - @Override - public int getTier(ItemStack itemStack) { - return 4; - } + @Override + public int getTier(ItemStack itemStack) { + return 4; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/boots_quantum"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/boots_quantum"); + } - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return EMT.TEXTURE_PATH + ":textures/models/quantumbootstravel.png"; - } + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return EMT.TEXTURE_PATH + ":textures/models/quantumbootstravel.png"; + } } diff --git a/src/main/java/emt/item/armor/chestplate/ItemInfusedQuantumChestplate.java b/src/main/java/emt/item/armor/chestplate/ItemInfusedQuantumChestplate.java index bf75c01..fc0564f 100644 --- a/src/main/java/emt/item/armor/chestplate/ItemInfusedQuantumChestplate.java +++ b/src/main/java/emt/item/armor/chestplate/ItemInfusedQuantumChestplate.java @@ -15,11 +15,6 @@ import ic2.core.audio.PositionSpec; import ic2.core.init.InternalName; import ic2.core.item.armor.ItemArmorElectric; import ic2.core.util.StackUtil; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; @@ -38,512 +33,505 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingFallEvent; import thaumcraft.api.IRunicArmor; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements IRunicArmor { - public final byte NONE = 0; - public final byte JETPACK = 1; - public final byte THAUMIUM = 2; - public final byte NANO = 3; - public final byte QUANTUM = 4; - - private IIcon iconNONE; - private IIcon iconJETPACK; - private IIcon iconTHAUMIUM; - private IIcon iconNANO; - private IIcon iconQUANTUM; - - protected static ArrayList potionRemovalCost = new ArrayList(); - public static AudioSource audioSource; - private static boolean lastJetpackUsed = false; - - public ItemInfusedQuantumChestplate(InternalName internalName, int armorType) { - super(internalName, InternalName.quantum, armorType, 20000000D, 18000.0D, 4); - MinecraftForge.EVENT_BUS.register(this); - this.setCreativeTab(EMT.TAB); - } - - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - iconNONE = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest"); - iconJETPACK = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_jetpack"); - iconTHAUMIUM = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_wing_t"); - iconNANO = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_wing_n"); - iconQUANTUM = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_wing_q"); - } - - @Override - public String getUnlocalizedName(ItemStack itemstack) { - return "item." + EMT.MOD_ID + ".chestplates.infusedQuantum"; - } - - public String getItemStackDisplayName(ItemStack stack) { - return (StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack) + ".name")).trim(); - } - - @SubscribeEvent - public void onEntityLivingFallEvent(LivingFallEvent event) { - if (IC2.platform.isSimulating() && (event.entity instanceof EntityLivingBase)) { - EntityLivingBase entity = (EntityLivingBase) event.entity; - ItemStack armor = entity.getEquipmentInSlot(1); - - if ((armor != null) && (armor.getItem() == this)) { - int fallDamage = Math.max((int) event.distance - 10, 0); - double energyCost = getEnergyPerDamage() * fallDamage; - - if (energyCost <= ElectricItem.manager.getCharge(armor)) { - ElectricItem.manager.discharge(armor, energyCost, Integer.MAX_VALUE, true, false, false); - event.setCanceled(true); - } - } - } - } - - @Override - public double getDamageAbsorptionRatio() { - return 1.1D; - } - - @Override - public int getEnergyPerDamage() { - return 20000; - } - - @SideOnly(Side.CLIENT) - @Override - public EnumRarity getRarity(ItemStack stack) { - return EnumRarity.rare; - } - - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { - NBTTagCompound nbt = StackUtil.getOrCreateNbtData(itemStack); - - byte toggleTimer = nbt.getByte("toggleTimer"); - boolean ret = false; - boolean hoverMode = nbt.getBoolean("hoverMode"); - boolean jetpackUsed = false; - byte wing = nbt.getByte("wing"); - - if (!world.isRemote) { - - for (PotionEffect effect : (Collection) player.getActivePotionEffects()) { - if (potionRemovalCost.contains(effect.getPotionID())) { - IC2.platform.removePotion(player, effect.getPotionID()); - } - } - - ItemStack currentStack = player.inventory.getCurrentItem(); - Item currentItem = currentStack == null ? null : currentStack.getItem(); - - if (nbt.hasKey("useother")) { - String useother = nbt.getString("useother"); - if (useother.equals("Jetpack")) { - nbt.setByte("wing", JETPACK); - } - if (useother.equals("TW")) { - nbt.setByte("wing", THAUMIUM); - } - if (useother.equals("NW")) { - nbt.setByte("wing", NANO); - } - if (useother.equals("QW")) { - nbt.setByte("wing", QUANTUM); - } - wing = nbt.getByte("wing"); - nbt.removeTag("useother"); - } - - if (wing == NONE) { - nbt.setByte("wing", NONE); - } - - if (IC2.keyboard.isJumpKeyDown(player) && IC2.keyboard.isModeSwitchKeyDown(player) && toggleTimer == 0) { - toggleTimer = 30; - hoverMode = !hoverMode; - if (IC2.platform.isSimulating()) { - nbt.setBoolean("hoverMode", hoverMode); - if (hoverMode) { - IC2.platform.messagePlayer(player, "Hover Mode enabled.", new Object[0]); - } - else { - IC2.platform.messagePlayer(player, "Hover Mode disabled.", new Object[0]); - } - } - } - - if (currentStack != null && player.isSneaking() && toggleTimer == 0 && wing == NONE) { - if (currentItem == IC2Items.getItem("electricJetpack").getItem()) { - IC2.platform.messagePlayer(player, "Jetpack enabled.", new Object[0]); - nbt.setByte("wing", JETPACK); - //int charge = (int) ElectricItem.manager.getCharge(itemStack); - //if (ElectricItem.manager.getCharge(player.inventory.getCurrentItem()) < 30000) { - // ElectricItem.manager.use(itemStack, 30000 - ElectricItem.manager.getCharge(currentStack), player); - //} - nbt.setInteger("jetpackCharge", (int) (ElectricItem.manager.getCharge(currentStack)/* + charge - (int) ElectricItem.manager.getCharge(itemStack))*/)); - player.inventory.setInventorySlotContents(player.inventory.currentItem, null); - } - - else if (currentItem == EMTItems.thaumiumWing) { - IC2.platform.messagePlayer(player, "Thaumium wings enabled.", new Object[0]); - nbt.setByte("wing", THAUMIUM); - player.inventory.setInventorySlotContents(player.inventory.currentItem, null); - } - - else if (currentItem == EMTItems.nanoWing) { - IC2.platform.messagePlayer(player, "Nano wings enabled.", new Object[0]); - nbt.setByte("wing", NANO); - //int charge = (int) ElectricItem.manager.getCharge(itemStack); - //if (ElectricItem.manager.getCharge(currentStack) < ItemNanoWing.maxCharge) { - // ElectricItem.manager.use(itemStack, ItemNanoWing.maxCharge - ElectricItem.manager.getCharge(currentStack), player); - //} - nbt.setInteger("NWCharge", (int) (ElectricItem.manager.getCharge(player.inventory.getCurrentItem())/* + charge - (int) ElectricItem.manager.getCharge(itemStack)*/)); - player.inventory.setInventorySlotContents(player.inventory.currentItem, null); - } - - else if (currentItem == EMTItems.quantumWing) { - IC2.platform.messagePlayer(player, "Quantum wings enabled.", new Object[0]); - nbt.setByte("wing", QUANTUM); - //int charge = (int) ElectricItem.manager.getCharge(itemStack); - //if (ElectricItem.manager.getCharge(currentStack) < ItemQuantumWing.maxCharge) { - // ElectricItem.manager.use(itemStack, ItemQuantumWing.maxCharge - ElectricItem.manager.getCharge(currentStack), player); - //} - nbt.setInteger("QWCharge", (int) (ElectricItem.manager.getCharge(currentStack)/* + charge - (int) ElectricItem.manager.getCharge(itemStack)*/)); - player.inventory.setInventorySlotContents(player.inventory.currentItem, null); - } - } - - if (currentStack == null && nbt.getBoolean("unequip") && player.isSneaking()) { - toggleTimer = 30; - - if (wing == JETPACK) { - IC2.platform.messagePlayer(player, "Jetpack disabled.", new Object[0]); - nbt.setByte("wing", NONE); - ItemStack charged = new ItemStack(IC2Items.getItem("electricJetpack").getItem()); - if (nbt.getInteger("jetpackCharge") > 0) - ElectricItem.manager.charge(charged, nbt.getInteger("jetpackCharge"), 1, true, false); - else - ElectricItem.manager.charge(charged, 0, 1, true, false); - player.inventory.setInventorySlotContents(player.inventory.currentItem, charged); - } - - if (wing == THAUMIUM) { - IC2.platform.messagePlayer(player, "Thaumium wings disabled.", new Object[0]); - nbt.setByte("wing", NONE); - player.inventory.setInventorySlotContents(player.inventory.currentItem, new ItemStack(EMTItems.thaumiumWing)); - } - - if (wing == NANO) { - IC2.platform.messagePlayer(player, "Nano wings disabled.", new Object[0]); - nbt.setByte("wing", NONE); - ItemStack charged = new ItemStack(EMTItems.nanoWing); - if (nbt.getInteger("NWCharge") > 0) - ElectricItem.manager.charge(charged, nbt.getInteger("NWCharge"), 3, true, false); - else - ElectricItem.manager.charge(charged, 0, 3, true, false); - player.inventory.setInventorySlotContents(player.inventory.currentItem, charged); - } - - if (wing == QUANTUM) { - IC2.platform.messagePlayer(player, "Quantum wings disabled.", new Object[0]); - nbt.setByte("wing", NONE); - ItemStack charged = new ItemStack(EMTItems.quantumWing); - if (nbt.getInteger("QWCharge") > 0) - ElectricItem.manager.charge(charged, nbt.getInteger("QWCharge"), 3, true, false); - else - ElectricItem.manager.charge(charged, 0, 3, true, false); - player.inventory.setInventorySlotContents(player.inventory.currentItem, charged); - } - } - - nbt.setBoolean("unequip", false); - } - - if ((IC2.keyboard.isJumpKeyDown(player) && wing == JETPACK) || (hoverMode && player.motionY < -0.029999999329447746D)) { - jetpackUsed = useJetpack(player, hoverMode, itemStack); - } - - if (wing == THAUMIUM) - useWings(player, itemStack, world, 0.15f, 0.7f, 0.5f, 0, false); - if (wing == NANO) - useWings(player, itemStack, world, 0.25f, 0.6f, 0.3f, 5, true); - if (wing == QUANTUM) - useWings(player, itemStack, world, 0.33f, 0.5f, 0.2f, 7, true); - - if (IC2.platform.isSimulating() && toggleTimer > 0) { - toggleTimer = (byte) (toggleTimer - 1); - nbt.setByte("toggleTimer", toggleTimer); - } - if (IC2.platform.isRendering() && player == IC2.platform.getPlayerInstance()) { - if (lastJetpackUsed != jetpackUsed) { - if (jetpackUsed) { - if (audioSource == null) { - audioSource = IC2.audioManager.createSource(player, PositionSpec.Backpack, "Tools/Jetpack/JetpackLoop.ogg", true, false, IC2.audioManager.getDefaultVolume()); - } - if (audioSource != null) { - audioSource.play(); - } - } - else if (audioSource != null) { - audioSource.remove(); - audioSource = null; - } - lastJetpackUsed = jetpackUsed; - } - if (audioSource != null) { - audioSource.updatePosition(); - } - } - - ret = jetpackUsed; - - player.extinguish(); - - if (ret) { - player.inventoryContainer.detectAndSendChanges(); - } - } - - @SideOnly(Side.CLIENT) - @Override - public IIcon getIconIndex(ItemStack stack) { - try { - byte wing = stack.stackTagCompound.getByte("wing"); - - switch (wing) { - case JETPACK: - return iconJETPACK; - case THAUMIUM: - return iconTHAUMIUM; - case NANO: - return iconNANO; - case QUANTUM: - return iconQUANTUM; - default: - return iconNONE; - } - } catch (Exception e) { - return iconNONE; - } - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { - try { - byte wing = stack.stackTagCompound.getByte("wing"); - - switch (wing) { - case JETPACK: - return iconJETPACK; - case THAUMIUM: - return iconTHAUMIUM; - case NANO: - return iconNANO; - case QUANTUM: - return iconQUANTUM; - default: - return iconNONE; - } - } catch (Exception e) { - return iconNONE; - } - } - - @Override - public int getItemEnchantability() { - if (EMTConfigHandler.enchanting == false) - return 0; - else - return 4; - } - - @Override - @SideOnly(Side.CLIENT) - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - byte wing = stack.stackTagCompound.getByte("wing"); - - switch (wing) { - case JETPACK: - return EMT.TEXTURE_PATH + ":textures/models/quantum_jetpack.png"; - case THAUMIUM: - return EMT.TEXTURE_PATH + ":textures/models/quantum_wings_t.png"; - case NANO: - return EMT.TEXTURE_PATH + ":textures/models/quantum_wings_n.png"; - case QUANTUM: - return EMT.TEXTURE_PATH + ":textures/models/quantum_wings_q.png"; - default: - return EMT.TEXTURE_PATH + ":textures/models/quantum.png"; - } - } - - @Override - public int getTier(ItemStack itemStack) { - return 4; - } - - @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) { - try { - if (entity instanceof EntityPlayer) { - byte wing = stack.stackTagCompound.getByte("wing"); - if (wing == JETPACK) { - ModelSpecialArmor mbm = new ModelSpecialArmor(1, 1); - return mbm; - } - else if (wing != 0) { - ModelSpecialArmor mbm = new ModelSpecialArmor(1, 2); - mbm.isJumping = stack.stackTagCompound.getBoolean("isJumping"); - return mbm; - } - } - } catch (NullPointerException e) { - new ModelSpecialArmor(1, 0); - } - return new ModelSpecialArmor(1, 0); - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { - try { - list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + tier); - } catch (NullPointerException e) {} - } - - public boolean useJetpack(EntityPlayer player, boolean hoverMode, ItemStack stack) { - int jetpackMaxCharge = 30000; - float power = 1.0F; - float dropPercentage = 0.05F; - - if (ElectricItem.manager.getCharge(stack) <= 0) { - return false; - } - - if (((float) ElectricItem.manager.getCharge(stack) / (float) jetpackMaxCharge) <= dropPercentage) { - power = (float) (power * (ElectricItem.manager.getCharge(stack) / (float) jetpackMaxCharge) * dropPercentage); - } - - if (IC2.keyboard.isForwardKeyDown(player)) { - float retruster = 3.5F; - - if (hoverMode) { - retruster = 0.5F; - } - - float forwardpower = power * retruster * 2.0F; - - if (forwardpower > 0.0F) { - player.moveFlying(0.0F, 0.4F * forwardpower, 0.02F); - } - } - - int worldHeight = IC2.getWorldHeight(player.worldObj); - - double y = player.posY; - - if (y > worldHeight - 25) { - if (y > worldHeight) { - y = worldHeight; - } - power = (float) (power * ((worldHeight - y) / 25.0D)); - } - - double prevmotion = player.motionY; - player.motionY = Math.min(player.motionY + power * 0.2F, 0.6000000238418579D); - - if (hoverMode) { - float maxHoverY = -0.025F; - if (IC2.keyboard.isSneakKeyDown(player)) { - maxHoverY = -0.1F; - } - if (IC2.keyboard.isJumpKeyDown(player)) { - maxHoverY = 0.1F; - } - if (player.motionY > maxHoverY) { - player.motionY = maxHoverY; - if (prevmotion > player.motionY) { - player.motionY = prevmotion; - } - } - } - double consume = 8.0D; - if (hoverMode) { - consume = 10.0D; - } - ElectricItem.manager.use(stack, consume, player); - player.fallDistance = 0.0F; - player.distanceWalkedModified = 0.0F; - IC2.platform.resetPlayerInAirTime(player); - return true; - } - - void useWings(EntityPlayer player, ItemStack stack, World world, float motionY, float motionXZ, float f1, int amount, boolean isElectric) { - NBTTagCompound nbt = StackUtil.getOrCreateNbtData(stack); - boolean isJumping = IC2.keyboard.isJumpKeyDown(player); - nbt.setBoolean("isJumping", isJumping); - - if (isJumping) { - byte f = nbt.getByte("f"); - - nbt.setBoolean("isHolding", true); - nbt.setByte("f", (byte) (f + 1)); - - if (f > 7) { - nbt.setByte("f", (byte) 7); - } - } - else if (nbt.getBoolean("isHolding")) { - byte f = nbt.getByte("f"); - nbt.setBoolean("isHolding", false); - player.motionY = motionY * f; - - if (isElectric) { - ElectricItem.manager.use(stack, ((motionY * f) * 10) * amount, player); - } - - if (player.motionX < 0.5 && player.motionZ < 0.5 && player.motionX > -0.5 && player.motionZ > -0.5) { - player.motionX /= motionXZ; - player.motionZ /= motionXZ; - } - - world.playSoundEffect(player.posX, player.posY, player.posZ, "mob.ghast.fireball", 1, 1); - - for (int i = 0; i < 4; i++) { - world.spawnParticle("cloud", player.posX - 1 + (world.rand.nextInt(100) / 50d), player.posY - 1, player.posZ - 1 + (world.rand.nextInt(100) / 50d), 0, -0.5, 0); - } - - nbt.setByte("f", (byte) 0); - } - - if (isJumping && !player.onGround && player.motionY < 0) { - player.motionY *= f1; - } - - if (player.isInWater() && !player.capabilities.isCreativeMode) { - player.motionY += -0.05; - } - - if (EMTConfigHandler.impactOfRain) { - int playerX = MathHelper.floor_double(player.posX); - int playerY = MathHelper.floor_double(player.posY); - int playerZ = MathHelper.floor_double(player.posZ); - - if ((world.getBiomeGenForCoords(playerX, playerZ)).canSpawnLightningBolt() && world.canBlockSeeTheSky(playerX, playerY, playerZ) && world.isRaining() && !player.capabilities.isCreativeMode) { - player.motionY += -0.05; - } - } - - if (player.isSneaking() && !player.onGround && player.motionY < 0) { - player.motionY *= 0.6; - } - - if (player.fallDistance > 0.0F) { - player.fallDistance = 0; - } - } - - @Override - public int getRunicCharge(ItemStack itemStack) { - return 0; - } + public static AudioSource audioSource; + protected static ArrayList potionRemovalCost = new ArrayList(); + private static boolean lastJetpackUsed = false; + public final byte NONE = 0; + public final byte JETPACK = 1; + public final byte THAUMIUM = 2; + public final byte NANO = 3; + public final byte QUANTUM = 4; + private IIcon iconNONE; + private IIcon iconJETPACK; + private IIcon iconTHAUMIUM; + private IIcon iconNANO; + private IIcon iconQUANTUM; + + public ItemInfusedQuantumChestplate(InternalName internalName, int armorType) { + super(internalName, InternalName.quantum, armorType, 20000000D, 18000.0D, 4); + MinecraftForge.EVENT_BUS.register(this); + this.setCreativeTab(EMT.TAB); + } + + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + iconNONE = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest"); + iconJETPACK = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_jetpack"); + iconTHAUMIUM = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_wing_t"); + iconNANO = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_wing_n"); + iconQUANTUM = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_wing_q"); + } + + @Override + public String getUnlocalizedName(ItemStack itemstack) { + return "item." + EMT.MOD_ID + ".chestplates.infusedQuantum"; + } + + public String getItemStackDisplayName(ItemStack stack) { + return (StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack) + ".name")).trim(); + } + + @SubscribeEvent + public void onEntityLivingFallEvent(LivingFallEvent event) { + if (IC2.platform.isSimulating() && (event.entity instanceof EntityLivingBase)) { + EntityLivingBase entity = (EntityLivingBase) event.entity; + ItemStack armor = entity.getEquipmentInSlot(1); + + if ((armor != null) && (armor.getItem() == this)) { + int fallDamage = Math.max((int) event.distance - 10, 0); + double energyCost = getEnergyPerDamage() * fallDamage; + + if (energyCost <= ElectricItem.manager.getCharge(armor)) { + ElectricItem.manager.discharge(armor, energyCost, Integer.MAX_VALUE, true, false, false); + event.setCanceled(true); + } + } + } + } + + @Override + public double getDamageAbsorptionRatio() { + return 1.1D; + } + + @Override + public int getEnergyPerDamage() { + return 20000; + } + + @SideOnly(Side.CLIENT) + @Override + public EnumRarity getRarity(ItemStack stack) { + return EnumRarity.rare; + } + + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { + NBTTagCompound nbt = StackUtil.getOrCreateNbtData(itemStack); + + byte toggleTimer = nbt.getByte("toggleTimer"); + boolean ret = false; + boolean hoverMode = nbt.getBoolean("hoverMode"); + boolean jetpackUsed = false; + byte wing = nbt.getByte("wing"); + + if (!world.isRemote) { + + for (PotionEffect effect : (Collection) player.getActivePotionEffects()) { + if (potionRemovalCost.contains(effect.getPotionID())) { + IC2.platform.removePotion(player, effect.getPotionID()); + } + } + + ItemStack currentStack = player.inventory.getCurrentItem(); + Item currentItem = currentStack == null ? null : currentStack.getItem(); + + if (nbt.hasKey("useother")) { + String useother = nbt.getString("useother"); + if (useother.equals("Jetpack")) { + nbt.setByte("wing", JETPACK); + } + if (useother.equals("TW")) { + nbt.setByte("wing", THAUMIUM); + } + if (useother.equals("NW")) { + nbt.setByte("wing", NANO); + } + if (useother.equals("QW")) { + nbt.setByte("wing", QUANTUM); + } + wing = nbt.getByte("wing"); + nbt.removeTag("useother"); + } + + if (wing == NONE) { + nbt.setByte("wing", NONE); + } + + if (IC2.keyboard.isJumpKeyDown(player) && IC2.keyboard.isModeSwitchKeyDown(player) && toggleTimer == 0) { + toggleTimer = 30; + hoverMode = !hoverMode; + if (IC2.platform.isSimulating()) { + nbt.setBoolean("hoverMode", hoverMode); + if (hoverMode) { + IC2.platform.messagePlayer(player, "Hover Mode enabled.", new Object[0]); + } else { + IC2.platform.messagePlayer(player, "Hover Mode disabled.", new Object[0]); + } + } + } + + if (currentStack != null && player.isSneaking() && toggleTimer == 0 && wing == NONE) { + if (currentItem == IC2Items.getItem("electricJetpack").getItem()) { + IC2.platform.messagePlayer(player, "Jetpack enabled.", new Object[0]); + nbt.setByte("wing", JETPACK); + //int charge = (int) ElectricItem.manager.getCharge(itemStack); + //if (ElectricItem.manager.getCharge(player.inventory.getCurrentItem()) < 30000) { + // ElectricItem.manager.use(itemStack, 30000 - ElectricItem.manager.getCharge(currentStack), player); + //} + nbt.setInteger("jetpackCharge", (int) (ElectricItem.manager.getCharge(currentStack)/* + charge - (int) ElectricItem.manager.getCharge(itemStack))*/)); + player.inventory.setInventorySlotContents(player.inventory.currentItem, null); + } else if (currentItem == EMTItems.thaumiumWing) { + IC2.platform.messagePlayer(player, "Thaumium wings enabled.", new Object[0]); + nbt.setByte("wing", THAUMIUM); + player.inventory.setInventorySlotContents(player.inventory.currentItem, null); + } else if (currentItem == EMTItems.nanoWing) { + IC2.platform.messagePlayer(player, "Nano wings enabled.", new Object[0]); + nbt.setByte("wing", NANO); + //int charge = (int) ElectricItem.manager.getCharge(itemStack); + //if (ElectricItem.manager.getCharge(currentStack) < ItemNanoWing.maxCharge) { + // ElectricItem.manager.use(itemStack, ItemNanoWing.maxCharge - ElectricItem.manager.getCharge(currentStack), player); + //} + nbt.setInteger("NWCharge", (int) (ElectricItem.manager.getCharge(player.inventory.getCurrentItem())/* + charge - (int) ElectricItem.manager.getCharge(itemStack)*/)); + player.inventory.setInventorySlotContents(player.inventory.currentItem, null); + } else if (currentItem == EMTItems.quantumWing) { + IC2.platform.messagePlayer(player, "Quantum wings enabled.", new Object[0]); + nbt.setByte("wing", QUANTUM); + //int charge = (int) ElectricItem.manager.getCharge(itemStack); + //if (ElectricItem.manager.getCharge(currentStack) < ItemQuantumWing.maxCharge) { + // ElectricItem.manager.use(itemStack, ItemQuantumWing.maxCharge - ElectricItem.manager.getCharge(currentStack), player); + //} + nbt.setInteger("QWCharge", (int) (ElectricItem.manager.getCharge(currentStack)/* + charge - (int) ElectricItem.manager.getCharge(itemStack)*/)); + player.inventory.setInventorySlotContents(player.inventory.currentItem, null); + } + } + + if (currentStack == null && nbt.getBoolean("unequip") && player.isSneaking()) { + toggleTimer = 30; + + if (wing == JETPACK) { + IC2.platform.messagePlayer(player, "Jetpack disabled.", new Object[0]); + nbt.setByte("wing", NONE); + ItemStack charged = new ItemStack(IC2Items.getItem("electricJetpack").getItem()); + if (nbt.getInteger("jetpackCharge") > 0) + ElectricItem.manager.charge(charged, nbt.getInteger("jetpackCharge"), 1, true, false); + else + ElectricItem.manager.charge(charged, 0, 1, true, false); + player.inventory.setInventorySlotContents(player.inventory.currentItem, charged); + } + + if (wing == THAUMIUM) { + IC2.platform.messagePlayer(player, "Thaumium wings disabled.", new Object[0]); + nbt.setByte("wing", NONE); + player.inventory.setInventorySlotContents(player.inventory.currentItem, new ItemStack(EMTItems.thaumiumWing)); + } + + if (wing == NANO) { + IC2.platform.messagePlayer(player, "Nano wings disabled.", new Object[0]); + nbt.setByte("wing", NONE); + ItemStack charged = new ItemStack(EMTItems.nanoWing); + if (nbt.getInteger("NWCharge") > 0) + ElectricItem.manager.charge(charged, nbt.getInteger("NWCharge"), 3, true, false); + else + ElectricItem.manager.charge(charged, 0, 3, true, false); + player.inventory.setInventorySlotContents(player.inventory.currentItem, charged); + } + + if (wing == QUANTUM) { + IC2.platform.messagePlayer(player, "Quantum wings disabled.", new Object[0]); + nbt.setByte("wing", NONE); + ItemStack charged = new ItemStack(EMTItems.quantumWing); + if (nbt.getInteger("QWCharge") > 0) + ElectricItem.manager.charge(charged, nbt.getInteger("QWCharge"), 3, true, false); + else + ElectricItem.manager.charge(charged, 0, 3, true, false); + player.inventory.setInventorySlotContents(player.inventory.currentItem, charged); + } + } + + nbt.setBoolean("unequip", false); + } + + if ((IC2.keyboard.isJumpKeyDown(player) && wing == JETPACK) || (hoverMode && player.motionY < -0.029999999329447746D)) { + jetpackUsed = useJetpack(player, hoverMode, itemStack); + } + + if (wing == THAUMIUM) + useWings(player, itemStack, world, 0.15f, 0.7f, 0.5f, 0, false); + if (wing == NANO) + useWings(player, itemStack, world, 0.25f, 0.6f, 0.3f, 5, true); + if (wing == QUANTUM) + useWings(player, itemStack, world, 0.33f, 0.5f, 0.2f, 7, true); + + if (IC2.platform.isSimulating() && toggleTimer > 0) { + toggleTimer = (byte) (toggleTimer - 1); + nbt.setByte("toggleTimer", toggleTimer); + } + if (IC2.platform.isRendering() && player == IC2.platform.getPlayerInstance()) { + if (lastJetpackUsed != jetpackUsed) { + if (jetpackUsed) { + if (audioSource == null) { + audioSource = IC2.audioManager.createSource(player, PositionSpec.Backpack, "Tools/Jetpack/JetpackLoop.ogg", true, false, IC2.audioManager.getDefaultVolume()); + } + if (audioSource != null) { + audioSource.play(); + } + } else if (audioSource != null) { + audioSource.remove(); + audioSource = null; + } + lastJetpackUsed = jetpackUsed; + } + if (audioSource != null) { + audioSource.updatePosition(); + } + } + + ret = jetpackUsed; + + player.extinguish(); + + if (ret) { + player.inventoryContainer.detectAndSendChanges(); + } + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIconIndex(ItemStack stack) { + try { + byte wing = stack.stackTagCompound.getByte("wing"); + + switch (wing) { + case JETPACK: + return iconJETPACK; + case THAUMIUM: + return iconTHAUMIUM; + case NANO: + return iconNANO; + case QUANTUM: + return iconQUANTUM; + default: + return iconNONE; + } + } catch (Exception e) { + return iconNONE; + } + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { + try { + byte wing = stack.stackTagCompound.getByte("wing"); + + switch (wing) { + case JETPACK: + return iconJETPACK; + case THAUMIUM: + return iconTHAUMIUM; + case NANO: + return iconNANO; + case QUANTUM: + return iconQUANTUM; + default: + return iconNONE; + } + } catch (Exception e) { + return iconNONE; + } + } + + @Override + public int getItemEnchantability() { + if (EMTConfigHandler.enchanting == false) + return 0; + else + return 4; + } + + @Override + @SideOnly(Side.CLIENT) + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + byte wing = stack.stackTagCompound.getByte("wing"); + + switch (wing) { + case JETPACK: + return EMT.TEXTURE_PATH + ":textures/models/quantum_jetpack.png"; + case THAUMIUM: + return EMT.TEXTURE_PATH + ":textures/models/quantum_wings_t.png"; + case NANO: + return EMT.TEXTURE_PATH + ":textures/models/quantum_wings_n.png"; + case QUANTUM: + return EMT.TEXTURE_PATH + ":textures/models/quantum_wings_q.png"; + default: + return EMT.TEXTURE_PATH + ":textures/models/quantum.png"; + } + } + + @Override + public int getTier(ItemStack itemStack) { + return 4; + } + + @Override + @SideOnly(Side.CLIENT) + public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) { + try { + if (entity instanceof EntityPlayer) { + byte wing = stack.stackTagCompound.getByte("wing"); + if (wing == JETPACK) { + ModelSpecialArmor mbm = new ModelSpecialArmor(1, 1); + return mbm; + } else if (wing != 0) { + ModelSpecialArmor mbm = new ModelSpecialArmor(1, 2); + mbm.isJumping = stack.stackTagCompound.getBoolean("isJumping"); + return mbm; + } + } + } catch (NullPointerException e) { + new ModelSpecialArmor(1, 0); + } + return new ModelSpecialArmor(1, 0); + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { + try { + list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + tier); + } catch (NullPointerException e) { + } + } + + public boolean useJetpack(EntityPlayer player, boolean hoverMode, ItemStack stack) { + int jetpackMaxCharge = 30000; + float power = 1.0F; + float dropPercentage = 0.05F; + + if (ElectricItem.manager.getCharge(stack) <= 0) { + return false; + } + + if (((float) ElectricItem.manager.getCharge(stack) / (float) jetpackMaxCharge) <= dropPercentage) { + power = (float) (power * (ElectricItem.manager.getCharge(stack) / (float) jetpackMaxCharge) * dropPercentage); + } + + if (IC2.keyboard.isForwardKeyDown(player)) { + float retruster = 3.5F; + + if (hoverMode) { + retruster = 0.5F; + } + + float forwardpower = power * retruster * 2.0F; + + if (forwardpower > 0.0F) { + player.moveFlying(0.0F, 0.4F * forwardpower, 0.02F); + } + } + + int worldHeight = IC2.getWorldHeight(player.worldObj); + + double y = player.posY; + + if (y > worldHeight - 25) { + if (y > worldHeight) { + y = worldHeight; + } + power = (float) (power * ((worldHeight - y) / 25.0D)); + } + + double prevmotion = player.motionY; + player.motionY = Math.min(player.motionY + power * 0.2F, 0.6000000238418579D); + + if (hoverMode) { + float maxHoverY = -0.025F; + if (IC2.keyboard.isSneakKeyDown(player)) { + maxHoverY = -0.1F; + } + if (IC2.keyboard.isJumpKeyDown(player)) { + maxHoverY = 0.1F; + } + if (player.motionY > maxHoverY) { + player.motionY = maxHoverY; + if (prevmotion > player.motionY) { + player.motionY = prevmotion; + } + } + } + double consume = 8.0D; + if (hoverMode) { + consume = 10.0D; + } + ElectricItem.manager.use(stack, consume, player); + player.fallDistance = 0.0F; + player.distanceWalkedModified = 0.0F; + IC2.platform.resetPlayerInAirTime(player); + return true; + } + + void useWings(EntityPlayer player, ItemStack stack, World world, float motionY, float motionXZ, float f1, int amount, boolean isElectric) { + NBTTagCompound nbt = StackUtil.getOrCreateNbtData(stack); + boolean isJumping = IC2.keyboard.isJumpKeyDown(player); + nbt.setBoolean("isJumping", isJumping); + + if (isJumping) { + byte f = nbt.getByte("f"); + + nbt.setBoolean("isHolding", true); + nbt.setByte("f", (byte) (f + 1)); + + if (f > 7) { + nbt.setByte("f", (byte) 7); + } + } else if (nbt.getBoolean("isHolding")) { + byte f = nbt.getByte("f"); + nbt.setBoolean("isHolding", false); + player.motionY = motionY * f; + + if (isElectric) { + ElectricItem.manager.use(stack, ((motionY * f) * 10) * amount, player); + } + + if (player.motionX < 0.5 && player.motionZ < 0.5 && player.motionX > -0.5 && player.motionZ > -0.5) { + player.motionX /= motionXZ; + player.motionZ /= motionXZ; + } + + world.playSoundEffect(player.posX, player.posY, player.posZ, "mob.ghast.fireball", 1, 1); + + for (int i = 0; i < 4; i++) { + world.spawnParticle("cloud", player.posX - 1 + (world.rand.nextInt(100) / 50d), player.posY - 1, player.posZ - 1 + (world.rand.nextInt(100) / 50d), 0, -0.5, 0); + } + + nbt.setByte("f", (byte) 0); + } + + if (isJumping && !player.onGround && player.motionY < 0) { + player.motionY *= f1; + } + + if (player.isInWater() && !player.capabilities.isCreativeMode) { + player.motionY += -0.05; + } + + if (EMTConfigHandler.impactOfRain) { + int playerX = MathHelper.floor_double(player.posX); + int playerY = MathHelper.floor_double(player.posY); + int playerZ = MathHelper.floor_double(player.posZ); + + if ((world.getBiomeGenForCoords(playerX, playerZ)).canSpawnLightningBolt() && world.canBlockSeeTheSky(playerX, playerY, playerZ) && world.isRaining() && !player.capabilities.isCreativeMode) { + player.motionY += -0.05; + } + } + + if (player.isSneaking() && !player.onGround && player.motionY < 0) { + player.motionY *= 0.6; + } + + if (player.fallDistance > 0.0F) { + player.fallDistance = 0; + } + } + + @Override + public int getRunicCharge(ItemStack itemStack) { + return 0; + } } \ No newline at end of file diff --git a/src/main/java/emt/item/armor/goggles/ItemElectricGoggles.java b/src/main/java/emt/item/armor/goggles/ItemElectricGoggles.java index bdd043d..1fb4422 100644 --- a/src/main/java/emt/item/armor/goggles/ItemElectricGoggles.java +++ b/src/main/java/emt/item/armor/goggles/ItemElectricGoggles.java @@ -29,170 +29,166 @@ import java.util.List; public class ItemElectricGoggles extends ItemArmor implements IRunicArmor, IElectricItem, IVisDiscountGear, IGoggles, IRevealer, IMetalArmor, ISpecialArmor { - public double maxCharge = 100000; - public double transferLimit = 100; - public int tier = 2; - public int energyPerDamage = 1000; - public int visDiscount = 5; + public double maxCharge = 100000; + public double transferLimit = 100; + public int tier = 2; + public int energyPerDamage = 1000; + public int visDiscount = 5; - public ItemElectricGoggles(ArmorMaterial material, int par3, int par4) { - super(material, par3, par4); - this.setCreativeTab(EMT.TAB); - } + public ItemElectricGoggles(ArmorMaterial material, int par3, int par4) { + super(material, par3, par4); + this.setCreativeTab(EMT.TAB); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_electric"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_electric"); + } - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return EMT.TEXTURE_PATH + ":textures/models/electricgoggles.png"; - } + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return EMT.TEXTURE_PATH + ":textures/models/electricgoggles.png"; + } - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { - } + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { + } - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { - ItemStack itemStack = new ItemStack(this, 1); - if (getChargedItem(itemStack) == this) { - ItemStack charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); - itemList.add(charged); - } - if (getEmptyItem(itemStack) == this) { - itemList.add(new ItemStack(this, 1, getMaxDamage())); - } - } + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + if (getChargedItem(itemStack) == this) { + ItemStack charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); + itemList.add(charged); + } + if (getEmptyItem(itemStack) == this) { + itemList.add(new ItemStack(this, 1, getMaxDamage())); + } + } - @Override - public boolean isRepairable() { - return false; - } + @Override + public boolean isRepairable() { + return false; + } - @Override - public int getItemEnchantability() { - if (EMTConfigHandler.enchanting == false) { - return 0; - } - else { - return 4; - } - } + @Override + public int getItemEnchantability() { + if (EMTConfigHandler.enchanting == false) { + return 0; + } else { + return 4; + } + } - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - if (EMTConfigHandler.enchanting == false) { - return false; - } - else { - return true; - } - } + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + if (EMTConfigHandler.enchanting == false) { + return false; + } else { + return true; + } + } - @Override - public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { - return visDiscount; - } + @Override + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { + return visDiscount; + } - @Override - public boolean showNodes(ItemStack itemstack, EntityLivingBase player) { - return true; - } + @Override + public boolean showNodes(ItemStack itemstack, EntityLivingBase player) { + return true; + } - @Override - public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) { - return true; - } + @Override + public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) { + return true; + } - @Override - public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) { - return true; - } + @Override + public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) { + return true; + } - @Override - public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { - if (source.isUnblockable()) { - return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 0); - } - else { - double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio(); - int energyPerDamage = getEnergyPerDamage(); - double damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; - return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, (int) damageLimit); - } - } + @Override + public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { + if (source.isUnblockable()) { + return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 0); + } else { + double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio(); + int energyPerDamage = getEnergyPerDamage(); + double damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; + return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, (int) damageLimit); + } + } - @Override - public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { - if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) { - return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio()); - } - else { - return 0; - } - } + @Override + public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { + if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) { + return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio()); + } else { + return 0; + } + } - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { - list.add(EMTTextHelper.localize("tooltip.EMT.visDiscount") + ": " + String.valueOf(visDiscount) + "%"); - } + @SuppressWarnings({"unchecked", "rawtypes"}) + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add(EMTTextHelper.localize("tooltip.EMT.visDiscount") + ": " + String.valueOf(visDiscount) + "%"); + } - @Override - public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { - ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false); - } + @Override + public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { + ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false); + } - public double getDamageAbsorptionRatio() { - return 0.5D; - } + public double getDamageAbsorptionRatio() { + return 0.5D; + } - public int getEnergyPerDamage() { - return energyPerDamage; - } + public int getEnergyPerDamage() { + return energyPerDamage; + } - private double getBaseAbsorptionRatio() { - return 0.15D; - } + private double getBaseAbsorptionRatio() { + return 0.15D; + } - /* IC2 API METHODS */ + /* IC2 API METHODS */ - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public double getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public double getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTier(ItemStack itemStack) { - return 2; - } + @Override + public int getTier(ItemStack itemStack) { + return 2; + } - @Override - public double getTransferLimit(ItemStack itemStack) { - return transferLimit; - } + @Override + public double getTransferLimit(ItemStack itemStack) { + return transferLimit; + } - @Override - public Item getChargedItem(ItemStack itemStack) { - return this; - } + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } - @Override - public Item getEmptyItem(ItemStack itemStack) { - return this; - } + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } - @Override - public int getRunicCharge(ItemStack itemStack) { - return 0; - } + @Override + public int getRunicCharge(ItemStack itemStack) { + return 0; + } } diff --git a/src/main/java/emt/item/armor/goggles/ItemNanoGoggles.java b/src/main/java/emt/item/armor/goggles/ItemNanoGoggles.java index 8566db8..bf8f37d 100644 --- a/src/main/java/emt/item/armor/goggles/ItemNanoGoggles.java +++ b/src/main/java/emt/item/armor/goggles/ItemNanoGoggles.java @@ -12,41 +12,41 @@ import net.minecraft.world.World; public class ItemNanoGoggles extends ItemElectricGoggles { - public ItemNanoGoggles(ArmorMaterial material, int renderIndex, int armorType) { - super(material, renderIndex, armorType); - this.setCreativeTab(EMT.TAB); - this.setMaxDamage(27); - this.setMaxStackSize(1); - visDiscount = 6; - tier = 3; - maxCharge = 1000000; - energyPerDamage = 5000; - transferLimit = 1600; - } + public ItemNanoGoggles(ArmorMaterial material, int renderIndex, int armorType) { + super(material, renderIndex, armorType); + this.setCreativeTab(EMT.TAB); + this.setMaxDamage(27); + this.setMaxStackSize(1); + visDiscount = 6; + tier = 3; + maxCharge = 1000000; + energyPerDamage = 5000; + transferLimit = 1600; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_nano"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_nano"); + } - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return EMT.TEXTURE_PATH + ":textures/models/thaumicnanohelmet.png"; - } + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return EMT.TEXTURE_PATH + ":textures/models/thaumicnanohelmet.png"; + } - @Override - public double getDamageAbsorptionRatio() { - return 0.9D; - } + @Override + public double getDamageAbsorptionRatio() { + return 0.9D; + } - @Override - public int getTier(ItemStack itemStack) { - return 3; - } + @Override + public int getTier(ItemStack itemStack) { + return 3; + } - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { - IC2Items.getItem("nightvisionGoggles").getItem().onArmorTick(world, player, itemStack); - } + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { + IC2Items.getItem("nightvisionGoggles").getItem().onArmorTick(world, player, itemStack); + } } diff --git a/src/main/java/emt/item/armor/goggles/ItemQuantumGoggles.java b/src/main/java/emt/item/armor/goggles/ItemQuantumGoggles.java index 590c18e..601cabe 100644 --- a/src/main/java/emt/item/armor/goggles/ItemQuantumGoggles.java +++ b/src/main/java/emt/item/armor/goggles/ItemQuantumGoggles.java @@ -21,79 +21,79 @@ import java.util.Set; public class ItemQuantumGoggles extends ItemNanoGoggles { - private static final Map potionCost = new HashMap(); + private static final Map potionCost = new HashMap(); - public ItemQuantumGoggles(ArmorMaterial material, int renderIndex, int armorType) { - super(material, renderIndex, armorType); - this.setCreativeTab(EMT.TAB); - this.setMaxDamage(27); - this.setMaxStackSize(1); - maxCharge = 10000000; - tier = 4; - visDiscount = 8; - transferLimit = 12000; - energyPerDamage = 20000; + public ItemQuantumGoggles(ArmorMaterial material, int renderIndex, int armorType) { + super(material, renderIndex, armorType); + this.setCreativeTab(EMT.TAB); + this.setMaxDamage(27); + this.setMaxStackSize(1); + maxCharge = 10000000; + tier = 4; + visDiscount = 8; + transferLimit = 12000; + energyPerDamage = 20000; - potionCost.put(Integer.valueOf(Potion.poison.id), Integer.valueOf(10000)); - potionCost.put(Integer.valueOf(Potion.wither.id), Integer.valueOf(15000)); - potionCost.put(Integer.valueOf(Potion.confusion.id), Integer.valueOf(5000)); - } + potionCost.put(Integer.valueOf(Potion.poison.id), Integer.valueOf(10000)); + potionCost.put(Integer.valueOf(Potion.wither.id), Integer.valueOf(15000)); + potionCost.put(Integer.valueOf(Potion.confusion.id), Integer.valueOf(5000)); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_quantum"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_quantum"); + } - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return EMT.TEXTURE_PATH + ":textures/models/thaumicquantumhelmet.png"; - } + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return EMT.TEXTURE_PATH + ":textures/models/thaumicquantumhelmet.png"; + } - @Override - public double getDamageAbsorptionRatio() { - return 1D; - } + @Override + public double getDamageAbsorptionRatio() { + return 1D; + } - @Override - public int getTier(ItemStack itemStack) { - return 4; - } + @Override + public int getTier(ItemStack itemStack) { + return 4; + } - // MUAHAHAHA - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { - try { - Field f; - f = Keyboard.class.getDeclaredField("playerKeys"); - f.setAccessible(true); - Map> playerKeys = (Map>) f.get(IC2.keyboard); + // MUAHAHAHA + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { + try { + Field f; + f = Keyboard.class.getDeclaredField("playerKeys"); + f.setAccessible(true); + Map> playerKeys = (Map>) f.get(IC2.keyboard); - Enum hub = null; - Set set = playerKeys.get(player); - - if (set != null) { - for (Enum e : set) { - if (e.ordinal() == 6) { - hub = e; - } - } - set.remove(hub); - } + Enum hub = null; + Set set = playerKeys.get(player); - IC2Items.getItem("quantumHelmet").getItem().onArmorTick(world, player, itemStack); + if (set != null) { + for (Enum e : set) { + if (e.ordinal() == 6) { + hub = e; + } + } + set.remove(hub); + } - if (hub != null) { - set.add(hub); - } - } catch (NoSuchFieldException e) { - e.printStackTrace(); - } catch (SecurityException e) { - e.printStackTrace(); - } catch (IllegalArgumentException e) { - e.printStackTrace(); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } - } + IC2Items.getItem("quantumHelmet").getItem().onArmorTick(world, player, itemStack); + + if (hub != null) { + set.add(hub); + } + } catch (NoSuchFieldException e) { + e.printStackTrace(); + } catch (SecurityException e) { + e.printStackTrace(); + } catch (IllegalArgumentException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + } } diff --git a/src/main/java/emt/item/armor/goggles/ItemSolarHelmetRevealing.java b/src/main/java/emt/item/armor/goggles/ItemSolarHelmetRevealing.java index e53814c..17a4627 100644 --- a/src/main/java/emt/item/armor/goggles/ItemSolarHelmetRevealing.java +++ b/src/main/java/emt/item/armor/goggles/ItemSolarHelmetRevealing.java @@ -17,89 +17,88 @@ import java.util.Map; public class ItemSolarHelmetRevealing extends ItemQuantumGoggles { - /*private int ticker; - private int generating; - private boolean sunIsUp; - private boolean skyIsVisible; - private boolean noSunWorld; - private boolean dampPlace;*/ - private int genDay; - private int genNight; + private static final Map potionCost = new HashMap(); + /*private int ticker; + private int generating; + private boolean sunIsUp; + private boolean skyIsVisible; + private boolean noSunWorld; + private boolean dampPlace;*/ + private int genDay; + private int genNight; - private static final Map potionCost = new HashMap(); + @SuppressWarnings("unchecked") + public ItemSolarHelmetRevealing(ArmorMaterial material, int par3, int par4) { + super(material, par3, par4); + this.setMaxDamage(27); + this.setMaxStackSize(1); + this.setCreativeTab(EMT.TAB); + // this.maxCharge = 20000000; //REALLY? + this.genDay = 65536; + this.genNight = 4096; + maxCharge = 20000000; + visDiscount = 7; + tier = 4; + transferLimit = 18000; + energyPerDamage = 20000; - @SuppressWarnings("unchecked") - public ItemSolarHelmetRevealing(ArmorMaterial material, int par3, int par4) { - super(material, par3, par4); - this.setMaxDamage(27); - this.setMaxStackSize(1); - this.setCreativeTab(EMT.TAB); - // this.maxCharge = 20000000; //REALLY? - this.genDay = 65536; - this.genNight = 4096; - maxCharge = 20000000; - visDiscount = 7; - tier = 4; - transferLimit = 18000; - energyPerDamage = 20000; + potionCost.put(Integer.valueOf(Potion.poison.id), Integer.valueOf(10000)); + potionCost.put(Integer.valueOf(Potion.wither.id), Integer.valueOf(15000)); + potionCost.put(Integer.valueOf(Potion.confusion.id), Integer.valueOf(5000)); + } - potionCost.put(Integer.valueOf(Potion.poison.id), Integer.valueOf(10000)); - potionCost.put(Integer.valueOf(Potion.wither.id), Integer.valueOf(15000)); - potionCost.put(Integer.valueOf(Potion.confusion.id), Integer.valueOf(5000)); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_solar"); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_solar"); - } + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layerType) { + return EMT.TEXTURE_PATH + ":textures/models/solarrevealinghelmet.png"; + } - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layerType) { - return EMT.TEXTURE_PATH + ":textures/models/solarrevealinghelmet.png"; - } + @Override + public double getDamageAbsorptionRatio() { + return 1D; + } - @Override - public double getDamageAbsorptionRatio() { - return 1D; - } + @Override + public int getTier(ItemStack itemStack) { + return 4; + } - @Override - public int getTier(ItemStack itemStack) { - return 4; - } + @Override + public void onArmorTick(World worldObj, EntityPlayer player, ItemStack itemStack) { + super.onArmorTick(worldObj, player, itemStack); - @Override - public void onArmorTick(World worldObj, EntityPlayer player, ItemStack itemStack) { - super.onArmorTick(worldObj, player, itemStack); + if (worldObj.isRemote) { + return; + } - if (worldObj.isRemote) { - return; - } - - if(worldObj.canBlockSeeTheSky((int)player.posX, (int)player.posY + 1, (int)player.posZ) && !worldObj.isRaining()) { - double enerj = (worldObj.isDaytime() ? (double)genDay : (double) genNight) / 12000D; - - for (int i = 0; i < player.inventory.armorInventory.length; i++) { - if (enerj > 0) { - if ((player.inventory.armorInventory[i] != null) && (player.inventory.armorInventory[i].getItem() instanceof IElectricItem)) { - double sentPacket = ElectricItem.manager.charge(player.inventory.armorInventory[i], enerj ,4, false, false); - enerj -= sentPacket; - } - } else { - return; - } - } - for (int j = 0; j < player.inventory.mainInventory.length; j++) { - if (enerj > 0) { - if ((player.inventory.mainInventory[j] != null) && (player.inventory.mainInventory[j].getItem() instanceof IElectricItem)) { - double sentPacket = ElectricItem.manager.charge(player.inventory.mainInventory[j], enerj, 4, false, false); - enerj -= sentPacket; - } - } else { - return; - } - } - } - } + if (worldObj.canBlockSeeTheSky((int) player.posX, (int) player.posY + 1, (int) player.posZ) && !worldObj.isRaining()) { + double enerj = (worldObj.isDaytime() ? (double) genDay : (double) genNight) / 12000D; + + for (int i = 0; i < player.inventory.armorInventory.length; i++) { + if (enerj > 0) { + if ((player.inventory.armorInventory[i] != null) && (player.inventory.armorInventory[i].getItem() instanceof IElectricItem)) { + double sentPacket = ElectricItem.manager.charge(player.inventory.armorInventory[i], enerj, 4, false, false); + enerj -= sentPacket; + } + } else { + return; + } + } + for (int j = 0; j < player.inventory.mainInventory.length; j++) { + if (enerj > 0) { + if ((player.inventory.mainInventory[j] != null) && (player.inventory.mainInventory[j].getItem() instanceof IElectricItem)) { + double sentPacket = ElectricItem.manager.charge(player.inventory.mainInventory[j], enerj, 4, false, false); + enerj -= sentPacket; + } + } else { + return; + } + } + } + } } diff --git a/src/main/java/emt/item/armor/wings/ItemFeatherWing.java b/src/main/java/emt/item/armor/wings/ItemFeatherWing.java index 60bf82a..9089468 100644 --- a/src/main/java/emt/item/armor/wings/ItemFeatherWing.java +++ b/src/main/java/emt/item/armor/wings/ItemFeatherWing.java @@ -1,13 +1,13 @@ package emt.item.armor.wings; -import ic2.api.item.ElectricItem; -import ic2.core.IC2; -import ic2.core.util.StackUtil; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import emt.EMT; import emt.client.model.ModelWings; import emt.util.EMTConfigHandler; +import ic2.api.item.ElectricItem; +import ic2.core.IC2; +import ic2.core.util.StackUtil; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; @@ -20,104 +20,103 @@ import net.minecraft.world.World; import thaumcraft.api.IRunicArmor; public class ItemFeatherWing extends ItemArmor implements IRunicArmor { - public int visDiscount = 0; + public int visDiscount = 0; - public ItemFeatherWing(ArmorMaterial material, int par3, int par4) { - super(material, par3, par4); - this.setMaxStackSize(1); - this.setMaxDamage(120); - this.setCreativeTab(EMT.TAB); - this.isDamageable(); - } + public ItemFeatherWing(ArmorMaterial material, int par3, int par4) { + super(material, par3, par4); + this.setMaxStackSize(1); + this.setMaxDamage(120); + this.setCreativeTab(EMT.TAB); + this.isDamageable(); + } - public float getFallDamageMult() { - return 0.75F; - } - - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/wing_feather"); - } + public float getFallDamageMult() { + return 0.75F; + } - @Override - @SideOnly(Side.CLIENT) - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return EMT.TEXTURE_PATH + ":textures/models/featherwing.png"; - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/wing_feather"); + } - @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) { - try { - if (entity instanceof EntityPlayer) { - ModelWings mw = new ModelWings(); - mw.isJumping = stack.stackTagCompound.getBoolean("isJumping"); - return mw; - } - } catch (NullPointerException e) { - return new ModelWings(); - } - return new ModelWings(); - } + @Override + @SideOnly(Side.CLIENT) + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return EMT.TEXTURE_PATH + ":textures/models/featherwing.png"; + } - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { - useWings(player, stack, world, 0.11f, 0.9f, 0.9f, 0); - } + @Override + @SideOnly(Side.CLIENT) + public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) { + try { + if (entity instanceof EntityPlayer) { + ModelWings mw = new ModelWings(); + mw.isJumping = stack.stackTagCompound.getBoolean("isJumping"); + return mw; + } + } catch (NullPointerException e) { + return new ModelWings(); + } + return new ModelWings(); + } - public void useWings(EntityPlayer player, ItemStack stack, World world, float motionY, float motionXZ, float f1, int amount) { - NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack); - - boolean isJmuping = nbtData.getBoolean("isJumping"); - boolean isHolding = nbtData.getBoolean("isHolding"); + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { + useWings(player, stack, world, 0.11f, 0.9f, 0.9f, 0); + } - nbtData.setBoolean("isJumping", IC2.keyboard.isJumpKeyDown(player)); + public void useWings(EntityPlayer player, ItemStack stack, World world, float motionY, float motionXZ, float f1, int amount) { + NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack); - if (isJmuping) { - byte f = nbtData.getByte("f"); - nbtData.setBoolean("isHolding", true); - nbtData.setByte("f", (byte) (f + 1)); - if (f > 7) - nbtData.setByte("f", (byte) 7); - } - else if (isHolding) { - byte f = nbtData.getByte("f"); - nbtData.setBoolean("isHolding", false); - player.motionY = motionY * f; - ElectricItem.manager.use(stack, ((motionY * f) * 10) * amount, player); - if (player.motionX < 0.5 && player.motionZ < 0.5 && player.motionX > -0.5 && player.motionZ > -0.5) { - player.motionX /= motionXZ; - player.motionZ /= motionXZ; - } - world.playSoundEffect(player.posX, player.posY, player.posZ, "mob.ghast.fireball", 1, 1); - for (int i = 0; i < 4; i++) { - world.spawnParticle("cloud", player.posX - 1 + (world.rand.nextInt(100) / 50d), player.posY - 1, player.posZ - 1 + (world.rand.nextInt(100) / 50d), 0, -0.5, 0); - } - nbtData.setByte("f", (byte) 0); - } + boolean isJmuping = nbtData.getBoolean("isJumping"); + boolean isHolding = nbtData.getBoolean("isHolding"); - if (isJmuping && !player.onGround && player.motionY < 0) { - player.motionY *= f1; - } + nbtData.setBoolean("isJumping", IC2.keyboard.isJumpKeyDown(player)); - if (player.isInWater() && !player.capabilities.isCreativeMode) { - player.motionY += -0.03; - } + if (isJmuping) { + byte f = nbtData.getByte("f"); + nbtData.setBoolean("isHolding", true); + nbtData.setByte("f", (byte) (f + 1)); + if (f > 7) + nbtData.setByte("f", (byte) 7); + } else if (isHolding) { + byte f = nbtData.getByte("f"); + nbtData.setBoolean("isHolding", false); + player.motionY = motionY * f; + ElectricItem.manager.use(stack, ((motionY * f) * 10) * amount, player); + if (player.motionX < 0.5 && player.motionZ < 0.5 && player.motionX > -0.5 && player.motionZ > -0.5) { + player.motionX /= motionXZ; + player.motionZ /= motionXZ; + } + world.playSoundEffect(player.posX, player.posY, player.posZ, "mob.ghast.fireball", 1, 1); + for (int i = 0; i < 4; i++) { + world.spawnParticle("cloud", player.posX - 1 + (world.rand.nextInt(100) / 50d), player.posY - 1, player.posZ - 1 + (world.rand.nextInt(100) / 50d), 0, -0.5, 0); + } + nbtData.setByte("f", (byte) 0); + } - if (EMTConfigHandler.impactOfRain) { - if ((world.getBiomeGenForCoords((int) player.posX, (int) player.posZ)).canSpawnLightningBolt() && world.canBlockSeeTheSky((int) player.posX, (int) player.posY, (int) player.posZ) && world.isRaining() && !player.capabilities.isCreativeMode) { - player.motionY += -0.03; - } - } + if (isJmuping && !player.onGround && player.motionY < 0) { + player.motionY *= f1; + } - if (player.isSneaking() && !player.onGround && player.motionY < 0) { - player.motionY *= 0.6; - } - } + if (player.isInWater() && !player.capabilities.isCreativeMode) { + player.motionY += -0.03; + } - @Override - public int getRunicCharge(ItemStack itemStack) { - return 0; - } + if (EMTConfigHandler.impactOfRain) { + if ((world.getBiomeGenForCoords((int) player.posX, (int) player.posZ)).canSpawnLightningBolt() && world.canBlockSeeTheSky((int) player.posX, (int) player.posY, (int) player.posZ) && world.isRaining() && !player.capabilities.isCreativeMode) { + player.motionY += -0.03; + } + } + + if (player.isSneaking() && !player.onGround && player.motionY < 0) { + player.motionY *= 0.6; + } + } + + @Override + public int getRunicCharge(ItemStack itemStack) { + return 0; + } } diff --git a/src/main/java/emt/item/armor/wings/ItemNanoWing.java b/src/main/java/emt/item/armor/wings/ItemNanoWing.java index 0773e3f..78802a7 100644 --- a/src/main/java/emt/item/armor/wings/ItemNanoWing.java +++ b/src/main/java/emt/item/armor/wings/ItemNanoWing.java @@ -22,153 +22,149 @@ import java.util.List; public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectricItem, ISpecialArmor, IMetalArmor { - public static int maxCharge = 1000000; - public int tier = 3; - public double transferLimit = 1600; - public int energyPerDamage = 5000; + public static int maxCharge = 1000000; + public int tier = 3; + public double transferLimit = 1600; + public int energyPerDamage = 5000; - public ItemNanoWing(ArmorMaterial material, int par3, int par4) { - super(material, par3, par4); - this.setMaxStackSize(1); - this.setMaxDamage(27); - this.setCreativeTab(EMT.TAB); - visDiscount = 5; - } - - @Override - public float getFallDamageMult() { - return 0.2F; - } + public ItemNanoWing(ArmorMaterial material, int par3, int par4) { + super(material, par3, par4); + this.setMaxStackSize(1); + this.setMaxDamage(27); + this.setCreativeTab(EMT.TAB); + visDiscount = 5; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/wing_nano"); - } + @Override + public float getFallDamageMult() { + return 0.2F; + } - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { - ItemStack itemStack = new ItemStack(this, 1); - if (getChargedItem(itemStack) == this) { - ItemStack charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); - itemList.add(charged); - } - if (getEmptyItem(itemStack) == this) { - itemList.add(new ItemStack(this, 1, getMaxDamage())); - } - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/wing_nano"); + } - @Override - @SideOnly(Side.CLIENT) - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return EMT.TEXTURE_PATH + ":textures/models/nanowing.png"; - } + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + if (getChargedItem(itemStack) == this) { + ItemStack charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); + itemList.add(charged); + } + if (getEmptyItem(itemStack) == this) { + itemList.add(new ItemStack(this, 1, getMaxDamage())); + } + } - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { - this.useWings(player, stack, world, 0.25f, 0.6f, 0.3f, 5); - } + @Override + @SideOnly(Side.CLIENT) + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return EMT.TEXTURE_PATH + ":textures/models/nanowing.png"; + } - @Override - public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) { - return true; - } + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { + this.useWings(player, stack, world, 0.25f, 0.6f, 0.3f, 5); + } - @Override - public boolean isRepairable() { - return false; - } + @Override + public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) { + return true; + } - @Override - public int getItemEnchantability() { - if (EMTConfigHandler.enchanting == false) { - return 0; - } - else { - return 4; - } - } + @Override + public boolean isRepairable() { + return false; + } - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - if (EMTConfigHandler.enchanting == false) { - return false; - } - else { - return true; - } - } + @Override + public int getItemEnchantability() { + if (EMTConfigHandler.enchanting == false) { + return 0; + } else { + return 4; + } + } - public int getEnergyPerDamage() { - return energyPerDamage; - } + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + if (EMTConfigHandler.enchanting == false) { + return false; + } else { + return true; + } + } - @Override - public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { - if (source.isUnblockable()) { - return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 3); - } - else { - double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio(); - int energyPerDamage = getEnergyPerDamage(); - double damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; - return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(3, absorptionRatio, (int) damageLimit); - } - } + public int getEnergyPerDamage() { + return energyPerDamage; + } - @Override - public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { - if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) { - return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio()); - } - else { - return 0; - } - } + @Override + public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { + if (source.isUnblockable()) { + return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 3); + } else { + double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio(); + int energyPerDamage = getEnergyPerDamage(); + double damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; + return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(3, absorptionRatio, (int) damageLimit); + } + } - @Override - public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { - ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false); - } + @Override + public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { + if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) { + return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio()); + } else { + return 0; + } + } - public double getDamageAbsorptionRatio() { - return 0.9D; - } + @Override + public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { + ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false); + } - private double getBaseAbsorptionRatio() { - return 0.25D; - } + public double getDamageAbsorptionRatio() { + return 0.9D; + } - /* IC2 API METHODS */ + private double getBaseAbsorptionRatio() { + return 0.25D; + } - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + /* IC2 API METHODS */ - @Override - public double getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public int getTier(ItemStack itemStack) { - return 3; - } + @Override + public double getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public double getTransferLimit(ItemStack itemStack) { - return transferLimit; - } + @Override + public int getTier(ItemStack itemStack) { + return 3; + } - @Override - public Item getChargedItem(ItemStack itemStack) { - return this; - } + @Override + public double getTransferLimit(ItemStack itemStack) { + return transferLimit; + } - @Override - public Item getEmptyItem(ItemStack itemStack) { - return this; - } + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } + + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } } diff --git a/src/main/java/emt/item/armor/wings/ItemQuantumWing.java b/src/main/java/emt/item/armor/wings/ItemQuantumWing.java index c0b22fe..7429496 100644 --- a/src/main/java/emt/item/armor/wings/ItemQuantumWing.java +++ b/src/main/java/emt/item/armor/wings/ItemQuantumWing.java @@ -10,7 +10,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; public class ItemQuantumWing extends ItemNanoWing { - public static int maxCharge = 10000000; + public static int maxCharge = 10000000; public int tier = 4; public ItemQuantumWing(ArmorMaterial material, int par3, int par4) { @@ -22,10 +22,10 @@ public class ItemQuantumWing extends ItemNanoWing { transferLimit = 12000; energyPerDamage = 20000; } - + @Override public float getFallDamageMult() { - return 0.0F; + return 0.0F; } @SideOnly(Side.CLIENT) @@ -42,9 +42,9 @@ public class ItemQuantumWing extends ItemNanoWing { @Override public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { - this.useWings(player, stack, world, 0.33f, 0.5f, 0.2f, 7); + this.useWings(player, stack, world, 0.33f, 0.5f, 0.2f, 7); } - + @Override public double getMaxCharge(ItemStack itemStack) { return maxCharge; diff --git a/src/main/java/emt/item/armor/wings/ItemThaumiumReinforcedWing.java b/src/main/java/emt/item/armor/wings/ItemThaumiumReinforcedWing.java index 99f25f4..94fa0ce 100644 --- a/src/main/java/emt/item/armor/wings/ItemThaumiumReinforcedWing.java +++ b/src/main/java/emt/item/armor/wings/ItemThaumiumReinforcedWing.java @@ -17,44 +17,44 @@ import java.util.List; public class ItemThaumiumReinforcedWing extends ItemFeatherWing implements IVisDiscountGear, IRepairable { - public ItemThaumiumReinforcedWing(ArmorMaterial material, int par3, int par4) { - super(material, par3, par4); - this.setMaxStackSize(1); - this.setMaxDamage(250); - this.setCreativeTab(EMT.TAB); - this.isDamageable(); - visDiscount = 4; - } - - @Override - public float getFallDamageMult() { - return 0.5F; - } + public ItemThaumiumReinforcedWing(ArmorMaterial material, int par3, int par4) { + super(material, par3, par4); + this.setMaxStackSize(1); + this.setMaxDamage(250); + this.setCreativeTab(EMT.TAB); + this.isDamageable(); + visDiscount = 4; + } - @Override - public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { - return visDiscount; - } + @Override + public float getFallDamageMult() { + return 0.5F; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/wing_thaumium"); - } + @Override + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { + return visDiscount; + } - @Override - @SideOnly(Side.CLIENT) - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return EMT.TEXTURE_PATH + ":textures/models/thaumiumwing.png"; - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/wing_thaumium"); + } - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { - list.add(EMTTextHelper.localize("tooltip.EMT.visDiscount") + ": " + String.valueOf(visDiscount) + "%"); - } + @Override + @SideOnly(Side.CLIENT) + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return EMT.TEXTURE_PATH + ":textures/models/thaumiumwing.png"; + } - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { - this.useWings(player, stack, world, 0.15f, 0.7f, 0.5f, 0); - } + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add(EMTTextHelper.localize("tooltip.EMT.visDiscount") + ": " + String.valueOf(visDiscount) + "%"); + } + + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { + this.useWings(player, stack, world, 0.15f, 0.7f, 0.5f, 0); + } } diff --git a/src/main/java/emt/item/block/ItemBlockElectricCloud.java b/src/main/java/emt/item/block/ItemBlockElectricCloud.java index cbf462d..e929ee9 100644 --- a/src/main/java/emt/item/block/ItemBlockElectricCloud.java +++ b/src/main/java/emt/item/block/ItemBlockElectricCloud.java @@ -9,26 +9,26 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; -public class ItemBlockElectricCloud extends ItemBlock{ +public class ItemBlockElectricCloud extends ItemBlock { - public IIcon icon; - - public ItemBlockElectricCloud(Block block) { - super(block); - } + public IIcon icon; - @Override - public IIcon getIconFromDamage(int meta) { - return icon; - } - - @Override - public void registerIcons(IIconRegister ir) { - icon = ir.registerIcon(EMT.TEXTURE_PATH + ":" + "electric_cloud"); - } - - @Override - public String getItemStackDisplayName(ItemStack stack) { - return EMTTextHelper.PURPLE + EMTTextHelper.BOLD + StatCollector.translateToLocal(getUnlocalizedName() + ".name"); - } + public ItemBlockElectricCloud(Block block) { + super(block); + } + + @Override + public IIcon getIconFromDamage(int meta) { + return icon; + } + + @Override + public void registerIcons(IIconRegister ir) { + icon = ir.registerIcon(EMT.TEXTURE_PATH + ":" + "electric_cloud"); + } + + @Override + public String getItemStackDisplayName(ItemStack stack) { + return EMTTextHelper.PURPLE + EMTTextHelper.BOLD + StatCollector.translateToLocal(getUnlocalizedName() + ".name"); + } } diff --git a/src/main/java/emt/item/block/ItemBlockEssentiaGenerators.java b/src/main/java/emt/item/block/ItemBlockEssentiaGenerators.java index d3b5dd0..f46922c 100644 --- a/src/main/java/emt/item/block/ItemBlockEssentiaGenerators.java +++ b/src/main/java/emt/item/block/ItemBlockEssentiaGenerators.java @@ -1,109 +1,108 @@ package emt.item.block; -import java.util.List; - -import gregtech.api.enums.GT_Values; -import org.lwjgl.input.Keyboard; - import emt.util.EMTConfigHandler; import emt.util.EMTEssentiasOutputs; import emt.util.EMTTextHelper; +import gregtech.api.enums.GT_Values; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; +import org.lwjgl.input.Keyboard; import thaumcraft.api.aspects.Aspect; +import java.util.List; + public class ItemBlockEssentiaGenerators extends ItemBlock { - public ItemBlockEssentiaGenerators(Block block) { - super(block); - setHasSubtypes(true); - } + public ItemBlockEssentiaGenerators(Block block) { + super(block); + setHasSubtypes(true); + } - @Override - public String getUnlocalizedName(ItemStack itemstack) { - String name = ""; - switch (itemstack.getItemDamage()) { - case 0: - name = "potentia"; - break; - case 1: - name = "ignis"; - break; - case 2: - name = "auram"; - break; - case 3: - name = "arbor"; - break; - case 4: - name = "aer"; - break; - case 5: - name = "lucrum"; - break; - default: - name = "nothing"; - } - return getUnlocalizedName() + "." + name; - } + @Override + public String getUnlocalizedName(ItemStack itemstack) { + String name = ""; + switch (itemstack.getItemDamage()) { + case 0: + name = "potentia"; + break; + case 1: + name = "ignis"; + break; + case 2: + name = "auram"; + break; + case 3: + name = "arbor"; + break; + case 4: + name = "aer"; + break; + case 5: + name = "lucrum"; + break; + default: + name = "nothing"; + } + return getUnlocalizedName() + "." + name; + } - @Override - public int getMetadata(int meta) { - return meta; - } + @Override + public int getMetadata(int meta) { + return meta; + } - private long getOutputAmperage(double EU) { - return (long) (1L + (EU / 20.0D / 20.0D / GT_Values.V[2])); - } + private long getOutputAmperage(double EU) { + return (long) (1L + (EU / 20.0D / 20.0D / GT_Values.V[2])); + } - @Override - public void addInformation(ItemStack is, EntityPlayer player, List list, boolean flag) { + @Override + public void addInformation(ItemStack is, EntityPlayer player, List list, boolean flag) { if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) { - switch (is.getItemDamage()) { - case 0: - list.add(EMTTextHelper.BRIGHT_BLUE+StatCollector.translateToLocal("emt.Generating")+EMTTextHelper.LIGHT_GRAY+Integer.toString((int)(EMTEssentiasOutputs.outputs.get(Aspect.ENERGY.getTag())/20/20)) +" EU/t"); - list.add(EMTTextHelper.BRIGHT_BLUE+StatCollector.translateToLocal("emt.Output")+EMTTextHelper.LIGHT_GRAY+"128 EU/t @ "+getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.ENERGY.getTag()))+" A"); - list.add(EMTTextHelper.BRIGHT_GREEN+StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu")+": "+EMTTextHelper.LIGHT_GRAY+Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.ENERGY.getTag()))) +" EU"); - break; - - case 1: - list.add(EMTTextHelper.BRIGHT_BLUE+StatCollector.translateToLocal("emt.Generating")+EMTTextHelper.LIGHT_GRAY+Integer.toString((int)(EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag())/20/20)) +" EU/t"); - list.add(EMTTextHelper.BRIGHT_BLUE+StatCollector.translateToLocal("emt.Output")+EMTTextHelper.LIGHT_GRAY+"128 EU/t @ "+getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag()))+" A"); - list.add(EMTTextHelper.BRIGHT_GREEN+StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu")+": "+EMTTextHelper.LIGHT_GRAY+Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag()))) +" EU"); - break; - - case 2: - list.add(EMTTextHelper.BRIGHT_BLUE+StatCollector.translateToLocal("emt.Generating")+EMTTextHelper.LIGHT_GRAY+Integer.toString((int)(EMTEssentiasOutputs.outputs.get(Aspect.AURA.getTag())/20/20)) +" EU/t"); - list.add(EMTTextHelper.BRIGHT_BLUE+StatCollector.translateToLocal("emt.Output")+EMTTextHelper.LIGHT_GRAY+"128 EU/t @ "+getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.AURA.getTag()))+" A"); - list.add(EMTTextHelper.BRIGHT_GREEN+StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu")+": "+EMTTextHelper.LIGHT_GRAY+Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.AURA.getTag()))) +" EU"); - break; - - case 3: - list.add(EMTTextHelper.BRIGHT_BLUE+StatCollector.translateToLocal("emt.Generating")+EMTTextHelper.LIGHT_GRAY+Integer.toString((int)(EMTEssentiasOutputs.outputs.get(Aspect.TREE.getTag())/20/20)) +" EU/t"); - list.add(EMTTextHelper.BRIGHT_BLUE+StatCollector.translateToLocal("emt.Output")+EMTTextHelper.LIGHT_GRAY+"128 EU/t @ "+getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.TREE.getTag()))+" A"); - list.add(EMTTextHelper.BRIGHT_GREEN+StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu")+": "+EMTTextHelper.LIGHT_GRAY+Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag()))) +" EU"); - break; - - case 4: - list.add(EMTTextHelper.BRIGHT_BLUE+StatCollector.translateToLocal("emt.Generating")+EMTTextHelper.LIGHT_GRAY+Integer.toString((int)(EMTEssentiasOutputs.outputs.get(Aspect.AIR.getTag())/20/20)) +" EU/t"); - list.add(EMTTextHelper.BRIGHT_BLUE+StatCollector.translateToLocal("emt.Output")+EMTTextHelper.LIGHT_GRAY+"128 EU/t @ "+getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.AIR.getTag()))+" A"); - list.add(EMTTextHelper.BRIGHT_GREEN+StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu")+": "+EMTTextHelper.LIGHT_GRAY+Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.AIR.getTag()))) +" EU"); - break; - - case 5: - list.add(EMTTextHelper.BRIGHT_BLUE+StatCollector.translateToLocal("emt.Generating")+EMTTextHelper.LIGHT_GRAY+Integer.toString((int)(EMTEssentiasOutputs.outputs.get(Aspect.GREED.getTag())/20/20)) +" EU/t"); - list.add(EMTTextHelper.BRIGHT_BLUE+StatCollector.translateToLocal("emt.Output")+EMTTextHelper.LIGHT_GRAY+"128 EU/t @ "+getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.GREED.getTag()))+" A"); - list.add(EMTTextHelper.BRIGHT_GREEN+StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu")+": "+EMTTextHelper.LIGHT_GRAY+Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.GREED.getTag()))) +" EU"); - break; - - default: - break; - } - list.add(EMTTextHelper.YELLOW+StatCollector.translateToLocal("emt.Storage")+EMTTextHelper.LIGHT_GRAY+Double.toString(EMTConfigHandler.EssentiaGeneratorStorage)+" EU"); - } else + switch (is.getItemDamage()) { + case 0: + list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Generating") + EMTTextHelper.LIGHT_GRAY + Integer.toString((int) (EMTEssentiasOutputs.outputs.get(Aspect.ENERGY.getTag()) / 20 / 20)) + " EU/t"); + list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Output") + EMTTextHelper.LIGHT_GRAY + "128 EU/t @ " + getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.ENERGY.getTag())) + " A"); + list.add(EMTTextHelper.BRIGHT_GREEN + StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu") + ": " + EMTTextHelper.LIGHT_GRAY + Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.ENERGY.getTag()))) + " EU"); + break; + + case 1: + list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Generating") + EMTTextHelper.LIGHT_GRAY + Integer.toString((int) (EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag()) / 20 / 20)) + " EU/t"); + list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Output") + EMTTextHelper.LIGHT_GRAY + "128 EU/t @ " + getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag())) + " A"); + list.add(EMTTextHelper.BRIGHT_GREEN + StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu") + ": " + EMTTextHelper.LIGHT_GRAY + Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag()))) + " EU"); + break; + + case 2: + list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Generating") + EMTTextHelper.LIGHT_GRAY + Integer.toString((int) (EMTEssentiasOutputs.outputs.get(Aspect.AURA.getTag()) / 20 / 20)) + " EU/t"); + list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Output") + EMTTextHelper.LIGHT_GRAY + "128 EU/t @ " + getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.AURA.getTag())) + " A"); + list.add(EMTTextHelper.BRIGHT_GREEN + StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu") + ": " + EMTTextHelper.LIGHT_GRAY + Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.AURA.getTag()))) + " EU"); + break; + + case 3: + list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Generating") + EMTTextHelper.LIGHT_GRAY + Integer.toString((int) (EMTEssentiasOutputs.outputs.get(Aspect.TREE.getTag()) / 20 / 20)) + " EU/t"); + list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Output") + EMTTextHelper.LIGHT_GRAY + "128 EU/t @ " + getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.TREE.getTag())) + " A"); + list.add(EMTTextHelper.BRIGHT_GREEN + StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu") + ": " + EMTTextHelper.LIGHT_GRAY + Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag()))) + " EU"); + break; + + case 4: + list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Generating") + EMTTextHelper.LIGHT_GRAY + Integer.toString((int) (EMTEssentiasOutputs.outputs.get(Aspect.AIR.getTag()) / 20 / 20)) + " EU/t"); + list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Output") + EMTTextHelper.LIGHT_GRAY + "128 EU/t @ " + getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.AIR.getTag())) + " A"); + list.add(EMTTextHelper.BRIGHT_GREEN + StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu") + ": " + EMTTextHelper.LIGHT_GRAY + Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.AIR.getTag()))) + " EU"); + break; + + case 5: + list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Generating") + EMTTextHelper.LIGHT_GRAY + Integer.toString((int) (EMTEssentiasOutputs.outputs.get(Aspect.GREED.getTag()) / 20 / 20)) + " EU/t"); + list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Output") + EMTTextHelper.LIGHT_GRAY + "128 EU/t @ " + getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.GREED.getTag())) + " A"); + list.add(EMTTextHelper.BRIGHT_GREEN + StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu") + ": " + EMTTextHelper.LIGHT_GRAY + Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.GREED.getTag()))) + " EU"); + break; + + default: + break; + } + list.add(EMTTextHelper.YELLOW + StatCollector.translateToLocal("emt.Storage") + EMTTextHelper.LIGHT_GRAY + Double.toString(EMTConfigHandler.EssentiaGeneratorStorage) + " EU"); + } else list.add(StatCollector.translateToLocal("emt.PressShift")); } } diff --git a/src/main/java/emt/item/block/ItemBlockMachines.java b/src/main/java/emt/item/block/ItemBlockMachines.java index f8522d4..bbe01b3 100644 --- a/src/main/java/emt/item/block/ItemBlockMachines.java +++ b/src/main/java/emt/item/block/ItemBlockMachines.java @@ -9,51 +9,51 @@ import java.util.List; public class ItemBlockMachines extends ItemBlock { - public ItemBlockMachines(Block id) { - super(id); - setHasSubtypes(true); - } + public ItemBlockMachines(Block id) { + super(id); + setHasSubtypes(true); + } - @Override - public String getUnlocalizedName(ItemStack itemstack) { - String name = ""; - switch (itemstack.getItemDamage()) { - case 0: { - name = "wandrecharge"; - break; - } - case 1: { - name = "etheralprocessor"; - break; - } - case 2:{ - name = "essentiafiller"; - break; - } - case 3: { - name = "raindispeller"; - break; - } - default: - name = "nothing"; - } - return getUnlocalizedName() + "." + name; - } + @Override + public String getUnlocalizedName(ItemStack itemstack) { + String name = ""; + switch (itemstack.getItemDamage()) { + case 0: { + name = "wandrecharge"; + break; + } + case 1: { + name = "etheralprocessor"; + break; + } + case 2: { + name = "essentiafiller"; + break; + } + case 3: { + name = "raindispeller"; + break; + } + default: + name = "nothing"; + } + return getUnlocalizedName() + "." + name; + } - @Override - public int getMetadata(int par1) { - return par1; - } + @Override + public int getMetadata(int par1) { + return par1; + } - @Override - public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) { - switch (p_77624_1_.getItemDamage()) { - case 2: { - p_77624_3_.add("Connects between Essentia Hatches and the Pipe Network"); - p_77624_3_.add("Looses its Essentia on Restart"); - p_77624_3_.add("Added by bartimaeusnek"); - } - } + @Override + public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) { + switch (p_77624_1_.getItemDamage()) { + case 2: { + p_77624_3_.add("Connects between Essentia Hatches and the Pipe Network"); + p_77624_3_.add("Looses its Essentia on Restart"); + p_77624_3_.add("Added by bartimaeusnek"); + } + } - } + } } diff --git a/src/main/java/emt/item/block/ItemBlockSolars.java b/src/main/java/emt/item/block/ItemBlockSolars.java index 407a2fd..69d8194 100644 --- a/src/main/java/emt/item/block/ItemBlockSolars.java +++ b/src/main/java/emt/item/block/ItemBlockSolars.java @@ -1,12 +1,9 @@ package emt.item.block; -import static emt.util.EMTTextHelper.localize; - -import java.util.List; - -import org.lwjgl.input.Keyboard; - +import emt.EMT; import emt.block.BlockBaseContainer; +import emt.tile.solar.Solars; +import emt.tile.solar.TileEntitySolarBase; import emt.util.EMTConfigHandler; import emt.util.EMTTextHelper; import net.minecraft.block.Block; @@ -14,264 +11,309 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; +import net.minecraft.util.StringTranslate; +import org.apache.commons.io.input.ReaderInputStream; +import org.lwjgl.input.Keyboard; + +import java.io.StringReader; +import java.util.List; + +import static emt.util.EMTTextHelper.localize; public class ItemBlockSolars extends ItemBlock { - int instance; + int instance; - public ItemBlockSolars(Block block) { - super(block); - setHasSubtypes(true); - instance = ((BlockBaseContainer) block).instance; - } + public ItemBlockSolars(Block block) { + super(block); + setHasSubtypes(true); + instance = ((BlockBaseContainer) block).instance; + } - @Override - public String getUnlocalizedName(ItemStack itemstack) { - String name = ""; + @Override + public String getUnlocalizedName(ItemStack itemstack) { + String name = ""; - if (instance == 0) { - switch (itemstack.getItemDamage()) { - case 0: { - name = "compressed"; - break; - } - case 1: { - name = "doublecompressed"; - break; - } - case 2: { - name = "triplecompressed"; - break; - } - case 3: { - name = "water"; - break; - } - case 4: { - name = "doublewater"; - break; - } - case 5: { - name = "triplewater"; - break; - } - case 6: { - name = "dark"; - break; - } - case 7: { - name = "doubledark"; - break; - } - case 8: { - name = "tripledark"; - break; - } - case 9: { - name = "order"; - break; - } - case 10: { - name = "doubleorder"; - break; - } - case 11: { - name = "tripleorder"; - break; - } - case 12: { - name = "fire"; - break; - } - case 13: { - name = "doublefire"; - break; - } - case 14: { - name = "triplefire"; - break; - } - case 15: { - name = "air"; - break; - } - default: - name = "nothing"; - break; - } - } + if (instance == 0) { + switch (itemstack.getItemDamage()) { + case 0: { + name = "compressed"; + break; + } + case 1: { + name = "doublecompressed"; + break; + } + case 2: { + name = "triplecompressed"; + break; + } + case 3: { + name = "water"; + break; + } + case 4: { + name = "doublewater"; + break; + } + case 5: { + name = "triplewater"; + break; + } + case 6: { + name = "dark"; + break; + } + case 7: { + name = "doubledark"; + break; + } + case 8: { + name = "tripledark"; + break; + } + case 9: { + name = "order"; + break; + } + case 10: { + name = "doubleorder"; + break; + } + case 11: { + name = "tripleorder"; + break; + } + case 12: { + name = "fire"; + break; + } + case 13: { + name = "doublefire"; + break; + } + case 14: { + name = "triplefire"; + break; + } + case 15: { + name = "air"; + break; + } + default: + name = "nothing"; + break; + } + } else if (instance == 1) { + switch (itemstack.getItemDamage()) { + case 0: { + name = "doubleair"; + break; + } + case 1: { + name = "tripleair"; + break; + } + case 2: { + name = "earth"; + break; + } + case 3: { + name = "doubleearth"; + break; + } + case 4: { + name = "tripleearth"; + break; + } + default: + name = "nothing"; + break; + } - if (instance == 1) { - switch (itemstack.getItemDamage()) { - case 0: { - name = "doubleair"; - break; - } - case 1: { - name = "tripleair"; - break; - } - case 2: { - name = "earth"; - break; - } - case 3: { - name = "doubleearth"; - break; - } - case 4: { - name = "tripleearth"; - break; - } - default: - name = "nothing"; - break; - } - } + } else { + name = Solars.getNameFromSolar(this.instance, itemstack.getItemDamage()); + if (!StatCollector.canTranslate("tile." + EMT.MOD_ID + "." + name.replaceAll(" ", "_"))) + StringTranslate.inject(new ReaderInputStream(new StringReader("tile." + EMT.MOD_ID + "." + name.replaceAll(" ", "_") + ".name=" + name))); + return "tile." + EMT.MOD_ID + "." + name.replaceAll(" ", "_"); + } - return getUnlocalizedName() + "." + name; - } + return getUnlocalizedName() + "." + name; + } - @Override - public int getMetadata(int meta) { - return meta; - } + @Override + public int getMetadata(int meta) { + return meta; + } - @Override - public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean advancedItemTooltips) { - if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) { - if (instance == 0) { - switch (itemstack.getItemDamage()) { - case 0: { - list.add(EMTConfigHandler.compressedSolarOutput + localize("tooltip.EMT.euPerTick")); - break; - } - case 1: { - list.add(EMTConfigHandler.doubleCompressedSolarOutput + localize("tooltip.EMT.euPerTick")); - break; - } - case 2: { - list.add(EMTConfigHandler.tripleCompressedSolarOutput + localize("tooltip.EMT.euPerTick")); - break; - } - case 3: {//aqua - list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.underwater")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (3F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (6F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.thunder")); - break; - } - case 4: { - list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.underwater")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (3F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (6F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.thunder")); - break; - } - case 5: { - list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.underwater")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (3F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (6F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.thunder")); - break; - } - - case 6: {//dark - list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); - break; - } - case 7: { + @Override + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean advancedItemTooltips) { + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) { + TileEntitySolarBase te = Solars.getTileEntitySolarBase(instance, itemstack.getItemDamage()); + if (instance == 0) { + switch (itemstack.getItemDamage()) { + case 0: { + list.add(EMTConfigHandler.compressedSolarOutput + localize("tooltip.EMT.euPerTick")); + break; + } + case 1: { + list.add(EMTConfigHandler.doubleCompressedSolarOutput + localize("tooltip.EMT.euPerTick")); + break; + } + case 2: { + list.add(EMTConfigHandler.tripleCompressedSolarOutput + localize("tooltip.EMT.euPerTick")); + break; + } + case 3: {//aqua + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.underwater")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (3F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (6F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.thunder")); + break; + } + case 4: { + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.underwater")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (3F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (6F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.thunder")); + break; + } + case 5: { + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.underwater")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (3F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (6F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.thunder")); + break; + } - list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); - break; - } - case 8: { - list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); - break; - } - case 9: {//ordo - list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); - break; - } - case 10: { - list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); - break; - } + case 6: {//dark + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); + break; + } + case 7: { - case 11: { - list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); - break; - } - case 12: {//fire - list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple") + " " + localize("tooltip.EMT.output.double.lava")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.nether")); - break; - } - case 13: { - list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple") + " " + localize("tooltip.EMT.output.double.lava")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.nether")); - break; - } - case 14: { - list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple") + " " + localize("tooltip.EMT.output.double.lava")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.nether")); - break; - } - case 15: {//aer - list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.height")); - break; - } - default: { - list.add(localize("tooltip.EMT.forget")); - break; - } - } - } + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); + break; + } + case 8: { + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); + break; + } + case 9: {//ordo + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); + break; + } + case 10: { + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); + break; + } - if (instance == 1) { - switch (itemstack.getItemDamage()) { - case 0: { - list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.height")); - break; - } - case 1: { - list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.height")); - break; - } - case 2: {//terra - list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.low")); - break; - } - case 3: { - list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.low")); - break; - } - case 4: { - list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.low")); - break; - } - default: { - list.add(localize("tooltip.EMT.forget")); - break; - } - } - } - } else + case 11: { + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); + break; + } + case 12: {//fire + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple") + " " + localize("tooltip.EMT.output.double.lava")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.nether")); + break; + } + case 13: { + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple") + " " + localize("tooltip.EMT.output.double.lava")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.nether")); + break; + } + case 14: { + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple") + " " + localize("tooltip.EMT.output.double.lava")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.nether")); + break; + } + case 15: {//aer + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.height")); + break; + } + default: { + list.add(localize("tooltip.EMT.forget")); + break; + } + } + } else if (instance == 1) { + switch (itemstack.getItemDamage()) { + case 0: { + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.height")); + break; + } + case 1: { + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.height")); + break; + } + case 2: {//terra + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.low")); + break; + } + case 3: { + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.low")); + break; + } + case 4: { + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.low")); + break; + } + default: { + list.add(localize("tooltip.EMT.forget")); + break; + } + } + } else { + switch (te.aspect) { + case 1: + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * te.output) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * te.output) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); + break; + case 2: + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * te.output) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * te.output) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); + break; + case 3: + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.height")); + break; + case 4: + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.low")); + break; + case 5: + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * te.output) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.underwater")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (3F * te.output) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (6F * te.output) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.thunder")); + break; + case 6: + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple") + " " + localize("tooltip.EMT.output.double.lava")); + list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.nether")); + break; + default: + list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick")); + break; + } + } + list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.OutputMax") + " " + EMTTextHelper.LIGHT_GRAY + te.calculateMaxVoltAmp()[0] + "EU/t @ " + te.calculateMaxVoltAmp()[1] + "A"); + } else list.add(StatCollector.translateToLocal("emt.PressShift")); - } + } } diff --git a/src/main/java/emt/item/focus/ItemBaseFocus.java b/src/main/java/emt/item/focus/ItemBaseFocus.java index b398acb..8cbe9eb 100644 --- a/src/main/java/emt/item/focus/ItemBaseFocus.java +++ b/src/main/java/emt/item/focus/ItemBaseFocus.java @@ -1,5 +1,8 @@ package emt.item.focus; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import emt.EMT; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; @@ -14,107 +17,103 @@ import thaumcraft.api.wands.ItemFocusBasic; import java.util.List; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import emt.EMT; - public abstract class ItemBaseFocus extends ItemFocusBasic { - public IIcon ornament; - String textureName = ""; + public IIcon ornament; + String textureName = ""; - public ItemBaseFocus(String unlocName) { - super(); - setUnlocalizedName(EMT.MOD_ID + ".focus." + unlocName); - setCreativeTab(EMT.TAB); - setMaxDamage(1); - setNoRepair(); - setMaxStackSize(1); - this.textureName = unlocName; - } + public ItemBaseFocus(String unlocName) { + super(); + setUnlocalizedName(EMT.MOD_ID + ".focus." + unlocName); + setCreativeTab(EMT.TAB); + setMaxDamage(1); + setNoRepair(); + setMaxStackSize(1); + this.textureName = unlocName; + } - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister ir) { - this.icon = ir.registerIcon(EMT.TEXTURE_PATH + ":" + "focus_" + textureName); - } + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister ir) { + this.icon = ir.registerIcon(EMT.TEXTURE_PATH + ":" + "focus_" + textureName); + } - boolean hasDepth() { - return false; - } + boolean hasDepth() { + return false; + } - @Override - public int getFocusColor(ItemStack stack) { - return 0; - } + @Override + public int getFocusColor(ItemStack stack) { + return 0; + } - @Override - public boolean isItemTool(ItemStack par1ItemStack) { - return true; - } + @Override + public boolean isItemTool(ItemStack par1ItemStack) { + return true; + } - @Override - public EnumRarity getRarity(ItemStack itemstack) { - return EnumRarity.rare; - } + @Override + public EnumRarity getRarity(ItemStack itemstack) { + return EnumRarity.rare; + } - @Override - public IIcon getOrnament(ItemStack focusstack) { - return ornament; - } + @Override + public IIcon getOrnament(ItemStack focusstack) { + return ornament; + } - @Override - public AspectList getVisCost(ItemStack focusstack) { - return new AspectList(); - } + @Override + public AspectList getVisCost(ItemStack focusstack) { + return new AspectList(); + } - public boolean isUseItem(ItemStack stack) { - return isVisCostPerTick(stack); - } + public boolean isUseItem(ItemStack stack) { + return isVisCostPerTick(stack); + } - public boolean isVisCostPerTick() { - return false; - } + public boolean isVisCostPerTick() { + return false; + } - @Override - public ItemStack onFocusRightClick(ItemStack paramItemStack, World paramWorld, EntityPlayer paramEntityPlayer, MovingObjectPosition paramMovingObjectPosition) { - if (isUseItem(paramItemStack)) - paramEntityPlayer.setItemInUse(paramItemStack, Integer.MAX_VALUE); - return paramItemStack; - } + @Override + public ItemStack onFocusRightClick(ItemStack paramItemStack, World paramWorld, EntityPlayer paramEntityPlayer, MovingObjectPosition paramMovingObjectPosition) { + if (isUseItem(paramItemStack)) + paramEntityPlayer.setItemInUse(paramItemStack, Integer.MAX_VALUE); + return paramItemStack; + } - @Override - public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) { + @Override + public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) { - } + } - @Override - public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, EntityPlayer player, int count) { - } + @Override + public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, EntityPlayer player, int count) { + } - @Override - public String getSortingHelper(ItemStack itemstack) { - return "00"; - } + @Override + public String getSortingHelper(ItemStack itemstack) { + return "00"; + } - @Override - public boolean onFocusBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) { - return false; - } + @Override + public boolean onFocusBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) { + return false; + } - @Override - public int getItemEnchantability() { - return 5; - } + @Override + public int getItemEnchantability() { + return 5; + } - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { - AspectList cost = getVisCost(stack); - if (cost != null && cost.size() > 0) { - list.add(StatCollector.translateToLocal(isVisCostPerTick() ? "item.Focus.cost2" : "item.Focus.cost1")); - for (Aspect aspect : cost.getAspectsSorted()) { - float amount = cost.getAmount(aspect) / 100.0F; - list.add(" " + '\u00a7' + aspect.getChatcolor() + aspect.getName() + '\u00a7' + "r x " + amount); - } - } - } + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { + AspectList cost = getVisCost(stack); + if (cost != null && cost.size() > 0) { + list.add(StatCollector.translateToLocal(isVisCostPerTick() ? "item.Focus.cost2" : "item.Focus.cost1")); + for (Aspect aspect : cost.getAspectsSorted()) { + float amount = cost.getAmount(aspect) / 100.0F; + list.add(" " + '\u00a7' + aspect.getChatcolor() + aspect.getName() + '\u00a7' + "r x " + amount); + } + } + } } \ No newline at end of file diff --git a/src/main/java/emt/item/focus/ItemChargeFocus.java b/src/main/java/emt/item/focus/ItemChargeFocus.java index 4406c56..78cb0bf 100644 --- a/src/main/java/emt/item/focus/ItemChargeFocus.java +++ b/src/main/java/emt/item/focus/ItemChargeFocus.java @@ -1,11 +1,8 @@ package emt.item.focus; +import emt.util.EMTConfigHandler; import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; - -import java.util.Map.Entry; - -import emt.util.EMTConfigHandler; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; @@ -15,71 +12,71 @@ import thaumcraft.api.aspects.AspectList; import thaumcraft.api.wands.FocusUpgradeType; import thaumcraft.common.items.wands.ItemWandCasting; +import java.util.Map.Entry; + public class ItemChargeFocus extends ItemBaseFocus { - private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.AIR, 10).add(Aspect.EARTH, 10).add(Aspect.ORDER, 10).add(Aspect.ENTROPY, 10); + private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.AIR, 10).add(Aspect.EARTH, 10).add(Aspect.ORDER, 10).add(Aspect.ENTROPY, 10); - public ItemChargeFocus() { - super("charge"); - } + public ItemChargeFocus() { + super("charge"); + } - @Override - public int getFocusColor(ItemStack stack) { - return 0xFFFF00; - } + @Override + public int getFocusColor(ItemStack stack) { + return 0xFFFF00; + } - @Override - public AspectList getVisCost(ItemStack stack) { - AspectList actualCost = new AspectList(); - for (Entry e : visCost.aspects.entrySet()) - actualCost.add(e.getKey(), (int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency)))); - return visCost; - } + @Override + public AspectList getVisCost(ItemStack stack) { + AspectList actualCost = new AspectList(); + for (Entry e : visCost.aspects.entrySet()) + actualCost.add(e.getKey(), (int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency)))); + return visCost; + } - @Override - public String getSortingHelper(ItemStack itemstack) { - return "WANDCHARGING"; - } + @Override + public String getSortingHelper(ItemStack itemstack) { + return "WANDCHARGING"; + } - public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) { - return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal }; - } + public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) { + return new FocusUpgradeType[]{FocusUpgradeType.potency, FocusUpgradeType.frugal}; + } - public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) { - return true; - } + public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) { + return true; + } - @Override - public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) { - ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); - if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { - if (!world.isRemote) { + @Override + public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) { + ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); + if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { + if (!world.isRemote) { - int energyLeft = (int) (EMTConfigHandler.chargeFocusProduction * Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency))); - for (int i = 0; i < player.inventory.armorInventory.length; i++) { - if (energyLeft > 0) { - if ((player.inventory.armorInventory[i] != null) && (player.inventory.armorInventory[i].getItem() instanceof IElectricItem)) { - double sentPacket = ElectricItem.manager.charge(player.inventory.armorInventory[i], energyLeft, 4, false, false); - energyLeft -= sentPacket; - } - } - else { - return itemstack; - } - } - for (int j = 0; j < player.inventory.mainInventory.length; j++) { - if (energyLeft > 0) { - if ((player.inventory.mainInventory[j] != null) && (player.inventory.mainInventory[j].getItem() instanceof IElectricItem)) { - double sentPacket = ElectricItem.manager.charge(player.inventory.mainInventory[j], energyLeft, 4, false, false); - energyLeft -= sentPacket; - } - } - else { - return itemstack; - } - } - } - } - return itemstack; - } + int energyLeft = (int) (EMTConfigHandler.chargeFocusProduction * Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency))); + for (int i = 0; i < player.inventory.armorInventory.length; i++) { + if (energyLeft > 0) { + if ((player.inventory.armorInventory[i] != null) && (player.inventory.armorInventory[i].getItem() instanceof IElectricItem)) { + double sentPacket = ElectricItem.manager.charge(player.inventory.armorInventory[i], energyLeft, 4, false, false); + energyLeft -= sentPacket; + } + } else { + return itemstack; + } + } + for (int j = 0; j < player.inventory.mainInventory.length; j++) { + if (energyLeft > 0) { + if ((player.inventory.mainInventory[j] != null) && (player.inventory.mainInventory[j].getItem() instanceof IElectricItem)) { + double sentPacket = ElectricItem.manager.charge(player.inventory.mainInventory[j], energyLeft, 4, false, false); + energyLeft -= sentPacket; + } + } else { + return itemstack; + } + } + } + } + return itemstack; + } } diff --git a/src/main/java/emt/item/focus/ItemChristmasFocus.java b/src/main/java/emt/item/focus/ItemChristmasFocus.java index 04ca8bf..3e072be 100644 --- a/src/main/java/emt/item/focus/ItemChristmasFocus.java +++ b/src/main/java/emt/item/focus/ItemChristmasFocus.java @@ -11,44 +11,44 @@ import thaumcraft.common.items.wands.ItemWandCasting; public class ItemChristmasFocus extends ItemBaseFocus { - private static final AspectList visCost = new AspectList().add(Aspect.ORDER, 500).add(Aspect.AIR, 500); + private static final AspectList visCost = new AspectList().add(Aspect.ORDER, 500).add(Aspect.AIR, 500); - public ItemChristmasFocus() { - super("christmas"); - } + public ItemChristmasFocus() { + super("christmas"); + } - @Override - public int getFocusColor(ItemStack stack) { - return 0x00FFFF; - } + @Override + public int getFocusColor(ItemStack stack) { + return 0x00FFFF; + } - @Override - public AspectList getVisCost(ItemStack stack) { - return visCost; - } + @Override + public AspectList getVisCost(ItemStack stack) { + return visCost; + } - @Override - public String getSortingHelper(ItemStack itemstack) { - return "CHRISTMAS"; - } + @Override + public String getSortingHelper(ItemStack itemstack) { + return "CHRISTMAS"; + } - @Override - public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition mop) { - ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); - if ((mop != null) && (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)) { - int x = mop.blockX; - int y = mop.blockY + 1; - int z = mop.blockZ; - if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { - if (!world.isRemote) { - EntitySnowman snowman; - snowman = new EntitySnowman(world); - snowman.setPosition(x, y, z); - world.spawnEntityInWorld(snowman); - } - } - player.swingItem(); - } - return itemstack; - } + @Override + public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition mop) { + ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); + if ((mop != null) && (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)) { + int x = mop.blockX; + int y = mop.blockY + 1; + int z = mop.blockZ; + if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { + if (!world.isRemote) { + EntitySnowman snowman; + snowman = new EntitySnowman(world); + snowman.setPosition(x, y, z); + world.spawnEntityInWorld(snowman); + } + } + player.swingItem(); + } + return itemstack; + } } diff --git a/src/main/java/emt/item/focus/ItemEnergyBallFocus.java b/src/main/java/emt/item/focus/ItemEnergyBallFocus.java index 07d4f0a..8d648a5 100644 --- a/src/main/java/emt/item/focus/ItemEnergyBallFocus.java +++ b/src/main/java/emt/item/focus/ItemEnergyBallFocus.java @@ -10,43 +10,43 @@ import net.minecraft.world.World; public class ItemEnergyBallFocus extends ItemBaseFocus { - public ItemEnergyBallFocus() { - super("energyBall"); - } + public ItemEnergyBallFocus() { + super("energyBall"); + } - @Override - public int getFocusColor(ItemStack stack) { - return 0x0000FF; - } + @Override + public int getFocusColor(ItemStack stack) { + return 0x0000FF; + } - @Override - public String getSortingHelper(ItemStack itemstack) { - return "ENERGYBALL"; - } + @Override + public String getSortingHelper(ItemStack itemstack) { + return "ENERGYBALL"; + } - @Override - public ItemStack onFocusRightClick(ItemStack stack, World world, EntityPlayer player, MovingObjectPosition mop) { - if (world.isRemote) { - return stack; - } - - ItemStack armor = player.inventory.armorInventory[2]; - if (armor == null) { - return stack; - } + @Override + public ItemStack onFocusRightClick(ItemStack stack, World world, EntityPlayer player, MovingObjectPosition mop) { + if (world.isRemote) { + return stack; + } - double val = ElectricItem.manager.discharge(armor, 5120, 4, true, false, false); + ItemStack armor = player.inventory.armorInventory[2]; + if (armor == null) { + return stack; + } - if (val < 5120) { - return stack; - } + double val = ElectricItem.manager.discharge(armor, 5120, 4, true, false, false); - float rotX = (-MathHelper.sin(player.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI)) * 100; - float rotY = (-MathHelper.sin(player.rotationPitch / 180.0F * (float) Math.PI)) * 100; - float rotZ = (MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI)) * 100; - world.spawnEntityInWorld(new EntityEnergyBall(world, player, rotX, rotY, rotZ)); + if (val < 5120) { + return stack; + } - return stack; - } + float rotX = (-MathHelper.sin(player.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI)) * 100; + float rotY = (-MathHelper.sin(player.rotationPitch / 180.0F * (float) Math.PI)) * 100; + float rotZ = (MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI)) * 100; + world.spawnEntityInWorld(new EntityEnergyBall(world, player, rotX, rotY, rotZ)); + + return stack; + } } diff --git a/src/main/java/emt/item/focus/ItemExplosionFocus.java b/src/main/java/emt/item/focus/ItemExplosionFocus.java index 8b58a5d..b418490 100644 --- a/src/main/java/emt/item/focus/ItemExplosionFocus.java +++ b/src/main/java/emt/item/focus/ItemExplosionFocus.java @@ -11,54 +11,52 @@ import thaumcraft.api.wands.FocusUpgradeType; import thaumcraft.common.items.wands.ItemWandCasting; public class ItemExplosionFocus extends ItemBaseFocus { - private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 200).add(Aspect.ENTROPY, 200); + private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 200).add(Aspect.ENTROPY, 200); - public ItemExplosionFocus() { - super("explosion"); - } + public ItemExplosionFocus() { + super("explosion"); + } - @Override - public int getFocusColor(ItemStack stack) { - return 0x8B0000; - } + @Override + public int getFocusColor(ItemStack stack) { + return 0x8B0000; + } - @Override - public AspectList getVisCost(ItemStack focusstack) { - return visCost; - } + @Override + public AspectList getVisCost(ItemStack focusstack) { + return visCost; + } - @Override - public String getSortingHelper(ItemStack itemstack) { - return "EXPLOSION"; - } + @Override + public String getSortingHelper(ItemStack itemstack) { + return "EXPLOSION"; + } - @Override - public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) { - ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); - if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { - if (!world.isRemote) { - EntityLaser laser; - laser = new EntityLaser(world, player, 1); - laser.setExplosionStrengthModifier(getUpgradeLevel(itemstack, FocusUpgradeType.potency) * 0.5f + 1); - world.spawnEntityInWorld(laser); - } - } - return itemstack; - } - - public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) - { - return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal }; - } - - /** - * Use this method to define custom logic about which upgrades can be applied. This can be used to set up upgrade "trees" - * that make certain upgrades available only when others are unlocked first, when certain research is completed, or similar logic. - * - */ - public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) { - return true; - } + @Override + public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) { + ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); + if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { + if (!world.isRemote) { + EntityLaser laser; + laser = new EntityLaser(world, player, 1); + laser.setExplosionStrengthModifier(getUpgradeLevel(itemstack, FocusUpgradeType.potency) * 0.5f + 1); + world.spawnEntityInWorld(laser); + } + } + return itemstack; + } + + public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) { + return new FocusUpgradeType[]{FocusUpgradeType.potency, FocusUpgradeType.frugal}; + } + + /** + * Use this method to define custom logic about which upgrades can be applied. This can be used to set up upgrade "trees" + * that make certain upgrades available only when others are unlocked first, when certain research is completed, or similar logic. + */ + public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) { + return true; + } } diff --git a/src/main/java/emt/item/focus/ItemShieldFocus.java b/src/main/java/emt/item/focus/ItemShieldFocus.java index 3fb211b..437fe3c 100644 --- a/src/main/java/emt/item/focus/ItemShieldFocus.java +++ b/src/main/java/emt/item/focus/ItemShieldFocus.java @@ -1,7 +1,5 @@ package emt.item.focus; -import java.util.LinkedList; - import emt.entity.EntityShield; import ic2.core.IC2; import net.minecraft.entity.player.EntityPlayer; @@ -13,52 +11,54 @@ import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.common.items.wands.ItemWandCasting; +import java.util.LinkedList; + public class ItemShieldFocus extends ItemBaseFocus { - private static final AspectList visCost = new AspectList().add(Aspect.ORDER, 5).add(Aspect.WATER, 5).add(Aspect.AIR, 5); + private static final AspectList visCost = new AspectList().add(Aspect.ORDER, 5).add(Aspect.WATER, 5).add(Aspect.AIR, 5); - public ItemShieldFocus() { - super("shield"); - } + public ItemShieldFocus() { + super("shield"); + } - @Override - public int getFocusColor(ItemStack stack) { - return 0x1E90FF; - } + @Override + public int getFocusColor(ItemStack stack) { + return 0x1E90FF; + } - @Override - public AspectList getVisCost(ItemStack stack) { - return visCost; - } + @Override + public AspectList getVisCost(ItemStack stack) { + return visCost; + } - @Override - public String getSortingHelper(ItemStack itemstack) { - return "SHIELD"; - } + @Override + public String getSortingHelper(ItemStack itemstack) { + return "SHIELD"; + } - @Override - public boolean isUseItem(ItemStack stack) { - return true; - } + @Override + public boolean isUseItem(ItemStack stack) { + return true; + } - @Override - public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) { - ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); - for (PotionEffect effect : new LinkedList(player.getActivePotionEffects())) { - IC2.platform.removePotion(player, effect.getPotionID()); - } - if (!player.capabilities.isCreativeMode && !wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { - player.stopUsingItem(); - } - } + @Override + public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) { + ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); + for (PotionEffect effect : new LinkedList(player.getActivePotionEffects())) { + IC2.platform.removePotion(player, effect.getPotionID()); + } + if (!player.capabilities.isCreativeMode && !wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { + player.stopUsingItem(); + } + } - @Override - public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition paramMovingObjectPosition) { - ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); - player.setItemInUse(itemstack, Integer.MAX_VALUE); - if (!world.isRemote && (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true))) { - EntityShield shield = new EntityShield(world, player); - world.spawnEntityInWorld(shield); - } - return itemstack; - } + @Override + public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition paramMovingObjectPosition) { + ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); + player.setItemInUse(itemstack, Integer.MAX_VALUE); + if (!world.isRemote && (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true))) { + EntityShield shield = new EntityShield(world, player); + world.spawnEntityInWorld(shield); + } + return itemstack; + } } diff --git a/src/main/java/emt/item/focus/ItemWandChargingFocus.java b/src/main/java/emt/item/focus/ItemWandChargingFocus.java index 9f31173..15acb6f 100644 --- a/src/main/java/emt/item/focus/ItemWandChargingFocus.java +++ b/src/main/java/emt/item/focus/ItemWandChargingFocus.java @@ -13,61 +13,61 @@ import java.util.Map.Entry; public class ItemWandChargingFocus extends ItemBaseFocus { - AspectList visCost = new AspectList().add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.AIR, 10).add(Aspect.EARTH, 10).add(Aspect.ORDER, 10).add(Aspect.ENTROPY, 10); + AspectList visCost = new AspectList().add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.AIR, 10).add(Aspect.EARTH, 10).add(Aspect.ORDER, 10).add(Aspect.ENTROPY, 10); - public ItemWandChargingFocus() { - super("chargeWand"); - } + public ItemWandChargingFocus() { + super("chargeWand"); + } - @Override - public int getFocusColor(ItemStack stack) { - return 0xFFFF450; - } + @Override + public int getFocusColor(ItemStack stack) { + return 0xFFFF450; + } - @Override - public String getSortingHelper(ItemStack itemstack) { - return "ELECTRICCHARGING"; - } + @Override + public String getSortingHelper(ItemStack itemstack) { + return "ELECTRICCHARGING"; + } - @Override - public boolean isVisCostPerTick(ItemStack focusstack) { - return true; - } + @Override + public boolean isVisCostPerTick(ItemStack focusstack) { + return true; + } - @Override - public AspectList getVisCost(ItemStack stack) { - AspectList actualCost = new AspectList(); - for (Entry e : visCost.aspects.entrySet()) - actualCost.add(e.getKey(), (int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency)))); - return visCost; - } + @Override + public AspectList getVisCost(ItemStack stack) { + AspectList actualCost = new AspectList(); + for (Entry e : visCost.aspects.entrySet()) + actualCost.add(e.getKey(), (int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency)))); + return visCost; + } - public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) { - return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal }; - } + public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) { + return new FocusUpgradeType[]{FocusUpgradeType.potency, FocusUpgradeType.frugal}; + } - public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) { - return true; - } + public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) { + return true; + } - @Override - public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int integer) { + @Override + public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int integer) { - if (!player.worldObj.isRemote) { - ItemWandCasting wandItem = (ItemWandCasting) itemstack.getItem(); + if (!player.worldObj.isRemote) { + ItemWandCasting wandItem = (ItemWandCasting) itemstack.getItem(); - ItemStack armor = player.inventory.armorInventory[1]; - if (armor != null) { - if ((ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player) && (ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player)))) { - int amount = (int) (100 * Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency))); - wandItem.addRealVis(itemstack, Aspect.ORDER, amount, true); - wandItem.addRealVis(itemstack, Aspect.FIRE, amount, true); - wandItem.addRealVis(itemstack, Aspect.ENTROPY, amount, true); - wandItem.addRealVis(itemstack, Aspect.WATER, amount, true); - wandItem.addRealVis(itemstack, Aspect.EARTH, amount, true); - wandItem.addRealVis(itemstack, Aspect.AIR, amount, true); - } - } - } - } + ItemStack armor = player.inventory.armorInventory[1]; + if (armor != null) { + if ((ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player) && (ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player)))) { + int amount = (int) (100 * Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency))); + wandItem.addRealVis(itemstack, Aspect.ORDER, amount, true); + wandItem.addRealVis(itemstack, Aspect.FIRE, amount, true); + wandItem.addRealVis(itemstack, Aspect.ENTROPY, amount, true); + wandItem.addRealVis(itemstack, Aspect.WATER, amount, true); + wandItem.addRealVis(itemstack, Aspect.EARTH, amount, true); + wandItem.addRealVis(itemstack, Aspect.AIR, amount, true); + } + } + } + } } diff --git a/src/main/java/emt/item/tool/ItemElectricHoeGrowth.java b/src/main/java/emt/item/tool/ItemElectricHoeGrowth.java index 7094324..21ed426 100644 --- a/src/main/java/emt/item/tool/ItemElectricHoeGrowth.java +++ b/src/main/java/emt/item/tool/ItemElectricHoeGrowth.java @@ -23,122 +23,120 @@ import java.util.List; public class ItemElectricHoeGrowth extends ItemHoe implements IElectricItem { - public IIcon icon; - public int maxCharge = 200000; - public int growthCost = 500; - public int tillCost = 100; + public IIcon icon; + public int maxCharge = 200000; + public int growthCost = 500; + public int tillCost = 100; - public ItemElectricHoeGrowth() { - super(ToolMaterial.EMERALD); - this.setCreativeTab(EMT.TAB); - this.setMaxStackSize(1); - this.growthCost = 10000; - } + public ItemElectricHoeGrowth() { + super(ToolMaterial.EMERALD); + this.setCreativeTab(EMT.TAB); + this.setMaxStackSize(1); + this.growthCost = 10000; + } - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) { - this.icon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/hoe_growth"); - } + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { + this.icon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/hoe_growth"); + } - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { - ItemStack itemStack = new ItemStack(this, 1); - if (getChargedItem(itemStack) == this) { - ItemStack charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); - itemList.add(charged); - } - if (getEmptyItem(itemStack) == this) { - itemList.add(new ItemStack(this, 1, getMaxDamage())); - } - } + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + if (getChargedItem(itemStack) == this) { + ItemStack charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); + itemList.add(charged); + } + if (getEmptyItem(itemStack) == this) { + itemList.add(new ItemStack(this, 1, getMaxDamage())); + } + } - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) { - return this.icon; - } + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) { + return this.icon; + } - @Override - public boolean isRepairable() { - return false; - } + @Override + public boolean isRepairable() { + return false; + } - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10) { - if (stack.hasTagCompound()) { - stack.stackTagCompound.setBoolean("Unbreakable", true); - } - boolean did = false; - for (int x1 = -1; x1 <= 1; x1++) { - for (int z1 = -1; z1 <= 1; z1++) { - if (ElectricItem.manager.canUse(stack, 25) && super.onItemUse(stack, player, world, x + x1, y, z + z1, par7, par8, par9, par10)) { - ElectricItem.manager.use(stack, 25, player); - Thaumcraft.proxy.blockSparkle(world, x + x1, y, z + z1, 8401408, 2); - if (!did) { - did = true; - } - } - } - } - if (!did && ElectricItem.manager.canUse(stack, 250)) { - did = Utils.useBonemealAtLoc(world, player, x, y, z); - if (!did) { - Block block = world.getBlock(x, y, z); - int meta = world.getBlockMetadata(x, y, z); - if ((block == ConfigBlocks.blockCustomPlant) && (meta == 0)) { - ((BlockCustomPlant) block).growGreatTree(world, x, y, z, world.rand); - Thaumcraft.proxy.blockSparkle(world, x, y, z, 0, 2); - did = true; - } - else if ((block == ConfigBlocks.blockCustomPlant) && (meta == 1)) { - ((BlockCustomPlant) block).growSilverTree(world, x, y, z, world.rand); - Thaumcraft.proxy.blockSparkle(world, x, y, z, 0, 2); - did = true; - } - } - else { - ElectricItem.manager.use(stack, 250, player); - Thaumcraft.proxy.blockSparkle(world, x, y, z, 0, 3); - } - if (did) { - world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "thaumcraft:wand", 0.75F, 0.9F + world.rand.nextFloat() * 0.2F); - } - } - if (stack.hasTagCompound()) { - stack.stackTagCompound.setBoolean("Unbreakable", false); - } - return did; - } + @Override + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10) { + if (stack.hasTagCompound()) { + stack.stackTagCompound.setBoolean("Unbreakable", true); + } + boolean did = false; + for (int x1 = -1; x1 <= 1; x1++) { + for (int z1 = -1; z1 <= 1; z1++) { + if (ElectricItem.manager.canUse(stack, 25) && super.onItemUse(stack, player, world, x + x1, y, z + z1, par7, par8, par9, par10)) { + ElectricItem.manager.use(stack, 25, player); + Thaumcraft.proxy.blockSparkle(world, x + x1, y, z + z1, 8401408, 2); + if (!did) { + did = true; + } + } + } + } + if (!did && ElectricItem.manager.canUse(stack, 250)) { + did = Utils.useBonemealAtLoc(world, player, x, y, z); + if (!did) { + Block block = world.getBlock(x, y, z); + int meta = world.getBlockMetadata(x, y, z); + if ((block == ConfigBlocks.blockCustomPlant) && (meta == 0)) { + ((BlockCustomPlant) block).growGreatTree(world, x, y, z, world.rand); + Thaumcraft.proxy.blockSparkle(world, x, y, z, 0, 2); + did = true; + } else if ((block == ConfigBlocks.blockCustomPlant) && (meta == 1)) { + ((BlockCustomPlant) block).growSilverTree(world, x, y, z, world.rand); + Thaumcraft.proxy.blockSparkle(world, x, y, z, 0, 2); + did = true; + } + } else { + ElectricItem.manager.use(stack, 250, player); + Thaumcraft.proxy.blockSparkle(world, x, y, z, 0, 3); + } + if (did) { + world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "thaumcraft:wand", 0.75F, 0.9F + world.rand.nextFloat() * 0.2F); + } + } + if (stack.hasTagCompound()) { + stack.stackTagCompound.setBoolean("Unbreakable", false); + } + return did; + } - /* IC2 API METHODS */ + /* IC2 API METHODS */ - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return true; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return true; + } - @Override - public double getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public double getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTier(ItemStack itemStack) { - return 2; - } + @Override + public int getTier(ItemStack itemStack) { + return 2; + } - @Override - public double getTransferLimit(ItemStack itemStack) { - return 1000; - } + @Override + public double getTransferLimit(ItemStack itemStack) { + return 1000; + } - @Override - public Item getChargedItem(ItemStack itemStack) { - return this; - } + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } - @Override - public Item getEmptyItem(ItemStack itemStack) { - return this; - } + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } } diff --git a/src/main/java/emt/item/tool/ItemElectricThorHammer.java b/src/main/java/emt/item/tool/ItemElectricThorHammer.java index bfc63ec..a29c1a2 100644 --- a/src/main/java/emt/item/tool/ItemElectricThorHammer.java +++ b/src/main/java/emt/item/tool/ItemElectricThorHammer.java @@ -25,9 +25,9 @@ import java.util.List; public class ItemElectricThorHammer extends ItemSword implements IElectricItem { - public int maxCharge = 2000000; private final int hitCost = 5000; private final int lightningCost = 75000; + public int maxCharge = 2000000; public ItemElectricThorHammer() { super(ToolMaterial.EMERALD); diff --git a/src/main/java/emt/item/tool/ItemThorHammer.java b/src/main/java/emt/item/tool/ItemThorHammer.java index a46a5e1..8f65e70 100644 --- a/src/main/java/emt/item/tool/ItemThorHammer.java +++ b/src/main/java/emt/item/tool/ItemThorHammer.java @@ -23,72 +23,70 @@ import java.util.List; public class ItemThorHammer extends ItemSword implements IRepairable { - public ItemThorHammer() { - super(ToolMaterial.EMERALD); - this.setCreativeTab(EMT.TAB); - this.setMaxDamage(2000); - } + public ItemThorHammer() { + super(ToolMaterial.EMERALD); + this.setCreativeTab(EMT.TAB); + this.setMaxDamage(2000); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":hammer/thorhammer"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":hammer/thorhammer"); + } - @Override - public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { - player.swingItem(); - float f = 1.0F; - float f1 = player.prevRotationPitch + ((player.rotationPitch - player.prevRotationPitch) * f); - float f2 = player.prevRotationYaw + ((player.rotationYaw - player.prevRotationYaw) * f); - double d = player.prevPosX + ((player.posX - player.prevPosX) * f); - double d1 = (player.prevPosY + ((player.posY - player.prevPosY) * f) + 1.6200000000000001D) - player.yOffset; - double d2 = player.prevPosZ + ((player.posZ - player.prevPosZ) * f); - Vec3 vec3d = Vec3.createVectorHelper(d, d1, d2); - float f3 = MathHelper.cos((-f2 * 0.01745329F) - 3.141593F); - float f4 = MathHelper.sin((-f2 * 0.01745329F) - 3.141593F); - float f5 = -MathHelper.cos(-f1 * 0.01745329F); - float f6 = MathHelper.sin(-f1 * 0.01745329F); - float f7 = f4 * f5; - float f8 = f6; - float f9 = f3 * f5; - double d3 = 5000D; - Vec3 vec3d1 = vec3d.addVector(f7 * d3, f8 * d3, f9 * d3); - MovingObjectPosition movingobjectposition = player.worldObj.rayTraceBlocks(vec3d, vec3d1, true); - if (movingobjectposition == null) { - return itemstack; - } - if (movingobjectposition.typeOfHit == MovingObjectType.BLOCK) { - int i = movingobjectposition.blockX; - int j = movingobjectposition.blockY; - int k = movingobjectposition.blockZ; - world.spawnEntityInWorld(new EntityLightningBolt(world, i, j, k)); - } - else if (movingobjectposition.typeOfHit == MovingObjectType.ENTITY) { - Entity entityhit = movingobjectposition.entityHit; - double x = entityhit.posX; - double y = entityhit.posY; - double z = entityhit.posZ; - world.spawnEntityInWorld(new EntityLightningBolt(world, x, y, z)); - } - if (player.capabilities.isCreativeMode) { - return itemstack; - } - else { - itemstack.damageItem(20, player); - return itemstack; - } - } + @Override + public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { + player.swingItem(); + float f = 1.0F; + float f1 = player.prevRotationPitch + ((player.rotationPitch - player.prevRotationPitch) * f); + float f2 = player.prevRotationYaw + ((player.rotationYaw - player.prevRotationYaw) * f); + double d = player.prevPosX + ((player.posX - player.prevPosX) * f); + double d1 = (player.prevPosY + ((player.posY - player.prevPosY) * f) + 1.6200000000000001D) - player.yOffset; + double d2 = player.prevPosZ + ((player.posZ - player.prevPosZ) * f); + Vec3 vec3d = Vec3.createVectorHelper(d, d1, d2); + float f3 = MathHelper.cos((-f2 * 0.01745329F) - 3.141593F); + float f4 = MathHelper.sin((-f2 * 0.01745329F) - 3.141593F); + float f5 = -MathHelper.cos(-f1 * 0.01745329F); + float f6 = MathHelper.sin(-f1 * 0.01745329F); + float f7 = f4 * f5; + float f8 = f6; + float f9 = f3 * f5; + double d3 = 5000D; + Vec3 vec3d1 = vec3d.addVector(f7 * d3, f8 * d3, f9 * d3); + MovingObjectPosition movingobjectposition = player.worldObj.rayTraceBlocks(vec3d, vec3d1, true); + if (movingobjectposition == null) { + return itemstack; + } + if (movingobjectposition.typeOfHit == MovingObjectType.BLOCK) { + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + world.spawnEntityInWorld(new EntityLightningBolt(world, i, j, k)); + } else if (movingobjectposition.typeOfHit == MovingObjectType.ENTITY) { + Entity entityhit = movingobjectposition.entityHit; + double x = entityhit.posX; + double y = entityhit.posY; + double z = entityhit.posZ; + world.spawnEntityInWorld(new EntityLightningBolt(world, x, y, z)); + } + if (player.capabilities.isCreativeMode) { + return itemstack; + } else { + itemstack.damageItem(20, player); + return itemstack; + } + } - @Override - public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { - entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F); - itemstack.damageItem(1, attacker); - return true; - } + @Override + public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { + entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F); + itemstack.damageItem(1, attacker); + return true; + } - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { - list.add(EMTTextHelper.localize("tooltip.EMT.hammer.broken.The Hammer of Thor")); - } + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add(EMTTextHelper.localize("tooltip.EMT.hammer.broken.The Hammer of Thor")); + } } diff --git a/src/main/java/emt/item/tool/ItemThorHammerBroken.java b/src/main/java/emt/item/tool/ItemThorHammerBroken.java index ba8de19..7fa2e6b 100644 --- a/src/main/java/emt/item/tool/ItemThorHammerBroken.java +++ b/src/main/java/emt/item/tool/ItemThorHammerBroken.java @@ -19,50 +19,49 @@ import java.util.List; public class ItemThorHammerBroken extends ItemSword implements IRepairable { - public ItemThorHammerBroken() { - super(ToolMaterial.EMERALD); - this.setCreativeTab(EMT.TAB); - this.setMaxDamage(1000); - } + public ItemThorHammerBroken() { + super(ToolMaterial.EMERALD); + this.setCreativeTab(EMT.TAB); + this.setMaxDamage(1000); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":hammer/taintedthorhammer"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":hammer/taintedthorhammer"); + } - @Override - public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { - player.swingItem(); - world.spawnEntityInWorld(new EntityAlumentum(world, player.posX + 8, player.posY, player.posZ - 8)); - world.spawnEntityInWorld(new EntityAlumentum(world, player.posX - 8, player.posY, player.posZ + 8)); - world.spawnEntityInWorld(new EntityAlumentum(world, player.posX - 8, player.posY, player.posZ - 8)); - world.spawnEntityInWorld(new EntityAlumentum(world, player.posX + 8, player.posY, player.posZ + 8)); - world.spawnEntityInWorld(new EntityAlumentum(world, player.posX, player.posY + 4, player.posZ)); - world.spawnEntityInWorld(new EntityAlumentum(world, player.posX, player.posY + 8, player.posZ)); + @Override + public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { + player.swingItem(); + world.spawnEntityInWorld(new EntityAlumentum(world, player.posX + 8, player.posY, player.posZ - 8)); + world.spawnEntityInWorld(new EntityAlumentum(world, player.posX - 8, player.posY, player.posZ + 8)); + world.spawnEntityInWorld(new EntityAlumentum(world, player.posX - 8, player.posY, player.posZ - 8)); + world.spawnEntityInWorld(new EntityAlumentum(world, player.posX + 8, player.posY, player.posZ + 8)); + world.spawnEntityInWorld(new EntityAlumentum(world, player.posX, player.posY + 4, player.posZ)); + world.spawnEntityInWorld(new EntityAlumentum(world, player.posX, player.posY + 8, player.posZ)); - if (!player.capabilities.isCreativeMode) { - itemstack.damageItem(20, player); - } - return itemstack; - } + if (!player.capabilities.isCreativeMode) { + itemstack.damageItem(20, player); + } + return itemstack; + } - @Override - public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { - entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 2F); - itemstack.damageItem(1, attacker); - return true; - } + @Override + public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { + entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 2F); + itemstack.damageItem(1, attacker); + return true; + } - @Override - public void addInformation(ItemStack stack, EntityPlayer entityPlayer, List list, boolean par4) { - list.add(EMTTextHelper.localize("tooltip.EMT.hammer.broken.thor")); - list.add(EMTTextHelper.localize("tooltip.EMT.hammer.broken.danger")); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - list.add(EMTTextHelper.localize("tooltip.EMT.hammer.broken.plsNoRightClick")); - } - else { - list.add(EMTTextHelper.localize("tooltip.EMT.hammer.broken.plsRightClick")); - } - } + @Override + public void addInformation(ItemStack stack, EntityPlayer entityPlayer, List list, boolean par4) { + list.add(EMTTextHelper.localize("tooltip.EMT.hammer.broken.thor")); + list.add(EMTTextHelper.localize("tooltip.EMT.hammer.broken.danger")); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + list.add(EMTTextHelper.localize("tooltip.EMT.hammer.broken.plsNoRightClick")); + } else { + list.add(EMTTextHelper.localize("tooltip.EMT.hammer.broken.plsRightClick")); + } + } } diff --git a/src/main/java/emt/item/tool/chainsaw/ItemDiamondChainsaw.java b/src/main/java/emt/item/tool/chainsaw/ItemDiamondChainsaw.java index 329c293..97de93b 100644 --- a/src/main/java/emt/item/tool/chainsaw/ItemDiamondChainsaw.java +++ b/src/main/java/emt/item/tool/chainsaw/ItemDiamondChainsaw.java @@ -36,250 +36,246 @@ import java.util.Random; public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem { - public int maxCharge = 50000; - public int cost = 200; - public int hitCost = 300; - public int tier = 2; + public int maxCharge = 50000; + public int cost = 200; + public int hitCost = 300; + public int tier = 2; - public ItemDiamondChainsaw() { - super(ToolMaterial.EMERALD); - this.efficiencyOnProperMaterial = 16F; - this.setCreativeTab(EMT.TAB); - this.setMaxDamage(27); - this.setMaxStackSize(1); - } + public ItemDiamondChainsaw() { + super(ToolMaterial.EMERALD); + this.efficiencyOnProperMaterial = 16F; + this.setCreativeTab(EMT.TAB); + this.setMaxDamage(27); + this.setMaxStackSize(1); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/chainsaw_diamond"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/chainsaw_diamond"); + } - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { - ElectricItem.manager.use(stack, cost, entityLiving); - return true; - } + @Override + public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { + ElectricItem.manager.use(stack, cost, entityLiving); + return true; + } - @Override - public boolean canHarvestBlock(Block block, ItemStack stack) { - return Items.diamond_axe.canHarvestBlock(block, stack) || Items.diamond_sword.canHarvestBlock(block, stack) || Items.shears.canHarvestBlock(block, stack); - } + @Override + public boolean canHarvestBlock(Block block, ItemStack stack) { + return Items.diamond_axe.canHarvestBlock(block, stack) || Items.diamond_sword.canHarvestBlock(block, stack) || Items.shears.canHarvestBlock(block, stack); + } - @Override - public float getDigSpeed(ItemStack stack, Block block, int meta) { - if (!ElectricItem.manager.canUse(stack, cost)) { - return 1.0F; - } + @Override + public float getDigSpeed(ItemStack stack, Block block, int meta) { + if (!ElectricItem.manager.canUse(stack, cost)) { + return 1.0F; + } - if (Items.wooden_axe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_sword.getDigSpeed(stack, block, meta) > 1.0F) { - return efficiencyOnProperMaterial; - } - else { - return super.getDigSpeed(stack, block, meta); - } - } + if (Items.wooden_axe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_sword.getDigSpeed(stack, block, meta) > 1.0F) { + return efficiencyOnProperMaterial; + } else { + return super.getDigSpeed(stack, block, meta); + } + } - @Override - public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { - if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { - entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F); - } - return false; - } + @Override + public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { + if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { + entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F); + } + return false; + } - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { - ItemStack itemStack = new ItemStack(this, 1); - if (getChargedItem(itemStack) == this) { - ItemStack charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); - itemList.add(charged); - } - if (getEmptyItem(itemStack) == this) { - itemList.add(new ItemStack(this, 1, getMaxDamage())); - } - } + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + if (getChargedItem(itemStack) == this) { + ItemStack charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); + itemList.add(charged); + } + if (getEmptyItem(itemStack) == this) { + itemList.add(new ItemStack(this, 1, getMaxDamage())); + } + } - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { - for (int i = 0; i < player.inventory.mainInventory.length; i++) { - ItemStack torchStack = player.inventory.mainInventory[i]; - if (torchStack == null) { - continue; - } - Item item = torchStack.getItem(); - if (!(item instanceof ItemBlock)) { - continue; - } - if (!(Block.getBlockFromItem(item) instanceof BlockTorch)) { - continue; - } - int oldMeta = torchStack.getItemDamage(); - int oldSize = torchStack.stackSize; - boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset); - if (player.capabilities.isCreativeMode) { - torchStack.setItemDamage(oldMeta); - torchStack.stackSize = oldSize; - } - else if (torchStack.stackSize <= 0) { - ForgeEventFactory.onPlayerDestroyItem(player, torchStack); - player.inventory.mainInventory[i] = null; - } - if (result) { - return true; - } - } + @Override + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { + for (int i = 0; i < player.inventory.mainInventory.length; i++) { + ItemStack torchStack = player.inventory.mainInventory[i]; + if (torchStack == null) { + continue; + } + Item item = torchStack.getItem(); + if (!(item instanceof ItemBlock)) { + continue; + } + if (!(Block.getBlockFromItem(item) instanceof BlockTorch)) { + continue; + } + int oldMeta = torchStack.getItemDamage(); + int oldSize = torchStack.stackSize; + boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset); + if (player.capabilities.isCreativeMode) { + torchStack.setItemDamage(oldMeta); + torchStack.stackSize = oldSize; + } else if (torchStack.stackSize <= 0) { + ForgeEventFactory.onPlayerDestroyItem(player, torchStack); + player.inventory.mainInventory[i] = null; + } + if (result) { + return true; + } + } - return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset); - } + return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset); + } - @Override - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!IC2.platform.isSimulating()) { - return super.onItemRightClick(stack, world, player); - } - if (IC2.keyboard.isModeSwitchKeyDown(player)) { - NBTTagCompound nbt = StackUtil.getOrCreateNbtData(stack); - if (!nbt.hasKey("shearsMode")) { - nbt.setBoolean("shearsMode", true); - } + @Override + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { + if (!IC2.platform.isSimulating()) { + return super.onItemRightClick(stack, world, player); + } + if (IC2.keyboard.isModeSwitchKeyDown(player)) { + NBTTagCompound nbt = StackUtil.getOrCreateNbtData(stack); + if (!nbt.hasKey("shearsMode")) { + nbt.setBoolean("shearsMode", true); + } - if (!nbt.getBoolean("shearsMode")) { - nbt.setBoolean("shearsMode", true); + if (!nbt.getBoolean("shearsMode")) { + nbt.setBoolean("shearsMode", true); - IC2.platform.messagePlayer(player, "ic2.tooltip.mode", "ic2.tooltip.mode.normal"); - } - else { - nbt.setBoolean("shearsMode", false); - IC2.platform.messagePlayer(player, "ic2.tooltip.mode", "ic2.tooltip.mode.noShear"); - } - } - return super.onItemRightClick(stack, world, player); - } + IC2.platform.messagePlayer(player, "ic2.tooltip.mode", "ic2.tooltip.mode.normal"); + } else { + nbt.setBoolean("shearsMode", false); + IC2.platform.messagePlayer(player, "ic2.tooltip.mode", "ic2.tooltip.mode.noShear"); + } + } + return super.onItemRightClick(stack, world, player); + } - @Override - public boolean onBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) { - NBTTagCompound nbt = StackUtil.getOrCreateNbtData(itemstack); - if (!nbt.hasKey("shearsMode")) { - nbt.setBoolean("shearsMode", true); - } - if (!nbt.getBoolean("shearsMode") || player.worldObj.isRemote) { - return false; - } + @Override + public boolean onBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) { + NBTTagCompound nbt = StackUtil.getOrCreateNbtData(itemstack); + if (!nbt.hasKey("shearsMode")) { + nbt.setBoolean("shearsMode", true); + } + if (!nbt.getBoolean("shearsMode") || player.worldObj.isRemote) { + return false; + } - Block block = player.worldObj.getBlock(x, y, z); - if (block instanceof IShearable) { - IShearable target = (IShearable) block; - if (target.isShearable(itemstack, player.worldObj, x, y, z)) { - ArrayList drops = target.onSheared(itemstack, player.worldObj, x, y, z, EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, itemstack)); - Random rand = new Random(); + Block block = player.worldObj.getBlock(x, y, z); + if (block instanceof IShearable) { + IShearable target = (IShearable) block; + if (target.isShearable(itemstack, player.worldObj, x, y, z)) { + ArrayList drops = target.onSheared(itemstack, player.worldObj, x, y, z, EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, itemstack)); + Random rand = new Random(); - for (ItemStack stack : drops) { - float f = 0.7F; - double xOffset = (double) (rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D; - double yOffset = (double) (rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D; - double zOffset = (double) (rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D; - EntityItem entityitem = new EntityItem(player.worldObj, (double) x + xOffset, (double) y + yOffset, (double) z + zOffset, stack); - entityitem.delayBeforeCanPickup = 10; - player.worldObj.spawnEntityInWorld(entityitem); - } + for (ItemStack stack : drops) { + float f = 0.7F; + double xOffset = (double) (rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D; + double yOffset = (double) (rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D; + double zOffset = (double) (rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D; + EntityItem entityitem = new EntityItem(player.worldObj, (double) x + xOffset, (double) y + yOffset, (double) z + zOffset, stack); + entityitem.delayBeforeCanPickup = 10; + player.worldObj.spawnEntityInWorld(entityitem); + } - player.addStat(StatList.mineBlockStatArray[Block.getIdFromBlock(block)], 1); - } - } - return false; - } + player.addStat(StatList.mineBlockStatArray[Block.getIdFromBlock(block)], 1); + } + } + return false; + } - @Override - public boolean itemInteractionForEntity(ItemStack itemstack, EntityPlayer player, EntityLivingBase entity) { - NBTTagCompound nbt = StackUtil.getOrCreateNbtData(itemstack); - if (!nbt.hasKey("shearsMode")) { - nbt.setBoolean("shearsMode", true); - } - - if (!nbt.getBoolean("shearsMode") || entity.worldObj.isRemote) { - return false; - } - if (entity instanceof IShearable) { - IShearable target = (IShearable) entity; - if (target.isShearable(itemstack, entity.worldObj, (int) entity.posX, (int) entity.posY, (int) entity.posZ)) { - ArrayList drops = target.onSheared(itemstack, entity.worldObj, (int) entity.posX, (int) entity.posY, (int) entity.posZ, EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, itemstack)); + @Override + public boolean itemInteractionForEntity(ItemStack itemstack, EntityPlayer player, EntityLivingBase entity) { + NBTTagCompound nbt = StackUtil.getOrCreateNbtData(itemstack); + if (!nbt.hasKey("shearsMode")) { + nbt.setBoolean("shearsMode", true); + } - Random rand = new Random(); - for (ItemStack stack : drops) { - EntityItem ent = entity.entityDropItem(stack, 1.0F); - ent.motionY += rand.nextFloat() * 0.05F; - ent.motionX += (rand.nextFloat() - rand.nextFloat()) * 0.1F; - ent.motionZ += (rand.nextFloat() - rand.nextFloat()) * 0.1F; - } - } - return true; - } - return false; - } + if (!nbt.getBoolean("shearsMode") || entity.worldObj.isRemote) { + return false; + } + if (entity instanceof IShearable) { + IShearable target = (IShearable) entity; + if (target.isShearable(itemstack, entity.worldObj, (int) entity.posX, (int) entity.posY, (int) entity.posZ)) { + ArrayList drops = target.onSheared(itemstack, entity.worldObj, (int) entity.posX, (int) entity.posY, (int) entity.posZ, EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, itemstack)); - @Override - public void onUpdate(ItemStack stack, World world, Entity entity, int i, boolean flag) { - if (entity instanceof EntityLivingBase) { + Random rand = new Random(); + for (ItemStack stack : drops) { + EntityItem ent = entity.entityDropItem(stack, 1.0F); + ent.motionY += rand.nextFloat() * 0.05F; + ent.motionX += (rand.nextFloat() - rand.nextFloat()) * 0.1F; + ent.motionZ += (rand.nextFloat() - rand.nextFloat()) * 0.1F; + } + } + return true; + } + return false; + } - NBTTagCompound nbt = StackUtil.getOrCreateNbtData(stack); - if (!nbt.hasKey("shearsMode")) { - nbt.setBoolean("shearsMode", true); - } + @Override + public void onUpdate(ItemStack stack, World world, Entity entity, int i, boolean flag) { + if (entity instanceof EntityLivingBase) { - } - } + NBTTagCompound nbt = StackUtil.getOrCreateNbtData(stack); + if (!nbt.hasKey("shearsMode")) { + nbt.setBoolean("shearsMode", true); + } - @Override - public boolean isRepairable() { - return false; - } + } + } - @Override - public int getItemEnchantability() { - if (EMTConfigHandler.enchanting == false) { - return 0; - } - else { - return 4; - } - } + @Override + public boolean isRepairable() { + return false; + } - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - return EMTConfigHandler.enchanting; - } + @Override + public int getItemEnchantability() { + if (EMTConfigHandler.enchanting == false) { + return 0; + } else { + return 4; + } + } - /* IC2 API METHODS */ + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + return EMTConfigHandler.enchanting; + } - @Override - public Item getChargedItem(ItemStack itemStack) { - return this; - } + /* IC2 API METHODS */ - @Override - public Item getEmptyItem(ItemStack itemStack) { - return this; - } + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } - @Override - public double getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public int getTier(ItemStack itemStack) { - return tier; - } + @Override + public double getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public double getTransferLimit(ItemStack itemStack) { - return 300; - } + @Override + public int getTier(ItemStack itemStack) { + return tier; + } + + @Override + public double getTransferLimit(ItemStack itemStack) { + return 300; + } } diff --git a/src/main/java/emt/item/tool/chainsaw/ItemStreamChainsaw.java b/src/main/java/emt/item/tool/chainsaw/ItemStreamChainsaw.java index 81b12e1..f0baa41 100644 --- a/src/main/java/emt/item/tool/chainsaw/ItemStreamChainsaw.java +++ b/src/main/java/emt/item/tool/chainsaw/ItemStreamChainsaw.java @@ -21,74 +21,73 @@ import java.util.ArrayList; public class ItemStreamChainsaw extends ItemThaumiumChainsaw { - boolean alternateServer; - boolean alternateClient; - public static ArrayList oreDictLogs = new ArrayList(); + public static ArrayList oreDictLogs = new ArrayList(); + boolean alternateServer; + boolean alternateClient; - public ItemStreamChainsaw() { - this.efficiencyOnProperMaterial = 25F; - alternateServer = false; - alternateClient = false; - setCreativeTab(EMT.TAB); - this.maxStackSize = 1; - this.setMaxDamage(27); - maxCharge = 1000000; - cost = 400; - hitCost = 500; - tier = 3; - } + public ItemStreamChainsaw() { + this.efficiencyOnProperMaterial = 25F; + alternateServer = false; + alternateClient = false; + setCreativeTab(EMT.TAB); + this.maxStackSize = 1; + this.setMaxDamage(27); + maxCharge = 1000000; + cost = 400; + hitCost = 500; + tier = 3; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/chainsaw_stream"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/chainsaw_stream"); + } - @Override - public EnumAction getItemUseAction(ItemStack itemstack) { - return EnumAction.bow; - } + @Override + public EnumAction getItemUseAction(ItemStack itemstack) { + return EnumAction.bow; + } - @Override - public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10) { - Block bi = world.getBlock(x, y, z); - if ((!player.isSneaking()) && (Utils.isWoodLog(world, x, y, z)) && ElectricItem.manager.getCharge(itemstack) > cost) { - if (!world.isRemote) { - if (BlockUtils.breakFurthestBlock(world, x, y, z, bi, player)) { - world.playSoundEffect(x, y, z, "thaumcraft:bubble", 0.15F, 1.0F); - ElectricItem.manager.use(itemstack, cost, player); - this.alternateServer = (!this.alternateServer); - } - } - else { - player.swingItem(); - ElectricItem.manager.use(itemstack, cost, player); - this.alternateClient = (!this.alternateClient); - } - } - return super.onItemUse(itemstack, player, world, x, y, z, par7, par8, par9, par10); - } + @Override + public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10) { + Block bi = world.getBlock(x, y, z); + if ((!player.isSneaking()) && (Utils.isWoodLog(world, x, y, z)) && ElectricItem.manager.getCharge(itemstack) > cost) { + if (!world.isRemote) { + if (BlockUtils.breakFurthestBlock(world, x, y, z, bi, player)) { + world.playSoundEffect(x, y, z, "thaumcraft:bubble", 0.15F, 1.0F); + ElectricItem.manager.use(itemstack, cost, player); + this.alternateServer = (!this.alternateServer); + } + } else { + player.swingItem(); + ElectricItem.manager.use(itemstack, cost, player); + this.alternateClient = (!this.alternateClient); + } + } + return super.onItemUse(itemstack, player, world, x, y, z, par7, par8, par9, par10); + } - @Override - public boolean onBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) { - World world = player.worldObj; - Block bi = world.getBlock(x, y, z); - if ((!player.isSneaking()) && (Utils.isWoodLog(world, x, y, z))) { - if (!world.isRemote) { - BlockUtils.breakFurthestBlock(world, x, y, z, bi, player); - PacketHandler.INSTANCE.sendToAllAround(new PacketFXBlockBubble(x, y, z, new Color(0.33F, 0.33F, 1.0F).getRGB()), new NetworkRegistry.TargetPoint(world.provider.dimensionId, x, y, z, 32.0D)); + @Override + public boolean onBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) { + World world = player.worldObj; + Block bi = world.getBlock(x, y, z); + if ((!player.isSneaking()) && (Utils.isWoodLog(world, x, y, z))) { + if (!world.isRemote) { + BlockUtils.breakFurthestBlock(world, x, y, z, bi, player); + PacketHandler.INSTANCE.sendToAllAround(new PacketFXBlockBubble(x, y, z, new Color(0.33F, 0.33F, 1.0F).getRGB()), new NetworkRegistry.TargetPoint(world.provider.dimensionId, x, y, z, 32.0D)); - world.playSoundEffect(x, y, z, "thaumcraft:bubble", 0.15F, 1.0F); - } - ElectricItem.manager.use(itemstack, cost, player); - return true; - } - return super.onBlockStartBreak(itemstack, x, y, z, player); - } + world.playSoundEffect(x, y, z, "thaumcraft:bubble", 0.15F, 1.0F); + } + ElectricItem.manager.use(itemstack, cost, player); + return true; + } + return super.onBlockStartBreak(itemstack, x, y, z, player); + } - /* IC2 API METHODS */ - @Override - public double getTransferLimit(ItemStack itemStack) { - return 900; - } + /* IC2 API METHODS */ + @Override + public double getTransferLimit(ItemStack itemStack) { + return 900; + } } diff --git a/src/main/java/emt/item/tool/chainsaw/ItemThaumiumChainsaw.java b/src/main/java/emt/item/tool/chainsaw/ItemThaumiumChainsaw.java index 7e1d361..2be8a73 100644 --- a/src/main/java/emt/item/tool/chainsaw/ItemThaumiumChainsaw.java +++ b/src/main/java/emt/item/tool/chainsaw/ItemThaumiumChainsaw.java @@ -14,38 +14,38 @@ import net.minecraft.world.World; public class ItemThaumiumChainsaw extends ItemDiamondChainsaw { - public ItemThaumiumChainsaw() { - this.efficiencyOnProperMaterial = 21F; - this.setCreativeTab(EMT.TAB); - this.setMaxDamage(27); - this.setMaxStackSize(1); - maxCharge = 100000; - cost = 250; - hitCost = 350; - } + public ItemThaumiumChainsaw() { + this.efficiencyOnProperMaterial = 21F; + this.setCreativeTab(EMT.TAB); + this.setMaxDamage(27); + this.setMaxStackSize(1); + maxCharge = 100000; + cost = 250; + hitCost = 350; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/chainsaw_thaumium"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/chainsaw_thaumium"); + } - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { - ElectricItem.manager.use(stack, cost, entityLiving); - return true; - } + @Override + public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { + ElectricItem.manager.use(stack, cost, entityLiving); + return true; + } - @Override - public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { - if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { - entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F); - } - return false; - } + @Override + public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { + if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { + entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F); + } + return false; + } - @Override - public double getTransferLimit(ItemStack itemStack) { - return 600; - } + @Override + public double getTransferLimit(ItemStack itemStack) { + return 600; + } } diff --git a/src/main/java/emt/item/tool/drill/ItemRockbreakerDrill.java b/src/main/java/emt/item/tool/drill/ItemRockbreakerDrill.java index 6556dd4..6905377 100644 --- a/src/main/java/emt/item/tool/drill/ItemRockbreakerDrill.java +++ b/src/main/java/emt/item/tool/drill/ItemRockbreakerDrill.java @@ -33,168 +33,162 @@ import java.util.Locale; public class ItemRockbreakerDrill extends ItemThaumiumDrill { - private static final Block[] isEffective = { Blocks.nether_brick, Blocks.netherrack, Blocks.glowstone, Blocks.iron_block, Blocks.gold_block, Blocks.diamond_block, Blocks.lapis_block, Blocks.redstone_block, Blocks.redstone_ore, Blocks.emerald_ore, Blocks.emerald_block, Blocks.stonebrick, Blocks.glass, Blocks.stone, Blocks.gold_ore, Blocks.iron_ore, Blocks.coal_ore, Blocks.cobblestone, - Blocks.diamond_ore, Blocks.lapis_ore, Blocks.dirt, Blocks.gravel, Blocks.sand, Blocks.sandstone, Blocks.soul_sand, Blocks.clay, Blocks.grass, Blocks.snow_layer, Blocks.snow, Blocks.farmland, Blocks.hardened_clay, Blocks.stained_hardened_clay, Blocks.mossy_cobblestone }; - int side; - public int searchCost = 1000; - public int hitCost = 400; + private static final Block[] isEffective = {Blocks.nether_brick, Blocks.netherrack, Blocks.glowstone, Blocks.iron_block, Blocks.gold_block, Blocks.diamond_block, Blocks.lapis_block, Blocks.redstone_block, Blocks.redstone_ore, Blocks.emerald_ore, Blocks.emerald_block, Blocks.stonebrick, Blocks.glass, Blocks.stone, Blocks.gold_ore, Blocks.iron_ore, Blocks.coal_ore, Blocks.cobblestone, + Blocks.diamond_ore, Blocks.lapis_ore, Blocks.dirt, Blocks.gravel, Blocks.sand, Blocks.sandstone, Blocks.soul_sand, Blocks.clay, Blocks.grass, Blocks.snow_layer, Blocks.snow, Blocks.farmland, Blocks.hardened_clay, Blocks.stained_hardened_clay, Blocks.mossy_cobblestone}; + public int searchCost = 1000; + public int hitCost = 400; + int side; - public ItemRockbreakerDrill() { - side = 0; - setCreativeTab(EMT.TAB); - this.efficiencyOnProperMaterial = 25F; - this.setMaxStackSize(1); - if (EMTConfigHandler.toolsInBore == false) { - this.setMaxDamage(27); - } - else { - this.setMaxDamage(2571); - } - maxCharge = 1000000; - transferLimit = 1000; - tier = 3; - } + public ItemRockbreakerDrill() { + side = 0; + setCreativeTab(EMT.TAB); + this.efficiencyOnProperMaterial = 25F; + this.setMaxStackSize(1); + if (EMTConfigHandler.toolsInBore == false) { + this.setMaxDamage(27); + } else { + this.setMaxDamage(2571); + } + maxCharge = 1000000; + transferLimit = 1000; + tier = 3; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/drill_rockbreaker"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/drill_rockbreaker"); + } - private boolean isEffectiveAgainst(Block block) { - for (int var3 = 0; var3 < isEffective.length; var3++) { - if (isEffective[var3] == block) { - return true; - } - } - return false; - } + private boolean isEffectiveAgainst(Block block) { + for (int var3 = 0; var3 < isEffective.length; var3++) { + if (isEffective[var3] == block) { + return true; + } + } + return false; + } - @Override - public boolean onBlockStartBreak(ItemStack itemstack, int X, int Y, int Z, EntityPlayer player) { - MovingObjectPosition movingobjectposition = BlockUtils.getTargetBlock(((Entity) (player)).worldObj, player, true); - if (movingobjectposition != null && movingobjectposition.typeOfHit == MovingObjectType.BLOCK) { - side = movingobjectposition.sideHit; - } - return super.onBlockStartBreak(itemstack, X, Y, Z, player); - } + @Override + public boolean onBlockStartBreak(ItemStack itemstack, int X, int Y, int Z, EntityPlayer player) { + MovingObjectPosition movingobjectposition = BlockUtils.getTargetBlock(((Entity) (player)).worldObj, player, true); + if (movingobjectposition != null && movingobjectposition.typeOfHit == MovingObjectType.BLOCK) { + side = movingobjectposition.sideHit; + } + return super.onBlockStartBreak(itemstack, X, Y, Z, player); + } - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int x, int y, int z, EntityLivingBase entityLiving) { - if (EMTConfigHandler.toolsInBore == false) { - cost = 350; - } - else { - cost = 1; - } - if (entityLiving.isSneaking()) { - if (ElectricItem.manager.canUse(stack, cost)) { - ElectricItem.manager.use(stack, cost, entityLiving); - } - return true; - } - int md = world.getBlockMetadata(x, y, z); - if (ForgeHooks.isToolEffective(stack, block, md) || isEffectiveAgainst(block)) { - for (int aa = -1; aa <= 1; aa++) { - for (int bb = -1; bb <= 1; bb++) { - int xx = 0; - int yy = 0; - int zz = 0; - if (side <= 1) { - xx = aa; - zz = bb; - } - else if (side <= 3) { - xx = aa; - yy = bb; - } - else { - zz = aa; - yy = bb; - } - Block bl = world.getBlock(x + xx, y + yy, z + zz); - md = world.getBlockMetadata(x + xx, y + yy, z + zz); - if (!ForgeHooks.isToolEffective(stack, bl, md) && !isEffectiveAgainst(bl)) { - continue; - } - if (ElectricItem.manager.canUse(stack, cost)) { - ElectricItem.manager.use(stack, cost, entityLiving); - } - int fortune = EnchantmentHelper.getFortuneModifier(entityLiving); - world.setBlockToAir(x + xx, y + yy, z + zz); - ArrayList ret = bl.getDrops(world, x + xx, y + yy, z + zz, md, fortune); - boolean creative = false; - if ((entityLiving instanceof EntityPlayer) && ((EntityPlayer) entityLiving).capabilities.isCreativeMode) { - creative = true; - } - if (ret.size() <= 0 || creative || ((Entity) (entityLiving)).worldObj.isRemote) { - continue; - } - ItemStack is; - for (Iterator i$ = ret.iterator(); i$.hasNext(); world.spawnEntityInWorld(new EntityFollowingItem(world, (double) x + (double) xx + 0.5D, (double) y + (double) yy + 0.5D, (double) z + (double) zz + 0.5D, is, entityLiving, 3))) { - is = (ItemStack) i$.next(); - } - } - } - } - return true; - } + @Override + public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int x, int y, int z, EntityLivingBase entityLiving) { + if (EMTConfigHandler.toolsInBore == false) { + cost = 350; + } else { + cost = 1; + } + if (entityLiving.isSneaking()) { + if (ElectricItem.manager.canUse(stack, cost)) { + ElectricItem.manager.use(stack, cost, entityLiving); + } + return true; + } + int md = world.getBlockMetadata(x, y, z); + if (ForgeHooks.isToolEffective(stack, block, md) || isEffectiveAgainst(block)) { + for (int aa = -1; aa <= 1; aa++) { + for (int bb = -1; bb <= 1; bb++) { + int xx = 0; + int yy = 0; + int zz = 0; + if (side <= 1) { + xx = aa; + zz = bb; + } else if (side <= 3) { + xx = aa; + yy = bb; + } else { + zz = aa; + yy = bb; + } + Block bl = world.getBlock(x + xx, y + yy, z + zz); + md = world.getBlockMetadata(x + xx, y + yy, z + zz); + if (!ForgeHooks.isToolEffective(stack, bl, md) && !isEffectiveAgainst(bl)) { + continue; + } + if (ElectricItem.manager.canUse(stack, cost)) { + ElectricItem.manager.use(stack, cost, entityLiving); + } + int fortune = EnchantmentHelper.getFortuneModifier(entityLiving); + world.setBlockToAir(x + xx, y + yy, z + zz); + ArrayList ret = bl.getDrops(world, x + xx, y + yy, z + zz, md, fortune); + boolean creative = false; + if ((entityLiving instanceof EntityPlayer) && ((EntityPlayer) entityLiving).capabilities.isCreativeMode) { + creative = true; + } + if (ret.size() <= 0 || creative || ((Entity) (entityLiving)).worldObj.isRemote) { + continue; + } + ItemStack is; + for (Iterator i$ = ret.iterator(); i$.hasNext(); world.spawnEntityInWorld(new EntityFollowingItem(world, (double) x + (double) xx + 0.5D, (double) y + (double) yy + 0.5D, (double) z + (double) zz + 0.5D, is, entityLiving, 3))) { + is = (ItemStack) i$.next(); + } + } + } + } + return true; + } - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { - if (!player.isSneaking()) { - for (int i = 0; i < player.inventory.mainInventory.length; i++) { - ItemStack torchStack = player.inventory.mainInventory[i]; - if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase(Locale.US).contains("torch")) { - continue; - } - Item item = torchStack.getItem(); - if (!(item instanceof ItemBlock)) { - continue; - } - int oldMeta = torchStack.getItemDamage(); - int oldSize = torchStack.stackSize; - boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset); - if (player.capabilities.isCreativeMode) { - torchStack.setItemDamage(oldMeta); - torchStack.stackSize = oldSize; - } - else if (torchStack.stackSize <= 0) { - ForgeEventFactory.onPlayerDestroyItem(player, torchStack); - player.inventory.mainInventory[i] = null; - } - if (result) { - return true; - } - } - } - else { - ElectricItem.manager.use(stack, searchCost, player); - if (!world.isRemote) { - world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "thaumcraft:wandfail", 0.2F, 0.2F + world.rand.nextFloat() * 0.2F); - return super.onItemUse(stack, player, world, x, y, z, side, xOffset, xOffset, zOffset); - } - Minecraft mc = Minecraft.getMinecraft(); - Thaumcraft.instance.renderEventHandler.startScan(player, x, y, z, System.currentTimeMillis() + 5000L, 1); - player.swingItem(); - return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset); - } + @Override + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { + if (!player.isSneaking()) { + for (int i = 0; i < player.inventory.mainInventory.length; i++) { + ItemStack torchStack = player.inventory.mainInventory[i]; + if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase(Locale.US).contains("torch")) { + continue; + } + Item item = torchStack.getItem(); + if (!(item instanceof ItemBlock)) { + continue; + } + int oldMeta = torchStack.getItemDamage(); + int oldSize = torchStack.stackSize; + boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset); + if (player.capabilities.isCreativeMode) { + torchStack.setItemDamage(oldMeta); + torchStack.stackSize = oldSize; + } else if (torchStack.stackSize <= 0) { + ForgeEventFactory.onPlayerDestroyItem(player, torchStack); + player.inventory.mainInventory[i] = null; + } + if (result) { + return true; + } + } + } else { + ElectricItem.manager.use(stack, searchCost, player); + if (!world.isRemote) { + world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "thaumcraft:wandfail", 0.2F, 0.2F + world.rand.nextFloat() * 0.2F); + return super.onItemUse(stack, player, world, x, y, z, side, xOffset, xOffset, zOffset); + } + Minecraft mc = Minecraft.getMinecraft(); + Thaumcraft.instance.renderEventHandler.startScan(player, x, y, z, System.currentTimeMillis() + 5000L, 1); + player.swingItem(); + return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset); + } - return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset); - } + return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset); + } - public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) { - if (!((Entity) (player)).worldObj.isRemote && (!(entity instanceof EntityPlayer) || MinecraftServer.getServer().isPVPEnabled())) { - entity.setFire(2); - } - return super.onLeftClickEntity(stack, player, entity); - } + public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) { + if (!((Entity) (player)).worldObj.isRemote && (!(entity instanceof EntityPlayer) || MinecraftServer.getServer().isPVPEnabled())) { + entity.setFire(2); + } + return super.onLeftClickEntity(stack, player, entity); + } - @Override - public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { - if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { - entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F); - } - return false; - } + @Override + public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { + if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { + entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F); + } + return false; + } } diff --git a/src/main/java/emt/item/tool/drill/ItemThaumiumDrill.java b/src/main/java/emt/item/tool/drill/ItemThaumiumDrill.java index c91a894..eb02a74 100644 --- a/src/main/java/emt/item/tool/drill/ItemThaumiumDrill.java +++ b/src/main/java/emt/item/tool/drill/ItemThaumiumDrill.java @@ -20,126 +20,122 @@ import java.util.List; public class ItemThaumiumDrill extends ItemPickaxe implements IElectricItem { - public int maxCharge = 100000; - public int cost; - public int tier = 2; - public double transferLimit = 100; + public int maxCharge = 100000; + public int cost; + public int tier = 2; + public double transferLimit = 100; - public ItemThaumiumDrill() { - super(ToolMaterial.EMERALD); - this.efficiencyOnProperMaterial = 20F; - this.setCreativeTab(EMT.TAB); - this.setMaxStackSize(1); - if (EMTConfigHandler.toolsInBore == false) { - this.setMaxDamage(27); - } - else { - this.setMaxDamage(240); - } - } + public ItemThaumiumDrill() { + super(ToolMaterial.EMERALD); + this.efficiencyOnProperMaterial = 20F; + this.setCreativeTab(EMT.TAB); + this.setMaxStackSize(1); + if (EMTConfigHandler.toolsInBore == false) { + this.setMaxDamage(27); + } else { + this.setMaxDamage(240); + } + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/drill_thaumium"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/drill_thaumium"); + } - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { - ItemStack itemStack = new ItemStack(this, 1); - if (getChargedItem(itemStack) == this) { - ItemStack charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); - itemList.add(charged); - } - if (getEmptyItem(itemStack) == this) { - itemList.add(new ItemStack(this, 1, getMaxDamage())); - } - } + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + if (getChargedItem(itemStack) == this) { + ItemStack charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); + itemList.add(charged); + } + if (getEmptyItem(itemStack) == this) { + itemList.add(new ItemStack(this, 1, getMaxDamage())); + } + } - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { - if (EMTConfigHandler.toolsInBore == false) { - cost = 250; - } - else { - cost = 1; - } - ElectricItem.manager.use(stack, cost, entityLiving); - return true; - } + @Override + public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { + if (EMTConfigHandler.toolsInBore == false) { + cost = 250; + } else { + cost = 1; + } + ElectricItem.manager.use(stack, cost, entityLiving); + return true; + } - @Override - public boolean canHarvestBlock(Block block, ItemStack stack) { - return Items.diamond_pickaxe.canHarvestBlock(block, stack) || Items.diamond_shovel.canHarvestBlock(block, stack); - } + @Override + public boolean canHarvestBlock(Block block, ItemStack stack) { + return Items.diamond_pickaxe.canHarvestBlock(block, stack) || Items.diamond_shovel.canHarvestBlock(block, stack); + } - @Override - public float getDigSpeed(ItemStack stack, Block block, int meta) { - if (!ElectricItem.manager.canUse(stack, cost)) { - return 1.0F; - } + @Override + public float getDigSpeed(ItemStack stack, Block block, int meta) { + if (!ElectricItem.manager.canUse(stack, cost)) { + return 1.0F; + } - if (Items.wooden_pickaxe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F) { - return efficiencyOnProperMaterial; - } - else { - return super.getDigSpeed(stack, block, meta); - } - } + if (Items.wooden_pickaxe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F) { + return efficiencyOnProperMaterial; + } else { + return super.getDigSpeed(stack, block, meta); + } + } - @Override - public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase entityliving1) { - return true; - } + @Override + public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase entityliving1) { + return true; + } - @Override - public boolean isRepairable() { - return false; - } + @Override + public boolean isRepairable() { + return false; + } - @Override - public int getItemEnchantability() { - if (EMTConfigHandler.enchanting == false) { - return 0; - } - else { - return 4; - } - } + @Override + public int getItemEnchantability() { + if (EMTConfigHandler.enchanting == false) { + return 0; + } else { + return 4; + } + } - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - return EMTConfigHandler.enchanting; - } + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + return EMTConfigHandler.enchanting; + } - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public double getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public double getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTier(ItemStack itemStack) { - return tier; - } + @Override + public int getTier(ItemStack itemStack) { + return tier; + } - @Override - public double getTransferLimit(ItemStack itemStack) { - return transferLimit; - } + @Override + public double getTransferLimit(ItemStack itemStack) { + return transferLimit; + } - @Override - public Item getChargedItem(ItemStack itemStack) { - return this; - } + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } - @Override - public Item getEmptyItem(ItemStack itemStack) { - return this; - } + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } } diff --git a/src/main/java/emt/item/tool/omnitool/ItemOmnitoolDiamond.java b/src/main/java/emt/item/tool/omnitool/ItemOmnitoolDiamond.java index d498e59..bb6116f 100644 --- a/src/main/java/emt/item/tool/omnitool/ItemOmnitoolDiamond.java +++ b/src/main/java/emt/item/tool/omnitool/ItemOmnitoolDiamond.java @@ -15,50 +15,48 @@ import net.minecraft.world.World; public class ItemOmnitoolDiamond extends ItemOmnitoolIron { - public ItemOmnitoolDiamond() { - super(); - this.efficiencyOnProperMaterial = 16F; - this.setCreativeTab(EMT.TAB); - this.setMaxStackSize(1); - if (!EMTConfigHandler.toolsInBore) { - this.setMaxDamage(27); - } - else { - this.setMaxDamage(350); - } - maxCharge = 100000; - hitCost = 250; - } + public ItemOmnitoolDiamond() { + super(); + this.efficiencyOnProperMaterial = 16F; + this.setCreativeTab(EMT.TAB); + this.setMaxStackSize(1); + if (!EMTConfigHandler.toolsInBore) { + this.setMaxDamage(27); + } else { + this.setMaxDamage(350); + } + maxCharge = 100000; + hitCost = 250; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/omnitool_diamond"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/omnitool_diamond"); + } - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { - if (!EMTConfigHandler.toolsInBore) { - cost = 200; - } - else { - cost = 1; - } - ElectricItem.manager.use(stack, cost, entityLiving); - return true; - } + @Override + public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { + if (!EMTConfigHandler.toolsInBore) { + cost = 200; + } else { + cost = 1; + } + ElectricItem.manager.use(stack, cost, entityLiving); + return true; + } - @Override - public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { - if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { - entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 10F); - } - return false; - } + @Override + public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { + if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { + entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 10F); + } + return false; + } - /* IC2 API METHODS */ - @Override - public double getTransferLimit(ItemStack itemStack) { - return 400; - } + /* IC2 API METHODS */ + @Override + public double getTransferLimit(ItemStack itemStack) { + return 400; + } } diff --git a/src/main/java/emt/item/tool/omnitool/ItemOmnitoolIron.java b/src/main/java/emt/item/tool/omnitool/ItemOmnitoolIron.java index 7be7310..ce9388b 100644 --- a/src/main/java/emt/item/tool/omnitool/ItemOmnitoolIron.java +++ b/src/main/java/emt/item/tool/omnitool/ItemOmnitoolIron.java @@ -25,162 +25,155 @@ import java.util.Locale; public class ItemOmnitoolIron extends ItemPickaxe implements IElectricItem { - public int maxCharge = 50000; - public int cost; - public int hitCost = 125; + public int maxCharge = 50000; + public int cost; + public int hitCost = 125; - public ItemOmnitoolIron() { - super(ToolMaterial.EMERALD); - this.efficiencyOnProperMaterial = 13F; - this.setCreativeTab(EMT.TAB); - this.setMaxStackSize(1); - if (!EMTConfigHandler.toolsInBore) { - this.setMaxDamage(27); - } - else { - this.setMaxDamage(200); - } - } + public ItemOmnitoolIron() { + super(ToolMaterial.EMERALD); + this.efficiencyOnProperMaterial = 13F; + this.setCreativeTab(EMT.TAB); + this.setMaxStackSize(1); + if (!EMTConfigHandler.toolsInBore) { + this.setMaxDamage(27); + } else { + this.setMaxDamage(200); + } + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/omnitool_iron"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/omnitool_iron"); + } - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { - ItemStack itemStack = new ItemStack(this, 1); - if (getChargedItem(itemStack) == this) { - ItemStack charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); - itemList.add(charged); - } - if (getEmptyItem(itemStack) == this) { - itemList.add(new ItemStack(this, 1, getMaxDamage())); - } - } + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + if (getChargedItem(itemStack) == this) { + ItemStack charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); + itemList.add(charged); + } + if (getEmptyItem(itemStack) == this) { + itemList.add(new ItemStack(this, 1, getMaxDamage())); + } + } - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) + @Override + public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { + if (!EMTConfigHandler.toolsInBore) { + cost = 100; + } else { + cost = 1; + } + ElectricItem.manager.use(stack, cost, entityLiving); + return true; + } - { - if (!EMTConfigHandler.toolsInBore) { - cost = 100; - } - else { - cost = 1; - } - ElectricItem.manager.use(stack, cost, entityLiving); - return true; - } + @Override + public boolean canHarvestBlock(Block block, ItemStack stack) { + return Items.iron_axe.canHarvestBlock(block, stack) || Items.iron_sword.canHarvestBlock(block, stack) || Items.iron_pickaxe.canHarvestBlock(block, stack) || Items.iron_shovel.canHarvestBlock(block, stack) || Items.shears.canHarvestBlock(block, stack); + } - @Override - public boolean canHarvestBlock(Block block, ItemStack stack) { - return Items.iron_axe.canHarvestBlock(block, stack) || Items.iron_sword.canHarvestBlock(block, stack) || Items.iron_pickaxe.canHarvestBlock(block, stack) || Items.iron_shovel.canHarvestBlock(block, stack) || Items.shears.canHarvestBlock(block, stack); - } + @Override + public float getDigSpeed(ItemStack stack, Block block, int meta) { + if (!ElectricItem.manager.canUse(stack, cost)) { + return 1.0F; + } - @Override - public float getDigSpeed(ItemStack stack, Block block, int meta) { - if (!ElectricItem.manager.canUse(stack, cost)) { - return 1.0F; - } + if (Items.wooden_axe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_sword.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_pickaxe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F || Items.shears.getDigSpeed(stack, block, meta) > 1.0F) { + return efficiencyOnProperMaterial; + } else { + return super.getDigSpeed(stack, block, meta); + } + } - if (Items.wooden_axe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_sword.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_pickaxe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F || Items.shears.getDigSpeed(stack, block, meta) > 1.0F) { - return efficiencyOnProperMaterial; - } - else { - return super.getDigSpeed(stack, block, meta); - } - } + @Override + public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { + if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { + entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 8F); + } + return false; + } - @Override - public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { - if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { - entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 8F); - } - return false; - } + @Override + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { + for (int i = 0; i < player.inventory.mainInventory.length; i++) { + ItemStack torchStack = player.inventory.mainInventory[i]; + if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase(Locale.US).contains("torch")) { + continue; + } + Item item = torchStack.getItem(); + if (!(item instanceof ItemBlock)) { + continue; + } + int oldMeta = torchStack.getItemDamage(); + int oldSize = torchStack.stackSize; + boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset); + if (player.capabilities.isCreativeMode) { + torchStack.setItemDamage(oldMeta); + torchStack.stackSize = oldSize; + } else if (torchStack.stackSize <= 0) { + ForgeEventFactory.onPlayerDestroyItem(player, torchStack); + player.inventory.mainInventory[i] = null; + } + if (result) { + return true; + } + } - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { - for (int i = 0; i < player.inventory.mainInventory.length; i++) { - ItemStack torchStack = player.inventory.mainInventory[i]; - if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase(Locale.US).contains("torch")) { - continue; - } - Item item = torchStack.getItem(); - if (!(item instanceof ItemBlock)) { - continue; - } - int oldMeta = torchStack.getItemDamage(); - int oldSize = torchStack.stackSize; - boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset); - if (player.capabilities.isCreativeMode) { - torchStack.setItemDamage(oldMeta); - torchStack.stackSize = oldSize; - } - else if (torchStack.stackSize <= 0) { - ForgeEventFactory.onPlayerDestroyItem(player, torchStack); - player.inventory.mainInventory[i] = null; - } - if (result) { - return true; - } - } + return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset); + } - return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset); - } + @Override + public boolean isRepairable() { + return false; + } - @Override - public boolean isRepairable() { - return false; - } + @Override + public int getItemEnchantability() { + if (!EMTConfigHandler.enchanting) { + return 0; + } else { + return 4; + } + } - @Override - public int getItemEnchantability() { - if (!EMTConfigHandler.enchanting) { - return 0; - } - else { - return 4; - } - } + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + return EMTConfigHandler.enchanting; + } - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - return EMTConfigHandler.enchanting; - } + /* IC2 API METHODS */ - /* IC2 API METHODS */ + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } - @Override - public Item getChargedItem(ItemStack itemStack) { - return this; - } + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } - @Override - public Item getEmptyItem(ItemStack itemStack) { - return this; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public double getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public double getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public int getTier(ItemStack itemStack) { + return 2; + } - @Override - public int getTier(ItemStack itemStack) { - return 2; - } - - @Override - public double getTransferLimit(ItemStack itemStack) { - return 200; - } + @Override + public double getTransferLimit(ItemStack itemStack) { + return 200; + } } diff --git a/src/main/java/emt/item/tool/omnitool/ItemOmnitoolThaumium.java b/src/main/java/emt/item/tool/omnitool/ItemOmnitoolThaumium.java index 042d921..1debd27 100644 --- a/src/main/java/emt/item/tool/omnitool/ItemOmnitoolThaumium.java +++ b/src/main/java/emt/item/tool/omnitool/ItemOmnitoolThaumium.java @@ -15,50 +15,48 @@ import net.minecraft.world.World; public class ItemOmnitoolThaumium extends ItemOmnitoolDiamond { - public ItemOmnitoolThaumium() { - super(); - this.efficiencyOnProperMaterial = 21F; - this.setCreativeTab(EMT.TAB); - this.setMaxStackSize(1); - if (!EMTConfigHandler.toolsInBore) { - this.setMaxDamage(27); - } - else { - this.setMaxDamage(467); - } - maxCharge = 200000; - hitCost = 650; - } + public ItemOmnitoolThaumium() { + super(); + this.efficiencyOnProperMaterial = 21F; + this.setCreativeTab(EMT.TAB); + this.setMaxStackSize(1); + if (!EMTConfigHandler.toolsInBore) { + this.setMaxDamage(27); + } else { + this.setMaxDamage(467); + } + maxCharge = 200000; + hitCost = 650; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/omnitool_thaumium"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/omnitool_thaumium"); + } - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { - if (!EMTConfigHandler.toolsInBore) { - cost = 300; - } - else { - cost = 1; - } - ElectricItem.manager.use(stack, cost, entityLiving); - return true; - } + @Override + public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { + if (!EMTConfigHandler.toolsInBore) { + cost = 300; + } else { + cost = 1; + } + ElectricItem.manager.use(stack, cost, entityLiving); + return true; + } - @Override - public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { - if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { - entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 10F); - } - return false; - } + @Override + public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { + if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { + entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 10F); + } + return false; + } - /* IC2 API METHODS */ - @Override - public double getTransferLimit(ItemStack itemStack) { - return 800; - } + /* IC2 API METHODS */ + @Override + public double getTransferLimit(ItemStack itemStack) { + return 800; + } } diff --git a/src/main/java/emt/network/PacketEMTKeys.java b/src/main/java/emt/network/PacketEMTKeys.java index 520576b..5ccf2f3 100644 --- a/src/main/java/emt/network/PacketEMTKeys.java +++ b/src/main/java/emt/network/PacketEMTKeys.java @@ -1,27 +1,27 @@ package emt.network; -import io.netty.buffer.ByteBuf; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; import emt.init.EMTItems; +import io.netty.buffer.ByteBuf; public class PacketEMTKeys implements IMessage, IMessageHandler { - @Override - public IMessage onMessage(PacketEMTKeys message, MessageContext ctx) { - if (ctx.getServerHandler().playerEntity.inventory.armorInventory[2] != null && ctx.getServerHandler().playerEntity.inventory.armorInventory[2].getItem() == EMTItems.quantumArmor) { - ctx.getServerHandler().playerEntity.inventory.armorInventory[2].stackTagCompound.setBoolean("unequip", true); - } - return null; - } + @Override + public IMessage onMessage(PacketEMTKeys message, MessageContext ctx) { + if (ctx.getServerHandler().playerEntity.inventory.armorInventory[2] != null && ctx.getServerHandler().playerEntity.inventory.armorInventory[2].getItem() == EMTItems.quantumArmor) { + ctx.getServerHandler().playerEntity.inventory.armorInventory[2].stackTagCompound.setBoolean("unequip", true); + } + return null; + } - @Override - public void fromBytes(ByteBuf buf) { + @Override + public void fromBytes(ByteBuf buf) { - } + } - @Override - public void toBytes(ByteBuf buf) { - } + @Override + public void toBytes(ByteBuf buf) { + } } diff --git a/src/main/java/emt/proxy/ClientProxy.java b/src/main/java/emt/proxy/ClientProxy.java index 4c26be3..9cc0c3a 100644 --- a/src/main/java/emt/proxy/ClientProxy.java +++ b/src/main/java/emt/proxy/ClientProxy.java @@ -1,9 +1,5 @@ package emt.proxy; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderSnowMan; -import net.minecraft.entity.Entity; -import net.minecraft.util.ResourceLocation; import cpw.mods.fml.client.registry.RenderingRegistry; import emt.client.EMTKeys; import emt.client.renderer.RenderLaser; @@ -12,33 +8,37 @@ import emt.entity.EntityArcher; import emt.entity.EntityEnergyBall; import emt.entity.EntityLaser; import emt.entity.EntityShield; +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.client.renderer.entity.RenderSnowMan; +import net.minecraft.entity.Entity; +import net.minecraft.util.ResourceLocation; public class ClientProxy extends CommonProxy { - @Override - public void load() { - registerRenders(); - EMTKeys.registerKeys(); - } + @Override + public void load() { + registerRenders(); + EMTKeys.registerKeys(); + } - @Override - public void registerRenders() { - Render empty = new Render() { + @Override + public void registerRenders() { + Render empty = new Render() { - @Override - public void doRender(Entity e, double x, double y, double z, float f1, float f2) { - } + @Override + public void doRender(Entity e, double x, double y, double z, float f1, float f2) { + } - @Override - protected ResourceLocation getEntityTexture(Entity e) { - return null; - } - - }; - - RenderingRegistry.registerEntityRenderingHandler(EntityLaser.class, new RenderLaser()); - RenderingRegistry.registerEntityRenderingHandler(EntityArcher.class, new RenderSnowMan()); - RenderingRegistry.registerEntityRenderingHandler(EntityShield.class, new RenderShield()); - RenderingRegistry.registerEntityRenderingHandler(EntityEnergyBall.class, empty); - } + @Override + protected ResourceLocation getEntityTexture(Entity e) { + return null; + } + + }; + + RenderingRegistry.registerEntityRenderingHandler(EntityLaser.class, new RenderLaser()); + RenderingRegistry.registerEntityRenderingHandler(EntityArcher.class, new RenderSnowMan()); + RenderingRegistry.registerEntityRenderingHandler(EntityShield.class, new RenderShield()); + RenderingRegistry.registerEntityRenderingHandler(EntityEnergyBall.class, empty); + } } diff --git a/src/main/java/emt/proxy/CommonProxy.java b/src/main/java/emt/proxy/CommonProxy.java index f80129b..4305262 100644 --- a/src/main/java/emt/proxy/CommonProxy.java +++ b/src/main/java/emt/proxy/CommonProxy.java @@ -19,59 +19,55 @@ import net.minecraft.world.World; public class CommonProxy implements IGuiHandler { - public void load() { - registerRenders(); - } + public void load() { + registerRenders(); + } - public void registerRenders() { - /* Empty in base proxy */ - } + public void registerRenders() { + /* Empty in base proxy */ + } - @Override - public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { - TileEntity entity = world.getTileEntity(x, y, z); + @Override + public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { + TileEntity entity = world.getTileEntity(x, y, z); - switch (ID) { - case 0: - if (entity != null && entity instanceof TileEntityIndustrialWandRecharge) { - return new ContainerIndustrialWandRecharge(player.inventory, (TileEntityIndustrialWandRecharge) entity); - } - case 1: - if (entity != null && entity instanceof TileEntityEtherealMacerator) { - return new ContainerEtheralMacerator(player.inventory, (TileEntityEtherealMacerator) entity); - } - else if (entity != null && entity instanceof TileEntityBaseGenerator) { - return new ConainerGenerator(player.inventory, (TileEntityBaseGenerator) entity); - } - else if (entity != null && entity instanceof TileEntitySolarBase) { - return new ContainerSolars(player.inventory, (TileEntitySolarBase) entity); - } - default: - return null; - } - } + switch (ID) { + case 0: + if (entity != null && entity instanceof TileEntityIndustrialWandRecharge) { + return new ContainerIndustrialWandRecharge(player.inventory, (TileEntityIndustrialWandRecharge) entity); + } + case 1: + if (entity != null && entity instanceof TileEntityEtherealMacerator) { + return new ContainerEtheralMacerator(player.inventory, (TileEntityEtherealMacerator) entity); + } else if (entity != null && entity instanceof TileEntityBaseGenerator) { + return new ConainerGenerator(player.inventory, (TileEntityBaseGenerator) entity); + } else if (entity != null && entity instanceof TileEntitySolarBase) { + return new ContainerSolars(player.inventory, (TileEntitySolarBase) entity); + } + default: + return null; + } + } - @Override - public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { - TileEntity entity = world.getTileEntity(x, y, z); + @Override + public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { + TileEntity entity = world.getTileEntity(x, y, z); - switch (ID) { - case 0: - if (entity != null && entity instanceof TileEntityIndustrialWandRecharge) { - return new GuiIndustrialWandRecharger(player.inventory, (TileEntityIndustrialWandRecharge) entity); - } - case 1: - if (entity != null && entity instanceof TileEntityEtherealMacerator) { - return new GuiEtherealMacerator(player.inventory, (TileEntityEtherealMacerator) entity); - } - else if (entity != null && entity instanceof TileEntityBaseGenerator) { - return new GuiGenerator(player.inventory, (TileEntityBaseGenerator) entity); - } - else if (entity != null && entity instanceof TileEntitySolarBase) { - return new GuiSolar(player.inventory, (TileEntitySolarBase) entity); - } - default: - return null; - } - } + switch (ID) { + case 0: + if (entity != null && entity instanceof TileEntityIndustrialWandRecharge) { + return new GuiIndustrialWandRecharger(player.inventory, (TileEntityIndustrialWandRecharge) entity); + } + case 1: + if (entity != null && entity instanceof TileEntityEtherealMacerator) { + return new GuiEtherealMacerator(player.inventory, (TileEntityEtherealMacerator) entity); + } else if (entity != null && entity instanceof TileEntityBaseGenerator) { + return new GuiGenerator(player.inventory, (TileEntityBaseGenerator) entity); + } else if (entity != null && entity instanceof TileEntitySolarBase) { + return new GuiSolar(player.inventory, (TileEntitySolarBase) entity); + } + default: + return null; + } + } } diff --git a/src/main/java/emt/tile/DefinitelyNotAIC2Source.java b/src/main/java/emt/tile/DefinitelyNotAIC2Source.java index 5ddbff1..a53d558 100644 --- a/src/main/java/emt/tile/DefinitelyNotAIC2Source.java +++ b/src/main/java/emt/tile/DefinitelyNotAIC2Source.java @@ -2,64 +2,23 @@ package emt.tile; import cpw.mods.fml.common.FMLCommonHandler; import gregtech.api.enums.GT_Values; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -public class DefinitelyNotAIC2Source extends TileEntity { +public class DefinitelyNotAIC2Source { public final TileEntity parent; - protected double capacity; + protected long capacity; protected byte tier; - protected double power; - protected double energyStored; - protected boolean addedToEnet; + protected long power; + protected long energyStored; - public DefinitelyNotAIC2Source(TileEntity parent1, double capacity1, int tier1) { - double power = (double) GT_Values.V[tier1]; + public DefinitelyNotAIC2Source(TileEntity parent1, long capacity1, int tier1) { + long power = GT_Values.V[tier1]; this.parent = parent1; this.capacity = capacity1 < power ? power : capacity1; this.tier = (byte) tier1; this.power = power; } - public void updateEntity() { - if (!this.addedToEnet && !FMLCommonHandler.instance().getEffectiveSide().isClient()) { - this.worldObj = this.parent.getWorldObj(); - this.xCoord = this.parent.xCoord; - this.yCoord = this.parent.yCoord; - this.zCoord = this.parent.zCoord; - this.addedToEnet = true; - } - } - - public void invalidate() { - super.invalidate(); - this.onChunkUnload(); - } - - public void onChunkUnload() { - if (this.addedToEnet) { - this.addedToEnet = false; - } - - } - - public void readFromNBT(NBTTagCompound tag) { - super.readFromNBT(tag); - NBTTagCompound data = tag.getCompoundTag("EMTGTSource"); - this.energyStored = data.getDouble("energy"); - } - - public void writeToNBT(NBTTagCompound tag) { - try { - super.writeToNBT(tag); - } catch (RuntimeException var3) { - } - - NBTTagCompound data = new NBTTagCompound(); - data.setDouble("energy", this.energyStored); - tag.setTag("EMTGTSource", data); - } - public double getCapacity() { return this.capacity; } @@ -69,14 +28,22 @@ public class DefinitelyNotAIC2Source extends TileEntity { capacity1 = this.power; } + this.capacity = (long) capacity1; + } + + public void setCapacity(long capacity1) { + if (capacity1 < this.power) { + capacity1 = this.power; + } + this.capacity = capacity1; } - public double getEnergyStored() { + public long getEnergyStored() { return this.energyStored; } - public void setEnergyStored(double amount) { + public void setEnergyStored(long amount) { this.energyStored = amount; } diff --git a/src/main/java/emt/tile/TileElectricCloud.java b/src/main/java/emt/tile/TileElectricCloud.java index 47b4254..c892446 100644 --- a/src/main/java/emt/tile/TileElectricCloud.java +++ b/src/main/java/emt/tile/TileElectricCloud.java @@ -11,39 +11,39 @@ import thaumcraft.common.Thaumcraft; public class TileElectricCloud extends TileEntity { - @Override - public boolean canUpdate() { - return true; - } + @Override + public boolean canUpdate() { + return true; + } - @Override - public void updateEntity() { - if(worldObj.isRemote && FMLCommonHandler.instance().getSide().isClient() && FMLClientHandler.instance().getClient().renderViewEntity != null) - fx(); - } - - @SideOnly(Side.CLIENT) - public void fx() { - if (worldObj.rand.nextInt(4) == 0) { - Thaumcraft.proxy.wispFX3(worldObj, xCoord + 0.5F, yCoord + 0.5F, zCoord + 0.5F, xCoord + 0.4F + worldObj.rand.nextFloat() * 0.2F, yCoord + 0.5F, zCoord + 0.4F + worldObj.rand.nextFloat() * 0.2F, 0.25F, 1, true, -0.02F); - } + @Override + public void updateEntity() { + if (worldObj.isRemote && FMLCommonHandler.instance().getSide().isClient() && FMLClientHandler.instance().getClient().renderViewEntity != null) + fx(); + } - if (worldObj.rand.nextInt(12) == 0) { - Thaumcraft.proxy.nodeBolt(worldObj, xCoord + 0.5f, yCoord + 0.5f, zCoord + 0.5f, xCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, yCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, zCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f); - if (worldObj.rand.nextInt(2) == 0) { - Thaumcraft.proxy.nodeBolt(worldObj, xCoord + 0.5f, yCoord + 0.5f, zCoord + 0.5f, xCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, yCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, zCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f); - } - if (worldObj.rand.nextInt(4) == 0) { - Thaumcraft.proxy.nodeBolt(worldObj, xCoord + 0.5f, yCoord + 0.5f, zCoord + 0.5f, xCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, yCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, zCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f); - } - } + @SideOnly(Side.CLIENT) + public void fx() { + if (worldObj.rand.nextInt(4) == 0) { + Thaumcraft.proxy.wispFX3(worldObj, xCoord + 0.5F, yCoord + 0.5F, zCoord + 0.5F, xCoord + 0.4F + worldObj.rand.nextFloat() * 0.2F, yCoord + 0.5F, zCoord + 0.4F + worldObj.rand.nextFloat() * 0.2F, 0.25F, 1, true, -0.02F); + } - if (worldObj.rand.nextInt(3) == 0) { - FXWisp wisp = new FXWisp(worldObj, xCoord + 0.5 + ((worldObj.rand.nextInt(40) / 160f) - 0.125f), yCoord + 0.5, zCoord + 0.5 + ((worldObj.rand.nextInt(40) / 160f) - 0.125f), 0.4f + worldObj.rand.nextInt(40) / 100f, 1); - wisp.setGravity(-0.02F); - wisp.setRBGColorF(worldObj.rand.nextInt(20) / 100f, worldObj.rand.nextInt(20) / 100f, 1); - wisp.setAlphaF(1); - ParticleEngine.instance.addEffect(worldObj, wisp); - } - } + if (worldObj.rand.nextInt(12) == 0) { + Thaumcraft.proxy.nodeBolt(worldObj, xCoord + 0.5f, yCoord + 0.5f, zCoord + 0.5f, xCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, yCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, zCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f); + if (worldObj.rand.nextInt(2) == 0) { + Thaumcraft.proxy.nodeBolt(worldObj, xCoord + 0.5f, yCoord + 0.5f, zCoord + 0.5f, xCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, yCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, zCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f); + } + if (worldObj.rand.nextInt(4) == 0) { + Thaumcraft.proxy.nodeBolt(worldObj, xCoord + 0.5f, yCoord + 0.5f, zCoord + 0.5f, xCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, yCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, zCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f); + } + } + + if (worldObj.rand.nextInt(3) == 0) { + FXWisp wisp = new FXWisp(worldObj, xCoord + 0.5 + ((worldObj.rand.nextInt(40) / 160f) - 0.125f), yCoord + 0.5, zCoord + 0.5 + ((worldObj.rand.nextInt(40) / 160f) - 0.125f), 0.4f + worldObj.rand.nextInt(40) / 100f, 1); + wisp.setGravity(-0.02F); + wisp.setRBGColorF(worldObj.rand.nextInt(20) / 100f, worldObj.rand.nextInt(20) / 100f, 1); + wisp.setAlphaF(1); + ParticleEngine.instance.addEffect(worldObj, wisp); + } + } } diff --git a/src/main/java/emt/tile/TileEntityEMT.java b/src/main/java/emt/tile/TileEntityEMT.java index ca9ab35..3ad5fdf 100644 --- a/src/main/java/emt/tile/TileEntityEMT.java +++ b/src/main/java/emt/tile/TileEntityEMT.java @@ -7,46 +7,40 @@ import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import net.minecraft.tileentity.TileEntity; public class TileEntityEMT - extends TileEntity -{ - public int facing; - public boolean isOn; - - public void readFromNBT(NBTTagCompound tagCompound) - { - super.readFromNBT(tagCompound); - - this.facing = tagCompound.getInteger("facing"); - this.isOn = tagCompound.getBoolean("isOn"); - } - - public void writeToNBT(NBTTagCompound tagCompound) - { - tagCompound.setInteger("facing", this.facing); - tagCompound.setBoolean("isOn", this.isOn); - super.writeToNBT(tagCompound); - } - - public final Packet getDescriptionPacket() - { - NBTTagCompound nbt = new NBTTagCompound(); - writeToNBT(nbt); - S35PacketUpdateTileEntity packet = new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 0, nbt); - return packet; - } - - public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) - { - NBTTagCompound nbt = pkt.func_148857_g(); - readFromNBT(nbt); - } - - public void markDirty() - { - super.markDirty(); - if (this.worldObj.isRemote) { - return; + extends TileEntity { + public int facing; + public boolean isOn; + + public void readFromNBT(NBTTagCompound tagCompound) { + super.readFromNBT(tagCompound); + + this.facing = tagCompound.getInteger("facing"); + this.isOn = tagCompound.getBoolean("isOn"); + } + + public void writeToNBT(NBTTagCompound tagCompound) { + tagCompound.setInteger("facing", this.facing); + tagCompound.setBoolean("isOn", this.isOn); + super.writeToNBT(tagCompound); + } + + public final Packet getDescriptionPacket() { + NBTTagCompound nbt = new NBTTagCompound(); + writeToNBT(nbt); + S35PacketUpdateTileEntity packet = new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 0, nbt); + return packet; + } + + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + NBTTagCompound nbt = pkt.func_148857_g(); + readFromNBT(nbt); + } + + public void markDirty() { + super.markDirty(); + if (this.worldObj.isRemote) { + return; + } + this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord); } - this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord); - } } diff --git a/src/main/java/emt/tile/TileEntityEtherealMacerator.java b/src/main/java/emt/tile/TileEntityEtherealMacerator.java index 43f46e6..1b229b2 100644 --- a/src/main/java/emt/tile/TileEntityEtherealMacerator.java +++ b/src/main/java/emt/tile/TileEntityEtherealMacerator.java @@ -18,285 +18,275 @@ import thaumcraft.common.config.ConfigItems; public class TileEntityEtherealMacerator extends TileEntityEMT implements ISidedInventory, IWrenchable { - private static final int[] slots_top = new int[] { 0 }; - private static final int[] slots_bottom = new int[] { 2, 1 }; - private static final int[] slots_sides = new int[] { 1 }; + private static final int[] slots_top = new int[]{0}; + private static final int[] slots_bottom = new int[]{2, 1}; + private static final int[] slots_sides = new int[]{1}; + public int maceratingSpeed = EMTConfigHandler.etherealProcessorBaseSpeed; + public int cookTime; + private ItemStack[] slots = new ItemStack[3]; - private ItemStack[] slots = new ItemStack[3]; - public int maceratingSpeed = EMTConfigHandler.etherealProcessorBaseSpeed; - public int cookTime; + public int getSizeInventory() { + return this.slots.length; + } - public int getSizeInventory() { - return this.slots.length; - } + public ItemStack getStackInSlot(int par1) { + return this.slots[par1]; + } - public ItemStack getStackInSlot(int par1) { - return this.slots[par1]; - } + public ItemStack decrStackSize(int par1, int par2) { + if (this.slots[par1] != null) { + ItemStack itemstack; - public ItemStack decrStackSize(int par1, int par2) { - if (this.slots[par1] != null) { - ItemStack itemstack; + if (this.slots[par1].stackSize <= par2) { + itemstack = this.slots[par1]; + this.slots[par1] = null; + return itemstack; + } else { + itemstack = this.slots[par1].splitStack(par2); - if (this.slots[par1].stackSize <= par2) { - itemstack = this.slots[par1]; - this.slots[par1] = null; - return itemstack; - } - else { - itemstack = this.slots[par1].splitStack(par2); + if (this.slots[par1].stackSize == 0) { + this.slots[par1] = null; + } - if (this.slots[par1].stackSize == 0) { - this.slots[par1] = null; - } + return itemstack; + } + } else { + return null; + } + } - return itemstack; - } - } - else { - return null; - } - } + public ItemStack getStackInSlotOnClosing(int par1) { + if (this.slots[par1] != null) { + ItemStack itemstack = this.slots[par1]; + this.slots[par1] = null; + return itemstack; + } else { + return null; + } + } - public ItemStack getStackInSlotOnClosing(int par1) { - if (this.slots[par1] != null) { - ItemStack itemstack = this.slots[par1]; - this.slots[par1] = null; - return itemstack; - } - else { - return null; - } - } + public void setInventorySlotContents(int par1, ItemStack par2ItemStack) { + this.slots[par1] = par2ItemStack; - public void setInventorySlotContents(int par1, ItemStack par2ItemStack) { - this.slots[par1] = par2ItemStack; + if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit()) { + par2ItemStack.stackSize = this.getInventoryStackLimit(); + } + } - if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit()) { - par2ItemStack.stackSize = this.getInventoryStackLimit(); - } - } + public String getInvName() { + return "Ethereal Processor"; + } - public String getInvName() { - return "Ethereal Processor"; - } + public boolean isInvNameLocalized() { + return false; + } - public boolean isInvNameLocalized() { - return false; - } + public void readFromNBT(NBTTagCompound tagCompound) { + super.readFromNBT(tagCompound); + NBTTagList nbttaglist = tagCompound.getTagList("Items", 10); + this.slots = new ItemStack[this.getSizeInventory()]; - public void readFromNBT(NBTTagCompound tagCompound) { - super.readFromNBT(tagCompound); - NBTTagList nbttaglist = tagCompound.getTagList("Items", 10); - this.slots = new ItemStack[this.getSizeInventory()]; + for (int i = 0; i < nbttaglist.tagCount(); ++i) { + NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); + byte b0 = nbttagcompound1.getByte("Slot"); - for (int i = 0; i < nbttaglist.tagCount(); ++i) { - NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); - byte b0 = nbttagcompound1.getByte("Slot"); + if (b0 >= 0 && b0 < this.slots.length) { + this.slots[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1); + } + } + this.cookTime = tagCompound.getShort("CookTime"); + } - if (b0 >= 0 && b0 < this.slots.length) { - this.slots[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1); - } - } - this.cookTime = tagCompound.getShort("CookTime"); - } + public void writeToNBT(NBTTagCompound tagCompound) { + super.writeToNBT(tagCompound); + tagCompound.setShort("CookTime", (short) this.cookTime); + NBTTagList nbttaglist = new NBTTagList(); - public void writeToNBT(NBTTagCompound tagCompound) { - super.writeToNBT(tagCompound); - tagCompound.setShort("CookTime", (short) this.cookTime); - NBTTagList nbttaglist = new NBTTagList(); + for (int i = 0; i < this.slots.length; ++i) { + if (this.slots[i] != null) { + NBTTagCompound nbttagcompound1 = new NBTTagCompound(); + nbttagcompound1.setByte("Slot", (byte) i); + this.slots[i].writeToNBT(nbttagcompound1); + nbttaglist.appendTag(nbttagcompound1); + } + } + tagCompound.setTag("Items", nbttaglist); + } - for (int i = 0; i < this.slots.length; ++i) { - if (this.slots[i] != null) { - NBTTagCompound nbttagcompound1 = new NBTTagCompound(); - nbttagcompound1.setByte("Slot", (byte) i); - this.slots[i].writeToNBT(nbttagcompound1); - nbttaglist.appendTag(nbttagcompound1); - } - } - tagCompound.setTag("Items", nbttaglist); - } + public int getInventoryStackLimit() { + return 64; + } - public int getInventoryStackLimit() { - return 64; - } + public void updateEntity() { + if (this.canSmelt() && isOverLimit(1) == false && isOverLimit(2) == false && isOP() == false) { + ++this.cookTime; + this.isOn = true; + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - public void updateEntity() { - if (this.canSmelt() && isOverLimit(1) == false && isOverLimit(2) == false && isOP() == false) { - ++this.cookTime; - this.isOn = true; - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + if (this.cookTime == this.maceratingSpeed) { + this.cookTime = 0; + this.smeltItem(); + } + } else { + this.cookTime = 0; + this.isOn = false; + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + } - if (this.cookTime == this.maceratingSpeed) { - this.cookTime = 0; - this.smeltItem(); - } - } - else { - this.cookTime = 0; - this.isOn = false; - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - } - } + private boolean canSmelt() { + if (this.slots[0] == null) { + return false; + } else { + ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]); + if (itemstack == null) + return false; + if (this.slots[2] == null) + return true; + if (!this.slots[2].isItemEqual(itemstack)) + return false; + int result = slots[2].stackSize + (itemstack.stackSize * 2); + return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize()); + } + } - private boolean canSmelt() { - if (this.slots[0] == null) { - return false; - } - else { - ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]); - if (itemstack == null) - return false; - if (this.slots[2] == null) - return true; - if (!this.slots[2].isItemEqual(itemstack)) - return false; - int result = slots[2].stackSize + (itemstack.stackSize * 2); - return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize()); - } - } + public void smeltItem() { + if (this.canSmelt()) { + ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]); - public void smeltItem() { - if (this.canSmelt()) { - ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]); + if (this.slots[2] == null) { + this.slots[2] = itemstack.copy(); + this.slots[2].stackSize *= 2; + } else if (this.slots[2].isItemEqual(itemstack)) { + slots[2].stackSize += (itemstack.stackSize * 2); + } - if (this.slots[2] == null) { - this.slots[2] = itemstack.copy(); - this.slots[2].stackSize *= 2; - } - else if (this.slots[2].isItemEqual(itemstack)) { - slots[2].stackSize += (itemstack.stackSize * 2); - } + --this.slots[0].stackSize; - --this.slots[0].stackSize; + if (this.slots[0].stackSize <= 0) { + this.slots[0] = null; + } + this.addBonus(); + } + } - if (this.slots[0].stackSize <= 0) { - this.slots[0] = null; - } - this.addBonus(); - } - } + public void addBonus() { + if (this.canSmelt()) { + if (this.worldObj.rand.nextInt(EMTConfigHandler.etherealProcessorBonus) == 0) { + if (this.slots[1] == null) { + this.setInventorySlotContents(1, new ItemStack(ConfigItems.itemNugget, 1, 6)); + } else if (this.slots[1].isItemEqual(new ItemStack(ConfigItems.itemNugget, 1, 6)) && this.isOverLimit(1) == false && this.isOverLimit(2) == false) { + slots[1] = new ItemStack(getStackInSlot(1).getItem(), slots[1].stackSize + 1, 2); + } + } + } + } - public void addBonus() { - if (this.canSmelt()) { - if (this.worldObj.rand.nextInt(EMTConfigHandler.etherealProcessorBonus) == 0) { - if (this.slots[1] == null) { - this.setInventorySlotContents(1, new ItemStack(ConfigItems.itemNugget, 1, 6)); - } - else if (this.slots[1].isItemEqual(new ItemStack(ConfigItems.itemNugget, 1, 6)) && this.isOverLimit(1) == false && this.isOverLimit(2) == false) { - slots[1] = new ItemStack(getStackInSlot(1).getItem(), slots[1].stackSize + 1, 2); - } - } - } - } + public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer) { + return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : par1EntityPlayer.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D) <= 64.0D; + } - public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer) { - return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : par1EntityPlayer.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D) <= 64.0D; - } + public void openChest() { + } - public void openChest() { - } + public void closeChest() { + } - public void closeChest() { - } + @Override + public boolean isItemValidForSlot(int slot, ItemStack stack) { + if (slot != 0) + return false; + if (FurnaceRecipes.smelting().getSmeltingResult(stack) != null) + return true; + return false; + } - @Override - public boolean isItemValidForSlot(int slot, ItemStack stack) { - if (slot != 0) - return false; - if (FurnaceRecipes.smelting().getSmeltingResult(stack) != null) - return true; - return false; - } + public int[] getAccessibleSlotsFromSide(int par1) { + return par1 == 0 ? slots_bottom : (par1 == 1 ? slots_top : slots_sides); + } - public int[] getAccessibleSlotsFromSide(int par1) { - return par1 == 0 ? slots_bottom : (par1 == 1 ? slots_top : slots_sides); - } + public boolean canInsertItem(int par1, ItemStack par2ItemStack, int par3) { + return this.isItemValidForSlot(par1, par2ItemStack); + } - public boolean canInsertItem(int par1, ItemStack par2ItemStack, int par3) { - return this.isItemValidForSlot(par1, par2ItemStack); - } + public boolean canExtractItem(int par1, ItemStack par2ItemStack, int par3) { + return true; + } - public boolean canExtractItem(int par1, ItemStack par2ItemStack, int par3) { - return true; - } + public boolean isOverLimit(int i) { + if (slots[i] != null) { + if (slots[i].stackSize >= 63) + return true; + else if (slots[i].stackSize < 63) + return false; + else + return false; + } else { + return false; + } + } - public boolean isOverLimit(int i) { - if (slots[i] != null) { - if (slots[i].stackSize >= 63) - return true; - else if (slots[i].stackSize < 63) - return false; - else - return false; - } - else { - return false; - } - } + public boolean isOP() { + final int cobblestoneId = OreDictionary.getOreID("blockCobble"); - public boolean isOP() { - final int cobblestoneId = OreDictionary.getOreID("blockCobble"); + if (OreDictionary.getOreID(this.slots[0]) == cobblestoneId || this.slots[0].getItem() == Item.getItemFromBlock(Blocks.sand) || this.slots[0].getItem() == Items.potato || this.slots[0].getItem() == Items.porkchop || this.slots[0].getItem() == Items.beef || this.slots[0].getItem() == Items.chicken || this.slots[0].getItem() == Items.fish + || this.slots[0].getItem() == IC2Items.getItem("coalDust").getItem() + || (OreDictionary.getOreName(OreDictionary.getOreID(this.slots[0])).toLowerCase().contains("dust") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("armour") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("armor") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("helm") + || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("legging") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("boot") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("chestp") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("pick") + || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("shovel") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("axe") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("pick"))) { + return true; + } else { + return false; + } + } - if (OreDictionary.getOreID(this.slots[0]) == cobblestoneId || this.slots[0].getItem() == Item.getItemFromBlock(Blocks.sand) || this.slots[0].getItem() == Items.potato || this.slots[0].getItem() == Items.porkchop || this.slots[0].getItem() == Items.beef || this.slots[0].getItem() == Items.chicken || this.slots[0].getItem() == Items.fish - || this.slots[0].getItem() == IC2Items.getItem("coalDust").getItem() - || (OreDictionary.getOreName(OreDictionary.getOreID(this.slots[0])).toLowerCase().contains("dust") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("armour") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("armor") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("helm") - || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("legging") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("boot") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("chestp") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("pick") - || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("shovel") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("axe") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("pick"))) { - return true; - } - else { - return false; - } - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public short getFacing() { + return 0; + } - @Override - public short getFacing() { - return 0; - } + @Override + public void setFacing(short facing) { - @Override - public void setFacing(short facing) { + } - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + @Override + public float getWrenchDropRate() { + return 1; + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(EMTBlocks.emtMachines, 1, 1); + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtMachines, 1, 1); - } + @Override + public String getInventoryName() { + return "Ethereal Macerator"; + } - @Override - public String getInventoryName() { - return "Ethereal Macerator"; - } + @Override + public boolean hasCustomInventoryName() { + return false; + } - @Override - public boolean hasCustomInventoryName() { - return false; - } + @Override + public void openInventory() { - @Override - public void openInventory() { + } - } + @Override + public void closeInventory() { - @Override - public void closeInventory() { - - } + } } diff --git a/src/main/java/emt/tile/TileEntityIndustrialWandRecharge.java b/src/main/java/emt/tile/TileEntityIndustrialWandRecharge.java index cf5ecda..50bf3b5 100644 --- a/src/main/java/emt/tile/TileEntityIndustrialWandRecharge.java +++ b/src/main/java/emt/tile/TileEntityIndustrialWandRecharge.java @@ -14,198 +14,194 @@ import thaumcraft.common.items.wands.ItemWandCasting; public class TileEntityIndustrialWandRecharge extends TileEntityEMT implements IInventory, IWrenchable { - private BasicSink ic2EnergySink = new BasicSink(this, 100000, 4); + ItemStack ItemStacks[]; + private BasicSink ic2EnergySink = new BasicSink(this, 100000, 4); - ItemStack ItemStacks[]; + public TileEntityIndustrialWandRecharge() { + ItemStacks = new ItemStack[1]; + } - public TileEntityIndustrialWandRecharge() { - ItemStacks = new ItemStack[1]; - } + @Override + public int getSizeInventory() { + return 1; + } - @Override - public int getSizeInventory() { - return 1; - } + @Override + public ItemStack getStackInSlot(int i) { + return ItemStacks[i]; + } - @Override - public ItemStack getStackInSlot(int i) { - return ItemStacks[i]; - } + @Override + public ItemStack decrStackSize(int i, int j) { + if (ItemStacks[i] != null) { - @Override - public ItemStack decrStackSize(int i, int j) { - if (ItemStacks[i] != null) { + if (ItemStacks[i].stackSize <= j) { + ItemStack itemstack = ItemStacks[i]; + ItemStacks[i] = null; + return itemstack; + } else { + ItemStack itemstack1 = ItemStacks[i].splitStack(j); - if (ItemStacks[i].stackSize <= j) { - ItemStack itemstack = ItemStacks[i]; - ItemStacks[i] = null; - return itemstack; - } - else { - ItemStack itemstack1 = ItemStacks[i].splitStack(j); + if (ItemStacks[i].stackSize == 0) { + ItemStacks[i] = null; + } - if (ItemStacks[i].stackSize == 0) { - ItemStacks[i] = null; - } + return itemstack1; + } + } else { + return null; + } + } - return itemstack1; - } - } - else { - return null; - } - } + @Override + public ItemStack getStackInSlotOnClosing(int i) { + if (ItemStacks[i] != null) { + ItemStack itemstack = ItemStacks[i]; + ItemStacks[i] = null; + return itemstack; + } else { + return null; + } + } - @Override - public ItemStack getStackInSlotOnClosing(int i) { - if (ItemStacks[i] != null) { - ItemStack itemstack = ItemStacks[i]; - ItemStacks[i] = null; - return itemstack; - } - else { - return null; - } - } + @Override + public void updateEntity() { + ic2EnergySink.updateEntity(); + if (!this.worldObj.isRemote) { + if (getStackInSlot(0) != null) { - @Override - public void updateEntity() { - ic2EnergySink.updateEntity(); - if (!this.worldObj.isRemote) { - if (getStackInSlot(0) != null) { + ItemStack wand = getStackInSlot(0); + if (wand != null && wand.getItem() instanceof ItemWandCasting) { + ItemWandCasting wandItem = (ItemWandCasting) wand.getItem(); + if (ic2EnergySink.useEnergy(EMTConfigHandler.wandChargerConsumption) && wandItem.getAspectsWithRoom(wand) != null) { + wandItem.addVis(wand, Aspect.ORDER, 1, true); + wandItem.addVis(wand, Aspect.FIRE, 1, true); + wandItem.addVis(wand, Aspect.ENTROPY, 1, true); + wandItem.addVis(wand, Aspect.WATER, 1, true); + wandItem.addVis(wand, Aspect.EARTH, 1, true); + wandItem.addVis(wand, Aspect.AIR, 1, true); + } + } + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + } + } - ItemStack wand = getStackInSlot(0); - if (wand != null && wand.getItem() instanceof ItemWandCasting) { - ItemWandCasting wandItem = (ItemWandCasting) wand.getItem(); - if (ic2EnergySink.useEnergy(EMTConfigHandler.wandChargerConsumption) && wandItem.getAspectsWithRoom(wand) != null) { - wandItem.addVis(wand, Aspect.ORDER, 1, true); - wandItem.addVis(wand, Aspect.FIRE, 1, true); - wandItem.addVis(wand, Aspect.ENTROPY, 1, true); - wandItem.addVis(wand, Aspect.WATER, 1, true); - wandItem.addVis(wand, Aspect.EARTH, 1, true); - wandItem.addVis(wand, Aspect.AIR, 1, true); - } - } - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - } - } - } + @Override + public void setInventorySlotContents(int i, ItemStack itemstack) { + ItemStacks[i] = itemstack; - @Override - public void setInventorySlotContents(int i, ItemStack itemstack) { - ItemStacks[i] = itemstack; + if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) { + itemstack.stackSize = getInventoryStackLimit(); + } + } - if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) { - itemstack.stackSize = getInventoryStackLimit(); - } - } + public void readFromNBT(NBTTagCompound p_145839_1_) { + super.readFromNBT(p_145839_1_); + NBTTagList nbttaglist = p_145839_1_.getTagList("Items", 10); + this.ItemStacks = new ItemStack[this.getSizeInventory()]; - public void readFromNBT(NBTTagCompound p_145839_1_) { - super.readFromNBT(p_145839_1_); - NBTTagList nbttaglist = p_145839_1_.getTagList("Items", 10); - this.ItemStacks = new ItemStack[this.getSizeInventory()]; + for (int i = 0; i < nbttaglist.tagCount(); ++i) { + NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); + byte b0 = nbttagcompound1.getByte("Slot"); - for (int i = 0; i < nbttaglist.tagCount(); ++i) { - NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); - byte b0 = nbttagcompound1.getByte("Slot"); + if (b0 >= 0 && b0 < this.ItemStacks.length) { + this.ItemStacks[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1); + } + } + } - if (b0 >= 0 && b0 < this.ItemStacks.length) { - this.ItemStacks[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1); - } - } - } + public void writeToNBT(NBTTagCompound p_145841_1_) { + super.writeToNBT(p_145841_1_); + NBTTagList nbttaglist = new NBTTagList(); - public void writeToNBT(NBTTagCompound p_145841_1_) { - super.writeToNBT(p_145841_1_); - NBTTagList nbttaglist = new NBTTagList(); + for (int i = 0; i < this.ItemStacks.length; ++i) { + if (this.ItemStacks[i] != null) { + NBTTagCompound nbttagcompound1 = new NBTTagCompound(); + nbttagcompound1.setByte("Slot", (byte) i); + this.ItemStacks[i].writeToNBT(nbttagcompound1); + nbttaglist.appendTag(nbttagcompound1); + } + } - for (int i = 0; i < this.ItemStacks.length; ++i) { - if (this.ItemStacks[i] != null) { - NBTTagCompound nbttagcompound1 = new NBTTagCompound(); - nbttagcompound1.setByte("Slot", (byte) i); - this.ItemStacks[i].writeToNBT(nbttagcompound1); - nbttaglist.appendTag(nbttagcompound1); - } - } + p_145841_1_.setTag("Items", nbttaglist); + } - p_145841_1_.setTag("Items", nbttaglist); - } + @Override + public int getInventoryStackLimit() { + return 64; + } - @Override - public int getInventoryStackLimit() { - return 64; - } + @Override + public boolean isUseableByPlayer(EntityPlayer player) { + if (worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) { + return false; + } - @Override - public boolean isUseableByPlayer(EntityPlayer player) { - if (worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) { - return false; - } + return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <= 64D; + } - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <= 64D; - } + @Override + public boolean isItemValidForSlot(int i, ItemStack itemstack) { + return true; + } - @Override - public boolean isItemValidForSlot(int i, ItemStack itemstack) { - return true; - } + @Override + public void invalidate() { + ic2EnergySink.invalidate(); + super.invalidate(); + } - @Override - public void invalidate() { - ic2EnergySink.invalidate(); - super.invalidate(); - } + @Override + public void onChunkUnload() { + ic2EnergySink.onChunkUnload(); + } - @Override - public void onChunkUnload() { - ic2EnergySink.onChunkUnload(); - } + @Override + public String getInventoryName() { + return "Industrial Wand Charging Station"; + } - @Override - public String getInventoryName() { - return "Industrial Wand Charging Station"; - } + @Override + public boolean hasCustomInventoryName() { + return false; + } - @Override - public boolean hasCustomInventoryName() { - return false; - } + @Override + public void openInventory() { + } - @Override - public void openInventory() { - } + @Override + public void closeInventory() { + } - @Override - public void closeInventory() { - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public short getFacing() { + return 0; + } - @Override - public short getFacing() { - return 0; - } + @Override + public void setFacing(short facing) { - @Override - public void setFacing(short facing) { - - } + } - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public float getWrenchDropRate() { - return 0.8f; - } + @Override + public float getWrenchDropRate() { + return 0.8f; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtMachines, 1, 0); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(EMTBlocks.emtMachines, 1, 0); + } } diff --git a/src/main/java/emt/tile/TileEntityPortableNode.java b/src/main/java/emt/tile/TileEntityPortableNode.java index c5f9a9f..df57843 100644 --- a/src/main/java/emt/tile/TileEntityPortableNode.java +++ b/src/main/java/emt/tile/TileEntityPortableNode.java @@ -6,17 +6,17 @@ import thaumcraft.common.tiles.TileNode; public class TileEntityPortableNode extends TileNode { - public TileEntityPortableNode() { - super(); - } + public TileEntityPortableNode() { + super(); + } - @Override - public NodeModifier getNodeModifier() { - return NodeModifier.FADING; - } + @Override + public NodeModifier getNodeModifier() { + return NodeModifier.FADING; + } - @Override - public NodeType getNodeType() { - return NodeType.UNSTABLE; - } + @Override + public NodeType getNodeType() { + return NodeType.UNSTABLE; + } } diff --git a/src/main/java/emt/tile/generator/TileEntityAerGenerator.java b/src/main/java/emt/tile/generator/TileEntityAerGenerator.java deleted file mode 100644 index ce69a5e..0000000 --- a/src/main/java/emt/tile/generator/TileEntityAerGenerator.java +++ /dev/null @@ -1,12 +0,0 @@ -package emt.tile.generator; - -import thaumcraft.api.aspects.Aspect; - -public class TileEntityAerGenerator - extends TileEntityBaseGenerator -{ - public TileEntityAerGenerator() - { - super(Aspect.AIR); - } -} diff --git a/src/main/java/emt/tile/generator/TileEntityArborGenerator.java b/src/main/java/emt/tile/generator/TileEntityArborGenerator.java deleted file mode 100644 index ccb8114..0000000 --- a/src/main/java/emt/tile/generator/TileEntityArborGenerator.java +++ /dev/null @@ -1,12 +0,0 @@ -package emt.tile.generator; - -import thaumcraft.api.aspects.Aspect; - -public class TileEntityArborGenerator - extends TileEntityBaseGenerator -{ - public TileEntityArborGenerator() - { - super(Aspect.TREE); - } -} diff --git a/src/main/java/emt/tile/generator/TileEntityAuramGenerator.java b/src/main/java/emt/tile/generator/TileEntityAuramGenerator.java deleted file mode 100644 index 1582a18..0000000 --- a/src/main/java/emt/tile/generator/TileEntityAuramGenerator.java +++ /dev/null @@ -1,12 +0,0 @@ -package emt.tile.generator; - -import thaumcraft.api.aspects.Aspect; - -public class TileEntityAuramGenerator - extends TileEntityBaseGenerator -{ - public TileEntityAuramGenerator() - { - super(Aspect.AURA); - } -} diff --git a/src/main/java/emt/tile/generator/TileEntityBaseGenerator.java b/src/main/java/emt/tile/generator/TileEntityBaseGenerator.java index a17e3db..9bb8b3e 100644 --- a/src/main/java/emt/tile/generator/TileEntityBaseGenerator.java +++ b/src/main/java/emt/tile/generator/TileEntityBaseGenerator.java @@ -1,10 +1,8 @@ package emt.tile.generator; -import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.network.NetworkRegistry; import emt.tile.DefinitelyNotAIC2Source; import emt.tile.TileEntityEMT; -import emt.tile.solar.TileEntitySolarBase; import emt.util.EMTConfigHandler; import emt.util.EMTEssentiasOutputs; import gregtech.api.enums.GT_Values; @@ -13,7 +11,6 @@ import gregtech.api.interfaces.tileentity.IEnergyConnected; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords; import gregtech.api.net.GT_Packet_Block_Event; -import ic2.api.energy.prefab.BasicSource; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -27,18 +24,14 @@ import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.IFluidHandler; import thaumcraft.api.ThaumcraftApiHelper; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.AspectList; -import thaumcraft.api.aspects.IAspectContainer; -import thaumcraft.api.aspects.IAspectSource; -import thaumcraft.api.aspects.IEssentiaTransport; +import thaumcraft.api.aspects.*; import thaumcraft.common.lib.network.PacketHandler; import thaumcraft.common.lib.network.fx.PacketFXEssentiaSource; public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory, IAspectContainer, IEssentiaTransport, IHasWorldObjectAndCoords, IEnergyConnected, IBasicEnergyContainer { - public DefinitelyNotAIC2Source energySource = new DefinitelyNotAIC2Source(this, 100000.0D, 2); + public DefinitelyNotAIC2Source energySource = new DefinitelyNotAIC2Source(this, 100000L, 2); public Aspect aspect; public double generating; public int tick = 0; @@ -55,22 +48,42 @@ public class TileEntityBaseGenerator public byte color; private boolean side; - public TileEntityBaseGenerator(Aspect aspect) { - super(); + public TileEntityBaseGenerator(int aspect) { + this(); + switch (aspect) { + case 0: + this.aspect = Aspect.ENERGY; + break; + case 1: + this.aspect = Aspect.FIRE; + break; + case 2: + this.aspect = Aspect.AURA; + break; + case 3: + this.aspect = Aspect.TREE; + break; + case 4: + this.aspect = Aspect.AIR; + break; + case 5: + this.aspect = Aspect.GREED; + break; + } + this.generating = EMTEssentiasOutputs.outputs.get(this.aspect.getTag()); + } + + public TileEntityBaseGenerator() { this.energySource.setCapacity(EMTConfigHandler.EssentiaGeneratorStorage); this.maxstorage = ((int) this.energySource.getCapacity()); this.maxfuel = 64; this.fuel = 0; - this.storage = 0; this.refuel = 1; - this.aspect = aspect; - this.generating = ((Double) EMTEssentiasOutputs.outputs.get(aspect.getTag())).doubleValue(); this.color = -1; } public void updateEntity() { - - this.side = !this.worldObj.isRemote ? FMLCommonHandler.instance().getEffectiveSide().isServer() : FMLCommonHandler.instance().getSide().isServer(); + this.side = !this.worldObj.isRemote; this.dead = false; this.timer += 1L; if (this.timer <= Long.MAX_VALUE - 1) @@ -79,7 +92,6 @@ public class TileEntityBaseGenerator fillfrompipe(); createEnergy(); inputintoGTnet(); - this.energySource.updateEntity(); } @@ -89,7 +101,7 @@ public class TileEntityBaseGenerator for (int y = this.yCoord - 4; y < this.yCoord + 4; y++) { for (int z = this.zCoord - 4; z < this.zCoord + 4; z++) { TileEntity tile = this.worldObj.getTileEntity(x, y, z); - if ((tile != null) && ((tile instanceof IAspectSource))) { + if (tile instanceof IAspectSource) { IAspectSource as = (IAspectSource) tile; if ((as.doesContainerContainAmount(this.aspect, this.refuel)) && (as.takeFromContainer(this.aspect, this.refuel))) { @@ -138,7 +150,7 @@ public class TileEntityBaseGenerator } } else if (this.storage == this.maxstorage) { this.isActive = false; - } else if ((this.storage + this.generating / 20.0D / 20.0D > this.maxstorage) && (this.storage != this.maxstorage)) { + } else if ((this.storage + this.generating / 20.0D / 20.0D > this.maxstorage)) { this.isActive = true; if (side) { this.energySource.setEnergyStored(this.maxstorage); @@ -156,31 +168,24 @@ public class TileEntityBaseGenerator } } - public void onChunkUnload() { - this.energySource.onChunkUnload(); - } - - public void invalidate() { - this.energySource.invalidate(); - super.invalidate(); - } - public void readFromNBT(NBTTagCompound tag) { super.readFromNBT(tag); - this.energySource.readFromNBT(tag); - if (tag.getInteger("storage") > this.storage) { - this.storage = tag.getInteger("storage"); - } + this.energySource.setEnergyStored(tag.getLong("estore")); if (tag.getByte("fuel") > this.fuel) { this.fuel = tag.getByte("fuel"); } + if (!tag.getString("aspect").isEmpty()) { + this.aspect = Aspect.getAspect(tag.getString("aspect")); + this.generating = EMTEssentiasOutputs.outputs.get(this.aspect.getTag()); + } } public void writeToNBT(NBTTagCompound tag) { - tag.setInteger("storage", this.storage); - tag.setInteger("fuel", this.fuel); super.writeToNBT(tag); - this.energySource.writeToNBT(tag); + tag.setInteger("fuel", this.fuel); + tag.setLong("estore", this.energySource.getEnergyStored()); + if (aspect != null) + tag.setString("aspect", this.aspect.getTag()); } public int getSizeInventory() { @@ -268,7 +273,7 @@ public class TileEntityBaseGenerator } public boolean doesContainerContain(AspectList ot) { - return ot.aspects.containsKey(this.aspect); + return ot.aspects.containsKey(this.aspect) && ot.aspects.get(this.aspect) == this.fuel; } public int containerContains(Aspect tag) { diff --git a/src/main/java/emt/tile/generator/TileEntityCompressedGenerator.java b/src/main/java/emt/tile/generator/TileEntityCompressedGenerator.java index 9bf54c5..8d05aa4 100644 --- a/src/main/java/emt/tile/generator/TileEntityCompressedGenerator.java +++ b/src/main/java/emt/tile/generator/TileEntityCompressedGenerator.java @@ -2,17 +2,15 @@ package emt.tile.generator; import emt.tile.DefinitelyNotAIC2Source; import emt.util.EMTConfigHandler; -import ic2.api.energy.prefab.BasicSource; import thaumcraft.api.aspects.Aspect; public abstract class TileEntityCompressedGenerator - extends TileEntityBaseGenerator -{ - public TileEntityCompressedGenerator(Aspect aspect) - { - super(aspect); - this.energySource = new DefinitelyNotAIC2Source(this, 1000000.0D, 3); - this.energySource.setCapacity(EMTConfigHandler.EssentiaGeneratorStorage * 10.0D); - this.maxfuel *= 10; - } + extends TileEntityBaseGenerator { + public TileEntityCompressedGenerator(Aspect aspect) { + super(); + this.energySource = new DefinitelyNotAIC2Source(this, 1000000L, 3); + this.energySource.setCapacity(EMTConfigHandler.EssentiaGeneratorStorage * 10.0D); + this.maxfuel *= 10; + this.aspect = aspect; + } } diff --git a/src/main/java/emt/tile/generator/TileEntityIgnisGenerator.java b/src/main/java/emt/tile/generator/TileEntityIgnisGenerator.java deleted file mode 100644 index 97e9676..0000000 --- a/src/main/java/emt/tile/generator/TileEntityIgnisGenerator.java +++ /dev/null @@ -1,12 +0,0 @@ -package emt.tile.generator; - -import thaumcraft.api.aspects.Aspect; - -public class TileEntityIgnisGenerator - extends TileEntityBaseGenerator -{ - public TileEntityIgnisGenerator() - { - super(Aspect.FIRE); - } -} diff --git a/src/main/java/emt/tile/generator/TileEntityLucrumGenerator.java b/src/main/java/emt/tile/generator/TileEntityLucrumGenerator.java deleted file mode 100644 index 0a1a2c6..0000000 --- a/src/main/java/emt/tile/generator/TileEntityLucrumGenerator.java +++ /dev/null @@ -1,12 +0,0 @@ -package emt.tile.generator; - -import thaumcraft.api.aspects.Aspect; - -public class TileEntityLucrumGenerator - extends TileEntityBaseGenerator -{ - public TileEntityLucrumGenerator() - { - super(Aspect.GREED); - } -} diff --git a/src/main/java/emt/tile/generator/TileEntityPotentiaGenerator.java b/src/main/java/emt/tile/generator/TileEntityPotentiaGenerator.java deleted file mode 100644 index 19f7e4d..0000000 --- a/src/main/java/emt/tile/generator/TileEntityPotentiaGenerator.java +++ /dev/null @@ -1,12 +0,0 @@ -package emt.tile.generator; - -import thaumcraft.api.aspects.Aspect; - -public class TileEntityPotentiaGenerator - extends TileEntityBaseGenerator -{ - public TileEntityPotentiaGenerator() - { - super(Aspect.ENERGY); - } -} diff --git a/src/main/java/emt/tile/generator/TileEntityReflexionGen.java b/src/main/java/emt/tile/generator/TileEntityReflexionGen.java deleted file mode 100644 index 314e147..0000000 --- a/src/main/java/emt/tile/generator/TileEntityReflexionGen.java +++ /dev/null @@ -1,25 +0,0 @@ -package emt.tile.generator; - -import emt.util.EMTEssentiasOutputs; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import net.minecraft.tileentity.TileEntity; -import thaumcraft.api.aspects.Aspect; - -public class TileEntityReflexionGen -{ - public static List L = new ArrayList(EMTEssentiasOutputs.outputs.keySet()); - public static Class[] GensS = new Class[L.size()]; - public static TileEntityBaseGenerator[] Gens = new TileEntityBaseGenerator[L.size()]; - - public TileEntityReflexionGen() - { - for (int i = 0; i < L.size(); i++) - { - GensS[i] = TileEntityBaseGenerator.class; - Gens[i] = new TileEntityBaseGenerator((Aspect)Aspect.aspects.get(L.get(i))); - } - } -} diff --git a/src/main/java/emt/tile/solar/Solars.java b/src/main/java/emt/tile/solar/Solars.java new file mode 100644 index 0000000..f3c9721 --- /dev/null +++ b/src/main/java/emt/tile/solar/Solars.java @@ -0,0 +1,155 @@ +package emt.tile.solar; + +import emt.init.EMTBlocks; +import emt.util.EMTConfigHandler; +import gregtech.GT_Mod; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_ModHandler; +import net.minecraft.item.ItemStack; +import thaumcraft.api.aspects.Aspect; + +import java.util.LinkedHashMap; + +import static thaumcraft.api.aspects.Aspect.*; + +//Solar Factory +public enum Solars { + //compability to older versions + Compressed(EMTConfigHandler.compressedSolarOutput, null, 0, 0), + Double_Compressed(EMTConfigHandler.doubleCompressedSolarOutput, null, 0, 1), + Triple_Compressed(EMTConfigHandler.tripleCompressedSolarOutput, null, 0, 2), + Compressed_Aqua(EMTConfigHandler.compressedSolarOutput, WATER, 0, 3), + Double_Compressed_Aqua(EMTConfigHandler.doubleCompressedSolarOutput, WATER, 0, 4), + Triple_Compressed_Aqua(EMTConfigHandler.tripleCompressedSolarOutput, WATER, 0, 5), + Compressed_Perditio(EMTConfigHandler.compressedSolarOutput, ENTROPY, 0, 6), + Double_Compressed_Perditio(EMTConfigHandler.doubleCompressedSolarOutput, ENTROPY, 0, 7), + Triple_Compressed_Perditio(EMTConfigHandler.tripleCompressedSolarOutput, ENTROPY, 0, 8), + Compressed_Ordo(EMTConfigHandler.compressedSolarOutput, ORDER, 0, 9), + Double_Compressed_Ordo(EMTConfigHandler.doubleCompressedSolarOutput, ORDER, 0, 10), + Triple_Compressed_Ordo(EMTConfigHandler.tripleCompressedSolarOutput, ORDER, 0, 11), + Compressed_Ignis(EMTConfigHandler.compressedSolarOutput, FIRE, 0, 12), + Double_Compressed_Ignis(EMTConfigHandler.doubleCompressedSolarOutput, FIRE, 0, 13), + Triple_Compressed_Ignis(EMTConfigHandler.tripleCompressedSolarOutput, FIRE, 0, 14), + Compressed_Aer(EMTConfigHandler.compressedSolarOutput, AIR, 0, 15), + Double_Compressed_Aer(EMTConfigHandler.doubleCompressedSolarOutput, AIR, 1, 0), + Triple_Compressed_Aer(EMTConfigHandler.tripleCompressedSolarOutput, AIR, 1, 1), + Compressed_Terra(EMTConfigHandler.compressedSolarOutput, EARTH, 1, 2), + Double_Compressed_Terra(EMTConfigHandler.doubleCompressedSolarOutput, EARTH, 1, 3), + Triple_Compressed_Terra(EMTConfigHandler.tripleCompressedSolarOutput, EARTH, 1, 4), + + //New Solars + Quadruple_Compressed(EMTConfigHandler.quadrupleCompressedSolarOutput, null, 2, 0), + Quadruple_Compressed_Ordo(EMTConfigHandler.quadrupleCompressedSolarOutput, ORDER, 2, 1), + Quadruple_Compressed_Perditio(EMTConfigHandler.quadrupleCompressedSolarOutput, ENTROPY, 2, 2), + Quadruple_Compressed_Aer(EMTConfigHandler.quadrupleCompressedSolarOutput, AIR, 2, 3), + Quadruple_Compressed_Terra(EMTConfigHandler.quadrupleCompressedSolarOutput, EARTH, 2, 4), + Quadruple_Compressed_Aqua(EMTConfigHandler.quadrupleCompressedSolarOutput, WATER, 2, 5), + Quadruple_Compressed_Ignis(EMTConfigHandler.quadrupleCompressedSolarOutput, FIRE, 2, 6), + Quintuple_Compressed(EMTConfigHandler.quintupleCompressedSolarOutput, null, 2, 7), + Quintuple_Compressed_Ordo(EMTConfigHandler.quintupleCompressedSolarOutput, ORDER, 2, 8), + Quintuple_Compressed_Perditio(EMTConfigHandler.quintupleCompressedSolarOutput, ENTROPY, 2, 9), + Quintuple_Compressed_Aer(EMTConfigHandler.quintupleCompressedSolarOutput, AIR, 2, 10), + Quintuple_Compressed_Terra(EMTConfigHandler.quintupleCompressedSolarOutput, EARTH, 2, 11), + Quintuple_Compressed_Aqua(EMTConfigHandler.quintupleCompressedSolarOutput, WATER, 2, 12), + Quintuple_Compressed_Ignis(EMTConfigHandler.quintupleCompressedSolarOutput, FIRE, 2, 13), + Sextuple_Compressed(EMTConfigHandler.sextupleCompressedSolarOutput, null, 2, 14), + Sextuple_Compressed_Ordo(EMTConfigHandler.sextupleCompressedSolarOutput, ORDER, 2, 15), + Sextuple_Compressed_Perditio(EMTConfigHandler.sextupleCompressedSolarOutput, ENTROPY, 3, 0), + Sextuple_Compressed_Aer(EMTConfigHandler.sextupleCompressedSolarOutput, AIR, 3, 1), + Sextuple_Compressed_Terra(EMTConfigHandler.sextupleCompressedSolarOutput, EARTH, 3, 2), + Sextuple_Compressed_Aqua(EMTConfigHandler.sextupleCompressedSolarOutput, WATER, 3, 3), + Sextuple_Compressed_Ignis(EMTConfigHandler.sextupleCompressedSolarOutput, FIRE, 3, 4), + Septuple_Compressed(EMTConfigHandler.septupleCompressedSolarOutput, null, 3, 5), + Septuple_Compressed_Ordo(EMTConfigHandler.septupleCompressedSolarOutput, ORDER, 3, 6), + Septuple_Compressed_Perditio(EMTConfigHandler.septupleCompressedSolarOutput, ENTROPY, 3, 7), + Septuple_Compressed_Aer(EMTConfigHandler.septupleCompressedSolarOutput, AIR, 3, 8), + Septuple_Compressed_Terra(EMTConfigHandler.septupleCompressedSolarOutput, EARTH, 3, 9), + Septuple_Compressed_Aqua(EMTConfigHandler.septupleCompressedSolarOutput, WATER, 3, 10), + Septuple_Compressed_Ignis(EMTConfigHandler.septupleCompressedSolarOutput, FIRE, 3, 11), + Octuple_Compressed(EMTConfigHandler.octupleCompressedSolarOutput, null, 3, 12), + Octuple_Compressed_Ordo(EMTConfigHandler.octupleCompressedSolarOutput, ORDER, 3, 13), + Octuple_Compressed_Perditio(EMTConfigHandler.octupleCompressedSolarOutput, ENTROPY, 3, 14), + Octuple_Compressed_Aer(EMTConfigHandler.octupleCompressedSolarOutput, AIR, 3, 15), + Octuple_Compressed_Terra(EMTConfigHandler.octupleCompressedSolarOutput, EARTH, 4, 0), + Octuple_Compressed_Aqua(EMTConfigHandler.octupleCompressedSolarOutput, WATER, 4, 1), + Octuple_Compressed_Ignis(EMTConfigHandler.octupleCompressedSolarOutput, FIRE, 4, 2), + ; + + private final static LinkedHashMap cachemap = new LinkedHashMap<>(); + int instance, meta; + Aspect aspect; + String guiname; + private double output; + + Solars(double output, Aspect aspect, int instance, int meta) { + this.aspect = aspect; + this.output = output; + this.guiname = this.name().replaceAll("_", " ") + " Solar"; + this.instance = instance; + this.meta = meta; + } + + private static Solars getBaseSolar(double output){ + for (Solars s : Solars.values()){ + if (s.output == output && s.aspect == null) + return s; + } + return null; + } + + public static void registerReverseRecipes(){ + for (Solars s : Solars.values()){ + if (s.aspect != null){ + //ItemStack aInput, FluidStack aBathingFluid, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt + GT_Values.RA.addChemicalBathRecipe(new ItemStack(EMTBlocks.solars[s.instance],1,s.meta), Materials.Chlorine.getGas(1000),new ItemStack(EMTBlocks.solars[getBaseSolar(s.output).instance],1,getBaseSolar(s.output).meta),null,null,null,30,30); + } + } + } + + public static void populateCache() { + for (Solars s : Solars.values()) { + cachemap.put((long) (s.instance << 4 | s.meta), s); + } + } + + public static int getCountOfInstances() { + int ret = 0; + for (Solars s : Solars.values()) { + ret = Math.max(s.instance, ret); + } + return ret + 1; + } + + public static int getCountOfMetas(int instance) { + int ret = 0; + for (Solars s : Solars.values()) { + if (s.instance == instance) { + ret = Math.max(s.meta, ret); + } + } + return ret + 1; + } + + public static TileEntitySolarBase getTileEntitySolarBase(int instance, int meta) { + Solars cached = cachemap.get((long) (instance << 4 | meta)); + if (cached != null) + return new TileEntitySolarBase(cached.output, cached.aspect, cached.guiname, instance, meta); + for (Solars s : Solars.values()) { + if (s.instance == instance && s.meta == meta) + return new TileEntitySolarBase(s.output, s.aspect, s.guiname, instance, meta); + } + return null; + } + + public static String getNameFromSolar(int instance, int meta) { + Solars cached = cachemap.get((long) (instance << 4 | meta)); + if (cached != null) + return cached.guiname; + for (Solars s : Solars.values()) { + if (s.instance == instance && s.meta == meta) + return s.guiname; + } + return ""; + } +} \ No newline at end of file diff --git a/src/main/java/emt/tile/solar/TileEntitySolarBase.java b/src/main/java/emt/tile/solar/TileEntitySolarBase.java index 168620a..bc9a1e8 100644 --- a/src/main/java/emt/tile/solar/TileEntitySolarBase.java +++ b/src/main/java/emt/tile/solar/TileEntitySolarBase.java @@ -1,6 +1,7 @@ package emt.tile.solar; import cpw.mods.fml.common.FMLCommonHandler; +import emt.init.EMTBlocks; import emt.tile.DefinitelyNotAIC2Source; import emt.tile.TileEntityEMT; import gregtech.api.enums.GT_Values; @@ -18,33 +19,86 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.IFluidHandler; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.visnet.VisNetHandler; -public abstract class TileEntitySolarBase extends TileEntityEMT implements IInventory, IWrenchable, IHasWorldObjectAndCoords, IEnergyConnected, IBasicEnergyContainer { +public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IWrenchable, IHasWorldObjectAndCoords, IEnergyConnected, IBasicEnergyContainer { + private static final byte NOTHING = 0; + private static final byte ORDO = 1; + private static final byte PERDITIO = 2; + private static final byte AER = 3; + private static final byte TERRA = 4; + private static final byte AQUA = 5; + private static final byte IGNIS = 6; + + public String guiname; public boolean initialized; public boolean theSunIsVisible; - public boolean canRain; public int tick; public double output = 0; public long timer = 0L; public boolean dead = true; public double generating; - public short mp_storage = 0; + public long mp_storage = 0; public byte color = (-1); - public int storage; + public long storage; public long maxstorage = 0; public boolean isActive = false; - protected DefinitelyNotAIC2Source energySource; + public DefinitelyNotAIC2Source energySource; + public byte aspect = 0; protected boolean side; + private int instance, meta; - public TileEntitySolarBase() { + public TileEntitySolarBase(double output, Aspect aspect, String guiname, int instance, int meta) { this.tick = 10; this.storage = 0; + long capacity = (long) (output * 1000); + this.output = output; + this.energySource = new DefinitelyNotAIC2Source(this, capacity, (int) getTierFromCapacity(capacity)); + this.maxstorage = this.getEUCapacity(); + this.aspect = getByteFromAspect(aspect); + this.guiname = guiname; + this.instance = instance; + this.meta = meta; + } + + + /** + * DO NOT CALL THIS ITS USED INTERNALLY ONLY + */ + public TileEntitySolarBase() { + this.tick = 10; + } + + private static byte getByteFromAspect(Aspect aspect) { + if (aspect == null) + return NOTHING; + if (aspect.equals(Aspect.ORDER)) + return ORDO; + else if (aspect.equals(Aspect.ENTROPY)) + return PERDITIO; + else if (aspect.equals(Aspect.AIR)) + return AER; + else if (aspect.equals(Aspect.EARTH)) + return TERRA; + else if (aspect.equals(Aspect.WATER)) + return AQUA; + else if (aspect.equals(Aspect.FIRE)) + return IGNIS; + return 0; + } + + private int getTierFromCapacity(long capacity) { + for (int i = 0; i < GT_Values.V.length; i++) { + if (capacity / 1000 < GT_Values.V[i]) + return i; + } + return GT_Values.V.length - 1; } @Override @@ -53,68 +107,200 @@ public abstract class TileEntitySolarBase extends TileEntityEMT implements IInve this.dead = false; this.timer = +1L; inputintoGTnet(); - energySource.updateEntity(); checkConditions(); + this.storage = this.energySource.getEnergyStored(); } - public abstract float calc_multi(); + private float getMaxMulti() { + switch (aspect) { + case ORDO: + case PERDITIO: { + return 2F; + } + case AER: + case TERRA: + case IGNIS: { + return 3F; + } + case AQUA: { + return 6F; + } + default: + return 1f; + } + } + + public float calc_multi() { + switch (aspect) { + case ORDO: { + if (this.worldObj.isDaytime()) + return 2F; + else return 0.75F; + } + case PERDITIO: { + if (this.worldObj.isDaytime()) + return 0.75F; + else return 2F; + } + case AER: { + if (this.yCoord < 5) + return 1F; + else if (this.yCoord > 220) + return 3F; + else + return (float) ((41D / 43D) + ((2D / 215D) * (double) this.yCoord)); + } + case TERRA: { + if (this.yCoord < 5) + return 3F; + else if (this.yCoord > 220) + return 1F; + else + return (float) ((-2D) / 215D * (double) this.yCoord + 131D / 43D); + } + case AQUA: { + if (worldObj.isThundering()) + return 6F; + else if (worldObj.isRaining()) + return 3F; + else if (!worldObj.isThundering() && !worldObj.isRaining() && worldObj.getBlock(xCoord, yCoord + 1, zCoord).equals(Blocks.water)) + return 2F; + else + return 1F; + } + case IGNIS: { + if (VisNetHandler.drainVis(worldObj, xCoord, yCoord, zCoord, Aspect.FIRE, 10) >= 10) + return 3F; + else if (this.worldObj.provider.dimensionId == (-1)) + return 2F; + else + return 1F; + } + default: + return 1f; + } + } public double getSourceStored() { return this.energySource.getEnergyStored(); } public void checkConditions() { - initialized = true; - if (tick-- == 0) { - updateSunState(); - tick = 64; + switch (aspect) { + case IGNIS: { + initialized = true; + boolean ignis = ((this.worldObj.provider.dimensionId == (-1)) || (theSunIsVisible)); + if (ignis) { + this.isActive = true; + if (side) { + this.generating = output * calc_multi(); + this.energySource.addEnergy(this.output * calc_multi()); + } + } else { + isActive = false; + this.generating = 0; + } + if (--tick == 0) { + updateSunState(); + tick = 64; + } + break; + } + default: { + initialized = true; + if (--tick == 0) { + updateSunState(); + tick = 64; + } + createEnergy(); + } } - createEnergy(); } public void createEnergy() { - if (theSunIsVisible) { - isActive = true; - if (side) { - this.energySource.addEnergy(this.output * calc_multi()); - this.generating = output * calc_multi(); + switch (aspect) { + case ORDO: + case PERDITIO: { + if ((this.worldObj.canBlockSeeTheSky(this.xCoord, this.yCoord + 1, this.zCoord)) && (!this.worldObj.isRaining()) && (!this.worldObj.isThundering())) { + isActive = true; + if (side) { + this.energySource.addEnergy(this.output * calc_multi()); + this.generating = output * calc_multi(); + } + } else { + isActive = false; + this.generating = 0; + } + break; + } + case AQUA: { + if (theSunIsVisible || this.calc_multi() > 1F && this.worldObj.isDaytime() || this.calc_multi() == 6F) { + isActive = true; + if (side) { + this.generating = output * calc_multi(); + energySource.addEnergy(output * calc_multi()); + } + } else { + isActive = false; + this.generating = 0D; + } + break; + } + default: { + if (theSunIsVisible) { + isActive = true; + if (side) { + this.energySource.addEnergy(this.output * calc_multi()); + this.generating = output * calc_multi(); + } + } else { + isActive = false; + this.generating = 0; + } } - } else { - isActive = false; - this.generating = 0; } } public void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + boolean isRaining = this.aspect != AQUA && (worldObj.isRaining() || worldObj.isThundering()); theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } - - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } - @Override public void writeToNBT(NBTTagCompound nbttagcompound) { super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); + nbttagcompound.setLong("storage", this.energySource.getEnergyStored()); + + NBTTagCompound subtag = new NBTTagCompound(); + subtag.setInteger("instance", this.instance); + subtag.setInteger("meta", this.meta); + subtag.setString("guiname", this.guiname); + subtag.setByte("aspect", this.aspect); + subtag.setDouble("Output", this.output); + nbttagcompound.setTag("solarstats", subtag); + } @Override public void readFromNBT(NBTTagCompound nbttagcompound) { super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); + + NBTTagCompound subtag = nbttagcompound.getCompoundTag("solarstats"); + this.instance = subtag.getInteger("instance"); + this.meta = subtag.getInteger("meta"); + this.guiname = subtag.getString("guiname"); + this.aspect = subtag.getByte("aspect"); + this.output = subtag.getDouble("Output"); + long capacity = (long) (output * 1000); + this.energySource = new DefinitelyNotAIC2Source(this, capacity, (int) Math.floor(Math.log10(capacity) - 1D)); + this.maxstorage = this.getEUCapacity(); + this.energySource.setEnergyStored(nbttagcompound.getLong("storage")); + this.storage = this.energySource.getEnergyStored(); + this.mp_storage = this.storage / 1000; } public int getSizeInventory() { - return 5; + return 0; } public ItemStack getStackInSlot(int i) { @@ -137,7 +323,7 @@ public abstract class TileEntitySolarBase extends TileEntityEMT implements IInve } public String getInventoryName() { - return StatCollector.translateToLocal("tile.EMT.solar." + getInventoryName().replaceAll(" ", "").toLowerCase() + ".name"); + return guiname; } public int getInventoryStackLimit() { @@ -154,11 +340,10 @@ public abstract class TileEntitySolarBase extends TileEntityEMT implements IInve public void closeInventory() { } - public int gaugeEnergyScaled(int i) { - return (int) (this.mp_storage * 1000 * i / (int) this.maxstorage); + public int gaugeEnergyScaled(long i) { + return (int) ((this.mp_storage * 1000 * i) / this.maxstorage); } - @Override public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { return false; @@ -185,7 +370,12 @@ public abstract class TileEntitySolarBase extends TileEntityEMT implements IInve @Override public float getWrenchDropRate() { - return 1; + return 1F; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(EMTBlocks.solars[instance], 1, meta); } public void inputintoGTnet() { @@ -220,6 +410,19 @@ public abstract class TileEntitySolarBase extends TileEntityEMT implements IInve return (long) this.energySource.getCapacity(); } + public long[] calculateMaxVoltAmp() { + long[] voltAmp = new long[2]; + voltAmp[0] = getOutputVoltage(); + long generating = (long) Math.floor(output * getMaxMulti()); + if (generating <= GT_Values.V[energySource.getSourceTier()]) { + voltAmp[1] = 1L; + } else if (generating % GT_Values.V[energySource.getSourceTier()] == 0.0D) { + voltAmp[1] = (generating / GT_Values.V[energySource.getSourceTier()]); + } else + voltAmp[1] = (1L + (generating / GT_Values.V[energySource.getSourceTier()])); + return voltAmp; + } + public long getOutputAmperage() { long ret; if (this.energySource.getSourceTier() <= 4) { @@ -240,14 +443,10 @@ public abstract class TileEntitySolarBase extends TileEntityEMT implements IInve ret = (long) (1L + (this.generating / GT_Values.V[this.energySource.getSourceTier() - 1])); } return ret; - } public long getOutputVoltage() { - if (this.energySource.getSourceTier() <= 4) - return GT_Values.V[(this.energySource.getSourceTier() - 2)]; - else - return GT_Values.V[(this.energySource.getSourceTier() - 1)]; + return GT_Values.V[this.energySource.getSourceTier()]; } public long getInputAmperage() { @@ -261,7 +460,7 @@ public abstract class TileEntitySolarBase extends TileEntityEMT implements IInve public boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLessEnergy) { if (this.energySource.getEnergyStored() > aEnergy) { this.energySource.drawEnergy(aEnergy); - this.storage = ((int) this.energySource.getEnergyStored()); + this.storage = this.energySource.getEnergyStored(); return true; } return false; diff --git a/src/main/java/emt/tile/solar/air/TileEntityAirSolar.java b/src/main/java/emt/tile/solar/air/TileEntityAirSolar.java deleted file mode 100644 index 8a68234..0000000 --- a/src/main/java/emt/tile/solar/air/TileEntityAirSolar.java +++ /dev/null @@ -1,39 +0,0 @@ -package emt.tile.solar.air; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.tile.solar.TileEntitySolarBase; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class TileEntityAirSolar extends TileEntitySolarBase { - - public TileEntityAirSolar() { - super(); - energySource = new DefinitelyNotAIC2Source(this, 10000, 3); - output = EMTConfigHandler.compressedSolarOutput; - this.maxstorage=this.getEUCapacity(); - }; - - @Override - public float calc_multi() { - if (this.yCoord<5) - return 1F; - else if (this.yCoord>220) - return 3F; - else - return (float) ((41D/43D) + ((2D/215D) * (double) this.yCoord)); - - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars, 1, 15); - } - - @Override - public String getInventoryName() { - return "Compressed Aer Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/air/TileEntityDoubleAirSolar.java b/src/main/java/emt/tile/solar/air/TileEntityDoubleAirSolar.java deleted file mode 100644 index ea10355..0000000 --- a/src/main/java/emt/tile/solar/air/TileEntityDoubleAirSolar.java +++ /dev/null @@ -1,27 +0,0 @@ -package emt.tile.solar.air; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class TileEntityDoubleAirSolar extends TileEntityAirSolar { - - public TileEntityDoubleAirSolar() { - super(); - energySource = new DefinitelyNotAIC2Source(this, 100000, 4); - output = EMTConfigHandler.doubleCompressedSolarOutput; - this.maxstorage=this.getEUCapacity(); - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars2, 1, 0); - } - - @Override - public String getInventoryName() { - return "Double Compressed Aer Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/air/TileEntityTripleAirSolar.java b/src/main/java/emt/tile/solar/air/TileEntityTripleAirSolar.java deleted file mode 100644 index a890b93..0000000 --- a/src/main/java/emt/tile/solar/air/TileEntityTripleAirSolar.java +++ /dev/null @@ -1,27 +0,0 @@ -package emt.tile.solar.air; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class TileEntityTripleAirSolar extends TileEntityAirSolar { - - public TileEntityTripleAirSolar() { - super(); - output = EMTConfigHandler.tripleCompressedSolarOutput; - energySource = new DefinitelyNotAIC2Source(this, 1000000, 5); - this.maxstorage=this.getEUCapacity(); - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars2, 1, 1); - } - - @Override - public String getInventoryName() { - return "Triple Compressed Aer Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/compressed/TileEntityCompressedSolar.java b/src/main/java/emt/tile/solar/compressed/TileEntityCompressedSolar.java deleted file mode 100644 index 7e3619d..0000000 --- a/src/main/java/emt/tile/solar/compressed/TileEntityCompressedSolar.java +++ /dev/null @@ -1,33 +0,0 @@ -package emt.tile.solar.compressed; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.tile.solar.TileEntitySolarBase; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class TileEntityCompressedSolar extends TileEntitySolarBase { - - public TileEntityCompressedSolar() { - super(); - energySource = new DefinitelyNotAIC2Source(this, 10000, 3); - output = EMTConfigHandler.compressedSolarOutput; - this.maxstorage=this.getEUCapacity(); - }; - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars, 1, 0); - } - - @Override - public float calc_multi() { - return 1F; - } - - @Override - public String getInventoryName() { - return "Compressed Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/compressed/TileEntityDoubleCompressedSolar.java b/src/main/java/emt/tile/solar/compressed/TileEntityDoubleCompressedSolar.java deleted file mode 100644 index 805d1db..0000000 --- a/src/main/java/emt/tile/solar/compressed/TileEntityDoubleCompressedSolar.java +++ /dev/null @@ -1,33 +0,0 @@ -package emt.tile.solar.compressed; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.tile.solar.TileEntitySolarBase; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class TileEntityDoubleCompressedSolar extends TileEntitySolarBase { - - public TileEntityDoubleCompressedSolar() { - super(); - energySource = new DefinitelyNotAIC2Source(this, 100000, 4); - output = EMTConfigHandler.doubleCompressedSolarOutput; - this.maxstorage=this.getEUCapacity(); - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars, 1, 1); - } - - @Override - public float calc_multi() { - return 1F; - } - - @Override - public String getInventoryName() { - return "Double Compressed Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/compressed/TileEntityTripleCompressedSolar.java b/src/main/java/emt/tile/solar/compressed/TileEntityTripleCompressedSolar.java deleted file mode 100644 index 534c5c8..0000000 --- a/src/main/java/emt/tile/solar/compressed/TileEntityTripleCompressedSolar.java +++ /dev/null @@ -1,33 +0,0 @@ -package emt.tile.solar.compressed; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.tile.solar.TileEntitySolarBase; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class TileEntityTripleCompressedSolar extends TileEntitySolarBase { - - public TileEntityTripleCompressedSolar() { - super(); - output = EMTConfigHandler.tripleCompressedSolarOutput; - energySource = new DefinitelyNotAIC2Source(this, 1000000, 5); - this.maxstorage=this.getEUCapacity(); - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars, 1, 2); - } - - @Override - public float calc_multi() { - return 1F; - } - - @Override - public String getInventoryName() { - return "Triple Compressed Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/dark/TileEntityDarkSolar.java b/src/main/java/emt/tile/solar/dark/TileEntityDarkSolar.java deleted file mode 100644 index 5b847e1..0000000 --- a/src/main/java/emt/tile/solar/dark/TileEntityDarkSolar.java +++ /dev/null @@ -1,49 +0,0 @@ -package emt.tile.solar.dark; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.tile.solar.TileEntitySolarBase; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class TileEntityDarkSolar extends TileEntitySolarBase { - - public TileEntityDarkSolar() { - super(); - energySource = new DefinitelyNotAIC2Source(this, 10000, 3); - output = EMTConfigHandler.compressedSolarOutput; - this.maxstorage=this.getEUCapacity(); - }; - - @Override - public void createEnergy() { - if ((this.worldObj.canBlockSeeTheSky(this.xCoord, this.yCoord + 1, this.zCoord)) && (!this.worldObj.isRaining()) && (!this.worldObj.isThundering())) { - isActive=true; - if (side) { - this.generating=output*calc_multi(); - this.energySource.addEnergy(this.output*calc_multi()); - } - }else { - isActive = false; - this.generating=0; - } - } - - @Override - public float calc_multi() { - if (this.worldObj.isDaytime()) - return 0.75F; - else return 2F; - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars, 1, 6); - } - - @Override - public String getInventoryName() { - return "Compressed Perditio Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/dark/TileEntityDoubleDarkSolar.java b/src/main/java/emt/tile/solar/dark/TileEntityDoubleDarkSolar.java deleted file mode 100644 index 59e8ee4..0000000 --- a/src/main/java/emt/tile/solar/dark/TileEntityDoubleDarkSolar.java +++ /dev/null @@ -1,28 +0,0 @@ -package emt.tile.solar.dark; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class TileEntityDoubleDarkSolar extends TileEntityDarkSolar { - - public TileEntityDoubleDarkSolar() { - super(); - energySource = new DefinitelyNotAIC2Source(this, 100000, 4); - output = EMTConfigHandler.doubleCompressedSolarOutput; - this.maxstorage=this.getEUCapacity(); - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars, 1, 7); - } - - - @Override - public String getInventoryName() { - return "Double Compressed Perditio Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/dark/TileEntityTripleDarkSolar.java b/src/main/java/emt/tile/solar/dark/TileEntityTripleDarkSolar.java deleted file mode 100644 index 70eee99..0000000 --- a/src/main/java/emt/tile/solar/dark/TileEntityTripleDarkSolar.java +++ /dev/null @@ -1,28 +0,0 @@ -package emt.tile.solar.dark; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class TileEntityTripleDarkSolar extends TileEntityDarkSolar { - - public TileEntityTripleDarkSolar() { - super(); - output = EMTConfigHandler.tripleCompressedSolarOutput; - energySource = new DefinitelyNotAIC2Source(this, 1000000, 5); - this.maxstorage=this.getEUCapacity(); - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars, 1, 8); - } - - - @Override - public String getInventoryName() { - return "Triple Compressed Perditio Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/earth/TileEntityDoubleEarthSolar.java b/src/main/java/emt/tile/solar/earth/TileEntityDoubleEarthSolar.java deleted file mode 100644 index ae51d16..0000000 --- a/src/main/java/emt/tile/solar/earth/TileEntityDoubleEarthSolar.java +++ /dev/null @@ -1,28 +0,0 @@ -package emt.tile.solar.earth; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class TileEntityDoubleEarthSolar extends TileEntityEarthSolar { - - public TileEntityDoubleEarthSolar() { - super(); - energySource = new DefinitelyNotAIC2Source(this, 100000, 4); - output = EMTConfigHandler.doubleCompressedSolarOutput; - this.maxstorage=this.getEUCapacity(); - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars2, 1, 3); - } - - - @Override - public String getInventoryName() { - return "Double Compressed Terra Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/earth/TileEntityEarthSolar.java b/src/main/java/emt/tile/solar/earth/TileEntityEarthSolar.java deleted file mode 100644 index 84253a2..0000000 --- a/src/main/java/emt/tile/solar/earth/TileEntityEarthSolar.java +++ /dev/null @@ -1,38 +0,0 @@ -package emt.tile.solar.earth; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.tile.solar.TileEntitySolarBase; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class TileEntityEarthSolar extends TileEntitySolarBase { - - public TileEntityEarthSolar() { - super(); - energySource = new DefinitelyNotAIC2Source(this, 10000, 3); - output = EMTConfigHandler.compressedSolarOutput; - this.maxstorage=this.getEUCapacity(); - } - - @Override - public float calc_multi() { - if (this.yCoord<5) - return 3F; - else if (this.yCoord>220) - return 1F; - else - return (float) ((-2D)/215D*(double)this.yCoord + 131D/43D); - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars2, 1, 2); - } - - @Override - public String getInventoryName() { - return "Compressed Terra Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/earth/TileEntityTripleEarthSolar.java b/src/main/java/emt/tile/solar/earth/TileEntityTripleEarthSolar.java deleted file mode 100644 index 8b3d877..0000000 --- a/src/main/java/emt/tile/solar/earth/TileEntityTripleEarthSolar.java +++ /dev/null @@ -1,28 +0,0 @@ -package emt.tile.solar.earth; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class TileEntityTripleEarthSolar extends TileEntityEarthSolar { - - public TileEntityTripleEarthSolar() { - super(); - output = EMTConfigHandler.tripleCompressedSolarOutput; - energySource = new DefinitelyNotAIC2Source(this, 1000000, 5); - this.maxstorage=this.getEUCapacity(); - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars2, 1, 4); - } - - - @Override - public String getInventoryName() { - return "Triple Compressed Terra Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/fire/TileEntityDoubleFireSolar.java b/src/main/java/emt/tile/solar/fire/TileEntityDoubleFireSolar.java deleted file mode 100644 index 2a5854f..0000000 --- a/src/main/java/emt/tile/solar/fire/TileEntityDoubleFireSolar.java +++ /dev/null @@ -1,28 +0,0 @@ -package emt.tile.solar.fire; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class TileEntityDoubleFireSolar extends TileEntityFireSolar { - - public TileEntityDoubleFireSolar() { - super(); - energySource = new DefinitelyNotAIC2Source(this, 1000000, 4); - output = EMTConfigHandler.doubleCompressedSolarOutput; - this.maxstorage=this.getEUCapacity(); - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars, 1, 13); - } - - - @Override - public String getInventoryName() { - return "Double Compressed Ignis Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/fire/TileEntityFireSolar.java b/src/main/java/emt/tile/solar/fire/TileEntityFireSolar.java deleted file mode 100644 index c8ff473..0000000 --- a/src/main/java/emt/tile/solar/fire/TileEntityFireSolar.java +++ /dev/null @@ -1,66 +0,0 @@ -package emt.tile.solar.fire; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.tile.solar.TileEntitySolarBase; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.visnet.VisNetHandler; - -public class TileEntityFireSolar extends TileEntitySolarBase { - - public TileEntityFireSolar() { - super(); - energySource = new DefinitelyNotAIC2Source(this, 10000, 3); - output = EMTConfigHandler.compressedSolarOutput; - this.maxstorage=this.getEUCapacity(); - } - - @Override - public void checkConditions() { - boolean ignis = ((this.worldObj.provider.dimensionId == (-1)) || (theSunIsVisible)); - if(ignis) { - this.isActive=true; - if (side) { - this.generating=output*calc_multi(); - this.energySource.addEnergy(this.output*calc_multi()); - } - } - else { - isActive = false; - this.generating=0; - } - /*if (!ignis && VisNetHandler.drainVis(worldObj, xCoord, yCoord, zCoord, Aspect.FIRE, 10)>=10) { - if (FMLCommonHandler.instance().getEffectiveSide().isServer()) { - energySource.addEnergy(15F); - this.generating=15D; - } - }*/ - if (tick-- == 0) { - updateSunState(); - tick = 64; - } - } - - @Override - public float calc_multi() { - if (VisNetHandler.drainVis(worldObj, xCoord, yCoord, zCoord, Aspect.FIRE, 10)>=10) - return 3F; - else if (this.worldObj.provider.dimensionId == (-1)) - return 2F; - else - return 1F; - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars, 1, 12); - } - - @Override - public String getInventoryName() { - return "Compressed Ignis Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/fire/TileEntityTripleFireSolar.java b/src/main/java/emt/tile/solar/fire/TileEntityTripleFireSolar.java deleted file mode 100644 index 406e5a9..0000000 --- a/src/main/java/emt/tile/solar/fire/TileEntityTripleFireSolar.java +++ /dev/null @@ -1,28 +0,0 @@ -package emt.tile.solar.fire; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class TileEntityTripleFireSolar extends TileEntityFireSolar { - - public TileEntityTripleFireSolar() { - super(); - output = EMTConfigHandler.tripleCompressedSolarOutput; - energySource = new DefinitelyNotAIC2Source(this, 1000000, 5); - this.maxstorage=this.getEUCapacity(); - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars, 1, 14); - } - - - @Override - public String getInventoryName() { - return "Triple Compressed Ignis Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/order/TileEntityDoubleOrderSolar.java b/src/main/java/emt/tile/solar/order/TileEntityDoubleOrderSolar.java deleted file mode 100644 index a197754..0000000 --- a/src/main/java/emt/tile/solar/order/TileEntityDoubleOrderSolar.java +++ /dev/null @@ -1,27 +0,0 @@ -package emt.tile.solar.order; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class TileEntityDoubleOrderSolar extends TileEntityOrderSolar { - - public TileEntityDoubleOrderSolar() { - super(); - energySource = new DefinitelyNotAIC2Source(this, 100000, 4); - output = EMTConfigHandler.doubleCompressedSolarOutput; - this.maxstorage=this.getEUCapacity(); - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars, 1, 10); - } - - @Override - public String getInventoryName() { - return "Double Compressed Ordo Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/order/TileEntityOrderSolar.java b/src/main/java/emt/tile/solar/order/TileEntityOrderSolar.java deleted file mode 100644 index 4f6c6d7..0000000 --- a/src/main/java/emt/tile/solar/order/TileEntityOrderSolar.java +++ /dev/null @@ -1,49 +0,0 @@ -package emt.tile.solar.order; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.tile.solar.TileEntitySolarBase; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class TileEntityOrderSolar extends TileEntitySolarBase { - - public TileEntityOrderSolar() { - super(); - energySource = new DefinitelyNotAIC2Source(this, 10000, 3); - output = EMTConfigHandler.compressedSolarOutput; - this.maxstorage=this.getEUCapacity(); - } - - @Override - public void createEnergy() { - if ((this.worldObj.canBlockSeeTheSky(this.xCoord, this.yCoord + 1, this.zCoord)) && (!this.worldObj.isRaining()) && (!this.worldObj.isThundering())) { - isActive = true; - if (side) { - this.energySource.addEnergy(this.output*calc_multi()); - this.generating=output*calc_multi(); - } - }else { - isActive = false; - this.generating=0; - } - } - - @Override - public float calc_multi() { - if (this.worldObj.isDaytime()) - return 2F; - else return 0.75F; - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars, 1, 9); - } - - @Override - public String getInventoryName() { - return "Compressed Ordo Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/order/TileEntityTripleOrderSolar.java b/src/main/java/emt/tile/solar/order/TileEntityTripleOrderSolar.java deleted file mode 100644 index dc58d55..0000000 --- a/src/main/java/emt/tile/solar/order/TileEntityTripleOrderSolar.java +++ /dev/null @@ -1,28 +0,0 @@ -package emt.tile.solar.order; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class TileEntityTripleOrderSolar extends TileEntityOrderSolar { - - public TileEntityTripleOrderSolar() { - super(); - output = EMTConfigHandler.tripleCompressedSolarOutput; - energySource = new DefinitelyNotAIC2Source(this, 1000000, 5); - this.maxstorage=this.getEUCapacity(); - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars, 1, 11); - } - - - @Override - public String getInventoryName() { - return "Triple Compressed Ordo Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/water/TileEntityDoubleWaterSolar.java b/src/main/java/emt/tile/solar/water/TileEntityDoubleWaterSolar.java deleted file mode 100644 index cefa7de..0000000 --- a/src/main/java/emt/tile/solar/water/TileEntityDoubleWaterSolar.java +++ /dev/null @@ -1,28 +0,0 @@ -package emt.tile.solar.water; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class TileEntityDoubleWaterSolar extends TileEntityWaterSolar { - - public TileEntityDoubleWaterSolar() { - super(); - energySource = new DefinitelyNotAIC2Source(this, 100000, 4); - output = EMTConfigHandler.doubleCompressedSolarOutput; - this.maxstorage=this.getEUCapacity(); - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars, 1, 4); - } - - - @Override - public String getInventoryName() { - return "Double Compressed Aqua Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/water/TileEntityTripleWaterSolar.java b/src/main/java/emt/tile/solar/water/TileEntityTripleWaterSolar.java deleted file mode 100644 index 921233a..0000000 --- a/src/main/java/emt/tile/solar/water/TileEntityTripleWaterSolar.java +++ /dev/null @@ -1,28 +0,0 @@ -package emt.tile.solar.water; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class TileEntityTripleWaterSolar extends TileEntityWaterSolar { - - public TileEntityTripleWaterSolar() { - super(); - output = EMTConfigHandler.tripleCompressedSolarOutput; - energySource = new DefinitelyNotAIC2Source(this, 1000000, 5); - this.maxstorage=this.getEUCapacity(); - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars, 1, 5); - } - - - @Override - public String getInventoryName() { - return "Triple Compressed Aqua Solar"; - } -} diff --git a/src/main/java/emt/tile/solar/water/TileEntityWaterSolar.java b/src/main/java/emt/tile/solar/water/TileEntityWaterSolar.java deleted file mode 100644 index 8373de4..0000000 --- a/src/main/java/emt/tile/solar/water/TileEntityWaterSolar.java +++ /dev/null @@ -1,57 +0,0 @@ -package emt.tile.solar.water; - -import emt.init.EMTBlocks; -import emt.tile.DefinitelyNotAIC2Source; -import emt.tile.solar.TileEntitySolarBase; -import emt.util.EMTConfigHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; - -public class TileEntityWaterSolar extends TileEntitySolarBase { - - public TileEntityWaterSolar() { - super(); - energySource = new DefinitelyNotAIC2Source(this, 10000, 3); - output = EMTConfigHandler.compressedSolarOutput; - this.maxstorage=this.getEUCapacity(); - } - - @Override - public void createEnergy() { - if (theSunIsVisible || this.calc_multi()>1F && this.worldObj.isDaytime() || this.calc_multi() == 6F ){ - isActive = true; - if (super.side) { - this.generating=output*calc_multi(); - energySource.addEnergy(output*calc_multi()); - } - } - else { - isActive = false; - this.generating=0D; - } - } - - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(EMTBlocks.emtSolars, 1, 3); - } - - @Override - public float calc_multi() { - if (worldObj.isThundering()) - return 6F; - else if (worldObj.isRaining()) - return 3F; - else if (!worldObj.isThundering() && !worldObj.isRaining() && worldObj.getBlock(xCoord, yCoord+1, zCoord).equals(Blocks.water)) - return 2F; - else - return 1F; - - } - - @Override - public String getInventoryName() { - return "Compressed Aqua Solar"; - } -} diff --git a/src/main/java/emt/util/EMTClientEventHandler.java b/src/main/java/emt/util/EMTClientEventHandler.java index e815af4..d2b2609 100644 --- a/src/main/java/emt/util/EMTClientEventHandler.java +++ b/src/main/java/emt/util/EMTClientEventHandler.java @@ -16,40 +16,40 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; public class EMTClientEventHandler { - public AudioSource audio; - public Item lastItem; + public AudioSource audio; + public Item lastItem; - @SubscribeEvent - public void clientTick(ClientTickEvent e) { - if (EMTKeys.keyUnequip.getIsKeyPressed()) { - EMT.INSTANCE.sendToServer(new PacketEMTKeys()); - } - } + @SubscribeEvent + public void clientTick(ClientTickEvent e) { + if (EMTKeys.keyUnequip.getIsKeyPressed()) { + EMT.INSTANCE.sendToServer(new PacketEMTKeys()); + } + } - @SubscribeEvent - public void playerTick(TickEvent.PlayerTickEvent e) { - if (e.side == Side.CLIENT) { + @SubscribeEvent + public void playerTick(TickEvent.PlayerTickEvent e) { + if (e.side == Side.CLIENT) { - EntityPlayer player = Minecraft.getMinecraft().thePlayer; - Item curItem = player.inventory.getCurrentItem() == null ? null : player.inventory.getCurrentItem().getItem(); + EntityPlayer player = Minecraft.getMinecraft().thePlayer; + Item curItem = player.inventory.getCurrentItem() == null ? null : player.inventory.getCurrentItem().getItem(); - if (curItem == EMTItems.diamondChainsaw || curItem == EMTItems.streamChainsaw || curItem == EMTItems.thaumiumChainsaw) { - if (audio == null) - audio = IC2.audioManager.createSource(player, PositionSpec.Hand, "Tools/Chainsaw/ChainsawIdle.ogg", true, false, IC2.audioManager.getDefaultVolume()); - if (audio != null) { - audio.updatePosition(); - audio.play(); - } - } + if (curItem == EMTItems.diamondChainsaw || curItem == EMTItems.streamChainsaw || curItem == EMTItems.thaumiumChainsaw) { + if (audio == null) + audio = IC2.audioManager.createSource(player, PositionSpec.Hand, "Tools/Chainsaw/ChainsawIdle.ogg", true, false, IC2.audioManager.getDefaultVolume()); + if (audio != null) { + audio.updatePosition(); + audio.play(); + } + } - if (audio != null && curItem != lastItem) { - audio.stop(); - audio.remove(); - audio = null; - IC2.audioManager.playOnce(player, PositionSpec.Hand, "Tools/Chainsaw/ChainsawStop.ogg", true, IC2.audioManager.getDefaultVolume()); - } + if (audio != null && curItem != lastItem) { + audio.stop(); + audio.remove(); + audio = null; + IC2.audioManager.playOnce(player, PositionSpec.Hand, "Tools/Chainsaw/ChainsawStop.ogg", true, IC2.audioManager.getDefaultVolume()); + } - lastItem = curItem; - } - } + lastItem = curItem; + } + } } diff --git a/src/main/java/emt/util/EMTConfigHandler.java b/src/main/java/emt/util/EMTConfigHandler.java index 9158361..08bff27 100644 --- a/src/main/java/emt/util/EMTConfigHandler.java +++ b/src/main/java/emt/util/EMTConfigHandler.java @@ -6,41 +6,53 @@ import net.minecraftforge.common.config.Configuration; import java.io.File; -/** TODO: Need to rewrite... **/ +/** + * TODO: Need to rewrite... + **/ public class EMTConfigHandler { - public static Configuration config; + /** + * Sections + **/ + public static final String RANDOM = "Random Configs"; + public static final String RESEARCH = "Research"; + public static final String VALUES = "Numeric Values"; + public static final String OUTPUTS = "Essentia Generator Outputs"; + public static Configuration config; + public static int etherealProcessorBaseSpeed; + public static int etherealProcessorBonus; + public static int chargeFocusProduction; + public static int armorBaubleProduction; + public static int inventoryBaubleProdution; + public static int wandChargeFocusCost; - /** Sections **/ - public static final String RANDOM = "Random Configs"; - public static final String RESEARCH = "Research"; - public static final String VALUES = "Numeric Values"; - public static final String OUTPUTS = "Essentia Generator Outputs"; + /** + * Values + **/ + public static double wandChargerConsumption; + public static double compressedSolarOutput; + public static double doubleCompressedSolarOutput; + public static double nanoBootsSpeed; + public static double quantumBootsSpeed; + public static double nanoBootsJump; + public static double quantumBootsJump; + public static double tripleCompressedSolarOutput; + public static double quadrupleCompressedSolarOutput; + public static double quintupleCompressedSolarOutput; + public static double sextupleCompressedSolarOutput; + public static double septupleCompressedSolarOutput; + public static double octupleCompressedSolarOutput; - public static int etherealProcessorBaseSpeed; - public static int etherealProcessorBonus; - public static int chargeFocusProduction; - public static int armorBaubleProduction; - public static int inventoryBaubleProdution; - public static int wandChargeFocusCost; + public static double nanoBootsMinDrop; + public static double nanoBootsMaxDrop; + public static double quantumBootsMinDrop; + public static double quantumBootsMaxDrop; - /** Values **/ - public static double wandChargerConsumption; - public static double compressedSolarOutput; - public static double doubleCompressedSolarOutput; - public static double nanoBootsSpeed; - public static double quantumBootsSpeed; - public static double nanoBootsJump; - public static double quantumBootsJump; - public static double tripleCompressedSolarOutput; - public static double nanoBootsMinDrop; - public static double nanoBootsMaxDrop; - public static double quantumBootsMinDrop; - public static double quantumBootsMaxDrop; - - public static double EssentiaGeneratorStorage; - - /** Essentias **/ + public static double EssentiaGeneratorStorage; + + /** + * Essentias + **/ public static double fireOutput; public static double waterOutput; public static double airOutput; @@ -49,98 +61,103 @@ public class EMTConfigHandler { public static double entropyOutput; public static double outputCap; - /** random stuff **/ - public static boolean impactOfRain; - public static boolean capesOn; - public static boolean toolsInBore; - public static boolean nightVisionOff; - public static boolean enchanting; - public static boolean smoke; - public static boolean oneRingSpawn; - public static boolean removeAmberAndCinnabarMacerating; + /** + * random stuff + **/ + public static boolean impactOfRain; + public static boolean capesOn; + public static boolean toolsInBore; + public static boolean nightVisionOff; + public static boolean enchanting; + public static boolean smoke; + public static boolean oneRingSpawn; + public static boolean removeAmberAndCinnabarMacerating; - /** Loot chance **/ - public static int chanceOneRing; - public static int chanceTaintedMjolnir; + /** + * Loot chance + **/ + public static int chanceOneRing; + public static int chanceTaintedMjolnir; - /** Researches **/ - public static boolean thaumiumDrillResearch; - public static boolean thaumiumChainsawResearch; - public static boolean thaumiumOmnitoolResearch; - public static boolean rockbreakerDrillResearch; - public static boolean streamChainsawResearch; - public static boolean electricGooglesResearch; - public static boolean nanoGooglesResearch; - public static boolean quantumGooglesResearch; - public static boolean ironOmnitoolResearch; - public static boolean diamondOmnitoolResearch; - public static boolean explosionFocusResearch; - public static boolean christmasFocusResearch; - public static boolean energyBallFocusResearch; - public static boolean shieldFocusResearch; - public static boolean shieldBlockResearch; - public static boolean potentiaGeneratorResearch; - public static boolean ignisGeneratorResearch; - public static boolean auramGeneratorResearch; - public static boolean arborGeneratorResearch; - public static boolean lucrumGeneratorResearch; - public static boolean wandChargingSationResearch; - public static boolean tinyUraniumResearch; - public static boolean thorHammerResearch; - public static boolean superchargedThorHammerResearch; - public static boolean compressedSolarsResearch; - public static boolean solarHelmetResearch; - public static boolean electricBootsResearch; - public static boolean nanoBootsResearch; - public static boolean quantumBootsResearch; - public static boolean electricScribingToolsResearch; - public static boolean etherealProcessorResearch; - public static boolean waterSolarsResearch; - public static boolean darkSolarsResearch; - public static boolean orderSolarsResearch; - public static boolean fireSolarsResearch; - public static boolean airSolarsResearch; - public static boolean earthSolarsResearch; - public static boolean saxumGenResearch; - public static boolean uuMInfusionResearch; - public static boolean portableNodeResarch; - public static boolean electricHoeGrowthResearch; - public static boolean chargeFocusResearch; - public static boolean wandChargeFocusResearch; - public static boolean inventoryChargingRing; - public static boolean armorChargingRing; - public static boolean thaumiumWingResearch; - public static boolean nanoWingResearch; - public static boolean quantumWingsResearch; - public static boolean infusedQuantumChestplate; - public static boolean aerGeneratorResearch; + /** + * Researches + **/ + public static boolean thaumiumDrillResearch; + public static boolean thaumiumChainsawResearch; + public static boolean thaumiumOmnitoolResearch; + public static boolean rockbreakerDrillResearch; + public static boolean streamChainsawResearch; + public static boolean electricGooglesResearch; + public static boolean nanoGooglesResearch; + public static boolean quantumGooglesResearch; + public static boolean ironOmnitoolResearch; + public static boolean diamondOmnitoolResearch; + public static boolean explosionFocusResearch; + public static boolean christmasFocusResearch; + public static boolean energyBallFocusResearch; + public static boolean shieldFocusResearch; + public static boolean shieldBlockResearch; + public static boolean potentiaGeneratorResearch; + public static boolean ignisGeneratorResearch; + public static boolean auramGeneratorResearch; + public static boolean arborGeneratorResearch; + public static boolean lucrumGeneratorResearch; + public static boolean wandChargingSationResearch; + public static boolean tinyUraniumResearch; + public static boolean thorHammerResearch; + public static boolean superchargedThorHammerResearch; + public static boolean compressedSolarsResearch; + public static boolean solarHelmetResearch; + public static boolean electricBootsResearch; + public static boolean nanoBootsResearch; + public static boolean quantumBootsResearch; + public static boolean electricScribingToolsResearch; + public static boolean etherealProcessorResearch; + public static boolean waterSolarsResearch; + public static boolean darkSolarsResearch; + public static boolean orderSolarsResearch; + public static boolean fireSolarsResearch; + public static boolean airSolarsResearch; + public static boolean earthSolarsResearch; + public static boolean saxumGenResearch; + public static boolean uuMInfusionResearch; + public static boolean portableNodeResarch; + public static boolean electricHoeGrowthResearch; + public static boolean chargeFocusResearch; + public static boolean wandChargeFocusResearch; + public static boolean inventoryChargingRing; + public static boolean armorChargingRing; + public static boolean thaumiumWingResearch; + public static boolean nanoWingResearch; + public static boolean quantumWingsResearch; + public static boolean infusedQuantumChestplate; + public static boolean aerGeneratorResearch; + public static void init(File file) { + config = new Configuration(file); + syncConfig(); + } - public static void init(File file) { - config = new Configuration(file); - syncConfig(); - } + public static void syncConfig() { - public static void syncConfig() { + config.addCustomCategoryComment(VALUES, "The only way to change some numbers that my machines uses."); + config.addCustomCategoryComment(RESEARCH, "The only way to disable some researches. " + "Be careful, if you disable some researches, " + "all researches linked to it will be removed too. " + "Really, don't touch that unless you know exactly what you are doing."); + config.addCustomCategoryComment(OUTPUTS, "Change outputs linked to different Essentias here"); + config.addCustomCategoryComment(RANDOM, "Options that don't fit into the other categories."); - config.addCustomCategoryComment(VALUES, "The only way to change some numbers that my machines uses."); - config.addCustomCategoryComment(RESEARCH, "The only way to disable some researches. " + "Be careful, if you disable some researches, " + "all researches linked to it will be removed too. " + "Really, don't touch that unless you know exactly what you are doing."); - config.addCustomCategoryComment(OUTPUTS, "Change outputs linked to different Essentias here"); - config.addCustomCategoryComment(RANDOM, "Options that don't fit into the other categories."); + capesOn = config.get(RANDOM, "Enable capes", true, "This config option is to enable or disable capes for people who have them. " + "Seriously, you shouldn't touch that unless you have another cape and " + "it conflicts with it.").getBoolean(capesOn); + toolsInBore = config.get(RANDOM, "Tools for Arcane Bore", false, "This will augment the durablilty of the tools, and will also decrease the EU cost to 1. " + "The tools should have the same number of uses than before.").getBoolean(toolsInBore); + nightVisionOff = config.get(RANDOM, "Disable nightvision helmets", false, "This was added because of mods making you totally blind if using nightvision. For example, enable that when in the Deep Dark.").getBoolean(nightVisionOff); + enchanting = config.get(RANDOM, "Enable enchanting tools", false, "Warning: the enchantability is low.").getBoolean(enchanting); + smoke = config.get(RANDOM, "Disable smoke effect for boots", false, "This effect only appears when the player isn't on the ground").getBoolean(smoke); + oneRingSpawn = config.get(RANDOM, "Disable One Ring in dungeon chests", false, "There is no other way to get this item.").getBoolean(oneRingSpawn); + chanceTaintedMjolnir = config.get(RANDOM, "Tainted Mjolnir spawning change", 25, "If you have a lot of mods adding dungeon loot, you should definetely increase this").getInt(); + chanceOneRing = config.get(RANDOM, "One Ring spawning chance", 15, "If you have a lot of mods adding dungeon loot, you should definetely increase this").getInt(); + removeAmberAndCinnabarMacerating = config.get(RANDOM, "Clear Amber/Cinnabar Macerating", true, "This is here because of conflicts between mods that add the same input and different outputs").getBoolean(removeAmberAndCinnabarMacerating); + impactOfRain = config.get(RANDOM, "Impact of rain", true, "The impact of rain on all wings").getBoolean(impactOfRain); - capesOn = config.get(RANDOM, "Enable capes", true, "This config option is to enable or disable capes for people who have them. " + "Seriously, you shouldn't touch that unless you have another cape and " + "it conflicts with it.").getBoolean(capesOn); - toolsInBore = config.get(RANDOM, "Tools for Arcane Bore", false, "This will augment the durablilty of the tools, and will also decrease the EU cost to 1. " + "The tools should have the same number of uses than before.").getBoolean(toolsInBore); - nightVisionOff = config.get(RANDOM, "Disable nightvision helmets", false, "This was added because of mods making you totally blind if using nightvision. For example, enable that when in the Deep Dark.").getBoolean(nightVisionOff); - enchanting = config.get(RANDOM, "Enable enchanting tools", false, "Warning: the enchantability is low.").getBoolean(enchanting); - smoke = config.get(RANDOM, "Disable smoke effect for boots", false, "This effect only appears when the player isn't on the ground").getBoolean(smoke); - oneRingSpawn = config.get(RANDOM, "Disable One Ring in dungeon chests", false, "There is no other way to get this item.").getBoolean(oneRingSpawn); - chanceTaintedMjolnir = config.get(RANDOM, "Tainted Mjolnir spawning change", 25, "If you have a lot of mods adding dungeon loot, you should definetely increase this").getInt(); - chanceOneRing = config.get(RANDOM, "One Ring spawning chance", 15, "If you have a lot of mods adding dungeon loot, you should definetely increase this").getInt(); - removeAmberAndCinnabarMacerating = config.get(RANDOM, "Clear Amber/Cinnabar Macerating", true, "This is here because of conflicts between mods that add the same input and different outputs").getBoolean(removeAmberAndCinnabarMacerating); - impactOfRain = config.get(RANDOM, "Impact of rain", true, "The impact of rain on all wings").getBoolean(impactOfRain); - - // DEFAULTS - Aer - 15,000 Aqua - 5,000 Ignis - 20,000 Ordo - 16,000 Perditio - 10,000 Terra - 2,000 + // DEFAULTS - Aer - 15,000 Aqua - 5,000 Ignis - 20,000 Ordo - 16,000 Perditio - 10,000 Terra - 2,000 airOutput = config.get(OUTPUTS, "Aer Output", 15000).getDouble(airOutput); waterOutput = config.get(OUTPUTS, "Aqua Output", 5000).getDouble(waterOutput); fireOutput = config.get(OUTPUTS, "Ignis Output", 20000).getDouble(fireOutput); @@ -148,84 +165,90 @@ public class EMTConfigHandler { entropyOutput = config.get(OUTPUTS, "Perditio Output", 10000).getDouble(entropyOutput); earthOutput = config.get(OUTPUTS, "Terra Output", 2000).getDouble(earthOutput); outputCap = config.get(OUTPUTS, "Output Cap", -1).getDouble(outputCap); - - EssentiaGeneratorStorage=config.get(VALUES,"Essentia Generator Storage",1000000,"This is the number you have to modify if you want to change the size of the "+"internal buffer of the Essentia Generator").getDouble(EssentiaGeneratorStorage); - EMT_GT_Loader.aIDoffset=config.get(VALUES,"aID offset for Gregetch Machinery",(13000-GT_Values.VN.length-1),"This Mod will use "+Integer.toString(GT_Values.VN.length+1)+" IDs, do not change if you dont know what you are doing!").getInt(13000-GT_Values.VN.length-1); - wandChargerConsumption = config.get(VALUES, "Wand Charging Station Consumption", 50000, "This is the number you have to modify if you want to make the Industrial Wand Charging " + "Station use more or less EU to charge 1 unit of Vis on your wand.").getDouble(wandChargerConsumption); - compressedSolarOutput = config.get(VALUES, "Compressed Solar Panel Output", 10, "This is the number you have to modify if you want to make the Compressed Solar Panel yield " + "more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(compressedSolarOutput); - doubleCompressedSolarOutput = config.get(VALUES, "Double Compressed Solar Panel Output", 100, "This is the number you have to modify if you want to make the Double Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(doubleCompressedSolarOutput); - tripleCompressedSolarOutput = config.get(VALUES, "Triple Compressed Solar Panel Output", 1000, "This is the number you have to modify if you want to make the Triple Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(tripleCompressedSolarOutput); - nanoBootsSpeed = config.get(VALUES, "Nano Boots of the Traveller Speed", 0.25, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsSpeed); - quantumBootsSpeed = config.get(VALUES, "Quantum Boots of the Traveller Speed", 0.5, "Watch out, that goes up REALLY quickly.").getDouble(quantumBootsSpeed); - nanoBootsJump = config.get(VALUES, "Nano Boots of the Traveller jump", 0.6, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsJump); - quantumBootsJump = config.get(VALUES, "Quantum Boots of the Traveller jump", 0.9, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsJump); - etherealProcessorBaseSpeed = config.get(VALUES, "Etheral Processor speed", 400, "Default is 400, the double of a regular furnace").getInt(); - etherealProcessorBonus = config.get(VALUES, "Ethereal Processor Bonus", 10, "This number is the chance of getting a Thaumium Ingot as a bonus when " + "processing an item in the machine. It is 1 out of the number you will enter. " + "The default is 1/10 chance.").getInt(); - chargeFocusProduction = config.get(VALUES, "Wand Focus: Charge production", 64, "Default is 64").getInt(); - armorBaubleProduction = config.get(VALUES, "Armor Charging Ring production", 32, "Default is 32").getInt(); - inventoryBaubleProdution = config.get(VALUES, "Inventory Charging Ring production", 32, "Default is 32").getInt(); - wandChargeFocusCost = config.get(VALUES, "Wand Focus: Wand Charging Cost", 40000, "Default is 40000").getInt(); + EssentiaGeneratorStorage = config.get(VALUES, "Essentia Generator Storage", 1000000, "This is the number you have to modify if you want to change the size of the " + "internal buffer of the Essentia Generator").getDouble(EssentiaGeneratorStorage); + EMT_GT_Loader.aIDoffset = config.get(VALUES, "aID offset for Gregetch Machinery", (13000 - GT_Values.VN.length - 1), "This Mod will use " + Integer.toString(GT_Values.VN.length + 1) + " IDs, do not change if you dont know what you are doing!").getInt(13000 - GT_Values.VN.length - 1); + + wandChargerConsumption = config.get(VALUES, "Wand Charging Station Consumption", 50000, "This is the number you have to modify if you want to make the Industrial Wand Charging " + "Station use more or less EU to charge 1 unit of Vis on your wand.").getDouble(wandChargerConsumption); + compressedSolarOutput = config.get(VALUES, "Compressed Solar Panel Output", 10, "This is the number you have to modify if you want to make the Compressed Solar Panel yield " + "more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(compressedSolarOutput); + doubleCompressedSolarOutput = config.get(VALUES, "Double Compressed Solar Panel Output", 100, "This is the number you have to modify if you want to make the Double Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(doubleCompressedSolarOutput); + tripleCompressedSolarOutput = config.get(VALUES, "Triple Compressed Solar Panel Output", 1000, "This is the number you have to modify if you want to make the Triple Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(tripleCompressedSolarOutput); + quadrupleCompressedSolarOutput = config.get(VALUES, "Quadruple Compressed Solar Panel Output", 10000, "This is the number you have to modify if you want to make the Quadruple Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(quadrupleCompressedSolarOutput); + quintupleCompressedSolarOutput = config.get(VALUES, "Quintouple Compressed Solar Panel Output", 100000, "This is the number you have to modify if you want to make the Quintouple Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(quintupleCompressedSolarOutput); + sextupleCompressedSolarOutput = config.get(VALUES, "Sextouple Compressed Solar Panel Output", 1000000, "This is the number you have to modify if you want to make the Sextouple Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(sextupleCompressedSolarOutput); + septupleCompressedSolarOutput = config.get(VALUES, "Septouple Compressed Solar Panel Output", 10000000, "This is the number you have to modify if you want to make the Septouple Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(septupleCompressedSolarOutput); + octupleCompressedSolarOutput = config.get(VALUES, "Octtouple Compressed Solar Panel Output", 100000000, "This is the number you have to modify if you want to make the Octtouple Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(octupleCompressedSolarOutput); + + nanoBootsSpeed = config.get(VALUES, "Nano Boots of the Traveller Speed", 0.25, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsSpeed); + quantumBootsSpeed = config.get(VALUES, "Quantum Boots of the Traveller Speed", 0.5, "Watch out, that goes up REALLY quickly.").getDouble(quantumBootsSpeed); + nanoBootsJump = config.get(VALUES, "Nano Boots of the Traveller jump", 0.6, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsJump); + quantumBootsJump = config.get(VALUES, "Quantum Boots of the Traveller jump", 0.9, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsJump); + etherealProcessorBaseSpeed = config.get(VALUES, "Etheral Processor speed", 400, "Default is 400, the double of a regular furnace").getInt(); + etherealProcessorBonus = config.get(VALUES, "Ethereal Processor Bonus", 10, "This number is the chance of getting a Thaumium Ingot as a bonus when " + "processing an item in the machine. It is 1 out of the number you will enter. " + "The default is 1/10 chance.").getInt(); + chargeFocusProduction = config.get(VALUES, "Wand Focus: Charge production", 64, "Default is 64").getInt(); + armorBaubleProduction = config.get(VALUES, "Armor Charging Ring production", 32, "Default is 32").getInt(); + inventoryBaubleProdution = config.get(VALUES, "Inventory Charging Ring production", 32, "Default is 32").getInt(); + wandChargeFocusCost = config.get(VALUES, "Wand Focus: Wand Charging Cost", 40000, "Default is 40000").getInt(); - nanoBootsMinDrop = config.get(VALUES, "Nano Boots of the Traveller minimum drop", 6.0, "The distance allowed to fall without any damage").getDouble(nanoBootsMinDrop); - nanoBootsMaxDrop = config.get(VALUES, "Nano Boots of the Traveller maximum healthy drop", 35.0, "Energy amount drained will tripled if player drops more than this amount of blocks").getDouble(nanoBootsMaxDrop); - quantumBootsMinDrop = config.get(VALUES, "Quantum Boots of the Traveller minimum drop", 10.0, "The distance allowed to fall without any damage").getDouble(quantumBootsMinDrop); - quantumBootsMaxDrop = config.get(VALUES, "Quantum Boots of the Traveller maximum healthy drop", 100.0, "Energy amount drained will tripled if player drops more than this amount of blocks").getDouble(quantumBootsMaxDrop); + nanoBootsMinDrop = config.get(VALUES, "Nano Boots of the Traveller minimum drop", 6.0, "The distance allowed to fall without any damage").getDouble(nanoBootsMinDrop); + nanoBootsMaxDrop = config.get(VALUES, "Nano Boots of the Traveller maximum healthy drop", 35.0, "Energy amount drained will tripled if player drops more than this amount of blocks").getDouble(nanoBootsMaxDrop); + quantumBootsMinDrop = config.get(VALUES, "Quantum Boots of the Traveller minimum drop", 10.0, "The distance allowed to fall without any damage").getDouble(quantumBootsMinDrop); + quantumBootsMaxDrop = config.get(VALUES, "Quantum Boots of the Traveller maximum healthy drop", 100.0, "Energy amount drained will tripled if player drops more than this amount of blocks").getDouble(quantumBootsMaxDrop); - thaumiumDrillResearch = config.get(RESEARCH, "Thaumium Drill", false).getBoolean(thaumiumDrillResearch); - thaumiumChainsawResearch = config.get(RESEARCH, "Thaumium Chainsaw", false).getBoolean(thaumiumChainsawResearch); - thaumiumDrillResearch = config.get(RESEARCH, "Thaumium Omnitool", false).getBoolean(thaumiumOmnitoolResearch); - rockbreakerDrillResearch = config.get(RESEARCH, "Drill of the Rockbreaker", false).getBoolean(rockbreakerDrillResearch); - streamChainsawResearch = config.get(RESEARCH, "Chainsaw of the Stream", false).getBoolean(streamChainsawResearch); - electricGooglesResearch = config.get(RESEARCH, "Electric Googles of Revealing", false).getBoolean(electricGooglesResearch); - nanoGooglesResearch = config.get(RESEARCH, "Nanosuit Googles of Revealing", false).getBoolean(nanoGooglesResearch); - quantumGooglesResearch = config.get(RESEARCH, "Quantum Googles of Revealing", false).getBoolean(quantumGooglesResearch); - ironOmnitoolResearch = config.get(RESEARCH, "Omnitool", false).getBoolean(ironOmnitoolResearch); - diamondOmnitoolResearch = config.get(RESEARCH, "Diamond Omnitool", false).getBoolean(diamondOmnitoolResearch); - explosionFocusResearch = config.get(RESEARCH, "Explosion Focus", false).getBoolean(explosionFocusResearch); - christmasFocusResearch = config.get(RESEARCH, "Kris-tmas Focus", false).getBoolean(christmasFocusResearch); - energyBallFocusResearch = config.get(RESEARCH, "EnergyBall Focus", false).getBoolean(christmasFocusResearch); - shieldFocusResearch = config.get(RESEARCH, "Shield Focus", false).getBoolean(shieldFocusResearch); - shieldBlockResearch = config.get(RESEARCH, "Shield Block", false).getBoolean(shieldBlockResearch); - potentiaGeneratorResearch = config.get(RESEARCH, "Potentia Generator", false).getBoolean(potentiaGeneratorResearch); - ignisGeneratorResearch = config.get(RESEARCH, "Ignis Generator", false).getBoolean(ignisGeneratorResearch); - auramGeneratorResearch = config.get(RESEARCH, "Auram Generator", false).getBoolean(auramGeneratorResearch); - arborGeneratorResearch = config.get(RESEARCH, "Arbor Generator", false).getBoolean(arborGeneratorResearch); - lucrumGeneratorResearch = config.get(RESEARCH, "Lucrum Generator", false).getBoolean(lucrumGeneratorResearch); - wandChargingSationResearch = config.get(RESEARCH, "Industrial Wand Charging Station", false).getBoolean(wandChargingSationResearch); - tinyUraniumResearch = config.get(RESEARCH, "Tiny Piles of Uranium", false).getBoolean(tinyUraniumResearch); - thorHammerResearch = config.get(RESEARCH, "Mjolnir", false).getBoolean(thorHammerResearch); - superchargedThorHammerResearch = config.get(RESEARCH, "Supercharged Mjolnir", false).getBoolean(superchargedThorHammerResearch); - compressedSolarsResearch = config.get(RESEARCH, "Compressed Solars", false).getBoolean(compressedSolarsResearch); - solarHelmetResearch = config.get(RESEARCH, "Solar Helmet of Revealing", false).getBoolean(solarHelmetResearch); - electricBootsResearch = config.get(RESEARCH, "Electric Boots of the Traveller", false).getBoolean(electricBootsResearch); - nanoBootsResearch = config.get(RESEARCH, "Nano Boots of the Traveller", false).getBoolean(nanoBootsResearch); - quantumBootsResearch = config.get(RESEARCH, "Quantum Boots of the Traveller", false).getBoolean(quantumBootsResearch); - electricScribingToolsResearch = config.get(RESEARCH, "Electric Scribing Tools", false).getBoolean(electricScribingToolsResearch); - etherealProcessorResearch = config.get(RESEARCH, "Ethereal Processor", false).getBoolean(etherealProcessorResearch); - waterSolarsResearch = config.get(RESEARCH, "Water Solar Panels", false).getBoolean(waterSolarsResearch); - darkSolarsResearch = config.get(RESEARCH, "Entropy Solar Panels", false).getBoolean(darkSolarsResearch); - orderSolarsResearch = config.get(RESEARCH, "Order Solar Panels", false).getBoolean(orderSolarsResearch); - fireSolarsResearch = config.get(RESEARCH, "Fire Solar Panels", false).getBoolean(fireSolarsResearch); - airSolarsResearch = config.get(RESEARCH, "Air Solar Panels", false).getBoolean(airSolarsResearch); - earthSolarsResearch = config.get(RESEARCH, "Earth Solar Panels", false).getBoolean(earthSolarsResearch); - saxumGenResearch = config.get(RESEARCH, "Saxum Generator", false).getBoolean(saxumGenResearch); - uuMInfusionResearch = config.get(RESEARCH, "UU-Mater Infusion", false).getBoolean(uuMInfusionResearch); - portableNodeResarch = config.get(RESEARCH, "Portable Node", false).getBoolean(portableNodeResarch); - electricHoeGrowthResearch = config.get(RESEARCH, "Electric Hoe of Growth", false).getBoolean(electricHoeGrowthResearch); - chargeFocusResearch = config.get(RESEARCH, "Wand Focus: Charging", false).getBoolean(chargeFocusResearch); - wandChargeFocusResearch = config.get(RESEARCH, "Wand Focus: Wand Charging", false).getBoolean(wandChargeFocusResearch); - inventoryChargingRing = config.get(RESEARCH, "Inventory Charging Ring", false).getBoolean(inventoryChargingRing); - armorChargingRing = config.get(RESEARCH, "Armor Charging Ring", false).getBoolean(armorChargingRing); - thaumiumWingResearch = config.get(RESEARCH, "Thaumium Reinforced Wings", false).getBoolean(thaumiumWingResearch); - nanoWingResearch = config.get(RESEARCH, "Nanosuit Wings", false).getBoolean(nanoWingResearch); - quantumWingsResearch = config.get(RESEARCH, "Quantum Wings", false).getBoolean(quantumWingsResearch); - infusedQuantumChestplate = config.get(RESEARCH, "Infused Quantum Chestplate", false).getBoolean(infusedQuantumChestplate); - aerGeneratorResearch = config.get(RESEARCH, "Aer Generator", false).getBoolean(aerGeneratorResearch); + thaumiumDrillResearch = config.get(RESEARCH, "Thaumium Drill", false).getBoolean(thaumiumDrillResearch); + thaumiumChainsawResearch = config.get(RESEARCH, "Thaumium Chainsaw", false).getBoolean(thaumiumChainsawResearch); + thaumiumDrillResearch = config.get(RESEARCH, "Thaumium Omnitool", false).getBoolean(thaumiumOmnitoolResearch); + rockbreakerDrillResearch = config.get(RESEARCH, "Drill of the Rockbreaker", false).getBoolean(rockbreakerDrillResearch); + streamChainsawResearch = config.get(RESEARCH, "Chainsaw of the Stream", false).getBoolean(streamChainsawResearch); + electricGooglesResearch = config.get(RESEARCH, "Electric Googles of Revealing", false).getBoolean(electricGooglesResearch); + nanoGooglesResearch = config.get(RESEARCH, "Nanosuit Googles of Revealing", false).getBoolean(nanoGooglesResearch); + quantumGooglesResearch = config.get(RESEARCH, "Quantum Googles of Revealing", false).getBoolean(quantumGooglesResearch); + ironOmnitoolResearch = config.get(RESEARCH, "Omnitool", false).getBoolean(ironOmnitoolResearch); + diamondOmnitoolResearch = config.get(RESEARCH, "Diamond Omnitool", false).getBoolean(diamondOmnitoolResearch); + explosionFocusResearch = config.get(RESEARCH, "Explosion Focus", false).getBoolean(explosionFocusResearch); + christmasFocusResearch = config.get(RESEARCH, "Kris-tmas Focus", false).getBoolean(christmasFocusResearch); + energyBallFocusResearch = config.get(RESEARCH, "EnergyBall Focus", false).getBoolean(christmasFocusResearch); + shieldFocusResearch = config.get(RESEARCH, "Shield Focus", false).getBoolean(shieldFocusResearch); + shieldBlockResearch = config.get(RESEARCH, "Shield Block", false).getBoolean(shieldBlockResearch); + potentiaGeneratorResearch = config.get(RESEARCH, "Potentia Generator", false).getBoolean(potentiaGeneratorResearch); + ignisGeneratorResearch = config.get(RESEARCH, "Ignis Generator", false).getBoolean(ignisGeneratorResearch); + auramGeneratorResearch = config.get(RESEARCH, "Auram Generator", false).getBoolean(auramGeneratorResearch); + arborGeneratorResearch = config.get(RESEARCH, "Arbor Generator", false).getBoolean(arborGeneratorResearch); + lucrumGeneratorResearch = config.get(RESEARCH, "Lucrum Generator", false).getBoolean(lucrumGeneratorResearch); + wandChargingSationResearch = config.get(RESEARCH, "Industrial Wand Charging Station", false).getBoolean(wandChargingSationResearch); + tinyUraniumResearch = config.get(RESEARCH, "Tiny Piles of Uranium", false).getBoolean(tinyUraniumResearch); + thorHammerResearch = config.get(RESEARCH, "Mjolnir", false).getBoolean(thorHammerResearch); + superchargedThorHammerResearch = config.get(RESEARCH, "Supercharged Mjolnir", false).getBoolean(superchargedThorHammerResearch); + compressedSolarsResearch = config.get(RESEARCH, "Compressed Solars", false).getBoolean(compressedSolarsResearch); + solarHelmetResearch = config.get(RESEARCH, "Solar Helmet of Revealing", false).getBoolean(solarHelmetResearch); + electricBootsResearch = config.get(RESEARCH, "Electric Boots of the Traveller", false).getBoolean(electricBootsResearch); + nanoBootsResearch = config.get(RESEARCH, "Nano Boots of the Traveller", false).getBoolean(nanoBootsResearch); + quantumBootsResearch = config.get(RESEARCH, "Quantum Boots of the Traveller", false).getBoolean(quantumBootsResearch); + electricScribingToolsResearch = config.get(RESEARCH, "Electric Scribing Tools", false).getBoolean(electricScribingToolsResearch); + etherealProcessorResearch = config.get(RESEARCH, "Ethereal Processor", false).getBoolean(etherealProcessorResearch); + waterSolarsResearch = config.get(RESEARCH, "Water Solar Panels", false).getBoolean(waterSolarsResearch); + darkSolarsResearch = config.get(RESEARCH, "Entropy Solar Panels", false).getBoolean(darkSolarsResearch); + orderSolarsResearch = config.get(RESEARCH, "Order Solar Panels", false).getBoolean(orderSolarsResearch); + fireSolarsResearch = config.get(RESEARCH, "Fire Solar Panels", false).getBoolean(fireSolarsResearch); + airSolarsResearch = config.get(RESEARCH, "Air Solar Panels", false).getBoolean(airSolarsResearch); + earthSolarsResearch = config.get(RESEARCH, "Earth Solar Panels", false).getBoolean(earthSolarsResearch); + saxumGenResearch = config.get(RESEARCH, "Saxum Generator", false).getBoolean(saxumGenResearch); + uuMInfusionResearch = config.get(RESEARCH, "UU-Mater Infusion", false).getBoolean(uuMInfusionResearch); + portableNodeResarch = config.get(RESEARCH, "Portable Node", false).getBoolean(portableNodeResarch); + electricHoeGrowthResearch = config.get(RESEARCH, "Electric Hoe of Growth", false).getBoolean(electricHoeGrowthResearch); + chargeFocusResearch = config.get(RESEARCH, "Wand Focus: Charging", false).getBoolean(chargeFocusResearch); + wandChargeFocusResearch = config.get(RESEARCH, "Wand Focus: Wand Charging", false).getBoolean(wandChargeFocusResearch); + inventoryChargingRing = config.get(RESEARCH, "Inventory Charging Ring", false).getBoolean(inventoryChargingRing); + armorChargingRing = config.get(RESEARCH, "Armor Charging Ring", false).getBoolean(armorChargingRing); + thaumiumWingResearch = config.get(RESEARCH, "Thaumium Reinforced Wings", false).getBoolean(thaumiumWingResearch); + nanoWingResearch = config.get(RESEARCH, "Nanosuit Wings", false).getBoolean(nanoWingResearch); + quantumWingsResearch = config.get(RESEARCH, "Quantum Wings", false).getBoolean(quantumWingsResearch); + infusedQuantumChestplate = config.get(RESEARCH, "Infused Quantum Chestplate", false).getBoolean(infusedQuantumChestplate); + aerGeneratorResearch = config.get(RESEARCH, "Aer Generator", false).getBoolean(aerGeneratorResearch); - if (config.hasChanged()) { - config.save(); - } - } + if (config.hasChanged()) { + config.save(); + } + } } diff --git a/src/main/java/emt/util/EMTCraftingAspects.java b/src/main/java/emt/util/EMTCraftingAspects.java index 364142f..70512d7 100644 --- a/src/main/java/emt/util/EMTCraftingAspects.java +++ b/src/main/java/emt/util/EMTCraftingAspects.java @@ -5,53 +5,53 @@ import thaumcraft.api.aspects.AspectList; public class EMTCraftingAspects { - public static AspectList thaumiumDrillCrafting = new AspectList().add(Aspect.TOOL, 16).add(Aspect.MINE, 16).add(Aspect.ENERGY, 16); - public static AspectList thaumiumChainsawCrafting = new AspectList().add(Aspect.TOOL, 16).add(Aspect.WEAPON, 16).add(Aspect.ENERGY, 16); - public static AspectList thaumicQuantumHelmetCrafting = new AspectList().add(Aspect.ARMOR, 25).add(Aspect.SENSES, 25).add(Aspect.ENERGY, 25); - public static AspectList diamondOmnitoolCrafting = new AspectList().add(Aspect.ORDER, 15).add(Aspect.AIR, 15); - public static AspectList thaumiumOmnitoolCrafting = new AspectList().add(Aspect.TOOL, 25).add(Aspect.MINE, 25).add(Aspect.ENERGY, 25).add(Aspect.WEAPON, 25); - public static AspectList thaumicNanoHelmetCrafting = new AspectList().add(Aspect.ARMOR, 16).add(Aspect.SENSES, 16).add(Aspect.ENERGY, 16); - public static AspectList laserFocusCrafting = new AspectList().add(Aspect.FIRE, 30).add(Aspect.MOTION, 16).add(Aspect.WEAPON, 30).add(Aspect.DEATH, 16); - public static AspectList christmasFocusCrafting = new AspectList().add(Aspect.ORDER, 20).add(Aspect.AIR, 20); - public static AspectList shieldFocusCrafting = new AspectList().add(Aspect.AIR, 16).add(Aspect.ARMOR, 20).add(Aspect.CRYSTAL, 16).add(Aspect.TRAP, 20).add(Aspect.LIFE, 16); - public static AspectList electricGogglesCrafting = new AspectList().add(Aspect.AIR, 20).add(Aspect.ORDER, 20).add(Aspect.WATER, 20); - public static AspectList potentiaGeneratorCrafting = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.MAGIC, 32).add(Aspect.METAL, 32).add(Aspect.EXCHANGE, 32); - public static AspectList ignisGeneratorCrafting = new AspectList().add(Aspect.FIRE, 16).add(Aspect.EXCHANGE, 8); - public static AspectList auramGeneratorCrafting = new AspectList().add(Aspect.AURA, 16).add(Aspect.EXCHANGE, 8); - public static AspectList arborGeneratorCrafting = new AspectList().add(Aspect.TREE, 16).add(Aspect.EXCHANGE, 8); - public static AspectList streamChaisnawCrafting = new AspectList().add(Aspect.ENERGY, 48).add(Aspect.TREE, 48).add(Aspect.TOOL, 32).add(Aspect.WATER, 32); - public static AspectList rockbreakerDrillCrafting = new AspectList().add(Aspect.TOOL, 32).add(Aspect.ENERGY, 48).add(Aspect.MINE, 32); - public static AspectList shieldBlockCrafting = new AspectList().add(Aspect.ORDER, 1).add(Aspect.ENTROPY, 1); - public static AspectList tinyUraniumCrafting = new AspectList().add(Aspect.FIRE, 1).add(Aspect.WATER, 1).add(Aspect.AIR, 1).add(Aspect.EARTH, 1).add(Aspect.ORDER, 1).add(Aspect.ENTROPY, 1); - public static AspectList thorHammerCrafting = new AspectList().add(Aspect.WEAPON, 48).add(Aspect.WEATHER, 48).add(Aspect.ELDRITCH, 32); - public static AspectList superchargedThorHammerCrafting = new AspectList().add(Aspect.WEAPON, 48).add(Aspect.ENERGY, 64).add(Aspect.BEAST, 32); - public static AspectList wandCharger = new AspectList().add(Aspect.ENERGY, 48).add(Aspect.CRAFT, 48).add(Aspect.EXCHANGE, 48).add(Aspect.GREED, 64); - public static AspectList compressedSolars = new AspectList().add(Aspect.FIRE, 8).add(Aspect.WATER, 8).add(Aspect.AIR, 8).add(Aspect.EARTH, 8).add(Aspect.ORDER, 8).add(Aspect.ENTROPY, 8); - public static AspectList solarHelmetRevealing = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.AIR, 32).add(Aspect.LIGHT, 25); - public static AspectList electricBootsTravel = new AspectList().add(Aspect.ENERGY, 16).add(Aspect.ARMOR, 32).add(Aspect.MOTION, 32); - public static AspectList nanoBootsTravel = new AspectList().add(Aspect.ENERGY, 25).add(Aspect.ARMOR, 32).add(Aspect.MOTION, 48); - public static AspectList quantumBootsTravel = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.ARMOR, 32).add(Aspect.MOTION, 64); - public static AspectList electricScribingTools = new AspectList().add(Aspect.AIR, 16).add(Aspect.ORDER, 16).add(Aspect.ENTROPY, 16); - public static AspectList etherealProcessor = new AspectList().add(Aspect.MECHANISM, 16).add(Aspect.MAGIC, 16).add(Aspect.CRAFT, 16); - public static AspectList waterSolars = new AspectList().add(Aspect.WATER, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); - public static AspectList darkSolars = new AspectList().add(Aspect.ENTROPY, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); - public static AspectList orderSolars = new AspectList().add(Aspect.ORDER, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); - public static AspectList fireSolars = new AspectList().add(Aspect.FIRE, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); - public static AspectList airSolars = new AspectList().add(Aspect.AIR, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); - public static AspectList earthSolars = new AspectList().add(Aspect.EARTH, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); - public static AspectList uuMatterInfusions = new AspectList().add(Aspect.FIRE, 32).add(Aspect.WATER, 32).add(Aspect.AIR, 32).add(Aspect.EARTH, 32).add(Aspect.ORDER, 32).add(Aspect.ENTROPY, 32); - public static AspectList lesserUUMInfusions = new AspectList().add(Aspect.FIRE, 16).add(Aspect.WATER, 16).add(Aspect.AIR, 16).add(Aspect.EARTH, 16).add(Aspect.ORDER, 16).add(Aspect.ENTROPY, 16); - public static AspectList cheapUUMInfusions = new AspectList().add(Aspect.FIRE, 8).add(Aspect.WATER, 8).add(Aspect.AIR, 8).add(Aspect.EARTH, 8).add(Aspect.ORDER, 8).add(Aspect.ENTROPY, 8); - public static AspectList cheapestUUMInfusions = new AspectList().add(Aspect.FIRE, 4).add(Aspect.WATER, 4).add(Aspect.AIR, 4).add(Aspect.EARTH, 4).add(Aspect.ORDER, 4).add(Aspect.ENTROPY, 4); - public static AspectList portableNode = new AspectList().add(Aspect.MAGIC, 32).add(Aspect.AURA, 32).add(Aspect.GREED, 32); - public static AspectList electricHoeGrowth = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.PLANT, 25).add(Aspect.CROP, 32).add(Aspect.MAGIC, 48); - public static AspectList chargeFocus = new AspectList().add(Aspect.EXCHANGE, 25).add(Aspect.ENERGY, 32).add(Aspect.MECHANISM, 32); - public static AspectList wandChargeFocus = new AspectList().add(Aspect.ENERGY, 48).add(Aspect.AURA, 32).add(Aspect.EXCHANGE, 48).add(Aspect.GREED, 64); - public static AspectList inventoryChargingRing = new AspectList().add(Aspect.ENERGY, 64).add(Aspect.CRYSTAL, 32).add(Aspect.MAGIC, 48); - public static AspectList armorChargingRing = new AspectList().add(Aspect.ENERGY, 64).add(Aspect.ARMOR, 32).add(Aspect.MAGIC, 48); - public static AspectList thaumiumWing = new AspectList().add(Aspect.FIRE, 48).add(Aspect.WATER, 48).add(Aspect.AIR, 48).add(Aspect.EARTH, 48).add(Aspect.ORDER, 48).add(Aspect.ENTROPY, 48); - public static AspectList nanoWing = new AspectList().add(Aspect.FLIGHT, 48).add(Aspect.AIR, 32).add(Aspect.MECHANISM, 48).add(Aspect.ENERGY, 32); - public static AspectList quantumWing = new AspectList().add(Aspect.FLIGHT, 48).add(Aspect.AIR, 32).add(Aspect.MECHANISM, 48).add(Aspect.ENERGY, 32).add(Aspect.ARMOR, 48); - public static AspectList aerGenerator = new AspectList().add(Aspect.EXCHANGE, 16).add(Aspect.AIR, 8); - public static AspectList uuMatterCrystal = new AspectList().add(Aspect.CRYSTAL, 8).add(Aspect.COLD, 8).add(Aspect.MAGIC, 8); + public static AspectList thaumiumDrillCrafting = new AspectList().add(Aspect.TOOL, 16).add(Aspect.MINE, 16).add(Aspect.ENERGY, 16); + public static AspectList thaumiumChainsawCrafting = new AspectList().add(Aspect.TOOL, 16).add(Aspect.WEAPON, 16).add(Aspect.ENERGY, 16); + public static AspectList thaumicQuantumHelmetCrafting = new AspectList().add(Aspect.ARMOR, 25).add(Aspect.SENSES, 25).add(Aspect.ENERGY, 25); + public static AspectList diamondOmnitoolCrafting = new AspectList().add(Aspect.ORDER, 15).add(Aspect.AIR, 15); + public static AspectList thaumiumOmnitoolCrafting = new AspectList().add(Aspect.TOOL, 25).add(Aspect.MINE, 25).add(Aspect.ENERGY, 25).add(Aspect.WEAPON, 25); + public static AspectList thaumicNanoHelmetCrafting = new AspectList().add(Aspect.ARMOR, 16).add(Aspect.SENSES, 16).add(Aspect.ENERGY, 16); + public static AspectList laserFocusCrafting = new AspectList().add(Aspect.FIRE, 30).add(Aspect.MOTION, 16).add(Aspect.WEAPON, 30).add(Aspect.DEATH, 16); + public static AspectList christmasFocusCrafting = new AspectList().add(Aspect.ORDER, 20).add(Aspect.AIR, 20); + public static AspectList shieldFocusCrafting = new AspectList().add(Aspect.AIR, 16).add(Aspect.ARMOR, 20).add(Aspect.CRYSTAL, 16).add(Aspect.TRAP, 20).add(Aspect.LIFE, 16); + public static AspectList electricGogglesCrafting = new AspectList().add(Aspect.AIR, 20).add(Aspect.ORDER, 20).add(Aspect.WATER, 20); + public static AspectList potentiaGeneratorCrafting = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.MAGIC, 32).add(Aspect.METAL, 32).add(Aspect.EXCHANGE, 32); + public static AspectList ignisGeneratorCrafting = new AspectList().add(Aspect.FIRE, 16).add(Aspect.EXCHANGE, 8); + public static AspectList auramGeneratorCrafting = new AspectList().add(Aspect.AURA, 16).add(Aspect.EXCHANGE, 8); + public static AspectList arborGeneratorCrafting = new AspectList().add(Aspect.TREE, 16).add(Aspect.EXCHANGE, 8); + public static AspectList streamChaisnawCrafting = new AspectList().add(Aspect.ENERGY, 48).add(Aspect.TREE, 48).add(Aspect.TOOL, 32).add(Aspect.WATER, 32); + public static AspectList rockbreakerDrillCrafting = new AspectList().add(Aspect.TOOL, 32).add(Aspect.ENERGY, 48).add(Aspect.MINE, 32); + public static AspectList shieldBlockCrafting = new AspectList().add(Aspect.ORDER, 1).add(Aspect.ENTROPY, 1); + public static AspectList tinyUraniumCrafting = new AspectList().add(Aspect.FIRE, 1).add(Aspect.WATER, 1).add(Aspect.AIR, 1).add(Aspect.EARTH, 1).add(Aspect.ORDER, 1).add(Aspect.ENTROPY, 1); + public static AspectList thorHammerCrafting = new AspectList().add(Aspect.WEAPON, 48).add(Aspect.WEATHER, 48).add(Aspect.ELDRITCH, 32); + public static AspectList superchargedThorHammerCrafting = new AspectList().add(Aspect.WEAPON, 48).add(Aspect.ENERGY, 64).add(Aspect.BEAST, 32); + public static AspectList wandCharger = new AspectList().add(Aspect.ENERGY, 48).add(Aspect.CRAFT, 48).add(Aspect.EXCHANGE, 48).add(Aspect.GREED, 64); + public static AspectList compressedSolars = new AspectList().add(Aspect.FIRE, 8).add(Aspect.WATER, 8).add(Aspect.AIR, 8).add(Aspect.EARTH, 8).add(Aspect.ORDER, 8).add(Aspect.ENTROPY, 8); + public static AspectList solarHelmetRevealing = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.AIR, 32).add(Aspect.LIGHT, 25); + public static AspectList electricBootsTravel = new AspectList().add(Aspect.ENERGY, 16).add(Aspect.ARMOR, 32).add(Aspect.MOTION, 32); + public static AspectList nanoBootsTravel = new AspectList().add(Aspect.ENERGY, 25).add(Aspect.ARMOR, 32).add(Aspect.MOTION, 48); + public static AspectList quantumBootsTravel = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.ARMOR, 32).add(Aspect.MOTION, 64); + public static AspectList electricScribingTools = new AspectList().add(Aspect.AIR, 16).add(Aspect.ORDER, 16).add(Aspect.ENTROPY, 16); + public static AspectList etherealProcessor = new AspectList().add(Aspect.MECHANISM, 16).add(Aspect.MAGIC, 16).add(Aspect.CRAFT, 16); + public static AspectList waterSolars = new AspectList().add(Aspect.WATER, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); + public static AspectList darkSolars = new AspectList().add(Aspect.ENTROPY, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); + public static AspectList orderSolars = new AspectList().add(Aspect.ORDER, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); + public static AspectList fireSolars = new AspectList().add(Aspect.FIRE, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); + public static AspectList airSolars = new AspectList().add(Aspect.AIR, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); + public static AspectList earthSolars = new AspectList().add(Aspect.EARTH, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); + public static AspectList uuMatterInfusions = new AspectList().add(Aspect.FIRE, 32).add(Aspect.WATER, 32).add(Aspect.AIR, 32).add(Aspect.EARTH, 32).add(Aspect.ORDER, 32).add(Aspect.ENTROPY, 32); + public static AspectList lesserUUMInfusions = new AspectList().add(Aspect.FIRE, 16).add(Aspect.WATER, 16).add(Aspect.AIR, 16).add(Aspect.EARTH, 16).add(Aspect.ORDER, 16).add(Aspect.ENTROPY, 16); + public static AspectList cheapUUMInfusions = new AspectList().add(Aspect.FIRE, 8).add(Aspect.WATER, 8).add(Aspect.AIR, 8).add(Aspect.EARTH, 8).add(Aspect.ORDER, 8).add(Aspect.ENTROPY, 8); + public static AspectList cheapestUUMInfusions = new AspectList().add(Aspect.FIRE, 4).add(Aspect.WATER, 4).add(Aspect.AIR, 4).add(Aspect.EARTH, 4).add(Aspect.ORDER, 4).add(Aspect.ENTROPY, 4); + public static AspectList portableNode = new AspectList().add(Aspect.MAGIC, 32).add(Aspect.AURA, 32).add(Aspect.GREED, 32); + public static AspectList electricHoeGrowth = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.PLANT, 25).add(Aspect.CROP, 32).add(Aspect.MAGIC, 48); + public static AspectList chargeFocus = new AspectList().add(Aspect.EXCHANGE, 25).add(Aspect.ENERGY, 32).add(Aspect.MECHANISM, 32); + public static AspectList wandChargeFocus = new AspectList().add(Aspect.ENERGY, 48).add(Aspect.AURA, 32).add(Aspect.EXCHANGE, 48).add(Aspect.GREED, 64); + public static AspectList inventoryChargingRing = new AspectList().add(Aspect.ENERGY, 64).add(Aspect.CRYSTAL, 32).add(Aspect.MAGIC, 48); + public static AspectList armorChargingRing = new AspectList().add(Aspect.ENERGY, 64).add(Aspect.ARMOR, 32).add(Aspect.MAGIC, 48); + public static AspectList thaumiumWing = new AspectList().add(Aspect.FIRE, 48).add(Aspect.WATER, 48).add(Aspect.AIR, 48).add(Aspect.EARTH, 48).add(Aspect.ORDER, 48).add(Aspect.ENTROPY, 48); + public static AspectList nanoWing = new AspectList().add(Aspect.FLIGHT, 48).add(Aspect.AIR, 32).add(Aspect.MECHANISM, 48).add(Aspect.ENERGY, 32); + public static AspectList quantumWing = new AspectList().add(Aspect.FLIGHT, 48).add(Aspect.AIR, 32).add(Aspect.MECHANISM, 48).add(Aspect.ENERGY, 32).add(Aspect.ARMOR, 48); + public static AspectList aerGenerator = new AspectList().add(Aspect.EXCHANGE, 16).add(Aspect.AIR, 8); + public static AspectList uuMatterCrystal = new AspectList().add(Aspect.CRYSTAL, 8).add(Aspect.COLD, 8).add(Aspect.MAGIC, 8); } diff --git a/src/main/java/emt/util/EMTCreativeTab.java b/src/main/java/emt/util/EMTCreativeTab.java index 6736cad..d426d87 100644 --- a/src/main/java/emt/util/EMTCreativeTab.java +++ b/src/main/java/emt/util/EMTCreativeTab.java @@ -6,16 +6,16 @@ import net.minecraft.item.Item; public class EMTCreativeTab extends CreativeTabs { - public EMTCreativeTab(String tabLabel) { - super(tabLabel); - //setBackgroundImageName("emt.png"); - } + public EMTCreativeTab(String tabLabel) { + super(tabLabel); + //setBackgroundImageName("emt.png"); + } - @Override - public Item getTabIconItem() { - return EMTItems.electricThorHammer; - } + @Override + public Item getTabIconItem() { + return EMTItems.electricThorHammer; + } /* @Override diff --git a/src/main/java/emt/util/EMTDungeonChestGenerator.java b/src/main/java/emt/util/EMTDungeonChestGenerator.java index fd6279f..a4c7845 100644 --- a/src/main/java/emt/util/EMTDungeonChestGenerator.java +++ b/src/main/java/emt/util/EMTDungeonChestGenerator.java @@ -7,12 +7,12 @@ import net.minecraftforge.common.ChestGenHooks; public class EMTDungeonChestGenerator { - public static void generateLoot() { - if (!EMTConfigHandler.thorHammerResearch) { - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(EMTItems.taintedThorHammer), 0, 1, EMTConfigHandler.chanceTaintedMjolnir)); - } - if (!EMTConfigHandler.oneRingSpawn) { - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(EMTItems.onering), 0, 1, EMTConfigHandler.chanceOneRing)); - } - } + public static void generateLoot() { + if (!EMTConfigHandler.thorHammerResearch) { + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(EMTItems.taintedThorHammer), 0, 1, EMTConfigHandler.chanceTaintedMjolnir)); + } + if (!EMTConfigHandler.oneRingSpawn) { + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(EMTItems.onering), 0, 1, EMTConfigHandler.chanceOneRing)); + } + } } diff --git a/src/main/java/emt/util/EMTEventHandler.java b/src/main/java/emt/util/EMTEventHandler.java index a657ba9..57214ce 100644 --- a/src/main/java/emt/util/EMTEventHandler.java +++ b/src/main/java/emt/util/EMTEventHandler.java @@ -25,97 +25,97 @@ import thaumcraft.common.config.ConfigBlocks; import thaumcraft.common.entities.monster.EntityTaintChicken; public class EMTEventHandler { - - @SubscribeEvent - public void onLivingHurt(LivingHurtEvent e) { - if(!(e.entityLiving instanceof EntityPlayer) || e.source != DamageSource.fall) - return; - - ItemStack s = ((EntityPlayer)e.entityLiving).inventory.armorInventory[2]; - - if(s == null || !(s.getItem() instanceof ItemFeatherWing)) { - return; - } - - e.ammount *= ((ItemFeatherWing)s.getItem()).getFallDamageMult(); - } - - @SubscribeEvent - public void onPlayerTickEvent(TickEvent.PlayerTickEvent e) { - - ItemStack s = e.player.inventory.armorInventory[2]; - - if(s == null || !(s.getItem() instanceof ItemFeatherWing) || e.phase == Phase.START) { - return; - } - - if(e.player.motionY > 0) { - if(e.player.fallDistance > 0) - e.player.fallDistance -= e.player.motionY; - } - } - - @SubscribeEvent - public void onEntityLivingDrops(LivingDropsEvent event) { - if (event.entityLiving instanceof EntityCreeper) { - EntityCreeper creeper = (EntityCreeper) event.entityLiving; - if (creeper.getPowered()) { - event.entityLiving.entityDropItem(new ItemStack(EMTItems.itemEMTItems, 1, 6), 1); - } - } - if (event.entityLiving instanceof EntityTaintChicken) { - event.entityLiving.entityDropItem(new ItemStack(EMTItems.itemEMTItems, event.entityLiving.worldObj.rand.nextInt(3), 13), 1); - } - } - @SubscribeEvent - public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) { - if (event.modID.equals(EMT.MOD_ID)) { - EMTConfigHandler.syncConfig(); - EMT.LOGGER.info("Refreshing configuration file."); - } - } + @SubscribeEvent + public void onLivingHurt(LivingHurtEvent e) { + if (!(e.entityLiving instanceof EntityPlayer) || e.source != DamageSource.fall) + return; - @SubscribeEvent - public void onSetEntityAttack(LivingSetAttackTargetEvent e) { - if (e.entityLiving != null && e.target != null && e.entityLiving instanceof EntityLiving && e.target instanceof EntityPlayer) { - IInventory inventory = BaublesApi.getBaubles((EntityPlayer) e.target); - - for(int i = 0; i < inventory.getSizeInventory(); i++) { - ItemStack stack = inventory.getStackInSlot(i); - - if(stack != null && stack.getItem() == EMTItems.onering) { - ((EntityLiving)e.entityLiving).setAttackTarget(null); - } - } + ItemStack s = ((EntityPlayer) e.entityLiving).inventory.armorInventory[2]; + + if (s == null || !(s.getItem() instanceof ItemFeatherWing)) { + return; + } + + e.ammount *= ((ItemFeatherWing) s.getItem()).getFallDamageMult(); + } + + @SubscribeEvent + public void onPlayerTickEvent(TickEvent.PlayerTickEvent e) { + + ItemStack s = e.player.inventory.armorInventory[2]; + + if (s == null || !(s.getItem() instanceof ItemFeatherWing) || e.phase == Phase.START) { + return; + } + + if (e.player.motionY > 0) { + if (e.player.fallDistance > 0) + e.player.fallDistance -= e.player.motionY; + } + } + + @SubscribeEvent + public void onEntityLivingDrops(LivingDropsEvent event) { + if (event.entityLiving instanceof EntityCreeper) { + EntityCreeper creeper = (EntityCreeper) event.entityLiving; + if (creeper.getPowered()) { + event.entityLiving.entityDropItem(new ItemStack(EMTItems.itemEMTItems, 1, 6), 1); + } + } + if (event.entityLiving instanceof EntityTaintChicken) { + event.entityLiving.entityDropItem(new ItemStack(EMTItems.itemEMTItems, event.entityLiving.worldObj.rand.nextInt(3), 13), 1); + } + } + + @SubscribeEvent + public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) { + if (event.modID.equals(EMT.MOD_ID)) { + EMTConfigHandler.syncConfig(); + EMT.LOGGER.info("Refreshing configuration file."); + } + } + + @SubscribeEvent + public void onSetEntityAttack(LivingSetAttackTargetEvent e) { + if (e.entityLiving instanceof EntityLiving && e.target instanceof EntityPlayer) { + IInventory inventory = BaublesApi.getBaubles((EntityPlayer) e.target); + + for (int i = 0; i < inventory.getSizeInventory(); i++) { + ItemStack stack = inventory.getStackInSlot(i); + + if (stack != null && stack.getItem() == EMTItems.onering) { + ((EntityLiving) e.entityLiving).setAttackTarget(null); + } + } + + } + } + + @SubscribeEvent + public void createCloud(PlayerInteractEvent e) { + if (e.action != PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK || e.world.isRemote) { + return; + } + + Block block = e.world.getBlock(e.x, e.y, e.z); + int meta = e.world.getBlockMetadata(e.x, e.y, e.z); + + if (block != ConfigBlocks.blockAiry || meta != 1) { + return; + } + + ItemStack currentStack = e.entityPlayer.inventory.getCurrentItem(); + if (currentStack == null) { + return; + } + + double val = ElectricItem.manager.discharge(currentStack, 256, 4, false, true, false); + if (val < 256) { + return; + } + + e.world.setBlock(e.x, e.y, e.z, EMTBlocks.electricCloud); + } - } - } - - @SubscribeEvent - public void createCloud(PlayerInteractEvent e) { - if(e.action != PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK || e.world.isRemote) { - return; - } - - Block block = e.world.getBlock(e.x, e.y, e.z); - int meta = e.world.getBlockMetadata(e.x, e.y, e.z); - - if(block != ConfigBlocks.blockAiry || meta != 1) { - return; - } - - ItemStack currentStack = e.entityPlayer.inventory.getCurrentItem(); - if(currentStack == null) { - return; - } - - double val = ElectricItem.manager.discharge(currentStack, 256, 4, false, true, false); - if(val < 256) { - return; - } - - e.world.setBlock(e.x, e.y, e.z, EMTBlocks.electricCloud); - } - } diff --git a/src/main/java/emt/util/EMTRandomHelper.java b/src/main/java/emt/util/EMTRandomHelper.java index 865527d..bbf57c0 100644 --- a/src/main/java/emt/util/EMTRandomHelper.java +++ b/src/main/java/emt/util/EMTRandomHelper.java @@ -9,79 +9,79 @@ import java.util.Random; public class EMTRandomHelper { - public static ItemStack getChargedItem(Item item, int charge) { - ItemStack stack = new ItemStack(item); - ElectricItem.manager.charge(stack, charge, charge, true, false); - return stack; - } + public static ItemStack getChargedItem(Item item, int charge) { + ItemStack stack = new ItemStack(item); + ElectricItem.manager.charge(stack, charge, charge, true, false); + return stack; + } - public static class Bolt { - Random rnd = new Random(); - public ArrayList points = new ArrayList(); - public float angleZ = 0; - public float angleY = 0; - float dist = 0; - float length = 0; - float height = 0; + public static class Bolt { + public ArrayList points = new ArrayList(); + public float angleZ = 0; + public float angleY = 0; + Random rnd = new Random(); + float dist = 0; + float length = 0; + float height = 0; - public Bolt(float dist, float length, float height) { - this.dist = dist; - this.length = (length / 2f) + (rnd.nextInt((int) (length / 2f))); - this.height = height; + public Bolt(float dist, float length, float height) { + this.dist = dist; + this.length = (length / 2f) + (rnd.nextInt((int) (length / 2f))); + this.height = height; - regenerate(this.dist, this.length, this.height); - } + regenerate(this.dist, this.length, this.height); + } - public void regenerate() { - regenerate(dist, length, height); - } + public void regenerate() { + regenerate(dist, length, height); + } - public void regenerate(float dist, float length, float height) { - points.clear(); + public void regenerate(float dist, float length, float height) { + points.clear(); - angleZ = rnd.nextInt(360); - angleY = rnd.nextInt(360); + angleZ = rnd.nextInt(360); + angleY = rnd.nextInt(360); - for (int i = 0; i < length / dist; i++) { - float x = i * dist; - float prevY = i == 0 ? 0 : points.get(i - 1).y; - float prevZ = i == 0 ? 0 : points.get(i - 1).z; - float y = prevY + (rnd.nextInt((int) height) - (height / 2)); - float z = prevZ + (rnd.nextInt((int) height) - (height / 2)); + for (int i = 0; i < length / dist; i++) { + float x = i * dist; + float prevY = i == 0 ? 0 : points.get(i - 1).y; + float prevZ = i == 0 ? 0 : points.get(i - 1).z; + float y = prevY + (rnd.nextInt((int) height) - (height / 2)); + float z = prevZ + (rnd.nextInt((int) height) - (height / 2)); - byte color = (byte) ((198 / (length / dist)) * x); - points.add(new Point(x, y, z, (byte)(255 - color), (byte)(255 - color), (byte)255)); - } - } - } + byte color = (byte) ((198 / (length / dist)) * x); + points.add(new Point(x, y, z, (byte) (255 - color), (byte) (255 - color), (byte) 255)); + } + } + } - public static class Point { - public float x = 0; - public float y = 0; - public float z = 0; - public byte r = 0; - public byte g = 0; - public byte b = 0; + public static class Point { + public float x = 0; + public float y = 0; + public float z = 0; + public byte r = 0; + public byte g = 0; + public byte b = 0; - public Point(float x, float y, float z) { - this.x = x; - this.y = y; - this.z = z; - } - - public Point(float x, float y, float z, byte r, byte g, byte b) { - this.x = x; - this.y = y; - this.z = z; - this.r = r; - this.g = g; - this.b = b; - } + public Point(float x, float y, float z) { + this.x = x; + this.y = y; + this.z = z; + } - public Point(double x, double y, double z) { - this.x = (float) x; - this.y = (float) y; - this.z = (float) z; - } - } + public Point(float x, float y, float z, byte r, byte g, byte b) { + this.x = x; + this.y = y; + this.z = z; + this.r = r; + this.g = g; + this.b = b; + } + + public Point(double x, double y, double z) { + this.x = (float) x; + this.y = (float) y; + this.z = (float) z; + } + } } diff --git a/src/main/java/emt/util/EMTResearchAspects.java b/src/main/java/emt/util/EMTResearchAspects.java index c0e4f61..b415efe 100644 --- a/src/main/java/emt/util/EMTResearchAspects.java +++ b/src/main/java/emt/util/EMTResearchAspects.java @@ -5,51 +5,51 @@ import thaumcraft.api.aspects.AspectList; public class EMTResearchAspects { - public static AspectList thaumiumDrillResearch = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.TOOL, 6).add(Aspect.MINE, 4); - public static AspectList thaumiumChainsawResearch = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.WEAPON, 6).add(Aspect.TOOL, 4); - public static AspectList thaumicQuantumHelmet = new AspectList().add(Aspect.ARMOR, 8).add(Aspect.ENERGY, 4).add(Aspect.SENSES, 6); - public static AspectList diamondOmnitoolResearch = new AspectList().add(Aspect.ENERGY, 2).add(Aspect.TOOL, 3).add(Aspect.MINE, 2).add(Aspect.WEAPON, 2); - public static AspectList thaumiumOmnitoolResearch = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.TOOL, 6).add(Aspect.MINE, 4).add(Aspect.WEAPON, 6); - public static AspectList thaumicNanoHelmet = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.SENSES, 8).add(Aspect.ARMOR, 6); - public static AspectList laserFocusResearch = new AspectList().add(Aspect.FIRE, 3).add(Aspect.DEATH, 2).add(Aspect.WEAPON, 3); - public static AspectList christmasFocusResearch = new AspectList().add(Aspect.COLD, 2).add(Aspect.BEAST, 5).add(Aspect.LIFE, 6).add(Aspect.DEATH, 2); - public static AspectList energyBallFocusResearch = new AspectList().add(Aspect.ENERGY, 10).add(Aspect.MAGIC, 5).add(Aspect.LIFE, 6); - public static AspectList shieldFocusResearch = new AspectList().add(Aspect.ARMOR, 5).add(Aspect.AIR, 2).add(Aspect.CRYSTAL, 3).add(Aspect.TRAP, 2); - public static AspectList electricGogglesResearch = new AspectList().add(Aspect.ARMOR, 8).add(Aspect.ENERGY, 5).add(Aspect.SENSES, 6); - public static AspectList potentiaGeneratorResearch = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.EXCHANGE, 4).add(Aspect.METAL, 3); - public static AspectList ignisGeneratorResearch = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.FIRE, 3); - public static AspectList auramGeneratorResearch = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.AURA, 3); - public static AspectList arborGeneratorResearch = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.TREE, 3); - public static AspectList lucrumGeneratorResearch = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.GREED, 3); - public static AspectList streamChainsawResearch = new AspectList().add(Aspect.TOOL, 3).add(Aspect.TREE, 3).add(Aspect.WATER, 6).add(Aspect.ENERGY, 4); - public static AspectList rockbreakerDrillResearch = new AspectList().add(Aspect.ENERGY, 3).add(Aspect.FIRE, 2).add(Aspect.MINE, 3); - public static AspectList shieldBlockResearch = new AspectList().add(Aspect.ARMOR, 3).add(Aspect.TRAP, 2); - public static AspectList tinyUraniumResearch = new AspectList().add(Aspect.POISON, 4).add(Aspect.DEATH, 3).add(Aspect.EXCHANGE, 3); - public static AspectList thorHammerResearch = new AspectList().add(Aspect.WEAPON, 3).add(Aspect.WEATHER, 4).add(Aspect.ELDRITCH, 3); - public static AspectList superchargedThorHammerResearch = new AspectList().add(Aspect.WEAPON, 4).add(Aspect.ENERGY, 6).add(Aspect.BEAST, 4); - public static AspectList wandCharger = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.CRAFT, 2).add(Aspect.EXCHANGE, 3).add(Aspect.GREED, 5); - public static AspectList compressedSolars = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.LIGHT, 3).add(Aspect.METAL, 2); - public static AspectList solarHelmetRevealing = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.AIR, 2).add(Aspect.LIGHT, 4); - public static AspectList electricBootsTravel = new AspectList().add(Aspect.ENERGY, 2).add(Aspect.ARMOR, 5).add(Aspect.MOTION, 2); - public static AspectList nanoBootsTravel = new AspectList().add(Aspect.ENERGY, 3).add(Aspect.ARMOR, 5).add(Aspect.MOTION, 3); - public static AspectList quantumBootsTravel = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.ARMOR, 5).add(Aspect.MOTION, 4); - public static AspectList electricScribingTools = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.DARKNESS, 3).add(Aspect.CRAFT, 1); - public static AspectList etherealProcessor = new AspectList().add(Aspect.MECHANISM, 3).add(Aspect.MAGIC, 4).add(Aspect.CRAFT, 5); - public static AspectList waterSolars = new AspectList().add(Aspect.WATER, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); - public static AspectList darkSolars = new AspectList().add(Aspect.ENTROPY, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); - public static AspectList orderSolars = new AspectList().add(Aspect.ORDER, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); - public static AspectList fireSolars = new AspectList().add(Aspect.FIRE, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); - public static AspectList airSolars = new AspectList().add(Aspect.AIR, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); - public static AspectList earthSolars = new AspectList().add(Aspect.EARTH, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); - public static AspectList uuMInfusion = new AspectList().add(Aspect.ELDRITCH, 4).add(Aspect.MAGIC, 4).add(Aspect.CRAFT, 5); - public static AspectList portableNode = new AspectList().add(Aspect.MAGIC, 5).add(Aspect.AURA, 5).add(Aspect.GREED, 5); - public static AspectList electricHoeGrowth = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.PLANT, 4).add(Aspect.CROP, 5).add(Aspect.MAGIC, 4); - public static AspectList chargeFocus = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.ENERGY, 5).add(Aspect.MECHANISM, 4); - public static AspectList wandChargeFocus = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.AURA, 4).add(Aspect.EXCHANGE, 4).add(Aspect.GREED, 5); - public static AspectList inventoryChargingRing = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.CRYSTAL, 4).add(Aspect.MAGIC, 4); - public static AspectList armorChargingRing = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.ARMOR, 4).add(Aspect.MAGIC, 4); - public static AspectList thaumiumWing = new AspectList().add(Aspect.FLIGHT, 5).add(Aspect.AIR, 5).add(Aspect.MECHANISM, 8); - public static AspectList nanoWing = new AspectList().add(Aspect.FLIGHT, 5).add(Aspect.AIR, 5).add(Aspect.MECHANISM, 8).add(Aspect.ENERGY, 4); - public static AspectList quantumWing = new AspectList().add(Aspect.FLIGHT, 5).add(Aspect.AIR, 5).add(Aspect.MECHANISM, 8).add(Aspect.ENERGY, 4); - public static AspectList aerGenerator = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.AIR, 3); + public static AspectList thaumiumDrillResearch = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.TOOL, 6).add(Aspect.MINE, 4); + public static AspectList thaumiumChainsawResearch = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.WEAPON, 6).add(Aspect.TOOL, 4); + public static AspectList thaumicQuantumHelmet = new AspectList().add(Aspect.ARMOR, 8).add(Aspect.ENERGY, 4).add(Aspect.SENSES, 6); + public static AspectList diamondOmnitoolResearch = new AspectList().add(Aspect.ENERGY, 2).add(Aspect.TOOL, 3).add(Aspect.MINE, 2).add(Aspect.WEAPON, 2); + public static AspectList thaumiumOmnitoolResearch = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.TOOL, 6).add(Aspect.MINE, 4).add(Aspect.WEAPON, 6); + public static AspectList thaumicNanoHelmet = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.SENSES, 8).add(Aspect.ARMOR, 6); + public static AspectList laserFocusResearch = new AspectList().add(Aspect.FIRE, 3).add(Aspect.DEATH, 2).add(Aspect.WEAPON, 3); + public static AspectList christmasFocusResearch = new AspectList().add(Aspect.COLD, 2).add(Aspect.BEAST, 5).add(Aspect.LIFE, 6).add(Aspect.DEATH, 2); + public static AspectList energyBallFocusResearch = new AspectList().add(Aspect.ENERGY, 10).add(Aspect.MAGIC, 5).add(Aspect.LIFE, 6); + public static AspectList shieldFocusResearch = new AspectList().add(Aspect.ARMOR, 5).add(Aspect.AIR, 2).add(Aspect.CRYSTAL, 3).add(Aspect.TRAP, 2); + public static AspectList electricGogglesResearch = new AspectList().add(Aspect.ARMOR, 8).add(Aspect.ENERGY, 5).add(Aspect.SENSES, 6); + public static AspectList potentiaGeneratorResearch = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.EXCHANGE, 4).add(Aspect.METAL, 3); + public static AspectList ignisGeneratorResearch = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.FIRE, 3); + public static AspectList auramGeneratorResearch = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.AURA, 3); + public static AspectList arborGeneratorResearch = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.TREE, 3); + public static AspectList lucrumGeneratorResearch = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.GREED, 3); + public static AspectList streamChainsawResearch = new AspectList().add(Aspect.TOOL, 3).add(Aspect.TREE, 3).add(Aspect.WATER, 6).add(Aspect.ENERGY, 4); + public static AspectList rockbreakerDrillResearch = new AspectList().add(Aspect.ENERGY, 3).add(Aspect.FIRE, 2).add(Aspect.MINE, 3); + public static AspectList shieldBlockResearch = new AspectList().add(Aspect.ARMOR, 3).add(Aspect.TRAP, 2); + public static AspectList tinyUraniumResearch = new AspectList().add(Aspect.POISON, 4).add(Aspect.DEATH, 3).add(Aspect.EXCHANGE, 3); + public static AspectList thorHammerResearch = new AspectList().add(Aspect.WEAPON, 3).add(Aspect.WEATHER, 4).add(Aspect.ELDRITCH, 3); + public static AspectList superchargedThorHammerResearch = new AspectList().add(Aspect.WEAPON, 4).add(Aspect.ENERGY, 6).add(Aspect.BEAST, 4); + public static AspectList wandCharger = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.CRAFT, 2).add(Aspect.EXCHANGE, 3).add(Aspect.GREED, 5); + public static AspectList compressedSolars = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.LIGHT, 3).add(Aspect.METAL, 2); + public static AspectList solarHelmetRevealing = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.AIR, 2).add(Aspect.LIGHT, 4); + public static AspectList electricBootsTravel = new AspectList().add(Aspect.ENERGY, 2).add(Aspect.ARMOR, 5).add(Aspect.MOTION, 2); + public static AspectList nanoBootsTravel = new AspectList().add(Aspect.ENERGY, 3).add(Aspect.ARMOR, 5).add(Aspect.MOTION, 3); + public static AspectList quantumBootsTravel = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.ARMOR, 5).add(Aspect.MOTION, 4); + public static AspectList electricScribingTools = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.DARKNESS, 3).add(Aspect.CRAFT, 1); + public static AspectList etherealProcessor = new AspectList().add(Aspect.MECHANISM, 3).add(Aspect.MAGIC, 4).add(Aspect.CRAFT, 5); + public static AspectList waterSolars = new AspectList().add(Aspect.WATER, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); + public static AspectList darkSolars = new AspectList().add(Aspect.ENTROPY, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); + public static AspectList orderSolars = new AspectList().add(Aspect.ORDER, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); + public static AspectList fireSolars = new AspectList().add(Aspect.FIRE, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); + public static AspectList airSolars = new AspectList().add(Aspect.AIR, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); + public static AspectList earthSolars = new AspectList().add(Aspect.EARTH, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); + public static AspectList uuMInfusion = new AspectList().add(Aspect.ELDRITCH, 4).add(Aspect.MAGIC, 4).add(Aspect.CRAFT, 5); + public static AspectList portableNode = new AspectList().add(Aspect.MAGIC, 5).add(Aspect.AURA, 5).add(Aspect.GREED, 5); + public static AspectList electricHoeGrowth = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.PLANT, 4).add(Aspect.CROP, 5).add(Aspect.MAGIC, 4); + public static AspectList chargeFocus = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.ENERGY, 5).add(Aspect.MECHANISM, 4); + public static AspectList wandChargeFocus = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.AURA, 4).add(Aspect.EXCHANGE, 4).add(Aspect.GREED, 5); + public static AspectList inventoryChargingRing = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.CRYSTAL, 4).add(Aspect.MAGIC, 4); + public static AspectList armorChargingRing = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.ARMOR, 4).add(Aspect.MAGIC, 4); + public static AspectList thaumiumWing = new AspectList().add(Aspect.FLIGHT, 5).add(Aspect.AIR, 5).add(Aspect.MECHANISM, 8); + public static AspectList nanoWing = new AspectList().add(Aspect.FLIGHT, 5).add(Aspect.AIR, 5).add(Aspect.MECHANISM, 8).add(Aspect.ENERGY, 4); + public static AspectList quantumWing = new AspectList().add(Aspect.FLIGHT, 5).add(Aspect.AIR, 5).add(Aspect.MECHANISM, 8).add(Aspect.ENERGY, 4); + public static AspectList aerGenerator = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.AIR, 3); } diff --git a/src/main/java/emt/util/EMTResearchItem.java b/src/main/java/emt/util/EMTResearchItem.java index 962984d..79e6714 100644 --- a/src/main/java/emt/util/EMTResearchItem.java +++ b/src/main/java/emt/util/EMTResearchItem.java @@ -11,58 +11,58 @@ import thaumcraft.api.research.ResearchPage.PageType; public class EMTResearchItem extends ResearchItem { - public EMTResearchItem(String par1, String par2) { - super(par1, "EMT"); - } + public EMTResearchItem(String par1, String par2) { + super(par1, "EMT"); + } - public EMTResearchItem(String researchName, AspectList tags, int x, int y, int z, ItemStack icon) { - super(researchName, "EMT", tags, x, y, z, icon); - } - - public EMTResearchItem(String researchName, int x, int y, int z, ItemStack icon) { - super(researchName, "EMT", new AspectList(), x, y, z, icon); - } + public EMTResearchItem(String researchName, AspectList tags, int x, int y, int z, ItemStack icon) { + super(researchName, "EMT", tags, x, y, z, icon); + } - public EMTResearchItem(String researchName, AspectList tags, int x, int y, int z, ResourceLocation icon) { - super(researchName, "EMT", tags, x, y, z, icon); - } - - public EMTResearchItem(String researchName, int x, int y, int z, ResourceLocation icon) { - super(researchName, "EMT", new AspectList(), x, y, z, icon); - } + public EMTResearchItem(String researchName, int x, int y, int z, ItemStack icon) { + super(researchName, "EMT", new AspectList(), x, y, z, icon); + } - @Override - @SideOnly(Side.CLIENT) - public String getName() { - return EMTTextHelper.localize("emt.rsname." + key); - } + public EMTResearchItem(String researchName, AspectList tags, int x, int y, int z, ResourceLocation icon) { + super(researchName, "EMT", tags, x, y, z, icon); + } - @Override - @SideOnly(Side.CLIENT) - public String getText() { - return "[EMT] " + EMTTextHelper.localize("emt.tag." + key); - } + public EMTResearchItem(String researchName, int x, int y, int z, ResourceLocation icon) { + super(researchName, "EMT", new AspectList(), x, y, z, icon); + } - @Override - public ResearchItem setPages(ResearchPage... pages) { - for (ResearchPage page : pages) { - - if (page.type == PageType.TEXT) - page.text = "emt.text." + key + (page.text.equals("") ? "" : "." + page.text); + @Override + @SideOnly(Side.CLIENT) + public String getName() { + return EMTTextHelper.localize("emt.rsname." + key); + } - if (page.type == PageType.INFUSION_CRAFTING) { - if (parentsHidden == null || parentsHidden.length == 0) - parentsHidden = new String[] { "INFUSION" }; - else { - String[] newParents = new String[parentsHidden.length + 1]; - newParents[0] = "INFUSION"; - for (int i2 = 0; i2 < parentsHidden.length; i2++) - newParents[i2 + 1] = parentsHidden[i2]; - parentsHidden = newParents; - } - } - } + @Override + @SideOnly(Side.CLIENT) + public String getText() { + return "[EMT] " + EMTTextHelper.localize("emt.tag." + key); + } - return super.setPages(pages); - } + @Override + public ResearchItem setPages(ResearchPage... pages) { + for (ResearchPage page : pages) { + + if (page.type == PageType.TEXT) + page.text = "emt.text." + key + (page.text.equals("") ? "" : "." + page.text); + + if (page.type == PageType.INFUSION_CRAFTING) { + if (parentsHidden == null || parentsHidden.length == 0) + parentsHidden = new String[]{"INFUSION"}; + else { + String[] newParents = new String[parentsHidden.length + 1]; + newParents[0] = "INFUSION"; + for (int i2 = 0; i2 < parentsHidden.length; i2++) + newParents[i2 + 1] = parentsHidden[i2]; + parentsHidden = newParents; + } + } + } + + return super.setPages(pages); + } } diff --git a/src/main/java/emt/util/EMTTextHelper.java b/src/main/java/emt/util/EMTTextHelper.java index f95c887..0d5c7a5 100644 --- a/src/main/java/emt/util/EMTTextHelper.java +++ b/src/main/java/emt/util/EMTTextHelper.java @@ -4,40 +4,40 @@ import net.minecraft.util.StatCollector; public class EMTTextHelper { - /** - * Color Coding * - */ - public static final String BLACK = (char) 167 + "0"; - public static final String BLUE = (char) 167 + "1"; - public static final String GREEN = (char) 167 + "2"; - public static final String TEAL = (char) 167 + "3"; - public static final String RED = (char) 167 + "4"; - public static final String PURPLE = (char) 167 + "5"; - public static final String ORANGE = (char) 167 + "6"; - public static final String LIGHT_GRAY = (char) 167 + "7"; - public static final String GRAY = (char) 167 + "8"; - public static final String LIGHT_BLUE = (char) 167 + "9"; - public static final String BRIGHT_GREEN = (char) 167 + "a"; - public static final String BRIGHT_BLUE = (char) 167 + "b"; - public static final String LIGHT_RED = (char) 167 + "c"; - public static final String PINK = (char) 167 + "d"; - public static final String YELLOW = (char) 167 + "e"; - public static final String WHITE = (char) 167 + "f"; + /** + * Color Coding * + */ + public static final String BLACK = (char) 167 + "0"; + public static final String BLUE = (char) 167 + "1"; + public static final String GREEN = (char) 167 + "2"; + public static final String TEAL = (char) 167 + "3"; + public static final String RED = (char) 167 + "4"; + public static final String PURPLE = (char) 167 + "5"; + public static final String ORANGE = (char) 167 + "6"; + public static final String LIGHT_GRAY = (char) 167 + "7"; + public static final String GRAY = (char) 167 + "8"; + public static final String LIGHT_BLUE = (char) 167 + "9"; + public static final String BRIGHT_GREEN = (char) 167 + "a"; + public static final String BRIGHT_BLUE = (char) 167 + "b"; + public static final String LIGHT_RED = (char) 167 + "c"; + public static final String PINK = (char) 167 + "d"; + public static final String YELLOW = (char) 167 + "e"; + public static final String WHITE = (char) 167 + "f"; - /** - * Text formatting * - */ - public static final String OBFUSCATED = (char) 167 + "k"; - public static final String BOLD = (char) 167 + "l"; - public static final String STRIKETHROUGH = (char) 167 + "m"; - public static final String UNDERLINE = (char) 167 + "n"; - public static final String ITALIC = (char) 167 + "o"; - public static final String END = (char) 167 + "r"; + /** + * Text formatting * + */ + public static final String OBFUSCATED = (char) 167 + "k"; + public static final String BOLD = (char) 167 + "l"; + public static final String STRIKETHROUGH = (char) 167 + "m"; + public static final String UNDERLINE = (char) 167 + "n"; + public static final String ITALIC = (char) 167 + "o"; + public static final String END = (char) 167 + "r"; - /** - * Enable Localizationizing * - */ - public static String localize(String key) { - return StatCollector.translateToLocal(key); - } + /** + * Enable Localizationizing * + */ + public static String localize(String key) { + return StatCollector.translateToLocal(key); + } } diff --git a/src/main/resources/assets/emt/lang/en_US.lang b/src/main/resources/assets/emt/lang/en_US.lang index 7fd25be..c44c54f 100644 --- a/src/main/resources/assets/emt/lang/en_US.lang +++ b/src/main/resources/assets/emt/lang/en_US.lang @@ -17,6 +17,7 @@ emt.Storage=Storage: emt.PressShift= emt.Generating=Generating: emt.Fuel=Fuel +emt.OutputMax=Output at Max: #=============Tooltips============= #This comes after a player name. The 's is depicting ownership. diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 9073866..59d9fb5 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -1,16 +1,24 @@ [ -{ - "modid": "EMT", - "name": "Electro-Magic Tools", - "description": "Ever thought about combining magic and electricity?", - "version":"${version}", - "mcversion": "1.7.10", - "url": "http://www.minecraftforum.net/topic/2196652-", - "updateUrl": "", - "authorList": ["fewizz", "TheSilentium", "The GT-NH Team", "bartimaeusnek"], - "credits": "Azanor, Tombenpotter, TehNut, the IC2 guys and the forge guys! | LogicFalls for the awesome Big Essentia Gen Textures!", - "logoFile": "logo.png", - "screenshots": [], - "dependencies": ["Thaumcraft 4", "IC2"] -} + { + "modid": "EMT", + "name": "Electro-Magic Tools", + "description": "Ever thought about combining magic and electricity?", + "version": "${version}", + "mcversion": "1.7.10", + "url": "http://www.minecraftforum.net/topic/2196652-", + "updateUrl": "", + "authorList": [ + "fewizz", + "TheSilentium", + "The GT-NH Team", + "bartimaeusnek" + ], + "credits": "Azanor, Tombenpotter, TehNut, the IC2 guys and the forge guys! | LogicFalls for the awesome Big Essentia Gen Textures!", + "logoFile": "logo.png", + "screenshots": [], + "dependencies": [ + "Thaumcraft 4", + "IC2" + ] + } ] \ No newline at end of file