From 202b7ce27a171082d654acd37ce4bdb0893d27b5 Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Sun, 29 Jan 2023 10:10:39 +0000 Subject: [PATCH] [ci skip] spotlessApply with the new settings --- .../api/IHeatExchangerLogic.java | 30 +- .../pneumaticCraft/api/PneumaticRegistry.java | 71 +- .../api/actuator/IActuator.java | 9 +- .../api/block/BlockSupplier.java | 77 +- .../api/block/IPneumaticWrenchable.java | 4 +- .../api/client/GuiAnimatedStatSupplier.java | 27 +- .../api/client/GuiElementRenderer.java | 58 +- .../api/client/IGuiAnimatedStat.java | 58 +- .../AssemblyRenderOverriding.java | 30 +- .../pneumaticHelmet/IBlockTrackEntry.java | 71 +- .../pneumaticHelmet/IEntityTrackEntry.java | 14 +- .../client/pneumaticHelmet/IGuiScreen.java | 2 + .../pneumaticHelmet/IHackableBlock.java | 42 +- .../pneumaticHelmet/IHackableEntity.java | 37 +- .../client/pneumaticHelmet/IOptionPage.java | 16 +- .../IUpgradeRenderHandler.java | 42 +- .../RenderHandlerRegistry.java | 4 +- .../api/drone/DroneConstructingEvent.java | 1 + .../api/drone/IBlockInteractHandler.java | 5 +- .../api/drone/ICustomBlockInteract.java | 29 +- .../java/pneumaticCraft/api/drone/IDrone.java | 2 + .../api/drone/IPathNavigator.java | 1 + .../api/drone/IPathfindHandler.java | 8 +- .../drone/SpecialVariableRetrievalEvent.java | 11 +- .../api/item/IInventoryItem.java | 12 +- .../api/item/IPressurizable.java | 10 +- .../api/item/IProgrammable.java | 20 +- .../pneumaticCraft/api/item/ItemSupplier.java | 50 +- .../api/recipe/AssemblyRecipe.java | 2 + .../api/recipe/IPressureChamberRecipe.java | 14 +- .../api/recipe/PressureChamberRecipe.java | 2 + .../api/tileentity/AirHandlerSupplier.java | 18 +- .../api/tileentity/IAirHandler.java | 43 +- .../api/tileentity/IHeatExchanger.java | 18 +- .../api/tileentity/IManoMeasurable.java | 8 +- .../api/tileentity/IPneumaticMachine.java | 15 +- .../api/universalSensor/EntityPollSensor.java | 1 + .../IBlockAndCoordinateEventSensor.java | 15 +- .../IBlockAndCoordinatePollSensor.java | 19 +- .../universalSensor/IEventSensorSetting.java | 5 +- .../universalSensor/IPollSensorSetting.java | 6 +- .../api/universalSensor/ISensorSetting.java | 41 +- .../universalSensor/PlayerEventSensor.java | 3 +- .../universalSensor/SensorRegistrator.java | 14 +- .../AlchemicalWizardry.java | 2535 +++++++++-------- .../BloodMagicConfiguration.java | 893 +++--- .../alchemicalWizardry/ModBlocks.java | 13 +- .../alchemicalWizardry/ModItems.java | 23 +- .../alchemicalWizardry/api/BlockStack.java | 3 +- .../api/ColourAndCoords.java | 1 + .../api/ILimitingLogic.java | 1 + .../alchemicalWizardry/api/Int3.java | 4 +- .../api/RoutingFocusLogic.java | 10 +- .../api/RoutingFocusParadigm.java | 2 + .../api/RoutingFocusPosAndFacing.java | 1 + .../alchemicalWizardry/api/Vector3.java | 14 +- .../AlchemicalPotionCreationHandler.java | 2 + .../AlchemyPotionHandlerComponent.java | 1 + .../api/alchemy/AlchemyPotionHelper.java | 1 + .../api/alchemy/AlchemyRecipe.java | 3 +- .../api/alchemy/AlchemyRecipeRegistry.java | 5 +- .../api/alchemy/energy/IAlchemyGoggles.java | 1 + .../api/alchemy/energy/IReagentContainer.java | 1 + .../api/alchemy/energy/IReagentHandler.java | 1 + .../energy/ISegmentedReagentHandler.java | 1 + .../api/alchemy/energy/Reagent.java | 1 + .../api/alchemy/energy/ReagentContainer.java | 1 + .../alchemy/energy/ReagentContainerInfo.java | 1 + .../api/alchemy/energy/ReagentRegistry.java | 2 + .../api/alchemy/energy/ReagentStack.java | 1 + .../alchemy/energy/TileReagentHandler.java | 3 +- .../energy/TileSegmentedReagentHandler.java | 5 +- .../api/altarRecipeRegistry/AltarRecipe.java | 26 +- .../AltarRecipeRegistry.java | 45 +- .../api/altarRecipeRegistry/IFadedRune.java | 1 + .../api/bindingRegistry/BindingRecipe.java | 1 + .../api/bindingRegistry/BindingRegistry.java | 2 + .../api/bindingRegistry/UnbindingRecipe.java | 2 + .../bindingRegistry/UnbindingRegistry.java | 2 + .../api/command/SubCommandBase.java | 45 +- .../api/compress/CompressionHandler.java | 9 +- .../api/compress/CompressionRegistry.java | 6 +- .../api/event/AddToNetworkEvent.java | 11 +- .../api/event/ItemBindEvent.java | 6 +- .../api/event/ItemDrainInContainerEvent.java | 4 +- .../api/event/ItemDrainNetworkEvent.java | 12 +- .../api/event/PlayerAddToNetworkEvent.java | 8 +- .../api/event/PlayerDrainNetworkEvent.java | 4 +- .../api/event/RitualActivatedEvent.java | 15 +- .../api/event/RitualEvent.java | 1 + .../api/event/RitualStopEvent.java | 1 + .../api/event/SacrificeKnifeUsedEvent.java | 4 +- .../api/event/SoulNetworkEvent.java | 1 + .../api/event/TeleposeEvent.java | 15 +- .../api/guide/OrbRecipeRenderer.java | 54 +- .../api/guide/PageAltarRecipe.java | 30 +- .../api/guide/PageMultiBlock.java | 80 +- .../api/guide/PageRitualMultiBlock.java | 37 +- .../api/harvest/HarvestRegistry.java | 2 + .../api/harvest/IHarvestHandler.java | 1 + .../api/items/IAltarManipulator.java | 3 +- .../api/items/ItemSpellMultiTool.java | 56 +- .../api/items/ShapedBloodOrbRecipe.java | 14 +- .../api/items/ShapelessBloodOrbRecipe.java | 5 +- .../api/items/interfaces/ArmourUpgrade.java | 1 + .../api/items/interfaces/IBindable.java | 3 +- .../api/items/interfaces/IBloodOrb.java | 1 + .../api/items/interfaces/IHolding.java | 3 +- .../api/items/interfaces/ILPGauge.java | 1 + .../items/interfaces/IReagentManipulator.java | 3 +- .../api/items/interfaces/IRitualDiviner.java | 1 + .../api/items/interfaces/ISigil.java | 3 +- .../api/renderer/MRSRenderer.java | 4 +- .../api/rituals/IMasterRitualStone.java | 4 +- .../api/rituals/IRitualStone.java | 2 + .../api/rituals/ITileRitualStone.java | 1 + .../api/rituals/LocalRitualStorage.java | 8 +- .../api/rituals/RitualComponent.java | 1 + .../api/rituals/RitualEffect.java | 7 +- .../api/rituals/Rituals.java | 41 +- .../api/sacrifice/IIncense.java | 1 + .../api/sacrifice/PlayerSacrificeHandler.java | 16 +- .../soulNetwork/ComplexNetworkHandler.java | 31 +- .../api/soulNetwork/LifeEssenceNetwork.java | 1 + .../api/soulNetwork/SoulNetworkHandler.java | 45 +- .../api/spell/APISpellHelper.java | 29 +- .../api/spell/ComplexSpellEffect.java | 87 +- .../api/spell/ComplexSpellModifier.java | 1 + .../api/spell/ComplexSpellType.java | 1 + .../api/spell/EntitySpellProjectile.java | 105 +- .../spell/ExtrapolatedMeleeEntityEffect.java | 2 + .../api/spell/IDigAreaEffect.java | 15 +- .../api/spell/IItemManipulator.java | 2 + .../api/spell/ILeftClickEffect.java | 1 + .../api/spell/IMeleeSpellEntityEffect.java | 1 + .../api/spell/IMeleeSpellWorldEffect.java | 1 + .../api/spell/IOnBanishTool.java | 1 + .../api/spell/IOnBreakBlock.java | 11 +- .../api/spell/IOnSummonTool.java | 1 + .../api/spell/IProjectileImpactEffect.java | 1 + .../api/spell/IProjectileUpdateEffect.java | 1 + .../api/spell/ISelfSpellEffect.java | 1 + .../api/spell/ISpecialDamageEffect.java | 1 + .../api/spell/IToolUpdateEffect.java | 1 + .../spell/MeleeSpellCenteredWorldEffect.java | 1 + .../api/spell/MeleeSpellWorldEffect.java | 1 + .../api/spell/ProjectileImpactEffect.java | 1 + .../api/spell/ProjectileUpdateEffect.java | 1 + .../api/spell/SelfSpellEffect.java | 1 + .../api/spell/SpellEffect.java | 665 ++--- .../api/spell/SpellEffectRegistry.java | 16 +- .../api/spell/SpellEnhancement.java | 1 + .../api/spell/SpellEnhancementCost.java | 1 + .../api/spell/SpellEnhancementPotency.java | 1 + .../api/spell/SpellEnhancementPower.java | 1 + .../api/spell/SpellParadigm.java | 2 + .../api/spell/SpellParadigmMelee.java | 5 +- .../api/spell/SpellParadigmProjectile.java | 5 +- .../api/spell/SpellParadigmSelf.java | 5 +- .../api/spell/SpellParadigmTool.java | 39 +- .../summoningRegistry/SummoningHelper.java | 1 + .../summoningRegistry/SummoningRegistry.java | 28 +- .../SummoningRegistryComponent.java | 12 +- .../api/tile/IBloodAltar.java | 6 +- .../api/tile/ISpellParadigmTile.java | 1 + .../api/tile/ISpellTile.java | 4 +- .../client/ClientEventHandler.java | 90 +- .../client/ClientProxy.java | 104 +- .../client/ClientUtils.java | 32 +- .../client/KeyBindings.java | 6 +- .../client/POVArmourModelWrapper.java | 23 +- .../client/gui/ConfigGui.java | 6 +- .../client/gui/ConfigGuiFactory.java | 4 +- .../client/nei/IMCForNEI.java | 4 +- .../client/nei/NEIAlchemyRecipeHandler.java | 23 +- .../client/nei/NEIAltarRecipeHandler.java | 31 +- .../client/nei/NEIBindingRitualHandler.java | 10 +- .../client/nei/NEIBloodOrbShapedHandler.java | 30 +- .../nei/NEIBloodOrbShapelessHandler.java | 33 +- .../client/nei/NEIConfig.java | 9 +- .../client/nei/NEIMeteorRecipeHandler.java | 39 +- .../client/nei/TooltipStack.java | 3 +- .../client/renderer/ColourThreshold.java | 5 +- .../client/renderer/HUDElement.java | 58 +- .../client/renderer/HUDUtils.java | 161 +- .../client/renderer/RenderFakeBlocks.java | 14 +- .../client/renderer/RenderHelper.java | 59 +- .../client/renderer/RitualDivinerRender.java | 50 +- .../common/AlchemicalWizardryEventHooks.java | 312 +- .../common/AlchemicalWizardryFuelHandler.java | 10 +- .../common/ArmourComponent.java | 1 + .../common/ClientToServerPacketHandler.java | 1 + .../common/CommonProxy.java | 108 +- .../common/CoordAndRange.java | 4 +- .../common/EntityAITargetAggro.java | 4 +- .../common/EntityAITargetAggroCloaking.java | 11 +- .../common/IBindingAgent.java | 1 + .../alchemicalWizardry/common/ICatalyst.java | 1 + .../alchemicalWizardry/common/IDemon.java | 1 + .../common/IFillingAgent.java | 1 + .../alchemicalWizardry/common/ItemType.java | 2 + .../common/LifeBucketHandler.java | 13 +- .../common/LifeEssence.java | 1 + .../common/MessageKeyPressed.java | 6 +- .../common/ModLivingDropsEvent.java | 13 +- .../common/NewPacketHandler.java | 133 +- .../common/PlinthComponent.java | 1 + .../achievements/AchievementTrigger.java | 10 +- .../common/achievements/AchievementsMod.java | 2 + .../achievements/AchievementsRegistry.java | 17 +- .../common/achievements/ModAchievements.java | 12 +- .../alchemy/CombinedPotionComponent.java | 1 + .../alchemy/CombinedPotionRegistry.java | 15 +- .../alchemy/ICombinationalCatalyst.java | 3 +- .../common/block/ArmourForge.java | 36 +- .../common/block/BlockAlchemicCalcinator.java | 18 +- .../common/block/BlockAltar.java | 26 +- .../common/block/BlockBelljar.java | 19 +- .../common/block/BlockBloodLightSource.java | 17 +- .../common/block/BlockConduit.java | 10 +- .../common/block/BlockCrucible.java | 38 +- .../common/block/BlockCrystal.java | 11 +- .../common/block/BlockDemonPortal.java | 14 +- .../common/block/BlockEnchantmentGlyph.java | 11 +- .../common/block/BlockHomHeart.java | 16 +- .../common/block/BlockMasterStone.java | 24 +- .../common/block/BlockOrientable.java | 10 +- .../common/block/BlockPedestal.java | 18 +- .../common/block/BlockPlinth.java | 18 +- .../common/block/BlockReagentConduit.java | 24 +- .../common/block/BlockSchematicSaver.java | 10 +- .../common/block/BlockSocket.java | 20 +- .../common/block/BlockSpectralContainer.java | 19 +- .../common/block/BlockSpellEffect.java | 11 +- .../common/block/BlockSpellEnhancement.java | 11 +- .../common/block/BlockSpellModifier.java | 11 +- .../common/block/BlockSpellParadigm.java | 17 +- .../common/block/BlockStabilityGlyph.java | 11 +- .../common/block/BlockTeleposer.java | 54 +- .../common/block/BlockWritingTable.java | 28 +- .../common/block/BloodRune.java | 11 +- .../common/block/BloodStoneBrick.java | 8 +- .../common/block/EfficiencyRune.java | 4 +- .../common/block/EmptySocket.java | 8 +- .../common/block/IOrientable.java | 1 + .../common/block/ImperfectRitualStone.java | 16 +- .../common/block/LargeBloodStoneBrick.java | 8 +- .../common/block/LifeEssenceBlock.java | 8 +- .../common/block/MimicBlock.java | 42 +- .../common/block/RitualStone.java | 16 +- .../common/block/RuneOfSacrifice.java | 4 +- .../common/block/RuneOfSelfSacrifice.java | 4 +- .../common/block/SpectralBlock.java | 33 +- .../common/block/SpeedRune.java | 4 +- .../bloodAltarUpgrade/AltarComponent.java | 1 + .../AltarUpgradeComponent.java | 1 + .../bloodAltarUpgrade/CompatChecks.java | 4 +- .../bloodAltarUpgrade/UpgradedAltars.java | 1114 ++++---- .../common/book/BloodMagicGuide.java | 771 ++--- .../common/commands/CommandBind.java | 7 +- .../common/commands/CommandBloodMagic.java | 25 +- .../common/commands/CommandSN.java | 14 +- .../common/commands/CommandUnbind.java | 6 +- .../common/commands/sub/SubCommandBind.java | 7 +- .../common/commands/sub/SubCommandHelp.java | 22 +- .../commands/sub/SubCommandNetwork.java | 29 +- .../common/commands/sub/SubCommandOrb.java | 15 +- .../compress/AdvancedCompressionHandler.java | 48 +- .../compress/BaseCompressionHandler.java | 7 +- .../compress/StorageBlockCraftingManager.java | 194 +- ...StorageBlockCraftingRecipeAssimilator.java | 24 +- .../common/demonVillage/BlockSet.java | 104 +- .../demonVillage/BuildingSchematic.java | 21 +- .../common/demonVillage/DemonBuilding.java | 20 +- .../common/demonVillage/DemonCrosspath.java | 1 + .../common/demonVillage/DemonVillagePath.java | 97 +- .../common/demonVillage/GridSpace.java | 1 + .../common/demonVillage/GridSpaceHolder.java | 23 +- .../common/demonVillage/TileBlockSet.java | 1 + .../ai/EntityAIOccasionalRangedAttack.java | 19 +- .../ai/EntityDemonAIHurtByTarget.java | 34 +- .../ai/IOccasionalRangedAttackMob.java | 1 + .../demonHoard/DemonHoardPacket.java | 15 +- .../demonHoard/DemonPacketMinorGrunt.java | 13 +- .../demonHoard/DemonPacketRegistry.java | 28 +- .../demon/EntityMinorDemonGrunt.java | 129 +- .../demon/EntityMinorDemonGruntEarth.java | 17 +- .../demon/EntityMinorDemonGruntFire.java | 6 +- .../demon/EntityMinorDemonGruntGuardian.java | 6 +- .../EntityMinorDemonGruntGuardianEarth.java | 17 +- .../EntityMinorDemonGruntGuardianFire.java | 6 +- .../EntityMinorDemonGruntGuardianIce.java | 6 +- .../EntityMinorDemonGruntGuardianWind.java | 13 +- .../demon/EntityMinorDemonGruntIce.java | 6 +- .../demon/EntityMinorDemonGruntWind.java | 13 +- .../demonHoard/demon/IHoardDemon.java | 1 + .../loot/DemonVillageLootRegistry.java | 11 +- .../tileEntity/BlockDemonChest.java | 4 +- .../tileEntity/IBlockPortalNode.java | 3 +- .../demonVillage/tileEntity/IRoadWard.java | 3 +- .../tileEntity/ITilePortalNode.java | 1 + .../demonVillage/tileEntity/TEDemonChest.java | 4 +- .../tileEntity/TEDemonPortal.java | 213 +- .../common/entity/mob/BookEntityItem.java | 4 +- .../common/entity/mob/EntityAirElemental.java | 11 +- .../common/entity/mob/EntityBileDemon.java | 27 +- .../common/entity/mob/EntityBoulderFist.java | 40 +- .../common/entity/mob/EntityDemon.java | 10 +- .../entity/mob/EntityEarthElemental.java | 4 +- .../common/entity/mob/EntityElemental.java | 44 +- .../common/entity/mob/EntityFallenAngel.java | 34 +- .../entity/mob/EntityFireElemental.java | 4 +- .../entity/mob/EntityHolyElemental.java | 4 +- .../common/entity/mob/EntityIceDemon.java | 34 +- .../entity/mob/EntityLowerGuardian.java | 29 +- .../common/entity/mob/EntityShade.java | 38 +- .../entity/mob/EntityShadeElemental.java | 4 +- .../entity/mob/EntitySmallEarthGolem.java | 38 +- .../entity/mob/EntityWaterElemental.java | 4 +- .../entity/mob/EntityWingedFireDemon.java | 34 +- .../entity/mob/MailOrderEntityItem.java | 26 +- .../projectile/EnergyBlastProjectile.java | 55 +- .../EntityBloodLightProjectile.java | 26 +- .../EntityEnergyBazookaMainProjectile.java | 32 +- ...ntityEnergyBazookaSecondaryProjectile.java | 73 +- .../entity/projectile/EntityMeteor.java | 22 +- .../entity/projectile/EntityParticleBeam.java | 41 +- .../projectile/ExplosionProjectile.java | 24 +- .../entity/projectile/FireProjectile.java | 28 +- .../entity/projectile/HolyProjectile.java | 29 +- .../entity/projectile/IceProjectile.java | 29 +- .../projectile/LightningBoltProjectile.java | 28 +- .../entity/projectile/MudProjectile.java | 31 +- .../entity/projectile/TeleportProjectile.java | 35 +- .../entity/projectile/WaterProjectile.java | 21 +- .../entity/projectile/WindGustProjectile.java | 29 +- .../common/guide/RecipeHolder.java | 11 +- .../harvest/AgriCraftCropHarvestHandler.java | 7 +- .../harvest/BloodMagicHarvestHandler.java | 8 +- .../harvest/CactusReedHarvestHandler.java | 4 +- .../GenericItemStackHarvestHandler.java | 4 +- ...GenericPamSeedlessFruitHarvestHandler.java | 6 +- .../harvest/GenericSeededHarvestHandler.java | 7 +- .../common/harvest/GourdHarvestHandler.java | 4 +- .../harvest/PamHarvestCompatRegistry.java | 7 +- .../common/items/AWBaseItems.java | 7 +- .../common/items/ActivationCrystal.java | 36 +- .../common/items/AirScribeTool.java | 4 +- .../common/items/ApprenticeBloodOrb.java | 4 +- .../common/items/ArchmageBloodOrb.java | 4 +- .../common/items/ArmourInhibitor.java | 17 +- .../common/items/BlankSpell.java | 29 +- .../common/items/BloodShard.java | 12 +- .../common/items/BoundAxe.java | 50 +- .../common/items/BoundPickaxe.java | 49 +- .../common/items/BoundShovel.java | 47 +- .../common/items/CheatyItem.java | 33 +- .../common/items/CreativeDagger.java | 12 +- .../common/items/DaggerOfSacrifice.java | 58 +- .../common/items/DawnScribeTool.java | 4 +- .../common/items/DemonPlacer.java | 64 +- .../items/DemonicTelepositionFocus.java | 21 +- .../common/items/DuskScribeTool.java | 4 +- .../common/items/EarthScribeTool.java | 4 +- .../common/items/EnergyBattery.java | 37 +- .../common/items/EnergyBazooka.java | 23 +- .../common/items/EnergyBlast.java | 23 +- .../common/items/EnergyItems.java | 29 +- .../common/items/EnergySword.java | 38 +- .../items/EnhancedTelepositionFocus.java | 21 +- .../common/items/FireScribeTool.java | 4 +- .../common/items/ItemAlchemyBase.java | 37 +- .../common/items/ItemBlockCrystalBelljar.java | 30 +- .../common/items/ItemBloodLetterPack.java | 17 +- .../common/items/ItemBloodRuneBlock.java | 1 + .../common/items/ItemComplexSpellCrystal.java | 29 +- .../common/items/ItemComponents.java | 50 +- .../common/items/ItemCrystalBlock.java | 1 + .../common/items/ItemDiabloKey.java | 31 +- .../items/ItemEnchantmentGlyphBlock.java | 1 + .../common/items/ItemIncense.java | 104 +- .../common/items/ItemMailOrderCatalogue.java | 10 +- .../common/items/ItemRitualDismantler.java | 55 +- .../common/items/ItemRitualDiviner.java | 182 +- .../common/items/ItemSpellEffectBlock.java | 1 + .../items/ItemSpellEnhancementBlock.java | 1 + .../common/items/ItemSpellModifierBlock.java | 1 + .../common/items/ItemSpellParadigmBlock.java | 1 + .../common/items/ItemStabilityGlyphBlock.java | 1 + .../common/items/LavaCrystal.java | 21 +- .../common/items/LifeBucket.java | 6 +- .../common/items/MagicianBloodOrb.java | 4 +- .../common/items/MasterBloodOrb.java | 4 +- .../common/items/OrbOfTesting.java | 6 +- .../items/ReinforcedTelepositionFocus.java | 21 +- .../common/items/SacrificialDagger.java | 25 +- .../common/items/ScribeTool.java | 10 +- .../common/items/TelepositionFocus.java | 23 +- .../common/items/TranscendentBloodOrb.java | 4 +- .../common/items/WaterScribeTool.java | 4 +- .../common/items/armour/BoundArmour.java | 80 +- .../common/items/armour/OmegaArmour.java | 26 +- .../common/items/armour/OmegaArmourEarth.java | 60 +- .../common/items/armour/OmegaArmourFire.java | 33 +- .../common/items/armour/OmegaArmourWater.java | 33 +- .../common/items/armour/OmegaArmourWind.java | 49 +- .../items/energy/ItemAttunedCrystal.java | 49 +- .../items/energy/ItemDestinationClearer.java | 13 +- .../items/energy/ItemTankSegmenter.java | 33 +- .../common/items/forestry/ItemBloodFrame.java | 18 +- .../common/items/potion/AlchemyFlask.java | 59 +- .../common/items/potion/AlchemyReagent.java | 26 +- .../potion/AverageLengtheningCatalyst.java | 4 +- .../items/potion/AveragePowerCatalyst.java | 4 +- .../items/potion/CombinationalCatalyst.java | 6 +- .../items/potion/EnhancedFillingAgent.java | 4 +- .../potion/GreaterLengtheningCatalyst.java | 4 +- .../items/potion/GreaterPowerCatalyst.java | 4 +- .../items/potion/LengtheningCatalyst.java | 22 +- .../potion/MundaneLengtheningCatalyst.java | 4 +- .../items/potion/MundanePowerCatalyst.java | 4 +- .../common/items/potion/PowerCatalyst.java | 22 +- .../items/potion/StandardBindingAgent.java | 26 +- .../items/potion/StandardFillingAgent.java | 4 +- .../common/items/potion/WeakBindingAgent.java | 4 +- .../common/items/potion/WeakFillingAgent.java | 26 +- .../items/routing/ILimitedRoutingFocus.java | 1 + .../items/routing/InputRoutingFocus.java | 4 +- .../items/routing/OutputRoutingFocus.java | 19 +- .../common/items/routing/RoutingFocus.java | 83 +- .../common/items/sigil/SigilAir.java | 24 +- .../common/items/sigil/SigilBloodLight.java | 39 +- .../common/items/sigil/SigilDivination.java | 63 +- .../common/items/sigil/SigilFluid.java | 112 +- .../common/items/sigil/SigilHarvest.java | 24 +- .../common/items/sigil/SigilLava.java | 73 +- .../items/sigil/SigilOfElementalAffinity.java | 18 +- .../items/sigil/SigilOfEnderSeverance.java | 26 +- .../common/items/sigil/SigilOfGrowth.java | 47 +- .../common/items/sigil/SigilOfHaste.java | 20 +- .../common/items/sigil/SigilOfMagnetism.java | 49 +- .../common/items/sigil/SigilOfSupression.java | 24 +- .../items/sigil/SigilOfTheAssassin.java | 160 +- .../common/items/sigil/SigilOfTheBridge.java | 34 +- .../items/sigil/SigilOfTheFastMiner.java | 20 +- .../common/items/sigil/SigilOfWind.java | 20 +- .../common/items/sigil/SigilPackRat.java | 34 +- .../common/items/sigil/SigilSeer.java | 22 +- .../common/items/sigil/SigilVoid.java | 39 +- .../common/items/sigil/SigilWater.java | 113 +- .../items/sigil/holding/ContainerHolding.java | 29 +- .../items/sigil/holding/GuiHolding.java | 7 +- .../sigil/holding/HoldingPacketHandler.java | 1 + .../sigil/holding/HoldingPacketProcessor.java | 4 +- .../items/sigil/holding/InventoryHolding.java | 5 +- .../items/sigil/holding/ScrollHelper.java | 8 +- .../items/sigil/holding/SigilOfHolding.java | 53 +- .../items/thaumcraft/ItemSanguineArmour.java | 13 +- .../common/omega/IEnchantmentGlyph.java | 1 + .../common/omega/IStabilityGlyph.java | 1 + .../common/omega/OmegaParadigm.java | 65 +- .../common/omega/OmegaParadigmEarth.java | 16 +- .../common/omega/OmegaParadigmFire.java | 6 +- .../common/omega/OmegaParadigmWater.java | 19 +- .../common/omega/OmegaParadigmWind.java | 9 +- .../common/omega/OmegaRegistry.java | 7 +- .../common/omega/OmegaStructureHandler.java | 40 +- .../omega/OmegaStructureParameters.java | 1 + .../omega/ReagentRegenConfiguration.java | 1 + .../common/potion/PotionAmphibian.java | 1 + .../common/potion/PotionBoost.java | 1 + .../common/potion/PotionDeaf.java | 1 + .../common/potion/PotionDemonCloak.java | 1 + .../common/potion/PotionDrowning.java | 1 + .../common/potion/PotionFeatherFall.java | 1 + .../common/potion/PotionFireFuse.java | 1 + .../common/potion/PotionFlameCloak.java | 1 + .../common/potion/PotionFlight.java | 1 + .../common/potion/PotionHeavyHeart.java | 1 + .../common/potion/PotionIceCloak.java | 1 + .../common/potion/PotionInhibit.java | 1 + .../common/potion/PotionPlanarBinding.java | 1 + .../potion/PotionProjectileProtect.java | 1 + .../common/potion/PotionReciprocation.java | 1 + .../common/potion/PotionSoulFray.java | 2 + .../common/potion/PotionSoulHarden.java | 1 + .../renderer/AlchemyCircleRenderer.java | 33 +- .../common/renderer/BeamRenderer.java | 5 +- .../block/RenderAlchemicCalcinator.java | 30 +- .../common/renderer/block/RenderConduit.java | 9 +- .../renderer/block/RenderCrystalBelljar.java | 21 +- .../renderer/block/RenderMasterStone.java | 6 +- .../common/renderer/block/RenderPedestal.java | 20 +- .../common/renderer/block/RenderPlinth.java | 24 +- .../renderer/block/RenderReagentConduit.java | 11 +- .../block/RenderSpellEffectBlock.java | 15 +- .../block/RenderSpellEnhancementBlock.java | 15 +- .../block/RenderSpellModifierBlock.java | 15 +- .../block/RenderSpellParadigmBlock.java | 15 +- .../renderer/block/RenderWritingTable.java | 20 +- .../renderer/block/TEAltarRenderer.java | 12 +- .../TEAlchemicalCalcinatorItemRenderer.java | 11 +- .../block/itemRender/TEAltarItemRenderer.java | 7 +- .../itemRender/TEBellJarItemRenderer.java | 27 +- .../itemRender/TEConduitItemRenderer.java | 15 +- .../TESpellEffectBlockItemRenderer.java | 15 +- .../TESpellEnhancementBlockItemRenderer.java | 15 +- .../TESpellModifierBlockItemRenderer.java | 15 +- .../TESpellParadigmBlockItemRenderer.java | 15 +- .../TEWritingTableItemRenderer.java | 7 +- .../common/renderer/mob/RenderBileDemon.java | 9 +- .../renderer/mob/RenderBoulderFist.java | 9 +- .../common/renderer/mob/RenderElemental.java | 34 +- .../renderer/mob/RenderFallenAngel.java | 13 +- .../common/renderer/mob/RenderIceDemon.java | 9 +- .../renderer/mob/RenderLowerGuardian.java | 9 +- .../renderer/mob/RenderMinorDemonGrunt.java | 35 +- .../mob/RenderMinorDemonGruntGuardian.java | 35 +- .../common/renderer/mob/RenderShade.java | 9 +- .../renderer/mob/RenderSmallEarthGolem.java | 9 +- .../renderer/mob/RenderWingedFireDemon.java | 9 +- .../model/ModelAlchemicalCalcinator.java | 1 + .../common/renderer/model/ModelBileDemon.java | 2 + .../renderer/model/ModelBloodAltar.java | 17 +- .../renderer/model/ModelBoulderFist.java | 1 + .../common/renderer/model/ModelConduit.java | 11 +- .../renderer/model/ModelCrystalBelljar.java | 1 + .../common/renderer/model/ModelElemental.java | 1 + .../ModelEnergyBazookaMainProjectile.java | 1 + .../renderer/model/ModelFallenAngel.java | 1 + .../common/renderer/model/ModelIceDemon.java | 1 + .../renderer/model/ModelLowerGuardian.java | 4 +- .../common/renderer/model/ModelMeteor.java | 1 + .../renderer/model/ModelMinorDemonGrunt.java | 1 + .../model/ModelMinorDemonGruntGuardian.java | 1 + .../renderer/model/ModelOmegaArmour.java | 223 +- .../renderer/model/ModelOmegaEarth.java | 3 +- .../common/renderer/model/ModelOmegaFire.java | 4 +- .../renderer/model/ModelOmegaWater.java | 1 + .../common/renderer/model/ModelOmegaWind.java | 4 +- .../common/renderer/model/ModelPedestal.java | 1 + .../common/renderer/model/ModelPlinth.java | 1 + .../common/renderer/model/ModelShade.java | 1 + .../renderer/model/ModelSmallEarthGolem.java | 1 + .../renderer/model/ModelSpellEffectBlock.java | 11 +- .../model/ModelSpellEnhancementBlock.java | 11 +- .../model/ModelSpellModifierBlock.java | 11 +- .../model/ModelSpellParadigmBlock.java | 11 +- .../renderer/model/ModelWingedFireDemon.java | 1 + .../renderer/model/ModelWritingTable.java | 1 + .../RenderEnergyBazookaMainProjectile.java | 10 +- .../RenderEnergyBlastProjectile.java | 13 +- .../projectile/RenderFireProjectile.java | 60 +- .../renderer/projectile/RenderMeteor.java | 10 +- .../common/rituals/LocalStorageAlphaPact.java | 6 +- .../common/rituals/RitualEffectAlphaPact.java | 29 +- .../rituals/RitualEffectAnimalGrowth.java | 27 +- .../rituals/RitualEffectApiaryOverclock.java | 13 +- .../rituals/RitualEffectAutoAlchemy.java | 95 +- .../common/rituals/RitualEffectBinding.java | 37 +- .../rituals/RitualEffectBiomeChanger.java | 27 +- .../rituals/RitualEffectContainment.java | 33 +- .../common/rituals/RitualEffectCrafting.java | 74 +- .../common/rituals/RitualEffectCrushing.java | 65 +- .../rituals/RitualEffectDemonPortal.java | 71 +- .../common/rituals/RitualEffectEllipsoid.java | 31 +- .../rituals/RitualEffectEvaporation.java | 19 +- .../common/rituals/RitualEffectExpulsion.java | 74 +- .../rituals/RitualEffectFeatheredEarth.java | 19 +- .../rituals/RitualEffectFeatheredKnife.java | 20 +- .../common/rituals/RitualEffectFlight.java | 19 +- .../rituals/RitualEffectFullStomach.java | 18 +- .../common/rituals/RitualEffectGrowth.java | 40 +- .../common/rituals/RitualEffectHarvest.java | 19 +- .../common/rituals/RitualEffectHealing.java | 44 +- .../rituals/RitualEffectInterdiction.java | 30 +- .../rituals/RitualEffectItemRouting.java | 68 +- .../rituals/RitualEffectItemSuction.java | 27 +- .../common/rituals/RitualEffectJumping.java | 24 +- .../common/rituals/RitualEffectLava.java | 36 +- .../common/rituals/RitualEffectLeap.java | 27 +- .../rituals/RitualEffectLifeConduit.java | 17 +- .../common/rituals/RitualEffectMagnetic.java | 44 +- .../rituals/RitualEffectOmegaStalling.java | 23 +- .../common/rituals/RitualEffectOmegaTest.java | 48 +- .../common/rituals/RitualEffectSpawnWard.java | 11 +- .../rituals/RitualEffectSphereCreator.java | 33 +- .../rituals/RitualEffectSummonMeteor.java | 22 +- .../rituals/RitualEffectSupression.java | 27 +- .../common/rituals/RitualEffectUnbinding.java | 49 +- .../rituals/RitualEffectVeilOfEvil.java | 11 +- .../common/rituals/RitualEffectWater.java | 57 +- .../rituals/RitualEffectWellOfSuffering.java | 32 +- .../routing/RoutingFocusLogicIgnMeta.java | 4 +- .../routing/RoutingFocusLogicLimit.java | 1 + .../RoutingFocusLogicLimitDefault.java | 4 +- .../routing/RoutingFocusLogicLimitGlobal.java | 4 +- .../RoutingFocusLogicLimitIgnMeta.java | 4 +- .../RoutingFocusLogicLimitMatchNBT.java | 4 +- .../RoutingFocusLogicLimitModItems.java | 4 +- .../routing/RoutingFocusLogicMatchNBT.java | 16 +- .../routing/RoutingFocusLogicModItems.java | 6 +- .../effect/OutputRoutingFocusModItems.java | 1 + .../spell/complex/effect/SpellHelper.java | 214 +- .../cse/earth/CSEMeleeDefaultEarth.java | 9 +- .../cse/earth/CSEMeleeDefensiveEarth.java | 9 +- .../cse/earth/CSEMeleeEnvironmentalEarth.java | 9 +- .../cse/earth/CSEMeleeOffensiveEarth.java | 9 +- .../cse/earth/CSEProjectileDefaultEarth.java | 6 +- .../earth/CSEProjectileDefensiveEarth.java | 9 +- .../CSEProjectileEnvironmentalEarth.java | 12 +- .../earth/CSEProjectileOffensiveEarth.java | 9 +- .../effect/cse/earth/CSESelfDefaultEarth.java | 9 +- .../cse/earth/CSESelfDefensiveEarth.java | 9 +- .../cse/earth/CSESelfEnvironmentalEarth.java | 9 +- .../cse/earth/CSESelfOffensiveEarth.java | 9 +- .../effect/cse/earth/CSEToolDefaultEarth.java | 4 +- .../cse/earth/CSEToolDefensiveEarth.java | 4 +- .../cse/earth/CSEToolEnvironmentalEarth.java | 9 +- .../cse/earth/CSEToolOffensiveEarth.java | 6 +- .../effect/cse/fire/CSEMeleeDefaultFire.java | 4 +- .../cse/fire/CSEMeleeDefensiveFire.java | 6 +- .../cse/fire/CSEMeleeEnvironmentalFire.java | 4 +- .../cse/fire/CSEMeleeOffensiveFire.java | 6 +- .../cse/fire/CSEProjectileDefaultFire.java | 4 +- .../cse/fire/CSEProjectileDefensiveFire.java | 9 +- .../fire/CSEProjectileEnvironmentalFire.java | 9 +- .../cse/fire/CSEProjectileOffensiveFire.java | 9 +- .../effect/cse/fire/CSESelfDefaultFire.java | 7 +- .../effect/cse/fire/CSESelfDefensiveFire.java | 4 +- .../cse/fire/CSESelfEnvironmentalFire.java | 6 +- .../effect/cse/fire/CSESelfOffensiveFire.java | 6 +- .../effect/cse/fire/CSEToolDefaultFire.java | 6 +- .../effect/cse/fire/CSEToolDefensiveFire.java | 10 +- .../cse/fire/CSEToolEnvironmentalFire.java | 12 +- .../effect/cse/fire/CSEToolOffensiveFire.java | 15 +- .../effect/cse/ice/CSEMeleeDefaultIce.java | 6 +- .../effect/cse/ice/CSEMeleeDefensiveIce.java | 9 +- .../cse/ice/CSEMeleeEnvironmentalIce.java | 14 +- .../effect/cse/ice/CSEMeleeOffensiveIce.java | 9 +- .../cse/ice/CSEProjectileDefaultIce.java | 6 +- .../cse/ice/CSEProjectileDefensiveIce.java | 9 +- .../ice/CSEProjectileEnvironmentalIce.java | 12 +- .../cse/ice/CSEProjectileOffensiveIce.java | 9 +- .../effect/cse/ice/CSESelfDefaultIce.java | 6 +- .../effect/cse/ice/CSESelfDefensiveIce.java | 11 +- .../cse/ice/CSESelfEnvironmentalIce.java | 11 +- .../effect/cse/ice/CSESelfOffensiveIce.java | 9 +- .../effect/cse/ice/CSEToolDefaultIce.java | 16 +- .../effect/cse/ice/CSEToolDefensiveIce.java | 9 +- .../cse/ice/CSEToolEnvironmentalIce.java | 8 +- .../effect/cse/ice/CSEToolOffensiveIce.java | 10 +- .../effect/cse/wind/CSEMeleeDefaultWind.java | 9 +- .../cse/wind/CSEMeleeDefensiveWind.java | 9 +- .../cse/wind/CSEMeleeEnvironmentalWind.java | 9 +- .../cse/wind/CSEMeleeOffensiveWind.java | 9 +- .../cse/wind/CSEProjectileDefaultWind.java | 6 +- .../cse/wind/CSEProjectileDefensiveWind.java | 1 + .../wind/CSEProjectileEnvironmentalWind.java | 14 +- .../cse/wind/CSEProjectileOffensiveWind.java | 9 +- .../effect/cse/wind/CSESelfDefaultWind.java | 6 +- .../effect/cse/wind/CSESelfDefensiveWind.java | 9 +- .../cse/wind/CSESelfEnvironmentalWind.java | 9 +- .../effect/cse/wind/CSESelfOffensiveWind.java | 6 +- .../effect/cse/wind/CSEToolDefaultWind.java | 4 +- .../effect/cse/wind/CSEToolDefensiveWind.java | 15 +- .../cse/wind/CSEToolEnvironmentalWind.java | 6 +- .../effect/cse/wind/CSEToolOffensiveWind.java | 6 +- .../earth/MeleeDefaultEarth.java | 11 +- .../earth/MeleeDefensiveEarth.java | 12 +- .../earth/MeleeEnvironmentalEarth.java | 6 +- .../earth/MeleeOffensiveEarth.java | 6 +- .../earth/ProjectileDefaultEarth.java | 9 +- .../earth/ProjectileDefensiveEarth.java | 6 +- .../earth/ProjectileEnvironmentalEarth.java | 34 +- .../earth/ProjectileOffensiveEarth.java | 9 +- .../impactEffects/earth/SelfDefaultEarth.java | 11 +- .../earth/SelfDefensiveEarth.java | 5 +- .../earth/SelfEnvironmentalEarth.java | 11 +- .../earth/SelfOffensiveEarth.java | 6 +- .../earth/ToolEnvironmentalEarth.java | 17 +- .../earth/ToolOffensiveEarth.java | 12 +- .../impactEffects/fire/MeleeDefaultFire.java | 4 +- .../fire/MeleeDefensiveFire.java | 6 +- .../fire/MeleeEnvironmentalFire.java | 6 +- .../fire/MeleeOffensiveFire.java | 10 +- .../fire/ProjectileDefaultFire.java | 6 +- .../fire/ProjectileDefensiveFire.java | 6 +- .../fire/ProjectileEnvironmentalFire.java | 6 +- .../fire/ProjectileOffensiveFire.java | 6 +- .../impactEffects/fire/SelfDefaultFire.java | 4 +- .../impactEffects/fire/SelfDefensiveFire.java | 5 +- .../fire/SelfEnvironmentalFire.java | 6 +- .../impactEffects/fire/SelfOffensiveFire.java | 15 +- .../impactEffects/fire/ToolDefaultFire.java | 5 +- .../fire/ToolEnvironmentalFire.java | 20 +- .../impactEffects/fire/ToolOffensiveFire.java | 4 +- .../impactEffects/ice/MeleeDefaultIce.java | 4 +- .../impactEffects/ice/MeleeDefensiveIce.java | 6 +- .../ice/MeleeEnvironmentalIce.java | 9 +- .../impactEffects/ice/MeleeOffensiveIce.java | 6 +- .../ice/ProjectileDefaultIce.java | 4 +- .../ice/ProjectileDefensiveIce.java | 6 +- .../ice/ProjectileEnvironmentalIce.java | 5 +- .../ice/ProjectileOffensiveIce.java | 9 +- .../impactEffects/ice/SelfDefaultIce.java | 6 +- .../impactEffects/ice/SelfDefensiveIce.java | 13 +- .../ice/SelfEnvironmentalIce.java | 10 +- .../impactEffects/ice/SelfOffensiveIce.java | 16 +- .../impactEffects/ice/ToolDefaultIce.java | 4 +- .../impactEffects/ice/ToolDefensiveIce.java | 11 +- .../impactEffects/tool/DigAreaEffect.java | 41 +- .../impactEffects/tool/DigAreaTunnel.java | 30 +- .../impactEffects/tool/ItemManipulator.java | 5 +- .../impactEffects/tool/LeftClickEffect.java | 4 +- .../tool/OnBreakBlockEffect.java | 1 + .../impactEffects/tool/RightClickEffect.java | 1 + .../impactEffects/tool/RightClickTunnel.java | 15 +- .../impactEffects/tool/SummonToolEffect.java | 1 + .../impactEffects/wind/MeleeDefaultWind.java | 4 +- .../wind/MeleeDefensiveWind.java | 4 +- .../wind/MeleeEnvironmentalWind.java | 7 +- .../wind/MeleeOffensiveWind.java | 4 +- .../wind/ProjectileDefaultWind.java | 4 +- .../wind/ProjectileEnvironmentalWind.java | 16 +- .../wind/ProjectileOffensiveWind.java | 10 +- .../impactEffects/wind/SelfDefaultWind.java | 4 +- .../impactEffects/wind/SelfDefensiveWind.java | 14 +- .../wind/SelfEnvironmentalWind.java | 7 +- .../impactEffects/wind/SelfOffensiveWind.java | 11 +- .../impactEffects/wind/ToolDefensiveWind.java | 4 +- .../wind/ToolEnvironmentalWind.java | 23 +- .../impactEffects/wind/ToolOffensiveWind.java | 15 +- .../common/spell/simple/HomSpell.java | 41 +- .../spell/simple/HomSpellComponent.java | 1 + .../common/spell/simple/HomSpellRegistry.java | 2 + .../common/spell/simple/ISimpleSpell.java | 1 + .../common/spell/simple/SpellEarthBender.java | 66 +- .../common/spell/simple/SpellExplosions.java | 27 +- .../common/spell/simple/SpellFireBurst.java | 61 +- .../common/spell/simple/SpellFrozenWater.java | 48 +- .../common/spell/simple/SpellHolyBlast.java | 76 +- .../spell/simple/SpellLightningBolt.java | 40 +- .../common/spell/simple/SpellTeleport.java | 70 +- .../common/spell/simple/SpellWateryGrave.java | 65 +- .../common/spell/simple/SpellWindGust.java | 55 +- .../summoning/SummoningFallenAngel.java | 6 +- .../common/summoning/SummoningHelperAW.java | 8 +- .../common/summoning/meteor/Meteor.java | 14 +- .../summoning/meteor/MeteorParadigm.java | 40 +- .../meteor/MeteorParadigmComponent.java | 2 + .../summoning/meteor/MeteorRegistry.java | 5 +- .../tileEntity/TEAlchemicCalcinator.java | 27 +- .../common/tileEntity/TEAltar.java | 149 +- .../common/tileEntity/TEBellJar.java | 13 +- .../common/tileEntity/TEConduit.java | 4 +- .../common/tileEntity/TECrucible.java | 17 +- .../common/tileEntity/TEHomHeart.java | 6 +- .../common/tileEntity/TEInventory.java | 1 + .../common/tileEntity/TEMasterStone.java | 72 +- .../common/tileEntity/TEMimicBlock.java | 50 +- .../common/tileEntity/TEOrientable.java | 6 +- .../common/tileEntity/TEPedestal.java | 23 +- .../common/tileEntity/TEPlinth.java | 87 +- .../common/tileEntity/TEReagentConduit.java | 55 +- .../common/tileEntity/TESchematicSaver.java | 14 +- .../common/tileEntity/TESocket.java | 12 +- .../common/tileEntity/TESpectralBlock.java | 8 +- .../tileEntity/TESpectralContainer.java | 4 +- .../common/tileEntity/TESpellBlock.java | 6 +- .../common/tileEntity/TESpellEffectBlock.java | 1 + .../tileEntity/TESpellEnhancementBlock.java | 3 +- .../tileEntity/TESpellModifierBlock.java | 1 + .../tileEntity/TESpellParadigmBlock.java | 10 +- .../common/tileEntity/TETeleposer.java | 54 +- .../common/tileEntity/TEWritingTable.java | 121 +- .../tileEntity/container/ContainerAltar.java | 4 +- .../container/ContainerTeleposer.java | 7 +- .../container/ContainerWritingTable.java | 6 +- .../common/tileEntity/gui/GuiHandler.java | 8 +- .../common/tileEntity/gui/GuiTeleposer.java | 7 +- .../tileEntity/gui/GuiWritingTable.java | 7 +- .../common/tweaker/Alchemy.java | 19 +- .../common/tweaker/Binding.java | 15 +- .../common/tweaker/BloodAltar.java | 23 +- .../common/tweaker/BloodOrb.java | 10 +- .../common/tweaker/FallingTower.java | 12 +- .../common/tweaker/HarvestMoon.java | 12 +- .../common/tweaker/MTHelper.java | 5 +- .../tweaker/MineTweakerIntegration.java | 2 + 790 files changed, 11316 insertions(+), 9692 deletions(-) diff --git a/src/api/java/pneumaticCraft/api/IHeatExchangerLogic.java b/src/api/java/pneumaticCraft/api/IHeatExchangerLogic.java index 30e3ee3e..a97a18bc 100644 --- a/src/api/java/pneumaticCraft/api/IHeatExchangerLogic.java +++ b/src/api/java/pneumaticCraft/api/IHeatExchangerLogic.java @@ -6,8 +6,8 @@ import net.minecraftforge.common.util.ForgeDirection; /** * DO NOT IMPLEMENT THIS CLASS YOURSELF! Use PneumaticRegistry.getInstance().getHeatExchangerLogic() ! - * @author MineMaarten - * www.minemaarten.com + * + * @author MineMaarten www.minemaarten.com */ public interface IHeatExchangerLogic { @@ -17,22 +17,26 @@ public interface IHeatExchangerLogic { public void update(); /** - * When called (preferably on tile entity load and neighbor block/tile entity change) this will add all IHeatExchanger neighbor TileEntities as connected heat exchangers. - * It will also take care of blocks like Lava. + * When called (preferably on tile entity load and neighbor block/tile entity change) this will add all + * IHeatExchanger neighbor TileEntities as connected heat exchangers. It will also take care of blocks like Lava. * - * You don't _have_ to call this method, if this heat exchanger is not connected to the outside world (for example the heat of the liquid - * plastic in the Plastic Mixer). + * You don't _have_ to call this method, if this heat exchanger is not connected to the outside world (for example + * the heat of the liquid plastic in the Plastic Mixer). + * * @param world * @param x * @param y * @param z - * @param validSides Can be left out as vararg, meaning every side can be connected. When one or more sides are specified this will constrain - * this heat exchanger to only connect to other heat exchangers on these sides. + * @param validSides Can be left out as vararg, meaning every side can be connected. When one or more sides are + * specified this will constrain this heat exchanger to only connect to other heat exchangers on + * these sides. */ public void initializeAsHull(World world, int x, int y, int z, ForgeDirection... validSides); /** - * When called, this will connect these two heat exchangers. You should only call this on one of the two heat exchangers. + * When called, this will connect these two heat exchangers. You should only call this on one of the two heat + * exchangers. + * * @param exchanger */ public void addConnectedExchanger(IHeatExchangerLogic exchanger); @@ -41,6 +45,7 @@ public interface IHeatExchangerLogic { /** * A heat exchanger starts with 295 degrees Kelvin (20 degrees Celcius) by default. + * * @param temperature in degrees Kelvin */ public void setTemperature(double temperature); @@ -49,6 +54,7 @@ public interface IHeatExchangerLogic { /** * The higher the thermal resistance, the slower the heat disperses. + * * @param thermalResistance By default it's 1. */ public void setThermalResistance(double thermalResistance); @@ -56,8 +62,9 @@ public interface IHeatExchangerLogic { public double getThermalResistance(); /** - * The higher the capacity, the more heat can be 'stored'. This means that an object with a high capacity can heat up an object with a lower - * capacity without losing any significant amount of temperature. + * The higher the capacity, the more heat can be 'stored'. This means that an object with a high capacity can heat + * up an object with a lower capacity without losing any significant amount of temperature. + * * @param capacity */ public void setThermalCapacity(double capacity); @@ -70,6 +77,7 @@ public interface IHeatExchangerLogic { /** * Adds heat (= deltaT * Thermal Capacity) to this exchanger. negative values will remove heat. + * * @param amount */ public void addHeat(double amount); diff --git a/src/api/java/pneumaticCraft/api/PneumaticRegistry.java b/src/api/java/pneumaticCraft/api/PneumaticRegistry.java index 996a582d..a140db9d 100644 --- a/src/api/java/pneumaticCraft/api/PneumaticRegistry.java +++ b/src/api/java/pneumaticCraft/api/PneumaticRegistry.java @@ -1,6 +1,7 @@ package pneumaticCraft.api; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityCreature; @@ -8,6 +9,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.fluids.Fluid; + import pneumaticCraft.api.client.pneumaticHelmet.IBlockTrackEntry; import pneumaticCraft.api.client.pneumaticHelmet.IEntityTrackEntry; import pneumaticCraft.api.client.pneumaticHelmet.IHackableBlock; @@ -20,8 +22,11 @@ import pneumaticCraft.api.item.IInventoryItem; * This class can be used to register and access various things to and from the mod. */ public class PneumaticRegistry { + /** - * This field, which is initialized in PneumaticCraft's preInit, will give you access to various registration and access options. + * This field, which is initialized in PneumaticCraft's preInit, will give you access to various registration and + * access options. + * * @deprecated This field isn't going to be removed, but it'll be marked private. use getInstance(). */ @Deprecated @@ -50,8 +55,10 @@ public class PneumaticRegistry { public void addHackable(Block block, Class iHackable); /** - * Returns a list of all current successful hacks of a given entity. This is used for example in Enderman hacking, so the user - * can only hack an enderman once (more times wouldn't have any effect). This is mostly used for display purposes. + * Returns a list of all current successful hacks of a given entity. This is used for example in Enderman + * hacking, so the user can only hack an enderman once (more times wouldn't have any effect). This is mostly + * used for display purposes. + * * @param entity * @return empty list if no hacks. */ @@ -62,9 +69,11 @@ public class PneumaticRegistry { */ /** - * Normally drones will pathfind through any block that doesn't have any collisions (Block#getBlocksMovement returns true). - * With this method you can register custom blocks to allow the drone to pathfind through them. If the block requires any special - * handling, like allow pathfinding on certain conditions, you can pass a IPathFindHandler with the registry. + * Normally drones will pathfind through any block that doesn't have any collisions (Block#getBlocksMovement + * returns true). With this method you can register custom blocks to allow the drone to pathfind through them. + * If the block requires any special handling, like allow pathfinding on certain conditions, you can pass a + * IPathFindHandler with the registry. + * * @param block * @param handler can be null, to always allow pathfinding through this block. */ @@ -73,23 +82,26 @@ public class PneumaticRegistry { /** * This will add a puzzle piece that has only a Area white- and blacklist parameter (similar to a GoTo piece). * It will do the specified behaviour. This can be used to create energy import/export widgets. + * * @param interactor */ public void registerCustomBlockInteractor(ICustomBlockInteract interactor); /** - * Will spawn in a Drone a distance away from the given coordinate. The drone is programmed to travel to go to 5 blocks above the specified - * y level, and drop the deliveredStacks. When there isn't a clear path for the items to fall these 5 blocks the Drone will deliver at a - * y level above the specified y that _is_ clear. If no clear blocks can be found (when there are only solid blocks), the Drone will - * drop the items very high up in the air instead, and drop them there. + * Will spawn in a Drone a distance away from the given coordinate. The drone is programmed to travel to go to 5 + * blocks above the specified y level, and drop the deliveredStacks. When there isn't a clear path for the items + * to fall these 5 blocks the Drone will deliver at a y level above the specified y that _is_ clear. If no clear + * blocks can be found (when there are only solid blocks), the Drone will drop the items very high up in the air + * instead, and drop them there. * - * When the Drone is tried to be catched by a player (by wrenching it), the drone will only the drop the items that it was delivering (or - * none if it dropped those items already). The Drone itself never will be dropped. + * When the Drone is tried to be catched by a player (by wrenching it), the drone will only the drop the items + * that it was delivering (or none if it dropped those items already). The Drone itself never will be dropped. * * @param x * @param y * @param z - * @param deliveredStacks stacks that are delivered by the drone. When no stacks, or more than 65 stacks are given, this will generate a IllegalArgumentException. + * @param deliveredStacks stacks that are delivered by the drone. When no stacks, or more than 65 stacks are + * given, this will generate a IllegalArgumentException. * @return the drone. You can use this to set a custom name for example (defaults to "Amazon Delivery Drone"). */ public EntityCreature deliverItemsAmazonStyle(World world, int x, int y, int z, ItemStack... deliveredStacks); @@ -99,6 +111,7 @@ public class PneumaticRegistry { */ /** * See {@link pneumaticCraft.api.item.IInventoryItem} + * * @param handler */ public void registerInventoryItem(IInventoryItem handler); @@ -116,8 +129,10 @@ public class PneumaticRegistry { /** * Adds a burnable liquid to the Liquid Compressor's available burnable fuels. + * * @param fluid - * @param mLPerBucket the amount of mL generated for 1000mB of the fuel. As comparison, one piece of coal generates 16000mL in an Air Compressor. + * @param mLPerBucket the amount of mL generated for 1000mB of the fuel. As comparison, one piece of coal + * generates 16000mL in an Air Compressor. */ public void registerFuel(Fluid fluid, int mLPerBucket); @@ -126,31 +141,37 @@ public class PneumaticRegistry { */ /** - * Returns the amount of Security Stations that disallow interaction with the given coordinate for the given player. - * Usually you'd disallow interaction when this returns > 0. + * Returns the amount of Security Stations that disallow interaction with the given coordinate for the given + * player. Usually you'd disallow interaction when this returns > 0. + * * @param world * @param x * @param y * @param z * @param player - * @param showRangeLines When true, any Security Station that prevents interaction will show the line grid (server --> client update is handled internally). - * @return The amount of Security Stations that disallow interaction for the given player. - * This method throws an IllegalArgumentException when tried to be called from the client side! + * @param showRangeLines When true, any Security Station that prevents interaction will show the line grid + * (server --> client update is handled internally). + * @return The amount of Security Stations that disallow interaction for the given player. This method throws an + * IllegalArgumentException when tried to be called from the client side! */ - public int getProtectingSecurityStations( - World world, int x, int y, int z, EntityPlayer player, boolean showRangeLines); + public int getProtectingSecurityStations(World world, int x, int y, int z, EntityPlayer player, + boolean showRangeLines); /** - * Use this to register ISimpleBlockRenderHandler render id's of full blocks, those of which should be able to be used for the Pneumatic Door Base camouflage. + * Use this to register ISimpleBlockRenderHandler render id's of full blocks, those of which should be able to + * be used for the Pneumatic Door Base camouflage. + * * @param id */ public void registerConcealableRenderId(int id); /** - * Used to register a liquid that represents liquid XP (like MFR mob essence, OpenBlocks liquid XP). - * This is used in the Aerial Interface to pump XP in/out of the player. + * Used to register a liquid that represents liquid XP (like MFR mob essence, OpenBlocks liquid XP). This is + * used in the Aerial Interface to pump XP in/out of the player. + * * @param fluid - * @param liquidToPointRatio The amount of liquid (in mB) used to get one XP point. In OpenBlocks this is 20 (mB/point). + * @param liquidToPointRatio The amount of liquid (in mB) used to get one XP point. In OpenBlocks this is 20 + * (mB/point). */ public void registerXPLiquid(Fluid fluid, int liquidToPointRatio); } diff --git a/src/api/java/pneumaticCraft/api/actuator/IActuator.java b/src/api/java/pneumaticCraft/api/actuator/IActuator.java index 56661193..edfdb8aa 100644 --- a/src/api/java/pneumaticCraft/api/actuator/IActuator.java +++ b/src/api/java/pneumaticCraft/api/actuator/IActuator.java @@ -1,24 +1,29 @@ package pneumaticCraft.api.actuator; import java.util.List; + import net.minecraft.tileentity.TileEntity; public interface IActuator { + /** * Same as {@link pneumaticCraft.api.universalSensor.ISensorSetting#getSensorPath()} + * * @return */ public String getSensorPath(); /** * When returned true, the GUI will enable the textbox writing, otherwise not. + * * @return */ public boolean needsTextBox(); /** - * Should return the description of this sensor displayed in the GUI stat. Information should at least include - * when this sensor emits redstone and how (analog (1 through 15), or digital). + * Should return the description of this sensor displayed in the GUI stat. Information should at least include when + * this sensor emits redstone and how (analog (1 through 15), or digital). + * * @return */ public List getDescription(); diff --git a/src/api/java/pneumaticCraft/api/block/BlockSupplier.java b/src/api/java/pneumaticCraft/api/block/BlockSupplier.java index 7f870e89..07489973 100644 --- a/src/api/java/pneumaticCraft/api/block/BlockSupplier.java +++ b/src/api/java/pneumaticCraft/api/block/BlockSupplier.java @@ -1,8 +1,9 @@ package pneumaticCraft.api.block; -import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; +import cpw.mods.fml.common.registry.GameRegistry; + public class BlockSupplier { // private static Class blockClass; @@ -12,66 +13,22 @@ public class BlockSupplier { */ public static Block getBlock(String blockName) { return GameRegistry.findBlock("PneumaticCraft", blockName); - /*try { - if(blockClass == null) blockClass = Class.forName("pneumaticCraft.common.block.Blockss"); - return (Block)blockClass.getField(blockName).get(null); - } catch(Exception e) { - System.err.println("[PneumaticCraft API] Block supply failed for block: " + blockName); - return null; - }*/ + /* + * try { if(blockClass == null) blockClass = Class.forName("pneumaticCraft.common.block.Blockss"); return + * (Block)blockClass.getField(blockName).get(null); } catch(Exception e) { + * System.err.println("[PneumaticCraft API] Block supply failed for block: " + blockName); return null; } + */ } /* - The following is a list of all the block names that can be passed as argument in getBlock(String) to get a PneumaticCraft block. - - - pressureTube meta = tube type - airCompressor - airCannon - pressureChamberWall meta < 6 ? wall : window - pressureChamberValve - pressureChamberInterface - squidPlant - fireFlower - creeperPlant - slimePlant - rainPlant - enderPlant - lightningPlant - adrenalinePlant - burstPlant - potionPlant - repulsionPlant - heliumPlant - flyingFlower - musicPlant - propulsionPlant - chopperPlant - chargingStation - elevatorBase - elevatorFrame - vacuumPump - pneumaticDoorBase - pneumaticDoor - assemblyPlatform - assemblyIOUnit - assemblyDrill - assemblyLaser - assemblyController - advancedPressureTube meta = tube type (like 'pressureTube') - compressedIron - uvLightBox - etchingAcid - securityStation - universalSensor - pneumaticGenerator - electricCompressor - pneumaticEngine - kineticCompressor - aerialInterface - electrostaticCompressor - aphorismTile - omnidirectionalHopper - - */ + * The following is a list of all the block names that can be passed as argument in getBlock(String) to get a + * PneumaticCraft block. pressureTube meta = tube type airCompressor airCannon pressureChamberWall meta < 6 ? wall : + * window pressureChamberValve pressureChamberInterface squidPlant fireFlower creeperPlant slimePlant rainPlant + * enderPlant lightningPlant adrenalinePlant burstPlant potionPlant repulsionPlant heliumPlant flyingFlower + * musicPlant propulsionPlant chopperPlant chargingStation elevatorBase elevatorFrame vacuumPump pneumaticDoorBase + * pneumaticDoor assemblyPlatform assemblyIOUnit assemblyDrill assemblyLaser assemblyController advancedPressureTube + * meta = tube type (like 'pressureTube') compressedIron uvLightBox etchingAcid securityStation universalSensor + * pneumaticGenerator electricCompressor pneumaticEngine kineticCompressor aerialInterface electrostaticCompressor + * aphorismTile omnidirectionalHopper + */ } diff --git a/src/api/java/pneumaticCraft/api/block/IPneumaticWrenchable.java b/src/api/java/pneumaticCraft/api/block/IPneumaticWrenchable.java index 6d65c0fa..2d7793d9 100644 --- a/src/api/java/pneumaticCraft/api/block/IPneumaticWrenchable.java +++ b/src/api/java/pneumaticCraft/api/block/IPneumaticWrenchable.java @@ -5,8 +5,8 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; /** - * Should be implemented by any block that allows to be rotated by a Pneumatic Wrench. It uses almost the same - * rotate method as the Vanilla (Forge) method. However it uses energy to rotate (when rotateBlock() return true). + * Should be implemented by any block that allows to be rotated by a Pneumatic Wrench. It uses almost the same rotate + * method as the Vanilla (Forge) method. However it uses energy to rotate (when rotateBlock() return true). */ public interface IPneumaticWrenchable { diff --git a/src/api/java/pneumaticCraft/api/client/GuiAnimatedStatSupplier.java b/src/api/java/pneumaticCraft/api/client/GuiAnimatedStatSupplier.java index 1ca8cd84..9149d801 100644 --- a/src/api/java/pneumaticCraft/api/client/GuiAnimatedStatSupplier.java +++ b/src/api/java/pneumaticCraft/api/client/GuiAnimatedStatSupplier.java @@ -4,19 +4,21 @@ import net.minecraft.client.gui.GuiScreen; import net.minecraft.item.ItemStack; /** - * With this class you can retrieve new instances of the PneumaticCraft's IGuiAnimatedStat implementation. You can use these in Gui's as - * well as anywhere you like. When you use these in Gui's you need to pass a valid GuiScreen instance, if you don't you can just pass - * null. + * With this class you can retrieve new instances of the PneumaticCraft's IGuiAnimatedStat implementation. You can use + * these in Gui's as well as anywhere you like. When you use these in Gui's you need to pass a valid GuiScreen instance, + * if you don't you can just pass null. */ public class GuiAnimatedStatSupplier { + private static Class animatedStatClass; public static IGuiAnimatedStat getAnimatedStat(GuiScreen gui, int backgroundColor) { - return getAnimatedStat(new Class[] {GuiScreen.class, int.class}, gui, backgroundColor); + return getAnimatedStat(new Class[] { GuiScreen.class, int.class }, gui, backgroundColor); } /** * Returns a GuiAnimatedStat which uses an itemstack as static icon. + * * @param gui * @param iconStack * @param backgroundColor @@ -24,27 +26,34 @@ public class GuiAnimatedStatSupplier { */ public static IGuiAnimatedStat getAnimatedStat(GuiScreen gui, ItemStack iconStack, int backgroundColor) { return getAnimatedStat( - new Class[] {GuiScreen.class, int.class, ItemStack.class}, gui, backgroundColor, iconStack); + new Class[] { GuiScreen.class, int.class, ItemStack.class }, + gui, + backgroundColor, + iconStack); } /** * Returns a GuiAnimatedStat which uses a texture location as static icon. + * * @param gui - * @param iconTexture / text + * @param iconTexture / text * @param backgroundColor * @return */ public static IGuiAnimatedStat getAnimatedStat(GuiScreen gui, String iconTexture, int backgroundColor) { return getAnimatedStat( - new Class[] {GuiScreen.class, int.class, String.class}, gui, backgroundColor, iconTexture); + new Class[] { GuiScreen.class, int.class, String.class }, + gui, + backgroundColor, + iconTexture); } private static IGuiAnimatedStat getAnimatedStat(Class[] constructorClasses, Object... constructorParameters) { try { if (animatedStatClass == null) animatedStatClass = Class.forName("pneumaticCraft.client.gui.widget.GuiAnimatedStat"); - return (IGuiAnimatedStat) - animatedStatClass.getConstructor(constructorClasses).newInstance(constructorParameters); + return (IGuiAnimatedStat) animatedStatClass.getConstructor(constructorClasses) + .newInstance(constructorParameters); } catch (Exception e) { System.err.println("Failed to retrieve an GuiAnimatedStat instance from PneumaticCraft."); } diff --git a/src/api/java/pneumaticCraft/api/client/GuiElementRenderer.java b/src/api/java/pneumaticCraft/api/client/GuiElementRenderer.java index e9e7e7c1..e288647d 100644 --- a/src/api/java/pneumaticCraft/api/client/GuiElementRenderer.java +++ b/src/api/java/pneumaticCraft/api/client/GuiElementRenderer.java @@ -1,47 +1,43 @@ package pneumaticCraft.api.client; import java.lang.reflect.Method; + import net.minecraft.client.gui.FontRenderer; public class GuiElementRenderer { + private static Method drawGaugeMethod; /** * Draws a Pressure Gauge, the same which is also used in many PneumaticCraft applications. - * @param fontRenderer fontrenderer used to draw the numbers of the pressure gauge. - * @param minPressure The minimal pressure that needs to be displayed (this is -1 in most applications). - * @param maxPressure The maximal pressure that needs to be rendererd (this is 7 for tier one machines, and 25 for tier two). - * @param dangerPressure The transition pressure from green to red (this is 5 for tier one, and 29 for tier two machines). - * @param minWorkingPressure The transition pressure from yellow to green (variates per machine). - * @param currentPressure The pressure that the needle should point to. - * @param xPos x position of the gauge. - * @param yPos y position of the gauge. - * @param zLevel z position of the gauge (Gui#zLevel, -90, for in normal GUI's). + * + * @param fontRenderer fontrenderer used to draw the numbers of the pressure gauge. + * @param minPressure The minimal pressure that needs to be displayed (this is -1 in most applications). + * @param maxPressure The maximal pressure that needs to be rendererd (this is 7 for tier one machines, and + * 25 for tier two). + * @param dangerPressure The transition pressure from green to red (this is 5 for tier one, and 29 for tier two + * machines). + * @param minWorkingPressure The transition pressure from yellow to green (variates per machine). + * @param currentPressure The pressure that the needle should point to. + * @param xPos x position of the gauge. + * @param yPos y position of the gauge. + * @param zLevel z position of the gauge (Gui#zLevel, -90, for in normal GUI's). */ - public static void drawPressureGauge( - FontRenderer fontRenderer, - float minPressure, - float maxPressure, - float dangerPressure, - float minWorkingPressure, - float currentPressure, - int xPos, - int yPos, - float zLevel) { + public static void drawPressureGauge(FontRenderer fontRenderer, float minPressure, float maxPressure, + float dangerPressure, float minWorkingPressure, float currentPressure, int xPos, int yPos, float zLevel) { try { if (drawGaugeMethod == null) { - drawGaugeMethod = Class.forName("pneumaticCraft.client.gui.GuiUtils") - .getMethod( - "drawPressureGauge", - FontRenderer.class, - float.class, - float.class, - float.class, - float.class, - float.class, - int.class, - int.class, - float.class); + drawGaugeMethod = Class.forName("pneumaticCraft.client.gui.GuiUtils").getMethod( + "drawPressureGauge", + FontRenderer.class, + float.class, + float.class, + float.class, + float.class, + float.class, + int.class, + int.class, + float.class); } drawGaugeMethod.invoke( null, diff --git a/src/api/java/pneumaticCraft/api/client/IGuiAnimatedStat.java b/src/api/java/pneumaticCraft/api/client/IGuiAnimatedStat.java index 693b6d89..43ca6ba9 100644 --- a/src/api/java/pneumaticCraft/api/client/IGuiAnimatedStat.java +++ b/src/api/java/pneumaticCraft/api/client/IGuiAnimatedStat.java @@ -4,62 +4,69 @@ import java.awt.Rectangle; import java.util.List; /** - * This interface doesn't have to be implemented. In PneumaticCraft there already is one class which implements this interface - * which is used many times in PneumaticCraft (GUI stats, Pneumatic Helmet 2D and 3D stats). You can get an instance of this - * class as well. Information about this you can find in GuiAnimatedStatSupplier.java. Implementing your own version of - * animated stats can be implemented as well via this interface, and they will interact with the PneumaticCraft GuiAnimatedStats - * if you implement it correctly. + * This interface doesn't have to be implemented. In PneumaticCraft there already is one class which implements this + * interface which is used many times in PneumaticCraft (GUI stats, Pneumatic Helmet 2D and 3D stats). You can get an + * instance of this class as well. Information about this you can find in GuiAnimatedStatSupplier.java. Implementing + * your own version of animated stats can be implemented as well via this interface, and they will interact with the + * PneumaticCraft GuiAnimatedStats if you implement it correctly. */ public interface IGuiAnimatedStat { /** * When you call this method with a set of coordinates representing the button location and dimensions, you'll get * these parameters back scaled to the GuiAnimatedStat's scale. - * @param origX Button start X. - * @param origY Button start Y. - * @param width Button width. + * + * @param origX Button start X. + * @param origY Button start Y. + * @param width Button width. * @param height Button height. * @return rectangle containing the new location and dimensions. */ public Rectangle getButtonScaledRectangle(int origX, int origY, int width, int height); /** - * When passed 0.5F for example, the text of the stat will be half as big (so more text can fit into a certain area). + * When passed 0.5F for example, the text of the stat will be half as big (so more text can fit into a certain + * area). + * * @param scale */ public void scaleTextSize(float scale); /** * Returns true if the statistic expands to the left. + * * @return */ public boolean isLeftSided(); /** * Returns true if the statistic is done with expanding (when text will be displayed). + * * @return */ public boolean isDoneExpanding(); /** * Pass true if the statistic should expand to the left, otherwise false. + * * @param leftSided */ public void setLeftSided(boolean leftSided); /** * Sets the main text of this stat. Every line should be stored in a seperate list element. Upon rendering, - * EnumChatFormattings will be respected. When you call this method, Too long lines will be divided into multiple shorter ones - * to fit in the GUI. + * EnumChatFormattings will be respected. When you call this method, Too long lines will be divided into multiple + * shorter ones to fit in the GUI. + * * @param text * @return this, so you can chain calls. */ public IGuiAnimatedStat setText(List text); /** - * Sets the line to a single line. Upon rendering, - * EnumChatFormattings will be respected. When you call this method, Too long lines will be divided into multiple shorter ones - * to fit in the GUI. + * Sets the line to a single line. Upon rendering, EnumChatFormattings will be respected. When you call this method, + * Too long lines will be divided into multiple shorter ones to fit in the GUI. + * * @param text * @return this, so you can chain calls. */ @@ -68,26 +75,30 @@ public interface IGuiAnimatedStat { /** * Sets the main text of this stat. Every line should be stored in a seperate list element. Upon rendering, * EnumChatFormattings will be respected. This version of the text setting doesn't handle too long lines. + * * @param text */ public void setTextWithoutCuttingString(List text); /** * Sets the title of this stat. It will automatically get the yellow color assigned. + * * @param title */ public void setTitle(String title); /** * Returns the title of this stat (obviously without color prefix). + * * @return */ public String getTitle(); /** - * Defines what dimensions the stat should have when it is not expanded (default 17x17) and resets the stat to these dimensions. - * Used in PneumaticCraft by the block/entity tracker stats, they are 0x0 when not expanded so it looks like they expand - * (and appear) from nothing. + * Defines what dimensions the stat should have when it is not expanded (default 17x17) and resets the stat to these + * dimensions. Used in PneumaticCraft by the block/entity tracker stats, they are 0x0 when not expanded so it looks + * like they expand (and appear) from nothing. + * * @param minWidth * @param minHeight */ @@ -96,25 +107,29 @@ public interface IGuiAnimatedStat { /** * When this stat gets a parent stat assigned, the y of this stat will be the same as the parent's plus this stat's * baseY. This will cause this stat to move up and down when the parent's stat expands/moves. + * * @param stat */ public void setParentStat(IGuiAnimatedStat stat); /** * Sets the x location of this stat. + * * @param x */ public void setBaseX(int x); /** * Sets the base Y of this stat. + * * @param y */ public void setBaseY(int y); /** - * Returns the real Y of this stat. This is the same as getBaseY when there is no parent stat, but if there is this method - * returns the value described in setParentStat(IGuiAnimatedStat stat). + * Returns the real Y of this stat. This is the same as getBaseY when there is no parent stat, but if there is this + * method returns the value described in setParentStat(IGuiAnimatedStat stat). + * * @return */ public int getAffectedY(); @@ -125,12 +140,14 @@ public interface IGuiAnimatedStat { /** * Returns the Y size of this stat. + * * @return */ public int getHeight(); /** * Returns the X size of this stat. + * * @return */ public int getWidth(); @@ -144,6 +161,7 @@ public interface IGuiAnimatedStat { /** * Should be called every render tick when and where you want to render the stat. + * * @param mouseX * @param mouseY * @param partialTicks @@ -152,6 +170,7 @@ public interface IGuiAnimatedStat { /** * This method will handle mouse clicks. This will handle open/closing of the stat when the mouse clicks it. + * * @param x * @param y * @param button @@ -171,6 +190,7 @@ public interface IGuiAnimatedStat { /** * Returns true if the stat is expanding. + * * @return */ public boolean isClicked(); diff --git a/src/api/java/pneumaticCraft/api/client/assemblymachine/AssemblyRenderOverriding.java b/src/api/java/pneumaticCraft/api/client/assemblymachine/AssemblyRenderOverriding.java index d67277de..f0d0f06f 100644 --- a/src/api/java/pneumaticCraft/api/client/assemblymachine/AssemblyRenderOverriding.java +++ b/src/api/java/pneumaticCraft/api/client/assemblymachine/AssemblyRenderOverriding.java @@ -1,13 +1,14 @@ package pneumaticCraft.api.client.assemblymachine; import java.util.HashMap; + import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class AssemblyRenderOverriding { - public static final HashMap renderOverrides = - new HashMap(); + + public static final HashMap renderOverrides = new HashMap(); public static void addRenderOverride(Block block, IAssemblyRenderOverriding renderOverride) { renderOverrides.put(Block.getIdFromBlock(block), renderOverride); @@ -18,34 +19,39 @@ public class AssemblyRenderOverriding { } public static interface IAssemblyRenderOverriding { + /** - * This method will be called just before the IO Unit's held stack is being rendered. You can insert GL11 calls here to - * rotate the model for example. push and pop matrices are not needed, this is done for you. - * You can also choose to do the whole rendering yourself, you'll need to return false then to indicate that - * PneumaticCraft shouldn't render the item. - * @param renderedStack itemStack that is being rendered - * @return true if PneumaticCraft should render the item (after your changes), or false to cancel rendering. + * This method will be called just before the IO Unit's held stack is being rendered. You can insert GL11 calls + * here to rotate the model for example. push and pop matrices are not needed, this is done for you. You can + * also choose to do the whole rendering yourself, you'll need to return false then to indicate that + * PneumaticCraft shouldn't render the item. + * + * @param renderedStack itemStack that is being rendered + * @return true if PneumaticCraft should render the item (after your changes), or false to cancel rendering. */ public boolean applyRenderChangeIOUnit(ItemStack renderedStack); /** * Same deal as with the applyRenderChangeIOUnit(), but now for the Assembly Platform. + * * @param renderedStack itemStack that is being rendered * @return true if PneumaticCraft should render the item (after your changes), or false to cancel rendering. */ public boolean applyRenderChangePlatform(ItemStack renderedStack); /** - * Should return the distance the claw travels before it is gripped to the stack. - * By default it's 0.0875F for items and 0.00625F for blocks, 0.09375 when the claw is completely closed. + * Should return the distance the claw travels before it is gripped to the stack. By default it's 0.0875F for + * items and 0.00625F for blocks, 0.09375 when the claw is completely closed. + * * @param renderedStack * @return */ public float getIOUnitClawShift(ItemStack renderedStack); /** - * Should return the distance the claw travels before it is gripped to the stack. - * By default it's 0.0875F for items and 0.00625F for blocks, 0.09375 when the claw is completely closed. + * Should return the distance the claw travels before it is gripped to the stack. By default it's 0.0875F for + * items and 0.00625F for blocks, 0.09375 when the claw is completely closed. + * * @param renderedStack * @return */ diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IBlockTrackEntry.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IBlockTrackEntry.java index 7d145625..4df4033f 100644 --- a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IBlockTrackEntry.java +++ b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IBlockTrackEntry.java @@ -1,78 +1,65 @@ package pneumaticCraft.api.client.pneumaticHelmet; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public interface IBlockTrackEntry { + /** - * This method should return true if the coordinate checked is one that - * should be tracked. Most entries will just return true when the blockID is - * the one that they track. + * This method should return true if the coordinate checked is one that should be tracked. Most entries will just + * return true when the blockID is the one that they track. * - * @param world - * The world that is examined. - * @param x - * The x coordinate of the block examined. - * @param y - * The y coordinate of the block examined. - * @param z - * The z coordinate of the block examined. - * @param block - * The block of the current coordinate. This will save you a - * call to World.getBlock(). - * @param te The TileEntity at this x,y,z. + * @param world The world that is examined. + * @param x The x coordinate of the block examined. + * @param y The y coordinate of the block examined. + * @param z The z coordinate of the block examined. + * @param block The block of the current coordinate. This will save you a call to World.getBlock(). + * @param te The TileEntity at this x,y,z. * @return true if the coordinate should be tracked by this BlockTrackEntry. */ public boolean shouldTrackWithThisEntry(IBlockAccess world, int x, int y, int z, Block block, TileEntity te); /** - * This method defines if the block should be updated by the server (each 5 - * seconds). This is specifically aimed at Tile Entities, as the server will - * send an NBT packet. This method returns true at for instance Chests and - * Mob Spawners, to get the inventory at the client side and the time to the - * next spawn respectively. + * This method defines if the block should be updated by the server (each 5 seconds). This is specifically aimed at + * Tile Entities, as the server will send an NBT packet. This method returns true at for instance Chests and Mob + * Spawners, to get the inventory at the client side and the time to the next spawn respectively. + * * @param te The TileEntity at the currently checked location. * - * @return true if the Tile Entity should be updated, or false when it - * doesn't have to. + * @return true if the Tile Entity should be updated, or false when it doesn't have to. */ public boolean shouldBeUpdatedFromServer(TileEntity te); /** - * The return of this method defines at how many tracked blocks of this type - * the HUD should stop displaying text at the tracked blocks of this type. + * The return of this method defines at how many tracked blocks of this type the HUD should stop displaying text at + * the tracked blocks of this type. * * @return amount of blocks the HUD should stop displaying the block info. */ public int spamThreshold(); /** - * This method is called each render tick to retrieve the blocks additional - * information. The method behaves the same as the addInformation method in - * the Item class. This method only will be called if - * shouldTrackWithThisEntry() returned true and the player hovers over the - * coordinate. + * This method is called each render tick to retrieve the blocks additional information. The method behaves the same + * as the addInformation method in the Item class. This method only will be called if shouldTrackWithThisEntry() + * returned true and the player hovers over the coordinate. * - * @param world - * The world the block is in. - * @param x - * The x coordinate the block is at. - * @param y - * The y coordinate the block is at. - * @param z - * The z coordinate the block is at. - * @param te The TileEntity at the x,y,z. - * @param infoList - * The list of lines to display. + * @param world The world the block is in. + * @param x The x coordinate the block is at. + * @param y The y coordinate the block is at. + * @param z The z coordinate the block is at. + * @param te The TileEntity at the x,y,z. + * @param infoList The list of lines to display. */ public void addInformation(World world, int x, int y, int z, TileEntity te, List infoList); /** - * This method is called when displaying the currently tracked blocks. - * Will be tried to be mapped to the localization file first. + * This method is called when displaying the currently tracked blocks. Will be tried to be mapped to the + * localization file first. + * * @return the name of the group of this entry. */ public String getEntryName(); diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IEntityTrackEntry.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IEntityTrackEntry.java index e7b248a3..4369134a 100644 --- a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IEntityTrackEntry.java +++ b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IEntityTrackEntry.java @@ -1,15 +1,18 @@ package pneumaticCraft.api.client.pneumaticHelmet; import java.util.List; + import net.minecraft.entity.Entity; /** - * Implement this class and register it by adding it to the entityTrackEntries class. - * There needs to be a parameterless constructor. For every entity that's applicable for this definition, an instance is created. + * Implement this class and register it by adding it to the entityTrackEntries class. There needs to be a parameterless + * constructor. For every entity that's applicable for this definition, an instance is created. */ public interface IEntityTrackEntry { + /** * Return true if you want to add a tooltip for the given entity. + * * @param entity * @return */ @@ -17,19 +20,23 @@ public interface IEntityTrackEntry { /** * Add info to the tab. This is only called when isApplicable returned true. + * * @param entity * @param curInfo */ public void addInfo(Entity entity, List curInfo); /** - * Update is called every (client) tick, and can be used to update something like a timer (used for the Creeper countdown). + * Update is called every (client) tick, and can be used to update something like a timer (used for the Creeper + * countdown). + * * @param entity */ public void update(Entity entity); /** * Called every render tick, this method can be used to render additional info. Used for Drone AI visualisation. + * * @param entity * @param partialTicks TODO */ @@ -39,6 +46,7 @@ public interface IEntityTrackEntry { * Just a basic implementation class that can be used if an update and render method isn't needed. */ public abstract static class EntityTrackEntry implements IEntityTrackEntry { + @Override public void update(Entity entity) {} diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IGuiScreen.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IGuiScreen.java index 67f13d5b..80c99576 100644 --- a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IGuiScreen.java +++ b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IGuiScreen.java @@ -1,6 +1,7 @@ package pneumaticCraft.api.client.pneumaticHelmet; import java.util.List; + import net.minecraft.client.gui.FontRenderer; /** @@ -8,6 +9,7 @@ import net.minecraft.client.gui.FontRenderer; * safely be casted to GuiSreen if needed. */ public interface IGuiScreen { + public List getButtonList(); public FontRenderer getFontRenderer(); diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableBlock.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableBlock.java index 12e86c1a..e7578949 100644 --- a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableBlock.java +++ b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableBlock.java @@ -1,42 +1,47 @@ package pneumaticCraft.api.client.pneumaticHelmet; import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; /** - * Use this interface to specify any hackable block. When it's your block, you can simply implement this interface in the - * block's class. If you don't have access to the class (vanilla blocks), you can implement this interface in a separate class - * and register it using PneumaticRegistry.registry.addHackable(blockClass, IHackableBlockClass). With the former way there will be one instance only per type. In the latter, there will - * be an IHackableBlock instance for every block. + * Use this interface to specify any hackable block. When it's your block, you can simply implement this interface in + * the block's class. If you don't have access to the class (vanilla blocks), you can implement this interface in a + * separate class and register it using PneumaticRegistry.registry.addHackable(blockClass, IHackableBlockClass). With + * the former way there will be one instance only per type. In the latter, there will be an IHackableBlock instance for + * every block. */ public interface IHackableBlock { + /** - * Should return a unique id to represent this hackable. Used in NBT saving to be able to trigger the afterHackTime after a server restart. - * Null is a valid return: afterHackTick will not be triggered at all in that case. + * Should return a unique id to represent this hackable. Used in NBT saving to be able to trigger the afterHackTime + * after a server restart. Null is a valid return: afterHackTick will not be triggered at all in that case. * * CURRENTLY THIS ISN'T IMPLEMENTED. + * * @return */ public String getId(); /** - * Returning true will allow the player to hack this block. This can be used to only allow hacking on certain conditions. + * Returning true will allow the player to hack this block. This can be used to only allow hacking on certain + * conditions. */ public boolean canHack(IBlockAccess world, int x, int y, int z, EntityPlayer player); /** - * Add info that is displayed on the tracker tooltip here. Text like "Hack to explode" can be added. - * This method is only called when canHack(World, int, int, int) returned true. - * The added lines automatically will be tried to get localized. + * Add info that is displayed on the tracker tooltip here. Text like "Hack to explode" can be added. This method is + * only called when canHack(World, int, int, int) returned true. The added lines automatically will be tried to get + * localized. */ public void addInfo(World world, int x, int y, int z, List curInfo, EntityPlayer player); /** - * Add info that is being displayed after hacking, as long as 'afterHackTick' is returning true. - * Things like "Neutralized". - * The added lines automatically will be tried to get localized. + * Add info that is being displayed after hacking, as long as 'afterHackTick' is returning true. Things like + * "Neutralized". The added lines automatically will be tried to get localized. + * * @param entity * @param curInfo * @param player @@ -44,20 +49,23 @@ public interface IHackableBlock { public void addPostHackInfo(World world, int x, int y, int z, List curInfo, EntityPlayer player); /** - * Return the time it takes to hack this block in ticks. For more powerful hacks, a longer required hacking time is adviced. + * Return the time it takes to hack this block in ticks. For more powerful hacks, a longer required hacking time is + * adviced. */ public int getHackTime(IBlockAccess world, int x, int y, int z, EntityPlayer player); /** - * When the player hacked the block for getHackTime(World, int, int, int) ticks this will be called on both server and client side. + * When the player hacked the block for getHackTime(World, int, int, int) ticks this will be called on both server + * and client side. */ public void onHackFinished(World world, int x, int y, int z, EntityPlayer player); /** - * Called every tick after the hacking finished (on both server and client side). Returning true will keep this going (for mob spawners, to keep them neutralized), - * or false to stop ticking (for door/lever hacking). + * Called every tick after the hacking finished (on both server and client side). Returning true will keep this + * going (for mob spawners, to keep them neutralized), or false to stop ticking (for door/lever hacking). * * CURRENTLY THIS METHOD WILL STOP GETTING INVOKED AFTER A SERVER RESTART! + * * @param world * @param x * @param y diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableEntity.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableEntity.java index c574e5df..b2fee445 100644 --- a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableEntity.java +++ b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableEntity.java @@ -1,39 +1,42 @@ package pneumaticCraft.api.client.pneumaticHelmet; import java.util.List; + import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; /** - * Use this interface to specify any hackable entity. When it's your entity, you can simply implement this interface in the - * entity's class. If you don't have access to the class (vanilla entities), you can implement this interface in a separate class - * and register it using PneumaticRegistry.registry.addHackable(entityClass, IHackableEntityClass). In both ways there will be an IHackableEntity instance for every entity. + * Use this interface to specify any hackable entity. When it's your entity, you can simply implement this interface in + * the entity's class. If you don't have access to the class (vanilla entities), you can implement this interface in a + * separate class and register it using PneumaticRegistry.registry.addHackable(entityClass, IHackableEntityClass). In + * both ways there will be an IHackableEntity instance for every entity. */ public interface IHackableEntity { /** - * Should return a unique id to represent this hackable. Used in NBT saving to be able to trigger the afterHackTime after a server restart. - * Null is a valid return: afterHackTick will not be triggered at all in that case. + * Should return a unique id to represent this hackable. Used in NBT saving to be able to trigger the afterHackTime + * after a server restart. Null is a valid return: afterHackTick will not be triggered at all in that case. + * * @return */ public String getId(); /** - * Returning true will allow the player to hack this entity. This can be used to only allow hacking on certain conditions. + * Returning true will allow the player to hack this entity. This can be used to only allow hacking on certain + * conditions. */ public boolean canHack(Entity entity, EntityPlayer player); /** - * Add info that is displayed on the tracker tooltip here. Text like "Hack to explode" can be added. - * This method is only called when canHack(Entity) returned true. - * The added lines automatically will be tried to get localized. + * Add info that is displayed on the tracker tooltip here. Text like "Hack to explode" can be added. This method is + * only called when canHack(Entity) returned true. The added lines automatically will be tried to get localized. */ public void addInfo(Entity entity, List curInfo, EntityPlayer player); /** - * Add info that is being displayed after hacking, as long as 'afterHackTick' is returning true. - * Things like "Neutralized". - * The added lines automatically will be tried to get localized. + * Add info that is being displayed after hacking, as long as 'afterHackTick' is returning true. Things like + * "Neutralized". The added lines automatically will be tried to get localized. + * * @param entity * @param curInfo * @param player @@ -41,18 +44,20 @@ public interface IHackableEntity { public void addPostHackInfo(Entity entity, List curInfo, EntityPlayer player); /** - * Return the time it takes to hack this entity in ticks. For more powerful hacks, a longer required hacking time is adviced. + * Return the time it takes to hack this entity in ticks. For more powerful hacks, a longer required hacking time is + * adviced. */ public int getHackTime(Entity entity, EntityPlayer player); /** - * When the player hacked the entity for getHackTime(Entity) ticks this will be called on both client and server side. + * When the player hacked the entity for getHackTime(Entity) ticks this will be called on both client and server + * side. */ public void onHackFinished(Entity entity, EntityPlayer player); /** - * Called every tick after the hacking finished. Returning true will keep this going (for mob spawners, to keep them neutralized), - * or false to stop ticking (for door/lever hacking). + * Called every tick after the hacking finished. Returning true will keep this going (for mob spawners, to keep them + * neutralized), or false to stop ticking (for door/lever hacking). */ public boolean afterHackTick(Entity entity); } diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IOptionPage.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IOptionPage.java index bcfb27b4..f4932811 100644 --- a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IOptionPage.java +++ b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IOptionPage.java @@ -4,33 +4,36 @@ import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; /** - * The Option Page is the page you see when you press 'F' (by default) with a Pneumatic Helmet equipped. You can register this class - * by returning a new instance of this class at {@link IUpgradeRenderHandler#getGuiOptionsPage()} + * The Option Page is the page you see when you press 'F' (by default) with a Pneumatic Helmet equipped. You can + * register this class by returning a new instance of this class at {@link IUpgradeRenderHandler#getGuiOptionsPage()} */ public interface IOptionPage { /** * This string is used in the text of the button of this page. + * * @return */ public String getPageName(); /** - * Here you can initialize your buttons and stuff like with a GuiScreen. For buttons, don't use button id 100 and up, as they - * will be used as selection buttons for other option pages in the main GuiScreen. + * Here you can initialize your buttons and stuff like with a GuiScreen. For buttons, don't use button id 100 and + * up, as they will be used as selection buttons for other option pages in the main GuiScreen. + * * @param gui */ public void initGui(IGuiScreen gui); /** * Same as GuiScreen#actionPerformed(GuiButton). + * * @param button */ public void actionPerformed(GuiButton button); /** - * Same as {@link GuiScreen#drawScreen(int, int, float)} - * Here you can render additional things like text. + * Same as {@link GuiScreen#drawScreen(int, int, float)} Here you can render additional things like text. + * * @param x * @param y * @param partialTicks @@ -39,6 +42,7 @@ public interface IOptionPage { /** * Same as GuiScreen#keyTyped(char, int). + * * @param ch * @param key */ diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IUpgradeRenderHandler.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IUpgradeRenderHandler.java index 888aa163..4e0ea28f 100644 --- a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IUpgradeRenderHandler.java +++ b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IUpgradeRenderHandler.java @@ -3,25 +3,28 @@ package pneumaticCraft.api.client.pneumaticHelmet; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.common.config.Configuration; + import pneumaticCraft.api.client.IGuiAnimatedStat; /** - * To add upgrades for in the Pneumatic Helmet implement this interface. You can add members to this class, however these can only - * be client sided members as this class will be used as singleton. Therefore, only one of these instances exist at the server side - * so any member that is used server side will affect every player. + * To add upgrades for in the Pneumatic Helmet implement this interface. You can add members to this class, however + * these can only be client sided members as this class will be used as singleton. Therefore, only one of these + * instances exist at the server side so any member that is used server side will affect every player. * */ public interface IUpgradeRenderHandler { /** - * Return here the name of the upgrade. This is displayed in the formatting [upgradeName] + " " + "found"/"not found" on - * initialization of the helmet. + * Return here the name of the upgrade. This is displayed in the formatting [upgradeName] + " " + "found"/"not + * found" on initialization of the helmet. + * * @return */ public String getUpgradeName(); /** * Being called from PneumaticCraft's config handler, you can use this method to read settings like stat positions + * * @param config PneumaticCraft's config file. */ public void initConfig(Configuration config); @@ -34,7 +37,9 @@ public interface IUpgradeRenderHandler { public void saveToConfig(); /** - * This method will be called every client tick, and should be used to update logic like the tracking and velocities of stuff. + * This method will be called every client tick, and should be used to update logic like the tracking and velocities + * of stuff. + * * @param player * @param rangeUpgrades amount of range upgrades installed in the helmet. */ @@ -42,27 +47,32 @@ public interface IUpgradeRenderHandler { /** * Called in the 3D render stage (renderWorldLastEvent) + * * @param partialTicks */ public void render3D(float partialTicks); /** * Called in the 2D render stage (Render Tick Handler) + * * @param partialTicks - * @param helmetEnabled is true when isEnabled() returned true earlier. Can be used to close AnimatedStats for instance. - * However this is already handled if you return an AnimatedStat in getAnimatedStat(). + * @param helmetEnabled is true when isEnabled() returned true earlier. Can be used to close AnimatedStats for + * instance. However this is already handled if you return an AnimatedStat in + * getAnimatedStat(). */ public void render2D(float partialTicks, boolean helmetEnabled); /** - * You can return a GuiAnimatedStat here, that the HUDHandler will pick up and render. It also automatically opens and closes - * the stat when needed. The GuiMoveStat uses this method to retrieve the to be moved stat. + * You can return a GuiAnimatedStat here, that the HUDHandler will pick up and render. It also automatically opens + * and closes the stat when needed. The GuiMoveStat uses this method to retrieve the to be moved stat. + * * @return null if no stat used. */ public IGuiAnimatedStat getAnimatedStat(); /** * Should return true if this upgrade handler is enabled for the given stacks placed in the helmet. + * * @param upgradeStacks * @return */ @@ -70,6 +80,7 @@ public interface IUpgradeRenderHandler { /** * Returns the usage in mL/tick when this upgrade handler is enabled. + * * @param rangeUpgrades amount of range upgrades installed in the helmet. * @param player * @return usage in mL/tick @@ -77,15 +88,16 @@ public interface IUpgradeRenderHandler { public float getEnergyUsage(int rangeUpgrades, EntityPlayer player); /** - * Called when (re-)equipped the helmet this method should be used to clear information like current tracked entities. - * So clearing lists and other references as this handler should re-acquire when reinstalled. + * Called when (re-)equipped the helmet this method should be used to clear information like current tracked + * entities. So clearing lists and other references as this handler should re-acquire when reinstalled. */ public void reset(); /** - * When you have some options for your upgrade handler you could return a new instance of an IOptionsPage. - * When you do so, it will automatically get picked up by the options handler, and it will be added to the - * options GUI when this upgrade returns true when calling isEnabled(). Returning null is valid. + * When you have some options for your upgrade handler you could return a new instance of an IOptionsPage. When you + * do so, it will automatically get picked up by the options handler, and it will be added to the options GUI when + * this upgrade returns true when calling isEnabled(). Returning null is valid. + * * @return */ public IOptionPage getGuiOptionsPage(); diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/RenderHandlerRegistry.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/RenderHandlerRegistry.java index 5aef540d..c9b819d5 100644 --- a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/RenderHandlerRegistry.java +++ b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/RenderHandlerRegistry.java @@ -3,8 +3,10 @@ package pneumaticCraft.api.client.pneumaticHelmet; import java.util.List; public class RenderHandlerRegistry { + /** - * With this field you can register your render handlers. This field is initialized in the PreInit phase of PneumaticCraft's loading phase. + * With this field you can register your render handlers. This field is initialized in the PreInit phase of + * PneumaticCraft's loading phase. */ public static List renderHandlers; } diff --git a/src/api/java/pneumaticCraft/api/drone/DroneConstructingEvent.java b/src/api/java/pneumaticCraft/api/drone/DroneConstructingEvent.java index 10f66543..db0ec305 100644 --- a/src/api/java/pneumaticCraft/api/drone/DroneConstructingEvent.java +++ b/src/api/java/pneumaticCraft/api/drone/DroneConstructingEvent.java @@ -3,6 +3,7 @@ package pneumaticCraft.api.drone; import cpw.mods.fml.common.eventhandler.Event; public class DroneConstructingEvent extends Event { + public IDrone drone; public DroneConstructingEvent(IDrone drone) { diff --git a/src/api/java/pneumaticCraft/api/drone/IBlockInteractHandler.java b/src/api/java/pneumaticCraft/api/drone/IBlockInteractHandler.java index 81f3de7c..d2731830 100644 --- a/src/api/java/pneumaticCraft/api/drone/IBlockInteractHandler.java +++ b/src/api/java/pneumaticCraft/api/drone/IBlockInteractHandler.java @@ -7,6 +7,7 @@ public interface IBlockInteractHandler { /** * Returns a boolean[6] of all sides. when true, this side is accessible + * * @return */ public boolean[] getSides(); @@ -18,8 +19,8 @@ public interface IBlockInteractHandler { public int getRemainingCount(); /** - * When invoked, the drone will abort searching the area. Could be used to abort early when full of RF energy for example, when importing RF. - * (It's useless to search any further) + * When invoked, the drone will abort searching the area. Could be used to abort early when full of RF energy for + * example, when importing RF. (It's useless to search any further) */ public void abort(); } diff --git a/src/api/java/pneumaticCraft/api/drone/ICustomBlockInteract.java b/src/api/java/pneumaticCraft/api/drone/ICustomBlockInteract.java index 1d4d4dbc..38f81905 100644 --- a/src/api/java/pneumaticCraft/api/drone/ICustomBlockInteract.java +++ b/src/api/java/pneumaticCraft/api/drone/ICustomBlockInteract.java @@ -4,9 +4,9 @@ import net.minecraft.util.ResourceLocation; import net.minecraft.world.ChunkPosition; /** - * Implement this and register it to PneumaticRegistry.registerCustomBlockInteractor(). - * This will add a puzzle piece that has only a Area white- and blacklist parameter (similar to a GoTo piece). - * It will do the specified behaviour. This can be used to create energy import/export widgets. + * Implement this and register it to PneumaticRegistry.registerCustomBlockInteractor(). This will add a puzzle piece + * that has only a Area white- and blacklist parameter (similar to a GoTo piece). It will do the specified behaviour. + * This can be used to create energy import/export widgets. */ public interface ICustomBlockInteract { @@ -16,7 +16,9 @@ public interface ICustomBlockInteract { public String getName(); /** - * Should return the puzzle piece texture. Should be a multiple of 80x64 (width x height). I'd recommend starting out with copying the Go To widget texture. + * Should return the puzzle piece texture. Should be a multiple of 80x64 (width x height). I'd recommend starting + * out with copying the Go To widget texture. + * * @return */ public ResourceLocation getTexture(); @@ -24,21 +26,28 @@ public interface ICustomBlockInteract { /** * The actual interaction. * - * For every position in the selected area the drone will visit every block (ordered from closest to furthest). It will call this method with 'simulate = true'. If this method returns true, the drone will navigate to this location, and call this method again with 'simulate = false' It will keep doing this until this method returns false. + * For every position in the selected area the drone will visit every block (ordered from closest to furthest). It + * will call this method with 'simulate = true'. If this method returns true, the drone will navigate to this + * location, and call this method again with 'simulate = false' It will keep doing this until this method returns + * false. * - * When interactHandler.useCount() returns true: - * In the interface of the puzzle piece users can specify a 'use count' and fill in the maximum count they want to use. When not simulating, you should only import/export up to interactHandler.getRemainingCount(), and you should notify the removed/added count by doing interactHandler.decreaseCount(int count). + * When interactHandler.useCount() returns true: In the interface of the puzzle piece users can specify a 'use + * count' and fill in the maximum count they want to use. When not simulating, you should only import/export up to + * interactHandler.getRemainingCount(), and you should notify the removed/added count by doing + * interactHandler.decreaseCount(int count). * - * @param pos current visited location + * @param pos current visited location * @param drone - * @param interactHandler object you can use to use to get accessible sides and give feedback about counts. - * @param simulate will be true when trying to figure out whether or not the drone should navigate to this block, false when next to this block. + * @param interactHandler object you can use to use to get accessible sides and give feedback about counts. + * @param simulate will be true when trying to figure out whether or not the drone should navigate to this + * block, false when next to this block. * @return */ public boolean doInteract(ChunkPosition pos, IDrone drone, IBlockInteractHandler interactHandler, boolean simulate); /** * Used for crafting, categorizes the puzzle piece. + * * @return */ public int getCraftingColorIndex(); diff --git a/src/api/java/pneumaticCraft/api/drone/IDrone.java b/src/api/java/pneumaticCraft/api/drone/IDrone.java index 863a61ed..156833f3 100644 --- a/src/api/java/pneumaticCraft/api/drone/IDrone.java +++ b/src/api/java/pneumaticCraft/api/drone/IDrone.java @@ -11,9 +11,11 @@ import net.minecraft.world.World; import net.minecraftforge.common.IExtendedEntityProperties; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.IFluidTank; + import pneumaticCraft.api.item.IPressurizable; public interface IDrone extends IPressurizable { + /** * * @param upgradeIndex metadata value of the upgrade item diff --git a/src/api/java/pneumaticCraft/api/drone/IPathNavigator.java b/src/api/java/pneumaticCraft/api/drone/IPathNavigator.java index 958b4585..ecfa399f 100644 --- a/src/api/java/pneumaticCraft/api/drone/IPathNavigator.java +++ b/src/api/java/pneumaticCraft/api/drone/IPathNavigator.java @@ -3,6 +3,7 @@ package pneumaticCraft.api.drone; import net.minecraft.entity.Entity; public interface IPathNavigator { + public boolean moveToXYZ(double x, double y, double z); public boolean moveToEntity(Entity entity); diff --git a/src/api/java/pneumaticCraft/api/drone/IPathfindHandler.java b/src/api/java/pneumaticCraft/api/drone/IPathfindHandler.java index 814067b2..032c7e62 100644 --- a/src/api/java/pneumaticCraft/api/drone/IPathfindHandler.java +++ b/src/api/java/pneumaticCraft/api/drone/IPathfindHandler.java @@ -3,8 +3,10 @@ package pneumaticCraft.api.drone; import net.minecraft.world.World; public interface IPathfindHandler { + /** * When returned true, the drone can pathfind through this block. When false it can't. + * * @param world * @param x * @param y @@ -14,9 +16,9 @@ public interface IPathfindHandler { public boolean canPathfindThrough(World world, int x, int y, int z); /** - * CURRENTLY NOT IMPLEMENTED! - * Will be called every tick as long as the drone is < 1 block away from the given coordinate. - * can be used to open a door for a drone for example. + * CURRENTLY NOT IMPLEMENTED! Will be called every tick as long as the drone is < 1 block away from the given + * coordinate. can be used to open a door for a drone for example. + * * @param world * @param x * @param y diff --git a/src/api/java/pneumaticCraft/api/drone/SpecialVariableRetrievalEvent.java b/src/api/java/pneumaticCraft/api/drone/SpecialVariableRetrievalEvent.java index b0ce5001..befefebc 100644 --- a/src/api/java/pneumaticCraft/api/drone/SpecialVariableRetrievalEvent.java +++ b/src/api/java/pneumaticCraft/api/drone/SpecialVariableRetrievalEvent.java @@ -1,12 +1,13 @@ package pneumaticCraft.api.drone; -import cpw.mods.fml.common.eventhandler.Event; import net.minecraft.item.ItemStack; import net.minecraft.world.ChunkPosition; +import cpw.mods.fml.common.eventhandler.Event; + /** - * Fired when a Drone is trying to get a special coordinate, by accessing a variable with '$' prefix. - * These event are posted on the MinecraftForge.EVENT_BUS. + * Fired when a Drone is trying to get a special coordinate, by accessing a variable with '$' prefix. These event are + * posted on the MinecraftForge.EVENT_BUS. */ public abstract class SpecialVariableRetrievalEvent extends Event { @@ -24,6 +25,7 @@ public abstract class SpecialVariableRetrievalEvent extends Event { } public abstract static class CoordinateVariable extends SpecialVariableRetrievalEvent { + public ChunkPosition coordinate; public CoordinateVariable(String specialVarName) { @@ -31,6 +33,7 @@ public abstract class SpecialVariableRetrievalEvent extends Event { } public static class Drone extends CoordinateVariable { + public final IDrone drone; public Drone(IDrone drone, String specialVarName) { @@ -41,6 +44,7 @@ public abstract class SpecialVariableRetrievalEvent extends Event { } public abstract static class ItemVariable extends SpecialVariableRetrievalEvent { + public ItemStack item; public ItemVariable(String specialVarName) { @@ -48,6 +52,7 @@ public abstract class SpecialVariableRetrievalEvent extends Event { } public static class Drone extends ItemVariable { + public final IDrone drone; public Drone(IDrone drone, String specialVarName) { diff --git a/src/api/java/pneumaticCraft/api/item/IInventoryItem.java b/src/api/java/pneumaticCraft/api/item/IInventoryItem.java index 152af991..6f70e1c2 100644 --- a/src/api/java/pneumaticCraft/api/item/IInventoryItem.java +++ b/src/api/java/pneumaticCraft/api/item/IInventoryItem.java @@ -1,19 +1,21 @@ package pneumaticCraft.api.item; import java.util.List; + import net.minecraft.item.ItemStack; /** - * Implement this interface for your items that have an inventory. When you don't have access to the item, just create any old class - * that implements this interface and register an instance of it in PneumaticRegistry. - * This will then will be used in the Pneumatic Helmet's item search. + * Implement this interface for your items that have an inventory. When you don't have access to the item, just create + * any old class that implements this interface and register an instance of it in PneumaticRegistry. This will then will + * be used in the Pneumatic Helmet's item search. * */ public interface IInventoryItem { /** - * @parm stack: Item that potentially has an inventory. - * @parm curStacks: List of all currently added stacks for this item. Add more stacks in here in your implementation when found the right item. + * @parm stack: Item that potentially has an inventory. + * @parm curStacks: List of all currently added stacks for this item. Add more stacks in here in your implementation + * when found the right item. */ public void getStacksInItem(ItemStack stack, List curStacks); } diff --git a/src/api/java/pneumaticCraft/api/item/IPressurizable.java b/src/api/java/pneumaticCraft/api/item/IPressurizable.java index b81e1fe6..9fe8301a 100644 --- a/src/api/java/pneumaticCraft/api/item/IPressurizable.java +++ b/src/api/java/pneumaticCraft/api/item/IPressurizable.java @@ -6,6 +6,7 @@ import net.minecraft.item.ItemStack; * Any item implementing this interface will be able to (dis)charge in a Charging Station. */ public interface IPressurizable { + /** * This method should return the current pressure of the ItemStack given. * @@ -15,8 +16,8 @@ public interface IPressurizable { public float getPressure(ItemStack iStack); /** - * this method is used to charge or discharge a pneumatic item. when the - * value is negative the item should be discharging + * this method is used to charge or discharge a pneumatic item. when the value is negative the item should be + * discharging * * @param iStack the ItemStack which has to be (dis)charged. * @param amount amount in mL that the item is (dis)charging. @@ -24,9 +25,8 @@ public interface IPressurizable { public void addAir(ItemStack iStack, int amount); /** - * This method should return the maximum pressure of a pneumatic item. If it - * has reached this maximum, it won't explode, but it wouldn't (try to) - * charge either. + * This method should return the maximum pressure of a pneumatic item. If it has reached this maximum, it won't + * explode, but it wouldn't (try to) charge either. * * @param iStack the stack from which the maximum pressure is asked. * @return maximum pressure in bar. diff --git a/src/api/java/pneumaticCraft/api/item/IProgrammable.java b/src/api/java/pneumaticCraft/api/item/IProgrammable.java index 8e706206..259a22e3 100644 --- a/src/api/java/pneumaticCraft/api/item/IProgrammable.java +++ b/src/api/java/pneumaticCraft/api/item/IProgrammable.java @@ -3,30 +3,34 @@ package pneumaticCraft.api.item; import net.minecraft.item.ItemStack; /** - * Implement this for items that can get programmed in a Programmer. - * For now the only thing you can do with this is make program storages, later more interaction with programming puzzles is planned. - * Puzzle pieces will be written onto the implementer's itemstack NBT, using the "progWidget" tag. + * Implement this for items that can get programmed in a Programmer. For now the only thing you can do with this is make + * program storages, later more interaction with programming puzzles is planned. Puzzle pieces will be written onto the + * implementer's itemstack NBT, using the "progWidget" tag. */ public interface IProgrammable { /** - * When returned true, this stack is allowed to be programmed. - * Used to allow certain damage values to be programmed while others can't. + * When returned true, this stack is allowed to be programmed. Used to allow certain damage values to be programmed + * while others can't. + * * @param stack * @return */ public boolean canProgram(ItemStack stack); /** - * When returned true, Programming Puzzles are needed to program this item. When returned false, it's free to program. - * Drones and Network API's return true in PneumaticCraft, Network Storages return false. + * When returned true, Programming Puzzles are needed to program this item. When returned false, it's free to + * program. Drones and Network API's return true in PneumaticCraft, Network Storages return false. + * * @param stack * @return */ public boolean usesPieces(ItemStack stack); /** - * When returned true, the implementing item will get a tooltip added of the summary of puzzles used in the stored program. + * When returned true, the implementing item will get a tooltip added of the summary of puzzles used in the stored + * program. + * * @return */ public boolean showProgramTooltip(); diff --git a/src/api/java/pneumaticCraft/api/item/ItemSupplier.java b/src/api/java/pneumaticCraft/api/item/ItemSupplier.java index eb59c3ab..e8093165 100644 --- a/src/api/java/pneumaticCraft/api/item/ItemSupplier.java +++ b/src/api/java/pneumaticCraft/api/item/ItemSupplier.java @@ -1,47 +1,25 @@ package pneumaticCraft.api.item; -import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.item.Item; +import cpw.mods.fml.common.registry.GameRegistry; + public class ItemSupplier { + public static Item getItem(String itemName) { return GameRegistry.findItem("PneumaticCraft", itemName); } /* - The following is a list of all the item names that can be passed as argument in getItem(String) to get a PneumaticCraft item. - - GPSTool Currently tracked coordinated is stored in NBT, with 'x', 'y', 'z' being the tag names for the x,y and z positions respectively. - machineUpgrade damage value = upgrade type. - ingotIronCompressed - pressureGauge - stoneBase - cannonBarrel - turbineBlade - plasticPlant damage value = plant type. Mapped the same as Vanilla dye in terms of color. - plastic damage value = plastic type. Mapped the same as Vanilla dye in terms of color. - airCanister implements IPressurizable - vortexCannon implements IPressurizable - pneumaticCylinder - pneumaticHelmet implements IPressurizable - manometer implements IPressurizable - turbineRotor - assemblyProgram damage value = program type. - emptyPCB - unassembledPCB - PCBBlueprint - bucketEtchingAcid - transistor - capacitor - printedCircuitBoard - failedPCB - networkComponent damage value = network component type. - stopWorm - nukeVirus - compressedIronGear - pneumaticWrench implements IPressurizable - - - - */ + * The following is a list of all the item names that can be passed as argument in getItem(String) to get a + * PneumaticCraft item. GPSTool Currently tracked coordinated is stored in NBT, with 'x', 'y', 'z' being the tag + * names for the x,y and z positions respectively. machineUpgrade damage value = upgrade type. ingotIronCompressed + * pressureGauge stoneBase cannonBarrel turbineBlade plasticPlant damage value = plant type. Mapped the same as + * Vanilla dye in terms of color. plastic damage value = plastic type. Mapped the same as Vanilla dye in terms of + * color. airCanister implements IPressurizable vortexCannon implements IPressurizable pneumaticCylinder + * pneumaticHelmet implements IPressurizable manometer implements IPressurizable turbineRotor assemblyProgram damage + * value = program type. emptyPCB unassembledPCB PCBBlueprint bucketEtchingAcid transistor capacitor + * printedCircuitBoard failedPCB networkComponent damage value = network component type. stopWorm nukeVirus + * compressedIronGear pneumaticWrench implements IPressurizable + */ } diff --git a/src/api/java/pneumaticCraft/api/recipe/AssemblyRecipe.java b/src/api/java/pneumaticCraft/api/recipe/AssemblyRecipe.java index b813e2ed..66bcf228 100644 --- a/src/api/java/pneumaticCraft/api/recipe/AssemblyRecipe.java +++ b/src/api/java/pneumaticCraft/api/recipe/AssemblyRecipe.java @@ -2,11 +2,13 @@ package pneumaticCraft.api.recipe; import java.util.ArrayList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class AssemblyRecipe { + public static List drillRecipes = new ArrayList(); public static List laserRecipes = new ArrayList(); public static List drillLaserRecipes = new ArrayList(); diff --git a/src/api/java/pneumaticCraft/api/recipe/IPressureChamberRecipe.java b/src/api/java/pneumaticCraft/api/recipe/IPressureChamberRecipe.java index 8797da8b..ee9dc2ca 100644 --- a/src/api/java/pneumaticCraft/api/recipe/IPressureChamberRecipe.java +++ b/src/api/java/pneumaticCraft/api/recipe/IPressureChamberRecipe.java @@ -6,28 +6,34 @@ public interface IPressureChamberRecipe { /** * Returns the threshold which is minimal to craft the recipe. Negative pressures also work. + * * @return threshold pressure */ public float getCraftingPressure(); /** * This method should return the used items in the recipe when the right items are provided to craft this recipe. + * * @param inputStacks * @return usedStacks, return null when the inputStacks aren't valid for this recipe. */ public ItemStack[] isValidRecipe(ItemStack[] inputStacks); /** - * When returned true, only the exact same references of the stacks returned by isValidRecipe() will be removed. This is useful - * to remove stacks with a certain NBT value (like Enchanted Books). Return false for normal behaviour. + * When returned true, only the exact same references of the stacks returned by isValidRecipe() will be removed. + * This is useful to remove stacks with a certain NBT value (like Enchanted Books). Return false for normal + * behaviour. + * * @return true if exact stacks should be removed only. */ public boolean shouldRemoveExactStacks(); /** - * This method will be called when the recipe should output its items. the stacks the recipe output, may be dependent on the input stacks. + * This method will be called when the recipe should output its items. the stacks the recipe output, may be + * dependent on the input stacks. + * * @param removedStacks same reference to the stacks returned by isValidRecipe. - * @param inputStacks. These stacks can be modified (like adding/removing NBT data eg.) + * @param inputStacks. These stacks can be modified (like adding/removing NBT data eg.) * @return outputStacks. Stacks that will pop 'out of the chamber' */ public ItemStack[] craftRecipe(ItemStack[] inputStacks, ItemStack[] removedStacks); diff --git a/src/api/java/pneumaticCraft/api/recipe/PressureChamberRecipe.java b/src/api/java/pneumaticCraft/api/recipe/PressureChamberRecipe.java index 816f2601..12d447c4 100644 --- a/src/api/java/pneumaticCraft/api/recipe/PressureChamberRecipe.java +++ b/src/api/java/pneumaticCraft/api/recipe/PressureChamberRecipe.java @@ -2,9 +2,11 @@ package pneumaticCraft.api.recipe; import java.util.ArrayList; import java.util.List; + import net.minecraft.item.ItemStack; public class PressureChamberRecipe { + public static List chamberRecipes = new ArrayList(); public static List specialRecipes = new ArrayList(); diff --git a/src/api/java/pneumaticCraft/api/tileentity/AirHandlerSupplier.java b/src/api/java/pneumaticCraft/api/tileentity/AirHandlerSupplier.java index 749845a6..7c5f37f4 100644 --- a/src/api/java/pneumaticCraft/api/tileentity/AirHandlerSupplier.java +++ b/src/api/java/pneumaticCraft/api/tileentity/AirHandlerSupplier.java @@ -3,6 +3,7 @@ package pneumaticCraft.api.tileentity; import java.lang.reflect.Constructor; public class AirHandlerSupplier { + private static Constructor airHandlerConstructor; public static IAirHandler getTierOneAirHandler(int volume) { @@ -14,18 +15,21 @@ public class AirHandlerSupplier { } /** - * Returns a new instance of an IAirHandler. This handler handles everything pressurized air related: Air dispersion, - * blowing up when the pressure gets too high, providing a method for releasing air into the atmosphere... - * PROVIDED THAT THE FOLLOWING METHODS ARE FORWARDED TO THIS INSTANCE: + * Returns a new instance of an IAirHandler. This handler handles everything pressurized air related: Air + * dispersion, blowing up when the pressure gets too high, providing a method for releasing air into the + * atmosphere... PROVIDED THAT THE FOLLOWING METHODS ARE FORWARDED TO THIS INSTANCE: * {@link net.minecraft.tileentity.TileEntity#updateEntity()}, * {@link net.minecraft.tileentity.TileEntity#writeToNBT(net.minecraft.nbt.NBTTagCompound)} * {@link net.minecraft.tileentity.TileEntity#readFromNBT(net.minecraft.nbt.NBTTagCompound)} * {@link net.minecraft.tileentity.TileEntity#validate()} - * @param dangerPressure minimal pressure on which this machine can explode (the yellow to red transition) + * + * @param dangerPressure minimal pressure on which this machine can explode (the yellow to red transition) * @param criticalPressure the absolute maximum pressure the machine can take 7 bar in tier 1 machines. - * @param maxFlow maximum mL/tick that this machine can disperse. Tier one machines do 50mL/tick while Tier two have 200mL/tick. - * @param volume Volume of the machine's internal storage. These vary from 1000mL for small machines to 10,000mL for the big ones. - * The higher the volume the slower the machine will charge/discharge. + * @param maxFlow maximum mL/tick that this machine can disperse. Tier one machines do 50mL/tick while Tier + * two have 200mL/tick. + * @param volume Volume of the machine's internal storage. These vary from 1000mL for small machines to + * 10,000mL for the big ones. The higher the volume the slower the machine will + * charge/discharge. * @return */ public static IAirHandler getAirHandler(float dangerPressure, float criticalPressure, int volume) { diff --git a/src/api/java/pneumaticCraft/api/tileentity/IAirHandler.java b/src/api/java/pneumaticCraft/api/tileentity/IAirHandler.java index 28e4c2b8..35c0a6ff 100644 --- a/src/api/java/pneumaticCraft/api/tileentity/IAirHandler.java +++ b/src/api/java/pneumaticCraft/api/tileentity/IAirHandler.java @@ -1,44 +1,51 @@ package pneumaticCraft.api.tileentity; import java.util.List; + import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; + import org.apache.commons.lang3.tuple.Pair; /** - * A way for you to access about everything you need from a pneumatic machine. - * DO NOT IMPLEMENT THIS YOURSELF! Use AirHandlerSupplier to get an instance for your TileEntity, and implement IPneumaticMachine instead. + * A way for you to access about everything you need from a pneumatic machine. DO NOT IMPLEMENT THIS YOURSELF! Use + * AirHandlerSupplier to get an instance for your TileEntity, and implement IPneumaticMachine instead. */ public interface IAirHandler extends IManoMeasurable { /** - * -----------Needs to be forwarded by the implementing TileEntity's updateEntity() method. - * Updates the pneumatic machine's logic like air dispersion and checking if it needs to explode. + * -----------Needs to be forwarded by the implementing TileEntity's updateEntity() method. Updates the pneumatic + * machine's logic like air dispersion and checking if it needs to explode. */ public void updateEntityI(); /** * -----------Needs to be forwarded by the implementing TileEntity. + * * @param nbt */ public void readFromNBTI(NBTTagCompound nbt); /** * -----------Needs to be forwarded by the implementing TileEntity. + * * @param nbt */ public void writeToNBTI(NBTTagCompound nbt); /** * -----------Needs to be forwarded by the implementing TileEntity with itself as parameter. + * * @param parent TileEntity that is referencing this air handler. */ public void validateI(TileEntity parent); /** - * Method to release air in the air. It takes air from a specific side, plays a sound effect, and spawns smoke particles. - * It automatically detects if it needs to release air (when under pressure), suck air (when in vacuum) or do nothing. + * Method to release air in the air. It takes air from a specific side, plays a sound effect, and spawns smoke + * particles. It automatically detects if it needs to release air (when under pressure), suck air (when in vacuum) + * or do nothing. + * * @param side */ public void airLeak(ForgeDirection side); @@ -49,8 +56,9 @@ public interface IAirHandler extends IManoMeasurable { public List> getConnectedPneumatics(); /** - * Adds air to the tank of the given side of this TE. It also updates clients where needed (when they have a GUI opened). - * Deprecated: use the version with the integer parameter now. + * Adds air to the tank of the given side of this TE. It also updates clients where needed (when they have a GUI + * opened). Deprecated: use the version with the integer parameter now. + * * @param amount * @param side */ @@ -60,10 +68,10 @@ public interface IAirHandler extends IManoMeasurable { public void addAir(int amount, ForgeDirection side); /** - * Sets the volume of this TE's air tank. When the volume decreases the pressure will remain the same, meaning air will - * be lost. When the volume increases, the air remains the same, meaning the pressure will drop. - * Used in the Volume Upgrade calculations. - * Deprecated: use the version with the integer parameter now. + * Sets the volume of this TE's air tank. When the volume decreases the pressure will remain the same, meaning air + * will be lost. When the volume increases, the air remains the same, meaning the pressure will drop. Used in the + * Volume Upgrade calculations. Deprecated: use the version with the integer parameter now. + * * @param newVolume */ @Deprecated @@ -75,6 +83,7 @@ public interface IAirHandler extends IManoMeasurable { /** * Returns the pressure at which this TE will explode. + * * @return */ public float getMaxPressure(); @@ -83,14 +92,17 @@ public interface IAirHandler extends IManoMeasurable { /** * Returns the amount of air (that has a relation to the pressure: air = pressure * volume) + * * @param sideRequested * @return */ public int getCurrentAir(ForgeDirection sideRequested); /** - * When your TileEntity is implementing IInventory and has slots that accept PneumaticCraft upgrades, register these slots - * to the air handler by calling this method once on initialization of the TileEntity. Then they'll automatically be used to get Volume/Security upgrades. + * When your TileEntity is implementing IInventory and has slots that accept PneumaticCraft upgrades, register these + * slots to the air handler by calling this method once on initialization of the TileEntity. Then they'll + * automatically be used to get Volume/Security upgrades. + * * @param upgradeSlots all upgrade slots stored in an array. */ public void setUpgradeSlots(int... upgradeSlots); @@ -104,7 +116,8 @@ public interface IAirHandler extends IManoMeasurable { public int getZCoord(); /** - * Needs to be forwarded from the implementing _Block_! Forward the Block's "onNeighborChange" method to this handler. + * Needs to be forwarded from the implementing _Block_! Forward the Block's "onNeighborChange" method to this + * handler. */ public void onNeighborChange(); } diff --git a/src/api/java/pneumaticCraft/api/tileentity/IHeatExchanger.java b/src/api/java/pneumaticCraft/api/tileentity/IHeatExchanger.java index 53c68cf5..892c0055 100644 --- a/src/api/java/pneumaticCraft/api/tileentity/IHeatExchanger.java +++ b/src/api/java/pneumaticCraft/api/tileentity/IHeatExchanger.java @@ -1,21 +1,23 @@ package pneumaticCraft.api.tileentity; import net.minecraftforge.common.util.ForgeDirection; + import pneumaticCraft.api.IHeatExchangerLogic; /** - * Implemented by TileEntities or Blocks which transport heat. Keep in mind that when a Block is implementing it you only can give off a constant - * resistance/temperature (like Lava and Ice). - * @author MineMaarten - * www.minemaarten.com + * Implemented by TileEntities or Blocks which transport heat. Keep in mind that when a Block is implementing it you + * only can give off a constant resistance/temperature (like Lava and Ice). + * + * @author MineMaarten www.minemaarten.com */ public interface IHeatExchanger { /** - * Get an instance of IHeatExchangerLogic from PneumaticRegistry.getInstance().getHeatExchangerLogic() and keep a global reference. - * Then return it in this method. You can return different exchanger logics for different sides. Keep in mind that when you change - * a returned logic, you need to create a neighbor block change to notify the differences. You can return null to indicate no heat can - * be exchanged on that side. + * Get an instance of IHeatExchangerLogic from PneumaticRegistry.getInstance().getHeatExchangerLogic() and keep a + * global reference. Then return it in this method. You can return different exchanger logics for different sides. + * Keep in mind that when you change a returned logic, you need to create a neighbor block change to notify the + * differences. You can return null to indicate no heat can be exchanged on that side. + * * @param side * @return */ diff --git a/src/api/java/pneumaticCraft/api/tileentity/IManoMeasurable.java b/src/api/java/pneumaticCraft/api/tileentity/IManoMeasurable.java index c0db2869..c89558fd 100644 --- a/src/api/java/pneumaticCraft/api/tileentity/IManoMeasurable.java +++ b/src/api/java/pneumaticCraft/api/tileentity/IManoMeasurable.java @@ -1,12 +1,16 @@ package pneumaticCraft.api.tileentity; import java.util.List; + import net.minecraft.entity.player.EntityPlayer; public interface IManoMeasurable { + /** - * This method is invoked by the Manometer when a player right-clicks a TE or Entity with this interface implemented. - * @param player that rightclicks the measurable TE, and therefore needs to get the message + * This method is invoked by the Manometer when a player right-clicks a TE or Entity with this interface + * implemented. + * + * @param player that rightclicks the measurable TE, and therefore needs to get the message * @param curInfo list you can append info to. If you don't append any info no air will be used. */ public void printManometerMessage(EntityPlayer player, List curInfo); diff --git a/src/api/java/pneumaticCraft/api/tileentity/IPneumaticMachine.java b/src/api/java/pneumaticCraft/api/tileentity/IPneumaticMachine.java index a0f4a07a..061f48ec 100644 --- a/src/api/java/pneumaticCraft/api/tileentity/IPneumaticMachine.java +++ b/src/api/java/pneumaticCraft/api/tileentity/IPneumaticMachine.java @@ -5,24 +5,27 @@ import net.minecraftforge.common.util.ForgeDirection; public interface IPneumaticMachine { /** - * In your TileEntity class which is implementing this interface you should keep a reference of an IAirHandler. - * You can retrieve one by calling {@link AirHandlerSupplier#getAirHandler(net.minecraft.tileentity.TileEntity, float, float, float, float)}. - * Do this when your TileEntity is initialized, i.e. xCoord,yCoord,zCoord and worldObj have a value. - * In this method you need to return this reference. + * In your TileEntity class which is implementing this interface you should keep a reference of an IAirHandler. You + * can retrieve one by calling + * {@link AirHandlerSupplier#getAirHandler(net.minecraft.tileentity.TileEntity, float, float, float, float)}. Do + * this when your TileEntity is initialized, i.e. xCoord,yCoord,zCoord and worldObj have a value. In this method you + * need to return this reference. * * IMPORTANT: You need to forward the {@link net.minecraft.tileentity.TileEntity#updateEntity()}, * {@link net.minecraft.tileentity.TileEntity#writeToNBT(net.minecraft.nbt.NBTTagCompound)} , * {@link net.minecraft.tileentity.TileEntity#readFromNBT(net.minecraft.nbt.NBTTagCompound)} and * {@link net.minecraft.tileentity.TileEntity#validate()} (with the implementing TileEntity as additional parameter) - * to the IAirHandler. - * Apart from that you'll need to forward {@link net.minecraft.block.Block#onNeighborChange(net.minecraft.world.IBlockAccess, int, int, int, int, int, int)} + * to the IAirHandler. Apart from that you'll need to forward + * {@link net.minecraft.block.Block#onNeighborChange(net.minecraft.world.IBlockAccess, int, int, int, int, int, int)} * from the implementing block to the IAirHandler. + * * @return */ public IAirHandler getAirHandler(); /** * Returns true if the pneumatic logic is connected to the given side. + * * @param side * @return */ diff --git a/src/api/java/pneumaticCraft/api/universalSensor/EntityPollSensor.java b/src/api/java/pneumaticCraft/api/universalSensor/EntityPollSensor.java index 9ec931cd..55c405f8 100644 --- a/src/api/java/pneumaticCraft/api/universalSensor/EntityPollSensor.java +++ b/src/api/java/pneumaticCraft/api/universalSensor/EntityPollSensor.java @@ -1,6 +1,7 @@ package pneumaticCraft.api.universalSensor; import java.util.List; + import net.minecraft.entity.Entity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; diff --git a/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinateEventSensor.java b/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinateEventSensor.java index 24da4319..b051af5f 100644 --- a/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinateEventSensor.java +++ b/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinateEventSensor.java @@ -1,20 +1,27 @@ package pneumaticCraft.api.universalSensor; -import cpw.mods.fml.common.eventhandler.Event; import java.util.List; + import net.minecraft.client.gui.FontRenderer; import net.minecraft.tileentity.TileEntity; + import org.lwjgl.util.Rectangle; +import cpw.mods.fml.common.eventhandler.Event; + public interface IBlockAndCoordinateEventSensor { + /** * See {@link ISensorSetting#getSensorPath()} + * * @return */ public String getSensorPath(); /** - * Extended version of the normal emitRedstoneOnEvent. This method will only invoke with a valid GPS tool, and when the coordinate is within range. + * Extended version of the normal emitRedstoneOnEvent. This method will only invoke with a valid GPS tool, and when + * the coordinate is within range. + * * @param event * @param sensor * @param range @@ -27,12 +34,14 @@ public interface IBlockAndCoordinateEventSensor { /** * See {@link IEventSensorSetting#getRedstonePulseLength()} + * * @return */ public int getRedstonePulseLength(); /** * See {@link ISensorSetting#needsTextBox()} + * * @return */ public boolean needsTextBox(); @@ -44,12 +53,14 @@ public interface IBlockAndCoordinateEventSensor { /** * See {@link ISensorSetting#getDescription()} + * * @return */ public List getDescription(); /** * Called by GuiScreen#drawScreen this method can be used to render additional things like status/info text. + * * @param fontRenderer */ public void drawAdditionalInfo(FontRenderer fontRenderer); diff --git a/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinatePollSensor.java b/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinatePollSensor.java index 813a58cf..d3d9ea4e 100644 --- a/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinatePollSensor.java +++ b/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinatePollSensor.java @@ -1,38 +1,47 @@ package pneumaticCraft.api.universalSensor; import java.util.List; + import net.minecraft.client.gui.FontRenderer; import net.minecraft.world.World; + import org.lwjgl.util.Rectangle; public interface IBlockAndCoordinatePollSensor { + /** * See {@link ISensorSetting#getSensorPath()} + * * @return */ public String getSensorPath(); /** * See {@link ISensorSetting#needsTextBox()} + * * @return */ public boolean needsTextBox(); /** * See {@link ISensorSetting#needsSlot()} + * * @return */ public Rectangle needsSlot(); /** * See {@link ISensorSetting#getDescription()} + * * @return */ public List getDescription(); /** - * See {@link IPollSensorSetting#getRedstoneValue(World, int, int, int, int, String)} , but this has the GPS tracked coordinates - * as extra parameters. This method will only be called when the coordinate is within the Universal Sensor's range. + * See {@link IPollSensorSetting#getRedstoneValue(World, int, int, int, int, String)} , but this has the GPS tracked + * coordinates as extra parameters. This method will only be called when the coordinate is within the Universal + * Sensor's range. + * * @param world * @param x * @param y @@ -44,17 +53,19 @@ public interface IBlockAndCoordinatePollSensor { * @param toolZ * @return */ - public int getRedstoneValue( - World world, int x, int y, int z, int sensorRange, String textBoxText, int toolX, int toolY, int toolZ); + public int getRedstoneValue(World world, int x, int y, int z, int sensorRange, String textBoxText, int toolX, + int toolY, int toolZ); /** * See {@link IPollSensorSetting#getPollFrequency()} + * * @return */ public int getPollFrequency(); /** * Called by GuiScreen#drawScreen this method can be used to render additional things like status/info text. + * * @param fontRenderer */ public void drawAdditionalInfo(FontRenderer fontRenderer); diff --git a/src/api/java/pneumaticCraft/api/universalSensor/IEventSensorSetting.java b/src/api/java/pneumaticCraft/api/universalSensor/IEventSensorSetting.java index 970ab65b..4bd39ddd 100644 --- a/src/api/java/pneumaticCraft/api/universalSensor/IEventSensorSetting.java +++ b/src/api/java/pneumaticCraft/api/universalSensor/IEventSensorSetting.java @@ -1,12 +1,14 @@ package pneumaticCraft.api.universalSensor; -import cpw.mods.fml.common.eventhandler.Event; import net.minecraft.tileentity.TileEntity; +import cpw.mods.fml.common.eventhandler.Event; + public interface IEventSensorSetting extends ISensorSetting { /** * This method is only invoked when a subscribed event is triggered. + * * @param event * @param sensor * @param range @@ -17,6 +19,7 @@ public interface IEventSensorSetting extends ISensorSetting { /** * Should return how long a pulse should hold in ticks. By default this is 5 ticks (1/4 second). + * * @return */ public int getRedstonePulseLength(); diff --git a/src/api/java/pneumaticCraft/api/universalSensor/IPollSensorSetting.java b/src/api/java/pneumaticCraft/api/universalSensor/IPollSensorSetting.java index 06467fe3..d34d312c 100644 --- a/src/api/java/pneumaticCraft/api/universalSensor/IPollSensorSetting.java +++ b/src/api/java/pneumaticCraft/api/universalSensor/IPollSensorSetting.java @@ -5,8 +5,9 @@ import net.minecraft.world.World; public interface IPollSensorSetting extends ISensorSetting { /** - * The value returned here is the interval between every check in ticks (the interval of calling getRedstoneValue()). - * Consider increasing the interval when your sensor method is resource intensive. + * The value returned here is the interval between every check in ticks (the interval of calling + * getRedstoneValue()). Consider increasing the interval when your sensor method is resource intensive. + * * @return */ public int getPollFrequency(); @@ -14,6 +15,7 @@ public interface IPollSensorSetting extends ISensorSetting { /** * The base method. This method should return the outputted redstone value 0-15 of this sensor. When this sensor is * digital, just return 0 or 15. + * * @param world * @param x * @param y diff --git a/src/api/java/pneumaticCraft/api/universalSensor/ISensorSetting.java b/src/api/java/pneumaticCraft/api/universalSensor/ISensorSetting.java index 9ad11080..387cdeb4 100644 --- a/src/api/java/pneumaticCraft/api/universalSensor/ISensorSetting.java +++ b/src/api/java/pneumaticCraft/api/universalSensor/ISensorSetting.java @@ -1,56 +1,57 @@ package pneumaticCraft.api.universalSensor; import java.util.List; + import net.minecraft.client.gui.FontRenderer; + import org.lwjgl.util.Rectangle; public interface ISensorSetting { + /** - * Should return the button path the player has to follow in which this setting is stored. - * For instance, when the sensor should be located in player and is called speed, you should return "entityTracker/player/speed". - * "entityTracker" indicates that this sensor needs an Entity Tracker upgrade to run. You can choose from the following upgrades: + * Should return the button path the player has to follow in which this setting is stored. For instance, when the + * sensor should be located in player and is called speed, you should return "entityTracker/player/speed". + * "entityTracker" indicates that this sensor needs an Entity Tracker upgrade to run. You can choose from the + * following upgrades: * - * -entityTracker - * -blockTracker - * -gpsTool (so you can use a certain coordinate (within range) to measure on) - * -volume - * -dispenser - * -speed - * -itemLife - * -itemSearch - * -coordinateTracker - * -range - * -security + * -entityTracker -blockTracker -gpsTool (so you can use a certain coordinate (within range) to measure on) -volume + * -dispenser -speed -itemLife -itemSearch -coordinateTracker -range -security * * You can allow only sensors to work by more than one upgrade, by seperating the upgrades with a '_'. For example, - * "entityTracker_speed" will only let the sensor be chosen when both an Entity Tracker and a Speed Upgrade are inserted. + * "entityTracker_speed" will only let the sensor be chosen when both an Entity Tracker and a Speed Upgrade are + * inserted. + * * @return */ public String getSensorPath(); /** * When returned true, the GUI will enable the textbox writing, otherwise not. + * * @return */ public boolean needsTextBox(); /** * Called by GuiScreen#drawScreen this method can be used to render additional things like status/info text. + * * @param fontRenderer */ public void drawAdditionalInfo(FontRenderer fontRenderer); /** - * Should return the description of this sensor displayed in the GUI stat. Information should at least include - * when this sensor emits redstone and how (analog (1 through 15), or digital). + * Should return the description of this sensor displayed in the GUI stat. Information should at least include when + * this sensor emits redstone and how (analog (1 through 15), or digital). + * * @return */ public List getDescription(); /** - * Not being used at the moment, I recommend returning null for now. It is going to be used to allow sensors to decide their - * status on a item which can be inserted in a slot in the GUI if this method returns a rectangle with the coordinates of - * the slot. + * Not being used at the moment, I recommend returning null for now. It is going to be used to allow sensors to + * decide their status on a item which can be inserted in a slot in the GUI if this method returns a rectangle with + * the coordinates of the slot. + * * @return */ public Rectangle needsSlot(); diff --git a/src/api/java/pneumaticCraft/api/universalSensor/PlayerEventSensor.java b/src/api/java/pneumaticCraft/api/universalSensor/PlayerEventSensor.java index 55c6e606..843017a5 100644 --- a/src/api/java/pneumaticCraft/api/universalSensor/PlayerEventSensor.java +++ b/src/api/java/pneumaticCraft/api/universalSensor/PlayerEventSensor.java @@ -1,10 +1,11 @@ package pneumaticCraft.api.universalSensor; -import cpw.mods.fml.common.eventhandler.Event; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.event.entity.player.PlayerEvent; +import cpw.mods.fml.common.eventhandler.Event; + public abstract class PlayerEventSensor implements IEventSensorSetting { @Override diff --git a/src/api/java/pneumaticCraft/api/universalSensor/SensorRegistrator.java b/src/api/java/pneumaticCraft/api/universalSensor/SensorRegistrator.java index 1d051a44..60aca526 100644 --- a/src/api/java/pneumaticCraft/api/universalSensor/SensorRegistrator.java +++ b/src/api/java/pneumaticCraft/api/universalSensor/SensorRegistrator.java @@ -4,28 +4,34 @@ package pneumaticCraft.api.universalSensor; * With this class you can register your own sensors. */ public class SensorRegistrator { + /** - * This field will be initialized in the PreInit phase of PneumaticCraft's loading phase. - * With this field you can register every Universal Sensor sensor you want. Just pass a new instance - * to one of the registerSensor methods. Sensors are singletons. + * This field will be initialized in the PreInit phase of PneumaticCraft's loading phase. With this field you can + * register every Universal Sensor sensor you want. Just pass a new instance to one of the registerSensor methods. + * Sensors are singletons. */ public static ISensorRegistrator sensorRegistrator; public static interface ISensorRegistrator { + /** - * Registry for IPollSensorSetting, EntityPollSensor and IEventSensorSetting, and any other instance of ISensorSetting. + * Registry for IPollSensorSetting, EntityPollSensor and IEventSensorSetting, and any other instance of + * ISensorSetting. + * * @param sensor */ public void registerSensor(ISensorSetting sensor); /** * Registry for IBlockAndCoordinateEventSensor + * * @param sensor */ public void registerSensor(IBlockAndCoordinateEventSensor sensor); /** * Registry for IBlockAndCoordinatePollSensor + * * @param sensor */ public void registerSensor(IBlockAndCoordinatePollSensor sensor); diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index fcd93c7a..533278a4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -1,5 +1,45 @@ package WayofTime.alchemicalWizardry; +import java.io.File; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.HashMap; +import java.util.List; +import java.util.zip.ZipEntry; +import java.util.zip.ZipInputStream; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.Item.ToolMaterial; +import net.minecraft.item.ItemArmor.ArmorMaterial; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.WeightedRandomChestContent; +import net.minecraftforge.common.ChestGenHooks; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.util.EnumHelper; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.oredict.OreDictionary; +import net.minecraftforge.oredict.RecipeSorter; +import net.minecraftforge.oredict.RecipeSorter.Category; + +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import thaumcraft.api.ItemApi; +import thaumcraft.api.ThaumcraftApi; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; import WayofTime.alchemicalWizardry.api.BlockStack; import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; @@ -65,43 +105,6 @@ import cpw.mods.fml.common.event.*; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; -import java.io.File; -import java.io.FileOutputStream; -import java.io.InputStream; -import java.lang.reflect.Constructor; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.util.HashMap; -import java.util.List; -import java.util.zip.ZipEntry; -import java.util.zip.ZipInputStream; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.Item.ToolMaterial; -import net.minecraft.item.ItemArmor.ArmorMaterial; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.WeightedRandomChestContent; -import net.minecraftforge.common.ChestGenHooks; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.EnumHelper; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.oredict.OreDictionary; -import net.minecraftforge.oredict.RecipeSorter; -import net.minecraftforge.oredict.RecipeSorter.Category; -import org.apache.logging.log4j.Level; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import thaumcraft.api.ItemApi; -import thaumcraft.api.ThaumcraftApi; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.AspectList; @Mod( modid = "AWWayofTime", @@ -110,6 +113,7 @@ import thaumcraft.api.aspects.AspectList; dependencies = "after:CodeChickenLib@[1.1.5.7,);" + "after:NotEnoughItems@[2.3.20-GTNH,)", guiFactory = "WayofTime.alchemicalWizardry.client.gui.ConfigGuiFactory") public class AlchemicalWizardry { + public static boolean parseTextFiles = false; public static boolean doMeteorsDestroyBlocks = true; @@ -354,6 +358,7 @@ public class AlchemicalWizardry { public static Logger logger = LogManager.getLogger("BloodMagic"); public static CreativeTabs tabBloodMagic = new CreativeTabs("tabBloodMagic") { + @Override public ItemStack getIconItemStack() { return new ItemStack(ModItems.weakBloodOrb, 1, 0); @@ -365,10 +370,10 @@ public class AlchemicalWizardry { } }; - public static ToolMaterial bloodBoundToolMaterial = - EnumHelper.addToolMaterial("BoundBlood", 4, 1000, 12.0f, 8.0f, 50); - public static ArmorMaterial sanguineArmourArmourMaterial = - EnumHelper.addArmorMaterial("SanguineArmour", 33, new int[] {3, 8, 6, 3}, 30); + public static ToolMaterial bloodBoundToolMaterial = EnumHelper + .addToolMaterial("BoundBlood", 4, 1000, 12.0f, 8.0f, 50); + public static ArmorMaterial sanguineArmourArmourMaterial = EnumHelper + .addArmorMaterial("SanguineArmour", 33, new int[] { 3, 8, 6, 3 }, 30); // Dungeon loot chances public static int standardBindingAgentDungeonChance; @@ -406,7 +411,7 @@ public class AlchemicalWizardry { public static String entityMinorDemonGruntGuardianEarthID = "AW024"; public static boolean isDemonRitualCreativeOnly = false; - public static int[] demonRitualDimensionBlacklist = new int[] {0}; + public static int[] demonRitualDimensionBlacklist = new int[] { 0 }; public static Fluid lifeEssenceFluid; @@ -428,8 +433,8 @@ public class AlchemicalWizardry { if (!bmDirectory.exists() && bmDirectory.mkdirs()) { try { - InputStream in = AlchemicalWizardry.class.getResourceAsStream( - "/assets/alchemicalwizardry/schematics/building/buildings.zip"); + InputStream in = AlchemicalWizardry.class + .getResourceAsStream("/assets/alchemicalwizardry/schematics/building/buildings.zip"); logger.info("none yet!"); if (in != null) { logger.info("I have found a zip!"); @@ -451,8 +456,7 @@ public class AlchemicalWizardry { out.close(); } } - } catch (Exception e) { - } + } catch (Exception e) {} } TEDemonPortal.loadBuildingList(); @@ -493,7 +497,10 @@ public class AlchemicalWizardry { ModItems.registerItems(); RecipeSorter.register( - "AWWayofTime:shapedorb", ShapedBloodOrbRecipe.class, Category.SHAPED, "before:minecraft:shapeless"); + "AWWayofTime:shapedorb", + ShapedBloodOrbRecipe.class, + Category.SHAPED, + "before:minecraft:shapeless"); RecipeSorter.register( "AWWayofTime:shapelessorb", ShapelessBloodOrbRecipe.class, @@ -613,33 +620,44 @@ public class AlchemicalWizardry { ItemStack magicalesStack = new ItemStack(ModItems.magicales); // All crafting goes here GameRegistry.addRecipe( - sacrificialDaggerStack, "ggg", " dg", "i g", 'g', glassStack, 'd', goldIngotStack, 'i', ironIngotStack); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - lavaCrystalStackCrafted, - "glg", - "lbl", - "odo", + sacrificialDaggerStack, + "ggg", + " dg", + "i g", 'g', glassStack, - 'l', - lavaBucketStack, - 'b', - weakBloodOrbStack, 'd', - diamondStack, - 'o', - obsidianStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - waterSigilStackCrafted, - "www", - "wbw", - "wow", - 'w', - waterBucketStack, - 'b', - blankSlateStack, - 'o', - weakBloodOrbStack)); + goldIngotStack, + 'i', + ironIngotStack); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + lavaCrystalStackCrafted, + "glg", + "lbl", + "odo", + 'g', + glassStack, + 'l', + lavaBucketStack, + 'b', + weakBloodOrbStack, + 'd', + diamondStack, + 'o', + obsidianStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + waterSigilStackCrafted, + "www", + "wbw", + "wow", + 'w', + waterBucketStack, + 'b', + blankSlateStack, + 'o', + weakBloodOrbStack)); GameRegistry.addRecipe( lavaSigilStackCrafted, "lml", @@ -653,19 +671,20 @@ public class AlchemicalWizardry { magmaCreamStack, 'c', lavaCrystalStack); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - voidSigilStackCrafted, - "ese", - "ere", - "eoe", - 'e', - emptyBucketStack, - 'r', - reinforcedSlateStack, - 'o', - apprenticeBloodOrbStack, - 's', - stringStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + voidSigilStackCrafted, + "ese", + "ere", + "eoe", + 'e', + emptyBucketStack, + 'r', + reinforcedSlateStack, + 'o', + apprenticeBloodOrbStack, + 's', + stringStack)); GameRegistry.addRecipe( bloodAltarStack, "s s", @@ -679,17 +698,18 @@ public class AlchemicalWizardry { diamondStack, 'g', goldIngotStack); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - bloodRuneCraftedStack, - "sss", - "ror", - "sss", - 's', - stoneStack, - 'o', - weakBloodOrbStack, - 'r', - blankSlateStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + bloodRuneCraftedStack, + "sss", + "ror", + "sss", + 's', + stoneStack, + 'o', + weakBloodOrbStack, + 'r', + blankSlateStack)); GameRegistry.addRecipe( speedRuneStack, "sbs", @@ -703,244 +723,271 @@ public class AlchemicalWizardry { bloodRuneStack, 'b', blankSlateStack); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - new ItemStack(ModBlocks.bloodRune, 1, 1), - "sbs", - "bob", - "srs", - 's', - stoneStack, - 'o', - magicianBloodOrbStack, - 'b', - emptyBucketStack, - 'r', - new ItemStack(ModItems.imbuedSlate))); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - new ItemStack(ModBlocks.bloodRune, 1, 2), - "sbs", - "bob", - "srs", - 's', - stoneStack, - 'o', - magicianBloodOrbStack, - 'b', - waterBucketStack, - 'r', - new ItemStack(ModItems.imbuedSlate))); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - new ItemStack(ModBlocks.bloodRune, 1, 3), - "sws", - "ror", - "sws", - 's', - stoneStack, - 'o', - new ItemStack(ModItems.masterBloodOrb), - 'w', - weakBloodOrbStack, - 'r', - new ItemStack(ModItems.demonicSlate))); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - new ItemStack(ModBlocks.bloodRune, 1, 4), - "srs", - "beb", - "sos", - 's', - obsidianStack, - 'o', - new ItemStack(ModItems.masterBloodOrb), - 'r', - new ItemStack(ModItems.demonicSlate), - 'b', - emptyBucketStack, - 'e', - new ItemStack(ModBlocks.bloodRune, 1, 1))); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - airSigilStack, - "fgf", - "fsf", - "fof", - 'f', - featherStack, - 'g', - ghastTearStack, - 's', - reinforcedSlateStack, - 'o', - apprenticeBloodOrbStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - miningSigilStackCrafted, - "sps", - "hra", - "sos", - 'o', - apprenticeBloodOrbStack, - 's', - stoneStack, - 'p', - ironPickaxeStack, - 'h', - ironShovelStack, - 'a', - ironAxeStack, - 'r', - reinforcedSlateStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - runeOfSacrificeStack, - "srs", - "gog", - "srs", - 's', - stoneStack, - 'g', - goldIngotStack, - 'o', - apprenticeBloodOrbStack, - 'r', - reinforcedSlateStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - runeOfSelfSacrificeStack, - "srs", - "gog", - "srs", - 's', - stoneStack, - 'g', - glowstoneDustStack, - 'o', - apprenticeBloodOrbStack, - 'r', - reinforcedSlateStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - divinationSigilStackCrafted, - "ggg", - "gsg", - "gog", - 'g', - glassStack, - 's', - blankSlateStack, - 'o', - weakBloodOrbStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - seerSigilStackCrafted, - "gbg", - "gsg", - "gog", - 'g', - glassStack, - 's', - divinationSigilStackCrafted, - 'o', - apprenticeBloodOrbStack, - 'b', - new ItemStack(ModItems.bucketLife))); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - ritualStoneStackCrafted, - "srs", - "ror", - "srs", - 's', - obsidianStack, - 'o', - apprenticeBloodOrbStack, - 'r', - reinforcedSlateStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - masterRitualStoneStack, - "brb", - "ror", - "brb", - 'b', - obsidianStack, - 'o', - magicianBloodOrbStack, - 'r', - ritualStoneStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - imperfectRitualStoneStack, - "bsb", - "sos", - "bsb", - 's', - stoneStack, - 'b', - obsidianStack, - 'o', - weakBloodOrbStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - sigilOfElementalAffinityStackCrafted, - "oao", - "wsl", - "oro", - 'o', - obsidianStack, - 'a', - airSigilStack, - 'w', - waterSigilStack, - 'l', - lavaSigilStack, - 'r', - magicianBloodOrbStack, - 's', - imbuedSlateStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - sigilOfHoldingStack, - "asa", - "srs", - "aoa", - 'a', - blankSlateStack, - 's', - stoneStack, - 'r', - imbuedSlateStack, - 'o', - magicianBloodOrbStack)); GameRegistry.addRecipe( - emptySocketStack, "bgb", "gdg", "bgb", 'b', weakBloodShardStack, 'g', glassStack, 'd', diamondStack); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - armourForgeStack, - "sfs", - "fof", - "sfs", - 'f', - bloodSocketStack, - 's', - stoneStack, - 'o', - magicianBloodOrbStack)); + new ShapedBloodOrbRecipe( + new ItemStack(ModBlocks.bloodRune, 1, 1), + "sbs", + "bob", + "srs", + 's', + stoneStack, + 'o', + magicianBloodOrbStack, + 'b', + emptyBucketStack, + 'r', + new ItemStack(ModItems.imbuedSlate))); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + new ItemStack(ModBlocks.bloodRune, 1, 2), + "sbs", + "bob", + "srs", + 's', + stoneStack, + 'o', + magicianBloodOrbStack, + 'b', + waterBucketStack, + 'r', + new ItemStack(ModItems.imbuedSlate))); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + new ItemStack(ModBlocks.bloodRune, 1, 3), + "sws", + "ror", + "sws", + 's', + stoneStack, + 'o', + new ItemStack(ModItems.masterBloodOrb), + 'w', + weakBloodOrbStack, + 'r', + new ItemStack(ModItems.demonicSlate))); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + new ItemStack(ModBlocks.bloodRune, 1, 4), + "srs", + "beb", + "sos", + 's', + obsidianStack, + 'o', + new ItemStack(ModItems.masterBloodOrb), + 'r', + new ItemStack(ModItems.demonicSlate), + 'b', + emptyBucketStack, + 'e', + new ItemStack(ModBlocks.bloodRune, 1, 1))); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + airSigilStack, + "fgf", + "fsf", + "fof", + 'f', + featherStack, + 'g', + ghastTearStack, + 's', + reinforcedSlateStack, + 'o', + apprenticeBloodOrbStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + miningSigilStackCrafted, + "sps", + "hra", + "sos", + 'o', + apprenticeBloodOrbStack, + 's', + stoneStack, + 'p', + ironPickaxeStack, + 'h', + ironShovelStack, + 'a', + ironAxeStack, + 'r', + reinforcedSlateStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + runeOfSacrificeStack, + "srs", + "gog", + "srs", + 's', + stoneStack, + 'g', + goldIngotStack, + 'o', + apprenticeBloodOrbStack, + 'r', + reinforcedSlateStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + runeOfSelfSacrificeStack, + "srs", + "gog", + "srs", + 's', + stoneStack, + 'g', + glowstoneDustStack, + 'o', + apprenticeBloodOrbStack, + 'r', + reinforcedSlateStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + divinationSigilStackCrafted, + "ggg", + "gsg", + "gog", + 'g', + glassStack, + 's', + blankSlateStack, + 'o', + weakBloodOrbStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + seerSigilStackCrafted, + "gbg", + "gsg", + "gog", + 'g', + glassStack, + 's', + divinationSigilStackCrafted, + 'o', + apprenticeBloodOrbStack, + 'b', + new ItemStack(ModItems.bucketLife))); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + ritualStoneStackCrafted, + "srs", + "ror", + "srs", + 's', + obsidianStack, + 'o', + apprenticeBloodOrbStack, + 'r', + reinforcedSlateStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + masterRitualStoneStack, + "brb", + "ror", + "brb", + 'b', + obsidianStack, + 'o', + magicianBloodOrbStack, + 'r', + ritualStoneStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + imperfectRitualStoneStack, + "bsb", + "sos", + "bsb", + 's', + stoneStack, + 'b', + obsidianStack, + 'o', + weakBloodOrbStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + sigilOfElementalAffinityStackCrafted, + "oao", + "wsl", + "oro", + 'o', + obsidianStack, + 'a', + airSigilStack, + 'w', + waterSigilStack, + 'l', + lavaSigilStack, + 'r', + magicianBloodOrbStack, + 's', + imbuedSlateStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + sigilOfHoldingStack, + "asa", + "srs", + "aoa", + 'a', + blankSlateStack, + 's', + stoneStack, + 'r', + imbuedSlateStack, + 'o', + magicianBloodOrbStack)); + GameRegistry.addRecipe( + emptySocketStack, + "bgb", + "gdg", + "bgb", + 'b', + weakBloodShardStack, + 'g', + glassStack, + 'd', + diamondStack); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + armourForgeStack, + "sfs", + "fof", + "sfs", + 'f', + bloodSocketStack, + 's', + stoneStack, + 'o', + magicianBloodOrbStack)); GameRegistry.addShapelessRecipe(largeBloodStoneBrickStackCrafted, weakBloodShardStack, stoneStack); GameRegistry.addRecipe(bloodStoneBrickStackCrafted, "bb", "bb", 'b', largeBloodStoneBrickStack); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - growthSigilStack, - "srs", - "rer", - "sos", - 's', - saplingStack, - 'r', - reedStack, - 'o', - apprenticeBloodOrbStack, - 'e', - reinforcedSlateStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - blockHomHeartStack, - "www", - "srs", - "sos", - 'w', - redWoolStack, - 's', - stoneStack, - 'r', - bloodRuneStack, - 'o', - apprenticeBloodOrbStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + growthSigilStack, + "srs", + "rer", + "sos", + 's', + saplingStack, + 'r', + reedStack, + 'o', + apprenticeBloodOrbStack, + 'e', + reinforcedSlateStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + blockHomHeartStack, + "www", + "srs", + "sos", + 'w', + redWoolStack, + 's', + stoneStack, + 'r', + bloodRuneStack, + 'o', + apprenticeBloodOrbStack)); GameRegistry.addShapelessRecipe( new ItemStack(Items.skull, 1, 2), new ItemStack(Items.skull, 1, 1), @@ -959,16 +1006,17 @@ public class AlchemicalWizardry { new ItemStack(Items.gunpowder), new ItemStack(Blocks.dirt), new ItemStack(Blocks.sand)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - new ItemStack(ModBlocks.blockWritingTable), - " s ", - "ror", - 's', - new ItemStack(Items.brewing_stand), - 'r', - obsidianStack, - 'o', - weakBloodOrbStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + new ItemStack(ModBlocks.blockWritingTable), + " s ", + "ror", + 's', + new ItemStack(Items.brewing_stand), + 'r', + obsidianStack, + 'o', + weakBloodOrbStack)); GameRegistry.addRecipe( new ItemStack(ModBlocks.blockPedestal), "ooo", @@ -993,41 +1041,44 @@ public class AlchemicalWizardry { new ItemStack(Items.nether_wart), redstoneStack, glowstoneDustStack); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - new ItemStack(ModItems.sigilOfHaste), - "csc", - "sts", - "ror", - 'c', - new ItemStack(Items.cookie), - 's', - new ItemStack(Items.sugar), - 't', - ModItems.demonicSlate, - 'r', - obsidianStack, - 'o', - new ItemStack(ModItems.masterBloodOrb))); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - new ItemStack(ModItems.sigilOfWind), - "faf", - "grg", - "fof", - 'f', - featherStack, - 'g', - ghastTearStack, - 'a', - new ItemStack(ModItems.airSigil), - 'o', - new ItemStack(ModItems.masterBloodOrb), - 'r', - ModItems.demonicSlate)); - GameRegistry.addRecipe(new ShapelessBloodOrbRecipe( - new ItemStack(ModItems.weakBloodShard, 5, 0), - new ItemStack(ModItems.masterBloodOrb), - new ItemStack(ModItems.weakBloodShard), - imbuedSlateStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + new ItemStack(ModItems.sigilOfHaste), + "csc", + "sts", + "ror", + 'c', + new ItemStack(Items.cookie), + 's', + new ItemStack(Items.sugar), + 't', + ModItems.demonicSlate, + 'r', + obsidianStack, + 'o', + new ItemStack(ModItems.masterBloodOrb))); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + new ItemStack(ModItems.sigilOfWind), + "faf", + "grg", + "fof", + 'f', + featherStack, + 'g', + ghastTearStack, + 'a', + new ItemStack(ModItems.airSigil), + 'o', + new ItemStack(ModItems.masterBloodOrb), + 'r', + ModItems.demonicSlate)); + GameRegistry.addRecipe( + new ShapelessBloodOrbRecipe( + new ItemStack(ModItems.weakBloodShard, 5, 0), + new ItemStack(ModItems.masterBloodOrb), + new ItemStack(ModItems.weakBloodShard), + imbuedSlateStack)); GameRegistry.addRecipe( new ItemStack(ModBlocks.blockTeleposer), "ggg", @@ -1047,19 +1098,20 @@ public class AlchemicalWizardry { new ItemStack(ModItems.demonicTelepositionFocus), new ItemStack(ModItems.reinforcedTelepositionFocus), new ItemStack(ModItems.demonBloodShard)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - new ItemStack(ModItems.sigilOfTheBridge), - "nnn", - "nsn", - "ror", - 'n', - stoneStack, - 'r', - new ItemStack(Blocks.soul_sand), - 's', - imbuedSlateStack, - 'o', - magicianBloodOrbStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + new ItemStack(ModItems.sigilOfTheBridge), + "nnn", + "nsn", + "ror", + 'n', + stoneStack, + 'r', + new ItemStack(Blocks.soul_sand), + 's', + imbuedSlateStack, + 'o', + magicianBloodOrbStack)); GameRegistry.addRecipe( new ItemStack(ModItems.armourInhibitor), " gg", @@ -1097,47 +1149,50 @@ public class AlchemicalWizardry { new ItemStack(ModItems.demonicSlate), 'r', new ItemStack(ModItems.itemRitualDiviner)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - new ItemStack(ModItems.sigilOfMagnetism), - "bgb", - "gsg", - "bob", - 'b', - new ItemStack(Blocks.iron_block), - 'g', - goldIngotStack, - 's', - new ItemStack(ModItems.imbuedSlate), - 'o', - magicianBloodOrbStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - new ItemStack(ModItems.energyBazooka), - "Ocd", - "cb ", - "d w", - 'O', - archmageBloodOrbStack, - 'c', - crepitousStack, - 'b', - new ItemStack(ModItems.energyBlaster), - 'd', - diamondStack, - 'w', - new ItemStack(ModItems.weakBloodShard))); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - new ItemStack(ModItems.itemBloodLightSigil), - "btb", - "sss", - "bob", - 'o', - magicianBloodOrbStack, - 'b', - glowstoneBlockStack, - 't', - new ItemStack(Blocks.torch), - 's', - imbuedSlateStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + new ItemStack(ModItems.sigilOfMagnetism), + "bgb", + "gsg", + "bob", + 'b', + new ItemStack(Blocks.iron_block), + 'g', + goldIngotStack, + 's', + new ItemStack(ModItems.imbuedSlate), + 'o', + magicianBloodOrbStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + new ItemStack(ModItems.energyBazooka), + "Ocd", + "cb ", + "d w", + 'O', + archmageBloodOrbStack, + 'c', + crepitousStack, + 'b', + new ItemStack(ModItems.energyBlaster), + 'd', + diamondStack, + 'w', + new ItemStack(ModItems.weakBloodShard))); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + new ItemStack(ModItems.itemBloodLightSigil), + "btb", + "sss", + "bob", + 'o', + magicianBloodOrbStack, + 'b', + glowstoneBlockStack, + 't', + new ItemStack(Blocks.torch), + 's', + imbuedSlateStack)); GameRegistry.addRecipe( new ItemStack(ModItems.itemKeyOfDiablo), " gw", @@ -1164,64 +1219,48 @@ public class AlchemicalWizardry { emptyBucketStack, 'l', new ItemStack(Items.leather_chestplate)); - customPotionDrowning = (new PotionDrowning(customPotionDrowningID, true, 0)) - .setIconIndex(0, 0) + customPotionDrowning = (new PotionDrowning(customPotionDrowningID, true, 0)).setIconIndex(0, 0) .setPotionName("Drowning"); - customPotionBoost = (new PotionBoost(customPotionBoostID, false, 0)) - .setIconIndex(0, 0) - .setPotionName("Boost"); - customPotionProjProt = (new PotionProjectileProtect(customPotionProjProtID, false, 0)) - .setIconIndex(0, 0) + customPotionBoost = (new PotionBoost(customPotionBoostID, false, 0)).setIconIndex(0, 0).setPotionName("Boost"); + customPotionProjProt = (new PotionProjectileProtect(customPotionProjProtID, false, 0)).setIconIndex(0, 0) .setPotionName("Whirlwind"); - customPotionInhibit = (new PotionInhibit(customPotionInhibitID, false, 0)) - .setIconIndex(0, 0) + customPotionInhibit = (new PotionInhibit(customPotionInhibitID, false, 0)).setIconIndex(0, 0) .setPotionName("Inhibit"); - customPotionFlight = (new PotionFlight(customPotionFlightID, false, 0)) - .setIconIndex(0, 0) + customPotionFlight = (new PotionFlight(customPotionFlightID, false, 0)).setIconIndex(0, 0) .setPotionName("Flight"); customPotionReciprocation = (new PotionReciprocation(customPotionReciprocationID, false, 0xFFFFFF)) - .setIconIndex(0, 0) - .setPotionName("Reciprocation"); - customPotionFlameCloak = (new PotionFlameCloak(customPotionFlameCloakID, false, 0) - .setIconIndex(0, 0) + .setIconIndex(0, 0).setPotionName("Reciprocation"); + customPotionFlameCloak = (new PotionFlameCloak(customPotionFlameCloakID, false, 0).setIconIndex(0, 0) .setPotionName("Flame Cloak")); - customPotionIceCloak = (new PotionIceCloak(customPotionIceCloakID, false, 0) - .setIconIndex(0, 0) + customPotionIceCloak = (new PotionIceCloak(customPotionIceCloakID, false, 0).setIconIndex(0, 0) .setPotionName("Ice Cloak")); - customPotionHeavyHeart = (new PotionHeavyHeart(customPotionHeavyHeartID, true, 0) - .setIconIndex(0, 0) + customPotionHeavyHeart = (new PotionHeavyHeart(customPotionHeavyHeartID, true, 0).setIconIndex(0, 0) .setPotionName("Heavy Heart")); - customPotionFireFuse = (new PotionFireFuse(customPotionFireFuseID, true, 0) - .setIconIndex(0, 0) + customPotionFireFuse = (new PotionFireFuse(customPotionFireFuseID, true, 0).setIconIndex(0, 0) .setPotionName("Fire Fuse")); - customPotionPlanarBinding = (new PotionPlanarBinding(customPotionPlanarBindingID, true, 0) - .setIconIndex(0, 0) + customPotionPlanarBinding = (new PotionPlanarBinding(customPotionPlanarBindingID, true, 0).setIconIndex(0, 0) .setPotionName("Planar Binding")); - customPotionSoulFray = (new PotionSoulFray(customPotionSoulFrayID, true, 0) - .setIconIndex(0, 0) + customPotionSoulFray = (new PotionSoulFray(customPotionSoulFrayID, true, 0).setIconIndex(0, 0) .setPotionName("Soul Fray")); PlayerSacrificeHandler.soulFrayId = customPotionSoulFray; - customPotionSoulHarden = (new PotionSoulHarden(customPotionSoulHardenID, false, 0) - .setIconIndex(0, 0) + customPotionSoulHarden = (new PotionSoulHarden(customPotionSoulHardenID, false, 0).setIconIndex(0, 0) .setPotionName("Soul Harden")); - customPotionDeaf = - (new PotionDeaf(customPotionDeafID, true, 0).setIconIndex(0, 0).setPotionName("Deafness")); - customPotionFeatherFall = (new PotionFeatherFall(customPotionFeatherFallID, false, 0) - .setIconIndex(0, 0) + customPotionDeaf = (new PotionDeaf(customPotionDeafID, true, 0).setIconIndex(0, 0).setPotionName("Deafness")); + customPotionFeatherFall = (new PotionFeatherFall(customPotionFeatherFallID, false, 0).setIconIndex(0, 0) .setPotionName("Feather Fall")); - customPotionDemonCloak = (new PotionDemonCloak(customPotionDemonCloakID, false, 0) - .setIconIndex(0, 0) + customPotionDemonCloak = (new PotionDemonCloak(customPotionDemonCloakID, false, 0).setIconIndex(0, 0) .setPotionName("Demon Cloaking")); - customPotionAmphibian = (new PotionAmphibian(customPotionAmphibianID, false, 0) - .setIconIndex(0, 0) + customPotionAmphibian = (new PotionAmphibian(customPotionAmphibianID, false, 0).setIconIndex(0, 0) .setPotionName("Amphibian")); ItemStack masterBloodOrbStack = new ItemStack(ModItems.masterBloodOrb); ItemStack transcendentBloodOrbStack = new ItemStack(ModItems.transcendentBloodOrb); - // ModBlocks.blockLifeEssence.setUnlocalizedName("lifeEssenceBlock"); + // ModBlocks.blockLifeEssence.setUnlocalizedName("lifeEssenceBlock"); FluidContainerRegistry.registerFluidContainer( - lifeEssenceFluid, new ItemStack(ModItems.bucketLife), FluidContainerRegistry.EMPTY_BUCKET); + lifeEssenceFluid, + new ItemStack(ModItems.bucketLife), + FluidContainerRegistry.EMPTY_BUCKET); ModBlocks.blockAltar.setHarvestLevel("pickaxe", 1); // Register Tile Entity @@ -1317,313 +1356,205 @@ public class AlchemicalWizardry { AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.weakBindingAgent), 10, - new ItemStack[] {simpleCatalystStack, simpleCatalystStack, new ItemStack(Items.clay_ball)}, + new ItemStack[] { simpleCatalystStack, simpleCatalystStack, new ItemStack(Items.clay_ball) }, 2); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.standardBindingAgent), 15, - new ItemStack[] { - new ItemStack(ModItems.weakBindingAgent), sanctusStack, new ItemStack(ModItems.crystallos) - }, + new ItemStack[] { new ItemStack(ModItems.weakBindingAgent), sanctusStack, + new ItemStack(ModItems.crystallos) }, 3); AlchemyRecipeRegistry.registerRecipe( simpleCatalystStack, 2, - new ItemStack[] { - sugarStack, redstoneStack, redstoneStack, glowstoneDustStack, new ItemStack(Items.gunpowder) - }, + new ItemStack[] { sugarStack, redstoneStack, redstoneStack, glowstoneDustStack, + new ItemStack(Items.gunpowder) }, 1); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.incendium), 5, - new ItemStack[] { - lavaBucketStack, - new ItemStack(Items.blaze_powder), - new ItemStack(Items.blaze_powder), - new ItemStack(Blocks.netherrack), - simpleCatalystStack - }, + new ItemStack[] { lavaBucketStack, new ItemStack(Items.blaze_powder), new ItemStack(Items.blaze_powder), + new ItemStack(Blocks.netherrack), simpleCatalystStack }, 2); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.aether), 5, - new ItemStack[] {featherStack, featherStack, glowstoneDustStack, ghastTearStack, simpleCatalystStack}, + new ItemStack[] { featherStack, featherStack, glowstoneDustStack, ghastTearStack, simpleCatalystStack }, 2); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.sanctus), 5, - new ItemStack[] { - glowstoneDustStack, - new ItemStack(Items.gold_nugget), - glowstoneDustStack, - glassStack, - simpleCatalystStack - }, + new ItemStack[] { glowstoneDustStack, new ItemStack(Items.gold_nugget), glowstoneDustStack, glassStack, + simpleCatalystStack }, 2); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.crepitous), 5, - new ItemStack[] { - new ItemStack(Items.gunpowder), - new ItemStack(Items.gunpowder), - cobblestoneStack, - cobblestoneStack, - simpleCatalystStack - }, + new ItemStack[] { new ItemStack(Items.gunpowder), new ItemStack(Items.gunpowder), cobblestoneStack, + cobblestoneStack, simpleCatalystStack }, 2); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.crystallos), 5, - new ItemStack[] { - new ItemStack(Blocks.ice), - new ItemStack(Blocks.ice), - new ItemStack(Blocks.snow), - new ItemStack(Blocks.snow), - simpleCatalystStack - }, + new ItemStack[] { new ItemStack(Blocks.ice), new ItemStack(Blocks.ice), new ItemStack(Blocks.snow), + new ItemStack(Blocks.snow), simpleCatalystStack }, 2); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.terrae), 5, - new ItemStack[] { - new ItemStack(Blocks.dirt), - new ItemStack(Blocks.sand), - obsidianStack, - obsidianStack, - simpleCatalystStack - }, + new ItemStack[] { new ItemStack(Blocks.dirt), new ItemStack(Blocks.sand), obsidianStack, obsidianStack, + simpleCatalystStack }, 2); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.aquasalus), 5, - new ItemStack[] { - simpleCatalystStack, - new ItemStack(Items.dye, 1, 0), - new ItemStack(Items.potionitem, 1, 0), - new ItemStack(Items.potionitem, 1, 0), - new ItemStack(Items.potionitem, 1, 0) - }, + new ItemStack[] { simpleCatalystStack, new ItemStack(Items.dye, 1, 0), + new ItemStack(Items.potionitem, 1, 0), new ItemStack(Items.potionitem, 1, 0), + new ItemStack(Items.potionitem, 1, 0) }, 2); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.tennebrae), 5, - new ItemStack[] { - simpleCatalystStack, - new ItemStack(Items.coal), - new ItemStack(Items.coal), - new ItemStack(Blocks.obsidian), - new ItemStack(Items.clay_ball) - }, + new ItemStack[] { simpleCatalystStack, new ItemStack(Items.coal), new ItemStack(Items.coal), + new ItemStack(Blocks.obsidian), new ItemStack(Items.clay_ball) }, 2); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.magicales), 5, - new ItemStack[] { - redstoneStack, - simpleCatalystStack, - new ItemStack(Items.gunpowder), - new ItemStack(Items.glowstone_dust), - new ItemStack(Items.glowstone_dust) - }, + new ItemStack[] { redstoneStack, simpleCatalystStack, new ItemStack(Items.gunpowder), + new ItemStack(Items.glowstone_dust), new ItemStack(Items.glowstone_dust) }, 2); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.mundanePowerCatalyst), 10, - new ItemStack[] { - glowstoneDustStack, - glowstoneDustStack, - glowstoneDustStack, - new ItemStack(ModItems.weakBindingAgent), - simpleCatalystStack - }, + new ItemStack[] { glowstoneDustStack, glowstoneDustStack, glowstoneDustStack, + new ItemStack(ModItems.weakBindingAgent), simpleCatalystStack }, 3); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.mundaneLengtheningCatalyst), 10, - new ItemStack[] { - redstoneStack, - redstoneStack, - redstoneStack, - new ItemStack(ModItems.weakBindingAgent), - simpleCatalystStack - }, + new ItemStack[] { redstoneStack, redstoneStack, redstoneStack, new ItemStack(ModItems.weakBindingAgent), + simpleCatalystStack }, 3); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.averagePowerCatalyst), 20, - new ItemStack[] { - new ItemStack(ModItems.mundanePowerCatalyst), - new ItemStack(ModItems.mundanePowerCatalyst), - new ItemStack(ModItems.standardBindingAgent) - }, + new ItemStack[] { new ItemStack(ModItems.mundanePowerCatalyst), + new ItemStack(ModItems.mundanePowerCatalyst), new ItemStack(ModItems.standardBindingAgent) }, 4); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.averageLengtheningCatalyst), 20, - new ItemStack[] { - new ItemStack(ModItems.mundaneLengtheningCatalyst), - new ItemStack(ModItems.mundaneLengtheningCatalyst), - new ItemStack(ModItems.standardBindingAgent) - }, + new ItemStack[] { new ItemStack(ModItems.mundaneLengtheningCatalyst), + new ItemStack(ModItems.mundaneLengtheningCatalyst), + new ItemStack(ModItems.standardBindingAgent) }, 4); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.greaterPowerCatalyst), 30, - new ItemStack[] { - new ItemStack(ModItems.averagePowerCatalyst), - new ItemStack(ModItems.averagePowerCatalyst), - new ItemStack(ModItems.incendium) - }, + new ItemStack[] { new ItemStack(ModItems.averagePowerCatalyst), + new ItemStack(ModItems.averagePowerCatalyst), new ItemStack(ModItems.incendium) }, 4); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.greaterLengtheningCatalyst), 30, - new ItemStack[] { - new ItemStack(ModItems.averageLengtheningCatalyst), - new ItemStack(ModItems.averageLengtheningCatalyst), - new ItemStack(ModItems.aquasalus) - }, + new ItemStack[] { new ItemStack(ModItems.averageLengtheningCatalyst), + new ItemStack(ModItems.averageLengtheningCatalyst), new ItemStack(ModItems.aquasalus) }, 4); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.weakFillingAgent), 5, - new ItemStack[] { - simpleCatalystStack, new ItemStack(Items.nether_wart), redstoneStack, glowstoneDustStack - }, + new ItemStack[] { simpleCatalystStack, new ItemStack(Items.nether_wart), redstoneStack, + glowstoneDustStack }, 3); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.standardFillingAgent), 10, - new ItemStack[] {new ItemStack(ModItems.weakFillingAgent), new ItemStack(ModItems.terrae)}, + new ItemStack[] { new ItemStack(ModItems.weakFillingAgent), new ItemStack(ModItems.terrae) }, 3); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.enhancedFillingAgent), 25, - new ItemStack[] { - new ItemStack(ModItems.standardFillingAgent), - new ItemStack(ModItems.aquasalus), - new ItemStack(ModItems.magicales) - }, + new ItemStack[] { new ItemStack(ModItems.standardFillingAgent), new ItemStack(ModItems.aquasalus), + new ItemStack(ModItems.magicales) }, 4); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.activationCrystal, 1, 1), 100, - new ItemStack[] { - new ItemStack(ModItems.activationCrystal, 1, 0), - new ItemStack(ModItems.demonBloodShard), - incendiumStack, - aquasalusStack, - aetherStack - }, + new ItemStack[] { new ItemStack(ModItems.activationCrystal, 1, 0), + new ItemStack(ModItems.demonBloodShard), incendiumStack, aquasalusStack, aetherStack }, 4); AlchemyRecipeRegistry.registerRecipe( new ItemStack(ModItems.activationCrystal, 1, 1), 100, - new ItemStack[] { - new ItemStack(ModItems.activationCrystal, 1, 0), - new ItemStack(Items.nether_star), - incendiumStack, - aquasalusStack, - aetherStack - }, + new ItemStack[] { new ItemStack(ModItems.activationCrystal, 1, 0), new ItemStack(Items.nether_star), + incendiumStack, aquasalusStack, aetherStack }, 4); AlchemyRecipeRegistry.registerRecipe( new ItemStack(Blocks.web), 2, - new ItemStack[] { - new ItemStack(Items.string), - new ItemStack(Items.string), - new ItemStack(Items.string), - new ItemStack(Items.string), - new ItemStack(Items.string) - }, + new ItemStack[] { new ItemStack(Items.string), new ItemStack(Items.string), new ItemStack(Items.string), + new ItemStack(Items.string), new ItemStack(Items.string) }, 1); AlchemyRecipeRegistry.registerRecipe( new ItemStack(Items.gunpowder, 2, 0), 2, - new ItemStack[] {gunpowderStack, new ItemStack(Items.coal), new ItemStack(Blocks.sand)}, + new ItemStack[] { gunpowderStack, new ItemStack(Items.coal), new ItemStack(Blocks.sand) }, 1); AlchemyRecipeRegistry.registerRecipe( strengthenedCatalystStackCrafted, 10, - new ItemStack[] { - simpleCatalystStack, - simpleCatalystStack, - new ItemStack(Items.dye, 1, 15), - new ItemStack(Items.nether_wart) - }, + new ItemStack[] { simpleCatalystStack, simpleCatalystStack, new ItemStack(Items.dye, 1, 15), + new ItemStack(Items.nether_wart) }, 3); AlchemyRecipeRegistry.registerRecipe( offensaStack, 10, - new ItemStack[] { - strengthenedCatalystStack, - incendiumStack, - new ItemStack(Items.arrow), - new ItemStack(Items.flint), - new ItemStack(Items.arrow) - }, + new ItemStack[] { strengthenedCatalystStack, incendiumStack, new ItemStack(Items.arrow), + new ItemStack(Items.flint), new ItemStack(Items.arrow) }, 3); AlchemyRecipeRegistry.registerRecipe( praesidiumStack, 10, - new ItemStack[] { - strengthenedCatalystStack, tennebraeStack, ironIngotStack, new ItemStack(Blocks.web), redstoneStack - }, + new ItemStack[] { strengthenedCatalystStack, tennebraeStack, ironIngotStack, new ItemStack(Blocks.web), + redstoneStack }, 3); AlchemyRecipeRegistry.registerRecipe( orbisTerraeStack, 10, - new ItemStack[] { - strengthenedCatalystStack, - terraeStack, - gunpowderStack, - new ItemStack(Blocks.netherrack), - new ItemStack(Blocks.sand) - }, + new ItemStack[] { strengthenedCatalystStack, terraeStack, gunpowderStack, + new ItemStack(Blocks.netherrack), new ItemStack(Blocks.sand) }, 3); AlchemyRecipeRegistry.registerRecipe( concentratedCatalystStack, 10, - new ItemStack[] {strengthenedCatalystStack, fracturedBoneStack, goldNuggetStack}, + new ItemStack[] { strengthenedCatalystStack, fracturedBoneStack, goldNuggetStack }, 4); AlchemyRecipeRegistry.registerRecipe( fracturedBoneStackCrafted, 2, - new ItemStack[] { - new ItemStack(Items.bone), - new ItemStack(Items.bone), - new ItemStack(Items.bone), - new ItemStack(Items.bone), - gunpowderStack - }, + new ItemStack[] { new ItemStack(Items.bone), new ItemStack(Items.bone), new ItemStack(Items.bone), + new ItemStack(Items.bone), gunpowderStack }, 1); AlchemyRecipeRegistry.registerRecipe( virtusStack, 20, - new ItemStack[] { - redstoneStack, new ItemStack(Items.coal), strengthenedCatalystStack, redstoneStack, gunpowderStack - }, + new ItemStack[] { redstoneStack, new ItemStack(Items.coal), strengthenedCatalystStack, redstoneStack, + gunpowderStack }, 3); AlchemyRecipeRegistry.registerRecipe( reductusStack, 20, - new ItemStack[] { - redstoneStack, - goldIngotStack, - strengthenedCatalystStack, - new ItemStack(Blocks.soul_sand), - new ItemStack(Items.carrot) - }, + new ItemStack[] { redstoneStack, goldIngotStack, strengthenedCatalystStack, + new ItemStack(Blocks.soul_sand), new ItemStack(Items.carrot) }, 3); AlchemyRecipeRegistry.registerRecipe( potentiaStack, 20, - new ItemStack[] { - glowstoneDustStack, strengthenedCatalystStack, lapisStack, lapisStack, new ItemStack(Items.quartz) - }, + new ItemStack[] { glowstoneDustStack, strengthenedCatalystStack, lapisStack, lapisStack, + new ItemStack(Items.quartz) }, 3); HomSpellRegistry.registerBasicSpell(new ItemStack(Items.flint_and_steel), new SpellFireBurst()); @@ -1637,155 +1568,114 @@ public class AlchemicalWizardry { HomSpellRegistry.registerBasicSpell(new ItemStack(Items.ender_pearl), new SpellTeleport()); SummoningRegistry.registerSummon( new SummoningHelperAW(entityFallenAngelID), - new ItemStack[] {sanctusStack, sanctusStack, sanctusStack, aetherStack, tennebraeStack, terraeStack}, + new ItemStack[] { sanctusStack, sanctusStack, sanctusStack, aetherStack, tennebraeStack, terraeStack }, new ItemStack[] {}, new ItemStack[] {}, 0, 4); SummoningRegistry.registerSummon( new SummoningHelperAW(entityLowerGuardianID), - new ItemStack[] { - cobblestoneStack, - cobblestoneStack, - terraeStack, - tennebraeStack, - new ItemStack(Items.iron_ingot), - new ItemStack(Items.gold_nugget) - }, + new ItemStack[] { cobblestoneStack, cobblestoneStack, terraeStack, tennebraeStack, + new ItemStack(Items.iron_ingot), new ItemStack(Items.gold_nugget) }, new ItemStack[] {}, new ItemStack[] {}, 0, 4); SummoningRegistry.registerSummon( new SummoningHelperAW(entityBileDemonID), - new ItemStack[] { - new ItemStack(Items.poisonous_potato), - tennebraeStack, - terraeStack, - new ItemStack(Items.porkchop), - new ItemStack(Items.egg), - new ItemStack(Items.beef) - }, - new ItemStack[] { - crepitousStack, crepitousStack, terraeStack, ironBlockStack, ironBlockStack, diamondStack - }, + new ItemStack[] { new ItemStack(Items.poisonous_potato), tennebraeStack, terraeStack, + new ItemStack(Items.porkchop), new ItemStack(Items.egg), new ItemStack(Items.beef) }, + new ItemStack[] { crepitousStack, crepitousStack, terraeStack, ironBlockStack, ironBlockStack, + diamondStack }, new ItemStack[] {}, 0, 5); SummoningRegistry.registerSummon( new SummoningHelperAW(entityWingedFireDemonID), - new ItemStack[] { - aetherStack, - incendiumStack, - incendiumStack, - incendiumStack, - tennebraeStack, - new ItemStack(Blocks.netherrack) - }, - new ItemStack[] { - diamondStack, - new ItemStack(Blocks.gold_block), - magicalesStack, - magicalesStack, - new ItemStack(Items.fire_charge), - new ItemStack(Blocks.coal_block) - }, + new ItemStack[] { aetherStack, incendiumStack, incendiumStack, incendiumStack, tennebraeStack, + new ItemStack(Blocks.netherrack) }, + new ItemStack[] { diamondStack, new ItemStack(Blocks.gold_block), magicalesStack, magicalesStack, + new ItemStack(Items.fire_charge), new ItemStack(Blocks.coal_block) }, new ItemStack[] {}, 0, 5); SummoningRegistry.registerSummon( new SummoningHelperAW(entitySmallEarthGolemID), - new ItemStack[] {new ItemStack(Items.clay_ball), terraeStack, terraeStack}, + new ItemStack[] { new ItemStack(Items.clay_ball), terraeStack, terraeStack }, new ItemStack[] {}, new ItemStack[] {}, 0, 4); SummoningRegistry.registerSummon( new SummoningHelperAW(entityIceDemonID), - new ItemStack[] { - crystallosStack, crystallosStack, aquasalusStack, crystallosStack, sanctusStack, terraeStack - }, + new ItemStack[] { crystallosStack, crystallosStack, aquasalusStack, crystallosStack, sanctusStack, + terraeStack }, new ItemStack[] {}, new ItemStack[] {}, 0, 4); SummoningRegistry.registerSummon( new SummoningHelperAW(entityBoulderFistID), - new ItemStack[] { - terraeStack, - sanctusStack, - tennebraeStack, - new ItemStack(Items.bone), - new ItemStack(Items.cooked_beef), - new ItemStack(Items.cooked_beef) - }, + new ItemStack[] { terraeStack, sanctusStack, tennebraeStack, new ItemStack(Items.bone), + new ItemStack(Items.cooked_beef), new ItemStack(Items.cooked_beef) }, new ItemStack[] {}, new ItemStack[] {}, 0, 4); SummoningRegistry.registerSummon( new SummoningHelperAW(entityShadeID), - new ItemStack[] { - tennebraeStack, - tennebraeStack, - tennebraeStack, - aetherStack, - glassStack, - new ItemStack(Items.glass_bottle) - }, + new ItemStack[] { tennebraeStack, tennebraeStack, tennebraeStack, aetherStack, glassStack, + new ItemStack(Items.glass_bottle) }, new ItemStack[] {}, new ItemStack[] {}, 0, 4); SummoningRegistry.registerSummon( new SummoningHelperAW(entityAirElementalID), - new ItemStack[] {aetherStack, aetherStack, aetherStack, aetherStack, aetherStack, aetherStack}, + new ItemStack[] { aetherStack, aetherStack, aetherStack, aetherStack, aetherStack, aetherStack }, new ItemStack[] {}, new ItemStack[] {}, 0, 4); SummoningRegistry.registerSummon( new SummoningHelperAW(entityWaterElementalID), - new ItemStack[] { - aquasalusStack, aquasalusStack, aquasalusStack, aquasalusStack, aquasalusStack, aquasalusStack - }, + new ItemStack[] { aquasalusStack, aquasalusStack, aquasalusStack, aquasalusStack, aquasalusStack, + aquasalusStack }, new ItemStack[] {}, new ItemStack[] {}, 0, 4); SummoningRegistry.registerSummon( new SummoningHelperAW(entityEarthElementalID), - new ItemStack[] {terraeStack, terraeStack, terraeStack, terraeStack, terraeStack, terraeStack}, + new ItemStack[] { terraeStack, terraeStack, terraeStack, terraeStack, terraeStack, terraeStack }, new ItemStack[] {}, new ItemStack[] {}, 0, 4); SummoningRegistry.registerSummon( new SummoningHelperAW(entityFireElementalID), - new ItemStack[] { - incendiumStack, incendiumStack, incendiumStack, incendiumStack, incendiumStack, incendiumStack - }, + new ItemStack[] { incendiumStack, incendiumStack, incendiumStack, incendiumStack, incendiumStack, + incendiumStack }, new ItemStack[] {}, new ItemStack[] {}, 0, 4); SummoningRegistry.registerSummon( new SummoningHelperAW(entityShadeElementalID), - new ItemStack[] { - tennebraeStack, tennebraeStack, tennebraeStack, tennebraeStack, tennebraeStack, tennebraeStack - }, + new ItemStack[] { tennebraeStack, tennebraeStack, tennebraeStack, tennebraeStack, tennebraeStack, + tennebraeStack }, new ItemStack[] {}, new ItemStack[] {}, 0, 4); SummoningRegistry.registerSummon( new SummoningHelperAW(entityHolyElementalID), - new ItemStack[] {sanctusStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack}, + new ItemStack[] { sanctusStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack }, new ItemStack[] {}, new ItemStack[] {}, 0, 4); - // SummoningRegistry.registerSummon(new SummoningHelperAW(this.entityMinorDemonGruntID), new + // SummoningRegistry.registerSummon(new SummoningHelperAW(this.entityMinorDemonGruntID), new // ItemStack[]{incendiumStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack}, new // ItemStack[]{}, new ItemStack[]{}, 0, 4); @@ -1808,57 +1698,87 @@ public class AlchemicalWizardry { EntityRegistry.registerModEntity(EntityMinorDemonGruntFire.class, "MinorDemonGruntFire", 35, this, 80, 3, true); EntityRegistry.registerModEntity(EntityMinorDemonGruntWind.class, "MinorDemonGruntWind", 36, this, 80, 3, true); EntityRegistry.registerModEntity(EntityMinorDemonGruntIce.class, "MinorDemonGruntIce", 37, this, 80, 3, true); + EntityRegistry + .registerModEntity(EntityMinorDemonGruntEarth.class, "MinorDemonGruntEarth", 38, this, 80, 3, true); EntityRegistry.registerModEntity( - EntityMinorDemonGruntEarth.class, "MinorDemonGruntEarth", 38, this, 80, 3, true); + EntityMinorDemonGruntGuardian.class, + "MinorDemonGruntGuardian", + 39, + this, + 80, + 3, + true); EntityRegistry.registerModEntity( - EntityMinorDemonGruntGuardian.class, "MinorDemonGruntGuardian", 39, this, 80, 3, true); + EntityMinorDemonGruntGuardianFire.class, + "MinorDemonGruntGuardianFire", + 40, + this, + 80, + 3, + true); EntityRegistry.registerModEntity( - EntityMinorDemonGruntGuardianFire.class, "MinorDemonGruntGuardianFire", 40, this, 80, 3, true); + EntityMinorDemonGruntGuardianWind.class, + "MinorDemonGruntGuardianWind", + 41, + this, + 80, + 3, + true); EntityRegistry.registerModEntity( - EntityMinorDemonGruntGuardianWind.class, "MinorDemonGruntGuardianWind", 41, this, 80, 3, true); + EntityMinorDemonGruntGuardianIce.class, + "MinorDemonGruntGuardianIce", + 42, + this, + 80, + 3, + true); EntityRegistry.registerModEntity( - EntityMinorDemonGruntGuardianIce.class, "MinorDemonGruntGuardianIce", 42, this, 80, 3, true); - EntityRegistry.registerModEntity( - EntityMinorDemonGruntGuardianEarth.class, "MinorDemonGruntGuardianEarth", 43, this, 80, 3, true); + EntityMinorDemonGruntGuardianEarth.class, + "MinorDemonGruntGuardianEarth", + 43, + this, + 80, + 3, + true); - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST) - .addItem(new WeightedRandomChestContent( + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem( + new WeightedRandomChestContent( new ItemStack(ModItems.standardBindingAgent), 1, 3, this.standardBindingAgentDungeonChance / 5)); - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST) - .addItem(new WeightedRandomChestContent( + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem( + new WeightedRandomChestContent( new ItemStack(ModItems.mundanePowerCatalyst), 1, 1, this.mundanePowerCatalystDungeonChance / 5)); - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST) - .addItem(new WeightedRandomChestContent( + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem( + new WeightedRandomChestContent( new ItemStack(ModItems.mundaneLengtheningCatalyst), 1, 1, this.mundaneLengtheningCatalystDungeonChance / 5)); - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST) - .addItem(new WeightedRandomChestContent( + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem( + new WeightedRandomChestContent( new ItemStack(ModItems.averagePowerCatalyst), 1, 1, this.averagePowerCatalystDungeonChance / 5)); - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST) - .addItem(new WeightedRandomChestContent( + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem( + new WeightedRandomChestContent( new ItemStack(ModItems.averageLengtheningCatalyst), 1, 1, this.averageLengtheningCatalystDungeonChance / 5)); - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST) - .addItem(new WeightedRandomChestContent( + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem( + new WeightedRandomChestContent( new ItemStack(ModItems.greaterPowerCatalyst), 1, 1, this.greaterPowerCatalystDungeonChance / 5)); - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST) - .addItem(new WeightedRandomChestContent( + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem( + new WeightedRandomChestContent( new ItemStack(ModItems.greaterLengtheningCatalyst), 1, 1, @@ -1907,7 +1827,14 @@ public class AlchemicalWizardry { ItemStack enderShardCraftedStack = new ItemStack(ModItems.baseItems, 8, 32); GameRegistry.addRecipe( - new ItemStack(ModBlocks.blockCrystal), "lsl", "sls", "lsl", 'l', lifeShardStack, 's', soulShardStack); + new ItemStack(ModBlocks.blockCrystal), + "lsl", + "sls", + "lsl", + 'l', + lifeShardStack, + 's', + soulShardStack); GameRegistry.addRecipe( new ItemStack(ModBlocks.blockCrystal, 4, 1), "ss", @@ -1933,7 +1860,14 @@ public class AlchemicalWizardry { 'r', simpleCatalystStack); GameRegistry.addRecipe( - magicalesCraftedCableStack, "sss", "mmm", "sss", 's', new ItemStack(Items.string), 'm', magicalesStack); + magicalesCraftedCableStack, + "sss", + "mmm", + "sss", + 's', + new ItemStack(Items.string), + 'm', + magicalesStack); GameRegistry.addRecipe( woodBraceStack, " il", @@ -1969,66 +1903,70 @@ public class AlchemicalWizardry { 's', demonSlateStack); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - projectileCoreStack, - "mbm", - "aca", - "mom", - 'c', - emptyCoreStack, - 'b', - weakBloodShardStack, - 'm', - magicalesStack, - 'o', - magicianBloodOrbStack, - 'a', - new ItemStack(Items.arrow))); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - selfCoreStack, - "sbs", - "ncn", - "sos", - 'c', - emptyCoreStack, - 's', - sanctusStack, - 'b', - weakBloodShardStack, - 'o', - magicianBloodOrbStack, - 'n', - glowstoneDustStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - meleeCoreStack, - "sbs", - "ncn", - "sos", - 'c', - emptyCoreStack, - 's', - incendiumStack, - 'b', - weakBloodShardStack, - 'o', - magicianBloodOrbStack, - 'n', - new ItemStack(Items.fire_charge))); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - toolCoreStack, - "sbs", - "ncn", - "sos", - 'c', - emptyCoreStack, - 's', - terraeStack, - 'b', - weakBloodShardStack, - 'o', - magicianBloodOrbStack, - 'n', - new ItemStack(Blocks.obsidian))); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + projectileCoreStack, + "mbm", + "aca", + "mom", + 'c', + emptyCoreStack, + 'b', + weakBloodShardStack, + 'm', + magicalesStack, + 'o', + magicianBloodOrbStack, + 'a', + new ItemStack(Items.arrow))); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + selfCoreStack, + "sbs", + "ncn", + "sos", + 'c', + emptyCoreStack, + 's', + sanctusStack, + 'b', + weakBloodShardStack, + 'o', + magicianBloodOrbStack, + 'n', + glowstoneDustStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + meleeCoreStack, + "sbs", + "ncn", + "sos", + 'c', + emptyCoreStack, + 's', + incendiumStack, + 'b', + weakBloodShardStack, + 'o', + magicianBloodOrbStack, + 'n', + new ItemStack(Items.fire_charge))); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + toolCoreStack, + "sbs", + "ncn", + "sos", + 'c', + emptyCoreStack, + 's', + terraeStack, + 'b', + weakBloodShardStack, + 'o', + magicianBloodOrbStack, + 'n', + new ItemStack(Blocks.obsidian))); GameRegistry.addRecipe( paradigmBackPlateStack, @@ -2044,68 +1982,81 @@ public class AlchemicalWizardry { 's', reinforcedSlateStack); GameRegistry.addRecipe( - outputCableStack, " si", "s c", " si", 's', stoneStack, 'i', ironIngotStack, 'c', simpleCatalystStack); + outputCableStack, + " si", + "s c", + " si", + 's', + stoneStack, + 'i', + ironIngotStack, + 'c', + simpleCatalystStack); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - flameCoreStack, - "mdm", - "scs", - "mom", - 'm', - incendiumStack, - 'c', - emptyCoreStack, - 'o', - magicianBloodOrbStack, - 'd', - diamondStack, - 's', - weakBloodShardStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - iceCoreStack, - "mdm", - "scs", - "mom", - 'm', - crystallosStack, - 'c', - emptyCoreStack, - 'o', - magicianBloodOrbStack, - 'd', - diamondStack, - 's', - weakBloodShardStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - windCoreStack, - "mdm", - "scs", - "mom", - 'm', - aetherStack, - 'c', - emptyCoreStack, - 'o', - magicianBloodOrbStack, - 'd', - diamondStack, - 's', - weakBloodShardStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - earthCoreStack, - "mdm", - "scs", - "mom", - 'm', - terraeStack, - 'c', - emptyCoreStack, - 'o', - magicianBloodOrbStack, - 'd', - diamondStack, - 's', - weakBloodShardStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + flameCoreStack, + "mdm", + "scs", + "mom", + 'm', + incendiumStack, + 'c', + emptyCoreStack, + 'o', + magicianBloodOrbStack, + 'd', + diamondStack, + 's', + weakBloodShardStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + iceCoreStack, + "mdm", + "scs", + "mom", + 'm', + crystallosStack, + 'c', + emptyCoreStack, + 'o', + magicianBloodOrbStack, + 'd', + diamondStack, + 's', + weakBloodShardStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + windCoreStack, + "mdm", + "scs", + "mom", + 'm', + aetherStack, + 'c', + emptyCoreStack, + 'o', + magicianBloodOrbStack, + 'd', + diamondStack, + 's', + weakBloodShardStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + earthCoreStack, + "mdm", + "scs", + "mom", + 'm', + terraeStack, + 'c', + emptyCoreStack, + 'o', + magicianBloodOrbStack, + 'd', + diamondStack, + 's', + weakBloodShardStack)); GameRegistry.addRecipe( inputCableStack, @@ -2121,186 +2072,190 @@ public class AlchemicalWizardry { 'c', simpleCatalystStack); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - defaultCoreStack, - "msm", - "geg", - "mom", - 'm', - strengthenedCatalystStack, - 'e', - emptyCoreStack, - 'o', - magicianBloodOrbStack, - 's', - weakBloodShardStack, - 'g', - goldIngotStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - offenseCoreStack, - "msm", - "geg", - "mom", - 'm', - offensaStack, - 'e', - emptyCoreStack, - 'o', - magicianBloodOrbStack, - 's', - weakBloodShardStack, - 'g', - goldIngotStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - defensiveCoreStack, - "msm", - "geg", - "mom", - 'm', - praesidiumStack, - 'e', - emptyCoreStack, - 'o', - magicianBloodOrbStack, - 's', - weakBloodShardStack, - 'g', - goldIngotStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - environmentalCoreStack, - "msm", - "geg", - "mom", - 'm', - orbisTerraeStack, - 'e', - emptyCoreStack, - 'o', - magicianBloodOrbStack, - 's', - weakBloodShardStack, - 'g', - goldIngotStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + defaultCoreStack, + "msm", + "geg", + "mom", + 'm', + strengthenedCatalystStack, + 'e', + emptyCoreStack, + 'o', + magicianBloodOrbStack, + 's', + weakBloodShardStack, + 'g', + goldIngotStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + offenseCoreStack, + "msm", + "geg", + "mom", + 'm', + offensaStack, + 'e', + emptyCoreStack, + 'o', + magicianBloodOrbStack, + 's', + weakBloodShardStack, + 'g', + goldIngotStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + defensiveCoreStack, + "msm", + "geg", + "mom", + 'm', + praesidiumStack, + 'e', + emptyCoreStack, + 'o', + magicianBloodOrbStack, + 's', + weakBloodShardStack, + 'g', + goldIngotStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + environmentalCoreStack, + "msm", + "geg", + "mom", + 'm', + orbisTerraeStack, + 'e', + emptyCoreStack, + 'o', + magicianBloodOrbStack, + 's', + weakBloodShardStack, + 'g', + goldIngotStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - powerCoreStack, - "msm", - "geg", - "mom", - 'm', - virtusStack, - 'e', - emptyCoreStack, - 'o', - masterBloodOrbStack, - 's', - weakBloodShardStack, - 'g', - goldIngotStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - costCoreStack, - "msm", - "geg", - "mom", - 'm', - reductusStack, - 'e', - emptyCoreStack, - 'o', - masterBloodOrbStack, - 's', - weakBloodShardStack, - 'g', - goldIngotStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - potencyCoreStack, - "msm", - "geg", - "mom", - 'm', - potentiaStack, - 'e', - emptyCoreStack, - 'o', - masterBloodOrbStack, - 's', - weakBloodShardStack, - 'g', - goldIngotStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + powerCoreStack, + "msm", + "geg", + "mom", + 'm', + virtusStack, + 'e', + emptyCoreStack, + 'o', + masterBloodOrbStack, + 's', + weakBloodShardStack, + 'g', + goldIngotStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + costCoreStack, + "msm", + "geg", + "mom", + 'm', + reductusStack, + 'e', + emptyCoreStack, + 'o', + masterBloodOrbStack, + 's', + weakBloodShardStack, + 'g', + goldIngotStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + potencyCoreStack, + "msm", + "geg", + "mom", + 'm', + potentiaStack, + 'e', + emptyCoreStack, + 'o', + masterBloodOrbStack, + 's', + weakBloodShardStack, + 'g', + goldIngotStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - new ItemStack(ModItems.itemHarvestSigil), - "mgm", - "gsg", - "mom", - 's', - etherealSlateStack, - 'o', - archmageBloodOrbStack, - 'g', - new ItemStack(Items.golden_hoe), - 'm', - new ItemStack(Blocks.dirt))); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - new ItemStack(ModBlocks.bloodRune, 1, 5), - "bsb", - "grg", - "bob", - 's', - etherealSlateStack, - 'o', - archmageBloodOrbStack, - 'r', - speedRuneStack, - 'b', - emptyBucketStack, - 'g', - goldIngotStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - new ItemStack(ModItems.itemCompressionSigil), - "pop", - "csc", - "obo", - 'b', - masterBloodOrbStack, - 'p', - new ItemStack(Blocks.piston), - 'c', - new ItemStack(Blocks.crafting_table), - 's', - demonSlateStack, - 'o', - obsidianStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + new ItemStack(ModItems.itemHarvestSigil), + "mgm", + "gsg", + "mom", + 's', + etherealSlateStack, + 'o', + archmageBloodOrbStack, + 'g', + new ItemStack(Items.golden_hoe), + 'm', + new ItemStack(Blocks.dirt))); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + new ItemStack(ModBlocks.bloodRune, 1, 5), + "bsb", + "grg", + "bob", + 's', + etherealSlateStack, + 'o', + archmageBloodOrbStack, + 'r', + speedRuneStack, + 'b', + emptyBucketStack, + 'g', + goldIngotStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + new ItemStack(ModItems.itemCompressionSigil), + "pop", + "csc", + "obo", + 'b', + masterBloodOrbStack, + 'p', + new ItemStack(Blocks.piston), + 'c', + new ItemStack(Blocks.crafting_table), + 's', + demonSlateStack, + 'o', + obsidianStack)); AlchemyRecipeRegistry.registerRecipe( crackedRunicPlateStackCrafted, 10, - new ItemStack[] {imbuedSlateStack, imbuedSlateStack, concentratedCatalystStack}, + new ItemStack[] { imbuedSlateStack, imbuedSlateStack, concentratedCatalystStack }, 4); - AlchemyRecipeRegistry.registerRecipe( - runicPlateStack, 30, new ItemStack[] {crackedRunicPlateStack, terraeStack}, 5); + AlchemyRecipeRegistry + .registerRecipe(runicPlateStack, 30, new ItemStack[] { crackedRunicPlateStack, terraeStack }, 5); AlchemyRecipeRegistry.registerRecipe( imbuedRunicPlateStack, 100, - new ItemStack[] {magicalesStack, incendiumStack, runicPlateStack, runicPlateStack, aquasalusStack}, + new ItemStack[] { magicalesStack, incendiumStack, runicPlateStack, runicPlateStack, aquasalusStack }, 5); AlchemyRecipeRegistry.registerRecipe( complexSpellCrystalStack, 50, - new ItemStack[] { - new ItemStack(ModItems.blankSpell), - weakBloodShardStack, - weakBloodShardStack, - diamondStack, - goldIngotStack - }, + new ItemStack[] { new ItemStack(ModItems.blankSpell), weakBloodShardStack, weakBloodShardStack, + diamondStack, goldIngotStack }, 3); AlchemyRecipeRegistry.registerRecipe( soulRunicPlateStack, 150, - new ItemStack[] { - imbuedRunicPlateStack, soulShardStack, soulShardStack, weakBloodShardStack, diamondStack - }, + new ItemStack[] { imbuedRunicPlateStack, soulShardStack, soulShardStack, weakBloodShardStack, + diamondStack }, 6); GameRegistry.addRecipe( @@ -2760,36 +2715,38 @@ public class AlchemicalWizardry { GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 5, 15), fracturedBoneStack); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - new ItemStack(ModItems.itemSigilOfSupression), - "wtl", - "wvl", - "wol", - 'v', - new ItemStack(ModItems.voidSigil), - 't', - new ItemStack(ModBlocks.blockTeleposer), - 'o', - masterBloodOrbStack, - 'l', - lavaBucketStack, - 'w', - waterBucketStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe( - new ItemStack(ModItems.itemSigilOfEnderSeverance), - "ptp", - "ese", - "pop", - 's', - new ItemStack(ModItems.demonicSlate), - 't', - weakBloodShardStack, - 'o', - masterBloodOrbStack, - 'e', - new ItemStack(Items.ender_eye), - 'p', - new ItemStack(Items.ender_pearl))); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + new ItemStack(ModItems.itemSigilOfSupression), + "wtl", + "wvl", + "wol", + 'v', + new ItemStack(ModItems.voidSigil), + 't', + new ItemStack(ModBlocks.blockTeleposer), + 'o', + masterBloodOrbStack, + 'l', + lavaBucketStack, + 'w', + waterBucketStack)); + GameRegistry.addRecipe( + new ShapedBloodOrbRecipe( + new ItemStack(ModItems.itemSigilOfEnderSeverance), + "ptp", + "ese", + "pop", + 's', + new ItemStack(ModItems.demonicSlate), + 't', + weakBloodShardStack, + 'o', + masterBloodOrbStack, + 'e', + new ItemStack(Items.ender_eye), + 'p', + new ItemStack(Items.ender_pearl))); GameRegistry.addShapelessRecipe(enderShardCraftedStack, weakBloodShardStack, new ItemStack(Items.ender_pearl)); @@ -2927,126 +2884,109 @@ public class AlchemicalWizardry { AlchemyRecipeRegistry.registerRecipe( new ItemStack(Items.flint, 2, 0), 1, - new ItemStack[] {new ItemStack(Blocks.gravel), new ItemStack(Items.flint)}, + new ItemStack[] { new ItemStack(Blocks.gravel), new ItemStack(Items.flint) }, 1); AlchemyRecipeRegistry.registerRecipe( new ItemStack(Blocks.grass), 2, - new ItemStack[] { - new ItemStack(Blocks.dirt), - new ItemStack(Items.dye, 1, 15), - new ItemStack(Items.wheat_seeds), - new ItemStack(Items.wheat_seeds) - }, + new ItemStack[] { new ItemStack(Blocks.dirt), new ItemStack(Items.dye, 1, 15), + new ItemStack(Items.wheat_seeds), new ItemStack(Items.wheat_seeds) }, 1); AlchemyRecipeRegistry.registerRecipe( new ItemStack(Items.leather, 3, 0), 2, - new ItemStack[] { - new ItemStack(Items.rotten_flesh), - new ItemStack(Items.rotten_flesh), - new ItemStack(Items.rotten_flesh), - waterBucketStack, - new ItemStack(Items.flint) - }, + new ItemStack[] { new ItemStack(Items.rotten_flesh), new ItemStack(Items.rotten_flesh), + new ItemStack(Items.rotten_flesh), waterBucketStack, new ItemStack(Items.flint) }, 1); AlchemyRecipeRegistry.registerRecipe( new ItemStack(Items.bread), 1, - new ItemStack[] {new ItemStack(Items.wheat), new ItemStack(Items.sugar)}, + new ItemStack[] { new ItemStack(Items.wheat), new ItemStack(Items.sugar) }, 1); AlchemyRecipeRegistry.registerRecipe( new ItemStack(Items.fire_charge, 5, 0), 3, - new ItemStack[] {new ItemStack(Items.coal), new ItemStack(Items.blaze_powder), gunpowderStack}, + new ItemStack[] { new ItemStack(Items.coal), new ItemStack(Items.blaze_powder), gunpowderStack }, 1); AlchemyRecipeRegistry.registerRecipe( new ItemStack(Blocks.sand, 2, 0), 1, - new ItemStack[] {new ItemStack(Blocks.cobblestone), gunpowderStack}, + new ItemStack[] { new ItemStack(Blocks.cobblestone), gunpowderStack }, 1); AlchemyRecipeRegistry.registerRecipe( new ItemStack(Blocks.clay, 4, 0), 2, - new ItemStack[] { - new ItemStack(Blocks.hardened_clay, 1, craftingConstant), - new ItemStack(Blocks.hardened_clay, 1, craftingConstant), - new ItemStack(Blocks.hardened_clay, 1, craftingConstant), - new ItemStack(Blocks.hardened_clay, 1, craftingConstant), - waterBucketStack - }, + new ItemStack[] { new ItemStack(Blocks.hardened_clay, 1, craftingConstant), + new ItemStack(Blocks.hardened_clay, 1, craftingConstant), + new ItemStack(Blocks.hardened_clay, 1, craftingConstant), + new ItemStack(Blocks.hardened_clay, 1, craftingConstant), waterBucketStack }, 1); AlchemyRecipeRegistry.registerRecipe( new ItemStack(Items.string, 4, 0), 1, - new ItemStack[] {new ItemStack(Blocks.wool, 1, craftingConstant), new ItemStack(Items.flint)}, + new ItemStack[] { new ItemStack(Blocks.wool, 1, craftingConstant), new ItemStack(Items.flint) }, 1); AlchemyRecipeRegistry.registerRecipe( new ItemStack(Blocks.gravel, 2, 0), 1, - new ItemStack[] {new ItemStack(Blocks.stone), gunpowderStack}, + new ItemStack[] { new ItemStack(Blocks.stone), gunpowderStack }, 1); AlchemyRecipeRegistry.registerRecipe( - new ItemStack(Blocks.obsidian), 1, new ItemStack[] {waterBucketStack, lavaBucketStack}, 1); - AlchemyRecipeRegistry.registerRecipe( - new ItemStack(Items.paper), 1, new ItemStack[] {new ItemStack(Items.reeds)}, 1); + new ItemStack(Blocks.obsidian), + 1, + new ItemStack[] { waterBucketStack, lavaBucketStack }, + 1); + AlchemyRecipeRegistry + .registerRecipe(new ItemStack(Items.paper), 1, new ItemStack[] { new ItemStack(Items.reeds) }, 1); AlchemyRecipeRegistry.registerRecipe( new ItemStack(Blocks.soul_sand, 3, 0), 3, - new ItemStack[] { - new ItemStack(Blocks.sand), - new ItemStack(Blocks.sand), - new ItemStack(Blocks.sand), - waterBucketStack, - weakBloodShardStack - }, + new ItemStack[] { new ItemStack(Blocks.sand), new ItemStack(Blocks.sand), new ItemStack(Blocks.sand), + waterBucketStack, weakBloodShardStack }, 3); AlchemyRecipeRegistry.registerRecipe( new ItemStack(Blocks.mycelium, 1, 0), 5, - new ItemStack[] { - new ItemStack(Blocks.grass), - new ItemStack(Blocks.brown_mushroom), - new ItemStack(Blocks.red_mushroom) - }, + new ItemStack[] { new ItemStack(Blocks.grass), new ItemStack(Blocks.brown_mushroom), + new ItemStack(Blocks.red_mushroom) }, 2); AlchemyRecipeRegistry.registerRecipe( - new ItemStack(Blocks.ice), 2, new ItemStack[] {waterBucketStack, new ItemStack(Items.snowball)}, 1); + new ItemStack(Blocks.ice), + 2, + new ItemStack[] { waterBucketStack, new ItemStack(Items.snowball) }, + 1); AlchemyRecipeRegistry.registerRecipe( new ItemStack(Items.potionitem, 1, 0), 1, - new ItemStack[] {new ItemStack(Items.glass_bottle), new ItemStack(Blocks.cactus)}, + new ItemStack[] { new ItemStack(Items.glass_bottle), new ItemStack(Blocks.cactus) }, 1); AlchemyRecipeRegistry.registerRecipe( - waterBucketStack, 1, new ItemStack[] {emptyBucketStack, new ItemStack(Blocks.cactus)}, 1); + waterBucketStack, + 1, + new ItemStack[] { emptyBucketStack, new ItemStack(Blocks.cactus) }, + 1); AlchemyRecipeRegistry.registerRecipe( - new ItemStack(Items.glass_bottle, 3), 1, new ItemStack[] {glassStack, glassStack, glassStack}, 1); + new ItemStack(Items.glass_bottle, 3), + 1, + new ItemStack[] { glassStack, glassStack, glassStack }, + 1); AlchemyRecipeRegistry.registerRecipe( new ItemStack(Items.ghast_tear, 2), 100, - new ItemStack[] { - ghastTearStack, - concentratedCatalystStack, - weakBloodShardStack, - new ItemStack(Blocks.soul_sand), - new ItemStack(Blocks.soul_sand) - }, + new ItemStack[] { ghastTearStack, concentratedCatalystStack, weakBloodShardStack, + new ItemStack(Blocks.soul_sand), new ItemStack(Blocks.soul_sand) }, 5); AlchemyRecipeRegistry.registerRecipe( new ItemStack(Items.coal, 5), 1, - new ItemStack[] { - new ItemStack(Items.coal, 1, 1), - new ItemStack(Items.coal, 1, 1), - new ItemStack(Items.coal, 1, 1), - new ItemStack(Items.coal, 1, 1), - new ItemStack(Items.coal, 1, 1) - }, + new ItemStack[] { new ItemStack(Items.coal, 1, 1), new ItemStack(Items.coal, 1, 1), + new ItemStack(Items.coal, 1, 1), new ItemStack(Items.coal, 1, 1), + new ItemStack(Items.coal, 1, 1) }, 1); AlchemyRecipeRegistry.registerRecipe( new ItemStack(Items.clay_ball, 4), 5, - new ItemStack[] {new ItemStack(Blocks.sand), waterBucketStack}, + new ItemStack[] { new ItemStack(Blocks.sand), waterBucketStack }, 2); ItemIncense.registerIncenseRecipes(); @@ -3108,13 +3048,13 @@ public class AlchemicalWizardry { } if (itemThaumLeggings != null) { - BindingRegistry.registerRecipe( - new ItemStack(ModItems.sanguinePants), new ItemStack(itemThaumLeggings)); + BindingRegistry + .registerRecipe(new ItemStack(ModItems.sanguinePants), new ItemStack(itemThaumLeggings)); } if (itemThaumBoots != null) { - BindingRegistry.registerRecipe( - new ItemStack(ModItems.sanguineBoots), new ItemStack(itemThaumBoots)); + BindingRegistry + .registerRecipe(new ItemStack(ModItems.sanguineBoots), new ItemStack(itemThaumBoots)); } // LogHelper.log(Level.INFO, "Loaded RP2 World addon"); @@ -3130,8 +3070,8 @@ public class AlchemicalWizardry { long initialTime = System.nanoTime(); RecipeHolder.init(); long finalTime = System.nanoTime(); - AlchemicalWizardry.logger.info( - "Recipe Holder initialized: took " + (finalTime - initialTime) / 1000000f + "ms."); + AlchemicalWizardry.logger + .info("Recipe Holder initialized: took " + (finalTime - initialTime) / 1000000f + "ms."); ModItems.itemMailCatalogue = new ItemMailOrderCatalogue().setUnlocalizedName("itemMailCatalogue"); GameRegistry.registerItem(ModItems.itemMailCatalogue, "itemMailCatalogue"); @@ -3155,7 +3095,13 @@ public class AlchemicalWizardry { if (provenFrame != null) { AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.itemBloodFrame), provenFrame, 3, 30000, 20, 20, false); + new ItemStack(ModItems.itemBloodFrame), + provenFrame, + 3, + 30000, + 20, + 20, + false); } } else { isForestryLoaded = false; @@ -3216,58 +3162,20 @@ public class AlchemicalWizardry { } public static void blacklistDemons() { - String[] mobs = new String[] { - "FallenAngel", - "LowerGuardian", - "BileDemon", - "WingedFireDemon", - "SmallEarthGolem", - "IceDemon", - "BoulderFist", - "Shade", - "AirElemental", - "WaterElemental", - "EarthElemental", - "FireElemental", - "ShadeElemental", - "HolyElemental", - "MinorDemonGrunt", - "MinorDemonGruntFire", - "MinorDemonGruntWind", - "MinorDemonGruntIce", - "MinorDemonGruntEarth", - "MinorDemonGruntGuardian", - "MinorDemonGruntGuardianFire", - "MinorDemonGruntGuardianWind", - "MinorDemonGruntGuardianIce", - "MinorDemonGruntGuardianEarth" - }; - Class[] mobClasses = new Class[] { - EntityFallenAngel.class, - EntityLowerGuardian.class, - EntityBileDemon.class, - EntityWingedFireDemon.class, - EntitySmallEarthGolem.class, - EntityIceDemon.class, - EntityBoulderFist.class, - EntityShade.class, - EntityAirElemental.class, - EntityWaterElemental.class, - EntityEarthElemental.class, - EntityFireElemental.class, - EntityShadeElemental.class, - EntityHolyElemental.class, - EntityMinorDemonGrunt.class, - EntityMinorDemonGruntFire.class, - EntityMinorDemonGruntWind.class, - EntityMinorDemonGruntIce.class, - EntityMinorDemonGruntEarth.class, - EntityMinorDemonGruntGuardian.class, - EntityMinorDemonGruntGuardianFire.class, - EntityMinorDemonGruntGuardianWind.class, - EntityMinorDemonGruntGuardianIce.class, - EntityMinorDemonGruntGuardianEarth.class - }; + String[] mobs = new String[] { "FallenAngel", "LowerGuardian", "BileDemon", "WingedFireDemon", + "SmallEarthGolem", "IceDemon", "BoulderFist", "Shade", "AirElemental", "WaterElemental", + "EarthElemental", "FireElemental", "ShadeElemental", "HolyElemental", "MinorDemonGrunt", + "MinorDemonGruntFire", "MinorDemonGruntWind", "MinorDemonGruntIce", "MinorDemonGruntEarth", + "MinorDemonGruntGuardian", "MinorDemonGruntGuardianFire", "MinorDemonGruntGuardianWind", + "MinorDemonGruntGuardianIce", "MinorDemonGruntGuardianEarth" }; + Class[] mobClasses = new Class[] { EntityFallenAngel.class, EntityLowerGuardian.class, EntityBileDemon.class, + EntityWingedFireDemon.class, EntitySmallEarthGolem.class, EntityIceDemon.class, EntityBoulderFist.class, + EntityShade.class, EntityAirElemental.class, EntityWaterElemental.class, EntityEarthElemental.class, + EntityFireElemental.class, EntityShadeElemental.class, EntityHolyElemental.class, + EntityMinorDemonGrunt.class, EntityMinorDemonGruntFire.class, EntityMinorDemonGruntWind.class, + EntityMinorDemonGruntIce.class, EntityMinorDemonGruntEarth.class, EntityMinorDemonGruntGuardian.class, + EntityMinorDemonGruntGuardianFire.class, EntityMinorDemonGruntGuardianWind.class, + EntityMinorDemonGruntGuardianIce.class, EntityMinorDemonGruntGuardianEarth.class }; if (Loader.isModLoaded("MineFactoryReloaded")) { ModContainer bloodMagic = Loader.instance().activeModContainer(); Method method = null; @@ -3276,7 +3184,10 @@ public class AlchemicalWizardry { constructor = FMLInterModComms.IMCMessage.class.getDeclaredConstructor(String.class, Object.class); constructor.setAccessible(true); method = FMLInterModComms.class.getDeclaredMethod( - "enqueueMessage", Object.class, String.class, FMLInterModComms.IMCMessage.class); + "enqueueMessage", + Object.class, + String.class, + FMLInterModComms.IMCMessage.class); method.setAccessible(true); } catch (Exception e) { logger.log(Level.ERROR, "Grinder Message reflection failed"); @@ -3285,8 +3196,8 @@ public class AlchemicalWizardry { FMLInterModComms.sendMessage("MineFactoryReloaded", "registerAutoSpawnerBlacklist", mobs[i]); if (method == null) continue; try { - FMLInterModComms.IMCMessage message = - constructor.newInstance("registerGrinderBlacklist", mobClasses[i]); + FMLInterModComms.IMCMessage message = constructor + .newInstance("registerGrinderBlacklist", mobClasses[i]); method.invoke(null, bloodMagic, "MineFactoryReloaded", message); } catch (Exception e) { logger.log(Level.ERROR, "Failed to blacklist Grinder for " + mobs[i]); @@ -3303,17 +3214,14 @@ public class AlchemicalWizardry { if (!AlchemicalWizardry.potionDisableRegen) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.ghast_tear), Potion.regeneration.id, 450); - if (!AlchemicalWizardry.potionDisableNightVision) - AlchemicalPotionCreationHandler.addPotion( - new ItemStack(Items.golden_carrot), Potion.nightVision.id, 2 * 60 * 20); + if (!AlchemicalWizardry.potionDisableNightVision) AlchemicalPotionCreationHandler + .addPotion(new ItemStack(Items.golden_carrot), Potion.nightVision.id, 2 * 60 * 20); - if (!AlchemicalWizardry.potionDisableFireResistance) - AlchemicalPotionCreationHandler.addPotion( - new ItemStack(Items.magma_cream), Potion.fireResistance.id, 2 * 60 * 20); + if (!AlchemicalWizardry.potionDisableFireResistance) AlchemicalPotionCreationHandler + .addPotion(new ItemStack(Items.magma_cream), Potion.fireResistance.id, 2 * 60 * 20); - if (!AlchemicalWizardry.potionDisableWaterBreathing) - AlchemicalPotionCreationHandler.addPotion( - new ItemStack(Items.water_bucket), Potion.waterBreathing.id, 2 * 60 * 20); + if (!AlchemicalWizardry.potionDisableWaterBreathing) AlchemicalPotionCreationHandler + .addPotion(new ItemStack(Items.water_bucket), Potion.waterBreathing.id, 2 * 60 * 20); if (!AlchemicalWizardry.potionDisableMoveSpeed) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.sugar), Potion.moveSpeed.id, 2 * 60 * 20); @@ -3327,13 +3235,11 @@ public class AlchemicalWizardry { if (!AlchemicalWizardry.potionDisableBlindness) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.dye, 1, 0), Potion.blindness.id, 450); - if (!AlchemicalWizardry.potionDisableWeakness) - AlchemicalPotionCreationHandler.addPotion( - new ItemStack(Items.fermented_spider_eye), Potion.weakness.id, 450); + if (!AlchemicalWizardry.potionDisableWeakness) AlchemicalPotionCreationHandler + .addPotion(new ItemStack(Items.fermented_spider_eye), Potion.weakness.id, 450); - if (!AlchemicalWizardry.potionDisableStrength) - AlchemicalPotionCreationHandler.addPotion( - new ItemStack(Items.blaze_powder), Potion.damageBoost.id, 2 * 60 * 20); + if (!AlchemicalWizardry.potionDisableStrength) AlchemicalPotionCreationHandler + .addPotion(new ItemStack(Items.blaze_powder), Potion.damageBoost.id, 2 * 60 * 20); if (!AlchemicalWizardry.potionDisableJumpBoost) AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.aether), Potion.jump.id, 2 * 60 * 20); @@ -3344,65 +3250,75 @@ public class AlchemicalWizardry { if (!AlchemicalWizardry.potionDisableMining) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.redstone), Potion.digSpeed.id, 2 * 60 * 20); - if (!AlchemicalWizardry.potionDisableDrowning) - AlchemicalPotionCreationHandler.addPotion( - new ItemStack(Items.potionitem, 1, 0), AlchemicalWizardry.customPotionDrowning.id, 450); + if (!AlchemicalWizardry.potionDisableDrowning) AlchemicalPotionCreationHandler + .addPotion(new ItemStack(Items.potionitem, 1, 0), AlchemicalWizardry.customPotionDrowning.id, 450); - if (!AlchemicalWizardry.potionDisableInvisibility) - AlchemicalPotionCreationHandler.addPotion( - new ItemStack(Items.glass_bottle), Potion.invisibility.id, 2 * 60 * 20); + if (!AlchemicalWizardry.potionDisableInvisibility) AlchemicalPotionCreationHandler + .addPotion(new ItemStack(Items.glass_bottle), Potion.invisibility.id, 2 * 60 * 20); if (!AlchemicalWizardry.potionDisableResistance) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.diamond), Potion.resistance.id, 2 * 60 * 20); - if (!AlchemicalWizardry.potionDisableSaturation) - AlchemicalPotionCreationHandler.addPotion( - new ItemStack(Items.poisonous_potato), Potion.field_76443_y.id, 2); // saturation + if (!AlchemicalWizardry.potionDisableSaturation) AlchemicalPotionCreationHandler + .addPotion(new ItemStack(Items.poisonous_potato), Potion.field_76443_y.id, 2); // saturation - if (!AlchemicalWizardry.potionDisableHealthBoost) - AlchemicalPotionCreationHandler.addPotion( - new ItemStack(ModItems.demonBloodShard), Potion.field_76434_w.id, 4 * 60 * 20); // health boost + if (!AlchemicalWizardry.potionDisableHealthBoost) AlchemicalPotionCreationHandler + .addPotion(new ItemStack(ModItems.demonBloodShard), Potion.field_76434_w.id, 4 * 60 * 20); // health + // boost - if (!AlchemicalWizardry.potionDisableAbsorption) - AlchemicalPotionCreationHandler.addPotion( - new ItemStack(ModItems.weakBloodShard), Potion.field_76444_x.id, 4 * 60 * 20); // Absorption + if (!AlchemicalWizardry.potionDisableAbsorption) AlchemicalPotionCreationHandler + .addPotion(new ItemStack(ModItems.weakBloodShard), Potion.field_76444_x.id, 4 * 60 * 20); // Absorption - if (!AlchemicalWizardry.potionDisableBoost) - AlchemicalPotionCreationHandler.addPotion( - new ItemStack(ModItems.terrae), AlchemicalWizardry.customPotionBoost.id, 60 * 20); + if (!AlchemicalWizardry.potionDisableBoost) AlchemicalPotionCreationHandler + .addPotion(new ItemStack(ModItems.terrae), AlchemicalWizardry.customPotionBoost.id, 60 * 20); - if (!AlchemicalWizardry.potionDisableFlight) - AlchemicalPotionCreationHandler.addPotion( - new ItemStack(Items.feather), AlchemicalWizardry.customPotionFlight.id, 60 * 20); // 1 * + if (!AlchemicalWizardry.potionDisableFlight) AlchemicalPotionCreationHandler + .addPotion(new ItemStack(Items.feather), AlchemicalWizardry.customPotionFlight.id, 60 * 20); // 1 * - if (!AlchemicalWizardry.potionDisableReciprocation) - AlchemicalPotionCreationHandler.addPotion( - new ItemStack(Items.arrow), AlchemicalWizardry.customPotionReciprocation.id, 60 * 20); // 1 * + if (!AlchemicalWizardry.potionDisableReciprocation) AlchemicalPotionCreationHandler + .addPotion(new ItemStack(Items.arrow), AlchemicalWizardry.customPotionReciprocation.id, 60 * 20); // 1 * - if (!AlchemicalWizardry.potionDisablePlanarBinding) - AlchemicalPotionCreationHandler.addPotion( - new ItemStack(Items.ender_pearl), AlchemicalWizardry.customPotionPlanarBinding.id, 60 * 20); // 1 * + if (!AlchemicalWizardry.potionDisablePlanarBinding) AlchemicalPotionCreationHandler + .addPotion(new ItemStack(Items.ender_pearl), AlchemicalWizardry.customPotionPlanarBinding.id, 60 * 20); // 1 + // * - if (!AlchemicalWizardry.potionDisableSoulFray) - AlchemicalPotionCreationHandler.addPotion( - new ItemStack(Blocks.soul_sand), AlchemicalWizardry.customPotionSoulFray.id, 60 * 20); + if (!AlchemicalWizardry.potionDisableSoulFray) AlchemicalPotionCreationHandler + .addPotion(new ItemStack(Blocks.soul_sand), AlchemicalWizardry.customPotionSoulFray.id, 60 * 20); - if (!AlchemicalWizardry.potionDisableSoulHarden) - AlchemicalPotionCreationHandler.addPotion( - new ItemStack(ModItems.baseItems, 1, 16), AlchemicalWizardry.customPotionSoulHarden.id, 60 * 20); + if (!AlchemicalWizardry.potionDisableSoulHarden) AlchemicalPotionCreationHandler.addPotion( + new ItemStack(ModItems.baseItems, 1, 16), + AlchemicalWizardry.customPotionSoulHarden.id, + 60 * 20); - if (!AlchemicalWizardry.potionDisableDeafness) - AlchemicalPotionCreationHandler.addPotion( - new ItemStack(Items.slime_ball), AlchemicalWizardry.customPotionDeaf.id, 60 * 20); + if (!AlchemicalWizardry.potionDisableDeafness) AlchemicalPotionCreationHandler + .addPotion(new ItemStack(Items.slime_ball), AlchemicalWizardry.customPotionDeaf.id, 60 * 20); } public static void initAltarRecipes() { AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.weakBloodOrb), new ItemStack(Items.diamond), 1, 2000, 2, 1, false); + new ItemStack(ModItems.weakBloodOrb), + new ItemStack(Items.diamond), + 1, + 2000, + 2, + 1, + false); AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.apprenticeBloodOrb), new ItemStack(Items.emerald), 2, 5000, 5, 5, false); + new ItemStack(ModItems.apprenticeBloodOrb), + new ItemStack(Items.emerald), + 2, + 5000, + 5, + 5, + false); AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.magicianBloodOrb), new ItemStack(Blocks.gold_block), 3, 25000, 20, 20, false); + new ItemStack(ModItems.magicianBloodOrb), + new ItemStack(Blocks.gold_block), + 3, + 25000, + 20, + 20, + false); AltarRecipeRegistry.registerAltarRecipe( new ItemStack(ModItems.masterBloodOrb), new ItemStack(ModItems.weakBloodShard), @@ -3436,7 +3352,13 @@ public class AlchemicalWizardry { AltarRecipeRegistry.registerAltarOrbRecipe(new ItemStack(ModItems.transcendentBloodOrb), 6, 100); AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.telepositionFocus), new ItemStack(Items.ender_pearl), 4, 2000, 10, 10, false); + new ItemStack(ModItems.telepositionFocus), + new ItemStack(Items.ender_pearl), + 4, + 2000, + 10, + 10, + false); AltarRecipeRegistry.registerAltarRecipe( new ItemStack(ModItems.enhancedTelepositionFocus), new ItemStack(ModItems.telepositionFocus), @@ -3446,7 +3368,13 @@ public class AlchemicalWizardry { 15, false); AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.demonicSlate), new ItemStack(ModItems.imbuedSlate), 4, 15000, 20, 20, false); + new ItemStack(ModItems.demonicSlate), + new ItemStack(ModItems.imbuedSlate), + 4, + 15000, + 20, + 20, + false); AltarRecipeRegistry.registerAltarRecipe( new ItemStack(ModItems.baseItems, 1, 27), new ItemStack(ModItems.demonicSlate), @@ -3456,17 +3384,53 @@ public class AlchemicalWizardry { 100, false); AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.duskScribeTool), new ItemStack(Blocks.coal_block), 4, 2000, 20, 10, false); + new ItemStack(ModItems.duskScribeTool), + new ItemStack(Blocks.coal_block), + 4, + 2000, + 20, + 10, + false); AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModBlocks.bloodSocket), new ItemStack(ModBlocks.emptySocket), 3, 30000, 40, 10, false); + new ItemStack(ModBlocks.bloodSocket), + new ItemStack(ModBlocks.emptySocket), + 3, + 30000, + 40, + 10, + false); AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.earthScribeTool), new ItemStack(Blocks.obsidian), 3, 1000, 5, 5, false); + new ItemStack(ModItems.earthScribeTool), + new ItemStack(Blocks.obsidian), + 3, + 1000, + 5, + 5, + false); AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.waterScribeTool), new ItemStack(Blocks.lapis_block), 3, 1000, 5, 5, false); + new ItemStack(ModItems.waterScribeTool), + new ItemStack(Blocks.lapis_block), + 3, + 1000, + 5, + 5, + false); AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.blankSpell), new ItemStack(Blocks.glass), 2, 1000, 5, 5, false); + new ItemStack(ModItems.blankSpell), + new ItemStack(Blocks.glass), + 2, + 1000, + 5, + 5, + false); AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.blankSlate), new ItemStack(Blocks.stone), 1, 1000, 5, 5, false); + new ItemStack(ModItems.blankSlate), + new ItemStack(Blocks.stone), + 1, + 1000, + 5, + 5, + false); AltarRecipeRegistry.registerAltarRecipe( new ItemStack(ModItems.activationCrystal), new ItemStack(ModItems.lavaCrystal), @@ -3476,21 +3440,69 @@ public class AlchemicalWizardry { 10, false); AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.fireScribeTool), new ItemStack(Items.magma_cream), 3, 1000, 5, 5, false); + new ItemStack(ModItems.fireScribeTool), + new ItemStack(Items.magma_cream), + 3, + 1000, + 5, + 5, + false); AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.airScribeTool), new ItemStack(Items.ghast_tear), 3, 1000, 5, 5, false); + new ItemStack(ModItems.airScribeTool), + new ItemStack(Items.ghast_tear), + 3, + 1000, + 5, + 5, + false); AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.imbuedSlate), new ItemStack(ModItems.reinforcedSlate), 3, 5000, 15, 10, false); + new ItemStack(ModItems.imbuedSlate), + new ItemStack(ModItems.reinforcedSlate), + 3, + 5000, + 15, + 10, + false); AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.daggerOfSacrifice), new ItemStack(Items.iron_sword), 2, 3000, 5, 5, false); + new ItemStack(ModItems.daggerOfSacrifice), + new ItemStack(Items.iron_sword), + 2, + 3000, + 5, + 5, + false); AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.alchemyFlask), new ItemStack(Items.glass_bottle), 2, 2000, 5, 5, false); + new ItemStack(ModItems.alchemyFlask), + new ItemStack(Items.glass_bottle), + 2, + 2000, + 5, + 5, + false); AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.reinforcedSlate), new ItemStack(ModItems.blankSlate), 2, 2000, 5, 5, false); + new ItemStack(ModItems.reinforcedSlate), + new ItemStack(ModItems.blankSlate), + 2, + 2000, + 5, + 5, + false); AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.bucketLife), new ItemStack(Items.bucket), 1, 1000, 5, 0, false); + new ItemStack(ModItems.bucketLife), + new ItemStack(Items.bucket), + 1, + 1000, + 5, + 0, + false); AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.dawnScribeTool), new ItemStack(Blocks.glowstone), 6, 20000, 50, 35, false); + new ItemStack(ModItems.dawnScribeTool), + new ItemStack(Blocks.glowstone), + 6, + 20000, + 50, + 35, + false); } public static void initRituals() { @@ -4094,10 +4106,9 @@ public class AlchemicalWizardry { BindingRegistry.registerRecipe(new ItemStack(ModItems.boundAxe), new ItemStack(Items.diamond_axe)); BindingRegistry.registerRecipe(new ItemStack(ModItems.boundShovel), new ItemStack(Items.diamond_shovel)); BindingRegistry.registerRecipe(new ItemStack(ModItems.energySword), new ItemStack(Items.diamond_sword)); - BindingRegistry.registerRecipe( - new ItemStack(ModItems.energyBlaster), new ItemStack(ModItems.apprenticeBloodOrb)); - BindingRegistry.registerRecipe( - new ItemStack(Items.baked_potato), new ItemStack(Items.potato)); // <---Shhhhhh.... + BindingRegistry + .registerRecipe(new ItemStack(ModItems.energyBlaster), new ItemStack(ModItems.apprenticeBloodOrb)); + BindingRegistry.registerRecipe(new ItemStack(Items.baked_potato), new ItemStack(Items.potato)); // <---Shhhhhh.... UnbindingRegistry.addAllUnbindingRecipesFromBinding(); } @@ -4109,31 +4120,41 @@ public class AlchemicalWizardry { } public static void initCombinedAlchemyPotionRecipes() { - CombinedPotionRegistry.registerCombinedPotionRecipe( - customPotionFlameCloak, Potion.moveSpeed, Potion.regeneration); + CombinedPotionRegistry + .registerCombinedPotionRecipe(customPotionFlameCloak, Potion.moveSpeed, Potion.regeneration); } public static void initReagentRegistries() { ReagentRegistry.registerItemAndReagent( - new ItemStack(ModItems.sanctus), new ReagentStack(ReagentRegistry.sanctusReagent, 1000)); + new ItemStack(ModItems.sanctus), + new ReagentStack(ReagentRegistry.sanctusReagent, 1000)); ReagentRegistry.registerItemAndReagent( - new ItemStack(ModItems.incendium), new ReagentStack(ReagentRegistry.incendiumReagent, 1000)); + new ItemStack(ModItems.incendium), + new ReagentStack(ReagentRegistry.incendiumReagent, 1000)); ReagentRegistry.registerItemAndReagent( - new ItemStack(ModItems.aquasalus), new ReagentStack(ReagentRegistry.aquasalusReagent, 1000)); + new ItemStack(ModItems.aquasalus), + new ReagentStack(ReagentRegistry.aquasalusReagent, 1000)); ReagentRegistry.registerItemAndReagent( - new ItemStack(ModItems.magicales), new ReagentStack(ReagentRegistry.magicalesReagent, 1000)); + new ItemStack(ModItems.magicales), + new ReagentStack(ReagentRegistry.magicalesReagent, 1000)); ReagentRegistry.registerItemAndReagent( - new ItemStack(ModItems.aether), new ReagentStack(ReagentRegistry.aetherReagent, 1000)); + new ItemStack(ModItems.aether), + new ReagentStack(ReagentRegistry.aetherReagent, 1000)); ReagentRegistry.registerItemAndReagent( - new ItemStack(ModItems.crepitous), new ReagentStack(ReagentRegistry.crepitousReagent, 1000)); + new ItemStack(ModItems.crepitous), + new ReagentStack(ReagentRegistry.crepitousReagent, 1000)); ReagentRegistry.registerItemAndReagent( - new ItemStack(ModItems.crystallos), new ReagentStack(ReagentRegistry.crystallosReagent, 1000)); + new ItemStack(ModItems.crystallos), + new ReagentStack(ReagentRegistry.crystallosReagent, 1000)); ReagentRegistry.registerItemAndReagent( - new ItemStack(ModItems.terrae), new ReagentStack(ReagentRegistry.terraeReagent, 1000)); + new ItemStack(ModItems.terrae), + new ReagentStack(ReagentRegistry.terraeReagent, 1000)); ReagentRegistry.registerItemAndReagent( - new ItemStack(ModItems.tennebrae), new ReagentStack(ReagentRegistry.tenebraeReagent, 1000)); + new ItemStack(ModItems.tennebrae), + new ReagentStack(ReagentRegistry.tenebraeReagent, 1000)); ReagentRegistry.registerItemAndReagent( - new ItemStack(ModItems.baseAlchemyItems, 1, 0), new ReagentStack(ReagentRegistry.offensaReagent, 1000)); + new ItemStack(ModItems.baseAlchemyItems, 1, 0), + new ReagentStack(ReagentRegistry.offensaReagent, 1000)); ReagentRegistry.registerItemAndReagent( new ItemStack(ModItems.baseAlchemyItems, 1, 1), new ReagentStack(ReagentRegistry.praesidiumReagent, 1000)); @@ -4141,7 +4162,8 @@ public class AlchemicalWizardry { new ItemStack(ModItems.baseAlchemyItems, 1, 2), new ReagentStack(ReagentRegistry.orbisTerraeReagent, 1000)); ReagentRegistry.registerItemAndReagent( - new ItemStack(ModItems.baseAlchemyItems, 1, 6), new ReagentStack(ReagentRegistry.virtusReagent, 1000)); + new ItemStack(ModItems.baseAlchemyItems, 1, 6), + new ReagentStack(ReagentRegistry.virtusReagent, 1000)); ReagentRegistry.registerItemAndReagent( new ItemStack(ModItems.baseAlchemyItems, 1, 7), new ReagentStack(ReagentRegistry.reductusReagent, 1000)); @@ -4257,8 +4279,11 @@ public class AlchemicalWizardry { public void initCompressionHandlers() { StorageBlockCraftingManager.getInstance().addStorageBlockRecipes(); - CompressionRegistry.registerHandler(new BaseCompressionHandler( - new ItemStack(Items.glowstone_dust, 4, 0), new ItemStack(Blocks.glowstone), 64)); + CompressionRegistry.registerHandler( + new BaseCompressionHandler( + new ItemStack(Items.glowstone_dust, 4, 0), + new ItemStack(Blocks.glowstone), + 64)); CompressionRegistry.registerHandler( new BaseCompressionHandler(new ItemStack(Items.snowball, 4, 0), new ItemStack(Blocks.snow), 8)); CompressionRegistry.registerHandler(new AdvancedCompressionHandler()); diff --git a/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java b/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java index 4130db09..3a3e7474 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java +++ b/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java @@ -2,23 +2,13 @@ package WayofTime.alchemicalWizardry; import static net.minecraft.entity.EntityList.stringToClassMapping; -import WayofTime.alchemicalWizardry.api.BlockStack; -import WayofTime.alchemicalWizardry.api.rituals.Rituals; -import WayofTime.alchemicalWizardry.client.renderer.ColourThreshold; -import WayofTime.alchemicalWizardry.client.renderer.RenderHelper; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks; -import WayofTime.alchemicalWizardry.common.demonVillage.DemonVillagePath; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; -import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; import java.io.File; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map.Entry; + import net.minecraft.block.Block; import net.minecraft.entity.EntityList; import net.minecraft.entity.EntityLivingBase; @@ -31,13 +21,23 @@ import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Property; import net.minecraftforge.oredict.OreDictionary; +import WayofTime.alchemicalWizardry.api.BlockStack; +import WayofTime.alchemicalWizardry.api.rituals.Rituals; +import WayofTime.alchemicalWizardry.client.renderer.ColourThreshold; +import WayofTime.alchemicalWizardry.client.renderer.RenderHelper; +import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks; +import WayofTime.alchemicalWizardry.common.demonVillage.DemonVillagePath; +import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; +import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; + /** - * Created with IntelliJ IDEA. - * User: Pokefenn - * Date: 17/01/14 - * Time: 19:50 + * Created with IntelliJ IDEA. User: Pokefenn Date: 17/01/14 Time: 19:50 */ public class BloodMagicConfiguration { + private static final String DEFAULT_COLOR_LIST = "100,f; 80,7; 60,e; 40,6; 25,c; 10,4"; public static final List colorList = new ArrayList(); @@ -59,8 +59,8 @@ public class BloodMagicConfiguration { syncConfig(); } catch (Exception e) { - AlchemicalWizardry.logger.error( - "There has been a problem loading the configuration, go ask on the forums :p"); + AlchemicalWizardry.logger + .error("There has been a problem loading the configuration, go ask on the forums :p"); } finally { config.save(); @@ -68,573 +68,524 @@ public class BloodMagicConfiguration { } public static void syncConfig() { - AlchemicalWizardry.standardBindingAgentDungeonChance = - config.get("Dungeon Loot Chances", "standardBindingAgent", 30).getInt(); - AlchemicalWizardry.mundanePowerCatalystDungeonChance = - config.get("Dungeon Loot Chances", "mundanePowerCatalyst", 20).getInt(); - AlchemicalWizardry.averagePowerCatalystDungeonChance = - config.get("Dungeon Loot Chances", "averagePowerCatalyst", 10).getInt(); - AlchemicalWizardry.greaterPowerCatalystDungeonChance = - config.get("Dungeon Loot Chances", "greaterPowerCatalyst", 5).getInt(); - AlchemicalWizardry.mundaneLengtheningCatalystDungeonChance = config.get( - "Dungeon Loot Chances", "mundaneLengtheningCatalyst", 20) - .getInt(); - AlchemicalWizardry.averageLengtheningCatalystDungeonChance = config.get( - "Dungeon Loot Chances", "averageLengtheningCatalyst", 10) - .getInt(); - AlchemicalWizardry.greaterLengtheningCatalystDungeonChance = config.get( - "Dungeon Loot Chances", "greaterLengtheningCatalyst", 5) - .getInt(); - AlchemicalWizardry.customPotionDrowningID = - config.get("Potion ID", "Drowning", 100).getInt(); - AlchemicalWizardry.customPotionBoostID = - config.get("Potion ID", "Boost", 101).getInt(); - AlchemicalWizardry.customPotionProjProtID = - config.get("Potion ID", "ProjProt", 102).getInt(); - AlchemicalWizardry.customPotionInhibitID = - config.get("Potion ID", "Inhibit", 103).getInt(); - AlchemicalWizardry.customPotionFlightID = - config.get("Potion ID", "Flight", 104).getInt(); - AlchemicalWizardry.customPotionReciprocationID = - config.get("Potion ID", "Reciprocation", 105).getInt(); - AlchemicalWizardry.customPotionFlameCloakID = - config.get("Potion ID", "FlameCloak", 106).getInt(); - AlchemicalWizardry.customPotionIceCloakID = - config.get("Potion ID", "IceCloak", 107).getInt(); - AlchemicalWizardry.customPotionHeavyHeartID = - config.get("Potion ID", "HeavyHeart", 108).getInt(); - AlchemicalWizardry.customPotionFireFuseID = - config.get("Potion ID", "FireFuse", 109).getInt(); - AlchemicalWizardry.customPotionPlanarBindingID = - config.get("Potion ID", "PlanarBinding", 110).getInt(); - AlchemicalWizardry.customPotionSoulFrayID = - config.get("Potion ID", "SoulFray", 111).getInt(); - AlchemicalWizardry.customPotionSoulHardenID = - config.get("Potion ID", "SoulHarden", 112).getInt(); - AlchemicalWizardry.customPotionDeafID = - config.get("Potion ID", "Deaf", 113).getInt(); - AlchemicalWizardry.customPotionFeatherFallID = - config.get("Potion ID", "FeatherFall", 114).getInt(); - AlchemicalWizardry.customPotionDemonCloakID = - config.get("Potion ID", "DemonCloak", 115).getInt(); - AlchemicalWizardry.customPotionAmphibianID = - config.get("Potion ID", "Amphibian", 116).getInt(); + AlchemicalWizardry.standardBindingAgentDungeonChance = config + .get("Dungeon Loot Chances", "standardBindingAgent", 30).getInt(); + AlchemicalWizardry.mundanePowerCatalystDungeonChance = config + .get("Dungeon Loot Chances", "mundanePowerCatalyst", 20).getInt(); + AlchemicalWizardry.averagePowerCatalystDungeonChance = config + .get("Dungeon Loot Chances", "averagePowerCatalyst", 10).getInt(); + AlchemicalWizardry.greaterPowerCatalystDungeonChance = config + .get("Dungeon Loot Chances", "greaterPowerCatalyst", 5).getInt(); + AlchemicalWizardry.mundaneLengtheningCatalystDungeonChance = config + .get("Dungeon Loot Chances", "mundaneLengtheningCatalyst", 20).getInt(); + AlchemicalWizardry.averageLengtheningCatalystDungeonChance = config + .get("Dungeon Loot Chances", "averageLengtheningCatalyst", 10).getInt(); + AlchemicalWizardry.greaterLengtheningCatalystDungeonChance = config + .get("Dungeon Loot Chances", "greaterLengtheningCatalyst", 5).getInt(); + AlchemicalWizardry.customPotionDrowningID = config.get("Potion ID", "Drowning", 100).getInt(); + AlchemicalWizardry.customPotionBoostID = config.get("Potion ID", "Boost", 101).getInt(); + AlchemicalWizardry.customPotionProjProtID = config.get("Potion ID", "ProjProt", 102).getInt(); + AlchemicalWizardry.customPotionInhibitID = config.get("Potion ID", "Inhibit", 103).getInt(); + AlchemicalWizardry.customPotionFlightID = config.get("Potion ID", "Flight", 104).getInt(); + AlchemicalWizardry.customPotionReciprocationID = config.get("Potion ID", "Reciprocation", 105).getInt(); + AlchemicalWizardry.customPotionFlameCloakID = config.get("Potion ID", "FlameCloak", 106).getInt(); + AlchemicalWizardry.customPotionIceCloakID = config.get("Potion ID", "IceCloak", 107).getInt(); + AlchemicalWizardry.customPotionHeavyHeartID = config.get("Potion ID", "HeavyHeart", 108).getInt(); + AlchemicalWizardry.customPotionFireFuseID = config.get("Potion ID", "FireFuse", 109).getInt(); + AlchemicalWizardry.customPotionPlanarBindingID = config.get("Potion ID", "PlanarBinding", 110).getInt(); + AlchemicalWizardry.customPotionSoulFrayID = config.get("Potion ID", "SoulFray", 111).getInt(); + AlchemicalWizardry.customPotionSoulHardenID = config.get("Potion ID", "SoulHarden", 112).getInt(); + AlchemicalWizardry.customPotionDeafID = config.get("Potion ID", "Deaf", 113).getInt(); + AlchemicalWizardry.customPotionFeatherFallID = config.get("Potion ID", "FeatherFall", 114).getInt(); + AlchemicalWizardry.customPotionDemonCloakID = config.get("Potion ID", "DemonCloak", 115).getInt(); + AlchemicalWizardry.customPotionAmphibianID = config.get("Potion ID", "Amphibian", 116).getInt(); - AlchemicalWizardry.doMeteorsDestroyBlocks = - config.get("meteor", "doMeteorsDestroyBlocks", true).getBoolean(true); - AlchemicalWizardry.allowedCrushedOresArray = config.get("oreCrushing", "allowedOres", new String[] { - "iron", "gold", "copper", "tin", "lead", "silver", "osmium" - }) - .getStringList(); + AlchemicalWizardry.doMeteorsDestroyBlocks = config.get("meteor", "doMeteorsDestroyBlocks", true) + .getBoolean(true); + AlchemicalWizardry.allowedCrushedOresArray = config.get( + "oreCrushing", + "allowedOres", + new String[] { "iron", "gold", "copper", "tin", "lead", "silver", "osmium" }).getStringList(); - AlchemicalWizardry.wimpySettings = - config.get("WimpySettings", "IDontLikeFun", false).getBoolean(false); - AlchemicalWizardry.respawnWithDebuff = - config.get("WimpySettings", "RespawnWithDebuff", true).getBoolean(); - AlchemicalWizardry.causeHungerWithRegen = - config.get("WimpySettings", "causeHungerWithRegen", true).getBoolean(); - AlchemicalWizardry.causeHungerChatMessage = - config.get("WimpySettings", "causeHungerChatMessage", true).getBoolean(); - // AlchemicalWizardry.lockdownAltar = config.get("WimpySettings", "LockdownAltarWithRegen", true).getBoolean(); + AlchemicalWizardry.wimpySettings = config.get("WimpySettings", "IDontLikeFun", false).getBoolean(false); + AlchemicalWizardry.respawnWithDebuff = config.get("WimpySettings", "RespawnWithDebuff", true).getBoolean(); + AlchemicalWizardry.causeHungerWithRegen = config.get("WimpySettings", "causeHungerWithRegen", true) + .getBoolean(); + AlchemicalWizardry.causeHungerChatMessage = config.get("WimpySettings", "causeHungerChatMessage", true) + .getBoolean(); + // AlchemicalWizardry.lockdownAltar = config.get("WimpySettings", "LockdownAltarWithRegen", true).getBoolean(); AlchemicalWizardry.lockdownAltar = false; - AlchemicalWizardry.disableBoundToolsRightClick = config.get( - "WimpySettings", "disableBoundToolsRightClick", false) - .getBoolean(false); + AlchemicalWizardry.disableBoundToolsRightClick = config + .get("WimpySettings", "disableBoundToolsRightClick", false).getBoolean(false); AlchemicalWizardry.ritualDisabledWater = config.get("Ritual Blacklist", "Ritual of the Full Spring", false) .getBoolean(false); - AlchemicalWizardry.ritualDisabledLava = - config.get("Ritual Blacklist", "Serenade of the Nether", false).getBoolean(false); + AlchemicalWizardry.ritualDisabledLava = config.get("Ritual Blacklist", "Serenade of the Nether", false) + .getBoolean(false); AlchemicalWizardry.ritualDisabledGreenGrove = config.get("Ritual Blacklist", "Ritual of the Green Grove", false) .getBoolean(false); - AlchemicalWizardry.ritualDisabledInterdiction = - config.get("Ritual Blacklist", "Interdiction Ritual", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledContainment = - config.get("Ritual Blacklist", "Ritual of Containment", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledBinding = - config.get("Ritual Blacklist", "Ritual of Binding", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledUnbinding = - config.get("Ritual Blacklist", "Ritual of Unbinding", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledHighJump = - config.get("Ritual Blacklist", "Ritual of the High Jump", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledMagnetism = - config.get("Ritual Blacklist", "Ritual of Magnetism", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledCrusher = - config.get("Ritual Blacklist", "Ritual of the Crusher", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledSpeed = - config.get("Ritual Blacklist", "Ritual of Speed", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledAnimalGrowth = - config.get("Ritual Blacklist", "Ritual of the Shepherd", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledSuffering = - config.get("Ritual Blacklist", "Well of Suffering", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledRegen = - config.get("Ritual Blacklist", "Ritual of Regeneration", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledFeatheredKnife = config.get( - "Ritual Blacklist", "Ritual of the Feathered Knife", false) + AlchemicalWizardry.ritualDisabledInterdiction = config.get("Ritual Blacklist", "Interdiction Ritual", false) .getBoolean(false); - AlchemicalWizardry.ritualDisabledFeatheredEarth = config.get( - "Ritual Blacklist", "Ritual of the Feathered Earth", false) + AlchemicalWizardry.ritualDisabledContainment = config.get("Ritual Blacklist", "Ritual of Containment", false) .getBoolean(false); + AlchemicalWizardry.ritualDisabledBinding = config.get("Ritual Blacklist", "Ritual of Binding", false) + .getBoolean(false); + AlchemicalWizardry.ritualDisabledUnbinding = config.get("Ritual Blacklist", "Ritual of Unbinding", false) + .getBoolean(false); + AlchemicalWizardry.ritualDisabledHighJump = config.get("Ritual Blacklist", "Ritual of the High Jump", false) + .getBoolean(false); + AlchemicalWizardry.ritualDisabledMagnetism = config.get("Ritual Blacklist", "Ritual of Magnetism", false) + .getBoolean(false); + AlchemicalWizardry.ritualDisabledCrusher = config.get("Ritual Blacklist", "Ritual of the Crusher", false) + .getBoolean(false); + AlchemicalWizardry.ritualDisabledSpeed = config.get("Ritual Blacklist", "Ritual of Speed", false) + .getBoolean(false); + AlchemicalWizardry.ritualDisabledAnimalGrowth = config.get("Ritual Blacklist", "Ritual of the Shepherd", false) + .getBoolean(false); + AlchemicalWizardry.ritualDisabledSuffering = config.get("Ritual Blacklist", "Well of Suffering", false) + .getBoolean(false); + AlchemicalWizardry.ritualDisabledRegen = config.get("Ritual Blacklist", "Ritual of Regeneration", false) + .getBoolean(false); + AlchemicalWizardry.ritualDisabledFeatheredKnife = config + .get("Ritual Blacklist", "Ritual of the Feathered Knife", false).getBoolean(false); + AlchemicalWizardry.ritualDisabledFeatheredEarth = config + .get("Ritual Blacklist", "Ritual of the Feathered Earth", false).getBoolean(false); AlchemicalWizardry.ritualDisabledGaia = config.get("Ritual Blacklist", "Ritual of Gaia's Transformation", false) .getBoolean(false); - AlchemicalWizardry.ritualDisabledCondor = - config.get("Ritual Blacklist", "Reverence of the Condor", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledFallingTower = config.get( - "Ritual Blacklist", "Mark of the Falling Tower", false) + AlchemicalWizardry.ritualDisabledCondor = config.get("Ritual Blacklist", "Reverence of the Condor", false) + .getBoolean(false); + AlchemicalWizardry.ritualDisabledFallingTower = config + .get("Ritual Blacklist", "Mark of the Falling Tower", false).getBoolean(false); + AlchemicalWizardry.ritualDisabledBalladOfAlchemy = config.get("Ritual Blacklist", "Ballad of Alchemy", false) + .getBoolean(false); + AlchemicalWizardry.ritualDisabledExpulsion = config.get("Ritual Blacklist", "Aura of Expulsion", false) + .getBoolean(false); + AlchemicalWizardry.ritualDisabledSuppression = config.get("Ritual Blacklist", "Dome of Supression", false) + .getBoolean(false); + AlchemicalWizardry.ritualDisabledZephyr = config.get("Ritual Blacklist", "Call of the Zephyr", false) .getBoolean(false); - AlchemicalWizardry.ritualDisabledBalladOfAlchemy = - config.get("Ritual Blacklist", "Ballad of Alchemy", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledExpulsion = - config.get("Ritual Blacklist", "Aura of Expulsion", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledSuppression = - config.get("Ritual Blacklist", "Dome of Supression", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledZephyr = - config.get("Ritual Blacklist", "Call of the Zephyr", false).getBoolean(false); AlchemicalWizardry.ritualDisabledHarvest = config.get("Ritual Blacklist", "Reap of the Harvest Moon", false) .getBoolean(false); - AlchemicalWizardry.ritualDisabledConduit = - config.get("Ritual Blacklist", "Cry of the Eternal Soul", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledEllipsoid = - config.get("Ritual Blacklist", "Focus of the Ellipsoid", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledEvaporation = - config.get("Ritual Blacklist", "Song of Evaporation", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledSpawnWard = - config.get("Ritual Blacklist", "Ward of Sacrosanctity", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledVeilOfEvil = - config.get("Ritual Blacklist", "Veil of Evil", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledFullStomach = config.get( - "Ritual Blacklist", "Requiem of the Satiated Stomach", false) + AlchemicalWizardry.ritualDisabledConduit = config.get("Ritual Blacklist", "Cry of the Eternal Soul", false) .getBoolean(false); - AlchemicalWizardry.ritualDisabledConvocation = config.get( - "Ritual Blacklist", "Convocation of the Damned", false) + AlchemicalWizardry.ritualDisabledEllipsoid = config.get("Ritual Blacklist", "Focus of the Ellipsoid", false) + .getBoolean(false); + AlchemicalWizardry.ritualDisabledEvaporation = config.get("Ritual Blacklist", "Song of Evaporation", false) + .getBoolean(false); + AlchemicalWizardry.ritualDisabledSpawnWard = config.get("Ritual Blacklist", "Ward of Sacrosanctity", false) + .getBoolean(false); + AlchemicalWizardry.ritualDisabledVeilOfEvil = config.get("Ritual Blacklist", "Veil of Evil", false) + .getBoolean(false); + AlchemicalWizardry.ritualDisabledFullStomach = config + .get("Ritual Blacklist", "Requiem of the Satiated Stomach", false).getBoolean(false); + AlchemicalWizardry.ritualDisabledConvocation = config + .get("Ritual Blacklist", "Convocation of the Damned", false).getBoolean(false); + AlchemicalWizardry.ritualDisabledSymmetry = config.get("Ritual Blacklist", "Symmetry of the Omega", false) + .getBoolean(false); + AlchemicalWizardry.ritualDisabledStalling = config.get("Ritual Blacklist", "Duet of the Fused Souls", false) .getBoolean(false); - AlchemicalWizardry.ritualDisabledSymmetry = - config.get("Ritual Blacklist", "Symmetry of the Omega", false).getBoolean(false); - AlchemicalWizardry.ritualDisabledStalling = - config.get("Ritual Blacklist", "Duet of the Fused Souls", false).getBoolean(false); AlchemicalWizardry.ritualDisabledCrafting = config.get("Ritual Blacklist", "Rhythm of the Beating Anvil", false) .getBoolean(false); - AlchemicalWizardry.ritualDisabledPhantomHands = config.get( - "Ritual Blacklist", "Orchestra of the Phantom Hands", false) + AlchemicalWizardry.ritualDisabledPhantomHands = config + .get("Ritual Blacklist", "Orchestra of the Phantom Hands", false).getBoolean(false); + AlchemicalWizardry.ritualDisabledSphereIsland = config.get("Ritual Blacklist", "Birth of the Bastion", false) .getBoolean(false); - AlchemicalWizardry.ritualDisabledSphereIsland = - config.get("Ritual Blacklist", "Birth of the Bastion", false).getBoolean(false); - AlchemicalWizardry.ritualWeakDisabledNight = - config.get("Ritual Blacklist.Weak", "Night", false).getBoolean(false); - AlchemicalWizardry.ritualWeakDisabledResistance = - config.get("Ritual Blacklist.Weak", "Resistance", false).getBoolean(false); - AlchemicalWizardry.ritualWeakDisabledThunderstorm = - config.get("Ritual Blacklist.Weak", "Thunderstorm", false).getBoolean(false); - AlchemicalWizardry.ritualWeakDisabledZombie = - config.get("Ritual Blacklist.Weak", "Zombie", false).getBoolean(false); + AlchemicalWizardry.ritualWeakDisabledNight = config.get("Ritual Blacklist.Weak", "Night", false) + .getBoolean(false); + AlchemicalWizardry.ritualWeakDisabledResistance = config.get("Ritual Blacklist.Weak", "Resistance", false) + .getBoolean(false); + AlchemicalWizardry.ritualWeakDisabledThunderstorm = config.get("Ritual Blacklist.Weak", "Thunderstorm", false) + .getBoolean(false); + AlchemicalWizardry.ritualWeakDisabledZombie = config.get("Ritual Blacklist.Weak", "Zombie", false) + .getBoolean(false); - AlchemicalWizardry.potionDisableRegen = - config.get("Alchemy Potion Blacklist", "Regeneration", false).getBoolean(false); - AlchemicalWizardry.potionDisableNightVision = - config.get("Alchemy Potion Blacklist", "Night Vision", false).getBoolean(false); - AlchemicalWizardry.potionDisableFireResistance = - config.get("Alchemy Potion Blacklist", "Fire Resistance", false).getBoolean(false); - AlchemicalWizardry.potionDisableWaterBreathing = - config.get("Alchemy Potion Blacklist", "Water Breathing", false).getBoolean(false); - AlchemicalWizardry.potionDisableMoveSpeed = - config.get("Alchemy Potion Blacklist", "Move Speed", false).getBoolean(false); - AlchemicalWizardry.potionDisableInstantHealth = - config.get("Alchemy Potion Blacklist", "Instant Health", false).getBoolean(false); - AlchemicalWizardry.potionDisablePoison = - config.get("Alchemy Potion Blacklist", "Poison", false).getBoolean(false); - AlchemicalWizardry.potionDisableBlindness = - config.get("Alchemy Potion Blacklist", "Blindness", false).getBoolean(false); - AlchemicalWizardry.potionDisableWeakness = - config.get("Alchemy Potion Blacklist", "Weakness", false).getBoolean(false); - AlchemicalWizardry.potionDisableStrength = - config.get("Alchemy Potion Blacklist", "Strength", false).getBoolean(false); - AlchemicalWizardry.potionDisableJumpBoost = - config.get("Alchemy Potion Blacklist", "Jump Boost", false).getBoolean(false); - AlchemicalWizardry.potionDisableSlowness = - config.get("Alchemy Potion Blacklist", "Slowness", false).getBoolean(false); - AlchemicalWizardry.potionDisableMining = - config.get("Alchemy Potion Blacklist", "Mining Speed", false).getBoolean(false); - AlchemicalWizardry.potionDisableDrowning = - config.get("Alchemy Potion Blacklist", "Drowning", false).getBoolean(false); - AlchemicalWizardry.potionDisableInvisibility = - config.get("Alchemy Potion Blacklist", "Invisibility", false).getBoolean(false); - AlchemicalWizardry.potionDisableResistance = - config.get("Alchemy Potion Blacklist", "Resistance", false).getBoolean(false); - AlchemicalWizardry.potionDisableSaturation = - config.get("Alchemy Potion Blacklist", "Saturation", false).getBoolean(false); - AlchemicalWizardry.potionDisableHealthBoost = - config.get("Alchemy Potion Blacklist", "Health Boost", false).getBoolean(false); - AlchemicalWizardry.potionDisableAbsorption = - config.get("Alchemy Potion Blacklist", "Absorption", false).getBoolean(false); - AlchemicalWizardry.potionDisableBoost = - config.get("Alchemy Potion Blacklist", "Boost", false).getBoolean(false); - AlchemicalWizardry.potionDisableFlight = - config.get("Alchemy Potion Blacklist", "Flight", false).getBoolean(false); - AlchemicalWizardry.potionDisableReciprocation = - config.get("Alchemy Potion Blacklist", "Reciprocation", false).getBoolean(false); - AlchemicalWizardry.potionDisablePlanarBinding = - config.get("Alchemy Potion Blacklist", "Planar Binding", false).getBoolean(false); - AlchemicalWizardry.potionDisableSoulFray = - config.get("Alchemy Potion Blacklist", "Soul Fray", false).getBoolean(false); - AlchemicalWizardry.potionDisableSoulHarden = - config.get("Alchemy Potion Blacklist", "Soul Harden", false).getBoolean(false); - AlchemicalWizardry.potionDisableDeafness = - config.get("Alchemy Potion Blacklist", "Deafness", false).getBoolean(false); + AlchemicalWizardry.potionDisableRegen = config.get("Alchemy Potion Blacklist", "Regeneration", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableNightVision = config.get("Alchemy Potion Blacklist", "Night Vision", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableFireResistance = config + .get("Alchemy Potion Blacklist", "Fire Resistance", false).getBoolean(false); + AlchemicalWizardry.potionDisableWaterBreathing = config + .get("Alchemy Potion Blacklist", "Water Breathing", false).getBoolean(false); + AlchemicalWizardry.potionDisableMoveSpeed = config.get("Alchemy Potion Blacklist", "Move Speed", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableInstantHealth = config.get("Alchemy Potion Blacklist", "Instant Health", false) + .getBoolean(false); + AlchemicalWizardry.potionDisablePoison = config.get("Alchemy Potion Blacklist", "Poison", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableBlindness = config.get("Alchemy Potion Blacklist", "Blindness", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableWeakness = config.get("Alchemy Potion Blacklist", "Weakness", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableStrength = config.get("Alchemy Potion Blacklist", "Strength", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableJumpBoost = config.get("Alchemy Potion Blacklist", "Jump Boost", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableSlowness = config.get("Alchemy Potion Blacklist", "Slowness", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableMining = config.get("Alchemy Potion Blacklist", "Mining Speed", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableDrowning = config.get("Alchemy Potion Blacklist", "Drowning", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableInvisibility = config.get("Alchemy Potion Blacklist", "Invisibility", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableResistance = config.get("Alchemy Potion Blacklist", "Resistance", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableSaturation = config.get("Alchemy Potion Blacklist", "Saturation", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableHealthBoost = config.get("Alchemy Potion Blacklist", "Health Boost", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableAbsorption = config.get("Alchemy Potion Blacklist", "Absorption", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableBoost = config.get("Alchemy Potion Blacklist", "Boost", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableFlight = config.get("Alchemy Potion Blacklist", "Flight", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableReciprocation = config.get("Alchemy Potion Blacklist", "Reciprocation", false) + .getBoolean(false); + AlchemicalWizardry.potionDisablePlanarBinding = config.get("Alchemy Potion Blacklist", "Planar Binding", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableSoulFray = config.get("Alchemy Potion Blacklist", "Soul Fray", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableSoulHarden = config.get("Alchemy Potion Blacklist", "Soul Harden", false) + .getBoolean(false); + AlchemicalWizardry.potionDisableDeafness = config.get("Alchemy Potion Blacklist", "Deafness", false) + .getBoolean(false); teleposerBlacklist = config.get( - "Teleposer Blacklist", - "Blacklist", - blacklist, - "Stops specified blocks from being teleposed. Put entries on new lines. Valid syntax is: \nmodid:blockname:meta") + "Teleposer Blacklist", + "Blacklist", + blacklist, + "Stops specified blocks from being teleposed. Put entries on new lines. Valid syntax is: \nmodid:blockname:meta") .getStringList(); buildTeleposerBlacklist(); String tempDemonConfigs = "Demon Configs"; - TEDemonPortal.buildingGridDelay = - config.get(tempDemonConfigs, "Building Grid Delay", 25).getInt(); - TEDemonPortal.roadGridDelay = - config.get(tempDemonConfigs, "Road Grid Delay", 10).getInt(); - TEDemonPortal.demonHoardDelay = - config.get(tempDemonConfigs, "Demon Hoard Delay", 40).getInt(); - TEDemonPortal.demonRoadChance = - (float) (config.get(tempDemonConfigs, "Demon Road Chance", 0.3f).getDouble()); - TEDemonPortal.demonHouseChance = (float) - (config.get(tempDemonConfigs, "Demon House Chance", 0.6f).getDouble()); - TEDemonPortal.demonPortalChance = (float) - (config.get(tempDemonConfigs, "Demon Portal Chance", 0.5f).getDouble()); - TEDemonPortal.demonHoardChance = (float) - (config.get(tempDemonConfigs, "Demon Hoard Chance", 0.8f).getDouble()); - TEDemonPortal.portalTickRate = - (float) (config.get(tempDemonConfigs, "Portal Tick Rate", 0.1f).getDouble()); + TEDemonPortal.buildingGridDelay = config.get(tempDemonConfigs, "Building Grid Delay", 25).getInt(); + TEDemonPortal.roadGridDelay = config.get(tempDemonConfigs, "Road Grid Delay", 10).getInt(); + TEDemonPortal.demonHoardDelay = config.get(tempDemonConfigs, "Demon Hoard Delay", 40).getInt(); + TEDemonPortal.demonRoadChance = (float) (config.get(tempDemonConfigs, "Demon Road Chance", 0.3f).getDouble()); + TEDemonPortal.demonHouseChance = (float) (config.get(tempDemonConfigs, "Demon House Chance", 0.6f).getDouble()); + TEDemonPortal.demonPortalChance = (float) (config.get(tempDemonConfigs, "Demon Portal Chance", 0.5f) + .getDouble()); + TEDemonPortal.demonHoardChance = (float) (config.get(tempDemonConfigs, "Demon Hoard Chance", 0.8f).getDouble()); + TEDemonPortal.portalTickRate = (float) (config.get(tempDemonConfigs, "Portal Tick Rate", 0.1f).getDouble()); - DemonVillagePath.canGoDown = - config.get(tempDemonConfigs, "canRoadGoDown", true).getBoolean(); - DemonVillagePath.tunnelIfObstructed = - config.get(tempDemonConfigs, "tunnelIfObstructed", false).getBoolean(); - DemonVillagePath.createBridgeInAirIfObstructed = config.get( - tempDemonConfigs, "createBridgeInAirIfObstructed", false) + DemonVillagePath.canGoDown = config.get(tempDemonConfigs, "canRoadGoDown", true).getBoolean(); + DemonVillagePath.tunnelIfObstructed = config.get(tempDemonConfigs, "tunnelIfObstructed", false).getBoolean(); + DemonVillagePath.createBridgeInAirIfObstructed = config + .get(tempDemonConfigs, "createBridgeInAirIfObstructed", false).getBoolean(); + + TEDemonPortal.limit = config.get(tempDemonConfigs, "demonGridSpaceLimit", 100).getInt(); + TEDemonPortal.demonLimit = config.get(tempDemonConfigs, "demonHoardLimit", 100).getInt(); + + AlchemicalWizardry.isDemonRitualCreativeOnly = config.get(tempDemonConfigs, "IsDemonRitualCreativeOnly", false) .getBoolean(); - - TEDemonPortal.limit = - config.get(tempDemonConfigs, "demonGridSpaceLimit", 100).getInt(); - TEDemonPortal.demonLimit = - config.get(tempDemonConfigs, "demonHoardLimit", 100).getInt(); - - AlchemicalWizardry.isDemonRitualCreativeOnly = - config.get(tempDemonConfigs, "IsDemonRitualCreativeOnly", false).getBoolean(); - AlchemicalWizardry.demonRitualDimensionBlacklist = config.get( - tempDemonConfigs, "dimension blacklist for the demon portal activation", new int[] {0}) + AlchemicalWizardry.demonRitualDimensionBlacklist = config + .get(tempDemonConfigs, "dimension blacklist for the demon portal activation", new int[] { 0 }) .getIntList(); - BoundArmour.tryComplexRendering = - config.get("WimpySettings", "UseFancyBoundArmour", true).getBoolean(true); + BoundArmour.tryComplexRendering = config.get("WimpySettings", "UseFancyBoundArmour", true).getBoolean(true); - // ItemIncense.itemDuration = config.get("TestIncenseSettings", "ItemDuration", 100).getInt(); - // ItemIncense.minValue = config.get("TestIncenseSettings", "MinValue", 0).getInt(); - // ItemIncense.maxValue = config.get("TestIncenseSettings", "MaxValue", 100).getInt(); - // PlayerSacrificeHandler.scalingOfSacrifice = (float) config.get("TestIncenseSettings", "ScalingFactor", + // ItemIncense.itemDuration = config.get("TestIncenseSettings", "ItemDuration", 100).getInt(); + // ItemIncense.minValue = config.get("TestIncenseSettings", "MinValue", 0).getInt(); + // ItemIncense.maxValue = config.get("TestIncenseSettings", "MaxValue", 100).getInt(); + // PlayerSacrificeHandler.scalingOfSacrifice = (float) config.get("TestIncenseSettings", "ScalingFactor", // 0.0025f).getDouble(); - // PlayerSacrificeHandler.soulFrayDuration = config.get("TestIncenseSettings", "SoulFrayDuration", + // PlayerSacrificeHandler.soulFrayDuration = config.get("TestIncenseSettings", "SoulFrayDuration", // 400).getInt(); String lpCosts = "Lp Costs"; AlchemicalWizardry.sigilAirCost = config.get(lpCosts, "Air Sigil", 50).getInt(); - AlchemicalWizardry.sigilBloodLightCost = - config.get(lpCosts, "Sigil of the Blood Lamp", 10).getInt(); - AlchemicalWizardry.sigilHarvestCost = - config.get(lpCosts, "Harvest Goddess Sigil", 500).getInt(); - AlchemicalWizardry.sigilLavaCost = - config.get(lpCosts, "Lava Sigil", 1000).getInt(); - AlchemicalWizardry.sigilElementalAffinityCost = - config.get(lpCosts, "Sigil of Elemental Affinity", 200).getInt(); - AlchemicalWizardry.sigilEnderSeveranceCost = - config.get(lpCosts, "Sigil of Ender Severance", 200).getInt(); - AlchemicalWizardry.sigilGrowthCost = - config.get(lpCosts, "Sigil of the Green Grove", 150).getInt(); - AlchemicalWizardry.sigilHasteCost = - config.get(lpCosts, "Sigil of Haste", 250).getInt(); - AlchemicalWizardry.sigilMagnetismCost = - config.get(lpCosts, "Sigil of Magnetism", 50).getInt(); - AlchemicalWizardry.sigilSuppressionCost = - config.get(lpCosts, "Sigil of Suppression", 400).getInt(); - AlchemicalWizardry.sigilBridgeCost = - config.get(lpCosts, "Sigil of the Phantom Bridge", 100).getInt(); - AlchemicalWizardry.sigilFastMinerCost = - config.get(lpCosts, "Sigil of the Fast Miner", 100).getInt(); - AlchemicalWizardry.sigilWhirlwindCost = - config.get(lpCosts, "Sigil of the Whirlwind", 250).getInt(); - AlchemicalWizardry.sigilCompressCost = - config.get(lpCosts, "Sigil of Compression", 200).getInt(); + AlchemicalWizardry.sigilBloodLightCost = config.get(lpCosts, "Sigil of the Blood Lamp", 10).getInt(); + AlchemicalWizardry.sigilHarvestCost = config.get(lpCosts, "Harvest Goddess Sigil", 500).getInt(); + AlchemicalWizardry.sigilLavaCost = config.get(lpCosts, "Lava Sigil", 1000).getInt(); + AlchemicalWizardry.sigilElementalAffinityCost = config.get(lpCosts, "Sigil of Elemental Affinity", 200) + .getInt(); + AlchemicalWizardry.sigilEnderSeveranceCost = config.get(lpCosts, "Sigil of Ender Severance", 200).getInt(); + AlchemicalWizardry.sigilGrowthCost = config.get(lpCosts, "Sigil of the Green Grove", 150).getInt(); + AlchemicalWizardry.sigilHasteCost = config.get(lpCosts, "Sigil of Haste", 250).getInt(); + AlchemicalWizardry.sigilMagnetismCost = config.get(lpCosts, "Sigil of Magnetism", 50).getInt(); + AlchemicalWizardry.sigilSuppressionCost = config.get(lpCosts, "Sigil of Suppression", 400).getInt(); + AlchemicalWizardry.sigilBridgeCost = config.get(lpCosts, "Sigil of the Phantom Bridge", 100).getInt(); + AlchemicalWizardry.sigilFastMinerCost = config.get(lpCosts, "Sigil of the Fast Miner", 100).getInt(); + AlchemicalWizardry.sigilWhirlwindCost = config.get(lpCosts, "Sigil of the Whirlwind", 250).getInt(); + AlchemicalWizardry.sigilCompressCost = config.get(lpCosts, "Sigil of Compression", 200).getInt(); AlchemicalWizardry.sigilVoidCost = config.get(lpCosts, "Void Sigil", 50).getInt(); - AlchemicalWizardry.sigilWaterCost = - config.get(lpCosts, "Water Sigil", 100).getInt(); + AlchemicalWizardry.sigilWaterCost = config.get(lpCosts, "Water Sigil", 100).getInt(); config.addCustomCategoryComment( lpCosts, "For rituals, the first number indicates the activation cost while the second indicates the refresh cost"); - AlchemicalWizardry.ritualCostWater = config.get(lpCosts, "Ritual of the Full Spring", new int[] {500, 25}) + AlchemicalWizardry.ritualCostWater = config.get(lpCosts, "Ritual of the Full Spring", new int[] { 500, 25 }) .getIntList(); - AlchemicalWizardry.ritualCostLava = config.get(lpCosts, "Serenade of the Nether", new int[] {10000, 500}) + AlchemicalWizardry.ritualCostLava = config.get(lpCosts, "Serenade of the Nether", new int[] { 10000, 500 }) .getIntList(); - AlchemicalWizardry.ritualCostGreenGrove = config.get(lpCosts, "Ritual of the Green Grove", new int[] {1000, 20}) + AlchemicalWizardry.ritualCostGreenGrove = config + .get(lpCosts, "Ritual of the Green Grove", new int[] { 1000, 20 }).getIntList(); + AlchemicalWizardry.ritualCostInterdiction = config.get(lpCosts, "Interdiction Ritual", new int[] { 1000, 1 }) .getIntList(); - AlchemicalWizardry.ritualCostInterdiction = - config.get(lpCosts, "Interdiction Ritual", new int[] {1000, 1}).getIntList(); - AlchemicalWizardry.ritualCostContainment = config.get(lpCosts, "Ritual of Containment", new int[] {2000, 1}) + AlchemicalWizardry.ritualCostContainment = config.get(lpCosts, "Ritual of Containment", new int[] { 2000, 1 }) .getIntList(); - AlchemicalWizardry.ritualCostBinding = - config.get(lpCosts, "Ritual of Binding", new int[] {5000, 0}).getIntList(); - AlchemicalWizardry.ritualCostUnbinding = - config.get(lpCosts, "Ritual of Unbinding", new int[] {30000, 0}).getIntList(); - AlchemicalWizardry.ritualCostHighJump = config.get(lpCosts, "Ritual of the High Jump", new int[] {1000, 5}) + AlchemicalWizardry.ritualCostBinding = config.get(lpCosts, "Ritual of Binding", new int[] { 5000, 0 }) .getIntList(); - AlchemicalWizardry.ritualCostMagnetism = - config.get(lpCosts, "Ritual of Magnetism", new int[] {5000, 50}).getIntList(); - AlchemicalWizardry.ritualCostCrusher = config.get(lpCosts, "Ritual of the Crusher", new int[] {2500, 7}) + AlchemicalWizardry.ritualCostUnbinding = config.get(lpCosts, "Ritual of Unbinding", new int[] { 30000, 0 }) .getIntList(); - AlchemicalWizardry.ritualCostSpeed = - config.get(lpCosts, "Ritual of Speed", new int[] {1000, 5}).getIntList(); - AlchemicalWizardry.ritualCostAnimalGrowth = config.get(lpCosts, "Ritual of the Shepherd", new int[] {10000, 2}) + AlchemicalWizardry.ritualCostHighJump = config.get(lpCosts, "Ritual of the High Jump", new int[] { 1000, 5 }) .getIntList(); - AlchemicalWizardry.ritualCostSuffering = - config.get(lpCosts, "Well of Suffering", new int[] {50000, 2}).getIntList(); - AlchemicalWizardry.ritualCostRegen = config.get(lpCosts, "Ritual of Regeneration", new int[] {25000, 20}) + AlchemicalWizardry.ritualCostMagnetism = config.get(lpCosts, "Ritual of Magnetism", new int[] { 5000, 50 }) .getIntList(); - AlchemicalWizardry.ritualCostFeatheredKnife = config.get( - lpCosts, "Ritual of the Feathered Knife", new int[] {50000, 20}) + AlchemicalWizardry.ritualCostCrusher = config.get(lpCosts, "Ritual of the Crusher", new int[] { 2500, 7 }) .getIntList(); - AlchemicalWizardry.ritualCostFeatheredEarth = config.get( - lpCosts, "Ritual of the Feathered Earth", new int[] {100000, 0}) + AlchemicalWizardry.ritualCostSpeed = config.get(lpCosts, "Ritual of Speed", new int[] { 1000, 5 }).getIntList(); + AlchemicalWizardry.ritualCostAnimalGrowth = config + .get(lpCosts, "Ritual of the Shepherd", new int[] { 10000, 2 }).getIntList(); + AlchemicalWizardry.ritualCostSuffering = config.get(lpCosts, "Well of Suffering", new int[] { 50000, 2 }) .getIntList(); - AlchemicalWizardry.ritualCostGaia = config.get(lpCosts, "Gaia's Transformation", new int[] {1000000, 0}) + AlchemicalWizardry.ritualCostRegen = config.get(lpCosts, "Ritual of Regeneration", new int[] { 25000, 20 }) .getIntList(); - AlchemicalWizardry.ritualCostCondor = config.get(lpCosts, "Reverence of the Condor", new int[] {1000000, 0}) + AlchemicalWizardry.ritualCostFeatheredKnife = config + .get(lpCosts, "Ritual of the Feathered Knife", new int[] { 50000, 20 }).getIntList(); + AlchemicalWizardry.ritualCostFeatheredEarth = config + .get(lpCosts, "Ritual of the Feathered Earth", new int[] { 100000, 0 }).getIntList(); + AlchemicalWizardry.ritualCostGaia = config.get(lpCosts, "Gaia's Transformation", new int[] { 1000000, 0 }) .getIntList(); - AlchemicalWizardry.ritualCostFallingTower = config.get( - lpCosts, "Mark of the Falling Tower", new int[] {100000, 0}) + AlchemicalWizardry.ritualCostCondor = config.get(lpCosts, "Reverence of the Condor", new int[] { 1000000, 0 }) .getIntList(); - AlchemicalWizardry.ritualCostBalladOfAlchemy = - config.get(lpCosts, "Ballad of Alchemy", new int[] {20000, 10}).getIntList(); - AlchemicalWizardry.ritualCostExpulsion = config.get(lpCosts, "Aura of Expulsion", new int[] {1000000, 1000}) + AlchemicalWizardry.ritualCostFallingTower = config + .get(lpCosts, "Mark of the Falling Tower", new int[] { 100000, 0 }).getIntList(); + AlchemicalWizardry.ritualCostBalladOfAlchemy = config.get(lpCosts, "Ballad of Alchemy", new int[] { 20000, 10 }) .getIntList(); - AlchemicalWizardry.ritualCostSuppression = - config.get(lpCosts, "Dome of Suppression", new int[] {10000, 2}).getIntList(); - AlchemicalWizardry.ritualCostZephyr = - config.get(lpCosts, "Call of the Zephyr", new int[] {25000, 5}).getIntList(); - AlchemicalWizardry.ritualCostHarvest = config.get(lpCosts, "Reap of the Harvest Moon", new int[] {20000, 20}) + AlchemicalWizardry.ritualCostExpulsion = config.get(lpCosts, "Aura of Expulsion", new int[] { 1000000, 1000 }) .getIntList(); - AlchemicalWizardry.ritualCostConduit = config.get(lpCosts, "Cry of the Eternal Soul", new int[] {2000000, 0}) + AlchemicalWizardry.ritualCostSuppression = config.get(lpCosts, "Dome of Suppression", new int[] { 10000, 2 }) .getIntList(); - AlchemicalWizardry.ritualCostEllipsoid = config.get(lpCosts, "Focus of the Ellipsoid", new int[] {25000, 0}) + AlchemicalWizardry.ritualCostZephyr = config.get(lpCosts, "Call of the Zephyr", new int[] { 25000, 5 }) .getIntList(); - AlchemicalWizardry.ritualCostEvaporation = - config.get(lpCosts, "Song of Evaporation", new int[] {20000, 0}).getIntList(); - AlchemicalWizardry.ritualCostSpawnWard = config.get(lpCosts, "Ward of Sacrosanctity", new int[] {150000, 15}) + AlchemicalWizardry.ritualCostHarvest = config.get(lpCosts, "Reap of the Harvest Moon", new int[] { 20000, 20 }) .getIntList(); - AlchemicalWizardry.ritualCostVeilOfEvil = - config.get(lpCosts, "Veil of Evil", new int[] {150000, 20}).getIntList(); - AlchemicalWizardry.ritualCostFullStomach = config.get( - lpCosts, "Requiem of the Satiated Stomach", new int[] {100000, 100}) + AlchemicalWizardry.ritualCostConduit = config.get(lpCosts, "Cry of the Eternal Soul", new int[] { 2000000, 0 }) .getIntList(); - AlchemicalWizardry.ritualCostConvocation = config.get( - lpCosts, "Convocation of the Damned", new int[] {15000000, 0}) + AlchemicalWizardry.ritualCostEllipsoid = config.get(lpCosts, "Focus of the Ellipsoid", new int[] { 25000, 0 }) .getIntList(); - AlchemicalWizardry.ritualCostSymmetry = config.get(lpCosts, "Symmetry of the Omega", new int[] {15000000, 0}) + AlchemicalWizardry.ritualCostEvaporation = config.get(lpCosts, "Song of Evaporation", new int[] { 20000, 0 }) .getIntList(); - AlchemicalWizardry.ritualCostStalling = config.get( - lpCosts, "Duet of the Fused Souls", new int[] {15000000, 5000}) + AlchemicalWizardry.ritualCostSpawnWard = config.get(lpCosts, "Ward of Sacrosanctity", new int[] { 150000, 15 }) .getIntList(); - AlchemicalWizardry.ritualCostCrafting = config.get( - lpCosts, "Rhythm of the Beating Anvil", new int[] {15000, 10}) + AlchemicalWizardry.ritualCostVeilOfEvil = config.get(lpCosts, "Veil of Evil", new int[] { 150000, 20 }) .getIntList(); - AlchemicalWizardry.ritualCostPhantomHands = config.get( - lpCosts, "Orchestra of the Phantom Hands", new int[] {10000, 0}) + AlchemicalWizardry.ritualCostFullStomach = config + .get(lpCosts, "Requiem of the Satiated Stomach", new int[] { 100000, 100 }).getIntList(); + AlchemicalWizardry.ritualCostConvocation = config + .get(lpCosts, "Convocation of the Damned", new int[] { 15000000, 0 }).getIntList(); + AlchemicalWizardry.ritualCostSymmetry = config.get(lpCosts, "Symmetry of the Omega", new int[] { 15000000, 0 }) .getIntList(); - AlchemicalWizardry.ritualCostSphereIsland = config.get(lpCosts, "Blood of the New Moon", new int[] {10000, 0}) + AlchemicalWizardry.ritualCostStalling = config + .get(lpCosts, "Duet of the Fused Souls", new int[] { 15000000, 5000 }).getIntList(); + AlchemicalWizardry.ritualCostCrafting = config + .get(lpCosts, "Rhythm of the Beating Anvil", new int[] { 15000, 10 }).getIntList(); + AlchemicalWizardry.ritualCostPhantomHands = config + .get(lpCosts, "Orchestra of the Phantom Hands", new int[] { 10000, 0 }).getIntList(); + AlchemicalWizardry.ritualCostSphereIsland = config.get(lpCosts, "Blood of the New Moon", new int[] { 10000, 0 }) .getIntList(); - AlchemicalWizardry.ritualWeakCostNight = - config.get(lpCosts, "[Weak Ritual] Night", 5000).getInt(); - AlchemicalWizardry.ritualWeakCostResistance = - config.get(lpCosts, "[Weak Ritual] Resistance", 5000).getInt(); - AlchemicalWizardry.ritualWeakCostThunderstorm = - config.get(lpCosts, "[Weak Ritual] Thunderstorm", 5000).getInt(); - AlchemicalWizardry.ritualWeakCostZombie = - config.get(lpCosts, "[Weak Ritual] Zombie", 5000).getInt(); + AlchemicalWizardry.ritualWeakCostNight = config.get(lpCosts, "[Weak Ritual] Night", 5000).getInt(); + AlchemicalWizardry.ritualWeakCostResistance = config.get(lpCosts, "[Weak Ritual] Resistance", 5000).getInt(); + AlchemicalWizardry.ritualWeakCostThunderstorm = config.get(lpCosts, "[Weak Ritual] Thunderstorm", 5000) + .getInt(); + AlchemicalWizardry.ritualWeakCostZombie = config.get(lpCosts, "[Weak Ritual] Zombie", 5000).getInt(); - AlchemicalWizardry.lpPerSelfSacrifice = config.get( - "sacrifice", "LP per self-sacrifice", AlchemicalWizardry.lpPerSelfSacrifice) + AlchemicalWizardry.lpPerSelfSacrifice = config + .get("sacrifice", "LP per self-sacrifice", AlchemicalWizardry.lpPerSelfSacrifice) .getInt(AlchemicalWizardry.lpPerSelfSacrifice); - AlchemicalWizardry.lpPerSelfSacrificeSoulFray = config.get( + AlchemicalWizardry.lpPerSelfSacrificeSoulFray = config + .get( "sacrifice", "LP per self-sacrifice (when Soul Fray potion is active)", AlchemicalWizardry.lpPerSelfSacrificeSoulFray) .getInt(AlchemicalWizardry.lpPerSelfSacrificeSoulFray); - AlchemicalWizardry.lpPerSelfSacrificeFeatheredKnife = config.get( + AlchemicalWizardry.lpPerSelfSacrificeFeatheredKnife = config + .get( "sacrifice", "LP per self-sacrifice with Ritual of Feathered Knife", AlchemicalWizardry.lpPerSelfSacrificeFeatheredKnife) .getInt(AlchemicalWizardry.lpPerSelfSacrificeFeatheredKnife); - AlchemicalWizardry.lpPerSacrificeBase = config.get( - "sacrifice", "LP per sacrifice", AlchemicalWizardry.lpPerSacrificeBase) + AlchemicalWizardry.lpPerSacrificeBase = config + .get("sacrifice", "LP per sacrifice", AlchemicalWizardry.lpPerSacrificeBase) .getInt(AlchemicalWizardry.lpPerSacrificeBase); - AlchemicalWizardry.lpPerSacrificeWellOfSuffering = config.get( + AlchemicalWizardry.lpPerSacrificeWellOfSuffering = config + .get( "sacrifice", "LP per sacrifice with Well of Suffering ritual", AlchemicalWizardry.lpPerSacrificeWellOfSuffering) .getInt(AlchemicalWizardry.lpPerSacrificeWellOfSuffering); - AlchemicalWizardry.lpPerSacrificeIncense = config.get( - "sacrifice", "LP per (self-)sacrifice with incense", AlchemicalWizardry.lpPerSacrificeIncense) + AlchemicalWizardry.lpPerSacrificeIncense = config + .get("sacrifice", "LP per (self-)sacrifice with incense", AlchemicalWizardry.lpPerSacrificeIncense) .getDouble(AlchemicalWizardry.lpPerSacrificeIncense); - AlchemicalWizardry.energyBlastDamage = config.get( - "energy items", "Energy Blast damage", AlchemicalWizardry.energyBlastDamage) + AlchemicalWizardry.energyBlastDamage = config + .get("energy items", "Energy Blast damage", AlchemicalWizardry.energyBlastDamage) .getInt(AlchemicalWizardry.energyBlastDamage); - AlchemicalWizardry.energyBlastLPPerShot = config.get( - "energy items", "Energy Blast LP per shot", AlchemicalWizardry.energyBlastLPPerShot) + AlchemicalWizardry.energyBlastLPPerShot = config + .get("energy items", "Energy Blast LP per shot", AlchemicalWizardry.energyBlastLPPerShot) .getInt(AlchemicalWizardry.energyBlastLPPerShot); - AlchemicalWizardry.energyBlastMaxDelay = config.get( - "energy items", "Energy Blast maximum delay", AlchemicalWizardry.energyBlastMaxDelay) + AlchemicalWizardry.energyBlastMaxDelay = config + .get("energy items", "Energy Blast maximum delay", AlchemicalWizardry.energyBlastMaxDelay) .getInt(AlchemicalWizardry.energyBlastMaxDelay); - AlchemicalWizardry.energyBlastMaxDelayAfterActivation = config.get( + AlchemicalWizardry.energyBlastMaxDelayAfterActivation = config + .get( "energy items", "Energy Blast maximum delay after (re-)activation", AlchemicalWizardry.energyBlastMaxDelayAfterActivation) .getInt(AlchemicalWizardry.energyBlastMaxDelayAfterActivation); - AlchemicalWizardry.energyBlastLPPerActivation = config.get( - "energy items", "Energy Blast LP per activation", AlchemicalWizardry.energyBlastLPPerActivation) + AlchemicalWizardry.energyBlastLPPerActivation = config + .get("energy items", "Energy Blast LP per activation", AlchemicalWizardry.energyBlastLPPerActivation) .getInt(AlchemicalWizardry.energyBlastLPPerActivation); - AlchemicalWizardry.energyBlastSecondTierDamage = config.get( - "energy items", "Energy Blast Tier II damage", AlchemicalWizardry.energyBlastSecondTierDamage) + AlchemicalWizardry.energyBlastSecondTierDamage = config + .get("energy items", "Energy Blast Tier II damage", AlchemicalWizardry.energyBlastSecondTierDamage) .getInt(AlchemicalWizardry.energyBlastSecondTierDamage); - AlchemicalWizardry.energyBlastSecondTierLPPerShot = config.get( + AlchemicalWizardry.energyBlastSecondTierLPPerShot = config + .get( "energy items", "Energy Blast Tier II LP per shot", AlchemicalWizardry.energyBlastSecondTierLPPerShot) .getInt(AlchemicalWizardry.energyBlastSecondTierLPPerShot); - AlchemicalWizardry.energyBlastSecondTierMaxDelay = config.get( + AlchemicalWizardry.energyBlastSecondTierMaxDelay = config + .get( "energy items", "Energy Blast Tier II maximum delay", AlchemicalWizardry.energyBlastSecondTierMaxDelay) .getInt(AlchemicalWizardry.energyBlastSecondTierMaxDelay); - AlchemicalWizardry.energyBlastSecondTierMaxDelayAfterActivation = config.get( + AlchemicalWizardry.energyBlastSecondTierMaxDelayAfterActivation = config + .get( "energy items", "Energy Blast Tier II maximum delay after (re-)activation", AlchemicalWizardry.energyBlastSecondTierMaxDelayAfterActivation) .getInt(AlchemicalWizardry.energyBlastSecondTierMaxDelayAfterActivation); - AlchemicalWizardry.energyBlastSecondTierLPPerActivation = config.get( + AlchemicalWizardry.energyBlastSecondTierLPPerActivation = config + .get( "energy items", "Energy Blast Tier II LP per activation", AlchemicalWizardry.energyBlastSecondTierLPPerActivation) .getInt(AlchemicalWizardry.energyBlastSecondTierLPPerActivation); - AlchemicalWizardry.energyBlastThirdTierDamage = config.get( - "energy items", "Energy Blast Tier III damage", AlchemicalWizardry.energyBlastThirdTierDamage) + AlchemicalWizardry.energyBlastThirdTierDamage = config + .get("energy items", "Energy Blast Tier III damage", AlchemicalWizardry.energyBlastThirdTierDamage) .getInt(AlchemicalWizardry.energyBlastThirdTierDamage); - AlchemicalWizardry.energyBlastThirdTierLPPerShot = config.get( + AlchemicalWizardry.energyBlastThirdTierLPPerShot = config + .get( "energy items", "Energy Blast Tier III LP per shot", AlchemicalWizardry.energyBlastThirdTierLPPerShot) .getInt(AlchemicalWizardry.energyBlastThirdTierLPPerShot); - AlchemicalWizardry.energyBlastThirdTierMaxDelay = config.get( + AlchemicalWizardry.energyBlastThirdTierMaxDelay = config + .get( "energy items", "Energy Blast Tier III maximum delay", AlchemicalWizardry.energyBlastThirdTierMaxDelay) .getInt(AlchemicalWizardry.energyBlastThirdTierMaxDelay); - AlchemicalWizardry.energyBlastThirdTierMaxDelayAfterActivation = config.get( + AlchemicalWizardry.energyBlastThirdTierMaxDelayAfterActivation = config + .get( "energy items", "Energy Blast Tier III maximum delay after (re-)activation", AlchemicalWizardry.energyBlastThirdTierMaxDelayAfterActivation) .getInt(AlchemicalWizardry.energyBlastThirdTierMaxDelayAfterActivation); - AlchemicalWizardry.energyBlastThirdTierLPPerActivation = config.get( + AlchemicalWizardry.energyBlastThirdTierLPPerActivation = config + .get( "energy items", "Energy Blast Tier III LP per activation", AlchemicalWizardry.energyBlastThirdTierLPPerActivation) .getInt(AlchemicalWizardry.energyBlastThirdTierLPPerActivation); - AlchemicalWizardry.energyBazookaDamage = config.get( - "energy items", "Energy Bazooka damage", AlchemicalWizardry.energyBazookaDamage) + AlchemicalWizardry.energyBazookaDamage = config + .get("energy items", "Energy Bazooka damage", AlchemicalWizardry.energyBazookaDamage) .getInt(AlchemicalWizardry.energyBazookaDamage); - AlchemicalWizardry.energyBazookaSecondaryDamage = config.get( - "energy items", - "Energy Bazooka secondary damage", - AlchemicalWizardry.energyBazookaSecondaryDamage) + AlchemicalWizardry.energyBazookaSecondaryDamage = config + .get("energy items", "Energy Bazooka secondary damage", AlchemicalWizardry.energyBazookaSecondaryDamage) .getInt(AlchemicalWizardry.energyBazookaSecondaryDamage); - AlchemicalWizardry.energyBazookaLPPerShot = config.get( - "energy items", "Energy Bazooka LP per shot", AlchemicalWizardry.energyBazookaLPPerShot) + AlchemicalWizardry.energyBazookaLPPerShot = config + .get("energy items", "Energy Bazooka LP per shot", AlchemicalWizardry.energyBazookaLPPerShot) .getInt(AlchemicalWizardry.energyBazookaLPPerShot); - AlchemicalWizardry.energyBazookaMaxDelay = config.get( - "energy items", "Energy Bazooka maximum delay", AlchemicalWizardry.energyBazookaMaxDelay) + AlchemicalWizardry.energyBazookaMaxDelay = config + .get("energy items", "Energy Bazooka maximum delay", AlchemicalWizardry.energyBazookaMaxDelay) .getInt(AlchemicalWizardry.energyBazookaMaxDelay); - AlchemicalWizardry.energyBazookaMaxDelayAfterActivation = config.get( + AlchemicalWizardry.energyBazookaMaxDelayAfterActivation = config + .get( "energy items", "Energy Bazooka maximum delay after (re-)activation", AlchemicalWizardry.energyBazookaMaxDelayAfterActivation) .getInt(AlchemicalWizardry.energyBazookaMaxDelayAfterActivation); - AlchemicalWizardry.energyBazookaLPPerActivation = config.get( + AlchemicalWizardry.energyBazookaLPPerActivation = config + .get( "energy items", "Energy Bazooka LP per activation", AlchemicalWizardry.energyBazookaLPPerActivation) .getInt(AlchemicalWizardry.energyBazookaLPPerActivation); - AlchemicalWizardry.energyBazookaSecondTierDamage = config.get( - "energy items", - "Energy Bazooka Tier II damage", - AlchemicalWizardry.energyBazookaSecondTierDamage) + AlchemicalWizardry.energyBazookaSecondTierDamage = config + .get("energy items", "Energy Bazooka Tier II damage", AlchemicalWizardry.energyBazookaSecondTierDamage) .getInt(AlchemicalWizardry.energyBazookaSecondTierDamage); - AlchemicalWizardry.energyBazookaSecondTierSecondaryDamage = config.get( + AlchemicalWizardry.energyBazookaSecondTierSecondaryDamage = config + .get( "energy items", "Energy Bazooka Tier II secondary damage", AlchemicalWizardry.energyBazookaSecondTierSecondaryDamage) .getInt(AlchemicalWizardry.energyBazookaSecondTierSecondaryDamage); - AlchemicalWizardry.energyBazookaSecondTierLPPerShot = config.get( + AlchemicalWizardry.energyBazookaSecondTierLPPerShot = config + .get( "energy items", "Energy Bazooka Tier II LP per shot", AlchemicalWizardry.energyBazookaSecondTierLPPerShot) .getInt(AlchemicalWizardry.energyBazookaSecondTierLPPerShot); - AlchemicalWizardry.energyBazookaSecondTierMaxDelay = config.get( + AlchemicalWizardry.energyBazookaSecondTierMaxDelay = config + .get( "energy items", "Energy Bazooka Tier II maximum delay", AlchemicalWizardry.energyBazookaSecondTierMaxDelay) .getInt(AlchemicalWizardry.energyBazookaSecondTierMaxDelay); - AlchemicalWizardry.energyBazookaSecondTierMaxDelayAfterActivation = config.get( + AlchemicalWizardry.energyBazookaSecondTierMaxDelayAfterActivation = config + .get( "energy items", "Energy Bazooka Tier II maximum delay after (re-)activation", AlchemicalWizardry.energyBazookaSecondTierMaxDelayAfterActivation) .getInt(AlchemicalWizardry.energyBazookaSecondTierMaxDelayAfterActivation); - AlchemicalWizardry.energyBazookaSecondTierLPPerActivation = config.get( + AlchemicalWizardry.energyBazookaSecondTierLPPerActivation = config + .get( "energy items", "Energy Bazooka Tier II LP per activation", AlchemicalWizardry.energyBazookaSecondTierLPPerActivation) .getInt(AlchemicalWizardry.energyBazookaSecondTierLPPerActivation); - AlchemicalWizardry.energyBazookaThirdTierDamage = config.get( - "energy items", - "Energy Bazooka Tier III damage", - AlchemicalWizardry.energyBazookaThirdTierDamage) + AlchemicalWizardry.energyBazookaThirdTierDamage = config + .get("energy items", "Energy Bazooka Tier III damage", AlchemicalWizardry.energyBazookaThirdTierDamage) .getInt(AlchemicalWizardry.energyBazookaThirdTierDamage); - AlchemicalWizardry.energyBazookaThirdTierSecondaryDamage = config.get( + AlchemicalWizardry.energyBazookaThirdTierSecondaryDamage = config + .get( "energy items", "Energy Bazooka Tier III secondary damage", AlchemicalWizardry.energyBazookaThirdTierSecondaryDamage) .getInt(AlchemicalWizardry.energyBazookaThirdTierSecondaryDamage); - AlchemicalWizardry.energyBazookaThirdTierLPPerShot = config.get( + AlchemicalWizardry.energyBazookaThirdTierLPPerShot = config + .get( "energy items", "Energy Bazooka Tier III LP per shot", AlchemicalWizardry.energyBazookaThirdTierLPPerShot) .getInt(AlchemicalWizardry.energyBazookaThirdTierLPPerShot); - AlchemicalWizardry.energyBazookaThirdTierMaxDelay = config.get( + AlchemicalWizardry.energyBazookaThirdTierMaxDelay = config + .get( "energy items", "Energy Bazooka Tier III maximum delay", AlchemicalWizardry.energyBazookaThirdTierMaxDelay) .getInt(AlchemicalWizardry.energyBazookaThirdTierMaxDelay); - AlchemicalWizardry.energyBazookaThirdTierMaxDelayAfterActivation = config.get( + AlchemicalWizardry.energyBazookaThirdTierMaxDelayAfterActivation = config + .get( "energy items", "Energy Bazooka Tier III maximum delay after (re-)activation", AlchemicalWizardry.energyBazookaThirdTierMaxDelayAfterActivation) .getInt(AlchemicalWizardry.energyBazookaThirdTierMaxDelayAfterActivation); - AlchemicalWizardry.energyBazookaThirdTierLPPerActivation = config.get( + AlchemicalWizardry.energyBazookaThirdTierLPPerActivation = config + .get( "energy items", "Energy Bazooka Tier III LP per activation", AlchemicalWizardry.energyBazookaThirdTierLPPerActivation) @@ -642,14 +593,10 @@ public class BloodMagicConfiguration { Side side = FMLCommonHandler.instance().getSide(); if (side == Side.CLIENT) { - RenderHelper.xOffset = - config.get("ClientSettings", "AlchemyHUDxOffset", 50).getInt(); - RenderHelper.yOffset = - config.get("ClientSettings", "AlchemyHUDyOffset", 2).getInt(); - RenderHelper.lpBarX = - config.get("ClientSettings", "LPHUDxOffset", 12).getInt(); - RenderHelper.lpBarY = - config.get("ClientSettings", "LPHUDyOffset", 75).getInt(); + RenderHelper.xOffset = config.get("ClientSettings", "AlchemyHUDxOffset", 50).getInt(); + RenderHelper.yOffset = config.get("ClientSettings", "AlchemyHUDyOffset", 2).getInt(); + RenderHelper.lpBarX = config.get("ClientSettings", "LPHUDxOffset", 12).getInt(); + RenderHelper.lpBarY = config.get("ClientSettings", "LPHUDyOffset", 75).getInt(); AlchemicalWizardry.displayRitualAnimation = config.get("ClientSettings", "Display Ritual Animation", true) .getBoolean(true); } @@ -658,77 +605,47 @@ public class BloodMagicConfiguration { } public static void finishLoading() { - AlchemicalWizardry.secondTierRunes = - BloodMagicConfiguration.getAltarRunesForTier("secondTier", new BlockStack[] { - new BlockStack(ModBlocks.bloodRune, 0), - new BlockStack(ModBlocks.speedRune, 0), - new BlockStack(ModBlocks.efficiencyRune, 0), - new BlockStack(ModBlocks.runeOfSacrifice, 0), - new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), - new BlockStack(ModBlocks.bloodRune, 1), - new BlockStack(ModBlocks.bloodRune, 2), - new BlockStack(ModBlocks.bloodRune, 3), - new BlockStack(ModBlocks.bloodRune, 4), - new BlockStack(ModBlocks.bloodRune, 5) - }); - AlchemicalWizardry.thirdTierRunes = BloodMagicConfiguration.getAltarRunesForTier("thirdTier", new BlockStack[] { - new BlockStack(ModBlocks.bloodRune, 0), - new BlockStack(ModBlocks.speedRune, 0), - new BlockStack(ModBlocks.efficiencyRune, 0), - new BlockStack(ModBlocks.runeOfSacrifice, 0), - new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), - new BlockStack(ModBlocks.bloodRune, 1), - new BlockStack(ModBlocks.bloodRune, 2), - new BlockStack(ModBlocks.bloodRune, 3), - new BlockStack(ModBlocks.bloodRune, 4), - new BlockStack(ModBlocks.bloodRune, 5) - }); - AlchemicalWizardry.fourthTierRunes = - BloodMagicConfiguration.getAltarRunesForTier("fourthTier", new BlockStack[] { - new BlockStack(ModBlocks.bloodRune, 0), - new BlockStack(ModBlocks.speedRune, 0), - new BlockStack(ModBlocks.efficiencyRune, 0), - new BlockStack(ModBlocks.runeOfSacrifice, 0), - new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), - new BlockStack(ModBlocks.bloodRune, 1), - new BlockStack(ModBlocks.bloodRune, 2), - new BlockStack(ModBlocks.bloodRune, 3), - new BlockStack(ModBlocks.bloodRune, 4), - new BlockStack(ModBlocks.bloodRune, 5) - }); - AlchemicalWizardry.fifthTierRunes = BloodMagicConfiguration.getAltarRunesForTier("fifthTier", new BlockStack[] { - new BlockStack(ModBlocks.bloodRune, 0), - new BlockStack(ModBlocks.speedRune, 0), - new BlockStack(ModBlocks.efficiencyRune, 0), - new BlockStack(ModBlocks.runeOfSacrifice, 0), - new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), - new BlockStack(ModBlocks.bloodRune, 1), - new BlockStack(ModBlocks.bloodRune, 2), - new BlockStack(ModBlocks.bloodRune, 3), - new BlockStack(ModBlocks.bloodRune, 4), - new BlockStack(ModBlocks.bloodRune, 5) - }); - AlchemicalWizardry.sixthTierRunes = BloodMagicConfiguration.getAltarRunesForTier("sixthTier", new BlockStack[] { - new BlockStack(ModBlocks.bloodRune, 0), - new BlockStack(ModBlocks.speedRune, 0), - new BlockStack(ModBlocks.efficiencyRune, 0), - new BlockStack(ModBlocks.runeOfSacrifice, 0), - new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), - new BlockStack(ModBlocks.bloodRune, 1), - new BlockStack(ModBlocks.bloodRune, 2), - new BlockStack(ModBlocks.bloodRune, 3), - new BlockStack(ModBlocks.bloodRune, 4), - new BlockStack(ModBlocks.bloodRune, 5) - }); - AlchemicalWizardry.specialAltarBlock = getAltarRunesForTier("specialBlocks", new BlockStack[] { - new BlockStack(Blocks.stonebrick, 0), - new BlockStack(Blocks.glowstone, 0), - new BlockStack(Blocks.stonebrick, 0), - new BlockStack(ModBlocks.largeBloodStoneBrick, 0), - new BlockStack(Blocks.beacon, 0), - new BlockStack(Blocks.stonebrick, 0), - new BlockStack(ModBlocks.blockCrystal, 0) - }); + AlchemicalWizardry.secondTierRunes = BloodMagicConfiguration.getAltarRunesForTier( + "secondTier", + new BlockStack[] { new BlockStack(ModBlocks.bloodRune, 0), new BlockStack(ModBlocks.speedRune, 0), + new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0), + new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1), + new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3), + new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5) }); + AlchemicalWizardry.thirdTierRunes = BloodMagicConfiguration.getAltarRunesForTier( + "thirdTier", + new BlockStack[] { new BlockStack(ModBlocks.bloodRune, 0), new BlockStack(ModBlocks.speedRune, 0), + new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0), + new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1), + new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3), + new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5) }); + AlchemicalWizardry.fourthTierRunes = BloodMagicConfiguration.getAltarRunesForTier( + "fourthTier", + new BlockStack[] { new BlockStack(ModBlocks.bloodRune, 0), new BlockStack(ModBlocks.speedRune, 0), + new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0), + new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1), + new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3), + new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5) }); + AlchemicalWizardry.fifthTierRunes = BloodMagicConfiguration.getAltarRunesForTier( + "fifthTier", + new BlockStack[] { new BlockStack(ModBlocks.bloodRune, 0), new BlockStack(ModBlocks.speedRune, 0), + new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0), + new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1), + new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3), + new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5) }); + AlchemicalWizardry.sixthTierRunes = BloodMagicConfiguration.getAltarRunesForTier( + "sixthTier", + new BlockStack[] { new BlockStack(ModBlocks.bloodRune, 0), new BlockStack(ModBlocks.speedRune, 0), + new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0), + new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1), + new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3), + new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5) }); + AlchemicalWizardry.specialAltarBlock = getAltarRunesForTier( + "specialBlocks", + new BlockStack[] { new BlockStack(Blocks.stonebrick, 0), new BlockStack(Blocks.glowstone, 0), + new BlockStack(Blocks.stonebrick, 0), new BlockStack(ModBlocks.largeBloodStoneBrick, 0), + new BlockStack(Blocks.beacon, 0), new BlockStack(Blocks.stonebrick, 0), + new BlockStack(ModBlocks.blockCrystal, 0) }); config.save(); } @@ -753,8 +670,7 @@ public class BloodMagicConfiguration { if (EntityAnimal.class.isAssignableFrom(entityClass)) { lpAmount = 250; } - lpAmount = config.get("sacrifice.custom values", entityName, lpAmount) - .getInt(lpAmount); + lpAmount = config.get("sacrifice.custom values", entityName, lpAmount).getInt(lpAmount); AlchemicalWizardry.lpPerSactificeCustom.put(entityClass, lpAmount); } } @@ -776,11 +692,10 @@ public class BloodMagicConfiguration { for (Object o : stringToClassMapping.entrySet()) { Entry entry = (Entry) o; Class curClass = (Class) entry.getValue(); - boolean valid = - EntityLivingBase.class.isAssignableFrom(curClass) && !Modifier.isAbstract(curClass.getModifiers()); + boolean valid = EntityLivingBase.class.isAssignableFrom(curClass) + && !Modifier.isAbstract(curClass.getModifiers()); if (valid) { - boolean blacklisted = config.get( - "wellOfSufferingBlackList", entry.getKey().toString(), false) + boolean blacklisted = config.get("wellOfSufferingBlackList", entry.getKey().toString(), false) .getBoolean(); if (blacklisted) AlchemicalWizardry.wellBlacklist.add(curClass); } @@ -795,8 +710,8 @@ public class BloodMagicConfiguration { if (AlchemicalWizardry.ritualDisabledInterdiction) r("AW004Interdiction"); if (AlchemicalWizardry.ritualDisabledContainment) r("AW005Containment"); if (AlchemicalWizardry.ritualDisabledBinding) r("AW006Binding"); - if (AlchemicalWizardry.ritualDisabledUnbinding) - r("AW007Unbinding"); // "A medium dry martini, lemon peel. Shaken, not stirred." + if (AlchemicalWizardry.ritualDisabledUnbinding) r("AW007Unbinding"); // "A medium dry martini, lemon peel. + // Shaken, not stirred." if (AlchemicalWizardry.ritualDisabledHighJump) r("AW008HighJump"); if (AlchemicalWizardry.ritualDisabledMagnetism) r("AW009Magnetism"); if (AlchemicalWizardry.ritualDisabledCrusher) r("AW010Crusher"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java b/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java index 78366c77..6c87140d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java @@ -1,5 +1,7 @@ package WayofTime.alchemicalWizardry; +import net.minecraft.block.Block; + import WayofTime.alchemicalWizardry.common.block.ArmourForge; import WayofTime.alchemicalWizardry.common.block.BlockAlchemicCalcinator; import WayofTime.alchemicalWizardry.common.block.BlockAltar; @@ -49,15 +51,12 @@ import WayofTime.alchemicalWizardry.common.items.ItemSpellModifierBlock; import WayofTime.alchemicalWizardry.common.items.ItemSpellParadigmBlock; import WayofTime.alchemicalWizardry.common.items.ItemStabilityGlyphBlock; import cpw.mods.fml.common.registry.GameRegistry; -import net.minecraft.block.Block; /** - * Created with IntelliJ IDEA. - * User: Pokefenn - * Date: 17/01/14 - * Time: 19:48 + * Created with IntelliJ IDEA. User: Pokefenn Date: 17/01/14 Time: 19:48 */ public class ModBlocks { + public static Block bloodStoneBrick; public static Block largeBloodStoneBrick; public static BlockAltar blockAltar; @@ -197,7 +196,9 @@ public class ModBlocks { GameRegistry.registerBlock(ModBlocks.blockCrystal, ItemCrystalBlock.class, "blockCrystal"); GameRegistry.registerBlock(ModBlocks.blockMimic, "blockMimic"); GameRegistry.registerBlock( - ModBlocks.blockEnchantmentGlyph, ItemEnchantmentGlyphBlock.class, "blockEnchantmentGlyph"); + ModBlocks.blockEnchantmentGlyph, + ItemEnchantmentGlyphBlock.class, + "blockEnchantmentGlyph"); GameRegistry.registerBlock(ModBlocks.blockStabilityGlyph, ItemStabilityGlyphBlock.class, "blockStabilityGlyph"); GameRegistry.registerBlock(ModBlocks.blockCrucible, "blockCrucible"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/ModItems.java b/src/main/java/WayofTime/alchemicalWizardry/ModItems.java index 0bc25fb3..f2b5b484 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/ModItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/ModItems.java @@ -1,5 +1,9 @@ package WayofTime.alchemicalWizardry; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Items; +import net.minecraft.item.Item; + import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; import WayofTime.alchemicalWizardry.common.items.*; @@ -49,17 +53,12 @@ import WayofTime.alchemicalWizardry.common.items.sigil.SigilVoid; import WayofTime.alchemicalWizardry.common.items.sigil.SigilWater; import WayofTime.alchemicalWizardry.common.items.sigil.holding.SigilOfHolding; import cpw.mods.fml.common.registry.GameRegistry; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.init.Items; -import net.minecraft.item.Item; /** - * Created with IntelliJ IDEA. - * User: Pokefenn - * Date: 17/01/14 - * Time: 19:48 + * Created with IntelliJ IDEA. User: Pokefenn Date: 17/01/14 Time: 19:48 */ public class ModItems { + public static Item weakBloodOrb; public static Item apprenticeBloodOrb; public static Item magicianBloodOrb; @@ -268,8 +267,8 @@ public class ModItems { sigilOfWind = new SigilOfWind().setUnlocalizedName("sigilOfWind"); telepositionFocus = new TelepositionFocus(1).setUnlocalizedName("telepositionFocus"); enhancedTelepositionFocus = new EnhancedTelepositionFocus().setUnlocalizedName("enhancedTelepositionFocus"); - reinforcedTelepositionFocus = - new ReinforcedTelepositionFocus().setUnlocalizedName("reinforcedTelepositionFocus"); + reinforcedTelepositionFocus = new ReinforcedTelepositionFocus() + .setUnlocalizedName("reinforcedTelepositionFocus"); demonicTelepositionFocus = new DemonicTelepositionFocus().setUnlocalizedName("demonicTelepositionFocus"); imbuedSlate = new AWBaseItems().setUnlocalizedName("imbuedSlate"); demonicSlate = new AWBaseItems().setUnlocalizedName("demonicSlate"); @@ -291,10 +290,8 @@ public class ModItems { energyBazookaThirdTier = new EnergyBazooka(3).setUnlocalizedName("energyBazookaThirdTier"); itemBloodLightSigil = new SigilBloodLight().setUnlocalizedName("bloodLightSigil"); itemComplexSpellCrystal = new ItemComplexSpellCrystal().setUnlocalizedName("itemComplexSpellCrystal"); - bucketLife = new LifeBucket(ModBlocks.blockLifeEssence) - .setUnlocalizedName("bucketLife") - .setContainerItem(Items.bucket) - .setCreativeTab(CreativeTabs.tabMisc); + bucketLife = new LifeBucket(ModBlocks.blockLifeEssence).setUnlocalizedName("bucketLife") + .setContainerItem(Items.bucket).setCreativeTab(CreativeTabs.tabMisc); itemSigilOfEnderSeverance = (new SigilOfEnderSeverance()).setUnlocalizedName("itemSigilOfEnderSeverance"); baseItems = new ItemComponents().setUnlocalizedName("baseItems"); baseAlchemyItems = new ItemAlchemyBase().setUnlocalizedName("baseAlchemyItems"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/BlockStack.java b/src/main/java/WayofTime/alchemicalWizardry/api/BlockStack.java index 774b3d68..5de59b55 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/BlockStack.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/BlockStack.java @@ -1,8 +1,9 @@ package WayofTime.alchemicalWizardry.api; -import cpw.mods.fml.common.registry.GameData; import net.minecraft.block.Block; +import cpw.mods.fml.common.registry.GameData; + /** * A Block with a set metadata. Similar to an ItemStack. */ diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/ColourAndCoords.java b/src/main/java/WayofTime/alchemicalWizardry/api/ColourAndCoords.java index 6089c6e3..68e6531d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/ColourAndCoords.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/ColourAndCoords.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api; import net.minecraft.nbt.NBTTagCompound; public class ColourAndCoords { + public int colourRed; public int colourGreen; public int colourBlue; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/ILimitingLogic.java b/src/main/java/WayofTime/alchemicalWizardry/api/ILimitingLogic.java index 2d76f6f6..0a481287 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/ILimitingLogic.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/ILimitingLogic.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.api; public interface ILimitingLogic { + public int getRoutingLimit(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/Int3.java b/src/main/java/WayofTime/alchemicalWizardry/api/Int3.java index 57b218ef..2a04c547 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/Int3.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/Int3.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api; import net.minecraft.nbt.NBTTagCompound; public class Int3 { + public int xCoord; public int yCoord; public int zCoord; @@ -28,8 +29,7 @@ public class Int3 { @Override public boolean equals(Object o) { return o instanceof Int3 - ? ((Int3) o).xCoord == this.xCoord - && ((Int3) o).yCoord == this.yCoord + ? ((Int3) o).xCoord == this.xCoord && ((Int3) o).yCoord == this.yCoord && ((Int3) o).zCoord == this.zCoord : false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusLogic.java b/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusLogic.java index 07f63db6..335fa259 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusLogic.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusLogic.java @@ -3,13 +3,11 @@ package WayofTime.alchemicalWizardry.api; import net.minecraft.item.ItemStack; public class RoutingFocusLogic { + public boolean getDefaultMatch(ItemStack keyStack, ItemStack checkedStack) { - return (keyStack != null - ? checkedStack != null - && keyStack.getItem() == checkedStack.getItem() - && (keyStack.getItem().getHasSubtypes() - ? keyStack.getItemDamage() == checkedStack.getItemDamage() - : true) + return (keyStack != null ? checkedStack != null && keyStack.getItem() == checkedStack.getItem() + && (keyStack.getItem().getHasSubtypes() ? keyStack.getItemDamage() == checkedStack.getItemDamage() + : true) : false); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusParadigm.java index 71a5cbd5..4f5c6cc3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusParadigm.java @@ -2,9 +2,11 @@ package WayofTime.alchemicalWizardry.api; import java.util.LinkedList; import java.util.List; + import net.minecraft.item.ItemStack; public class RoutingFocusParadigm { + public List logicList = new LinkedList(); public List locationList = new LinkedList(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusPosAndFacing.java b/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusPosAndFacing.java index cafdfa31..99aa9771 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusPosAndFacing.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusPosAndFacing.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api; import net.minecraftforge.common.util.ForgeDirection; public class RoutingFocusPosAndFacing { + public Int3 location; public ForgeDirection facing; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/Vector3.java b/src/main/java/WayofTime/alchemicalWizardry/api/Vector3.java index 2cf06243..6c4e7ea1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/Vector3.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/Vector3.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.api; /* - * Created in Scala by Alex-Hawks - * Translated and implemented by Arcaratus + * Created in Scala by Alex-Hawks Translated and implemented by Arcaratus */ public class Vector3 { + public int x, y, z; public Vector3(int x, int y, int z) { @@ -28,12 +28,10 @@ public class Vector3 { @Override public boolean equals(Object object) { - return object == this - || object instanceof Vector3 - && canEqual(this) - && this.x == ((Vector3) object).x - && this.y == ((Vector3) object).y - && this.z == ((Vector3) object).z; + return object == this || object instanceof Vector3 && canEqual(this) + && this.x == ((Vector3) object).x + && this.y == ((Vector3) object).y + && this.z == ((Vector3) object).z; } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemicalPotionCreationHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemicalPotionCreationHandler.java index 56ce8cf9..8b2efce2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemicalPotionCreationHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemicalPotionCreationHandler.java @@ -1,9 +1,11 @@ package WayofTime.alchemicalWizardry.api.alchemy; import java.util.ArrayList; + import net.minecraft.item.ItemStack; public class AlchemicalPotionCreationHandler { + public static ArrayList registeredPotionEffects = new ArrayList(); public static void addPotion(ItemStack itemStack, int potionID, int tickDuration) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyPotionHandlerComponent.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyPotionHandlerComponent.java index 3ad5a48b..63fdb6b1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyPotionHandlerComponent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyPotionHandlerComponent.java @@ -4,6 +4,7 @@ import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; public class AlchemyPotionHandlerComponent { + private ItemStack itemStack; private int potionID; private int tickDuration; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyPotionHelper.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyPotionHelper.java index a2ca5c5b..dbe8de6a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyPotionHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyPotionHelper.java @@ -5,6 +5,7 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; public class AlchemyPotionHelper { + private int potionID; private int tickDuration; private int concentration; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipe.java index 7403546e..4a0efa8a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipe.java @@ -5,6 +5,7 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; public class AlchemyRecipe { + private ItemStack output; private ItemStack[] recipe; private int bloodOrbLevel; @@ -85,7 +86,7 @@ public class AlchemyRecipe { } if ((checkedItemStack.getItemDamage() == recipeItemStack.getItemDamage() - || OreDictionary.WILDCARD_VALUE == recipeItemStack.getItemDamage()) + || OreDictionary.WILDCARD_VALUE == recipeItemStack.getItemDamage()) && checkedItemStack.getItem() == recipeItemStack.getItem()) { test = true; checkList[j] = true; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipeRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipeRegistry.java index 1b59c443..6016f95f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipeRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipeRegistry.java @@ -1,11 +1,14 @@ package WayofTime.alchemicalWizardry.api.alchemy; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; import java.util.ArrayList; import java.util.List; + import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; + public class AlchemyRecipeRegistry { + public static List recipes = new ArrayList(); public static void registerRecipe(ItemStack output, int amountNeeded, ItemStack[] recipe, int bloodOrbLevel) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IAlchemyGoggles.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IAlchemyGoggles.java index e19554b7..d49bf9ca 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IAlchemyGoggles.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IAlchemyGoggles.java @@ -5,5 +5,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; public interface IAlchemyGoggles { + boolean showIngameHUD(World world, ItemStack stack, EntityPlayer player); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentContainer.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentContainer.java index a807a687..aa3b4966 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentContainer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentContainer.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy; public interface IReagentContainer { + ReagentStack getReagent(); int getReagentStackAmount(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentHandler.java index ba410c89..aafa7bdd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentHandler.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy; import net.minecraftforge.common.util.ForgeDirection; public interface IReagentHandler { + int fill(ForgeDirection from, ReagentStack resource, boolean doFill); ReagentStack drain(ForgeDirection from, ReagentStack resource, boolean doDrain); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ISegmentedReagentHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ISegmentedReagentHandler.java index 15463b96..4df6757d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ISegmentedReagentHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ISegmentedReagentHandler.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy; import java.util.Map; public interface ISegmentedReagentHandler extends IReagentHandler { + int getNumberOfTanks(); int getTanksTunedToReagent(Reagent reagent); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/Reagent.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/Reagent.java index b2aa1575..fba621a1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/Reagent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/Reagent.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy; public class Reagent { + public final String name; public static final int REAGENT_SIZE = 1000; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentContainer.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentContainer.java index 202aad1f..792a88dd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentContainer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentContainer.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy; import net.minecraft.nbt.NBTTagCompound; public class ReagentContainer implements IReagentContainer { + protected ReagentStack reagentStack; protected int capacity; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentContainerInfo.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentContainerInfo.java index 5acf144e..5795eaf7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentContainerInfo.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentContainerInfo.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy; public final class ReagentContainerInfo { + public final ReagentStack reagent; public final int capacity; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentRegistry.java index fdc33f4c..00594ee3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentRegistry.java @@ -4,9 +4,11 @@ import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Set; + import net.minecraft.item.ItemStack; public class ReagentRegistry { + public static Map reagentList = new HashMap(); public static Map itemToReagentMap = new HashMap(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentStack.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentStack.java index c801ce41..353b1dfa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentStack.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentStack.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy; import net.minecraft.nbt.NBTTagCompound; public class ReagentStack { + public Reagent reagent; public int amount; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileReagentHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileReagentHandler.java index da3f296b..0a39922f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileReagentHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileReagentHandler.java @@ -5,6 +5,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; public class TileReagentHandler extends TileEntity implements IReagentHandler { + protected ReagentContainer tank = new ReagentContainer(4000); @Override @@ -50,6 +51,6 @@ public class TileReagentHandler extends TileEntity implements IReagentHandler { @Override public ReagentContainerInfo[] getContainerInfo(ForgeDirection from) { - return new ReagentContainerInfo[] {tank.getInfo()}; + return new ReagentContainerInfo[] { tank.getInfo() }; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java index ecd11942..56552e20 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; + import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; @@ -10,6 +11,7 @@ import net.minecraftforge.common.util.Constants; import net.minecraftforge.common.util.ForgeDirection; public class TileSegmentedReagentHandler extends TileEntity implements ISegmentedReagentHandler { + protected ReagentContainer[] tanks; protected Map attunedTankMap; @@ -99,8 +101,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente ReagentStack remainingStack = resource.copy(); remainingStack.amount = maxFill - totalFill; - boolean doesReagentMatch = tanks[i].getReagent() == null - ? false + boolean doesReagentMatch = tanks[i].getReagent() == null ? false : tanks[i].getReagent().isReagentEqual(remainingStack); if (doesReagentMatch) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipe.java index cdcf7240..2d2acb62 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipe.java @@ -2,11 +2,13 @@ package WayofTime.alchemicalWizardry.api.altarRecipeRegistry; import java.util.ArrayList; import java.util.Set; + import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; public class AltarRecipe { + public int minTier; public int liquidRequired; public boolean canBeFilled; // Tells the system that the item is an orb @@ -17,26 +19,13 @@ public class AltarRecipe { public boolean useTag; public ArrayList input = new ArrayList(); - public AltarRecipe( - ItemStack result, - ItemStack requiredItem, - int minTier, - int liquidRequired, - int consumptionRate, - int drainRate, - boolean canBeFilled) { + public AltarRecipe(ItemStack result, ItemStack requiredItem, int minTier, int liquidRequired, int consumptionRate, + int drainRate, boolean canBeFilled) { this(result, requiredItem, minTier, liquidRequired, consumptionRate, drainRate, canBeFilled, false); } - public AltarRecipe( - ItemStack result, - ItemStack requiredItem, - int minTier, - int liquidRequired, - int consumptionRate, - int drainRate, - boolean canBeFilled, - boolean useTag) { + public AltarRecipe(ItemStack result, ItemStack requiredItem, int minTier, int liquidRequired, int consumptionRate, + int drainRate, boolean canBeFilled, boolean useTag) { this.result = result; this.requiredItem = requiredItem; this.minTier = minTier; @@ -60,8 +49,7 @@ public class AltarRecipe { return false; } - return tierCheck >= minTier - && this.requiredItem.isItemEqual(comparedStack) + return tierCheck >= minTier && this.requiredItem.isItemEqual(comparedStack) && (this.useTag ? this.areRequiredTagsEqual(comparedStack) : true); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipeRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipeRegistry.java index ece00b43..51e7e424 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipeRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipeRegistry.java @@ -4,34 +4,39 @@ import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; + import net.minecraft.item.ItemStack; public class AltarRecipeRegistry { + public static List altarRecipes = new LinkedList<>(); public static Map orbMap = new HashMap<>(); - public static void registerAltarRecipe( - ItemStack result, - ItemStack requiredItem, - int minTier, - int liquidRequired, - int consumptionRate, - int drainRate, - boolean canBeFilled) { - altarRecipes.add(new AltarRecipe( - result, requiredItem, minTier, liquidRequired, consumptionRate, drainRate, canBeFilled)); + public static void registerAltarRecipe(ItemStack result, ItemStack requiredItem, int minTier, int liquidRequired, + int consumptionRate, int drainRate, boolean canBeFilled) { + altarRecipes.add( + new AltarRecipe( + result, + requiredItem, + minTier, + liquidRequired, + consumptionRate, + drainRate, + canBeFilled)); } - public static void registerNBTAltarRecipe( - ItemStack result, - ItemStack requiredItem, - int minTier, - int liquidRequired, - int consumptionRate, - int drainRate, - boolean canBeFilled) { - altarRecipes.add(new AltarRecipe( - result, requiredItem, minTier, liquidRequired, consumptionRate, drainRate, canBeFilled, true)); + public static void registerNBTAltarRecipe(ItemStack result, ItemStack requiredItem, int minTier, int liquidRequired, + int consumptionRate, int drainRate, boolean canBeFilled) { + altarRecipes.add( + new AltarRecipe( + result, + requiredItem, + minTier, + liquidRequired, + consumptionRate, + drainRate, + canBeFilled, + true)); } public static void registerAltarOrbRecipe(ItemStack orbStack, int minTier, int consumptionRate) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/IFadedRune.java b/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/IFadedRune.java index f0826e7d..d645ed0c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/IFadedRune.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/IFadedRune.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.api.altarRecipeRegistry; public interface IFadedRune { + int getAltarTierLimit(int meta); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRecipe.java index 6ba10ab4..4c6fbd60 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRecipe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRecipe.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.bindingRegistry; import net.minecraft.item.ItemStack; public class BindingRecipe { + public ItemStack requiredItem; public ItemStack outputItem; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRegistry.java index 330079ab..8792df58 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRegistry.java @@ -2,9 +2,11 @@ package WayofTime.alchemicalWizardry.api.bindingRegistry; import java.util.LinkedList; import java.util.List; + import net.minecraft.item.ItemStack; public class BindingRegistry { + public static List bindingRecipes = new LinkedList(); public static void registerRecipe(ItemStack output, ItemStack input) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRecipe.java index 0d553516..34da42a4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRecipe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRecipe.java @@ -2,9 +2,11 @@ package WayofTime.alchemicalWizardry.api.bindingRegistry; import java.util.ArrayList; import java.util.List; + import net.minecraft.item.ItemStack; public class UnbindingRecipe { + public ItemStack requiredItem; public List outputItem; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRegistry.java index 63217772..14844362 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRegistry.java @@ -3,11 +3,13 @@ package WayofTime.alchemicalWizardry.api.bindingRegistry; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class UnbindingRegistry { + public static List unbindingRecipes = new LinkedList(); public static void addAllUnbindingRecipesFromBinding() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/command/SubCommandBase.java b/src/main/java/WayofTime/alchemicalWizardry/api/command/SubCommandBase.java index 793fdcf3..f817d4dd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/command/SubCommandBase.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/command/SubCommandBase.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api.command; import java.util.Locale; + import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; import net.minecraft.command.PlayerNotFoundException; @@ -40,21 +41,19 @@ public abstract class SubCommandBase implements ISubCommand { @Override public void processSubCommand(ICommandSender commandSender, String[] args) { - if (args.length == 0 && !getSubCommandName().equals("help")) - displayErrorString( - commandSender, - String.format( - StatCollector.translateToLocal("commands.format.error"), - capitalizeFirstLetter(getSubCommandName()), - getArgUsage(commandSender))); + if (args.length == 0 && !getSubCommandName().equals("help")) displayErrorString( + commandSender, + String.format( + StatCollector.translateToLocal("commands.format.error"), + capitalizeFirstLetter(getSubCommandName()), + getArgUsage(commandSender))); - if (isBounded(0, 2, args.length) && args[0].equals("help")) - displayHelpString( - commandSender, - String.format( - StatCollector.translateToLocal("commands.format.help"), - capitalizeFirstLetter(getSubCommandName()), - getHelpText())); + if (isBounded(0, 2, args.length) && args[0].equals("help")) displayHelpString( + commandSender, + String.format( + StatCollector.translateToLocal("commands.format.help"), + capitalizeFirstLetter(getSubCommandName()), + getHelpText())); } protected EntityPlayerMP getCommandSenderAsPlayer(ICommandSender commandSender) { @@ -67,8 +66,7 @@ public abstract class SubCommandBase implements ISubCommand { if (entityplayermp != null) return entityplayermp; else { - entityplayermp = - MinecraftServer.getServer().getConfigurationManager().func_152612_a(playerName); + entityplayermp = MinecraftServer.getServer().getConfigurationManager().func_152612_a(playerName); if (entityplayermp == null) throw new PlayerNotFoundException(); else return entityplayermp; @@ -84,17 +82,20 @@ public abstract class SubCommandBase implements ISubCommand { } protected void displayHelpString(ICommandSender commandSender, String display, Object... info) { - commandSender.addChatMessage(new ChatComponentText(StatCollector.translateToLocalFormatted(display, info)) - .setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GREEN))); + commandSender.addChatMessage( + new ChatComponentText(StatCollector.translateToLocalFormatted(display, info)) + .setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GREEN))); } protected void displayErrorString(ICommandSender commandSender, String display, Object... info) { - commandSender.addChatMessage(new ChatComponentText(StatCollector.translateToLocalFormatted(display, info)) - .setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED))); + commandSender.addChatMessage( + new ChatComponentText(StatCollector.translateToLocalFormatted(display, info)) + .setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED))); } protected void displaySuccessString(ICommandSender commandSender, String display, Object... info) { - commandSender.addChatMessage(new ChatComponentText(StatCollector.translateToLocalFormatted(display, info)) - .setChatStyle(new ChatStyle().setColor(EnumChatFormatting.BLUE))); + commandSender.addChatMessage( + new ChatComponentText(StatCollector.translateToLocalFormatted(display, info)) + .setChatStyle(new ChatStyle().setColor(EnumChatFormatting.BLUE))); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionHandler.java index 863accd7..f9592b71 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionHandler.java @@ -4,10 +4,13 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; public abstract class CompressionHandler { + /** - * Called to look at the inventory and syphons the required stack. Returns resultant stack if successful, and null if not. - * @param inv The inventory iterated through - * @return The result of the compression + * Called to look at the inventory and syphons the required stack. Returns resultant stack if successful, and null + * if not. + * + * @param inv The inventory iterated through + * @return The result of the compression */ public abstract ItemStack compressInventory(ItemStack[] inv, World world); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionRegistry.java index 8a438a3c..0f1db26d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionRegistry.java @@ -5,6 +5,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; + import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -13,6 +14,7 @@ import net.minecraft.world.World; * */ public class CompressionRegistry { + public static List compressionRegistry = new ArrayList(); public static Map thresholdMap = new HashMap(); @@ -22,6 +24,7 @@ public class CompressionRegistry { /** * Registers an item so that it only compresses while above this threshold + * * @param stack * @param threshold */ @@ -52,8 +55,7 @@ public class CompressionRegistry { public static boolean areItemStacksEqual(ItemStack stack, ItemStack compressedStack) { return stack.isItemEqual(compressedStack) - && (stack.getTagCompound() == null - ? compressedStack.getTagCompound() == null + && (stack.getTagCompound() == null ? compressedStack.getTagCompound() == null : stack.getTagCompound().equals(compressedStack.getTagCompound())); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java index d483cfe9..a400e48a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java @@ -5,17 +5,18 @@ import cpw.mods.fml.common.eventhandler.Event; @Cancelable public class AddToNetworkEvent extends Event { + public String ownerNetwork; public int addedAmount; public int maximum; /** - * This event is called whenever the network is added to. If cancelled, no LP will be drained from the source. If result is set to Result.DENY, - * the LP will still be drained but the soul network will not be added to. + * This event is called whenever the network is added to. If cancelled, no LP will be drained from the source. If + * result is set to Result.DENY, the LP will still be drained but the soul network will not be added to. * - * @param ownerNetwork Key used for the soul network - * @param addedAmount Amount added - * @param maximum Ceiling that the network can add to + * @param ownerNetwork Key used for the soul network + * @param addedAmount Amount added + * @param maximum Ceiling that the network can add to */ public AddToNetworkEvent(String ownerNetwork, int addedAmount, int maximum) { super(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemBindEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemBindEvent.java index ad12fe20..796e461a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemBindEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemBindEvent.java @@ -1,12 +1,14 @@ package WayofTime.alchemicalWizardry.api.event; -import cpw.mods.fml.common.eventhandler.Cancelable; -import cpw.mods.fml.common.eventhandler.Event; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import cpw.mods.fml.common.eventhandler.Cancelable; +import cpw.mods.fml.common.eventhandler.Event; + @Cancelable public class ItemBindEvent extends Event { + public final EntityPlayer player; public String key; public ItemStack itemStack; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainInContainerEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainInContainerEvent.java index 54b8c0d6..5ee6535c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainInContainerEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainInContainerEvent.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.api.event; -import cpw.mods.fml.common.eventhandler.Cancelable; import net.minecraft.item.ItemStack; +import cpw.mods.fml.common.eventhandler.Cancelable; + @Cancelable public class ItemDrainInContainerEvent extends SoulNetworkEvent { + public ItemStack stack; public ItemDrainInContainerEvent(ItemStack stack, String ownerNetwork, int drainAmount) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainNetworkEvent.java index 4ae55a00..54b80de1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainNetworkEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainNetworkEvent.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.api.event; -import cpw.mods.fml.common.eventhandler.Cancelable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import cpw.mods.fml.common.eventhandler.Cancelable; + @Cancelable public class ItemDrainNetworkEvent extends PlayerDrainNetworkEvent { + public final ItemStack itemStack; public boolean shouldDamage; // If true, will damage regardless of if the network had enough inside it public float damageAmount; // Amount of damage that would incur if the network could not drain properly @@ -13,10 +15,10 @@ public class ItemDrainNetworkEvent extends PlayerDrainNetworkEvent { /** * Set result to deny the action i.e. damage/drain anyways. Cancelling event prevents action without penalties * - * @param player Player using the item - * @param ownerNetwork Network that the item is tied to - * @param itemStack Item used - * @param drainAmount Original drain amount - change to alter cost + * @param player Player using the item + * @param ownerNetwork Network that the item is tied to + * @param itemStack Item used + * @param drainAmount Original drain amount - change to alter cost */ public ItemDrainNetworkEvent(EntityPlayer player, String ownerNetwork, ItemStack itemStack, int drainAmount) { super(player, ownerNetwork, drainAmount); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerAddToNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerAddToNetworkEvent.java index bc8ba425..d43361d8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerAddToNetworkEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerAddToNetworkEvent.java @@ -1,16 +1,18 @@ package WayofTime.alchemicalWizardry.api.event; -import cpw.mods.fml.common.eventhandler.Cancelable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import cpw.mods.fml.common.eventhandler.Cancelable; + @Cancelable public class PlayerAddToNetworkEvent extends AddToNetworkEvent { + public final EntityPlayer player; public ItemStack itemStack; - public PlayerAddToNetworkEvent( - EntityPlayer player, ItemStack itemStack, String ownerNetwork, int addedAmount, int maximum) { + public PlayerAddToNetworkEvent(EntityPlayer player, ItemStack itemStack, String ownerNetwork, int addedAmount, + int maximum) { super(ownerNetwork, addedAmount, maximum); this.player = player; this.itemStack = itemStack; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerDrainNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerDrainNetworkEvent.java index be5c73a3..f3514940 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerDrainNetworkEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerDrainNetworkEvent.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.api.event; -import cpw.mods.fml.common.eventhandler.Cancelable; import net.minecraft.entity.player.EntityPlayer; +import cpw.mods.fml.common.eventhandler.Cancelable; + @Cancelable public class PlayerDrainNetworkEvent extends SoulNetworkEvent { + public final EntityPlayer player; // Player that activated the event public PlayerDrainNetworkEvent(EntityPlayer player, String ownerNetwork, int drainAmount) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualActivatedEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualActivatedEvent.java index ebec3aa2..72f27b3b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualActivatedEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualActivatedEvent.java @@ -1,23 +1,20 @@ package WayofTime.alchemicalWizardry.api.event; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import cpw.mods.fml.common.eventhandler.Cancelable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import cpw.mods.fml.common.eventhandler.Cancelable; + @Cancelable public class RitualActivatedEvent extends RitualEvent { + public final EntityPlayer player; public final ItemStack crystalStack; public int crystalTier; - public RitualActivatedEvent( - IMasterRitualStone mrs, - String ownerKey, - String ritualKey, - EntityPlayer player, - ItemStack activationCrystal, - int crystalTier) { + public RitualActivatedEvent(IMasterRitualStone mrs, String ownerKey, String ritualKey, EntityPlayer player, + ItemStack activationCrystal, int crystalTier) { super(mrs, ownerKey, ritualKey); this.player = player; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualEvent.java index 79afb86c..4e75f01a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualEvent.java @@ -4,6 +4,7 @@ import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import cpw.mods.fml.common.eventhandler.Event; public class RitualEvent extends Event { + public final IMasterRitualStone mrs; public String ownerKey; public final String ritualKey; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualStopEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualStopEvent.java index fd8456e8..482c7676 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualStopEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualStopEvent.java @@ -4,6 +4,7 @@ import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualBreakMethod; public class RitualStopEvent extends RitualEvent { + public final RitualBreakMethod method; public RitualStopEvent(IMasterRitualStone mrs, String ownerKey, String ritualKey, RitualBreakMethod method) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/SacrificeKnifeUsedEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/SacrificeKnifeUsedEvent.java index 45ce2b08..37217475 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/SacrificeKnifeUsedEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/SacrificeKnifeUsedEvent.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.api.event; +import net.minecraft.entity.player.EntityPlayer; + import cpw.mods.fml.common.eventhandler.Cancelable; import cpw.mods.fml.common.eventhandler.Event; -import net.minecraft.entity.player.EntityPlayer; @Cancelable public class SacrificeKnifeUsedEvent extends Event { + public final EntityPlayer player; public boolean shouldDrainHealth; public boolean shouldFillAltar; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/SoulNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/SoulNetworkEvent.java index 3afc9dde..4358afc1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/SoulNetworkEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/SoulNetworkEvent.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.event; import cpw.mods.fml.common.eventhandler.Event; public class SoulNetworkEvent extends Event { + public String ownerNetwork; public int drainAmount; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java index 289a699f..04a4b592 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java @@ -1,13 +1,16 @@ package WayofTime.alchemicalWizardry.api.event; -import cpw.mods.fml.common.eventhandler.Cancelable; -import cpw.mods.fml.common.eventhandler.Event; import net.minecraft.block.Block; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -/** Fired when a teleposer attempts to transpose two blocks. Use this to perform special cleanup or compensation, - * or cancel it entirely to prevent the transposition. */ +import cpw.mods.fml.common.eventhandler.Cancelable; +import cpw.mods.fml.common.eventhandler.Event; + +/** + * Fired when a teleposer attempts to transpose two blocks. Use this to perform special cleanup or compensation, or + * cancel it entirely to prevent the transposition. + */ @Cancelable public class TeleposeEvent extends Event { @@ -27,8 +30,8 @@ public class TeleposeEvent extends Event { public final Block finalBlock; public final int finalMetadata; - public TeleposeEvent( - World wi, int xi, int yi, int zi, Block bi, int mi, World wf, int xf, int yf, int zf, Block bf, int mf) { + public TeleposeEvent(World wi, int xi, int yi, int zi, Block bi, int mi, World wf, int xf, int yf, int zf, Block bf, + int mf) { initialWorld = wi; initialX = xi; initialY = yi; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/guide/OrbRecipeRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/api/guide/OrbRecipeRenderer.java index 58682e0a..d1c2982c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/guide/OrbRecipeRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/guide/OrbRecipeRenderer.java @@ -1,5 +1,15 @@ package WayofTime.alchemicalWizardry.api.guide; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; + import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; @@ -11,16 +21,9 @@ import amerifrance.guideapi.api.base.Book; import amerifrance.guideapi.api.util.GuiHelper; import amerifrance.guideapi.gui.GuiBase; import cpw.mods.fml.relauncher.ReflectionHelper; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; public class OrbRecipeRenderer implements IRecipeRenderer { + public IRecipe recipe; public OrbRecipeRenderer(IRecipe recipe) { @@ -28,18 +31,9 @@ public class OrbRecipeRenderer implements IRecipeRenderer { } @Override - public void draw( - Book book, - CategoryAbstract category, - EntryAbstract entry, - int guiLeft, - int guiTop, - int mouseX, - int mouseY, - GuiBase guiBase, - FontRenderer fontRenderer) { - Minecraft.getMinecraft() - .getTextureManager() + public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, + int mouseY, GuiBase guiBase, FontRenderer fontRenderer) { + Minecraft.getMinecraft().getTextureManager() .bindTexture(new ResourceLocation(ModInformation.GUITEXLOC + "recipe_elements.png")); guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 0, 105, 65); @@ -75,7 +69,9 @@ public class OrbRecipeRenderer implements IRecipeRenderer { GuiHelper.drawItemStack(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { guiBase.renderToolTip( - APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); + APISpellHelper.getOrbForLevel((Integer) component), + stackX, + stackY); } } else { if (((ArrayList) component).isEmpty()) return; @@ -112,7 +108,9 @@ public class OrbRecipeRenderer implements IRecipeRenderer { GuiHelper.drawItemStack(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { guiBase.renderToolTip( - APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); + APISpellHelper.getOrbForLevel((Integer) component), + stackX, + stackY); } } else { if (((ArrayList) component).isEmpty()) return; @@ -134,16 +132,8 @@ public class OrbRecipeRenderer implements IRecipeRenderer { } @Override - public void drawExtras( - Book book, - CategoryAbstract category, - EntryAbstract entry, - int guiLeft, - int guiTop, - int mouseX, - int mouseY, - GuiBase guiBase, - FontRenderer fontRenderer) { + public void drawExtras(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, + int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) { // TODO Auto-generated method stub } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageAltarRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageAltarRecipe.java index 919b7da9..32eef35d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageAltarRecipe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageAltarRecipe.java @@ -1,5 +1,13 @@ package WayofTime.alchemicalWizardry.api.guide; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; + import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; import amerifrance.guideapi.api.abstraction.CategoryAbstract; import amerifrance.guideapi.api.abstraction.EntryAbstract; @@ -9,13 +17,6 @@ import amerifrance.guideapi.api.util.GuiHelper; import amerifrance.guideapi.gui.GuiBase; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; public class PageAltarRecipe extends PageBase { @@ -33,19 +34,10 @@ public class PageAltarRecipe extends PageBase { @Override @SideOnly(Side.CLIENT) - public void draw( - Book book, - CategoryAbstract category, - EntryAbstract entry, - int guiLeft, - int guiTop, - int mouseX, - int mouseY, - GuiBase guiBase, - FontRenderer fontRenderer) { + public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, + int mouseY, GuiBase guiBase, FontRenderer fontRenderer) { - Minecraft.getMinecraft() - .getTextureManager() + Minecraft.getMinecraft().getTextureManager() .bindTexture(new ResourceLocation("alchemicalwizardry" + ":textures/gui/guide/altar.png")); guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 87, 146, 104); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageMultiBlock.java b/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageMultiBlock.java index 4847ee76..0de680f5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageMultiBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageMultiBlock.java @@ -1,5 +1,14 @@ package WayofTime.alchemicalWizardry.api.guide; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.item.ItemStack; + +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + import amerifrance.guideapi.api.abstraction.CategoryAbstract; import amerifrance.guideapi.api.abstraction.EntryAbstract; import amerifrance.guideapi.api.base.Book; @@ -7,15 +16,9 @@ import amerifrance.guideapi.api.base.PageBase; import amerifrance.guideapi.gui.GuiBase; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.item.ItemStack; -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; public class PageMultiBlock extends PageBase { + ItemStack[][][] structure; boolean canTick = false; int tick = 0; @@ -52,25 +55,17 @@ public class PageMultiBlock extends PageBase { blockCount += perLvl; } tick = (showLayer == -1 ? blockCount : countPerLevel[showLayer]) * 40; - // int yOff = (structureHeight-1)*12+structureWidth*5+structureLength*5+16; - // pageButtons.add(new GuiButtonManualNavigation(gui, 100, x+4,y+yOff/2-5, 10,10, 4)); - // pageButtons.add(new GuiButtonManualNavigation(gui, 101, x+4,y+yOff/2-8-16, 10,16, 3)); - // pageButtons.add(new GuiButtonManualNavigation(gui, 102, x+4,y+yOff/2+8, 10,16, 2)); + // int yOff = (structureHeight-1)*12+structureWidth*5+structureLength*5+16; + // pageButtons.add(new GuiButtonManualNavigation(gui, 100, x+4,y+yOff/2-5, 10,10, 4)); + // pageButtons.add(new GuiButtonManualNavigation(gui, 101, x+4,y+yOff/2-8-16, 10,16, 3)); + // pageButtons.add(new GuiButtonManualNavigation(gui, 102, x+4,y+yOff/2+8, 10,16, 2)); } @Override @SideOnly(Side.CLIENT) - public void draw( - Book book, - CategoryAbstract category, - EntryAbstract entry, - int guiLeft, - int guiTop, - int mouseX, - int mouseY, - GuiBase guiBase, - FontRenderer fontRenderer) { - // if(multiblock.getStructureManual()!=null) + public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, + int mouseY, GuiBase guiBase, FontRenderer fontRenderer) { + // if(multiblock.getStructureManual()!=null) Minecraft mc = Minecraft.getMinecraft(); int x = guiLeft + 32; @@ -84,7 +79,7 @@ public class PageMultiBlock extends PageBase { int xHalf = (structureWidth * 5 - structureLength * 5); int yOffPartial = (structureHeight - 1) * 12 + structureWidth * 5 + structureLength * 5; - // int yOffTotal = yOffPartial+16; + // int yOffTotal = yOffPartial+16; GL11.glDisable(GL11.GL_DEPTH_TEST); @@ -96,27 +91,24 @@ public class PageMultiBlock extends PageBase { RenderItem.getInstance().renderWithColor = true; int i = 0; ItemStack highlighted = null; - for (int h = 0; h < structure.length; h++) - if (showLayer == -1 || h <= showLayer) { - ItemStack[][] level = structure[h]; - for (int l = level.length - 1; l >= 0; l--) { - ItemStack[] row = level[l]; - for (int w = row.length - 1; w >= 0; w--) { - int xx = 60 + xHalf - 10 * w + 10 * l - 7; - int yy = yOffPartial - 5 * w - 5 * l - 12 * h; - GL11.glTranslated(0, 0, 1); - if (row[w] != null && i <= limiter) { - i++; - RenderItem.getInstance() - .renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, row[w], x + xx, y + yy); - if (mouseX >= x + xx - && mouseX < x + xx + 16 - && mouseY >= y + yy - && mouseY < y + yy + 16) highlighted = row[w]; - } + for (int h = 0; h < structure.length; h++) if (showLayer == -1 || h <= showLayer) { + ItemStack[][] level = structure[h]; + for (int l = level.length - 1; l >= 0; l--) { + ItemStack[] row = level[l]; + for (int w = row.length - 1; w >= 0; w--) { + int xx = 60 + xHalf - 10 * w + 10 * l - 7; + int yy = yOffPartial - 5 * w - 5 * l - 12 * h; + GL11.glTranslated(0, 0, 1); + if (row[w] != null && i <= limiter) { + i++; + RenderItem.getInstance() + .renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, row[w], x + xx, y + yy); + if (mouseX >= x + xx && mouseX < x + xx + 16 && mouseY >= y + yy && mouseY < y + yy + 16) + highlighted = row[w]; } } } + } GL11.glTranslated(0, 0, -i); RenderHelper.disableStandardItemLighting(); GL11.glDisable(GL12.GL_RESCALE_NORMAL); @@ -129,9 +121,9 @@ public class PageMultiBlock extends PageBase { if (highlighted != null && renderMouseOver) guiBase.renderToolTip(highlighted, mouseX, mouseY); RenderHelper.disableStandardItemLighting(); - // mc.fontRenderer.setUnicodeFlag(true); - // if(localizedText!=null&&!localizedText.isEmpty()) - // manual.fontRenderer.drawSplitString(localizedText, x,y+yOffTotal, 120, manual.getTextColour()); + // mc.fontRenderer.setUnicodeFlag(true); + // if(localizedText!=null&&!localizedText.isEmpty()) + // manual.fontRenderer.drawSplitString(localizedText, x,y+yOffTotal, 120, manual.getTextColour()); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageRitualMultiBlock.java b/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageRitualMultiBlock.java index 5da5945c..c6adcfde 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageRitualMultiBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageRitualMultiBlock.java @@ -1,11 +1,14 @@ package WayofTime.alchemicalWizardry.api.guide; +import java.util.List; + +import net.minecraft.item.ItemStack; + import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.Rituals; -import java.util.List; -import net.minecraft.item.ItemStack; public class PageRitualMultiBlock extends PageMultiBlock { + private static ItemStack blankStone; private static ItemStack waterStone; private static ItemStack fireStone; @@ -15,13 +18,13 @@ public class PageRitualMultiBlock extends PageMultiBlock { private static ItemStack dawnStone; static { - // blankStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.BLANK); - // waterStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.WATER); - // fireStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.FIRE); - // earthStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.EARTH); - // airStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.AIR); - // duskStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.DUSK); - // dawnStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.DAWN); + // blankStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.BLANK); + // waterStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.WATER); + // fireStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.FIRE); + // earthStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.EARTH); + // airStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.AIR); + // duskStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.DUSK); + // dawnStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.DAWN); } private PageRitualMultiBlock(ItemStack[][][] structure) { @@ -54,15 +57,21 @@ public class PageRitualMultiBlock extends PageMultiBlock { System.out.println( "Min: (" + minX + ", " + minY + ", " + minZ + "), Max: (" + maxX + ", " + maxY + ", " + maxZ + ")"); - ItemStack[][][] tempStructure = new ItemStack[maxY - minY + 1][maxX - minX + 1] - [maxZ - minZ + 1]; // First value is vertical, second is down to the left, third is down to the right + ItemStack[][][] tempStructure = new ItemStack[maxY - minY + 1][maxX - minX + 1][maxZ - minZ + 1]; // First value + // is + // vertical, + // second is + // down to the + // left, third + // is down to + // the right for (RitualComponent comp : ritualComponents) { - tempStructure[comp.getY() - minY][comp.getX() - minX][comp.getZ() - minZ] = - getStackForRitualStone(comp.getStoneType()); + tempStructure[comp.getY() - minY][comp.getX() - minX][comp.getZ() - minZ] = getStackForRitualStone( + comp.getStoneType()); } - // tempStructure[-minY][-minX][-minZ] = new ItemStack(ModBlocks.blockMasterStone); + // tempStructure[-minY][-minX][-minZ] = new ItemStack(ModBlocks.blockMasterStone); return new PageRitualMultiBlock(tempStructure); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java index 8a633be7..a1246c35 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java @@ -2,10 +2,12 @@ package WayofTime.alchemicalWizardry.api.harvest; import java.util.ArrayList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.world.World; public class HarvestRegistry { + public static List handlerList = new ArrayList(); public static void registerHarvestHandler(IHarvestHandler handler) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/harvest/IHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/harvest/IHarvestHandler.java index ebdd14ca..8ffea0bf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/harvest/IHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/harvest/IHarvestHandler.java @@ -4,6 +4,7 @@ import net.minecraft.block.Block; import net.minecraft.world.World; public interface IHarvestHandler { + /** * A handler that is used to harvest and replant the block at the specified location * diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/IAltarManipulator.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/IAltarManipulator.java index ed997a28..3b2a9f70 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/IAltarManipulator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/IAltarManipulator.java @@ -1,3 +1,4 @@ package WayofTime.alchemicalWizardry.api.items; -public interface IAltarManipulator {} +public interface IAltarManipulator { +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java index 14c9befe..b66ed9aa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java @@ -1,14 +1,11 @@ package WayofTime.alchemicalWizardry.api.items; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; -import WayofTime.alchemicalWizardry.api.spell.SpellEffect; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Random; import java.util.Set; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -28,7 +25,13 @@ import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.util.Constants; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; +import WayofTime.alchemicalWizardry.api.spell.SpellEffect; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; + public class ItemSpellMultiTool extends Item { + private static final String harvestLevelSuffix = "harvestLvl"; private static final String digLevelSuffix = "digLvl"; private static final String tagName = "BloodMagicTool"; @@ -47,12 +50,11 @@ public class ItemSpellMultiTool extends Item { } @Override - public boolean hitEntity( - ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) { + public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, + EntityLivingBase par3EntityLivingBase) { float damage = this.getCustomItemAttack(par1ItemStack); - float f = (float) par3EntityLivingBase - .getEntityAttribute(SharedMonsterAttributes.attackDamage) + float f = (float) par3EntityLivingBase.getEntityAttribute(SharedMonsterAttributes.attackDamage) .getAttributeValue(); SpellParadigmTool parad = this.loadParadigmFromStack(par1ItemStack); @@ -70,8 +72,8 @@ public class ItemSpellMultiTool extends Item { damage *= f; if (par3EntityLivingBase instanceof EntityPlayer) { - par2EntityLivingBase.attackEntityFrom( - DamageSource.causePlayerDamage((EntityPlayer) par3EntityLivingBase), damage); + par2EntityLivingBase + .attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) par3EntityLivingBase), damage); } else { par2EntityLivingBase.attackEntityFrom(DamageSource.causeMobDamage(par3EntityLivingBase), damage); } @@ -163,7 +165,14 @@ public class ItemSpellMultiTool extends Item { int cost = 0; cost += parad.digSurroundingArea( - stack, world, player, mop, localToolClass, localHardness, toolLevel, this); + stack, + world, + player, + mop, + localToolClass, + localHardness, + toolLevel, + this); cost += parad.onBreakBlock( stack, @@ -192,28 +201,20 @@ public class ItemSpellMultiTool extends Item { } } - // if (!world.isRemote) - // world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12)); + // if (!world.isRemote) + // world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12)); return true; } public Material[] getMaterialsForToolclass(String toolClass) { if ("pickaxe".equals(toolClass)) { - return new Material[] { - Material.rock, - Material.iron, - Material.ice, - Material.glass, - Material.piston, - Material.anvil, - Material.circuits - }; + return new Material[] { Material.rock, Material.iron, Material.ice, Material.glass, Material.piston, + Material.anvil, Material.circuits }; } else if ("shovel".equals(toolClass)) { - return new Material[] { - Material.grass, Material.ground, Material.sand, Material.snow, Material.craftedSnow, Material.clay - }; + return new Material[] { Material.grass, Material.ground, Material.sand, Material.snow, Material.craftedSnow, + Material.clay }; } else if ("axe".equals(toolClass)) { - return new Material[] {Material.wood, Material.vine, Material.circuits, Material.cactus}; + return new Material[] { Material.wood, Material.vine, Material.circuits, Material.cactus }; } return new Material[0]; } @@ -483,8 +484,7 @@ public class ItemSpellMultiTool extends Item { public ItemStack getContainedCrystal(ItemStack container) { if (container.hasTagCompound()) { - NBTTagCompound tag = - container.getTagCompound().getCompoundTag(tagName).getCompoundTag("heldItem"); + NBTTagCompound tag = container.getTagCompound().getCompoundTag(tagName).getCompoundTag("heldItem"); return ItemStack.loadItemStackFromNBT(tag); } else { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapedBloodOrbRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapedBloodOrbRecipe.java index 901b2295..08a11c8d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapedBloodOrbRecipe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapedBloodOrbRecipe.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.api.items; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; + import net.minecraft.block.Block; import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.Item; @@ -15,10 +15,13 @@ import net.minecraft.item.crafting.ShapedRecipes; import net.minecraft.world.World; import net.minecraftforge.oredict.OreDictionary; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; + /** * Shaped Blood Orb Recipe Handler by joshie * */ public class ShapedBloodOrbRecipe implements IRecipe { + private static final int MAX_CRAFT_GRID_WIDTH = 3; private static final int MAX_CRAFT_GRID_HEIGHT = 3; @@ -85,10 +88,11 @@ public class ShapedBloodOrbRecipe implements IRecipe { Object in = recipe[idx + 1]; if (in instanceof IBloodOrb - || (in instanceof ItemStack - && ((ItemStack) in).getItem() - instanceof - IBloodOrb)) { // If the item is an instanceof IBloodOrb then save the level of the + || (in instanceof ItemStack && ((ItemStack) in).getItem() instanceof IBloodOrb)) { // If the item is + // an instanceof + // IBloodOrb then + // save the level + // of the // orb if (in instanceof ItemStack) itemMap.put(chr, ((IBloodOrb) ((ItemStack) in).getItem()).getOrbLevel()); else itemMap.put(chr, ((IBloodOrb) in).getOrbLevel()); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java index cfc2262c..6e5eaf14 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.api.items; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; + import net.minecraft.block.Block; import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.Item; @@ -15,10 +15,13 @@ import net.minecraft.item.crafting.ShapelessRecipes; import net.minecraft.world.World; import net.minecraftforge.oredict.OreDictionary; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; + /** * Shapeless Blood Orb Recipe Handler by joshie * */ public class ShapelessBloodOrbRecipe implements IRecipe { + private ItemStack output = null; private ArrayList input = new ArrayList(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ArmourUpgrade.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ArmourUpgrade.java index 52c26c27..11e826ee 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ArmourUpgrade.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ArmourUpgrade.java @@ -5,6 +5,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; public interface ArmourUpgrade { + // Called when the armour ticks void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IBindable.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IBindable.java index 1b97df2e..8b735834 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IBindable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IBindable.java @@ -1,3 +1,4 @@ package WayofTime.alchemicalWizardry.api.items.interfaces; -public interface IBindable {} +public interface IBindable { +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IBloodOrb.java index 50d3d64f..bd7e5708 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IBloodOrb.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api.items.interfaces; public interface IBloodOrb { + int getMaxEssence(); int getOrbLevel(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IHolding.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IHolding.java index 2e2f9782..f1a21be9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IHolding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IHolding.java @@ -1,3 +1,4 @@ package WayofTime.alchemicalWizardry.api.items.interfaces; -public interface IHolding {} +public interface IHolding { +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ILPGauge.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ILPGauge.java index 0e84364f..519e5ccd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ILPGauge.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ILPGauge.java @@ -3,5 +3,6 @@ package WayofTime.alchemicalWizardry.api.items.interfaces; import net.minecraft.item.ItemStack; public interface ILPGauge { + boolean canSeeLPBar(ItemStack itemStack); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IReagentManipulator.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IReagentManipulator.java index 0ac27ade..37c86dd3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IReagentManipulator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IReagentManipulator.java @@ -3,4 +3,5 @@ package WayofTime.alchemicalWizardry.api.items.interfaces; /** * Implement this interface to have reagent blocks return false on activating them, to allow manipulation of said block */ -public interface IReagentManipulator {} +public interface IReagentManipulator { +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IRitualDiviner.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IRitualDiviner.java index 3fe07978..f816e12c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IRitualDiviner.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IRitualDiviner.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.items.interfaces; import net.minecraft.item.ItemStack; public interface IRitualDiviner { + int cycleDirection(ItemStack stack); String getCurrentRitual(ItemStack stack); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ISigil.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ISigil.java index 56713a23..d610c211 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ISigil.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ISigil.java @@ -1,3 +1,4 @@ package WayofTime.alchemicalWizardry.api.items.interfaces; -public interface ISigil {} +public interface ISigil { +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/renderer/MRSRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/api/renderer/MRSRenderer.java index fc713316..a283ea2f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/renderer/MRSRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/renderer/MRSRenderer.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.api.renderer; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.util.ResourceLocation; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; + public abstract class MRSRenderer { + public abstract void renderAt(IMasterRitualStone tile, double x, double y, double z); protected void bindTexture(ResourceLocation p_147499_1_) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IMasterRitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IMasterRitualStone.java index 12137738..b16ed886 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IMasterRitualStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IMasterRitualStone.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.api.rituals; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ISegmentedReagentHandler; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ISegmentedReagentHandler; + public interface IMasterRitualStone extends ISegmentedReagentHandler { + void performRitual(World world, int x, int y, int z, String ritualID); String getOwner(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IRitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IRitualStone.java index e71a01b7..5bfe797c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IRitualStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IRitualStone.java @@ -3,8 +3,10 @@ package WayofTime.alchemicalWizardry.api.rituals; import net.minecraft.world.World; public interface IRitualStone { + /** * x, y, and z give the position of the Ritual Stone + * * @param world * @param x * @param y diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/ITileRitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/ITileRitualStone.java index 234cd98d..9281d629 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/ITileRitualStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/ITileRitualStone.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.api.rituals; public interface ITileRitualStone { + boolean isRuneType(int runeType); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/LocalRitualStorage.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/LocalRitualStorage.java index bfcf9acb..b1aba077 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/LocalRitualStorage.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/LocalRitualStorage.java @@ -1,14 +1,16 @@ package WayofTime.alchemicalWizardry.api.rituals; -import WayofTime.alchemicalWizardry.api.Int3; import net.minecraft.nbt.NBTTagCompound; +import WayofTime.alchemicalWizardry.api.Int3; + /** - * This class is used to pass ritual-specific data into the RitualEffect from the containing Master Ritual Stone. This is basically used as auxillarary storage, - * for when simply storing to NBT becomes... difficult. + * This class is used to pass ritual-specific data into the RitualEffect from the containing Master Ritual Stone. This + * is basically used as auxillarary storage, for when simply storing to NBT becomes... difficult. * */ public class LocalRitualStorage { + public int xCoord; public int yCoord; public int zCoord; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualComponent.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualComponent.java index 1862068e..8e06f34a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualComponent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualComponent.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api.rituals; public class RitualComponent { + private int x; private int y; private int z; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java index 39dfa912..29b6a45c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java @@ -1,13 +1,16 @@ package WayofTime.alchemicalWizardry.api.rituals; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import java.util.ArrayList; import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; + public abstract class RitualEffect { + public abstract void performEffect(IMasterRitualStone ritualStone); public boolean startRitual(IMasterRitualStone ritualStone, EntityPlayer player) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java index 0f8bfece..2c6e1903 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java @@ -1,13 +1,10 @@ package WayofTime.alchemicalWizardry.api.rituals; -import WayofTime.alchemicalWizardry.api.event.RitualRunEvent; -import WayofTime.alchemicalWizardry.api.event.RitualStopEvent; -import WayofTime.alchemicalWizardry.api.renderer.MRSRenderer; -import cpw.mods.fml.common.eventhandler.Event; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; @@ -15,7 +12,13 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; +import WayofTime.alchemicalWizardry.api.event.RitualRunEvent; +import WayofTime.alchemicalWizardry.api.event.RitualStopEvent; +import WayofTime.alchemicalWizardry.api.renderer.MRSRenderer; +import cpw.mods.fml.common.eventhandler.Event; + public class Rituals { + public final int crystalLevel; public final int actCost; public final RitualEffect effect; @@ -51,8 +54,8 @@ public class Rituals { * @param name The name of the ritual * @return Returns true if properly registered, or false if the key is already used */ - public static boolean registerRitual( - String key, int crystalLevel, int actCost, RitualEffect effect, String name, MRSRenderer renderer) { + public static boolean registerRitual(String key, int crystalLevel, int actCost, RitualEffect effect, String name, + MRSRenderer renderer) { if (ritualMap.containsKey(key)) { return false; } else { @@ -115,13 +118,10 @@ public class Rituals { } /** - * 1 - NORTH - * 2 - EAST - * 3 - SOUTH - * 4 - WEST + * 1 - NORTH 2 - EAST 3 - SOUTH 4 - WEST */ - public static boolean checkDirectionOfRitualValid( - World world, int x, int y, int z, String ritualID, int direction) { + public static boolean checkDirectionOfRitualValid(World world, int x, int y, int z, String ritualID, + int direction) { List ritual = Rituals.getRitualList(ritualID); if (ritual == null) { @@ -135,16 +135,13 @@ public class Rituals { test = world.getBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)); te = world.getTileEntity(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)); - if (!(test instanceof IRitualStone - && ((IRitualStone) test) - .isRuneType( - world, - x + rc.getX(direction), - y, - z + rc.getZ(direction), - world.getBlockMetadata( - x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)), - rc.getStoneType())) + if (!(test instanceof IRitualStone && ((IRitualStone) test).isRuneType( + world, + x + rc.getX(direction), + y, + z + rc.getZ(direction), + world.getBlockMetadata(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)), + rc.getStoneType())) && !(te instanceof ITileRitualStone && ((ITileRitualStone) te).isRuneType(rc.getStoneType()))) { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/IIncense.java b/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/IIncense.java index 3bb42028..df8750f3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/IIncense.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/IIncense.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.sacrifice; import net.minecraft.item.ItemStack; public interface IIncense { + int getMinLevel(ItemStack stack); int getMaxLevel(ItemStack stack); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/PlayerSacrificeHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/PlayerSacrificeHandler.java index 39bda704..496ccca7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/PlayerSacrificeHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/PlayerSacrificeHandler.java @@ -1,15 +1,17 @@ package WayofTime.alchemicalWizardry.api.sacrifice; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; -import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; +import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; + public class PlayerSacrificeHandler { + public static float scalingOfSacrifice = 0.001f; public static int soulFrayDuration = 400; public static Potion soulFrayId; @@ -31,7 +33,7 @@ public class PlayerSacrificeHandler { amount = amount + Math.min(increment, max - amount); setPlayerIncense(player, amount); - // System.out.println("Amount of incense: " + amount + ", Increment: " + increment); + // System.out.println("Amount of incense: " + amount + ", Increment: " + increment); return true; } @@ -50,8 +52,10 @@ public class PlayerSacrificeHandler { if (health > maxHealth / 10.0) { float sacrificedHealth = health - maxHealth / 10.0f; - if (findAndFillAltar(player.getEntityWorld(), player, (int) - (sacrificedHealth * AlchemicalWizardry.lpPerSacrificeIncense * getModifier(amount)))) { + if (findAndFillAltar( + player.getEntityWorld(), + player, + (int) (sacrificedHealth * AlchemicalWizardry.lpPerSacrificeIncense * getModifier(amount)))) { player.setHealth(maxHealth / 10.0f); setPlayerIncense(player, 0); player.addPotionEffect(new PotionEffect(soulFrayId.id, soulFrayDuration)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java index ba3c9603..39886dd2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.api.soulNetwork; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.mojang.authlib.GameProfile; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; @@ -13,13 +10,19 @@ import java.io.Writer; import java.util.HashMap; import java.util.Map.Entry; import java.util.UUID; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.server.MinecraftServer; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.mojang.authlib.GameProfile; + /** * Temporary class to hash-out how to create a network not completely tied to the player. */ public class ComplexNetworkHandler { + public static String fileName = "config/BloodMagic/soulnetworkKeys"; static HashMap keyMap = new HashMap(); @@ -42,19 +45,19 @@ public class ComplexNetworkHandler { } public static UUID getUUIDForKey(String key) { - // if (MinecraftServer.getServer() == null) - // { - // return null; - // } + // if (MinecraftServer.getServer() == null) + // { + // return null; + // } // - // World world = MinecraftServer.getServer().worldServers[0]; - // UUIDKeyMap data = (UUIDKeyMap) world.loadItemData(UUIDKeyMap.class, key); + // World world = MinecraftServer.getServer().worldServers[0]; + // UUIDKeyMap data = (UUIDKeyMap) world.loadItemData(UUIDKeyMap.class, key); // - // if (data == null) - // { - // data = new UUIDKeyMap(key); - // world.setItemData(key, data); - // } + // if (data == null) + // { + // data = new UUIDKeyMap(key); + // world.setItemData(key, data); + // } return null; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/LifeEssenceNetwork.java b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/LifeEssenceNetwork.java index 318e46fd..eb55f42f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/LifeEssenceNetwork.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/LifeEssenceNetwork.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.soulNetwork; import net.minecraft.nbt.NBTTagCompound; public class LifeEssenceNetwork extends net.minecraft.world.WorldSavedData { + public int currentEssence; public int maxOrb; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java index 18eaf085..fbc2d29a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java @@ -1,11 +1,5 @@ package WayofTime.alchemicalWizardry.api.soulNetwork; -import WayofTime.alchemicalWizardry.api.event.AddToNetworkEvent; -import WayofTime.alchemicalWizardry.api.event.ItemBindEvent; -import WayofTime.alchemicalWizardry.api.event.ItemDrainInContainerEvent; -import WayofTime.alchemicalWizardry.api.event.ItemDrainNetworkEvent; -import cpw.mods.fml.common.eventhandler.Event; -import cpw.mods.fml.common.eventhandler.Event.Result; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -16,11 +10,18 @@ import net.minecraft.util.DamageSource; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; +import WayofTime.alchemicalWizardry.api.event.AddToNetworkEvent; +import WayofTime.alchemicalWizardry.api.event.ItemBindEvent; +import WayofTime.alchemicalWizardry.api.event.ItemDrainInContainerEvent; +import WayofTime.alchemicalWizardry.api.event.ItemDrainNetworkEvent; +import cpw.mods.fml.common.eventhandler.Event; +import cpw.mods.fml.common.eventhandler.Event.Result; + public class SoulNetworkHandler { + public static boolean syphonFromNetworkWhileInContainer(ItemStack ist, int damageToBeDone) { String ownerName = ""; - if (ist.getTagCompound() != null - && !(ist.getTagCompound().getString("ownerName").equals(""))) { + if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) { ownerName = ist.getTagCompound().getString("ownerName"); } @@ -86,8 +87,7 @@ public class SoulNetworkHandler { } public static int syphonFromNetwork(ItemStack ist, int damageToBeDone) { - if (ist.getTagCompound() != null - && !(ist.getTagCompound().getString("ownerName").equals(""))) { + if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) { String ownerName = ist.getTagCompound().getString("ownerName"); return syphonFromNetwork(ownerName, damageToBeDone); @@ -119,11 +119,11 @@ public class SoulNetworkHandler { } /** - * Master method used to syphon from the player's network, and will damage them accordingly if they do not have enough LP. - * Does not drain on the client side. + * Master method used to syphon from the player's network, and will damage them accordingly if they do not have + * enough LP. Does not drain on the client side. * - * @param ist Owned itemStack - * @param player Player using the item + * @param ist Owned itemStack + * @param player Player using the item * @param drain * @return True if the action should be executed and false if it should not. Always returns false if client-sided. */ @@ -132,8 +132,7 @@ public class SoulNetworkHandler { return false; } - if (ist.getTagCompound() != null - && !(ist.getTagCompound().getString("ownerName").equals(""))) { + if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) { String ownerName = ist.getTagCompound().getString("ownerName"); ItemDrainNetworkEvent event = new ItemDrainNetworkEvent(player, ownerName, ist, drain); @@ -147,9 +146,8 @@ public class SoulNetworkHandler { hurtPlayer(player, event.damageAmount); } - return (event.getResult() - != Event.Result - .DENY); // The event has been told to prevent the action but allow all repercussions of + return (event.getResult() != Event.Result.DENY); // The event has been told to prevent the action but allow + // all repercussions of // using the item. } @@ -184,8 +182,7 @@ public class SoulNetworkHandler { } public static boolean canSyphonFromOnlyNetwork(ItemStack ist, int damageToBeDone) { - if (ist.getTagCompound() != null - && !(ist.getTagCompound().getString("ownerName").equals(""))) { + if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) { String ownerName = ist.getTagCompound().getString("ownerName"); return canSyphonFromOnlyNetwork(ownerName, damageToBeDone); @@ -322,8 +319,7 @@ public class SoulNetworkHandler { } public static boolean checkAndSetItemPlayer(ItemStack item, EntityPlayer player) { - if (item.hasTagCompound() - && !item.getTagCompound().getString("ownerName").equals("")) return true; + if (item.hasTagCompound() && !item.getTagCompound().getString("ownerName").equals("")) return true; ItemBindEvent event = new ItemBindEvent(player, SoulNetworkHandler.getUsername(player), item); @@ -359,8 +355,7 @@ public class SoulNetworkHandler { } public static void causeNauseaToPlayer(ItemStack stack) { - if (stack.getTagCompound() != null - && !(stack.getTagCompound().getString("ownerName").equals(""))) { + if (stack.getTagCompound() != null && !(stack.getTagCompound().getString("ownerName").equals(""))) { String ownerName = stack.getTagCompound().getString("ownerName"); SoulNetworkHandler.causeNauseaToPlayer(ownerName); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java index 7e931580..61aedd5f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java @@ -1,11 +1,8 @@ package WayofTime.alchemicalWizardry.api.spell; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import cpw.mods.fml.common.registry.GameRegistry; import java.util.ArrayList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; @@ -21,9 +18,16 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import cpw.mods.fml.common.registry.GameRegistry; + public class APISpellHelper { + /** * Thanks Kihira! <3 + * * @param player * @return persistent data tag */ @@ -203,9 +207,9 @@ public class APISpellHelper { float f6 = MathHelper.sin(-f1 * 0.017453292F); float f7 = f4 * f5; float f8 = f3 * f5; - // if (player instanceof EntityPlayerMP) + // if (player instanceof EntityPlayerMP) { - // d3 = ((EntityPlayerMP) player).theItemInWorldManager.getBlockReachDistance(); + // d3 = ((EntityPlayerMP) player).theItemInWorldManager.getBlockReachDistance(); } Vec3 vec31 = vec3.addVector((double) f7 * range, (double) f6 * range, (double) f8 * range); return world.func_147447_a(vec3, vec31, par3, !par3, par3); @@ -215,8 +219,8 @@ public class APISpellHelper { return Vec3.createVectorHelper(x, y, z); } - public static List getItemsFromBlock( - World world, Block block, int x, int y, int z, int meta, boolean silkTouch, int fortune) { + public static List getItemsFromBlock(World world, Block block, int x, int y, int z, int meta, + boolean silkTouch, int fortune) { boolean canSilk = block.canSilkHarvest(world, null, x, y, z, meta); if (canSilk && silkTouch) { @@ -321,7 +325,7 @@ public class APISpellHelper { } public static IRecipe getRecipeForItemStack(ItemStack reqStack) // Does not match NBT. Durrr! -smack- - { + { if (reqStack == null) { return null; // Why are you even doing this to yourself!? You know this can't be healthy! } @@ -330,10 +334,9 @@ public class APISpellHelper { if (posRecipe instanceof IRecipe) { ItemStack outputStack = ((IRecipe) posRecipe).getRecipeOutput(); if (outputStack != null) { - if (outputStack.getItem() == reqStack.getItem() - && (outputStack.getItem().getHasSubtypes() - ? outputStack.getItemDamage() == reqStack.getItemDamage() - : true)) { + if (outputStack.getItem() == reqStack.getItem() && (outputStack.getItem().getHasSubtypes() + ? outputStack.getItemDamage() == reqStack.getItemDamage() + : true)) { return (IRecipe) posRecipe; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellEffect.java index 57d643d5..20603b07 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellEffect.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api.spell; public abstract class ComplexSpellEffect { + public final ComplexSpellType type; public final ComplexSpellModifier modifier; @@ -35,52 +36,52 @@ public abstract class ComplexSpellEffect { public abstract int getCostOfEffect(); - // public NBTTagCompound getTag() - // { - // NBTTagCompound tag = new NBTTagCompound(); + // public NBTTagCompound getTag() + // { + // NBTTagCompound tag = new NBTTagCompound(); // - // tag.setString("Class", this.getClass().getName()); - // tag.setInteger("modifier", modifierState); - // tag.setInteger("power", powerEnhancement); - // tag.setInteger("cost", costEnhancement); - // tag.setInteger("potency", potencyEnhancement); + // tag.setString("Class", this.getClass().getName()); + // tag.setInteger("modifier", modifierState); + // tag.setInteger("power", powerEnhancement); + // tag.setInteger("cost", costEnhancement); + // tag.setInteger("potency", potencyEnhancement); // - // return tag; - // } + // return tag; + // } // - // public static SpellEffect getEffectFromTag(NBTTagCompound tag) - // { - // try - // { - // Class clazz = Class.forName(tag.getString("Class")); - // if (clazz != null) - // { - // try - // { - // Object obj = clazz.newInstance(); - // if (obj instanceof SpellEffect) - // { - // SpellEffect eff = (SpellEffect) obj; + // public static SpellEffect getEffectFromTag(NBTTagCompound tag) + // { + // try + // { + // Class clazz = Class.forName(tag.getString("Class")); + // if (clazz != null) + // { + // try + // { + // Object obj = clazz.newInstance(); + // if (obj instanceof SpellEffect) + // { + // SpellEffect eff = (SpellEffect) obj; // - // eff.modifierState = tag.getInteger("modifier"); - // eff.powerEnhancement = tag.getInteger("power"); - // eff.costEnhancement = tag.getInteger("cost"); - // eff.potencyEnhancement = tag.getInteger("potency"); + // eff.modifierState = tag.getInteger("modifier"); + // eff.powerEnhancement = tag.getInteger("power"); + // eff.costEnhancement = tag.getInteger("cost"); + // eff.potencyEnhancement = tag.getInteger("potency"); // - // return eff; - // } - // } catch (InstantiationException e) - // { - // e.printStackTrace(); - // } catch (IllegalAccessException e) - // { - // e.printStackTrace(); - // } - // } - // } catch (ClassNotFoundException e) - // { - // e.printStackTrace(); - // } - // return null; - // } + // return eff; + // } + // } catch (InstantiationException e) + // { + // e.printStackTrace(); + // } catch (IllegalAccessException e) + // { + // e.printStackTrace(); + // } + // } + // } catch (ClassNotFoundException e) + // { + // e.printStackTrace(); + // } + // return null; + // } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellModifier.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellModifier.java index 7551afc8..451ce41f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellModifier.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellModifier.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api.spell; public class ComplexSpellModifier { + public static ComplexSpellModifier DEFAULT = new ComplexSpellModifier(); public static ComplexSpellModifier OFFENSIVE = new ComplexSpellModifier(); public static ComplexSpellModifier DEFENSIVE = new ComplexSpellModifier(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellType.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellType.java index 6a802bc5..9a55d03d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellType.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellType.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api.spell; public class ComplexSpellType { + public static ComplexSpellType FIRE = new ComplexSpellType(); public static ComplexSpellType ICE = new ComplexSpellType(); public static ComplexSpellType EARTH = new ComplexSpellType(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java index 08680221..e7bdf85f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java @@ -1,11 +1,10 @@ package WayofTime.alchemicalWizardry.api.spell; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.IProjectile; @@ -20,7 +19,11 @@ import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class EntitySpellProjectile extends Entity implements IProjectile { + private int xTile = -1; private int yTile = -1; private int zTile = -1; @@ -88,8 +91,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile { } /** - * Similar to setArrowHeading, it's point the throwable entity to a x, y, z - * direction. + * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction. */ @Override public void setThrowableHeading(double var1, double var3, double var5, float var7, float var8) { @@ -189,7 +191,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile { Block var18 = worldObj.getBlock(xTile, yTile, zTile); int var19 = worldObj.getBlockMetadata(xTile, yTile, zTile); - // if (var18.equals(Block.getBlockById(inTile)) && var19 == inData) + // if (var18.equals(Block.getBlockById(inTile)) && var19 == inData) { // this.groundImpact(); // this.setDead(); @@ -217,7 +219,8 @@ public class EntitySpellProjectile extends Entity implements IProjectile { Entity var5 = null; List var6 = worldObj.getEntitiesWithinAABBExcludingEntity( - this, boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); + this, + boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); double var7 = 0.0D; Iterator var9 = var6.iterator(); float var11; @@ -299,16 +302,16 @@ public class EntitySpellProjectile extends Entity implements IProjectile { effectList.appendTag(eff.getTag()); } - // for (String str : this.effectList) - // { - // if (str != null) - // { - // NBTTagCompound tag = new NBTTagCompound(); + // for (String str : this.effectList) + // { + // if (str != null) + // { + // NBTTagCompound tag = new NBTTagCompound(); // - // tag.setString("Class", str); - // effectList.appendTag(tag); - // } - // } + // tag.setString("Class", str); + // effectList.appendTag(tag); + // } + // } par1NBTTagCompound.setTag("Effects", effectList); par1NBTTagCompound.setInteger("blocksBroken", blocksBroken); @@ -342,13 +345,13 @@ public class EntitySpellProjectile extends Entity implements IProjectile { } this.spellEffectList = spellEffectList; - // this.effectList = new LinkedList(); - // for (int i = 0; i < tagList.tagCount(); i++) - // { - // NBTTagCompound tag = (NBTTagCompound) tagList.tagAt(i); + // this.effectList = new LinkedList(); + // for (int i = 0; i < tagList.tagCount(); i++) + // { + // NBTTagCompound tag = (NBTTagCompound) tagList.tagAt(i); // - // this.effectList.add(tag.getString("Class")); - // } + // this.effectList.add(tag.getString("Class")); + // } // SpellParadigmProjectile parad = SpellParadigmProjectile.getParadigmForStringArray(effectList); SpellParadigmProjectile parad = SpellParadigmProjectile.getParadigmForEffectArray(spellEffectList); @@ -357,8 +360,8 @@ public class EntitySpellProjectile extends Entity implements IProjectile { } /** - * returns if this entity triggers Block.onEntityWalking on the blocks they - * walk on. used for spiders and wolves to prevent them from trampling crops + * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to + * prevent them from trampling crops */ @Override protected boolean canTriggerWalking() { @@ -385,8 +388,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile { } /** - * Whether the arrow has a stream of critical hit particles flying behind - * it. + * Whether the arrow has a stream of critical hit particles flying behind it. */ public void setIsCritical(boolean par1) { byte var2 = dataWatcher.getWatchableObjectByte(16); @@ -398,8 +400,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile { } /** - * Whether the arrow has a stream of critical hit particles flying behind - * it. + * Whether the arrow has a stream of critical hit particles flying behind it. */ public boolean getIsCritical() { byte var1 = dataWatcher.getWatchableObjectByte(16); @@ -420,7 +421,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile { } private void onImpact(Entity mop) // TODO - { + { if (mop == shootingEntity && ticksInAir > 3) { shootingEntity.attackEntityFrom(DamageSource.causePlayerDamage(shootingEntity), 1); this.setDead(); @@ -493,27 +494,63 @@ public class EntitySpellProjectile extends Entity implements IProjectile { switch (sideHit) { case 0: worldObj.spawnParticle( - "smoke", posX, posY, posZ, gaussian(0.1D), -gaussian(0.1D), gaussian(0.1D)); + "smoke", + posX, + posY, + posZ, + gaussian(0.1D), + -gaussian(0.1D), + gaussian(0.1D)); break; case 1: worldObj.spawnParticle( - "smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + "smoke", + posX, + posY, + posZ, + gaussian(0.1D), + gaussian(0.1D), + gaussian(0.1D)); break; case 2: worldObj.spawnParticle( - "smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), -gaussian(0.1D)); + "smoke", + posX, + posY, + posZ, + gaussian(0.1D), + gaussian(0.1D), + -gaussian(0.1D)); break; case 3: worldObj.spawnParticle( - "smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + "smoke", + posX, + posY, + posZ, + gaussian(0.1D), + gaussian(0.1D), + gaussian(0.1D)); break; case 4: worldObj.spawnParticle( - "smoke", posX, posY, posZ, -gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + "smoke", + posX, + posY, + posZ, + -gaussian(0.1D), + gaussian(0.1D), + gaussian(0.1D)); break; case 5: worldObj.spawnParticle( - "smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + "smoke", + posX, + posY, + posZ, + gaussian(0.1D), + gaussian(0.1D), + gaussian(0.1D)); break; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ExtrapolatedMeleeEntityEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ExtrapolatedMeleeEntityEffect.java index fdfb04ee..9671dcf1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ExtrapolatedMeleeEntityEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ExtrapolatedMeleeEntityEffect.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api.spell; import java.util.List; + import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.AxisAlignedBB; @@ -8,6 +9,7 @@ import net.minecraft.util.Vec3; import net.minecraft.world.World; public abstract class ExtrapolatedMeleeEntityEffect implements IMeleeSpellEntityEffect { + protected float range; protected float radius; protected int powerUpgrades; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IDigAreaEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IDigAreaEffect.java index 1a4ab312..6498fc57 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IDigAreaEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IDigAreaEffect.java @@ -1,19 +1,14 @@ package WayofTime.alchemicalWizardry.api.spell; -import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; + public interface IDigAreaEffect { - int digSurroundingArea( - ItemStack container, - World world, - EntityPlayer player, - MovingObjectPosition blockPos, - String usedToolClass, - float blockHardness, - int harvestLvl, - ItemSpellMultiTool itemTool); + + int digSurroundingArea(ItemStack container, World world, EntityPlayer player, MovingObjectPosition blockPos, + String usedToolClass, float blockHardness, int harvestLvl, ItemSpellMultiTool itemTool); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IItemManipulator.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IItemManipulator.java index 1afcce16..48a7fb96 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IItemManipulator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IItemManipulator.java @@ -1,8 +1,10 @@ package WayofTime.alchemicalWizardry.api.spell; import java.util.List; + import net.minecraft.item.ItemStack; public interface IItemManipulator { + public List handleItemsOnBlockBroken(ItemStack toolStack, List itemList); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ILeftClickEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ILeftClickEffect.java index 407684d7..cfb97c01 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ILeftClickEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ILeftClickEffect.java @@ -4,5 +4,6 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; public interface ILeftClickEffect { + int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IMeleeSpellEntityEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IMeleeSpellEntityEffect.java index a10ee975..5eb0d457 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IMeleeSpellEntityEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IMeleeSpellEntityEffect.java @@ -4,5 +4,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; public interface IMeleeSpellEntityEffect { + void onEntityImpact(World world, EntityPlayer entityPlayer); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IMeleeSpellWorldEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IMeleeSpellWorldEffect.java index 4ef5193c..29bbbbb3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IMeleeSpellWorldEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IMeleeSpellWorldEffect.java @@ -4,5 +4,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; public interface IMeleeSpellWorldEffect { + void onWorldEffect(World world, EntityPlayer entityPlayer); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBanishTool.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBanishTool.java index e8e7205d..d5f9d17b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBanishTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBanishTool.java @@ -5,5 +5,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; public interface IOnBanishTool { + int onBanishTool(ItemStack toolStack, World world, Entity entity, int invSlot, boolean inHand); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBreakBlock.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBreakBlock.java index 3b40fbb4..ac7d100e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBreakBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBreakBlock.java @@ -7,14 +7,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; public interface IOnBreakBlock { - int onBlockBroken( - ItemStack container, - World world, - EntityPlayer player, - Block block, - int meta, - int x, - int y, - int z, + + int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, int meta, int x, int y, int z, ForgeDirection sideBroken); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnSummonTool.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnSummonTool.java index 6880c05f..aa91ea51 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnSummonTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnSummonTool.java @@ -5,5 +5,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; public interface IOnSummonTool { + int onSummonTool(ItemStack toolStack, World world, Entity entity); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IProjectileImpactEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IProjectileImpactEffect.java index 31cc9210..c962e9af 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IProjectileImpactEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IProjectileImpactEffect.java @@ -5,6 +5,7 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; public interface IProjectileImpactEffect { + void onEntityImpact(Entity mop, Entity projectile); void onTileImpact(World world, MovingObjectPosition mop); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IProjectileUpdateEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IProjectileUpdateEffect.java index 4b16a24c..92ca76f7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IProjectileUpdateEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IProjectileUpdateEffect.java @@ -3,5 +3,6 @@ package WayofTime.alchemicalWizardry.api.spell; import net.minecraft.entity.Entity; public interface IProjectileUpdateEffect { + void onUpdateEffect(Entity projectile); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ISelfSpellEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ISelfSpellEffect.java index 9e12858e..edca6c3e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ISelfSpellEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ISelfSpellEffect.java @@ -4,5 +4,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; public interface ISelfSpellEffect { + void onSelfUse(World world, EntityPlayer player); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ISpecialDamageEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ISpecialDamageEffect.java index 4c362875..05897c42 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ISpecialDamageEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ISpecialDamageEffect.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.spell; import net.minecraft.entity.Entity; public interface ISpecialDamageEffect { + float getDamageForEntity(Entity entity); String getKey(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IToolUpdateEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IToolUpdateEffect.java index b6c9b522..f8032e8d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IToolUpdateEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IToolUpdateEffect.java @@ -5,5 +5,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; public interface IToolUpdateEffect { + int onUpdate(ItemStack toolStack, World world, Entity par3Entity, int invSlot, boolean inHand); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellCenteredWorldEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellCenteredWorldEffect.java index d7b5881e..c094cd64 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellCenteredWorldEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellCenteredWorldEffect.java @@ -5,6 +5,7 @@ import net.minecraft.util.Vec3; import net.minecraft.world.World; public abstract class MeleeSpellCenteredWorldEffect extends MeleeSpellWorldEffect { + protected float range; public MeleeSpellCenteredWorldEffect(int power, int potency, int cost) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellWorldEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellWorldEffect.java index c1d33667..d0a3fe16 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellWorldEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellWorldEffect.java @@ -4,6 +4,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; public abstract class MeleeSpellWorldEffect implements IMeleeSpellWorldEffect { + protected int powerUpgrades; protected int potencyUpgrades; protected int costUpgrades; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ProjectileImpactEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ProjectileImpactEffect.java index db78fa64..37914176 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ProjectileImpactEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ProjectileImpactEffect.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api.spell; public abstract class ProjectileImpactEffect implements IProjectileImpactEffect { + protected int powerUpgrades; protected int potencyUpgrades; protected int costUpgrades; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ProjectileUpdateEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ProjectileUpdateEffect.java index dbe6d016..8f9c6cf8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ProjectileUpdateEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ProjectileUpdateEffect.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api.spell; public abstract class ProjectileUpdateEffect implements IProjectileUpdateEffect { + protected int powerUpgrades; protected int potencyUpgrades; protected int costUpgrades; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SelfSpellEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SelfSpellEffect.java index aa92707d..ed49027e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SelfSpellEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SelfSpellEffect.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api.spell; public abstract class SelfSpellEffect implements ISelfSpellEffect { + protected int powerUpgrades; protected int potencyUpgrades; protected int costUpgrades; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffect.java index debc5bea..2230353e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffect.java @@ -6,6 +6,7 @@ import net.minecraft.nbt.NBTTagCompound; * New wrapper class to enclose the ComplexSpellEffect */ public class SpellEffect { + public ComplexSpellType type; public ComplexSpellModifier modifier; @@ -52,17 +53,17 @@ public class SpellEffect { } } - public void modifyParadigm( - SpellParadigm parad) // When modifying the paradigm it will instead get the class name and ask the registry - { + public void modifyParadigm(SpellParadigm parad) // When modifying the paradigm it will instead get the class name + // and ask the registry + { if (parad == null) { return; } Class paraClass = parad.getClass(); - ComplexSpellEffect effect = SpellEffectRegistry.getSpellEffect( - paraClass, type, modifier, powerEnhancement, potencyEnhancement, costEnhancement); + ComplexSpellEffect effect = SpellEffectRegistry + .getSpellEffect(paraClass, type, modifier, powerEnhancement, potencyEnhancement, costEnhancement); if (effect != null) { effect.modifyParadigm(parad); @@ -76,8 +77,8 @@ public class SpellEffect { Class paraClass = parad.getClass(); - ComplexSpellEffect effect = SpellEffectRegistry.getSpellEffect( - paraClass, type, modifier, powerEnhancement, potencyEnhancement, costEnhancement); + ComplexSpellEffect effect = SpellEffectRegistry + .getSpellEffect(paraClass, type, modifier, powerEnhancement, potencyEnhancement, costEnhancement); if (effect == null) { return 0; @@ -149,330 +150,330 @@ public class SpellEffect { // // public abstract class SpellEffect // { -// protected int modifierState; -// protected int powerEnhancement; -// protected int costEnhancement; -// protected int potencyEnhancement; +// protected int modifierState; +// protected int powerEnhancement; +// protected int costEnhancement; +// protected int potencyEnhancement; // -// public SpellEffect() -// { -// this.modifierState = SpellModifier.DEFAULT; -// this.powerEnhancement = 0; -// this.costEnhancement = 0; -// this.potencyEnhancement = 0; -// } -// -// public void enhanceEffect(SpellEnhancement enh) -// { -// if (enh != null) -// { -// switch (enh.getState()) -// { -// case SpellEnhancement.POWER: -// this.powerEnhancement++; -// break; -// case SpellEnhancement.EFFICIENCY: -// this.costEnhancement++; -// break; -// case SpellEnhancement.POTENCY: -// this.potencyEnhancement++; -// break; -// } -// } -// } -// -// public void modifyEffect(SpellModifier mod) -// { -// if (mod != null) -// modifierState = mod.getModifier(); -// } -// -// public void modifyParadigm(SpellParadigm parad) //When modifying the paradigm it will instead get the class name -// and ask the registry -// { -// if (parad instanceof SpellParadigmProjectile) -// { -// this.modifyProjectileParadigm((SpellParadigmProjectile) parad); -// } -// if (parad instanceof SpellParadigmSelf) -// { -// this.modifySelfParadigm((SpellParadigmSelf) parad); -// } -// if (parad instanceof SpellParadigmMelee) -// { -// this.modifyMeleeParadigm((SpellParadigmMelee) parad); -// } -// if (parad instanceof SpellParadigmTool) -// { -// this.modifyToolParadigm((SpellParadigmTool) parad); -// } -// } -// -// public void modifyProjectileParadigm(SpellParadigmProjectile parad) -// { -// switch (modifierState) -// { -// case SpellModifier.DEFAULT: -// this.defaultModificationProjectile(parad); -// break; -// case SpellModifier.OFFENSIVE: -// this.offensiveModificationProjectile(parad); -// break; -// case SpellModifier.DEFENSIVE: -// this.defensiveModificationProjectile(parad); -// break; -// case SpellModifier.ENVIRONMENTAL: -// this.environmentalModificationProjectile(parad); -// break; -// } -// } -// -// public abstract void defaultModificationProjectile(SpellParadigmProjectile parad); -// -// public abstract void offensiveModificationProjectile(SpellParadigmProjectile parad); -// -// public abstract void defensiveModificationProjectile(SpellParadigmProjectile parad); -// -// public abstract void environmentalModificationProjectile(SpellParadigmProjectile parad); -// -// public void modifySelfParadigm(SpellParadigmSelf parad) -// { -// switch (modifierState) -// { -// case SpellModifier.DEFAULT: -// this.defaultModificationSelf(parad); -// break; -// case SpellModifier.OFFENSIVE: -// this.offensiveModificationSelf(parad); -// break; -// case SpellModifier.DEFENSIVE: -// this.defensiveModificationSelf(parad); -// break; -// case SpellModifier.ENVIRONMENTAL: -// this.environmentalModificationSelf(parad); -// break; -// } -// } -// -// public abstract void defaultModificationSelf(SpellParadigmSelf parad); -// -// public abstract void offensiveModificationSelf(SpellParadigmSelf parad); -// -// public abstract void defensiveModificationSelf(SpellParadigmSelf parad); -// -// public abstract void environmentalModificationSelf(SpellParadigmSelf parad); -// -// public void modifyMeleeParadigm(SpellParadigmMelee parad) -// { -// switch (modifierState) -// { -// case SpellModifier.DEFAULT: -// this.defaultModificationMelee(parad); -// break; -// case SpellModifier.OFFENSIVE: -// this.offensiveModificationMelee(parad); -// break; -// case SpellModifier.DEFENSIVE: -// this.defensiveModificationMelee(parad); -// break; -// case SpellModifier.ENVIRONMENTAL: -// this.environmentalModificationMelee(parad); -// break; -// } -// } -// -// public abstract void defaultModificationMelee(SpellParadigmMelee parad); -// -// public abstract void offensiveModificationMelee(SpellParadigmMelee parad); -// -// public abstract void defensiveModificationMelee(SpellParadigmMelee parad); -// -// public abstract void environmentalModificationMelee(SpellParadigmMelee parad); -// -// public void modifyToolParadigm(SpellParadigmTool parad) -// { -// switch (modifierState) -// { -// case SpellModifier.DEFAULT: -// this.defaultModificationTool(parad); -// break; -// case SpellModifier.OFFENSIVE: -// this.offensiveModificationTool(parad); -// break; -// case SpellModifier.DEFENSIVE: -// this.defensiveModificationTool(parad); -// break; -// case SpellModifier.ENVIRONMENTAL: -// this.environmentalModificationTool(parad); -// break; -// } -// } -// -// public abstract void defaultModificationTool(SpellParadigmTool parad); -// -// public abstract void offensiveModificationTool(SpellParadigmTool parad); -// -// public abstract void defensiveModificationTool(SpellParadigmTool parad); -// -// public abstract void environmentalModificationTool(SpellParadigmTool parad); -// -// public int getCostForProjectile() -// { -// switch (this.modifierState) -// { -// case SpellModifier.DEFAULT: -// return this.getCostForDefaultProjectile(); -// case SpellModifier.OFFENSIVE: -// return this.getCostForOffenseProjectile(); -// case SpellModifier.DEFENSIVE: -// return this.getCostForDefenseProjectile(); -// case SpellModifier.ENVIRONMENTAL: -// return this.getCostForEnvironmentProjectile(); -// } -// return 0; -// } -// -// protected abstract int getCostForDefaultProjectile(); -// -// protected abstract int getCostForOffenseProjectile(); -// -// protected abstract int getCostForDefenseProjectile(); -// -// protected abstract int getCostForEnvironmentProjectile(); -// -// public int getCostForSelf() -// { -// switch (this.modifierState) -// { -// case SpellModifier.DEFAULT: -// return this.getCostForDefaultSelf(); -// case SpellModifier.OFFENSIVE: -// return this.getCostForOffenseSelf(); -// case SpellModifier.DEFENSIVE: -// return this.getCostForDefenseSelf(); -// case SpellModifier.ENVIRONMENTAL: -// return this.getCostForEnvironmentSelf(); -// } -// return 0; -// } -// -// protected abstract int getCostForDefaultSelf(); -// -// protected abstract int getCostForOffenseSelf(); -// -// protected abstract int getCostForDefenseSelf(); -// -// protected abstract int getCostForEnvironmentSelf(); -// -// public int getCostForMelee() -// { -// switch (this.modifierState) -// { -// case SpellModifier.DEFAULT: -// return this.getCostForDefaultMelee(); -// case SpellModifier.OFFENSIVE: -// return this.getCostForOffenseMelee(); -// case SpellModifier.DEFENSIVE: -// return this.getCostForDefenseMelee(); -// case SpellModifier.ENVIRONMENTAL: -// return this.getCostForEnvironmentMelee(); -// } -// return 0; -// } -// -// protected abstract int getCostForDefaultMelee(); -// -// protected abstract int getCostForOffenseMelee(); -// -// protected abstract int getCostForDefenseMelee(); -// -// protected abstract int getCostForEnvironmentMelee(); -// -// public int getCostForTool() -// { -// switch (this.modifierState) -// { -// case SpellModifier.DEFAULT: -// return this.getCostForDefaultTool(); -// case SpellModifier.OFFENSIVE: -// return this.getCostForOffenseTool(); -// case SpellModifier.DEFENSIVE: -// return this.getCostForDefenseTool(); -// case SpellModifier.ENVIRONMENTAL: -// return this.getCostForEnvironmentTool(); -// } -// return 0; -// } -// -// protected abstract int getCostForDefaultTool(); -// -// protected abstract int getCostForOffenseTool(); -// -// protected abstract int getCostForDefenseTool(); -// -// protected abstract int getCostForEnvironmentTool(); -// -// public int getPowerEnhancements() -// { -// return this.powerEnhancement; -// } -// -// public int getCostEnhancements() -// { -// return this.costEnhancement; -// } -// -// public int getPotencyEnhancements() -// { -// return this.potencyEnhancement; -// } -// -// public NBTTagCompound getTag() -// { -// NBTTagCompound tag = new NBTTagCompound(); -// -// tag.setString("Class", this.getClass().getName()); -// tag.setInteger("modifier", modifierState); -// tag.setInteger("power", powerEnhancement); -// tag.setInteger("cost", costEnhancement); -// tag.setInteger("potency", potencyEnhancement); -// -// return tag; -// } -// -// public static SpellEffect getEffectFromTag(NBTTagCompound tag) -// { -// try -// { -// Class clazz = Class.forName(tag.getString("Class")); -// if (clazz != null) -// { -// try -// { -// Object obj = clazz.newInstance(); -// if (obj instanceof SpellEffect) -// { -// SpellEffect eff = (SpellEffect) obj; -// -// eff.modifierState = tag.getInteger("modifier"); -// eff.powerEnhancement = tag.getInteger("power"); -// eff.costEnhancement = tag.getInteger("cost"); -// eff.potencyEnhancement = tag.getInteger("potency"); -// -// return eff; -// } -// } catch (InstantiationException e) -// { -// e.printStackTrace(); -// } catch (IllegalAccessException e) -// { -// e.printStackTrace(); -// } -// } -// } catch (ClassNotFoundException e) -// { -// e.printStackTrace(); -// } -// return null; -// } +// public SpellEffect() +// { +// this.modifierState = SpellModifier.DEFAULT; +// this.powerEnhancement = 0; +// this.costEnhancement = 0; +// this.potencyEnhancement = 0; +// } +// +// public void enhanceEffect(SpellEnhancement enh) +// { +// if (enh != null) +// { +// switch (enh.getState()) +// { +// case SpellEnhancement.POWER: +// this.powerEnhancement++; +// break; +// case SpellEnhancement.EFFICIENCY: +// this.costEnhancement++; +// break; +// case SpellEnhancement.POTENCY: +// this.potencyEnhancement++; +// break; +// } +// } +// } +// +// public void modifyEffect(SpellModifier mod) +// { +// if (mod != null) +// modifierState = mod.getModifier(); +// } +// +// public void modifyParadigm(SpellParadigm parad) //When modifying the paradigm it will instead get the class name +// and ask the registry +// { +// if (parad instanceof SpellParadigmProjectile) +// { +// this.modifyProjectileParadigm((SpellParadigmProjectile) parad); +// } +// if (parad instanceof SpellParadigmSelf) +// { +// this.modifySelfParadigm((SpellParadigmSelf) parad); +// } +// if (parad instanceof SpellParadigmMelee) +// { +// this.modifyMeleeParadigm((SpellParadigmMelee) parad); +// } +// if (parad instanceof SpellParadigmTool) +// { +// this.modifyToolParadigm((SpellParadigmTool) parad); +// } +// } +// +// public void modifyProjectileParadigm(SpellParadigmProjectile parad) +// { +// switch (modifierState) +// { +// case SpellModifier.DEFAULT: +// this.defaultModificationProjectile(parad); +// break; +// case SpellModifier.OFFENSIVE: +// this.offensiveModificationProjectile(parad); +// break; +// case SpellModifier.DEFENSIVE: +// this.defensiveModificationProjectile(parad); +// break; +// case SpellModifier.ENVIRONMENTAL: +// this.environmentalModificationProjectile(parad); +// break; +// } +// } +// +// public abstract void defaultModificationProjectile(SpellParadigmProjectile parad); +// +// public abstract void offensiveModificationProjectile(SpellParadigmProjectile parad); +// +// public abstract void defensiveModificationProjectile(SpellParadigmProjectile parad); +// +// public abstract void environmentalModificationProjectile(SpellParadigmProjectile parad); +// +// public void modifySelfParadigm(SpellParadigmSelf parad) +// { +// switch (modifierState) +// { +// case SpellModifier.DEFAULT: +// this.defaultModificationSelf(parad); +// break; +// case SpellModifier.OFFENSIVE: +// this.offensiveModificationSelf(parad); +// break; +// case SpellModifier.DEFENSIVE: +// this.defensiveModificationSelf(parad); +// break; +// case SpellModifier.ENVIRONMENTAL: +// this.environmentalModificationSelf(parad); +// break; +// } +// } +// +// public abstract void defaultModificationSelf(SpellParadigmSelf parad); +// +// public abstract void offensiveModificationSelf(SpellParadigmSelf parad); +// +// public abstract void defensiveModificationSelf(SpellParadigmSelf parad); +// +// public abstract void environmentalModificationSelf(SpellParadigmSelf parad); +// +// public void modifyMeleeParadigm(SpellParadigmMelee parad) +// { +// switch (modifierState) +// { +// case SpellModifier.DEFAULT: +// this.defaultModificationMelee(parad); +// break; +// case SpellModifier.OFFENSIVE: +// this.offensiveModificationMelee(parad); +// break; +// case SpellModifier.DEFENSIVE: +// this.defensiveModificationMelee(parad); +// break; +// case SpellModifier.ENVIRONMENTAL: +// this.environmentalModificationMelee(parad); +// break; +// } +// } +// +// public abstract void defaultModificationMelee(SpellParadigmMelee parad); +// +// public abstract void offensiveModificationMelee(SpellParadigmMelee parad); +// +// public abstract void defensiveModificationMelee(SpellParadigmMelee parad); +// +// public abstract void environmentalModificationMelee(SpellParadigmMelee parad); +// +// public void modifyToolParadigm(SpellParadigmTool parad) +// { +// switch (modifierState) +// { +// case SpellModifier.DEFAULT: +// this.defaultModificationTool(parad); +// break; +// case SpellModifier.OFFENSIVE: +// this.offensiveModificationTool(parad); +// break; +// case SpellModifier.DEFENSIVE: +// this.defensiveModificationTool(parad); +// break; +// case SpellModifier.ENVIRONMENTAL: +// this.environmentalModificationTool(parad); +// break; +// } +// } +// +// public abstract void defaultModificationTool(SpellParadigmTool parad); +// +// public abstract void offensiveModificationTool(SpellParadigmTool parad); +// +// public abstract void defensiveModificationTool(SpellParadigmTool parad); +// +// public abstract void environmentalModificationTool(SpellParadigmTool parad); +// +// public int getCostForProjectile() +// { +// switch (this.modifierState) +// { +// case SpellModifier.DEFAULT: +// return this.getCostForDefaultProjectile(); +// case SpellModifier.OFFENSIVE: +// return this.getCostForOffenseProjectile(); +// case SpellModifier.DEFENSIVE: +// return this.getCostForDefenseProjectile(); +// case SpellModifier.ENVIRONMENTAL: +// return this.getCostForEnvironmentProjectile(); +// } +// return 0; +// } +// +// protected abstract int getCostForDefaultProjectile(); +// +// protected abstract int getCostForOffenseProjectile(); +// +// protected abstract int getCostForDefenseProjectile(); +// +// protected abstract int getCostForEnvironmentProjectile(); +// +// public int getCostForSelf() +// { +// switch (this.modifierState) +// { +// case SpellModifier.DEFAULT: +// return this.getCostForDefaultSelf(); +// case SpellModifier.OFFENSIVE: +// return this.getCostForOffenseSelf(); +// case SpellModifier.DEFENSIVE: +// return this.getCostForDefenseSelf(); +// case SpellModifier.ENVIRONMENTAL: +// return this.getCostForEnvironmentSelf(); +// } +// return 0; +// } +// +// protected abstract int getCostForDefaultSelf(); +// +// protected abstract int getCostForOffenseSelf(); +// +// protected abstract int getCostForDefenseSelf(); +// +// protected abstract int getCostForEnvironmentSelf(); +// +// public int getCostForMelee() +// { +// switch (this.modifierState) +// { +// case SpellModifier.DEFAULT: +// return this.getCostForDefaultMelee(); +// case SpellModifier.OFFENSIVE: +// return this.getCostForOffenseMelee(); +// case SpellModifier.DEFENSIVE: +// return this.getCostForDefenseMelee(); +// case SpellModifier.ENVIRONMENTAL: +// return this.getCostForEnvironmentMelee(); +// } +// return 0; +// } +// +// protected abstract int getCostForDefaultMelee(); +// +// protected abstract int getCostForOffenseMelee(); +// +// protected abstract int getCostForDefenseMelee(); +// +// protected abstract int getCostForEnvironmentMelee(); +// +// public int getCostForTool() +// { +// switch (this.modifierState) +// { +// case SpellModifier.DEFAULT: +// return this.getCostForDefaultTool(); +// case SpellModifier.OFFENSIVE: +// return this.getCostForOffenseTool(); +// case SpellModifier.DEFENSIVE: +// return this.getCostForDefenseTool(); +// case SpellModifier.ENVIRONMENTAL: +// return this.getCostForEnvironmentTool(); +// } +// return 0; +// } +// +// protected abstract int getCostForDefaultTool(); +// +// protected abstract int getCostForOffenseTool(); +// +// protected abstract int getCostForDefenseTool(); +// +// protected abstract int getCostForEnvironmentTool(); +// +// public int getPowerEnhancements() +// { +// return this.powerEnhancement; +// } +// +// public int getCostEnhancements() +// { +// return this.costEnhancement; +// } +// +// public int getPotencyEnhancements() +// { +// return this.potencyEnhancement; +// } +// +// public NBTTagCompound getTag() +// { +// NBTTagCompound tag = new NBTTagCompound(); +// +// tag.setString("Class", this.getClass().getName()); +// tag.setInteger("modifier", modifierState); +// tag.setInteger("power", powerEnhancement); +// tag.setInteger("cost", costEnhancement); +// tag.setInteger("potency", potencyEnhancement); +// +// return tag; +// } +// +// public static SpellEffect getEffectFromTag(NBTTagCompound tag) +// { +// try +// { +// Class clazz = Class.forName(tag.getString("Class")); +// if (clazz != null) +// { +// try +// { +// Object obj = clazz.newInstance(); +// if (obj instanceof SpellEffect) +// { +// SpellEffect eff = (SpellEffect) obj; +// +// eff.modifierState = tag.getInteger("modifier"); +// eff.powerEnhancement = tag.getInteger("power"); +// eff.costEnhancement = tag.getInteger("cost"); +// eff.potencyEnhancement = tag.getInteger("potency"); +// +// return eff; +// } +// } catch (InstantiationException e) +// { +// e.printStackTrace(); +// } catch (IllegalAccessException e) +// { +// e.printStackTrace(); +// } +// } +// } catch (ClassNotFoundException e) +// { +// e.printStackTrace(); +// } +// return null; +// } // } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffectRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffectRegistry.java index 95b235cd..8d12d0f9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffectRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffectRegistry.java @@ -7,6 +7,7 @@ import java.util.Map; import java.util.Map.Entry; public class SpellEffectRegistry { + public static Map, List> effectRegistry = new HashMap(); public static Map typeRegistry = new HashMap(); public static Map modifierRegistry = new HashMap(); @@ -46,20 +47,15 @@ public class SpellEffectRegistry { * @param paraClass * @param type * @param mod - * @return A copy of the spell effect + * @return A copy of the spell effect */ - public static ComplexSpellEffect getSpellEffect( - Class paraClass, ComplexSpellType type, ComplexSpellModifier mod) { + public static ComplexSpellEffect getSpellEffect(Class paraClass, ComplexSpellType type, + ComplexSpellModifier mod) { return SpellEffectRegistry.getSpellEffect(paraClass, type, mod, 0, 0, 0); } - public static ComplexSpellEffect getSpellEffect( - Class paraClass, - ComplexSpellType type, - ComplexSpellModifier mod, - int power, - int potency, - int cost) { + public static ComplexSpellEffect getSpellEffect(Class paraClass, ComplexSpellType type, + ComplexSpellModifier mod, int power, int potency, int cost) { if (paraClass == null || type == null || mod == null) { return null; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancement.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancement.java index 58f54834..ca2f0665 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancement.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancement.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api.spell; public class SpellEnhancement { + public static final int POWER = 0; public static final int EFFICIENCY = 1; public static final int POTENCY = 2; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementCost.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementCost.java index 79d7e573..0339fe1d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementCost.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementCost.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api.spell; public class SpellEnhancementCost extends SpellEnhancement { + public SpellEnhancementCost() { super(SpellEnhancement.EFFICIENCY); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementPotency.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementPotency.java index 5eebc4d4..a1b31b58 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementPotency.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementPotency.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api.spell; public class SpellEnhancementPotency extends SpellEnhancement { + public SpellEnhancementPotency() { super(SpellEnhancement.POTENCY); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementPower.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementPower.java index f522da12..cd408ca9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementPower.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementPower.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api.spell; public class SpellEnhancementPower extends SpellEnhancement { + public SpellEnhancementPower() { super(SpellEnhancement.POWER); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigm.java index 75b4b199..e6628c9c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigm.java @@ -2,11 +2,13 @@ package WayofTime.alchemicalWizardry.api.spell; import java.util.LinkedList; import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; public abstract class SpellParadigm { + protected List bufferedEffectList = new LinkedList(); public void addBufferedEffect(SpellEffect effect) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmMelee.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmMelee.java index dc0fe2f1..7ea96ebe 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmMelee.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmMelee.java @@ -1,13 +1,16 @@ package WayofTime.alchemicalWizardry.api.spell; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import java.util.ArrayList; import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; + public class SpellParadigmMelee extends SpellParadigm { + private List entityEffectList; private List worldEffectList; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmProjectile.java index bc2cb40c..3237a4e2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmProjectile.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.api.spell; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import java.util.ArrayList; import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; + public class SpellParadigmProjectile extends SpellParadigm { + public DamageSource damageSource; public float damage; public int cost; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmSelf.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmSelf.java index 4890c770..f2a167c6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmSelf.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmSelf.java @@ -1,13 +1,16 @@ package WayofTime.alchemicalWizardry.api.spell; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import java.util.ArrayList; import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; + public class SpellParadigmSelf extends SpellParadigm { + public List selfSpellEffectList; public SpellParadigmSelf() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java index a3cd777c..0294fc5e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java @@ -1,12 +1,11 @@ package WayofTime.alchemicalWizardry.api.spell; -import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map.Entry; import java.util.Set; + import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -17,7 +16,11 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; + public class SpellParadigmTool extends SpellParadigm { + private List leftClickEffectList; private List rightClickEffectList; private List toolUpdateEffectList; @@ -288,16 +291,8 @@ public class SpellParadigmTool extends SpellParadigm { return total; } - public int onBreakBlock( - ItemStack container, - World world, - EntityPlayer player, - Block block, - int meta, - int x, - int y, - int z, - ForgeDirection sideBroken) { + public int onBreakBlock(ItemStack container, World world, EntityPlayer player, Block block, int meta, int x, int y, + int z, ForgeDirection sideBroken) { int total = 0; for (IOnBreakBlock effect : this.breakBlockEffectList) { total += effect.onBlockBroken(container, world, player, block, meta, x, y, z, sideBroken); @@ -317,20 +312,20 @@ public class SpellParadigmTool extends SpellParadigm { return heldList; } - public int digSurroundingArea( - ItemStack container, - World world, - EntityPlayer player, - MovingObjectPosition blockPos, - String usedToolClass, - float blockHardness, - int harvestLvl, - ItemSpellMultiTool itemTool) { + public int digSurroundingArea(ItemStack container, World world, EntityPlayer player, MovingObjectPosition blockPos, + String usedToolClass, float blockHardness, int harvestLvl, ItemSpellMultiTool itemTool) { int cost = 0; for (IDigAreaEffect effect : this.digAreaEffectList) { cost += effect.digSurroundingArea( - container, world, player, blockPos, usedToolClass, blockHardness, harvestLvl, itemTool); + container, + world, + player, + blockPos, + usedToolClass, + blockHardness, + harvestLvl, + itemTool); } return cost; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningHelper.java b/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningHelper.java index c8265564..c15e3cca 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningHelper.java @@ -4,6 +4,7 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.world.World; public abstract class SummoningHelper { + protected String id; public SummoningHelper(String id) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistry.java index a6c53f7d..a7662879 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistry.java @@ -2,27 +2,23 @@ package WayofTime.alchemicalWizardry.api.summoningRegistry; import java.util.ArrayList; import java.util.List; + import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.world.World; public class SummoningRegistry { + public static List summoningList = new ArrayList(); - public static void registerSummon( - SummoningHelper s, - ItemStack[] ring1, - ItemStack[] ring2, - ItemStack[] ring3, - int amountUsed, - int bloodOrbLevel) { + public static void registerSummon(SummoningHelper s, ItemStack[] ring1, ItemStack[] ring2, ItemStack[] ring3, + int amountUsed, int bloodOrbLevel) { summoningList.add(new SummoningRegistryComponent(s, ring1, ring2, ring3, amountUsed, bloodOrbLevel)); } public static boolean isRecipeValid(int bloodOrbLevel, ItemStack[] test1, ItemStack[] test2, ItemStack[] test3) { for (SummoningRegistryComponent src : summoningList) { - if (src.getBloodOrbLevel() <= bloodOrbLevel - && src.compareRing(1, test1) + if (src.getBloodOrbLevel() <= bloodOrbLevel && src.compareRing(1, test1) && src.compareRing(2, test2) && src.compareRing(3, test3)) { return true; @@ -32,11 +28,10 @@ public class SummoningRegistry { return false; } - public static SummoningRegistryComponent getRegistryComponent( - int bloodOrbLevel, ItemStack[] test1, ItemStack[] test2, ItemStack[] test3) { + public static SummoningRegistryComponent getRegistryComponent(int bloodOrbLevel, ItemStack[] test1, + ItemStack[] test2, ItemStack[] test3) { for (SummoningRegistryComponent src : summoningList) { - if (src.getBloodOrbLevel() <= bloodOrbLevel - && src.compareRing(1, test1) + if (src.getBloodOrbLevel() <= bloodOrbLevel && src.compareRing(1, test1) && src.compareRing(2, test2) && src.compareRing(3, test3)) { return src; @@ -46,11 +41,10 @@ public class SummoningRegistry { return null; } - public static EntityLivingBase getEntity( - World worldObj, int bloodOrbLevel, ItemStack[] test1, ItemStack[] test2, ItemStack[] test3) { + public static EntityLivingBase getEntity(World worldObj, int bloodOrbLevel, ItemStack[] test1, ItemStack[] test2, + ItemStack[] test3) { for (SummoningRegistryComponent src : summoningList) { - if (src.getBloodOrbLevel() <= bloodOrbLevel - && src.compareRing(1, test1) + if (src.getBloodOrbLevel() <= bloodOrbLevel && src.compareRing(1, test1) && src.compareRing(2, test2) && src.compareRing(3, test3)) { return src.getEntity(worldObj); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistryComponent.java b/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistryComponent.java index 5066a120..2159232b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistryComponent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistryComponent.java @@ -7,6 +7,7 @@ import net.minecraft.world.World; import net.minecraftforge.oredict.OreDictionary; public class SummoningRegistryComponent { + public ItemStack[] ring1 = new ItemStack[6]; public ItemStack[] ring2 = new ItemStack[6]; public ItemStack[] ring3 = new ItemStack[6]; @@ -14,13 +15,8 @@ public class SummoningRegistryComponent { public int summoningCost; public int bloodOrbLevel; - public SummoningRegistryComponent( - SummoningHelper s, - ItemStack[] newRing1, - ItemStack[] newRing2, - ItemStack[] newRing3, - int amount, - int bloodOrbLevel) { + public SummoningRegistryComponent(SummoningHelper s, ItemStack[] newRing1, ItemStack[] newRing2, + ItemStack[] newRing3, int amount, int bloodOrbLevel) { this.summoningHelper = s; this.ring1 = newRing1; this.ring2 = newRing2; @@ -150,7 +146,7 @@ public class SummoningRegistryComponent { } if ((checkedItemStack.getItemDamage() == recipeItemStack.getItemDamage() - || OreDictionary.WILDCARD_VALUE == recipeItemStack.getItemDamage()) + || OreDictionary.WILDCARD_VALUE == recipeItemStack.getItemDamage()) && checkedItemStack.getItem() == recipeItemStack.getItem()) { test = true; checkList[j] = true; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/tile/IBloodAltar.java b/src/main/java/WayofTime/alchemicalWizardry/api/tile/IBloodAltar.java index 10c3dc89..422500d0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/tile/IBloodAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/tile/IBloodAltar.java @@ -4,6 +4,7 @@ package WayofTime.alchemicalWizardry.api.tile; * Created by Pokefenn. */ public interface IBloodAltar { + int getCapacity(); int getCurrentBlood(); @@ -27,8 +28,9 @@ public interface IBloodAltar { void startCycle(); /** - * Will set the altar to initiate a cooldown cycle after it crafts before starting to craft again, giving the user time to interact with the altar. - * This can only be set while the altar is not active. + * Will set the altar to initiate a cooldown cycle after it crafts before starting to craft again, giving the user + * time to interact with the altar. This can only be set while the altar is not active. + * * @param amount */ void requestPauseAfterCrafting(int amount); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellParadigmTile.java b/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellParadigmTile.java index 59210cc5..19fe212a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellParadigmTile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellParadigmTile.java @@ -5,5 +5,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; public interface ISpellParadigmTile extends ISpellTile { + void castSpell(World world, EntityPlayer entity, ItemStack spellCasterStack); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellTile.java b/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellTile.java index b7b2c642..75bf72e6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellTile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellTile.java @@ -1,9 +1,11 @@ package WayofTime.alchemicalWizardry.api.tile; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; + public interface ISpellTile { + void modifySpellParadigm(SpellParadigm parad); boolean canInputRecieveOutput(ForgeDirection output); diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/ClientEventHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/ClientEventHandler.java index e90cd8cb..1e2ce4d0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/ClientEventHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/ClientEventHandler.java @@ -1,5 +1,11 @@ package WayofTime.alchemicalWizardry.client; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.event.RenderBlockOverlayEvent; +import net.minecraftforge.client.event.sound.SoundEvent; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.client.renderer.RenderHelper; @@ -9,55 +15,51 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.InputEvent; import cpw.mods.fml.common.gameevent.TickEvent.Phase; import cpw.mods.fml.common.gameevent.TickEvent.RenderTickEvent; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.event.RenderBlockOverlayEvent; -import net.minecraftforge.client.event.sound.SoundEvent; public class ClientEventHandler { + private Minecraft mc = FMLClientHandler.instance().getClient(); public static ResourceLocation currentPlayerTexture = null; - // @SideOnly(Side.CLIENT) - // @SubscribeEvent - // public void renderPOVArmour(RenderHandEvent event) - // { - // if (this.mc.thePlayer.worldObj.isRemote && this.mc.gameSettings.thirdPersonView == 0 && + // @SideOnly(Side.CLIENT) + // @SubscribeEvent + // public void renderPOVArmour(RenderHandEvent event) + // { + // if (this.mc.thePlayer.worldObj.isRemote && this.mc.gameSettings.thirdPersonView == 0 && // !this.mc.renderViewEntity.isPlayerSleeping() && !this.mc.gameSettings.hideGUI && // !this.mc.playerController.enableEverythingIsScrewedUpMode()) - // { - // currentPlayerTexture = ((AbstractClientPlayer) mc.thePlayer).getLocationSkin(); + // { + // currentPlayerTexture = ((AbstractClientPlayer) mc.thePlayer).getLocationSkin(); // - // ClientUtils.renderPlayerArmourInPOV(mc.thePlayer, event.partialTicks); - // event.setCanceled(true); - // } - // } + // ClientUtils.renderPlayerArmourInPOV(mc.thePlayer, event.partialTicks); + // event.setCanceled(true); + // } + // } - // @SubscribeEvent(priority = EventPriority.LOWEST) - // public void onPlayerRenderTick(RenderPlayerEvent.Pre event) - // { - // ModelBiped model = ((BoundArmour)ModItems.boundPlate).getArmorModel(event.entityPlayer, new + // @SubscribeEvent(priority = EventPriority.LOWEST) + // public void onPlayerRenderTick(RenderPlayerEvent.Pre event) + // { + // ModelBiped model = ((BoundArmour)ModItems.boundPlate).getArmorModel(event.entityPlayer, new // ItemStack(ModItems.boundPlate), 2); - // String texture = ((BoundArmour)ModItems.boundPlate).getArmorTexture(new ItemStack(ModItems.boundPlate), + // String texture = ((BoundArmour)ModItems.boundPlate).getArmorTexture(new ItemStack(ModItems.boundPlate), // event.entityPlayer, 2, ""); // - // ResourceLocation resourcelocation = new ResourceLocation(texture); - // event.renderer.modelBipedMain.bipedBody.addChild(model.bipedBody); - // Minecraft.getMinecraft().renderEngine.bindTexture(resourcelocation); + // ResourceLocation resourcelocation = new ResourceLocation(texture); + // event.renderer.modelBipedMain.bipedBody.addChild(model.bipedBody); + // Minecraft.getMinecraft().renderEngine.bindTexture(resourcelocation); // - // } + // } @SubscribeEvent public void onKeyInput(InputEvent.KeyInputEvent event) { - // if(KeyBindings.omegaTest.isPressed()) - // { - // System.out.println("ping"); - //// NewPacketHandler.INSTANCE.sendToServer(NewPacketHandler.getKeyboardPressPacket((byte)2)); - // ClientToServerPacketHandler.INSTANCE.sendToServer(new + // if(KeyBindings.omegaTest.isPressed()) + // { + // System.out.println("ping"); + //// NewPacketHandler.INSTANCE.sendToServer(NewPacketHandler.getKeyboardPressPacket((byte)2)); + // ClientToServerPacketHandler.INSTANCE.sendToServer(new // MessageKeyPressed(MessageKeyPressed.Key.OMEGA_ACTIVE)); - // } + // } } @SubscribeEvent @@ -75,9 +77,9 @@ public class ClientEventHandler { @SubscribeEvent public void onOverlayEvent(RenderBlockOverlayEvent event) { if (event.overlayType == RenderBlockOverlayEvent.OverlayType.WATER - && event.player.isPotionActive( - AlchemicalWizardry.customPotionAmphibian.id)) // TODO Placeholder for new potion effect - if (event.isCancelable()) { + && event.player.isPotionActive(AlchemicalWizardry.customPotionAmphibian.id)) // TODO Placeholder for new + // potion effect + if (event.isCancelable()) { event.setCanceled(true); } @@ -93,15 +95,15 @@ public class ClientEventHandler { if (!RenderHelper.onTickInGame(mc)) {} } - // @SubscribeEvent - // public void onRenderLivingPlayerPre(RenderPlayerEvent.Pre event) - // { - // GL11.glDisable(2929); - // } + // @SubscribeEvent + // public void onRenderLivingPlayerPre(RenderPlayerEvent.Pre event) + // { + // GL11.glDisable(2929); + // } // - // @SubscribeEvent - // public void onRenderLivingPlayerPost(RenderPlayerEvent.Post event) - // { - // GL11.glEnable(2929); - // } + // @SubscribeEvent + // public void onRenderLivingPlayerPost(RenderPlayerEvent.Post event) + // { + // GL11.glEnable(2929); + // } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java index e9b26fd1..f4120363 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java @@ -1,5 +1,10 @@ package WayofTime.alchemicalWizardry.client; +import net.minecraft.item.ItemBlock; +import net.minecraft.world.World; +import net.minecraftforge.client.MinecraftForgeClient; +import net.minecraftforge.common.MinecraftForge; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; @@ -97,67 +102,81 @@ import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.FMLCommonHandler; -import net.minecraft.item.ItemBlock; -import net.minecraft.world.World; -import net.minecraftforge.client.MinecraftForgeClient; -import net.minecraftforge.common.MinecraftForge; public class ClientProxy extends CommonProxy { + public static int renderPass; @Override public void registerPostSideObjects() { - // BUEntries entries = new BUEntries(); - // entries.postInit(); + // BUEntries entries = new BUEntries(); + // entries.postInit(); } @Override public void registerRenderers() { + RenderingRegistry + .registerEntityRenderingHandler(EnergyBlastProjectile.class, new RenderEnergyBlastProjectile()); RenderingRegistry.registerEntityRenderingHandler( - EnergyBlastProjectile.class, new RenderEnergyBlastProjectile()); - RenderingRegistry.registerEntityRenderingHandler( - EntityEnergyBazookaMainProjectile.class, new RenderEnergyBazookaMainProjectile()); - RenderingRegistry.registerEntityRenderingHandler( - EntitySpellProjectile.class, new RenderEnergyBlastProjectile()); + EntityEnergyBazookaMainProjectile.class, + new RenderEnergyBazookaMainProjectile()); + RenderingRegistry + .registerEntityRenderingHandler(EntitySpellProjectile.class, new RenderEnergyBlastProjectile()); RenderingRegistry.registerEntityRenderingHandler(EntityParticleBeam.class, new RenderEnergyBlastProjectile()); RenderingRegistry.registerEntityRenderingHandler(EntityMeteor.class, new RenderMeteor()); RenderingRegistry.registerEntityRenderingHandler( - EntityFallenAngel.class, new RenderFallenAngel(new ModelFallenAngel(), 0.5F)); + EntityFallenAngel.class, + new RenderFallenAngel(new ModelFallenAngel(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler( - EntityLowerGuardian.class, new RenderLowerGuardian(new ModelLowerGuardian(), 0.5F)); + EntityLowerGuardian.class, + new RenderLowerGuardian(new ModelLowerGuardian(), 0.5F)); + RenderingRegistry + .registerEntityRenderingHandler(EntityBileDemon.class, new RenderBileDemon(new ModelBileDemon(), 1.5F)); RenderingRegistry.registerEntityRenderingHandler( - EntityBileDemon.class, new RenderBileDemon(new ModelBileDemon(), 1.5F)); + EntityWingedFireDemon.class, + new RenderWingedFireDemon(new ModelWingedFireDemon(), 1.0F)); RenderingRegistry.registerEntityRenderingHandler( - EntityWingedFireDemon.class, new RenderWingedFireDemon(new ModelWingedFireDemon(), 1.0F)); + EntitySmallEarthGolem.class, + new RenderSmallEarthGolem(new ModelSmallEarthGolem(), 0.5F)); + RenderingRegistry + .registerEntityRenderingHandler(EntityIceDemon.class, new RenderIceDemon(new ModelIceDemon(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler( - EntitySmallEarthGolem.class, new RenderSmallEarthGolem(new ModelSmallEarthGolem(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler( - EntityIceDemon.class, new RenderIceDemon(new ModelIceDemon(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler( - EntityBoulderFist.class, new RenderBoulderFist(new ModelBoulderFist(), 0.5F)); + EntityBoulderFist.class, + new RenderBoulderFist(new ModelBoulderFist(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityShade.class, new RenderShade(new ModelShade(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler( - EntityAirElemental.class, new RenderElemental(new ModelElemental(), 0.5F)); + EntityAirElemental.class, + new RenderElemental(new ModelElemental(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler( - EntityWaterElemental.class, new RenderElemental(new ModelElemental(), 0.5F)); + EntityWaterElemental.class, + new RenderElemental(new ModelElemental(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler( - EntityEarthElemental.class, new RenderElemental(new ModelElemental(), 0.5F)); + EntityEarthElemental.class, + new RenderElemental(new ModelElemental(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler( - EntityFireElemental.class, new RenderElemental(new ModelElemental(), 0.5F)); + EntityFireElemental.class, + new RenderElemental(new ModelElemental(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler( - EntityShadeElemental.class, new RenderElemental(new ModelElemental(), 0.5F)); + EntityShadeElemental.class, + new RenderElemental(new ModelElemental(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler( - EntityHolyElemental.class, new RenderElemental(new ModelElemental(), 0.5F)); + EntityHolyElemental.class, + new RenderElemental(new ModelElemental(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler( - EntityMinorDemonGrunt.class, new RenderMinorDemonGrunt(new ModelMinorDemonGrunt(), 0.5F)); + EntityMinorDemonGrunt.class, + new RenderMinorDemonGrunt(new ModelMinorDemonGrunt(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler( - EntityMinorDemonGruntFire.class, new RenderMinorDemonGrunt(new ModelMinorDemonGrunt(), 0.5F)); + EntityMinorDemonGruntFire.class, + new RenderMinorDemonGrunt(new ModelMinorDemonGrunt(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler( - EntityMinorDemonGruntIce.class, new RenderMinorDemonGrunt(new ModelMinorDemonGrunt(), 0.5F)); + EntityMinorDemonGruntIce.class, + new RenderMinorDemonGrunt(new ModelMinorDemonGrunt(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler( - EntityMinorDemonGruntWind.class, new RenderMinorDemonGrunt(new ModelMinorDemonGrunt(), 0.5F)); + EntityMinorDemonGruntWind.class, + new RenderMinorDemonGrunt(new ModelMinorDemonGrunt(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler( - EntityMinorDemonGruntEarth.class, new RenderMinorDemonGrunt(new ModelMinorDemonGrunt(), 0.5F)); + EntityMinorDemonGruntEarth.class, + new RenderMinorDemonGrunt(new ModelMinorDemonGrunt(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler( EntityMinorDemonGruntGuardian.class, new RenderMinorDemonGruntGuardian(new ModelMinorDemonGruntGuardian(), 0.5F)); @@ -193,21 +212,26 @@ public class ClientProxy extends CommonProxy { ClientRegistry.bindTileEntitySpecialRenderer(TEBellJar.class, new RenderCrystalBelljar()); // Item Renderer stuff + MinecraftForgeClient + .registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockConduit), new TEConduitItemRenderer()); MinecraftForgeClient.registerItemRenderer( - ItemBlock.getItemFromBlock(ModBlocks.blockConduit), new TEConduitItemRenderer()); + ItemBlock.getItemFromBlock(ModBlocks.blockSpellEffect), + new TESpellEffectBlockItemRenderer()); MinecraftForgeClient.registerItemRenderer( - ItemBlock.getItemFromBlock(ModBlocks.blockSpellEffect), new TESpellEffectBlockItemRenderer()); + ItemBlock.getItemFromBlock(ModBlocks.blockSpellEnhancement), + new TESpellEnhancementBlockItemRenderer()); MinecraftForgeClient.registerItemRenderer( - ItemBlock.getItemFromBlock(ModBlocks.blockSpellEnhancement), new TESpellEnhancementBlockItemRenderer()); + ItemBlock.getItemFromBlock(ModBlocks.blockSpellParadigm), + new TESpellParadigmBlockItemRenderer()); MinecraftForgeClient.registerItemRenderer( - ItemBlock.getItemFromBlock(ModBlocks.blockSpellParadigm), new TESpellParadigmBlockItemRenderer()); - MinecraftForgeClient.registerItemRenderer( - ItemBlock.getItemFromBlock(ModBlocks.blockSpellModifier), new TESpellModifierBlockItemRenderer()); + ItemBlock.getItemFromBlock(ModBlocks.blockSpellModifier), + new TESpellModifierBlockItemRenderer()); MinecraftForgeClient.registerItemRenderer( ItemBlock.getItemFromBlock(ModBlocks.blockAlchemicCalcinator), new TEAlchemicalCalcinatorItemRenderer()); MinecraftForgeClient.registerItemRenderer( - ItemBlock.getItemFromBlock(ModBlocks.blockCrystalBelljar), new TEBellJarItemRenderer()); + ItemBlock.getItemFromBlock(ModBlocks.blockCrystalBelljar), + new TEBellJarItemRenderer()); } @Override @@ -217,8 +241,8 @@ public class ClientProxy extends CommonProxy { @Override public void InitRendering() { - MinecraftForgeClient.registerItemRenderer( - ItemBlock.getItemFromBlock(ModBlocks.blockAltar), new TEAltarItemRenderer()); + MinecraftForgeClient + .registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockAltar), new TEAltarItemRenderer()); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/ClientUtils.java b/src/main/java/WayofTime/alchemicalWizardry/client/ClientUtils.java index cd0b9522..874a47bd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/ClientUtils.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/ClientUtils.java @@ -23,10 +23,12 @@ import net.minecraft.util.ResourceLocation; import net.minecraft.world.storage.MapData; import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.client.MinecraftForgeClient; + import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; public class ClientUtils { + public static Minecraft mc = Minecraft.getMinecraft(); private static final ResourceLocation RES_MAP_BACKGROUND = new ResourceLocation("textures/map/map_background.png"); @@ -38,18 +40,16 @@ public class ClientUtils { EntityClientPlayerMP entityclientplayermp = mc.thePlayer; float f2 = entityclientplayermp.prevRotationPitch + (entityclientplayermp.rotationPitch - entityclientplayermp.prevRotationPitch) * partialTickTime; - // GL11.glPushMatrix(); + // GL11.glPushMatrix(); GL11.glRotatef( - 180 - - (entityclientplayermp.prevRotationYaw - + (entityclientplayermp.rotationYaw - entityclientplayermp.prevRotationYaw) - * partialTickTime), + 180 - (entityclientplayermp.prevRotationYaw + + (entityclientplayermp.rotationYaw - entityclientplayermp.prevRotationYaw) * partialTickTime), 0.0F, 1.0F, 0.0F); GL11.glRotatef(-f2, 1.0F, 0.0F, 0.0F); RenderHelper.enableStandardItemLighting(); - // GL11.glPopMatrix(); + // GL11.glPopMatrix(); EntityPlayerSP entityplayersp = (EntityPlayerSP) entityclientplayermp; float f3 = entityplayersp.prevRenderArmPitch + (entityplayersp.renderArmPitch - entityplayersp.prevRenderArmPitch) * partialTickTime; @@ -101,7 +101,9 @@ public class ClientUtils { f6 = MathHelper.sin(f5 * (float) Math.PI); f7 = MathHelper.sin(MathHelper.sqrt_float(f5) * (float) Math.PI); GL11.glTranslatef( - -f7 * 0.4F, MathHelper.sin(MathHelper.sqrt_float(f5) * (float) Math.PI * 2.0F) * 0.2F, -f6 * 0.2F); + -f7 * 0.4F, + MathHelper.sin(MathHelper.sqrt_float(f5) * (float) Math.PI * 2.0F) * 0.2F, + -f6 * 0.2F); f5 = 1.0F - f2 / 45.0F + 0.1F; if (f5 < 0.0F) { @@ -263,20 +265,20 @@ public class ClientUtils { } if (itemstack.getItem().requiresMultipleRenderPasses()) { - RenderManager.instance.itemRenderer.renderItem( - entityclientplayermp, itemstack, 0, EQUIPPED_FIRST_PERSON); + RenderManager.instance.itemRenderer + .renderItem(entityclientplayermp, itemstack, 0, EQUIPPED_FIRST_PERSON); for (int x = 1; x < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); x++) { int k1 = itemstack.getItem().getColorFromItemStack(itemstack, x); f10 = (float) (k1 >> 16 & 255) / 255.0F; f11 = (float) (k1 >> 8 & 255) / 255.0F; f12 = (float) (k1 & 255) / 255.0F; GL11.glColor4f(1.0F * f10, 1.0F * f11, 1.0F * f12, 1.0F); - RenderManager.instance.itemRenderer.renderItem( - entityclientplayermp, itemstack, x, EQUIPPED_FIRST_PERSON); + RenderManager.instance.itemRenderer + .renderItem(entityclientplayermp, itemstack, x, EQUIPPED_FIRST_PERSON); } } else { - RenderManager.instance.itemRenderer.renderItem( - entityclientplayermp, itemstack, 0, EQUIPPED_FIRST_PERSON); + RenderManager.instance.itemRenderer + .renderItem(entityclientplayermp, itemstack, 0, EQUIPPED_FIRST_PERSON); } GL11.glPopMatrix(); @@ -287,7 +289,9 @@ public class ClientUtils { f6 = MathHelper.sin(f5 * (float) Math.PI); f7 = MathHelper.sin(MathHelper.sqrt_float(f5) * (float) Math.PI); GL11.glTranslatef( - -f7 * 0.3F, MathHelper.sin(MathHelper.sqrt_float(f5) * (float) Math.PI * 2.0F) * 0.4F, -f6 * 0.4F); + -f7 * 0.3F, + MathHelper.sin(MathHelper.sqrt_float(f5) * (float) Math.PI * 2.0F) * 0.4F, + -f6 * 0.4F); GL11.glTranslatef(0.8F * f13, -0.75F * f13 - (1.0F - f1) * 0.6F, -0.9F * f13); GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); GL11.glEnable(GL12.GL_RESCALE_NORMAL); diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/KeyBindings.java b/src/main/java/WayofTime/alchemicalWizardry/client/KeyBindings.java index 1953d640..acdac02d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/KeyBindings.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/KeyBindings.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.client; public class KeyBindings { - // public static KeyBinding omegaTest; + // public static KeyBinding omegaTest; public static void init() { - // omegaTest = new KeyBinding("key.ping", Keyboard.KEY_O, "key.categories.alchemicalwizardry"); + // omegaTest = new KeyBinding("key.ping", Keyboard.KEY_O, "key.categories.alchemicalwizardry"); // - // ClientRegistry.registerKeyBinding(omegaTest); + // ClientRegistry.registerKeyBinding(omegaTest); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/POVArmourModelWrapper.java b/src/main/java/WayofTime/alchemicalWizardry/client/POVArmourModelWrapper.java index 749cd723..05f4a2d6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/POVArmourModelWrapper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/POVArmourModelWrapper.java @@ -1,19 +1,22 @@ package WayofTime.alchemicalWizardry.client; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + @SideOnly(Side.CLIENT) public class POVArmourModelWrapper extends ModelRenderer { + private final ModelRenderer armModel; private final ResourceLocation resource; @@ -23,17 +26,17 @@ public class POVArmourModelWrapper extends ModelRenderer { ModelBiped bipedModel = ((BoundArmour) ModItems.boundPlateFire) .getArmorModel(Minecraft.getMinecraft().thePlayer, plateStack, 1); armModel = bipedModel.bipedRightArm; - resource = new ResourceLocation(((BoundArmour) ModItems.boundPlateFire) - .getArmorTexture(plateStack, Minecraft.getMinecraft().thePlayer, 1, "POV")); - addBox( - 0, 0, 0, 0, 0, - 0); // Adds in a blank box as it's required in certain cases such as rendering arrows in entities + resource = new ResourceLocation( + ((BoundArmour) ModItems.boundPlateFire) + .getArmorTexture(plateStack, Minecraft.getMinecraft().thePlayer, 1, "POV")); + addBox(0, 0, 0, 0, 0, 0); // Adds in a blank box as it's required in certain cases such as rendering arrows in + // entities } @Override public void render(float partialTicks) { GL11.glPushMatrix(); - // GL11.glTranslated(0.3, -.1, 0); + // GL11.glTranslated(0.3, -.1, 0); Minecraft.getMinecraft().renderEngine.bindTexture(resource); armModel.rotateAngleX = this.rotateAngleX; armModel.rotateAngleY = this.rotateAngleY; diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java index 730847d4..9c807ddc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java @@ -2,14 +2,16 @@ package WayofTime.alchemicalWizardry.client.gui; import static WayofTime.alchemicalWizardry.BloodMagicConfiguration.config; -import cpw.mods.fml.client.config.GuiConfig; -import cpw.mods.fml.client.config.IConfigElement; import java.util.ArrayList; import java.util.List; + import net.minecraft.client.gui.GuiScreen; import net.minecraftforge.common.config.ConfigCategory; import net.minecraftforge.common.config.ConfigElement; +import cpw.mods.fml.client.config.GuiConfig; +import cpw.mods.fml.client.config.IConfigElement; + public class ConfigGui extends GuiConfig { public ConfigGui(GuiScreen parentScreen) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java index da955883..13b4a71b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.client.gui; -import cpw.mods.fml.client.IModGuiFactory; import java.util.Set; + import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; +import cpw.mods.fml.client.IModGuiFactory; + public class ConfigGuiFactory implements IModGuiFactory { @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/IMCForNEI.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/IMCForNEI.java index 26e3d487..38c6f60a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/IMCForNEI.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/IMCForNEI.java @@ -1,9 +1,11 @@ package WayofTime.alchemicalWizardry.client.nei; -import cpw.mods.fml.common.event.FMLInterModComms; import net.minecraft.nbt.NBTTagCompound; +import cpw.mods.fml.common.event.FMLInterModComms; + public class IMCForNEI { + public static void IMCSender() { sendHandler("alchemicalwizardry.meteor", "AWWayofTime:masterStone", 130); sendCatalyst("alchemicalwizardry.meteor", "AWWayofTime:masterStone"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java index 6ebf7d3e..f333c31e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java @@ -2,6 +2,17 @@ package WayofTime.alchemicalWizardry.client.nei; import static WayofTime.alchemicalWizardry.client.nei.NEIConfig.getBloodOrbs; +import java.awt.Rectangle; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; + import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; @@ -9,22 +20,16 @@ import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiWritingTable; import codechicken.nei.NEIServerUtils; import codechicken.nei.PositionedStack; import codechicken.nei.recipe.TemplateRecipeHandler; -import java.awt.Rectangle; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; /** * NEI Alchemy Recipe Handler by joshie * */ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler { + public class CachedAlchemyRecipe extends CachedRecipe { + public class BloodOrbs { + public PositionedStack stack; public BloodOrbs(ItemStack orb) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java index 2c22f449..a9085092 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java @@ -1,5 +1,14 @@ package WayofTime.alchemicalWizardry.client.nei; +import java.awt.Point; +import java.awt.Rectangle; +import java.util.List; + +import net.minecraft.client.Minecraft; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; + import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; import codechicken.lib.gui.GuiDraw; @@ -7,26 +16,21 @@ import codechicken.nei.NEIServerUtils; import codechicken.nei.PositionedStack; import codechicken.nei.recipe.GuiRecipe; import codechicken.nei.recipe.TemplateRecipeHandler; -import java.awt.Point; -import java.awt.Rectangle; -import java.util.List; -import net.minecraft.client.Minecraft; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; /** * NEI Altar Recipe Handler by joshie * */ public class NEIAltarRecipeHandler extends TemplateRecipeHandler { + public class CachedAltarRecipe extends CachedRecipe { + PositionedStack input; - // PositionedStack inputItems; + // PositionedStack inputItems; PositionedStack output; int tier, lp_amount, consumption, drain; public CachedAltarRecipe(AltarRecipe recipe) { - // inputItems = new PositionedStack(recipe.input, 38, 2, false); + // inputItems = new PositionedStack(recipe.input, 38, 2, false); input = new PositionedStack(recipe.requiredItem, 38, 2, false); output = new PositionedStack(recipe.result, 132, 32, false); tier = recipe.minTier; @@ -78,10 +82,11 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler { @Override public void drawExtras(int id) { CachedAltarRecipe recipe = (CachedAltarRecipe) arecipes.get(id); - Minecraft.getMinecraft() - .fontRenderer - .drawString( - "\u00a77" + StatCollector.translateToLocal("bm.string.tier") + ": " + recipe.tier, 78, 5, 0); + Minecraft.getMinecraft().fontRenderer.drawString( + "\u00a77" + StatCollector.translateToLocal("bm.string.tier") + ": " + recipe.tier, + 78, + 5, + 0); Minecraft.getMinecraft().fontRenderer.drawString("\u00a77" + "LP: " + recipe.lp_amount, 78, 15, 0); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBindingRitualHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBindingRitualHandler.java index 4f818f7c..694977b7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBindingRitualHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBindingRitualHandler.java @@ -1,19 +1,23 @@ package WayofTime.alchemicalWizardry.client.nei; +import java.awt.Rectangle; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; + import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe; import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; import codechicken.nei.NEIServerUtils; import codechicken.nei.PositionedStack; import codechicken.nei.recipe.TemplateRecipeHandler; -import java.awt.Rectangle; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; /** * Binding Ritual Handler by Arcaratus */ public class NEIBindingRitualHandler extends TemplateRecipeHandler { + public class CachedBindingRecipe extends CachedRecipe { + PositionedStack input, output; public CachedBindingRecipe(BindingRecipe recipe) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java index ea02c69c..befc6a48 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java @@ -2,25 +2,29 @@ package WayofTime.alchemicalWizardry.client.nei; import static WayofTime.alchemicalWizardry.client.nei.NEIConfig.getBloodOrbs; -import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import codechicken.nei.NEIServerUtils; -import codechicken.nei.PositionedStack; -import codechicken.nei.recipe.ShapedRecipeHandler; import java.awt.Rectangle; import java.util.ArrayList; import java.util.List; + import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.IRecipe; import net.minecraft.util.StatCollector; +import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; +import codechicken.nei.NEIServerUtils; +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.ShapedRecipeHandler; + /** * NEI Blood Orb Shaped Recipe Handler by joshie * */ public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler { + public class CachedBloodOrbRecipe extends CachedShapedRecipe { + public CachedBloodOrbRecipe(int width, int height, Object[] items, ItemStack out) { super(width, height, items, out); } @@ -33,8 +37,11 @@ public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler { Object o = items[y * width + x]; if (o instanceof ItemStack) { - PositionedStack stack = - new PositionedStack(items[y * width + x], 25 + x * 18, 6 + y * 18, false); + PositionedStack stack = new PositionedStack( + items[y * width + x], + 25 + x * 18, + 6 + y * 18, + false); stack.setMaxSize(1); ingredients.add(stack); } else if (o instanceof Integer) { @@ -119,11 +126,10 @@ public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler { } Object[] items = recipe.getInput(); - for (Object item : items) - if (item instanceof List && ((List) item).isEmpty()) // ore - // handler, - // no ores - return null; + for (Object item : items) if (item instanceof List && ((List) item).isEmpty()) // ore + // handler, + // no ores + return null; return new CachedBloodOrbRecipe(width, height, items, recipe.getRecipeOutput()); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java index f413194f..59d898ab 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java @@ -1,24 +1,28 @@ package WayofTime.alchemicalWizardry.client.nei; -import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import codechicken.nei.NEIServerUtils; -import codechicken.nei.PositionedStack; -import codechicken.nei.recipe.ShapelessRecipeHandler; import java.awt.Rectangle; import java.util.ArrayList; import java.util.List; + import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.IRecipe; import net.minecraft.util.StatCollector; +import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; +import codechicken.nei.NEIServerUtils; +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.ShapelessRecipeHandler; + /** * NEI Blood Orb Shapeless Recipe Handler by joshie * */ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler { + public class CachedBloodOrbRecipe extends CachedShapelessRecipe { + public CachedBloodOrbRecipe(ArrayList items, ItemStack recipeOutput) { super(items, recipeOutput); } @@ -30,7 +34,9 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler { Object o = items.get(ingred); if (o instanceof ItemStack) { PositionedStack stack = new PositionedStack( - items.get(ingred), 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18); + items.get(ingred), + 25 + stackorder[ingred][0] * 18, + 6 + stackorder[ingred][1] * 18); stack.setMaxSize(1); ingredients.add(stack); } else if (o instanceof Integer) { @@ -41,13 +47,17 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler { } } - PositionedStack stack = - new PositionedStack(orbs, 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18); + PositionedStack stack = new PositionedStack( + orbs, + 25 + stackorder[ingred][0] * 18, + 6 + stackorder[ingred][1] * 18); stack.setMaxSize(1); ingredients.add(stack); } else if (o instanceof List) { - PositionedStack stack = - new PositionedStack(o, 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18); + PositionedStack stack = new PositionedStack( + o, + 25 + stackorder[ingred][0] * 18, + 6 + stackorder[ingred][1] * 18); stack.setMaxSize(1); ingredients.add(stack); } @@ -112,8 +122,7 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler { public CachedBloodOrbRecipe forgeShapelessRecipe(ShapelessBloodOrbRecipe recipe) { ArrayList items = recipe.getInput(); - for (Object item : items) - if (item instanceof List && ((List) item).isEmpty()) // ore handler, no ores + for (Object item : items) if (item instanceof List && ((List) item).isEmpty()) // ore handler, no ores return null; return new CachedBloodOrbRecipe(items, recipe.getRecipeOutput()); diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java index 97ca5fad..a9947596 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.client.nei; +import java.util.ArrayList; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; import codechicken.nei.ItemList; import codechicken.nei.api.API; import codechicken.nei.api.IConfigureNEI; -import java.util.ArrayList; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; public class NEIConfig implements IConfigureNEI { + private static ArrayList bloodOrbs = null; public static ArrayList getBloodOrbs() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java index beca43ed..48bced4c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java @@ -1,5 +1,21 @@ package WayofTime.alchemicalWizardry.client.nei; +import java.awt.*; +import java.text.DecimalFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; +import java.util.List; +import java.util.stream.Collectors; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.resources.I18n; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; + +import org.lwjgl.opengl.GL11; + import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigmComponent; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; @@ -8,21 +24,9 @@ import codechicken.nei.NEIServerUtils; import codechicken.nei.PositionedStack; import codechicken.nei.recipe.GuiRecipe; import codechicken.nei.recipe.TemplateRecipeHandler; -import java.awt.*; -import java.text.DecimalFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Comparator; -import java.util.List; -import java.util.stream.Collectors; -import net.minecraft.client.Minecraft; -import net.minecraft.client.resources.I18n; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; public class NEIMeteorRecipeHandler extends TemplateRecipeHandler { + public class CachedMeteorRecipe extends CachedRecipe { private final List input = new ArrayList<>(); @@ -155,11 +159,9 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler { CachedMeteorRecipe meteorRecipe = (CachedMeteorRecipe) this.arecipes.get(recipe); int cost = meteorRecipe.getCost(); int radius = meteorRecipe.getRadius(); - Minecraft.getMinecraft() - .fontRenderer + Minecraft.getMinecraft().fontRenderer .drawString(I18n.format("nei.recipe.meteor.cost", String.format("%,d", cost)), 2, 168, 0x000000); - Minecraft.getMinecraft() - .fontRenderer + Minecraft.getMinecraft().fontRenderer .drawString(I18n.format("nei.recipe.meteor.radius", radius), 2, 179, 0x000000); } @@ -198,8 +200,7 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler { } private List getSortedMeteors() { - return MeteorRegistry.paradigmList.stream() - .sorted(Comparator.comparing(m -> m.cost)) + return MeteorRegistry.paradigmList.stream().sorted(Comparator.comparing(m -> m.cost)) .collect(Collectors.toList()); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/TooltipStack.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/TooltipStack.java index 992cd744..a0771528 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/TooltipStack.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/TooltipStack.java @@ -1,8 +1,9 @@ package WayofTime.alchemicalWizardry.client.nei; -import codechicken.nei.PositionedStack; import java.util.List; +import codechicken.nei.PositionedStack; + public class TooltipStack extends PositionedStack { private final List tooltips; diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/ColourThreshold.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/ColourThreshold.java index 3fcf6b22..99bf5f2b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/ColourThreshold.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/ColourThreshold.java @@ -7,6 +7,7 @@ import java.util.List; * https://github.com/bspkrs/bspkrsCore/blob/master/src/main/java/bspkrs/client/util/ColorThreshold.java */ public class ColourThreshold implements Comparable { + public int threshold; public String colorCode; @@ -28,8 +29,8 @@ public class ColourThreshold implements Comparable { } /** - * Returns the colorCode attached to the first threshold in the list that is - * greater than or equal to the value. Expects that the list has been sorted by threshold ascending. + * Returns the colorCode attached to the first threshold in the list that is greater than or equal to the value. + * Expects that the list has been sorted by threshold ascending. */ public static String getColorCode(List colorList, int value) { for (ColourThreshold ct : colorList) if (value <= ct.threshold) return ct.colorCode; diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDElement.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDElement.java index 2d6b48e2..5855afcf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDElement.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDElement.java @@ -1,13 +1,16 @@ package WayofTime.alchemicalWizardry.client.renderer; -import WayofTime.alchemicalWizardry.BloodMagicConfiguration; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.item.ItemStack; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.BloodMagicConfiguration; + public class HUDElement { + public final ItemStack itemStack; public final int iconW; public final int iconH; @@ -49,8 +52,7 @@ public class HUDElement { } private void initSize() { - elementH = enableItemName - ? Math.max(Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT * 2, iconH) + elementH = enableItemName ? Math.max(Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT * 2, iconH) : Math.max(mc.fontRenderer.FONT_HEIGHT, iconH); if (itemStack != null) { @@ -69,24 +71,18 @@ public class HUDElement { boolean thresholdPercent = true; if (showSpecialValue) { - itemDamage = "\247" - + ColourThreshold.getColorCode( - BloodMagicConfiguration.colorList, - (thresholdPercent ? damage * 100 / maxDamage : damage)) - + this.value; - } else if (showValue) - itemDamage = "\247" - + ColourThreshold.getColorCode( - BloodMagicConfiguration.colorList, - (thresholdPercent ? damage * 100 / maxDamage : damage)) - + damage + (showMaxDamage ? "/" + maxDamage : ""); - else if (showPercent) - itemDamage = "\247" - + ColourThreshold.getColorCode( - BloodMagicConfiguration.colorList, - (thresholdPercent ? damage * 100 / maxDamage : damage)) - + (damage * 100 / maxDamage) - + "%"; + itemDamage = "\247" + ColourThreshold.getColorCode( + BloodMagicConfiguration.colorList, + (thresholdPercent ? damage * 100 / maxDamage : damage)) + this.value; + } else if (showValue) itemDamage = "\247" + + ColourThreshold.getColorCode( + BloodMagicConfiguration.colorList, + (thresholdPercent ? damage * 100 / maxDamage : damage)) + + damage + + (showMaxDamage ? "/" + maxDamage : ""); + else if (showPercent) itemDamage = "\247" + ColourThreshold.getColorCode( + BloodMagicConfiguration.colorList, + (thresholdPercent ? damage * 100 / maxDamage : damage)) + (damage * 100 / maxDamage) + "%"; } itemDamageW = mc.fontRenderer.getStringWidth(HUDUtils.stripCtrl(itemDamage)); @@ -94,8 +90,7 @@ public class HUDElement { if (enableItemName) { itemName = itemStack.getDisplayName(); - elementW = padW - + iconW + elementW = padW + iconW + padW + Math.max(mc.fontRenderer.getStringWidth(HUDUtils.stripCtrl(itemName)), itemDamageW); } @@ -115,16 +110,25 @@ public class HUDElement { boolean toRight = true; if (toRight) { itemRenderer.renderItemAndEffectIntoGUI( - mc.fontRenderer, mc.getTextureManager(), itemStack, x - (iconW + padW), y); + mc.fontRenderer, + mc.getTextureManager(), + itemStack, + x - (iconW + padW), + y); HUDUtils.renderItemOverlayIntoGUI( - mc.fontRenderer, itemStack, x - (iconW + padW), y, showDamageOverlay, showItemCount); + mc.fontRenderer, + itemStack, + x - (iconW + padW), + y, + showDamageOverlay, + showItemCount); RenderHelper.disableStandardItemLighting(); GL11.glDisable(32826 /* GL_RESCALE_NORMAL_EXT */); GL11.glDisable(GL11.GL_BLEND); - mc.fontRenderer.drawStringWithShadow( - itemName + "\247r", x - (padW + iconW + padW) - itemNameW, y, 0xffffff); + mc.fontRenderer + .drawStringWithShadow(itemName + "\247r", x - (padW + iconW + padW) - itemNameW, y, 0xffffff); mc.fontRenderer.drawStringWithShadow( itemDamage + "\247r", x - (padW + iconW + padW) - itemDamageW, diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDUtils.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDUtils.java index 8abae7ed..112c4b10 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDUtils.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDUtils.java @@ -9,6 +9,7 @@ import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; /** @@ -16,20 +17,19 @@ import org.lwjgl.opengl.GL11; * https://github.com/bspkrs/bspkrsCore/blob/master/src/main/java/bspkrs/client/util/HUDUtils.java */ public final class HUDUtils { - private static int[] colorCodes = new int[] { - 0, 170, 43520, 43690, 11141120, 11141290, 16755200, 11184810, 5592405, 5592575, 5635925, 5636095, 16733525, - 16733695, 16777045, 16777215, 0, 42, 10752, 10794, 2752512, 2752554, 2763264, 2763306, 1381653, 1381695, - 1392405, 1392447, 4134165, 4134207, 4144917, 4144959 - }; + + private static int[] colorCodes = new int[] { 0, 170, 43520, 43690, 11141120, 11141290, 16755200, 11184810, 5592405, + 5592575, 5635925, 5636095, 16733525, 16733695, 16777045, 16777215, 0, 42, 10752, 10794, 2752512, 2752554, + 2763264, 2763306, 1381653, 1381695, 1392405, 1392447, 4134165, 4134207, 4144917, 4144959 }; public static int getColorCode(char c, boolean isLighter) { return colorCodes[isLighter ? "0123456789abcdef".indexOf(c) : "0123456789abcdef".indexOf(c) + 16]; } /** - * Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with continuous borders - * and filler. It is assumed that the desired texture ResourceLocation object has been bound using - * Minecraft.getMinecraft().getTextureManager().bindTexture(resourceLocation). + * Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with + * continuous borders and filler. It is assumed that the desired texture ResourceLocation object has been bound + * using Minecraft.getMinecraft().getTextureManager().bindTexture(resourceLocation). * * @param x x axis offset * @param y y axis offset @@ -42,17 +42,8 @@ public final class HUDUtils { * @param borderSize the size of the box's borders * @param zLevel the zLevel to draw at */ - public static void drawContinuousTexturedBox( - int x, - int y, - int u, - int v, - int width, - int height, - int textureWidth, - int textureHeight, - int borderSize, - float zLevel) { + public static void drawContinuousTexturedBox(int x, int y, int u, int v, int width, int height, int textureWidth, + int textureHeight, int borderSize, float zLevel) { drawContinuousTexturedBox( x, y, @@ -70,8 +61,8 @@ public final class HUDUtils { } /** - * Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with continuous borders - * and filler. The provided ResourceLocation object will be bound using + * Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with + * continuous borders and filler. The provided ResourceLocation object will be bound using * Minecraft.getMinecraft().getTextureManager().bindTexture(resourceLocation). * * @param res the ResourceLocation object that contains the desired image @@ -86,18 +77,8 @@ public final class HUDUtils { * @param borderSize the size of the box's borders * @param zLevel the zLevel to draw at */ - public static void drawContinuousTexturedBox( - ResourceLocation res, - int x, - int y, - int u, - int v, - int width, - int height, - int textureWidth, - int textureHeight, - int borderSize, - float zLevel) { + public static void drawContinuousTexturedBox(ResourceLocation res, int x, int y, int u, int v, int width, + int height, int textureWidth, int textureHeight, int borderSize, float zLevel) { drawContinuousTexturedBox( res, x, @@ -116,8 +97,8 @@ public final class HUDUtils { } /** - * Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with continuous borders - * and filler. The provided ResourceLocation object will be bound using + * Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with + * continuous borders and filler. The provided ResourceLocation object will be bound using * Minecraft.getMinecraft().getTextureManager().bindTexture(resourceLocation). * * @param res the ResourceLocation object that contains the desired image @@ -135,21 +116,9 @@ public final class HUDUtils { * @param rightBorder the size of the box's right border * @param zLevel the zLevel to draw at */ - public static void drawContinuousTexturedBox( - ResourceLocation res, - int x, - int y, - int u, - int v, - int width, - int height, - int textureWidth, - int textureHeight, - int topBorder, - int bottomBorder, - int leftBorder, - int rightBorder, - float zLevel) { + public static void drawContinuousTexturedBox(ResourceLocation res, int x, int y, int u, int v, int width, + int height, int textureWidth, int textureHeight, int topBorder, int bottomBorder, int leftBorder, + int rightBorder, float zLevel) { Minecraft.getMinecraft().getTextureManager().bindTexture(res); drawContinuousTexturedBox( x, @@ -168,9 +137,9 @@ public final class HUDUtils { } /** - * Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with continuous borders - * and filler. It is assumed that the desired texture ResourceLocation object has been bound using - * Minecraft.getMinecraft().getTextureManager().bindTexture(resourceLocation). + * Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with + * continuous borders and filler. It is assumed that the desired texture ResourceLocation object has been bound + * using Minecraft.getMinecraft().getTextureManager().bindTexture(resourceLocation). * * @param x x axis offset * @param y y axis offset @@ -186,20 +155,8 @@ public final class HUDUtils { * @param rightBorder the size of the box's right border * @param zLevel the zLevel to draw at */ - public static void drawContinuousTexturedBox( - int x, - int y, - int u, - int v, - int width, - int height, - int textureWidth, - int textureHeight, - int topBorder, - int bottomBorder, - int leftBorder, - int rightBorder, - float zLevel) { + public static void drawContinuousTexturedBox(int x, int y, int u, int v, int width, int height, int textureWidth, + int textureHeight, int topBorder, int bottomBorder, int leftBorder, int rightBorder, float zLevel) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glEnable(GL11.GL_BLEND); OpenGlHelper.glBlendFunc(770, 771, 1, 0); @@ -219,10 +176,22 @@ public final class HUDUtils { drawTexturedModalRect(x, y, u, v, leftBorder, topBorder, zLevel); // Top Right drawTexturedModalRect( - x + leftBorder + canvasWidth, y, u + leftBorder + fillerWidth, v, rightBorder, topBorder, zLevel); + x + leftBorder + canvasWidth, + y, + u + leftBorder + fillerWidth, + v, + rightBorder, + topBorder, + zLevel); // Bottom Left drawTexturedModalRect( - x, y + topBorder + canvasHeight, u, v + topBorder + fillerHeight, leftBorder, bottomBorder, zLevel); + x, + y + topBorder + canvasHeight, + u, + v + topBorder + fillerHeight, + leftBorder, + bottomBorder, + zLevel); // Bottom Right drawTexturedModalRect( x + leftBorder + canvasWidth, @@ -254,15 +223,14 @@ public final class HUDUtils { zLevel); // Throw in some filler for good measure - for (int j = 0; j < yPasses + (remainderHeight > 0 ? 1 : 0); j++) - drawTexturedModalRect( - x + leftBorder + (i * fillerWidth), - y + topBorder + (j * fillerHeight), - u + leftBorder, - v + topBorder, - (i == xPasses ? remainderWidth : fillerWidth), - (j == yPasses ? remainderHeight : fillerHeight), - zLevel); + for (int j = 0; j < yPasses + (remainderHeight > 0 ? 1 : 0); j++) drawTexturedModalRect( + x + leftBorder + (i * fillerWidth), + y + topBorder + (j * fillerHeight), + u + leftBorder, + v + topBorder, + (i == xPasses ? remainderWidth : fillerWidth), + (j == yPasses ? remainderHeight : fillerHeight), + zLevel); } // Side Borders @@ -301,23 +269,25 @@ public final class HUDUtils { } /** - * Renders the item's overlay information. Examples being stack count or damage on top of the item's image at the specified position. + * Renders the item's overlay information. Examples being stack count or damage on top of the item's image at the + * specified position. */ public static void renderItemOverlayIntoGUI(FontRenderer fontRenderer, ItemStack itemStack, int x, int y) { renderItemOverlayIntoGUI(fontRenderer, itemStack, x, y, true, true); } /** - * Renders the item's overlay information. Examples being stack count or damage on top of the item's image at the specified position. + * Renders the item's overlay information. Examples being stack count or damage on top of the item's image at the + * specified position. */ - public static void renderItemOverlayIntoGUI( - FontRenderer fontRenderer, ItemStack itemStack, int x, int y, boolean showDamageBar, boolean showCount) { + public static void renderItemOverlayIntoGUI(FontRenderer fontRenderer, ItemStack itemStack, int x, int y, + boolean showDamageBar, boolean showCount) { if (itemStack != null && (showDamageBar || showCount)) { if (itemStack.isItemDamaged() && showDamageBar) { - int var11 = (int) - Math.round(13.0D - itemStack.getItemDamageForDisplay() * 13.0D / itemStack.getMaxDamage()); - int var7 = (int) - Math.round(255.0D - itemStack.getItemDamageForDisplay() * 255.0D / itemStack.getMaxDamage()); + int var11 = (int) Math + .round(13.0D - itemStack.getItemDamageForDisplay() * 13.0D / itemStack.getMaxDamage()); + int var7 = (int) Math + .round(255.0D - itemStack.getItemDamageForDisplay() * 255.0D / itemStack.getMaxDamage()); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL11.GL_TEXTURE_2D); @@ -336,9 +306,10 @@ public final class HUDUtils { if (showCount) { int count = 0; - if (itemStack.getMaxStackSize() > 1) - count = HUDUtils.countInInventory( - Minecraft.getMinecraft().thePlayer, itemStack.getItem(), itemStack.getItemDamage()); + if (itemStack.getMaxStackSize() > 1) count = HUDUtils.countInInventory( + Minecraft.getMinecraft().thePlayer, + itemStack.getItem(), + itemStack.getItemDamage()); else if (itemStack.getItem().equals(Items.bow)) count = HUDUtils.countInInventory(Minecraft.getMinecraft().thePlayer, Items.arrow); @@ -347,7 +318,10 @@ public final class HUDUtils { GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); fontRenderer.drawStringWithShadow( - var6, x + 19 - 2 - fontRenderer.getStringWidth(var6), y + 6 + 3, 16777215); + var6, + x + 19 - 2 - fontRenderer.getStringWidth(var6), + y + 6 + 3, + 16777215); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_DEPTH_TEST); } @@ -356,8 +330,8 @@ public final class HUDUtils { } /** - * Adds a quad to the tesselator at the specified position with the set width and height and color. Args: tessellator, x, y, width, - * height, color + * Adds a quad to the tesselator at the specified position with the set width and height and color. Args: + * tessellator, x, y, width, height, color */ public static void renderQuad(Tessellator tessellator, int x, int y, int width, int height, int color) { tessellator.startDrawingQuads(); @@ -376,8 +350,7 @@ public final class HUDUtils { public static int countInInventory(EntityPlayer player, Item item, int md) { int count = 0; for (int i = 0; i < player.inventory.mainInventory.length; i++) - if (player.inventory.mainInventory[i] != null - && item.equals(player.inventory.mainInventory[i].getItem()) + if (player.inventory.mainInventory[i] != null && item.equals(player.inventory.mainInventory[i].getItem()) && (md == -1 || player.inventory.mainInventory[i].getItemDamage() == md)) count += player.inventory.mainInventory[i].stackSize; return count; diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderFakeBlocks.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderFakeBlocks.java index 5fe58dc2..8493c365 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderFakeBlocks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderFakeBlocks.java @@ -6,18 +6,12 @@ import net.minecraft.util.IIcon; import net.minecraft.world.World; /* - * Created in Scala by Alex-Hawks - * Translated and implemented by Arcaratus + * Created in Scala by Alex-Hawks Translated and implemented by Arcaratus */ public class RenderFakeBlocks { - public static void drawFakeBlock( - WayofTime.alchemicalWizardry.api.Vector3 vector3, - Block block, - int meta, - double minX, - double minY, - double minZ, - World world) { + + public static void drawFakeBlock(WayofTime.alchemicalWizardry.api.Vector3 vector3, Block block, int meta, + double minX, double minY, double minZ, World world) { double maxX = minX + 1; double maxY = minY + 1; double maxZ = minZ + 1; diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java index 9ae0220c..ab36d637 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java @@ -1,15 +1,8 @@ package WayofTime.alchemicalWizardry.client.renderer; -import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; -import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; -import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.ArrayList; import java.util.List; + import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiChat; import net.minecraft.client.gui.ScaledResolution; @@ -22,9 +15,20 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; +import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; +import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class RenderHelper { + public static boolean enableItemName = false; public static boolean enabled = true; public static boolean showInChat = true; @@ -52,8 +56,7 @@ public class RenderHelper { public static boolean onTickInGame(Minecraft mc) { if (enabled - && (mc.inGameHasFocus - || mc.currentScreen == null + && (mc.inGameHasFocus || mc.currentScreen == null || (mc.currentScreen instanceof GuiChat && showInChat)) && !mc.gameSettings.showDebugInfo) { EntityPlayer player = mc.thePlayer; @@ -71,8 +74,9 @@ public class RenderHelper { if (maxAmount > 0) { float val = APISpellHelper.getPlayerCurrentReagentAmount(player); - ReagentStack reagentStack = - new ReagentStack(APISpellHelper.getPlayerReagentType(player), (int) val); + ReagentStack reagentStack = new ReagentStack( + APISpellHelper.getPlayerReagentType(player), + (int) val); if (reagentStack != null && reagentStack.amount > 0) { renderTestHUD(mc, reagentStack, maxAmount); @@ -89,7 +93,7 @@ public class RenderHelper { } float maxHP = APISpellHelper.getCurrentAdditionalMaxHP(player); - // System.out.println("MaxHP: " + maxHP); + // System.out.println("MaxHP: " + maxHP); if (maxHP > 0) { renderHPHUD(mc, APISpellHelper.getCurrentAdditionalHP(player), maxHP); } @@ -174,8 +178,8 @@ public class RenderHelper { IReagentHandler relay = (IReagentHandler) tile; - ReagentContainerInfo[] infos = - relay.getContainerInfo(ForgeDirection.getOrientation(movingobjectposition.sideHit)); + ReagentContainerInfo[] infos = relay + .getContainerInfo(ForgeDirection.getOrientation(movingobjectposition.sideHit)); if (infos != null) { for (ReagentContainerInfo info : infos) { @@ -203,8 +207,7 @@ public class RenderHelper { private static int getY(int rowCount, int height) { if (alignMode.toLowerCase().contains("middle")) - return (scaledResolution.getScaledHeight() / 2) - - ((rowCount * height) / 2) + return (scaledResolution.getScaledHeight() / 2) - ((rowCount * height) / 2) + (applyYOffsetToMiddle ? yOffset : 0); else if (alignMode.equalsIgnoreCase("bottomleft") || alignMode.equalsIgnoreCase("bottomright")) return scaledResolution.getScaledHeight() - (rowCount * height) - yOffset; @@ -220,8 +223,8 @@ public class RenderHelper { return r; } - public static void drawTexturedModalRect( - int p_73729_1_, int p_73729_2_, int p_73729_3_, int p_73729_4_, double p_73729_5_, double p_73729_6_) { + public static void drawTexturedModalRect(int p_73729_1_, int p_73729_2_, int p_73729_3_, int p_73729_4_, + double p_73729_5_, double p_73729_6_) { float f = 0.00390625F; float f1 = 0.00390625F; Tessellator tessellator = Tessellator.instance; @@ -245,7 +248,11 @@ public class RenderHelper { (p_73729_3_ + p_73729_5_) * f, p_73729_4_ * f1); tessellator.addVertexWithUV( - (double) p_73729_1_, (double) p_73729_2_, (double) zLevel, (double) (p_73729_3_ * f), p_73729_4_ * f1); + (double) p_73729_1_, + (double) p_73729_2_, + (double) zLevel, + (double) (p_73729_3_ * f), + p_73729_4_ * f1); tessellator.draw(); } @@ -264,7 +271,10 @@ public class RenderHelper { ResourceLocation test2 = new ResourceLocation("alchemicalwizardry", "textures/gui/container1.png"); GL11.glColor4f( - reagent.getColourRed() / 255f, reagent.getColourGreen() / 255f, reagent.getColourBlue() / 255f, 1.0F); + reagent.getColourRed() / 255f, + reagent.getColourGreen() / 255f, + reagent.getColourBlue() / 255f, + 1.0F); mc.getTextureManager().bindTexture(test2); drawTexturedModalRect(x, y + amount, 0, amount, 256, 256 - amount); @@ -300,8 +310,11 @@ public class RenderHelper { (double) p_94149_3_.getMaxU(), (double) p_94149_3_.getMinV()); tessellator.addVertexWithUV( - (double) p_94149_1_, (double) p_94149_2_, (double) zLevel, (double) p_94149_3_.getMinU(), (double) - p_94149_3_.getMinV()); + (double) p_94149_1_, + (double) p_94149_2_, + (double) zLevel, + (double) p_94149_3_.getMinU(), + (double) p_94149_3_.getMinV()); tessellator.draw(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java index 3ad72cba..6dc61649 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java @@ -1,5 +1,14 @@ package WayofTime.alchemicalWizardry.client.renderer; +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.EntityClientPlayerMP; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; +import net.minecraftforge.client.event.RenderWorldLastEvent; + +import org.lwjgl.opengl.GL11; + import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.Vector3; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -10,20 +19,13 @@ import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.EntityClientPlayerMP; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; -import net.minecraftforge.client.event.RenderWorldLastEvent; -import org.lwjgl.opengl.GL11; /* - * Created in Scala by Alex-Hawks - * Translated and implemented by Arcaratus + * Created in Scala by Alex-Hawks Translated and implemented by Arcaratus */ @SideOnly(Side.CLIENT) public class RitualDivinerRender { + @SubscribeEvent public void render(RenderWorldLastEvent event) { Minecraft minecraft = Minecraft.getMinecraft(); @@ -36,25 +38,28 @@ public class RitualDivinerRender { } TileEntity tileEntity = world.getTileEntity( - minecraft.objectMouseOver.blockX, minecraft.objectMouseOver.blockY, minecraft.objectMouseOver.blockZ); + minecraft.objectMouseOver.blockX, + minecraft.objectMouseOver.blockY, + minecraft.objectMouseOver.blockZ); if (!(tileEntity instanceof IMasterRitualStone)) { return; } Vector3 vec3 = new Vector3( - minecraft.objectMouseOver.blockX, minecraft.objectMouseOver.blockY, minecraft.objectMouseOver.blockZ); + minecraft.objectMouseOver.blockX, + minecraft.objectMouseOver.blockY, + minecraft.objectMouseOver.blockZ); double posX = player.lastTickPosX + (player.posX - player.lastTickPosX) * event.partialTicks; double posY = player.lastTickPosY + (player.posY - player.lastTickPosY) * event.partialTicks; double posZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * event.partialTicks; if (player.inventory.getCurrentItem() != null && player.inventory.getCurrentItem().getItem() instanceof ItemRitualDiviner) { - ItemRitualDiviner ritualDiviner = - (ItemRitualDiviner) player.inventory.getCurrentItem().getItem(); + ItemRitualDiviner ritualDiviner = (ItemRitualDiviner) player.inventory.getCurrentItem().getItem(); int direction = ritualDiviner.getDirection(player.inventory.getCurrentItem()); - RitualEffect ritualEffect = - getEffectFromString(ritualDiviner.getCurrentRitual(player.inventory.getCurrentItem())); + RitualEffect ritualEffect = getEffectFromString( + ritualDiviner.getCurrentRitual(player.inventory.getCurrentItem())); if (ritualEffect == null) { return; @@ -64,15 +69,24 @@ public class RitualDivinerRender { GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); for (RitualComponent ritualComponent : ritualEffect.getRitualComponentList()) { - Vector3 vX = vec3.add(new Vector3( - ritualComponent.getX(direction), ritualComponent.getY(), ritualComponent.getZ(direction))); + Vector3 vX = vec3.add( + new Vector3( + ritualComponent.getX(direction), + ritualComponent.getY(), + ritualComponent.getZ(direction))); double minX = vX.x - posX; double minY = vX.y - posY; double minZ = vX.z - posZ; if (!world.getBlock(vX.x, vX.y, vX.z).isOpaqueCube()) { RenderFakeBlocks.drawFakeBlock( - vX, ModBlocks.ritualStone, ritualComponent.getStoneType(), minX, minY, minZ, world); + vX, + ModBlocks.ritualStone, + ritualComponent.getStoneType(), + minX, + minY, + minZ, + world); } } GL11.glPopMatrix(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java index 88d2e9d0..64a207c2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java @@ -1,35 +1,12 @@ package WayofTime.alchemicalWizardry.common; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.BloodMagicConfiguration; -import WayofTime.alchemicalWizardry.api.BlockStack; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.event.TeleposeEvent; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; -import WayofTime.alchemicalWizardry.common.achievements.ModAchievements; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; -import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergySword; -import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; -import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; -import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; -import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; -import WayofTime.alchemicalWizardry.common.omega.ReagentRegenConfiguration; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import cpw.mods.fml.client.event.ConfigChangedEvent; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.eventhandler.Event.Result; -import cpw.mods.fml.common.eventhandler.EventPriority; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Random; + import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IProjectile; @@ -56,9 +33,35 @@ import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn; import net.minecraftforge.event.entity.player.EntityInteractEvent; + import vazkii.botania.api.internal.IManaBurst; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.BloodMagicConfiguration; +import WayofTime.alchemicalWizardry.api.BlockStack; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.event.TeleposeEvent; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; +import WayofTime.alchemicalWizardry.common.achievements.ModAchievements; +import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; +import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergySword; +import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; +import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; +import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; +import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; +import WayofTime.alchemicalWizardry.common.omega.ReagentRegenConfiguration; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; +import cpw.mods.fml.client.event.ConfigChangedEvent; +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.eventhandler.Event.Result; +import cpw.mods.fml.common.eventhandler.EventPriority; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; public class AlchemicalWizardryEventHooks { + public static Map playerFlightBuff = new HashMap(); public static List playersWith1Step = new ArrayList(); @@ -87,8 +90,7 @@ public class AlchemicalWizardryEventHooks { @SubscribeEvent public void onAnvilUpdateEvent(AnvilUpdateEvent event) { - if (event.isCancelable() - && event.left != null + if (event.isCancelable() && event.left != null && event.right != null && (event.left.getItem() instanceof BoundArmour || event.right.getItem() instanceof BoundArmour)) { event.setCanceled(true); @@ -97,8 +99,7 @@ public class AlchemicalWizardryEventHooks { @SubscribeEvent(priority = EventPriority.HIGHEST) public void onLivingHurtEvent(LivingHurtEvent event) { - if (!event.isCanceled() - && event.entityLiving instanceof EntityPlayer + if (!event.isCanceled() && event.entityLiving instanceof EntityPlayer && !event.entityLiving.worldObj.isRemote) { EntityPlayer player = (EntityPlayer) event.entityLiving; @@ -108,11 +109,11 @@ public class AlchemicalWizardryEventHooks { float prevHp = APISpellHelper.getCurrentAdditionalHP((EntityPlayer) event.entityLiving); if (prevHp > 0) { - float recalculatedAmount = ArmorProperties.ApplyArmor( - player, player.inventory.armorInventory, event.source, event.ammount); + float recalculatedAmount = ArmorProperties + .ApplyArmor(player, player.inventory.armorInventory, event.source, event.ammount); if (recalculatedAmount <= 0) return; - recalculatedAmount = SpellHelper.applyPotionDamageCalculations( - player, event.source, recalculatedAmount); // Recalculated damage + recalculatedAmount = SpellHelper + .applyPotionDamageCalculations(player, event.source, recalculatedAmount); // Recalculated damage float ratio = recalculatedAmount / event.ammount; @@ -123,7 +124,7 @@ public class AlchemicalWizardryEventHooks { if (prevHp > recalculatedAmount) { float hp = (prevHp - recalculatedAmount); // New HP - this is obviously > 0... - // event.setCanceled(true); + // event.setCanceled(true); event.ammount = 0; Reagent reagent = APISpellHelper.getPlayerReagentType(player); OmegaParadigm paradigm = OmegaRegistry.getParadigmForReagent(reagent); @@ -142,10 +143,10 @@ public class AlchemicalWizardryEventHooks { NewPacketHandler.getAddedHPPacket(hp, APISpellHelper.getCurrentAdditionalMaxHP(player)), (EntityPlayerMP) player); - // if(event.ammount <= 0.3) - // { - // event.ammount++; - // } + // if(event.ammount <= 0.3) + // { + // event.ammount++; + // } } else { APISpellHelper.setCurrentAdditionalHP(player, 0); NewPacketHandler.INSTANCE.sendTo( @@ -176,23 +177,17 @@ public class AlchemicalWizardryEventHooks { if (cooldown > 0) { float extra = 0; if (player.isPotionActive(AlchemicalWizardry.customPotionSoulHarden)) { - extra += 0.25f - * (1 - + player.getActivePotionEffect(AlchemicalWizardry.customPotionSoulHarden) - .getAmplifier()); + extra += 0.25f * (1 + player.getActivePotionEffect(AlchemicalWizardry.customPotionSoulHarden) + .getAmplifier()); } if (player.isPotionActive(AlchemicalWizardry.customPotionSoulFray)) { - extra -= 0.25f - * (1 - + player.getActivePotionEffect(AlchemicalWizardry.customPotionSoulFray) - .getAmplifier()); + extra -= 0.25f * (1 + + player.getActivePotionEffect(AlchemicalWizardry.customPotionSoulFray).getAmplifier()); } - int deduction = -1 - - (extra >= 0 - ? (rand.nextFloat() < extra ? 1 : 0) - : (rand.nextFloat() < -extra / 2 ? -1 : 0)); + int deduction = -1 - (extra >= 0 ? (rand.nextFloat() < extra ? 1 : 0) + : (rand.nextFloat() < -extra / 2 ? -1 : 0)); APISpellHelper.setPlayerReagentRegenCooldownTag(player, Math.max(cooldown + deduction, 0)); canHealHPBar = false; @@ -206,8 +201,7 @@ public class AlchemicalWizardryEventHooks { int tickRate = config.tickRate; if (player.isPotionActive(Potion.regeneration)) { - int i = player.getActivePotionEffect(Potion.regeneration) - .getAmplifier(); + int i = player.getActivePotionEffect(Potion.regeneration).getAmplifier(); double factor = Math.pow(1.5, i + 1); tickRate = Math.max((int) (tickRate / factor), 1); } @@ -249,8 +243,8 @@ public class AlchemicalWizardryEventHooks { } else { reagentAmount = 0; APISpellHelper.setPlayerMaxReagentAmount(player, 0); - NewPacketHandler.INSTANCE.sendTo( - NewPacketHandler.getReagentBarPacket(null, 0, 0), (EntityPlayerMP) player); + NewPacketHandler.INSTANCE + .sendTo(NewPacketHandler.getReagentBarPacket(null, 0, 0), (EntityPlayerMP) player); APISpellHelper.setCurrentAdditionalHP(player, 0); NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getAddedHPPacket(0, 0), (EntityPlayerMP) player); } @@ -290,7 +284,9 @@ public class AlchemicalWizardryEventHooks { APISpellHelper.setPlayerCurrentReagentAmount(player, reagentAmount); NewPacketHandler.INSTANCE.sendTo( NewPacketHandler.getReagentBarPacket( - reagent, reagentAmount, APISpellHelper.getPlayerMaxReagentAmount(player)), + reagent, + reagentAmount, + APISpellHelper.getPlayerMaxReagentAmount(player)), (EntityPlayerMP) player); } } @@ -322,11 +318,9 @@ public class AlchemicalWizardryEventHooks { for (CoordAndRange coords : list) { TileEntity tile = event.world.getTileEntity(coords.xCoord, coords.yCoord, coords.zCoord); - if (tile instanceof TEMasterStone - && ((TEMasterStone) tile).isRunning + if (tile instanceof TEMasterStone && ((TEMasterStone) tile).isRunning && ((TEMasterStone) tile).getCurrentRitual().equals(respawnRitual)) { - if (event.x > coords.xCoord - coords.horizRadius - && event.x < coords.xCoord + coords.horizRadius + if (event.x > coords.xCoord - coords.horizRadius && event.x < coords.xCoord + coords.horizRadius && event.z > coords.zCoord - coords.horizRadius && event.z < coords.zCoord + coords.horizRadius && event.y > coords.yCoord - coords.vertRadius @@ -365,11 +359,9 @@ public class AlchemicalWizardryEventHooks { for (CoordAndRange coords : list) { TileEntity tile = event.world.getTileEntity(coords.xCoord, coords.yCoord, coords.zCoord); - if (tile instanceof TEMasterStone - && ((TEMasterStone) tile).isRunning + if (tile instanceof TEMasterStone && ((TEMasterStone) tile).isRunning && ((TEMasterStone) tile).getCurrentRitual().equals(forceSpawnRitual)) { - if (event.x > coords.xCoord - coords.horizRadius - && event.x < coords.xCoord + coords.horizRadius + if (event.x > coords.xCoord - coords.horizRadius && event.x < coords.xCoord + coords.horizRadius && event.z > coords.zCoord - coords.horizRadius && event.z < coords.zCoord + coords.horizRadius && event.y > coords.yCoord - coords.vertRadius @@ -405,15 +397,13 @@ public class AlchemicalWizardryEventHooks { @SubscribeEvent public void onLivingJumpEvent(LivingJumpEvent event) { - // event.entityLiving.getEntityAttribute(SharedMonsterAttributes.maxHealth).removeModifier(new + // event.entityLiving.getEntityAttribute(SharedMonsterAttributes.maxHealth).removeModifier(new // AttributeModifier(new UUID(493295, 1), "HealthModifier", 2, 0)); // event.entityLiving.getEntityAttribute(SharedMonsterAttributes.maxHealth).applyModifier(new // AttributeModifier(new UUID(493295, 1), "HealthModifier", 2, 0)); if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionBoost)) { - int i = event.entityLiving - .getActivePotionEffect(AlchemicalWizardry.customPotionBoost) - .getAmplifier(); + int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionBoost).getAmplifier(); event.entityLiving.motionY += (0.1f) * (2 + i); } @@ -437,8 +427,7 @@ public class AlchemicalWizardryEventHooks { Entity entityAttacking = event.source.getSourceOfDamage(); if (entityAttacking != null && entityAttacking instanceof EntityLivingBase) { - int i = event.entityLiving - .getActivePotionEffect(AlchemicalWizardry.customPotionReciprocation) + int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionReciprocation) .getAmplifier(); float damageRecieve = event.ammount / 2 * (i + 1); entityAttacking.attackEntityFrom(DamageSource.generic, damageRecieve); @@ -446,14 +435,11 @@ public class AlchemicalWizardryEventHooks { } if (entityAttacked.isPotionActive(AlchemicalWizardry.customPotionFlameCloak)) { - int i = event.entityLiving - .getActivePotionEffect(AlchemicalWizardry.customPotionFlameCloak) - .getAmplifier(); + int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFlameCloak).getAmplifier(); Entity entityAttacking = event.source.getSourceOfDamage(); - if (entityAttacking != null - && entityAttacking instanceof EntityLivingBase + if (entityAttacking != null && entityAttacking instanceof EntityLivingBase && !entityAttacking.isImmuneToFire() && !((EntityLivingBase) entityAttacking).isPotionActive(Potion.fireResistance)) { entityAttacking.attackEntityFrom(DamageSource.inFire, 2 * i + 2); @@ -462,20 +448,20 @@ public class AlchemicalWizardryEventHooks { } } - // @SubscribeEvent - // public void onFOVUpdate(FOVUpdateEvent event) - // { - // event.setResult(Result.DENY); - // } - // @SubscribeEvent - // public void onPlayerTickEnd(PlayerTickEvent event) - // { - // if(event.type.equals(Type.PLAYER) && event.phase.equals(TickEvent.Phase.END)) - // { - // ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, event.player.capabilities, + // @SubscribeEvent + // public void onFOVUpdate(FOVUpdateEvent event) + // { + // event.setResult(Result.DENY); + // } + // @SubscribeEvent + // public void onPlayerTickEnd(PlayerTickEvent event) + // { + // if(event.type.equals(Type.PLAYER) && event.phase.equals(TickEvent.Phase.END)) + // { + // ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, event.player.capabilities, // Float.valueOf(0.1f), new String[]{"walkSpeed", "g", "field_75097_g"}); - // } - // } + // } + // } @SubscribeEvent public void onEntityUpdate(LivingUpdateEvent event) { @@ -496,12 +482,12 @@ public class AlchemicalWizardryEventHooks { NewPacketHandler.INSTANCE.sendTo( NewPacketHandler.getLPPacket( SoulNetworkHandler.getCurrentEssence(ownerName), - SoulNetworkHandler.getMaximumForOrbTier( - SoulNetworkHandler.getCurrentMaxOrb(ownerName))), + SoulNetworkHandler + .getMaximumForOrbTier(SoulNetworkHandler.getCurrentMaxOrb(ownerName))), (EntityPlayerMP) entityLiving); } } - // ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, ((EntityPlayer) + // ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, ((EntityPlayer) // event.entityLiving).capabilities, 0.1F, "walkSpeed", "g", "field_75097_g"); } @@ -526,9 +512,7 @@ public class AlchemicalWizardryEventHooks { if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionDrowning) && !event.entityLiving.isPotionActive(Potion.waterBreathing)) { - int i = event.entityLiving - .getActivePotionEffect(AlchemicalWizardry.customPotionDrowning) - .getAmplifier(); + int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionDrowning).getAmplifier(); if (event.entityLiving.worldObj.getWorldTime() % (20 / (i + 1)) == 0) { event.entityLiving.attackEntityFrom(DamageSource.drown, 2); @@ -536,21 +520,19 @@ public class AlchemicalWizardryEventHooks { } } - // event.entityLiving.getEntityAttribute(SharedMonsterAttributes.movementSpeed).removeAllModifiers(); + // event.entityLiving.getEntityAttribute(SharedMonsterAttributes.movementSpeed).removeAllModifiers(); if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionBoost)) { - int i = event.entityLiving - .getActivePotionEffect(AlchemicalWizardry.customPotionBoost) - .getAmplifier(); + int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionBoost).getAmplifier(); // if(!entity.isSneaking()) { float percentIncrease = (i + 1) * 0.05f; - // AttributeModifier speedModifier = new AttributeModifier(new UUID(213241, 3), "Potion Boost", + // AttributeModifier speedModifier = new AttributeModifier(new UUID(213241, 3), "Potion Boost", // percentIncrease, 0); // // - // event.entityLiving.getEntityAttribute(SharedMonsterAttributes.movementSpeed).applyModifier(speedModifier); + // event.entityLiving.getEntityAttribute(SharedMonsterAttributes.movementSpeed).applyModifier(speedModifier); if (event.entityLiving instanceof EntityPlayer) { EntityPlayer entityPlayer = (EntityPlayer) event.entityLiving; @@ -566,16 +548,14 @@ public class AlchemicalWizardryEventHooks { } if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionProjProt)) { - int i = event.entityLiving - .getActivePotionEffect(AlchemicalWizardry.customPotionProjProt) - .getAmplifier(); + int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionProjProt).getAmplifier(); EntityLivingBase entity = event.entityLiving; int posX = (int) Math.round(entity.posX - 0.5f); int posY = (int) Math.round(entity.posY); int posZ = (int) Math.round(entity.posZ - 0.5f); int d0 = (int) ((i + 1) * 2.5); - AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox( - posX - 0.5, posY - 0.5, posZ - 0.5, posX + 0.5, posY + 0.5, posZ + 0.5) + AxisAlignedBB axisalignedbb = AxisAlignedBB + .getBoundingBox(posX - 0.5, posY - 0.5, posZ - 0.5, posX + 0.5, posY + 0.5, posZ + 0.5) .expand(d0, d0, d0); List list = event.entityLiving.worldObj.getEntitiesWithinAABB(Entity.class, axisalignedbb); Iterator iterator = list.iterator(); @@ -611,9 +591,8 @@ public class AlchemicalWizardryEventHooks { double delZ = projectile.posZ - entity.posZ; double angle = (delX * projectile.motionX + delY * projectile.motionY + delZ * projectile.motionZ) - / (Math.sqrt(delX * delX + delY * delY + delZ * delZ) - * Math.sqrt(projectile.motionX * projectile.motionX - + projectile.motionY * projectile.motionY + / (Math.sqrt(delX * delX + delY * delY + delZ * delZ) * Math.sqrt( + projectile.motionX * projectile.motionX + projectile.motionY * projectile.motionY + projectile.motionZ * projectile.motionZ)); angle = Math.acos(angle); if (angle < 3 * (Math.PI / 4)) { @@ -632,9 +611,9 @@ public class AlchemicalWizardryEventHooks { delX /= curVel; delY /= curVel; delZ /= curVel; - double newVel = Math.sqrt(projectile.motionX * projectile.motionX - + projectile.motionY * projectile.motionY - + projectile.motionZ * projectile.motionZ); + double newVel = Math.sqrt( + projectile.motionX * projectile.motionX + projectile.motionY * projectile.motionY + + projectile.motionZ * projectile.motionZ); projectile.motionX = newVel * delX; projectile.motionY = newVel * delY; projectile.motionZ = newVel * delZ; @@ -680,16 +659,13 @@ public class AlchemicalWizardryEventHooks { 0.06d, 0); - int i = event.entityLiving - .getActivePotionEffect(AlchemicalWizardry.customPotionFlameCloak) - .getAmplifier(); + int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFlameCloak).getAmplifier(); double range = i * 0.5; List entities = SpellHelper.getEntitiesInRange(entityLiving.worldObj, x, y, z, range, range); if (entities != null) { for (Entity entity : entities) { - if (!entity.equals(entityLiving) - && !entity.isImmuneToFire() + if (!entity.equals(entityLiving) && !entity.isImmuneToFire() && !(entity instanceof EntityLivingBase && ((EntityLivingBase) entity).isPotionActive(Potion.fireResistance))) { entity.setFire(3); @@ -699,19 +675,16 @@ public class AlchemicalWizardryEventHooks { } if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionIceCloak)) { - if (entityLiving.worldObj.getWorldTime() % 2 == 0) - entityLiving.worldObj.spawnParticle( - "reddust", - x + SpellHelper.gaussian(1), - y - 1.3 + SpellHelper.gaussian(0.3), - z + SpellHelper.gaussian(1), - 0x74, - 0xbb, - 0xfb); + if (entityLiving.worldObj.getWorldTime() % 2 == 0) entityLiving.worldObj.spawnParticle( + "reddust", + x + SpellHelper.gaussian(1), + y - 1.3 + SpellHelper.gaussian(0.3), + z + SpellHelper.gaussian(1), + 0x74, + 0xbb, + 0xfb); - int r = event.entityLiving - .getActivePotionEffect(AlchemicalWizardry.customPotionIceCloak) - .getAmplifier(); + int r = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionIceCloak).getAmplifier(); int horizRange = r + 1; int vertRange = 1; @@ -736,9 +709,7 @@ public class AlchemicalWizardryEventHooks { 0.06d, 0); - int i = event.entityLiving - .getActivePotionEffect(AlchemicalWizardry.customPotionHeavyHeart) - .getAmplifier(); + int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionHeavyHeart).getAmplifier(); double decrease = 0.025 * (i + 1); if (entityLiving.motionY > -0.9) { @@ -764,69 +735,64 @@ public class AlchemicalWizardryEventHooks { 0.06d, 0); - int r = event.entityLiving - .getActivePotionEffect(AlchemicalWizardry.customPotionFireFuse) - .getAmplifier(); + int r = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFireFuse).getAmplifier(); int radius = r + 1; - if (entityLiving - .getActivePotionEffect(AlchemicalWizardry.customPotionFireFuse) - .getDuration() - <= 2) { + if (entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFireFuse).getDuration() <= 2) { entityLiving.worldObj.createExplosion(null, x, y, z, radius, false); } } } - // @SubscribeEvent(priority = EventPriority.LOWEST) - // public void onTelepose(TeleposeEvent event) { + // @SubscribeEvent(priority = EventPriority.LOWEST) + // public void onTelepose(TeleposeEvent event) { // - // AlchemicalWizardry.logger.info(event.initialBlock + ":" + event.initialMetadata); - // AlchemicalWizardry.logger.info(event.finalBlock + ":" + event.finalMetadata); + // AlchemicalWizardry.logger.info(event.initialBlock + ":" + event.initialMetadata); + // AlchemicalWizardry.logger.info(event.finalBlock + ":" + event.finalMetadata); // - // for (int i = 0; i < BloodMagicConfiguration.teleposerBlacklist.length; i++) { - // String[] blockData = BloodMagicConfiguration.teleposerBlacklist[i].split(":"); + // for (int i = 0; i < BloodMagicConfiguration.teleposerBlacklist.length; i++) { + // String[] blockData = BloodMagicConfiguration.teleposerBlacklist[i].split(":"); // - // // If the block follows full syntax: modid:blockname:meta - // if (blockData.length == 3) { + // // If the block follows full syntax: modid:blockname:meta + // if (blockData.length == 3) { // - // Block block = GameRegistry.findBlock(blockData[0], blockData[1]); - // int meta; + // Block block = GameRegistry.findBlock(blockData[0], blockData[1]); + // int meta; // - // // Check if it's an int, if so, parse it. If not, set meta to 0 to avoid crashing. - // if (isInteger(blockData[2])) - // meta = Integer.parseInt(blockData[2]); - // else if (blockData[2].equals("*")) - // meta = OreDictionary.WILDCARD_VALUE; - // else - // meta = 0; + // // Check if it's an int, if so, parse it. If not, set meta to 0 to avoid crashing. + // if (isInteger(blockData[2])) + // meta = Integer.parseInt(blockData[2]); + // else if (blockData[2].equals("*")) + // meta = OreDictionary.WILDCARD_VALUE; + // else + // meta = 0; // - // AlchemicalWizardry.logger.info(block + ":" + meta); + // AlchemicalWizardry.logger.info(block + ":" + meta); // - // if (block != null) { - // if ((block == event.initialBlock || block == event.finalBlock) && (meta == event.initialMetadata || meta == + // if (block != null) { + // if ((block == event.initialBlock || block == event.finalBlock) && (meta == event.initialMetadata || meta == // event.finalMetadata || meta == OreDictionary.WILDCARD_VALUE)) { - // event.setCanceled(true); - // return; - // } - // } + // event.setCanceled(true); + // return; + // } + // } // - // // If the block uses shorthand syntax: modid:blockname - // } else if (blockData.length == 2) { + // // If the block uses shorthand syntax: modid:blockname + // } else if (blockData.length == 2) { // - // Block block = GameRegistry.findBlock(blockData[0], blockData[1]); - // int meta = 0; + // Block block = GameRegistry.findBlock(blockData[0], blockData[1]); + // int meta = 0; // - // if (block != null) { - // if ((block == event.initialBlock && (meta == event.initialMetadata || meta == OreDictionary.WILDCARD_VALUE)) + // if (block != null) { + // if ((block == event.initialBlock && (meta == event.initialMetadata || meta == OreDictionary.WILDCARD_VALUE)) // || (block == event.finalBlock && (meta == event.finalMetadata || meta == OreDictionary.WILDCARD_VALUE))) { - // event.setCanceled(true); - // return; - // } - // } - // } - // } - // } + // event.setCanceled(true); + // return; + // } + // } + // } + // } + // } @SubscribeEvent public void onTelepose(TeleposeEvent event) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java index c61ebaaf..e747fb51 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java @@ -1,9 +1,5 @@ package WayofTime.alchemicalWizardry.common; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.items.LavaCrystal; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.common.IFuelHandler; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -12,7 +8,13 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.items.LavaCrystal; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.common.IFuelHandler; + public class AlchemicalWizardryFuelHandler implements IFuelHandler { + @Override public int getBurnTime(ItemStack fuel) { if (fuel == null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/ArmourComponent.java b/src/main/java/WayofTime/alchemicalWizardry/common/ArmourComponent.java index 8fe970c7..dd80448d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/ArmourComponent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/ArmourComponent.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common; public class ArmourComponent { + private int xOff; private int zOff; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/ClientToServerPacketHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/ClientToServerPacketHandler.java index 0b5d88f8..1091df8f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/ClientToServerPacketHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/ClientToServerPacketHandler.java @@ -5,6 +5,7 @@ import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; import cpw.mods.fml.relauncher.Side; public class ClientToServerPacketHandler { + public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel("alchemicalwizardry"); public static void init() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java b/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java index de087e3e..48426d06 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java @@ -1,5 +1,7 @@ package WayofTime.alchemicalWizardry.common; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; import WayofTime.alchemicalWizardry.common.entity.mob.BookEntityItem; @@ -23,9 +25,9 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; -import net.minecraft.world.World; public class CommonProxy { + // Client stuff public void registerRenderers() { // Nothing here as the server doesn't render graphics! @@ -54,25 +56,73 @@ public class CommonProxy { public void registerEntityTrackers() { EntityRegistry.registerModEntity( - EnergyBlastProjectile.class, "energyBlastProjectile", 0, AlchemicalWizardry.instance, 128, 5, true); + EnergyBlastProjectile.class, + "energyBlastProjectile", + 0, + AlchemicalWizardry.instance, + 128, + 5, + true); EntityRegistry.registerModEntity( - FireProjectile.class, "fireProjectile", 1, AlchemicalWizardry.instance, 128, 5, true); + FireProjectile.class, + "fireProjectile", + 1, + AlchemicalWizardry.instance, + 128, + 5, + true); + EntityRegistry + .registerModEntity(IceProjectile.class, "iceProjectile", 2, AlchemicalWizardry.instance, 128, 5, true); EntityRegistry.registerModEntity( - IceProjectile.class, "iceProjectile", 2, AlchemicalWizardry.instance, 128, 5, true); + ExplosionProjectile.class, + "explosionProjectile", + 3, + AlchemicalWizardry.instance, + 128, + 5, + true); EntityRegistry.registerModEntity( - ExplosionProjectile.class, "explosionProjectile", 3, AlchemicalWizardry.instance, 128, 5, true); + HolyProjectile.class, + "holyProjectile", + 4, + AlchemicalWizardry.instance, + 128, + 5, + true); EntityRegistry.registerModEntity( - HolyProjectile.class, "holyProjectile", 4, AlchemicalWizardry.instance, 128, 5, true); + WindGustProjectile.class, + "windGustProjectile", + 5, + AlchemicalWizardry.instance, + 128, + 5, + true); EntityRegistry.registerModEntity( - WindGustProjectile.class, "windGustProjectile", 5, AlchemicalWizardry.instance, 128, 5, true); + LightningBoltProjectile.class, + "lightningBoltProjectile", + 6, + AlchemicalWizardry.instance, + 128, + 5, + true); EntityRegistry.registerModEntity( - LightningBoltProjectile.class, "lightningBoltProjectile", 6, AlchemicalWizardry.instance, 128, 5, true); + WaterProjectile.class, + "waterProjectile", + 7, + AlchemicalWizardry.instance, + 128, + 5, + true); + EntityRegistry + .registerModEntity(MudProjectile.class, "mudProjectile", 8, AlchemicalWizardry.instance, 128, 5, true); EntityRegistry.registerModEntity( - WaterProjectile.class, "waterProjectile", 7, AlchemicalWizardry.instance, 128, 5, true); - EntityRegistry.registerModEntity( - MudProjectile.class, "mudProjectile", 8, AlchemicalWizardry.instance, 128, 5, true); - EntityRegistry.registerModEntity( - TeleportProjectile.class, "teleportProjectile", 9, AlchemicalWizardry.instance, 128, 5, true); + TeleportProjectile.class, + "teleportProjectile", + 9, + AlchemicalWizardry.instance, + 128, + 5, + true); EntityRegistry.registerModEntity( EntityEnergyBazookaMainProjectile.class, "energyBazookaMain", @@ -99,13 +149,37 @@ public class CommonProxy { true); EntityRegistry.registerModEntity(EntityMeteor.class, "meteor", 13, AlchemicalWizardry.instance, 120, 3, true); EntityRegistry.registerModEntity( - EntitySpellProjectile.class, "spellProjectile", 14, AlchemicalWizardry.instance, 128, 3, true); + EntitySpellProjectile.class, + "spellProjectile", + 14, + AlchemicalWizardry.instance, + 128, + 3, + true); EntityRegistry.registerModEntity( - EntityParticleBeam.class, "particleBeam", 15, AlchemicalWizardry.instance, 120, 3, true); + EntityParticleBeam.class, + "particleBeam", + 15, + AlchemicalWizardry.instance, + 120, + 3, + true); EntityRegistry.registerModEntity( - MailOrderEntityItem.class, "catalogueEntityItem", 16, AlchemicalWizardry.instance, 120, 3, true); + MailOrderEntityItem.class, + "catalogueEntityItem", + 16, + AlchemicalWizardry.instance, + 120, + 3, + true); EntityRegistry.registerModEntity( - BookEntityItem.class, "bookEntityItem", 17, AlchemicalWizardry.instance, 120, 3, true); + BookEntityItem.class, + "bookEntityItem", + 17, + AlchemicalWizardry.instance, + 120, + 3, + true); } public void registerTickHandlers() {} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/CoordAndRange.java b/src/main/java/WayofTime/alchemicalWizardry/common/CoordAndRange.java index cd36c0dd..1c897c20 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/CoordAndRange.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/CoordAndRange.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common; public class CoordAndRange { + public int xCoord; public int yCoord; public int zCoord; @@ -18,8 +19,7 @@ public class CoordAndRange { @Override public boolean equals(Object o) { return o instanceof CoordAndRange - ? ((CoordAndRange) o).xCoord == this.xCoord - && ((CoordAndRange) o).yCoord == this.yCoord + ? ((CoordAndRange) o).xCoord == this.xCoord && ((CoordAndRange) o).yCoord == this.yCoord && ((CoordAndRange) o).zCoord == this.zCoord && ((CoordAndRange) o).horizRadius == this.horizRadius && ((CoordAndRange) o).vertRadius == this.vertRadius diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java b/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java index 9c138c1d..4cec30e9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java @@ -1,9 +1,11 @@ package WayofTime.alchemicalWizardry.common; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; import net.minecraft.entity.ai.EntityAINearestAttackableTarget; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; + public class EntityAITargetAggro extends EntityAINearestAttackableTarget { + private EntityDemon theCreature; public EntityAITargetAggro(EntityDemon par1EntityDemon, Class par2Class, int par3, boolean par4) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggroCloaking.java b/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggroCloaking.java index 6751b97a..d9c84d8c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggroCloaking.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggroCloaking.java @@ -1,14 +1,16 @@ package WayofTime.alchemicalWizardry.common; +import net.minecraft.entity.EntityLivingBase; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; -import net.minecraft.entity.EntityLivingBase; public class EntityAITargetAggroCloaking extends EntityAITargetAggro { + int cloakLevel; // Level of cloaking that the owner demon is fooled by - public EntityAITargetAggroCloaking( - EntityDemon par1EntityDemon, Class par2Class, int par3, boolean par4, int cloak) { + public EntityAITargetAggroCloaking(EntityDemon par1EntityDemon, Class par2Class, int par3, boolean par4, + int cloak) { super(par1EntityDemon, par2Class, par3, par4); this.cloakLevel = cloak; } @@ -19,8 +21,7 @@ public class EntityAITargetAggroCloaking extends EntityAITargetAggro { boolean cloakActive = false; if (target != null && target.isPotionActive(AlchemicalWizardry.customPotionBoost.id)) { - cloakActive = target.getActivePotionEffect(AlchemicalWizardry.customPotionBoost) - .getAmplifier() + cloakActive = target.getActivePotionEffect(AlchemicalWizardry.customPotionBoost).getAmplifier() >= cloakLevel; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/IBindingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/IBindingAgent.java index e8e160b7..4c932b39 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/IBindingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/IBindingAgent.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.common; public interface IBindingAgent { + float getSuccessRateForPotionNumber(int potionEffects); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/ICatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/ICatalyst.java index 446bff08..9509f626 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/ICatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/ICatalyst.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common; public interface ICatalyst { + int getCatalystLevel(); boolean isConcentration(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/IDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/IDemon.java index f11e4776..6d5e08bb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/IDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/IDemon.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common; public interface IDemon { + void setSummonedConditions(); boolean isAggro(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/IFillingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/IFillingAgent.java index a199ae9e..785a15c9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/IFillingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/IFillingAgent.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.common; public interface IFillingAgent { + int getFilledAmountForPotionNumber(int potionEffects); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/ItemType.java b/src/main/java/WayofTime/alchemicalWizardry/common/ItemType.java index 2e9dc979..260c0e90 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/ItemType.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/ItemType.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common; import java.util.Objects; + import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -12,6 +13,7 @@ import net.minecraft.nbt.NBTTagCompound; * @author ljfa-ag */ public class ItemType { + public final Item item; public final int meta; public final NBTTagCompound nbtTag; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java index a2759e56..6dc91c08 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java @@ -1,9 +1,5 @@ package WayofTime.alchemicalWizardry.common; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.ModItems; -import cpw.mods.fml.common.eventhandler.Event.Result; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.block.Block; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; @@ -11,7 +7,13 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.event.entity.player.FillBucketEvent; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.ModItems; +import cpw.mods.fml.common.eventhandler.Event.Result; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + public class LifeBucketHandler { + @SubscribeEvent public void onBucketFill(FillBucketEvent event) { if (event.current.getItem() != Items.bucket) return; @@ -27,8 +29,7 @@ public class LifeBucketHandler { public ItemStack fillCustomBucket(World world, MovingObjectPosition pos) { Block block = world.getBlock(pos.blockX, pos.blockY, pos.blockZ); - if (block != null - && (block.equals(ModBlocks.blockLifeEssence)) + if (block != null && (block.equals(ModBlocks.blockLifeEssence)) && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0) { world.setBlockToAir(pos.blockX, pos.blockY, pos.blockZ); return new ItemStack(ModItems.bucketLife); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/LifeEssence.java b/src/main/java/WayofTime/alchemicalWizardry/common/LifeEssence.java index 6370a458..482ad40a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/LifeEssence.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/LifeEssence.java @@ -4,6 +4,7 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; public class LifeEssence extends Fluid { + public LifeEssence(String fluidName) { super(fluidName); this.setDensity(2000); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/MessageKeyPressed.java b/src/main/java/WayofTime/alchemicalWizardry/common/MessageKeyPressed.java index f2a0649d..72baa4e6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/MessageKeyPressed.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/MessageKeyPressed.java @@ -1,14 +1,16 @@ package WayofTime.alchemicalWizardry.common; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; 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 io.netty.buffer.ByteBuf; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; public class MessageKeyPressed implements IMessage, IMessageHandler { + private byte keyPressed; public MessageKeyPressed() {} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java b/src/main/java/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java index dc8afa0c..90535d38 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common; -import WayofTime.alchemicalWizardry.ModItems; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraftforge.event.entity.living.LivingDropsEvent; +import WayofTime.alchemicalWizardry.ModItems; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + public class ModLivingDropsEvent { + public static double rand; @SubscribeEvent @@ -19,10 +21,9 @@ public class ModLivingDropsEvent { PotionEffect effect = event.entityLiving.getActivePotionEffect(Potion.weakness); if (effect != null) { - if (effect.getAmplifier() >= 2) - if (rand < 0.50d) { - event.entityLiving.dropItem(ModItems.weakBloodShard, 1); - } + if (effect.getAmplifier() >= 2) if (rand < 0.50d) { + event.entityLiving.dropItem(ModItems.weakBloodShard, 1); + } } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java index 56b481d6..77b6dfbd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java @@ -1,5 +1,17 @@ package WayofTime.alchemicalWizardry.common; +import java.util.EnumMap; +import java.util.LinkedList; +import java.util.List; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.network.Packet; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.ColourAndCoords; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; @@ -25,18 +37,9 @@ import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelFutureListener; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.SimpleChannelInboundHandler; -import java.util.EnumMap; -import java.util.LinkedList; -import java.util.List; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.network.Packet; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; public enum NewPacketHandler { + INSTANCE; private EnumMap channels; @@ -67,15 +70,12 @@ public enum NewPacketHandler { clientChannel.pipeline().addAfter(tileAltarCodec, "ParticleHandler", new ParticleMessageHandler()); clientChannel.pipeline().addAfter(tileAltarCodec, "VelocityHandler", new VelocityMessageHandler()); clientChannel.pipeline().addAfter(tileAltarCodec, "TEMasterStoneHandler", new TEMasterStoneMessageHandler()); - clientChannel - .pipeline() + clientChannel.pipeline() .addAfter(tileAltarCodec, "TEReagentConduitHandler", new TEReagentConduitMessageHandler()); clientChannel.pipeline().addAfter(tileAltarCodec, "CurrentLPMessageHandler", new CurrentLPMessageHandler()); - clientChannel - .pipeline() + clientChannel.pipeline() .addAfter(tileAltarCodec, "CurrentReagentBarMessageHandler", new CurrentReagentBarMessageHandler()); - clientChannel - .pipeline() + clientChannel.pipeline() .addAfter(tileAltarCodec, "CurrentAddedHPMessageHandler", new CurrentAddedHPMessageHandler()); } @@ -88,6 +88,7 @@ public enum NewPacketHandler { } private static class TEAltarMessageHandler extends SimpleChannelInboundHandler { + @Override protected void channelRead0(ChannelHandlerContext ctx, TEAltarMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); @@ -101,6 +102,7 @@ public enum NewPacketHandler { } private static class TEOrientableMessageHandler extends SimpleChannelInboundHandler { + @Override protected void channelRead0(ChannelHandlerContext ctx, TEOrientableMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); @@ -113,6 +115,7 @@ public enum NewPacketHandler { } private static class TEPedestalMessageHandler extends SimpleChannelInboundHandler { + @Override protected void channelRead0(ChannelHandlerContext ctx, TEPedestalMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); @@ -126,6 +129,7 @@ public enum NewPacketHandler { } private static class TEPlinthMessageHandler extends SimpleChannelInboundHandler { + @Override protected void channelRead0(ChannelHandlerContext ctx, TEPlinthMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); @@ -139,6 +143,7 @@ public enum NewPacketHandler { } private static class TESocketMessageHandler extends SimpleChannelInboundHandler { + @Override protected void channelRead0(ChannelHandlerContext ctx, TESocketMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); @@ -152,6 +157,7 @@ public enum NewPacketHandler { } private static class TETeleposerMessageHandler extends SimpleChannelInboundHandler { + @Override protected void channelRead0(ChannelHandlerContext ctx, TETeleposerMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); @@ -165,6 +171,7 @@ public enum NewPacketHandler { } private static class TEWritingTableMessageHandler extends SimpleChannelInboundHandler { + @Override protected void channelRead0(ChannelHandlerContext ctx, TEWritingTableMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); @@ -178,6 +185,7 @@ public enum NewPacketHandler { } private static class ParticleMessageHandler extends SimpleChannelInboundHandler { + @Override protected void channelRead0(ChannelHandlerContext ctx, ParticleMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); @@ -187,6 +195,7 @@ public enum NewPacketHandler { } private static class VelocityMessageHandler extends SimpleChannelInboundHandler { + @Override protected void channelRead0(ChannelHandlerContext ctx, VelocityMessage msg) throws Exception { EntityPlayer player = Minecraft.getMinecraft().thePlayer; @@ -200,6 +209,7 @@ public enum NewPacketHandler { } private static class TEMasterStoneMessageHandler extends SimpleChannelInboundHandler { + @Override protected void channelRead0(ChannelHandlerContext ctx, TEMasterStoneMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); @@ -214,6 +224,7 @@ public enum NewPacketHandler { } private static class TEReagentConduitMessageHandler extends SimpleChannelInboundHandler { + @Override protected void channelRead0(ChannelHandlerContext ctx, TEReagentConduitMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); @@ -227,6 +238,7 @@ public enum NewPacketHandler { } private static class CurrentLPMessageHandler extends SimpleChannelInboundHandler { + @Override protected void channelRead0(ChannelHandlerContext ctx, CurrentLPMessage msg) throws Exception { EntityPlayer player = Minecraft.getMinecraft().thePlayer; @@ -237,6 +249,7 @@ public enum NewPacketHandler { } private static class CurrentReagentBarMessageHandler extends SimpleChannelInboundHandler { + @Override protected void channelRead0(ChannelHandlerContext ctx, CurrentReagentBarMessage msg) throws Exception { EntityPlayer player = Minecraft.getMinecraft().thePlayer; @@ -248,6 +261,7 @@ public enum NewPacketHandler { } private static class CurrentAddedHPMessageHandler extends SimpleChannelInboundHandler { + @Override protected void channelRead0(ChannelHandlerContext ctx, CurrentAddedHPMessage msg) throws Exception { EntityPlayer player = Minecraft.getMinecraft().thePlayer; @@ -258,6 +272,7 @@ public enum NewPacketHandler { } private static class KeyboardMessageHandler extends SimpleChannelInboundHandler { + public KeyboardMessageHandler() { System.out.println("I am being created"); } @@ -269,10 +284,12 @@ public enum NewPacketHandler { } public static class BMMessage { + int index; } public static class TEAltarMessage extends BMMessage { + int x; int y; int z; @@ -283,6 +300,7 @@ public enum NewPacketHandler { } public static class TEOrientableMessage extends BMMessage { + int x; int y; int z; @@ -292,6 +310,7 @@ public enum NewPacketHandler { } public static class TEPedestalMessage extends BMMessage { + int x; int y; int z; @@ -300,6 +319,7 @@ public enum NewPacketHandler { } public static class TEPlinthMessage extends BMMessage { + int x; int y; int z; @@ -308,6 +328,7 @@ public enum NewPacketHandler { } public static class TESocketMessage extends BMMessage { + int x; int y; int z; @@ -316,6 +337,7 @@ public enum NewPacketHandler { } public static class TETeleposerMessage extends BMMessage { + int x; int y; int z; @@ -324,6 +346,7 @@ public enum NewPacketHandler { } public static class TEWritingTableMessage extends BMMessage { + int x; int y; int z; @@ -332,6 +355,7 @@ public enum NewPacketHandler { } public static class ParticleMessage extends BMMessage { + String particle; double xCoord; @@ -344,12 +368,14 @@ public enum NewPacketHandler { } public static class VelocityMessage extends BMMessage { + double xVel; double yVel; double zVel; } public static class TEMasterStoneMessage extends BMMessage { + int x; int y; int z; @@ -359,6 +385,7 @@ public enum NewPacketHandler { } public static class TEReagentConduitMessage extends BMMessage { + int x; int y; int z; @@ -367,35 +394,39 @@ public enum NewPacketHandler { } public static class CurrentLPMessage extends BMMessage { + int currentLP; int maxLP; } public static class CurrentReagentBarMessage extends BMMessage { + String reagent; float currentAR; float maxAR; } public static class CurrentAddedHPMessage extends BMMessage { + float currentHP; float maxHP; } public static class KeyboardMessage extends BMMessage { + byte keyPressed; } private class ClientToServerCodec extends FMLIndexedMessageToMessageCodec { + public ClientToServerCodec() {} @Override public void encodeInto(ChannelHandlerContext ctx, BMMessage msg, ByteBuf target) throws Exception { target.writeInt(msg.index); - // switch(msg.index) - { - } + // switch(msg.index) + {} } @Override @@ -404,13 +435,13 @@ public enum NewPacketHandler { System.out.println("Packet is recieved and being decoded"); - // switch(index) - { - } + // switch(index) + {} } } private class TEAltarCodec extends FMLIndexedMessageToMessageCodec { + public TEAltarCodec() { addDiscriminator(0, TEAltarMessage.class); addDiscriminator(1, TEOrientableMessage.class); @@ -662,10 +693,9 @@ public enum NewPacketHandler { boolean hasFluids = dat.readBoolean(); ((TEAltarMessage) msg).fluids = new int[6]; - if (hasFluids) - for (int i = 0; i < ((TEAltarMessage) msg).fluids.length; i++) { - ((TEAltarMessage) msg).fluids[i] = dat.readInt(); - } + if (hasFluids) for (int i = 0; i < ((TEAltarMessage) msg).fluids.length; i++) { + ((TEAltarMessage) msg).fluids[i] = dat.readInt(); + } ((TEAltarMessage) msg).capacity = dat.readInt(); @@ -820,14 +850,15 @@ public enum NewPacketHandler { List list = new LinkedList(); for (int i = 0; i < listSize; i++) { - list.add(new ColourAndCoords( - dat.readInt(), - dat.readInt(), - dat.readInt(), - dat.readInt(), - dat.readInt(), - dat.readInt(), - dat.readInt())); + list.add( + new ColourAndCoords( + dat.readInt(), + dat.readInt(), + dat.readInt(), + dat.readInt(), + dat.readInt(), + dat.readInt(), + dat.readInt())); } ((TEReagentConduitMessage) msg).destinationList = list; @@ -948,8 +979,8 @@ public enum NewPacketHandler { return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg); } - public static Packet getParticlePacket( - String str, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel) { + public static Packet getParticlePacket(String str, double xCoord, double yCoord, double zCoord, double xVel, + double yVel, double zVel) { ParticleMessage msg = new ParticleMessage(); msg.index = 7; msg.particle = str; @@ -1037,45 +1068,29 @@ public enum NewPacketHandler { } public void sendTo(Packet message, EntityPlayerMP player) { - this.channels - .get(Side.SERVER) - .attr(FMLOutboundHandler.FML_MESSAGETARGET) + this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET) .set(FMLOutboundHandler.OutboundTarget.PLAYER); - this.channels - .get(Side.SERVER) - .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS) - .set(player); + this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(player); this.channels.get(Side.SERVER).writeAndFlush(message); } public void sendToAll(Packet message) { - this.channels - .get(Side.SERVER) - .attr(FMLOutboundHandler.FML_MESSAGETARGET) + this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET) .set(FMLOutboundHandler.OutboundTarget.ALL); this.channels.get(Side.SERVER).writeAndFlush(message); } public void sendToAllAround(Packet message, NetworkRegistry.TargetPoint point) { - this.channels - .get(Side.SERVER) - .attr(FMLOutboundHandler.FML_MESSAGETARGET) + this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET) .set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT); - this.channels - .get(Side.SERVER) - .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS) - .set(point); + this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(point); this.channels.get(Side.SERVER).writeAndFlush(message); } public void sendToServer(Packet message) { - this.channels - .get(Side.CLIENT) - .attr(FMLOutboundHandler.FML_MESSAGETARGET) + this.channels.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET) .set(FMLOutboundHandler.OutboundTarget.TOSERVER); - this.channels - .get(Side.CLIENT) - .writeAndFlush(message) + this.channels.get(Side.CLIENT).writeAndFlush(message) .addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/PlinthComponent.java b/src/main/java/WayofTime/alchemicalWizardry/common/PlinthComponent.java index cc831b43..a05e361b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/PlinthComponent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/PlinthComponent.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common; public class PlinthComponent { + public int xOffset; public int yOffset; public int zOffset; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementTrigger.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementTrigger.java index d4f7356d..1f2f9bc0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementTrigger.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementTrigger.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.achievements; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.PlayerEvent; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.stats.Achievement; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.PlayerEvent; + public class AchievementTrigger { + @SubscribeEvent public void onItemPickedUp(PlayerEvent.ItemPickupEvent event) { for (Item item : AchievementsRegistry.pickupList) { @@ -35,8 +37,8 @@ public class AchievementTrigger { } } if (event.crafting.getItem() instanceof ItemBlock) { - Achievement achievement = AchievementsRegistry.getAchievementForBlock( - ((ItemBlock) event.crafting.getItem()).field_150939_a); + Achievement achievement = AchievementsRegistry + .getAchievementForBlock(((ItemBlock) event.crafting.getItem()).field_150939_a); if (achievement != null) { event.player.addStat(achievement, 1); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsMod.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsMod.java index d8c77dfa..10aa9a5c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsMod.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsMod.java @@ -2,12 +2,14 @@ package WayofTime.alchemicalWizardry.common.achievements; import java.util.ArrayList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.Achievement; public class AchievementsMod extends Achievement { + public static List achievements = new ArrayList(); public AchievementsMod(String name, int x, int y, ItemStack icon, Achievement parent) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java index 772bf7c1..e1adb20e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java @@ -1,26 +1,29 @@ package WayofTime.alchemicalWizardry.common.achievements; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.stats.Achievement; + import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.stats.Achievement; public class AchievementsRegistry { + public static final List craftinglist = new ArrayList(); public static final List pickupList = new ArrayList(); public static final List blockCraftingList = new ArrayList(); - // public final static List blockPickupList = new ArrayList(); + // public final static List blockPickupList = new ArrayList(); public static void init() { addItemsToCraftingList(); addBlocksToCraftingList(); addItemsToPickupList(); - // addBlocksToPickupList(); + // addBlocksToPickupList(); } public static void addItemsToCraftingList() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java index 1b18dd75..b893f6c9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.achievements; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.ModItems; -import cpw.mods.fml.common.FMLCommonHandler; import net.minecraft.item.ItemStack; import net.minecraft.stats.Achievement; import net.minecraftforge.common.AchievementPage; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.ModItems; +import cpw.mods.fml.common.FMLCommonHandler; + public class ModAchievements { + public static AchievementPage alchemicalWizardryPage; public static Achievement firstPrick; @@ -58,8 +60,8 @@ public class ModAchievements { suppressionSigil = new AchievementsMod("suppressionSigil", 6, -2, ModItems.itemSigilOfSupression, masterOrb); archmageOrb = new AchievementsMod("archmageOrb", -1, 2, ModItems.archmageBloodOrb, masterOrb); energyBazooka = new AchievementsMod("energyBazooka", -3, 2, ModItems.energyBazooka, archmageOrb); - demons = - new AchievementsMod("demons", 0, 3, new ItemStack(ModItems.baseItems, 1, 29), archmageOrb).setSpecial(); + demons = new AchievementsMod("demons", 0, 3, new ItemStack(ModItems.baseItems, 1, 29), archmageOrb) + .setSpecial(); transcendentOrb = new AchievementsMod("trancsendentOrb", 0, 5, ModItems.transcendentBloodOrb, demons); alchemicalWizardryPage = new AchievementPage( diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionComponent.java b/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionComponent.java index a57dd42e..92bf15a3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionComponent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionComponent.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.alchemy; import net.minecraft.potion.Potion; public class CombinedPotionComponent { + public Potion result; public Potion pot1; public Potion pot2; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionRegistry.java index 89db6267..f3b6efe8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionRegistry.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.alchemy; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper; -import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask; import java.util.ArrayList; import java.util.List; + import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper; +import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask; + public class CombinedPotionRegistry { + public static List potionList = new ArrayList(); public static void registerCombinedPotionRecipe(Potion result, Potion pot1, Potion pot2) { @@ -83,7 +86,10 @@ public class CombinedPotionRegistry { if (potEffect != null) { AlchemyPotionHelper potHelper = new AlchemyPotionHelper( - potEffect.getPotionID(), potEffect.getDuration(), 0, potEffect.getAmplifier()); + potEffect.getPotionID(), + potEffect.getDuration(), + 0, + potEffect.getAmplifier()); list.remove(helper1); list.remove(helper2); @@ -138,8 +144,7 @@ public class CombinedPotionRegistry { if (isRecipeValid(pot1, pot2)) { int duration = (int) ((potE1.getTickDuration() * Math.pow(8.0f / 3.0f, potE1.getdurationFactor()) - + potE2.getdurationFactor() * Math.pow(8.0f / 3.0f, potE2.getdurationFactor())) - / 2.0); + + potE2.getdurationFactor() * Math.pow(8.0f / 3.0f, potE2.getdurationFactor())) / 2.0); int amplifier = (potE1.getConcentration() + potE2.getConcentration()) / 2; Potion pot = getPotion(pot1, pot2); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/ICombinationalCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/ICombinationalCatalyst.java index 5a6d0096..e877143a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/ICombinationalCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/ICombinationalCatalyst.java @@ -1,3 +1,4 @@ package WayofTime.alchemicalWizardry.common.alchemy; -public interface ICombinationalCatalyst {} +public interface ICombinationalCatalyst { +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/ArmourForge.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/ArmourForge.java index 942c5aac..6d7366c4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/ArmourForge.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/ArmourForge.java @@ -1,16 +1,8 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.ArmourComponent; -import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -23,7 +15,18 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.common.ArmourComponent; +import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ArmourForge extends Block { + public static List helmetList = new ArrayList(); public static List plateList = new ArrayList(); public static List leggingsList = new ArrayList(); @@ -44,8 +47,8 @@ public class ArmourForge extends Block { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, + float these, float are) { if (world.isRemote) { return false; } @@ -143,7 +146,16 @@ public class ArmourForge extends Block { for (int i = 0; i < 8; i++) { SpellHelper.sendIndexedParticleToAllAround( - world, xCoord, yCoord, zCoord, 20, world.provider.dimensionId, 1, xCoord, yCoord, zCoord); + world, + xCoord, + yCoord, + zCoord, + 20, + world.provider.dimensionId, + 1, + xCoord, + yCoord, + zCoord); } if (itemStack != null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicCalcinator.java index 5d058bc0..85d1b1e9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicCalcinator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicCalcinator.java @@ -1,10 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; @@ -16,7 +13,13 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; +import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; + public class BlockAlchemicCalcinator extends BlockContainer { + public BlockAlchemicCalcinator() { super(Material.rock); setHardness(2.0F); @@ -86,8 +89,7 @@ public class BlockAlchemicCalcinator extends BlockContainer { new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) - item.getTagCompound().copy()); + entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); } float factor = 0.05F; @@ -101,8 +103,8 @@ public class BlockAlchemicCalcinator extends BlockContainer { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, + float these, float are) { TEAlchemicCalcinator tileEntity = (TEAlchemicCalcinator) world.getTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java index 3989a68a..a410121f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java @@ -1,14 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.items.IAltarManipulator; -import WayofTime.alchemicalWizardry.common.items.EnergyBattery; -import WayofTime.alchemicalWizardry.common.items.sigil.holding.SigilOfHolding; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; @@ -22,7 +15,17 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.items.IAltarManipulator; +import WayofTime.alchemicalWizardry.common.items.EnergyBattery; +import WayofTime.alchemicalWizardry.common.items.sigil.holding.SigilOfHolding; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockAltar extends BlockContainer { + @SideOnly(Side.CLIENT) private IIcon topIcon; @@ -86,8 +89,8 @@ public class BlockAltar extends BlockContainer { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, + float these, float are) { TEAltar tileEntity = (TEAltar) world.getTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { @@ -184,8 +187,7 @@ public class BlockAltar extends BlockContainer { new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) - item.getTagCompound().copy()); + entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); } float factor = 0.05F; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java index 47735a73..d5f93a30 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java @@ -1,15 +1,8 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.List; + import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; @@ -22,7 +15,17 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockBelljar extends BlockContainer { + public BlockBelljar() { super(Material.glass); setHardness(2.0F); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java index ff1201ed..240616f9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java @@ -1,9 +1,8 @@ package WayofTime.alchemicalWizardry.common.block; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; 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; @@ -12,7 +11,11 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockBloodLightSource extends Block { + public BlockBloodLightSource() { super(Material.cloth); this.setBlockName("blockBloodLightSource"); @@ -58,14 +61,8 @@ public class BlockBloodLightSource extends Block { } @Override - public void addCollisionBoxesToList( - World par1World, - int par2, - int par3, - int par4, - AxisAlignedBB par5AxisAlignedBB, - List par6List, - Entity par7Entity) { + public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, + List par6List, Entity par7Entity) { this.setBlockBounds(0.40F, 0.40F, 0.40F, 0.60F, 0.60F, 0.60F); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockConduit.java index 9f56663e..f28b1f6d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockConduit.java @@ -1,16 +1,18 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockConduit extends BlockOrientable { + @SideOnly(Side.CLIENT) private IIcon topIcon; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrucible.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrucible.java index 3021627b..88367e59 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrucible.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrucible.java @@ -1,11 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.sacrifice.IIncense; -import WayofTime.alchemicalWizardry.common.tileEntity.TECrucible; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; @@ -20,7 +16,14 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.sacrifice.IIncense; +import WayofTime.alchemicalWizardry.common.tileEntity.TECrucible; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockCrucible extends BlockContainer { + @SideOnly(Side.CLIENT) private IIcon topIcon; @@ -40,8 +43,8 @@ public class BlockCrucible extends BlockContainer { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, + float these, float are) { TECrucible tileEntity = (TECrucible) world.getTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { @@ -55,10 +58,10 @@ public class BlockCrucible extends BlockContainer { newItem.stackSize = 1; --playerItem.stackSize; tileEntity.setInventorySlotContents(0, newItem); - // } else if (tileEntity.getStackInSlot(0) != null && playerItem == null) //Disabled currently - // { - // player.inventory.addItemStackToInventory(tileEntity.getStackInSlot(0)); - // tileEntity.setInventorySlotContents(0, null); + // } else if (tileEntity.getStackInSlot(0) != null && playerItem == null) //Disabled currently + // { + // player.inventory.addItemStackToInventory(tileEntity.getStackInSlot(0)); + // tileEntity.setInventorySlotContents(0, null); } world.markBlockForUpdate(x, y, z); return true; @@ -85,11 +88,11 @@ public class BlockCrucible extends BlockContainer { } } - // @Override - // public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) - // { - // return null; - // } + // @Override + // public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) + // { + // return null; + // } @Override public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) { @@ -164,8 +167,7 @@ public class BlockCrucible extends BlockContainer { new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) - item.getTagCompound().copy()); + entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); } float factor = 0.05F; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrystal.java index ce82533a..466b996a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrystal.java @@ -1,10 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModBlocks; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -13,7 +10,13 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModBlocks; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockCrystal extends Block { + // private Icon bloodRuneIcon; @SideOnly(Side.CLIENT) private IIcon fullIcon; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockDemonPortal.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockDemonPortal.java index 7044db5c..5ca03c8a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockDemonPortal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockDemonPortal.java @@ -1,9 +1,5 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -11,7 +7,13 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockDemonPortal extends BlockContainer { + public BlockDemonPortal() { super(Material.rock); setHardness(1000); @@ -42,8 +44,8 @@ public class BlockDemonPortal extends BlockContainer { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, + float these, float are) { if (world.isRemote) { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java index 11df4f3c..aba92c92 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java @@ -1,10 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.omega.IEnchantmentGlyph; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -14,7 +11,13 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.omega.IEnchantmentGlyph; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph { + @SideOnly(Side.CLIENT) private IIcon enchantability; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockHomHeart.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockHomHeart.java index f0a44392..7e807383 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockHomHeart.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockHomHeart.java @@ -1,10 +1,5 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.items.BlankSpell; -import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -15,7 +10,14 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.items.BlankSpell; +import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockHomHeart extends BlockContainer { + @SideOnly(Side.CLIENT) private IIcon bottomIcon; @@ -55,8 +57,8 @@ public class BlockHomHeart extends BlockContainer { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, + float these, float are) { TEHomHeart tileEntity = (TEHomHeart) world.getTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java index 7bf662d6..62303eac 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java @@ -1,10 +1,5 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.items.ActivationCrystal; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -15,7 +10,14 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.Explosion; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.items.ActivationCrystal; +import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockMasterStone extends BlockContainer { + public BlockMasterStone() { super(Material.iron); setHardness(2.0F); @@ -50,8 +52,8 @@ public class BlockMasterStone extends BlockContainer { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, + float these, float are) { TEMasterStone tileEntity = (TEMasterStone) world.getTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { @@ -71,9 +73,13 @@ public class BlockMasterStone extends BlockContainer { } ActivationCrystal acItem = (ActivationCrystal) item; - // tileEntity.setOwner(acItem.getOwnerName(playerItem)); + // tileEntity.setOwner(acItem.getOwnerName(playerItem)); tileEntity.activateRitual( - world, acItem.getCrystalLevel(playerItem), playerItem, player, acItem.getOwnerName(playerItem)); + world, + acItem.getCrystalLevel(playerItem), + playerItem, + player, + acItem.getOwnerName(playerItem)); world.markBlockForUpdate(x, y, z); return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockOrientable.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockOrientable.java index bfe1beeb..e1634bbb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockOrientable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockOrientable.java @@ -1,7 +1,5 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEOrientable; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; @@ -9,7 +7,11 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.tileEntity.TEOrientable; + public class BlockOrientable extends BlockContainer { + public BlockOrientable() { super(Material.rock); setHardness(2.0F); @@ -23,8 +25,8 @@ public class BlockOrientable extends BlockContainer { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, + float these, float are) { // Right-click orients the output face. Shift-right-click orients the input face. if (world.isRemote) { return false; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java index 4c7e4a6a..b7f85139 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java @@ -1,10 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; @@ -18,7 +15,13 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockPedestal extends BlockContainer { + @SideOnly(Side.CLIENT) private IIcon topIcon; @@ -60,8 +63,8 @@ public class BlockPedestal extends BlockContainer { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, + float these, float are) { TEPedestal tileEntity = (TEPedestal) world.getTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { @@ -115,8 +118,7 @@ public class BlockPedestal extends BlockContainer { new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) - item.getTagCompound().copy()); + entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); } float factor = 0.05F; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java index 653abb39..8e00ef68 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java @@ -1,10 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; @@ -18,7 +15,13 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockPlinth extends BlockContainer { + @SideOnly(Side.CLIENT) private IIcon topIcon; @@ -60,8 +63,8 @@ public class BlockPlinth extends BlockContainer { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, + float these, float are) { TEPlinth tileEntity = (TEPlinth) world.getTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { @@ -115,8 +118,7 @@ public class BlockPlinth extends BlockContainer { new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) - item.getTagCompound().copy()); + entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); } float factor = 0.05F; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockReagentConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockReagentConduit.java index 38030c78..c8680e3b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockReagentConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockReagentConduit.java @@ -1,9 +1,5 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -11,7 +7,13 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockReagentConduit extends BlockContainer { + public BlockReagentConduit() { super(Material.cloth); setHardness(2.0F); @@ -37,8 +39,8 @@ public class BlockReagentConduit extends BlockContainer { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, + float these, float are) { return super.onBlockActivated(world, x, y, z, player, side, what, these, are); } @@ -57,10 +59,10 @@ public class BlockReagentConduit extends BlockContainer { return -1; } - // @Override - // public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int + // @Override + // public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int // p_149668_4_) - // { - // return null; - // } + // { + // return null; + // } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java index 59cc37f0..86a44e1d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java @@ -1,18 +1,20 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.common.tileEntity.TESchematicSaver; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.tileEntity.TESchematicSaver; + public class BlockSchematicSaver extends BlockContainer { + public BlockSchematicSaver() { super(Material.rock); setHardness(2.0F); setResistance(5.0F); - // setCreativeTab(AlchemicalWizardry.tabBloodMagic); + // setCreativeTab(AlchemicalWizardry.tabBloodMagic); this.setBlockName("schematicSaver"); } @@ -22,8 +24,8 @@ public class BlockSchematicSaver extends BlockContainer { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, + float these, float are) { if (world.isRemote) { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSocket.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSocket.java index 84af885b..587df7d8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSocket.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSocket.java @@ -1,11 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; @@ -19,7 +15,14 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockSocket extends BlockContainer { + @SideOnly(Side.CLIENT) private IIcon topIcon; @@ -60,8 +63,8 @@ public class BlockSocket extends BlockContainer { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, + float these, float are) { TESocket tileEntity = (TESocket) world.getTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { @@ -120,8 +123,7 @@ public class BlockSocket extends BlockContainer { new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) - item.getTagCompound().copy()); + entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); } float factor = 0.05F; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectralContainer.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectralContainer.java index ce68ac85..3a7b90b7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectralContainer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectralContainer.java @@ -1,10 +1,8 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; import java.util.Random; + import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -14,7 +12,12 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockSpectralContainer extends BlockContainer { + public BlockSpectralContainer() { super(Material.cloth); this.setBlockName("blockSpectralContainer"); @@ -38,14 +41,8 @@ public class BlockSpectralContainer extends BlockContainer { } @Override - public void addCollisionBoxesToList( - World par1World, - int par2, - int par3, - int par4, - AxisAlignedBB par5AxisAlignedBB, - List par6List, - Entity par7Entity) {} + public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, + List par6List, Entity par7Entity) {} public int quantityDropped(Random par1Random) { return 0; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEffect.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEffect.java index 36527d44..f47a2ebf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEffect.java @@ -1,17 +1,20 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockSpellEffect extends BlockOrientable { + public BlockSpellEffect() { super(); this.setBlockName("blockSpellEffect"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEnhancement.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEnhancement.java index c277fe21..ea97bbb9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEnhancement.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEnhancement.java @@ -1,17 +1,20 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockSpellEnhancement extends BlockOrientable { + public BlockSpellEnhancement() { super(); this.setBlockName("blockSpellEnhancement"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellModifier.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellModifier.java index caab7826..b4fd9f75 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellModifier.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellModifier.java @@ -1,17 +1,20 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockSpellModifier extends BlockOrientable { + public BlockSpellModifier() { super(); this.setBlockName("blockSpellModifier"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java index e6c64488..08c9b123 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java @@ -1,11 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.common.items.ItemComplexSpellCrystal; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -14,7 +10,14 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.common.items.ItemComplexSpellCrystal; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockSpellParadigm extends BlockOrientable { + public BlockSpellParadigm() { super(); this.setBlockName("blockSpellParadigm"); @@ -42,8 +45,8 @@ public class BlockSpellParadigm extends BlockOrientable { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, + float these, float are) { ItemStack stack = player.getCurrentEquippedItem(); if (stack != null && stack.getItem() instanceof ItemComplexSpellCrystal) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java index a57257cb..5073f8e0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java @@ -1,10 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.omega.IStabilityGlyph; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -14,7 +11,13 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.omega.IStabilityGlyph; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockStabilityGlyph extends Block implements IStabilityGlyph { + @SideOnly(Side.CLIENT) private IIcon stability1; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java index 0eb0b5c1..8d8ecdeb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java @@ -1,17 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.event.TeleposeEvent; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; -import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; -import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -import codechicken.multipart.MultipartHelper; -import codechicken.multipart.TileMultipart; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockMobSpawner; @@ -29,7 +19,20 @@ import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.event.TeleposeEvent; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; +import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; +import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; +import codechicken.multipart.MultipartHelper; +import codechicken.multipart.TileMultipart; +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockTeleposer extends BlockContainer { + @SideOnly(Side.CLIENT) private IIcon topIcon; @@ -69,8 +72,8 @@ public class BlockTeleposer extends BlockContainer { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, + float these, float are) { ItemStack playerItem = player.getCurrentEquippedItem(); if (playerItem != null) { @@ -124,8 +127,7 @@ public class BlockTeleposer extends BlockContainer { new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) - item.getTagCompound().copy()); + entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); } float factor = 0.05F; @@ -143,28 +145,18 @@ public class BlockTeleposer extends BlockContainer { return new TETeleposer(); } - public static boolean swapBlocks( - Object caller, World worldI, World worldF, int xi, int yi, int zi, int xf, int yf, int zf) { + public static boolean swapBlocks(Object caller, World worldI, World worldF, int xi, int yi, int zi, int xf, int yf, + int zf) { return swapBlocks(caller, worldI, worldF, xi, yi, zi, xf, yf, zf, true, 3); } - public static boolean swapBlocksWithoutSound( - Object caller, World worldI, World worldF, int xi, int yi, int zi, int xf, int yf, int zf) { + public static boolean swapBlocksWithoutSound(Object caller, World worldI, World worldF, int xi, int yi, int zi, + int xf, int yf, int zf) { return swapBlocks(caller, worldI, worldF, xi, yi, zi, xf, yf, zf, false, 3); } - public static boolean swapBlocks( - Object caller, - World worldI, - World worldF, - int xi, - int yi, - int zi, - int xf, - int yf, - int zf, - boolean doSound, - int flag) { + public static boolean swapBlocks(Object caller, World worldI, World worldF, int xi, int yi, int zi, int xf, int yf, + int zf, boolean doSound, int flag) { TileEntity tileEntityI = worldI.getTileEntity(xi, yi, zi); TileEntity tileEntityF = worldF.getTileEntity(xf, yf, zf); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockWritingTable.java index 80a4742a..47d4b9c4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockWritingTable.java @@ -1,11 +1,8 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; @@ -21,7 +18,13 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockWritingTable extends BlockContainer { + @SideOnly(Side.CLIENT) private IIcon topIcon; @@ -61,8 +64,8 @@ public class BlockWritingTable extends BlockContainer { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int metadata, float what, float these, float are) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int metadata, float what, + float these, float are) { TileEntity tileEntity = world.getTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { @@ -105,8 +108,7 @@ public class BlockWritingTable extends BlockContainer { new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) - item.getTagCompound().copy()); + entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); } float factor = 0.05F; @@ -145,14 +147,8 @@ public class BlockWritingTable extends BlockContainer { } @Override - public void addCollisionBoxesToList( - World par1World, - int par2, - int par3, - int par4, - AxisAlignedBB par5AxisAlignedBB, - List par6List, - Entity par7Entity) { + public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, + List par6List, Entity par7Entity) { this.setBlockBounds(0.4375F, 0.0F, 0.4375F, 0.5625F, 0.9375F, 0.5625F); super.addCollisionBoxesToList(par1World, par2, par3, par4, par5AxisAlignedBB, par6List, par7Entity); this.setBlockBoundsForItemRender(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodRune.java index f7c7ab64..08a8d53e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodRune.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodRune.java @@ -1,10 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModBlocks; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -13,7 +10,13 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModBlocks; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BloodRune extends Block { + // private Icon bloodRuneIcon; @SideOnly(Side.CLIENT) private IIcon altarCapacityRuneIcon; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodStoneBrick.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodStoneBrick.java index 29a9087b..39758aa1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodStoneBrick.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodStoneBrick.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BloodStoneBrick extends Block { + public BloodStoneBrick() { super(Material.iron); setHardness(2.0F); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/EfficiencyRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/EfficiencyRune.java index 987dfd0a..41289931 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/EfficiencyRune.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/EfficiencyRune.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.block; +import net.minecraft.client.renderer.texture.IIconRegister; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class EfficiencyRune extends BloodRune { + public EfficiencyRune() { super(); this.setBlockName("efficiencyRune"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/EmptySocket.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/EmptySocket.java index 8d6d1a61..85425706 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/EmptySocket.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/EmptySocket.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class EmptySocket extends Block { + public EmptySocket() { super(Material.iron); setHardness(2.0F); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/IOrientable.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/IOrientable.java index 9b4fe29a..caa523e0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/IOrientable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/IOrientable.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.block; import net.minecraftforge.common.util.ForgeDirection; public interface IOrientable { + ForgeDirection getInputDirection(); ForgeDirection getOutputDirection(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/ImperfectRitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/ImperfectRitualStone.java index fea26ddc..378df271 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/ImperfectRitualStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/ImperfectRitualStone.java @@ -1,10 +1,5 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -16,7 +11,14 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ImperfectRitualStone extends Block { + public ImperfectRitualStone() { super(Material.iron); setHardness(2.0F); @@ -32,8 +34,8 @@ public class ImperfectRitualStone extends Block { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int side, float xOff, float yOff, float zOff) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float xOff, + float yOff, float zOff) { if (SpellHelper.isFakePlayer(player)) { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/LargeBloodStoneBrick.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/LargeBloodStoneBrick.java index 09186f55..97f8ab2c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/LargeBloodStoneBrick.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/LargeBloodStoneBrick.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class LargeBloodStoneBrick extends Block { + public LargeBloodStoneBrick() { super(Material.iron); setHardness(2.0F); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/LifeEssenceBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/LifeEssenceBlock.java index 7cbbc69c..d34a79e3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/LifeEssenceBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/LifeEssenceBlock.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; @@ -10,7 +7,12 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fluids.BlockFluidClassic; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class LifeEssenceBlock extends BlockFluidClassic { + public LifeEssenceBlock() { super(AlchemicalWizardry.lifeEssenceFluid, Material.water); AlchemicalWizardry.lifeEssenceFluid.setBlock(this); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/MimicBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/MimicBlock.java index f5f6fc94..f46d2930 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/MimicBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/MimicBlock.java @@ -1,9 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMimicBlock; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; @@ -20,13 +18,18 @@ import net.minecraft.util.Vec3; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.tileEntity.TEMimicBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class MimicBlock extends BlockContainer { + public MimicBlock() { super(Material.water); setHardness(2.0F); setResistance(5.0F); this.setBlockName("blockMimic"); - // this.setBlockBounds(0, 0, 0, 0, 0, 0); + // this.setBlockBounds(0, 0, 0, 0, 0, 0); } @Override @@ -156,8 +159,7 @@ public class MimicBlock extends BlockContainer { TEMimicBlock tile = (TEMimicBlock) world.getTileEntity(x, y, z); Block block = tile.getBlock(); - return block != null - ? block.getCollisionBoundingBoxFromPool(world, x, y, z) + return block != null ? block.getCollisionBoundingBoxFromPool(world, x, y, z) : super.getCollisionBoundingBoxFromPool(world, x, y, z); } @@ -186,19 +188,21 @@ public class MimicBlock extends BlockContainer { } } - public static void addHitEffect( - TEMimicBlock TE, - MovingObjectPosition target, - double x, - double y, - double z, - ItemStack itemStack, - EffectRenderer effectRenderer) { - EntityDiggingFX particle = - new EntityDiggingFX(TE.getWorldObj(), x, y, z, 0.0D, 0.0D, 0.0D, TE.getBlock(), TE.getMetaOfMimic()); - effectRenderer.addEffect(particle.applyColourMultiplier(target.blockX, target.blockY, target.blockZ) - .multiplyVelocity(0.2F) - .multipleParticleScaleBy(0.6F)); + public static void addHitEffect(TEMimicBlock TE, MovingObjectPosition target, double x, double y, double z, + ItemStack itemStack, EffectRenderer effectRenderer) { + EntityDiggingFX particle = new EntityDiggingFX( + TE.getWorldObj(), + x, + y, + z, + 0.0D, + 0.0D, + 0.0D, + TE.getBlock(), + TE.getMetaOfMimic()); + effectRenderer.addEffect( + particle.applyColourMultiplier(target.blockX, target.blockY, target.blockZ).multiplyVelocity(0.2F) + .multipleParticleScaleBy(0.6F)); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/RitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/RitualStone.java index e54e75e0..381d4fc1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/RitualStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/RitualStone.java @@ -1,10 +1,5 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.rituals.IRitualStone; -import WayofTime.alchemicalWizardry.common.items.ScribeTool; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -14,7 +9,14 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.rituals.IRitualStone; +import WayofTime.alchemicalWizardry.common.items.ScribeTool; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class RitualStone extends Block implements IRitualStone { + @SideOnly(Side.CLIENT) private IIcon blankIcon; @@ -62,8 +64,8 @@ public class RitualStone extends Block implements IRitualStone { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, + float these, float are) { ItemStack playerItem = player.getCurrentEquippedItem(); if (playerItem == null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSacrifice.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSacrifice.java index c62c3d14..e6e02dfa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSacrifice.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSacrifice.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.block; +import net.minecraft.client.renderer.texture.IIconRegister; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class RuneOfSacrifice extends BloodRune { + public RuneOfSacrifice() { super(); this.setBlockName("runeOfSacrifice"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSelfSacrifice.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSelfSacrifice.java index 294fb5a8..d698e1d4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSelfSacrifice.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSelfSacrifice.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.block; +import net.minecraft.client.renderer.texture.IIconRegister; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class RuneOfSelfSacrifice extends BloodRune { + public RuneOfSelfSacrifice() { super(); this.setBlockName("runeOfSelfSacrifice"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/SpectralBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/SpectralBlock.java index 6f28074f..e81b2b18 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/SpectralBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/SpectralBlock.java @@ -1,9 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; @@ -16,7 +14,12 @@ import net.minecraft.util.Facing; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SpectralBlock extends BlockContainer { + public SpectralBlock() { super(Material.rock); this.setBlockName("spectralBlock"); @@ -40,15 +43,14 @@ public class SpectralBlock extends BlockContainer { } @SideOnly(Side.CLIENT) - public boolean shouldSideBeRendered( - IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) { + public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, + int p_149646_5_) { Block block = p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_); - if (p_149646_1_.getBlockMetadata(p_149646_2_, p_149646_3_, p_149646_4_) - != p_149646_1_.getBlockMetadata( - p_149646_2_ - Facing.offsetsXForSide[p_149646_5_], - p_149646_3_ - Facing.offsetsYForSide[p_149646_5_], - p_149646_4_ - Facing.offsetsZForSide[p_149646_5_])) { + if (p_149646_1_.getBlockMetadata(p_149646_2_, p_149646_3_, p_149646_4_) != p_149646_1_.getBlockMetadata( + p_149646_2_ - Facing.offsetsXForSide[p_149646_5_], + p_149646_3_ - Facing.offsetsYForSide[p_149646_5_], + p_149646_4_ - Facing.offsetsZForSide[p_149646_5_])) { return true; } @@ -69,8 +71,8 @@ public class SpectralBlock extends BlockContainer { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, + float these, float are) { if (player.isSneaking()) { return false; } @@ -80,7 +82,12 @@ public class SpectralBlock extends BlockContainer { if (playerItem != null) { if (playerItem.getItem() instanceof ItemBlock) { world.setBlock( - x, y, z, ((ItemBlock) (playerItem.getItem())).field_150939_a, playerItem.getItemDamage(), 3); + x, + y, + z, + ((ItemBlock) (playerItem.getItem())).field_150939_a, + playerItem.getItemDamage(), + 3); if (!player.capabilities.isCreativeMode) { playerItem.stackSize--; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/SpeedRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/SpeedRune.java index 1e991c9d..8c26f276 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/SpeedRune.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/SpeedRune.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.block; +import net.minecraft.client.renderer.texture.IIconRegister; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class SpeedRune extends BloodRune { + public SpeedRune() { super(); this.setBlockName("speedRune"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarComponent.java b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarComponent.java index d9fc5fc0..d5a9465d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarComponent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarComponent.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade; import net.minecraft.block.Block; public class AltarComponent { + private int x; private int y; private int z; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarUpgradeComponent.java b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarUpgradeComponent.java index 55dca380..bbb0f993 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarUpgradeComponent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarUpgradeComponent.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade; public class AltarUpgradeComponent { + private int speedUpgrades; private int efficiencyUpgrades; private int sacrificeUpgrades; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/CompatChecks.java b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/CompatChecks.java index 1d40e218..e016d715 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/CompatChecks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/CompatChecks.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade; import WayofTime.alchemicalWizardry.api.BlockStack; + import com.cricketcraft.chisel.api.carving.CarvingUtils; import com.cricketcraft.chisel.api.carving.ICarvingGroup; import com.google.common.base.Strings; @@ -12,8 +13,7 @@ public class CompatChecks { ICarvingGroup group = CarvingUtils.getChiselRegistry().getGroup(blockStack.getBlock(), blockStack.getMeta()); if (group != null) { - String check = CarvingUtils.getChiselRegistry() - .getGroup(blockStack.getBlock(), blockStack.getMeta()) + String check = CarvingUtils.getChiselRegistry().getGroup(blockStack.getBlock(), blockStack.getMeta()) .getName(); if (Strings.isNullOrEmpty(check)) return false; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java index 87427c1b..5e070722 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java @@ -1,15 +1,18 @@ package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.BlockStack; import java.util.ArrayList; import java.util.Arrays; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.BlockStack; + public class UpgradedAltars { + public static List secondTierAltar = new ArrayList(); public static List thirdTierAltar = new ArrayList(); public static List fourthTierAltar = new ArrayList(); @@ -60,11 +63,11 @@ public class UpgradedAltars { } } - private static boolean checkAltarComponent( - AltarComponent altarComponent, IBlockAccess world, int x, int y, int z, int altarTier) { + private static boolean checkAltarComponent(AltarComponent altarComponent, IBlockAccess world, int x, int y, int z, + int altarTier) { Block block = world.getBlock(x + altarComponent.getX(), y + altarComponent.getY(), z + altarComponent.getZ()); - int metadata = - world.getBlockMetadata(x + altarComponent.getX(), y + altarComponent.getY(), z + altarComponent.getZ()); + int metadata = world + .getBlockMetadata(x + altarComponent.getX(), y + altarComponent.getY(), z + altarComponent.getZ()); if (altarComponent.isBloodRune()) { boolean result = false; BlockStack[] runes = getRuneOverrides(altarTier); @@ -72,8 +75,7 @@ public class UpgradedAltars { return false; } for (BlockStack rune : runes) { - result |= altarComponent.isUpgradeSlot() - ? block == rune.getBlock() && metadata == rune.getMeta() + result |= altarComponent.isUpgradeSlot() ? block == rune.getBlock() && metadata == rune.getMeta() : block == altarComponent.getBlock() && metadata == altarComponent.getMetadata(); } return result; @@ -97,10 +99,12 @@ public class UpgradedAltars { } for (AltarComponent altarComponent : list) { if (altarComponent.isUpgradeSlot()) { - Block block = - world.getBlock(x + altarComponent.getX(), y + altarComponent.getY(), z + altarComponent.getZ()); + Block block = world + .getBlock(x + altarComponent.getX(), y + altarComponent.getY(), z + altarComponent.getZ()); int metadata = world.getBlockMetadata( - x + altarComponent.getX(), y + altarComponent.getY(), z + altarComponent.getZ()); + x + altarComponent.getX(), + y + altarComponent.getY(), + z + altarComponent.getZ()); BlockStack blockStack = new BlockStack(block, metadata); switch (Arrays.asList(runes).indexOf(blockStack)) { case 1: @@ -145,538 +149,602 @@ public class UpgradedAltars { } public static void loadAltars() { - secondTierAltar.add(new AltarComponent( - -1, - -1, - -1, - AlchemicalWizardry.secondTierRunes[0].getBlock(), - AlchemicalWizardry.secondTierRunes[0].getMeta(), - true, - false)); - secondTierAltar.add(new AltarComponent( - 0, - -1, - -1, - AlchemicalWizardry.secondTierRunes[0].getBlock(), - AlchemicalWizardry.secondTierRunes[0].getMeta(), - true, - true)); - secondTierAltar.add(new AltarComponent( - 1, - -1, - -1, - AlchemicalWizardry.secondTierRunes[0].getBlock(), - AlchemicalWizardry.secondTierRunes[0].getMeta(), - true, - false)); - secondTierAltar.add(new AltarComponent( - -1, - -1, - 0, - AlchemicalWizardry.secondTierRunes[0].getBlock(), - AlchemicalWizardry.secondTierRunes[0].getMeta(), - true, - true)); - secondTierAltar.add(new AltarComponent( - 1, - -1, - 0, - AlchemicalWizardry.secondTierRunes[0].getBlock(), - AlchemicalWizardry.secondTierRunes[0].getMeta(), - true, - true)); - secondTierAltar.add(new AltarComponent( - -1, - -1, - 1, - AlchemicalWizardry.secondTierRunes[0].getBlock(), - AlchemicalWizardry.secondTierRunes[0].getMeta(), - true, - false)); - secondTierAltar.add(new AltarComponent( - 0, - -1, - 1, - AlchemicalWizardry.secondTierRunes[0].getBlock(), - AlchemicalWizardry.secondTierRunes[0].getMeta(), - true, - true)); - secondTierAltar.add(new AltarComponent( - 1, - -1, - 1, - AlchemicalWizardry.secondTierRunes[0].getBlock(), - AlchemicalWizardry.secondTierRunes[0].getMeta(), - true, - false)); + secondTierAltar.add( + new AltarComponent( + -1, + -1, + -1, + AlchemicalWizardry.secondTierRunes[0].getBlock(), + AlchemicalWizardry.secondTierRunes[0].getMeta(), + true, + false)); + secondTierAltar.add( + new AltarComponent( + 0, + -1, + -1, + AlchemicalWizardry.secondTierRunes[0].getBlock(), + AlchemicalWizardry.secondTierRunes[0].getMeta(), + true, + true)); + secondTierAltar.add( + new AltarComponent( + 1, + -1, + -1, + AlchemicalWizardry.secondTierRunes[0].getBlock(), + AlchemicalWizardry.secondTierRunes[0].getMeta(), + true, + false)); + secondTierAltar.add( + new AltarComponent( + -1, + -1, + 0, + AlchemicalWizardry.secondTierRunes[0].getBlock(), + AlchemicalWizardry.secondTierRunes[0].getMeta(), + true, + true)); + secondTierAltar.add( + new AltarComponent( + 1, + -1, + 0, + AlchemicalWizardry.secondTierRunes[0].getBlock(), + AlchemicalWizardry.secondTierRunes[0].getMeta(), + true, + true)); + secondTierAltar.add( + new AltarComponent( + -1, + -1, + 1, + AlchemicalWizardry.secondTierRunes[0].getBlock(), + AlchemicalWizardry.secondTierRunes[0].getMeta(), + true, + false)); + secondTierAltar.add( + new AltarComponent( + 0, + -1, + 1, + AlchemicalWizardry.secondTierRunes[0].getBlock(), + AlchemicalWizardry.secondTierRunes[0].getMeta(), + true, + true)); + secondTierAltar.add( + new AltarComponent( + 1, + -1, + 1, + AlchemicalWizardry.secondTierRunes[0].getBlock(), + AlchemicalWizardry.secondTierRunes[0].getMeta(), + true, + false)); - thirdTierAltar.add(new AltarComponent( - -1, - -1, - -1, - AlchemicalWizardry.secondTierRunes[0].getBlock(), - AlchemicalWizardry.secondTierRunes[0].getMeta(), - true, - true)); - thirdTierAltar.add(new AltarComponent( - 0, - -1, - -1, - AlchemicalWizardry.secondTierRunes[0].getBlock(), - AlchemicalWizardry.secondTierRunes[0].getMeta(), - true, - true)); - thirdTierAltar.add(new AltarComponent( - 1, - -1, - -1, - AlchemicalWizardry.secondTierRunes[0].getBlock(), - AlchemicalWizardry.secondTierRunes[0].getMeta(), - true, - true)); - thirdTierAltar.add(new AltarComponent( - -1, - -1, - 0, - AlchemicalWizardry.secondTierRunes[0].getBlock(), - AlchemicalWizardry.secondTierRunes[0].getMeta(), - true, - true)); - thirdTierAltar.add(new AltarComponent( - 1, - -1, - 0, - AlchemicalWizardry.secondTierRunes[0].getBlock(), - AlchemicalWizardry.secondTierRunes[0].getMeta(), - true, - true)); - thirdTierAltar.add(new AltarComponent( - -1, - -1, - 1, - AlchemicalWizardry.secondTierRunes[0].getBlock(), - AlchemicalWizardry.secondTierRunes[0].getMeta(), - true, - true)); - thirdTierAltar.add(new AltarComponent( - 0, - -1, - 1, - AlchemicalWizardry.secondTierRunes[0].getBlock(), - AlchemicalWizardry.secondTierRunes[0].getMeta(), - true, - true)); - thirdTierAltar.add(new AltarComponent( - 1, - -1, - 1, - AlchemicalWizardry.secondTierRunes[0].getBlock(), - AlchemicalWizardry.secondTierRunes[0].getMeta(), - true, - true)); - thirdTierAltar.add(new AltarComponent( - -3, - -1, - -3, - AlchemicalWizardry.specialAltarBlock[0].getBlock(), - AlchemicalWizardry.specialAltarBlock[0].getMeta(), - false, - false)); - thirdTierAltar.add(new AltarComponent( - -3, - 0, - -3, - AlchemicalWizardry.specialAltarBlock[0].getBlock(), - AlchemicalWizardry.specialAltarBlock[0].getMeta(), - false, - false)); - thirdTierAltar.add(new AltarComponent( - 3, - -1, - -3, - AlchemicalWizardry.specialAltarBlock[0].getBlock(), - AlchemicalWizardry.specialAltarBlock[0].getMeta(), - false, - false)); - thirdTierAltar.add(new AltarComponent( - 3, - 0, - -3, - AlchemicalWizardry.specialAltarBlock[0].getBlock(), - AlchemicalWizardry.specialAltarBlock[0].getMeta(), - false, - false)); - thirdTierAltar.add(new AltarComponent( - -3, - -1, - 3, - AlchemicalWizardry.specialAltarBlock[0].getBlock(), - AlchemicalWizardry.specialAltarBlock[0].getMeta(), - false, - false)); - thirdTierAltar.add(new AltarComponent( - -3, - 0, - 3, - AlchemicalWizardry.specialAltarBlock[0].getBlock(), - AlchemicalWizardry.specialAltarBlock[0].getMeta(), - false, - false)); - thirdTierAltar.add(new AltarComponent( - 3, - -1, - 3, - AlchemicalWizardry.specialAltarBlock[0].getBlock(), - AlchemicalWizardry.specialAltarBlock[0].getMeta(), - false, - false)); - thirdTierAltar.add(new AltarComponent( - 3, - 0, - 3, - AlchemicalWizardry.specialAltarBlock[0].getBlock(), - AlchemicalWizardry.specialAltarBlock[0].getMeta(), - false, - false)); - thirdTierAltar.add(new AltarComponent( - -3, - 1, - -3, - AlchemicalWizardry.specialAltarBlock[1].getBlock(), - AlchemicalWizardry.specialAltarBlock[1].getMeta(), - false, - false)); - thirdTierAltar.add(new AltarComponent( - 3, - 1, - -3, - AlchemicalWizardry.specialAltarBlock[1].getBlock(), - AlchemicalWizardry.specialAltarBlock[1].getMeta(), - false, - false)); - thirdTierAltar.add(new AltarComponent( - -3, - 1, - 3, - AlchemicalWizardry.specialAltarBlock[1].getBlock(), - AlchemicalWizardry.specialAltarBlock[1].getMeta(), - false, - false)); - thirdTierAltar.add(new AltarComponent( - 3, - 1, - 3, - AlchemicalWizardry.specialAltarBlock[1].getBlock(), - AlchemicalWizardry.specialAltarBlock[1].getMeta(), - false, - false)); + thirdTierAltar.add( + new AltarComponent( + -1, + -1, + -1, + AlchemicalWizardry.secondTierRunes[0].getBlock(), + AlchemicalWizardry.secondTierRunes[0].getMeta(), + true, + true)); + thirdTierAltar.add( + new AltarComponent( + 0, + -1, + -1, + AlchemicalWizardry.secondTierRunes[0].getBlock(), + AlchemicalWizardry.secondTierRunes[0].getMeta(), + true, + true)); + thirdTierAltar.add( + new AltarComponent( + 1, + -1, + -1, + AlchemicalWizardry.secondTierRunes[0].getBlock(), + AlchemicalWizardry.secondTierRunes[0].getMeta(), + true, + true)); + thirdTierAltar.add( + new AltarComponent( + -1, + -1, + 0, + AlchemicalWizardry.secondTierRunes[0].getBlock(), + AlchemicalWizardry.secondTierRunes[0].getMeta(), + true, + true)); + thirdTierAltar.add( + new AltarComponent( + 1, + -1, + 0, + AlchemicalWizardry.secondTierRunes[0].getBlock(), + AlchemicalWizardry.secondTierRunes[0].getMeta(), + true, + true)); + thirdTierAltar.add( + new AltarComponent( + -1, + -1, + 1, + AlchemicalWizardry.secondTierRunes[0].getBlock(), + AlchemicalWizardry.secondTierRunes[0].getMeta(), + true, + true)); + thirdTierAltar.add( + new AltarComponent( + 0, + -1, + 1, + AlchemicalWizardry.secondTierRunes[0].getBlock(), + AlchemicalWizardry.secondTierRunes[0].getMeta(), + true, + true)); + thirdTierAltar.add( + new AltarComponent( + 1, + -1, + 1, + AlchemicalWizardry.secondTierRunes[0].getBlock(), + AlchemicalWizardry.secondTierRunes[0].getMeta(), + true, + true)); + thirdTierAltar.add( + new AltarComponent( + -3, + -1, + -3, + AlchemicalWizardry.specialAltarBlock[0].getBlock(), + AlchemicalWizardry.specialAltarBlock[0].getMeta(), + false, + false)); + thirdTierAltar.add( + new AltarComponent( + -3, + 0, + -3, + AlchemicalWizardry.specialAltarBlock[0].getBlock(), + AlchemicalWizardry.specialAltarBlock[0].getMeta(), + false, + false)); + thirdTierAltar.add( + new AltarComponent( + 3, + -1, + -3, + AlchemicalWizardry.specialAltarBlock[0].getBlock(), + AlchemicalWizardry.specialAltarBlock[0].getMeta(), + false, + false)); + thirdTierAltar.add( + new AltarComponent( + 3, + 0, + -3, + AlchemicalWizardry.specialAltarBlock[0].getBlock(), + AlchemicalWizardry.specialAltarBlock[0].getMeta(), + false, + false)); + thirdTierAltar.add( + new AltarComponent( + -3, + -1, + 3, + AlchemicalWizardry.specialAltarBlock[0].getBlock(), + AlchemicalWizardry.specialAltarBlock[0].getMeta(), + false, + false)); + thirdTierAltar.add( + new AltarComponent( + -3, + 0, + 3, + AlchemicalWizardry.specialAltarBlock[0].getBlock(), + AlchemicalWizardry.specialAltarBlock[0].getMeta(), + false, + false)); + thirdTierAltar.add( + new AltarComponent( + 3, + -1, + 3, + AlchemicalWizardry.specialAltarBlock[0].getBlock(), + AlchemicalWizardry.specialAltarBlock[0].getMeta(), + false, + false)); + thirdTierAltar.add( + new AltarComponent( + 3, + 0, + 3, + AlchemicalWizardry.specialAltarBlock[0].getBlock(), + AlchemicalWizardry.specialAltarBlock[0].getMeta(), + false, + false)); + thirdTierAltar.add( + new AltarComponent( + -3, + 1, + -3, + AlchemicalWizardry.specialAltarBlock[1].getBlock(), + AlchemicalWizardry.specialAltarBlock[1].getMeta(), + false, + false)); + thirdTierAltar.add( + new AltarComponent( + 3, + 1, + -3, + AlchemicalWizardry.specialAltarBlock[1].getBlock(), + AlchemicalWizardry.specialAltarBlock[1].getMeta(), + false, + false)); + thirdTierAltar.add( + new AltarComponent( + -3, + 1, + 3, + AlchemicalWizardry.specialAltarBlock[1].getBlock(), + AlchemicalWizardry.specialAltarBlock[1].getMeta(), + false, + false)); + thirdTierAltar.add( + new AltarComponent( + 3, + 1, + 3, + AlchemicalWizardry.specialAltarBlock[1].getBlock(), + AlchemicalWizardry.specialAltarBlock[1].getMeta(), + false, + false)); for (int i = -2; i <= 2; i++) { - thirdTierAltar.add(new AltarComponent( - 3, - -2, - i, - AlchemicalWizardry.thirdTierRunes[0].getBlock(), - AlchemicalWizardry.thirdTierRunes[0].getMeta(), - true, - true)); - thirdTierAltar.add(new AltarComponent( - -3, - -2, - i, - AlchemicalWizardry.thirdTierRunes[0].getBlock(), - AlchemicalWizardry.thirdTierRunes[0].getMeta(), - true, - true)); - thirdTierAltar.add(new AltarComponent( - i, - -2, - 3, - AlchemicalWizardry.thirdTierRunes[0].getBlock(), - AlchemicalWizardry.thirdTierRunes[0].getMeta(), - true, - true)); - thirdTierAltar.add(new AltarComponent( - i, - -2, - -3, - AlchemicalWizardry.thirdTierRunes[0].getBlock(), - AlchemicalWizardry.thirdTierRunes[0].getMeta(), - true, - true)); + thirdTierAltar.add( + new AltarComponent( + 3, + -2, + i, + AlchemicalWizardry.thirdTierRunes[0].getBlock(), + AlchemicalWizardry.thirdTierRunes[0].getMeta(), + true, + true)); + thirdTierAltar.add( + new AltarComponent( + -3, + -2, + i, + AlchemicalWizardry.thirdTierRunes[0].getBlock(), + AlchemicalWizardry.thirdTierRunes[0].getMeta(), + true, + true)); + thirdTierAltar.add( + new AltarComponent( + i, + -2, + 3, + AlchemicalWizardry.thirdTierRunes[0].getBlock(), + AlchemicalWizardry.thirdTierRunes[0].getMeta(), + true, + true)); + thirdTierAltar.add( + new AltarComponent( + i, + -2, + -3, + AlchemicalWizardry.thirdTierRunes[0].getBlock(), + AlchemicalWizardry.thirdTierRunes[0].getMeta(), + true, + true)); } fourthTierAltar.addAll(thirdTierAltar); for (int i = -3; i <= 3; i++) { - fourthTierAltar.add(new AltarComponent( - 5, - -3, - i, - AlchemicalWizardry.fourthTierRunes[0].getBlock(), - AlchemicalWizardry.fourthTierRunes[0].getMeta(), - true, - true)); - fourthTierAltar.add(new AltarComponent( - -5, - -3, - i, - AlchemicalWizardry.fourthTierRunes[0].getBlock(), - AlchemicalWizardry.fourthTierRunes[0].getMeta(), - true, - true)); - fourthTierAltar.add(new AltarComponent( - i, - -3, - 5, - AlchemicalWizardry.fourthTierRunes[0].getBlock(), - AlchemicalWizardry.fourthTierRunes[0].getMeta(), - true, - true)); - fourthTierAltar.add(new AltarComponent( - i, - -3, - -5, - AlchemicalWizardry.fourthTierRunes[0].getBlock(), - AlchemicalWizardry.fourthTierRunes[0].getMeta(), - true, - true)); + fourthTierAltar.add( + new AltarComponent( + 5, + -3, + i, + AlchemicalWizardry.fourthTierRunes[0].getBlock(), + AlchemicalWizardry.fourthTierRunes[0].getMeta(), + true, + true)); + fourthTierAltar.add( + new AltarComponent( + -5, + -3, + i, + AlchemicalWizardry.fourthTierRunes[0].getBlock(), + AlchemicalWizardry.fourthTierRunes[0].getMeta(), + true, + true)); + fourthTierAltar.add( + new AltarComponent( + i, + -3, + 5, + AlchemicalWizardry.fourthTierRunes[0].getBlock(), + AlchemicalWizardry.fourthTierRunes[0].getMeta(), + true, + true)); + fourthTierAltar.add( + new AltarComponent( + i, + -3, + -5, + AlchemicalWizardry.fourthTierRunes[0].getBlock(), + AlchemicalWizardry.fourthTierRunes[0].getMeta(), + true, + true)); } for (int i = -2; i <= 1; i++) { - fourthTierAltar.add(new AltarComponent( - 5, - i, - 5, - AlchemicalWizardry.specialAltarBlock[2].getBlock(), - AlchemicalWizardry.specialAltarBlock[2].getMeta(), - false, - false)); - fourthTierAltar.add(new AltarComponent( - 5, - i, - -5, - AlchemicalWizardry.specialAltarBlock[2].getBlock(), - AlchemicalWizardry.specialAltarBlock[2].getMeta(), - false, - false)); - fourthTierAltar.add(new AltarComponent( - -5, - i, - -5, - AlchemicalWizardry.specialAltarBlock[2].getBlock(), - AlchemicalWizardry.specialAltarBlock[2].getMeta(), - false, - false)); - fourthTierAltar.add(new AltarComponent( - -5, - i, - 5, - AlchemicalWizardry.specialAltarBlock[2].getBlock(), - AlchemicalWizardry.specialAltarBlock[2].getMeta(), - false, - false)); + fourthTierAltar.add( + new AltarComponent( + 5, + i, + 5, + AlchemicalWizardry.specialAltarBlock[2].getBlock(), + AlchemicalWizardry.specialAltarBlock[2].getMeta(), + false, + false)); + fourthTierAltar.add( + new AltarComponent( + 5, + i, + -5, + AlchemicalWizardry.specialAltarBlock[2].getBlock(), + AlchemicalWizardry.specialAltarBlock[2].getMeta(), + false, + false)); + fourthTierAltar.add( + new AltarComponent( + -5, + i, + -5, + AlchemicalWizardry.specialAltarBlock[2].getBlock(), + AlchemicalWizardry.specialAltarBlock[2].getMeta(), + false, + false)); + fourthTierAltar.add( + new AltarComponent( + -5, + i, + 5, + AlchemicalWizardry.specialAltarBlock[2].getBlock(), + AlchemicalWizardry.specialAltarBlock[2].getMeta(), + false, + false)); } - fourthTierAltar.add(new AltarComponent( - 5, - 2, - 5, - AlchemicalWizardry.specialAltarBlock[3].getBlock(), - AlchemicalWizardry.specialAltarBlock[3].getMeta(), - false, - false)); - fourthTierAltar.add(new AltarComponent( - 5, - 2, - -5, - AlchemicalWizardry.specialAltarBlock[3].getBlock(), - AlchemicalWizardry.specialAltarBlock[3].getMeta(), - false, - false)); - fourthTierAltar.add(new AltarComponent( - -5, - 2, - -5, - AlchemicalWizardry.specialAltarBlock[3].getBlock(), - AlchemicalWizardry.specialAltarBlock[3].getMeta(), - false, - false)); - fourthTierAltar.add(new AltarComponent( - -5, - 2, - 5, - AlchemicalWizardry.specialAltarBlock[3].getBlock(), - AlchemicalWizardry.specialAltarBlock[3].getMeta(), - false, - false)); + fourthTierAltar.add( + new AltarComponent( + 5, + 2, + 5, + AlchemicalWizardry.specialAltarBlock[3].getBlock(), + AlchemicalWizardry.specialAltarBlock[3].getMeta(), + false, + false)); + fourthTierAltar.add( + new AltarComponent( + 5, + 2, + -5, + AlchemicalWizardry.specialAltarBlock[3].getBlock(), + AlchemicalWizardry.specialAltarBlock[3].getMeta(), + false, + false)); + fourthTierAltar.add( + new AltarComponent( + -5, + 2, + -5, + AlchemicalWizardry.specialAltarBlock[3].getBlock(), + AlchemicalWizardry.specialAltarBlock[3].getMeta(), + false, + false)); + fourthTierAltar.add( + new AltarComponent( + -5, + 2, + 5, + AlchemicalWizardry.specialAltarBlock[3].getBlock(), + AlchemicalWizardry.specialAltarBlock[3].getMeta(), + false, + false)); fifthTierAltar.addAll(fourthTierAltar); - fifthTierAltar.add(new AltarComponent( - -8, - -3, - 8, - AlchemicalWizardry.specialAltarBlock[4].getBlock(), - AlchemicalWizardry.specialAltarBlock[4].getMeta(), - false, - false)); - fifthTierAltar.add(new AltarComponent( - -8, - -3, - -8, - AlchemicalWizardry.specialAltarBlock[4].getBlock(), - AlchemicalWizardry.specialAltarBlock[4].getMeta(), - false, - false)); - fifthTierAltar.add(new AltarComponent( - 8, - -3, - -8, - AlchemicalWizardry.specialAltarBlock[4].getBlock(), - AlchemicalWizardry.specialAltarBlock[4].getMeta(), - false, - false)); - fifthTierAltar.add(new AltarComponent( - 8, - -3, - 8, - AlchemicalWizardry.specialAltarBlock[4].getBlock(), - AlchemicalWizardry.specialAltarBlock[4].getMeta(), - false, - false)); + fifthTierAltar.add( + new AltarComponent( + -8, + -3, + 8, + AlchemicalWizardry.specialAltarBlock[4].getBlock(), + AlchemicalWizardry.specialAltarBlock[4].getMeta(), + false, + false)); + fifthTierAltar.add( + new AltarComponent( + -8, + -3, + -8, + AlchemicalWizardry.specialAltarBlock[4].getBlock(), + AlchemicalWizardry.specialAltarBlock[4].getMeta(), + false, + false)); + fifthTierAltar.add( + new AltarComponent( + 8, + -3, + -8, + AlchemicalWizardry.specialAltarBlock[4].getBlock(), + AlchemicalWizardry.specialAltarBlock[4].getMeta(), + false, + false)); + fifthTierAltar.add( + new AltarComponent( + 8, + -3, + 8, + AlchemicalWizardry.specialAltarBlock[4].getBlock(), + AlchemicalWizardry.specialAltarBlock[4].getMeta(), + false, + false)); for (int i = -6; i <= 6; i++) { - fifthTierAltar.add(new AltarComponent( - 8, - -4, - i, - AlchemicalWizardry.fifthTierRunes[0].getBlock(), - AlchemicalWizardry.fifthTierRunes[0].getMeta(), - true, - true)); - fifthTierAltar.add(new AltarComponent( - -8, - -4, - i, - AlchemicalWizardry.fifthTierRunes[0].getBlock(), - AlchemicalWizardry.fifthTierRunes[0].getMeta(), - true, - true)); - fifthTierAltar.add(new AltarComponent( - i, - -4, - 8, - AlchemicalWizardry.fifthTierRunes[0].getBlock(), - AlchemicalWizardry.fifthTierRunes[0].getMeta(), - true, - true)); - fifthTierAltar.add(new AltarComponent( - i, - -4, - -8, - AlchemicalWizardry.fifthTierRunes[0].getBlock(), - AlchemicalWizardry.fifthTierRunes[0].getMeta(), - true, - true)); + fifthTierAltar.add( + new AltarComponent( + 8, + -4, + i, + AlchemicalWizardry.fifthTierRunes[0].getBlock(), + AlchemicalWizardry.fifthTierRunes[0].getMeta(), + true, + true)); + fifthTierAltar.add( + new AltarComponent( + -8, + -4, + i, + AlchemicalWizardry.fifthTierRunes[0].getBlock(), + AlchemicalWizardry.fifthTierRunes[0].getMeta(), + true, + true)); + fifthTierAltar.add( + new AltarComponent( + i, + -4, + 8, + AlchemicalWizardry.fifthTierRunes[0].getBlock(), + AlchemicalWizardry.fifthTierRunes[0].getMeta(), + true, + true)); + fifthTierAltar.add( + new AltarComponent( + i, + -4, + -8, + AlchemicalWizardry.fifthTierRunes[0].getBlock(), + AlchemicalWizardry.fifthTierRunes[0].getMeta(), + true, + true)); } sixthTierAltar.addAll(fifthTierAltar); for (int i = -4; i <= 2; i++) { - sixthTierAltar.add(new AltarComponent( - 11, - i, - 11, - AlchemicalWizardry.specialAltarBlock[5].getBlock(), - AlchemicalWizardry.specialAltarBlock[5].getMeta(), - false, - false)); - sixthTierAltar.add(new AltarComponent( - -11, - i, - -11, - AlchemicalWizardry.specialAltarBlock[5].getBlock(), - AlchemicalWizardry.specialAltarBlock[5].getMeta(), - false, - false)); - sixthTierAltar.add(new AltarComponent( - 11, - i, - -11, - AlchemicalWizardry.specialAltarBlock[5].getBlock(), - AlchemicalWizardry.specialAltarBlock[5].getMeta(), - false, - false)); - sixthTierAltar.add(new AltarComponent( - -11, - i, - 11, - AlchemicalWizardry.specialAltarBlock[5].getBlock(), - AlchemicalWizardry.specialAltarBlock[5].getMeta(), - false, - false)); + sixthTierAltar.add( + new AltarComponent( + 11, + i, + 11, + AlchemicalWizardry.specialAltarBlock[5].getBlock(), + AlchemicalWizardry.specialAltarBlock[5].getMeta(), + false, + false)); + sixthTierAltar.add( + new AltarComponent( + -11, + i, + -11, + AlchemicalWizardry.specialAltarBlock[5].getBlock(), + AlchemicalWizardry.specialAltarBlock[5].getMeta(), + false, + false)); + sixthTierAltar.add( + new AltarComponent( + 11, + i, + -11, + AlchemicalWizardry.specialAltarBlock[5].getBlock(), + AlchemicalWizardry.specialAltarBlock[5].getMeta(), + false, + false)); + sixthTierAltar.add( + new AltarComponent( + -11, + i, + 11, + AlchemicalWizardry.specialAltarBlock[5].getBlock(), + AlchemicalWizardry.specialAltarBlock[5].getMeta(), + false, + false)); } - sixthTierAltar.add(new AltarComponent( - 11, - 3, - 11, - AlchemicalWizardry.specialAltarBlock[6].getBlock(), - AlchemicalWizardry.specialAltarBlock[6].getMeta(), - false, - false)); - sixthTierAltar.add(new AltarComponent( - -11, - 3, - -11, - AlchemicalWizardry.specialAltarBlock[6].getBlock(), - AlchemicalWizardry.specialAltarBlock[6].getMeta(), - false, - false)); - sixthTierAltar.add(new AltarComponent( - 11, - 3, - -11, - AlchemicalWizardry.specialAltarBlock[6].getBlock(), - AlchemicalWizardry.specialAltarBlock[6].getMeta(), - false, - false)); - sixthTierAltar.add(new AltarComponent( - -11, - 3, - 11, - AlchemicalWizardry.specialAltarBlock[6].getBlock(), - AlchemicalWizardry.specialAltarBlock[6].getMeta(), - false, - false)); + sixthTierAltar.add( + new AltarComponent( + 11, + 3, + 11, + AlchemicalWizardry.specialAltarBlock[6].getBlock(), + AlchemicalWizardry.specialAltarBlock[6].getMeta(), + false, + false)); + sixthTierAltar.add( + new AltarComponent( + -11, + 3, + -11, + AlchemicalWizardry.specialAltarBlock[6].getBlock(), + AlchemicalWizardry.specialAltarBlock[6].getMeta(), + false, + false)); + sixthTierAltar.add( + new AltarComponent( + 11, + 3, + -11, + AlchemicalWizardry.specialAltarBlock[6].getBlock(), + AlchemicalWizardry.specialAltarBlock[6].getMeta(), + false, + false)); + sixthTierAltar.add( + new AltarComponent( + -11, + 3, + 11, + AlchemicalWizardry.specialAltarBlock[6].getBlock(), + AlchemicalWizardry.specialAltarBlock[6].getMeta(), + false, + false)); for (int i = -9; i <= 9; i++) { - sixthTierAltar.add(new AltarComponent( - 11, - -5, - i, - AlchemicalWizardry.sixthTierRunes[0].getBlock(), - AlchemicalWizardry.sixthTierRunes[0].getMeta(), - true, - true)); - sixthTierAltar.add(new AltarComponent( - -11, - -5, - i, - AlchemicalWizardry.sixthTierRunes[0].getBlock(), - AlchemicalWizardry.sixthTierRunes[0].getMeta(), - true, - true)); - sixthTierAltar.add(new AltarComponent( - i, - -5, - 11, - AlchemicalWizardry.sixthTierRunes[0].getBlock(), - AlchemicalWizardry.sixthTierRunes[0].getMeta(), - true, - true)); - sixthTierAltar.add(new AltarComponent( - i, - -5, - -11, - AlchemicalWizardry.sixthTierRunes[0].getBlock(), - AlchemicalWizardry.sixthTierRunes[0].getMeta(), - true, - true)); + sixthTierAltar.add( + new AltarComponent( + 11, + -5, + i, + AlchemicalWizardry.sixthTierRunes[0].getBlock(), + AlchemicalWizardry.sixthTierRunes[0].getMeta(), + true, + true)); + sixthTierAltar.add( + new AltarComponent( + -11, + -5, + i, + AlchemicalWizardry.sixthTierRunes[0].getBlock(), + AlchemicalWizardry.sixthTierRunes[0].getMeta(), + true, + true)); + sixthTierAltar.add( + new AltarComponent( + i, + -5, + 11, + AlchemicalWizardry.sixthTierRunes[0].getBlock(), + AlchemicalWizardry.sixthTierRunes[0].getMeta(), + true, + true)); + sixthTierAltar.add( + new AltarComponent( + i, + -5, + -11, + AlchemicalWizardry.sixthTierRunes[0].getBlock(), + AlchemicalWizardry.sixthTierRunes[0].getMeta(), + true, + true)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/book/BloodMagicGuide.java b/src/main/java/WayofTime/alchemicalWizardry/common/book/BloodMagicGuide.java index 3e7f89f6..ce1ff71f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/book/BloodMagicGuide.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/book/BloodMagicGuide.java @@ -1,5 +1,14 @@ package WayofTime.alchemicalWizardry.common.book; +import java.awt.Color; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.ModItems; @@ -17,15 +26,9 @@ import amerifrance.guideapi.categories.CategoryItemStack; import amerifrance.guideapi.entries.EntryUniText; import amerifrance.guideapi.pages.PageIRecipe; import amerifrance.guideapi.pages.PageUnlocImage; -import java.awt.Color; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; public class BloodMagicGuide { + public static Book bloodMagicGuide; public static List categories = new ArrayList(); @@ -37,15 +40,12 @@ public class BloodMagicGuide { registerAlchemyBook(); BookBuilder bmBookBuilder = new BookBuilder(); - bmBookBuilder - .setCategories(categories) - .setUnlocBookTitle("guide.BloodMagic.book.title") + bmBookBuilder.setCategories(categories).setUnlocBookTitle("guide.BloodMagic.book.title") .setUnlocWelcomeMessage("guide.BloodMagic.welcomeMessage") - .setUnlocDisplayName("guide.BloodMagic.book.name") - .setBookColor(new Color(190, 10, 0)) + .setUnlocDisplayName("guide.BloodMagic.book.name").setBookColor(new Color(190, 10, 0)) .setAuthor("-Blood Magic"); - // bloodMagicGuide = new Book(categories, "guide.BloodMagic.book.title", "guide.BloodMagic.welcomeMessage", + // bloodMagicGuide = new Book(categories, "guide.BloodMagic.book.title", "guide.BloodMagic.welcomeMessage", // "guide.BloodMagic.book.name", new Color(190, 10, 0)); bloodMagicGuide = bmBookBuilder.build(); GuideRegistry.registerBook(bloodMagicGuide); @@ -79,14 +79,14 @@ public class BloodMagicGuide { ArrayList blankSlatePages = new ArrayList(); blankSlatePages.add(new PageAltarRecipe(RecipeHolder.blankSlateRecipe)); - blankSlatePages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.blankSlate"))); + blankSlatePages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.blankSlate"))); entries.add(new EntryUniText(blankSlatePages, "guide.BloodMagic.entryName.architect.blankSlate")); ArrayList divinationSigilPages = new ArrayList(); divinationSigilPages.add(getOrbPageForRecipe(RecipeHolder.divinationSigilRecipe)); - divinationSigilPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.divination"))); + divinationSigilPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.divination"))); entries.add(new EntryUniText(divinationSigilPages, "guide.BloodMagic.entryName.architect.divination")); ArrayList waterSigilPages = new ArrayList(); @@ -110,24 +110,27 @@ public class BloodMagicGuide { ArrayList lavaSigilPages = new ArrayList(); lavaSigilPages.add(new PageIRecipe(RecipeHolder.lavaSigilRecipe)); - lavaSigilPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.lavaSigil"))); + lavaSigilPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.lavaSigil"))); entries.add(new EntryUniText(lavaSigilPages, "guide.BloodMagic.entryName.architect.lavaSigil")); ArrayList blankRunePages = new ArrayList(); blankRunePages.add(getOrbPageForRecipe(RecipeHolder.blankRuneRecipe)); blankRunePages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.blankRunes.1"))); - blankRunePages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T2.png"), true)); + blankRunePages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T2.png"), + true)); blankRunePages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.blankRunes.2"))); entries.add(new EntryUniText(blankRunePages, "guide.BloodMagic.entryName.architect.blankRunes")); ArrayList speedRunePages = new ArrayList(); speedRunePages.add(new PageIRecipe(RecipeHolder.speedRuneRecipe)); - speedRunePages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.speedRunes"))); + speedRunePages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.speedRunes"))); entries.add(new EntryUniText(speedRunePages, "guide.BloodMagic.entryName.architect.speedRunes")); ArrayList apprenticeOrbPages = new ArrayList(); @@ -138,20 +141,20 @@ public class BloodMagicGuide { ArrayList voidSigilPages = new ArrayList(); voidSigilPages.add(getOrbPageForRecipe(RecipeHolder.voidSigilRecipe)); - voidSigilPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.voidSigil"))); + voidSigilPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.voidSigil"))); entries.add(new EntryUniText(voidSigilPages, "guide.BloodMagic.entryName.architect.voidSigil")); ArrayList airSigilPages = new ArrayList(); airSigilPages.add(getOrbPageForRecipe(RecipeHolder.airSigilRecipe)); - airSigilPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.airSigil"))); + airSigilPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.airSigil"))); entries.add(new EntryUniText(airSigilPages, "guide.BloodMagic.entryName.architect.airSigil")); ArrayList sightSigilPages = new ArrayList(); sightSigilPages.add(getOrbPageForRecipe(RecipeHolder.sightSigilRecipe)); - sightSigilPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sightSigil"))); + sightSigilPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sightSigil"))); entries.add(new EntryUniText(sightSigilPages, "guide.BloodMagic.entryName.architect.sightSigil")); ArrayList advancedAltarPages = new ArrayList(); @@ -161,19 +164,19 @@ public class BloodMagicGuide { ArrayList fastMinerPages = new ArrayList(); fastMinerPages.add(getOrbPageForRecipe(RecipeHolder.fastMinerRecipe)); - fastMinerPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fastMiner"))); + fastMinerPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fastMiner"))); entries.add(new EntryUniText(fastMinerPages, "guide.BloodMagic.entryName.architect.fastMiner")); ArrayList soulFrayPages = new ArrayList(); - soulFrayPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulFray"))); + soulFrayPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulFray"))); entries.add(new EntryUniText(soulFrayPages, "guide.BloodMagic.entryName.architect.soulFray")); ArrayList greenGrovePages = new ArrayList(); greenGrovePages.add(getOrbPageForRecipe(RecipeHolder.greenGroveRecipe)); - greenGrovePages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.greenGrove"))); + greenGrovePages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.greenGrove"))); entries.add(new EntryUniText(greenGrovePages, "guide.BloodMagic.entryName.architect.greenGrove")); ArrayList daggerPages = new ArrayList(); @@ -192,18 +195,21 @@ public class BloodMagicGuide { ArrayList bloodPackPages = new ArrayList(); bloodPackPages.add(new PageIRecipe(RecipeHolder.bloodPackRecipe)); - bloodPackPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodPack"))); + bloodPackPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodPack"))); entries.add(new EntryUniText(bloodPackPages, "guide.BloodMagic.entryName.architect.bloodPack")); ArrayList fivePeoplePages = new ArrayList(); - fivePeoplePages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fivePeople"))); + fivePeoplePages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fivePeople"))); entries.add(new EntryUniText(fivePeoplePages, "guide.BloodMagic.entryName.architect.fivePeople")); ArrayList tier3Pages = new ArrayList(); - tier3Pages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T3.png"), true)); + tier3Pages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T3.png"), + true)); tier3Pages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier3"))); entries.add(new EntryUniText(tier3Pages, "guide.BloodMagic.entryName.architect.tier3")); @@ -215,17 +221,17 @@ public class BloodMagicGuide { ArrayList newRunePages = new ArrayList(); newRunePages.add(getOrbPageForRecipe(RecipeHolder.capacityRuneRecipe)); - newRunePages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.newRune.1"))); + newRunePages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.newRune.1"))); newRunePages.add(getOrbPageForRecipe(RecipeHolder.dislocationRuneRecipe)); - newRunePages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.newRune.2"))); + newRunePages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.newRune.2"))); entries.add(new EntryUniText(newRunePages, "guide.BloodMagic.entryName.architect.newRune")); ArrayList magnetismPages = new ArrayList(); magnetismPages.add(getOrbPageForRecipe(RecipeHolder.magnetismSigilRecipe)); - magnetismPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.magnetism"))); + magnetismPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.magnetism"))); entries.add(new EntryUniText(magnetismPages, "guide.BloodMagic.entryName.architect.magnetism")); ArrayList phantomBridgePages = new ArrayList(); @@ -236,8 +242,8 @@ public class BloodMagicGuide { ArrayList holdingPages = new ArrayList(); holdingPages.add(getOrbPageForRecipe(RecipeHolder.holdingSigilRecipe)); - holdingPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.holding"))); + holdingPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.holding"))); entries.add(new EntryUniText(holdingPages, "guide.BloodMagic.entryName.architect.holding")); ArrayList elementalAffinityPages = new ArrayList(); @@ -255,8 +261,8 @@ public class BloodMagicGuide { ArrayList bloodLampPages = new ArrayList(); bloodLampPages.add(getOrbPageForRecipe(RecipeHolder.bloodLampRecipe)); - bloodLampPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodLamp"))); + bloodLampPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodLamp"))); entries.add(new EntryUniText(bloodLampPages, "guide.BloodMagic.entryName.architect.bloodLamp")); ArrayList boundArmourPages = new ArrayList(); @@ -271,9 +277,10 @@ public class BloodMagicGuide { if (AlchemicalWizardry.isThaumcraftLoaded) { ArrayList sanguineArmourPages = new ArrayList(); - sanguineArmourPages.addAll(PageHelper.pagesForLongText( - StatCollector.translateToLocal("aw.entries.architect.sanguineArmour"), - new ItemStack(ModItems.sanguineRobe))); + sanguineArmourPages.addAll( + PageHelper.pagesForLongText( + StatCollector.translateToLocal("aw.entries.architect.sanguineArmour"), + new ItemStack(ModItems.sanguineRobe))); entries.add(new EntryUniText(sanguineArmourPages, "guide.BloodMagic.entryName.architect.sanguineArmour")); } @@ -292,30 +299,34 @@ public class BloodMagicGuide { entries.add(new EntryUniText(ritualDivinerPages, "guide.BloodMagic.entryName.architect.ritualDiviner")); ArrayList bloodShardPages = new ArrayList(); - bloodShardPages.addAll(PageHelper.pagesForLongText( - StatCollector.translateToLocal("aw.entries.architect.bloodShard"), - new ItemStack(ModItems.weakBloodShard))); + bloodShardPages.addAll( + PageHelper.pagesForLongText( + StatCollector.translateToLocal("aw.entries.architect.bloodShard"), + new ItemStack(ModItems.weakBloodShard))); entries.add(new EntryUniText(bloodShardPages, "guide.BloodMagic.entryName.architect.bloodShard")); ArrayList tier4AltarPages = new ArrayList(); tier4AltarPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier4Altar.1"))); - tier4AltarPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T4.png"), true)); + tier4AltarPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T4.png"), + true)); tier4AltarPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier4Altar.2"))); entries.add(new EntryUniText(tier4AltarPages, "guide.BloodMagic.entryName.architect.tier4Altar")); ArrayList masterOrbPages = new ArrayList(); masterOrbPages.add(new PageAltarRecipe(RecipeHolder.masterBloodOrbRecipe)); - masterOrbPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.masterOrb"))); + masterOrbPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.masterOrb"))); entries.add(new EntryUniText(masterOrbPages, "guide.BloodMagic.entryName.architect.masterOrb")); ArrayList whirlwindPages = new ArrayList(); whirlwindPages.add(getOrbPageForRecipe(RecipeHolder.whirlwindSigilRecipe)); - whirlwindPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.whirlwind"))); + whirlwindPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.whirlwind"))); entries.add(new EntryUniText(whirlwindPages, "guide.BloodMagic.entryName.architect.whirlwind")); ArrayList compressionPages = new ArrayList(); @@ -326,15 +337,15 @@ public class BloodMagicGuide { ArrayList severancePages = new ArrayList(); severancePages.add(getOrbPageForRecipe(RecipeHolder.enderSeveranceSigilRecipe)); - severancePages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.severance"))); + severancePages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.severance"))); entries.add(new EntryUniText(severancePages, "guide.BloodMagic.entryName.architect.severance")); ArrayList teleposerPages = new ArrayList(); teleposerPages.add(new PageAltarRecipe(RecipeHolder.teleposerFocusRecipe1)); teleposerPages.add(new PageIRecipe(RecipeHolder.teleposerRecipe)); - teleposerPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.teleposer"))); + teleposerPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.teleposer"))); entries.add(new EntryUniText(teleposerPages, "guide.BloodMagic.entryName.architect.teleposer")); ArrayList suppressionPages = new ArrayList(); @@ -351,26 +362,29 @@ public class BloodMagicGuide { ArrayList orbRunePages = new ArrayList(); orbRunePages.add(getOrbPageForRecipe(RecipeHolder.orbRuneRecipe)); - orbRunePages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.orbRune"))); + orbRunePages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.orbRune"))); entries.add(new EntryUniText(orbRunePages, "guide.BloodMagic.entryName.architect.orbRune")); ArrayList fieldTripPages = new ArrayList(); - fieldTripPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fieldTrip"))); + fieldTripPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fieldTrip"))); entries.add(new EntryUniText(fieldTripPages, "guide.BloodMagic.entryName.architect.fieldTrip")); ArrayList bindingKeyPages = new ArrayList(); bindingKeyPages.add(new PageIRecipe(RecipeHolder.keyOfBindingRecipe)); - bindingKeyPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bindingKey"))); + bindingKeyPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bindingKey"))); entries.add(new EntryUniText(bindingKeyPages, "guide.BloodMagic.entryName.architect.bindingKey")); ArrayList tier5AltarPages = new ArrayList(); - tier5AltarPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T5.png"), true)); - tier5AltarPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier5Altar"))); + tier5AltarPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T5.png"), + true)); + tier5AltarPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier5Altar"))); entries.add(new EntryUniText(tier5AltarPages, "guide.BloodMagic.entryName.architect.tier5Altar")); ArrayList priceOfPowerPages = new ArrayList(); @@ -380,8 +394,8 @@ public class BloodMagicGuide { ArrayList demonicOrbPages = new ArrayList(); demonicOrbPages.add(new PageAltarRecipe(RecipeHolder.archmageBloodOrbRecipe)); - demonicOrbPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.demonicOrb"))); + demonicOrbPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.demonicOrb"))); entries.add(new EntryUniText(demonicOrbPages, "guide.BloodMagic.entryName.architect.demonicOrb")); ArrayList energyBazookaPages = new ArrayList(); @@ -398,8 +412,8 @@ public class BloodMagicGuide { ArrayList harvestPages = new ArrayList(); demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.harvestSigilRecipe)); - harvestPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.harvest"))); + harvestPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.harvest"))); entries.add(new EntryUniText(harvestPages, "guide.BloodMagic.entryName.architect.harvest")); ArrayList demonProblemPages = new ArrayList(); @@ -408,10 +422,13 @@ public class BloodMagicGuide { entries.add(new EntryUniText(demonProblemPages, "guide.BloodMagic.entryName.architect.demonProblem")); ArrayList tier6AltarPages = new ArrayList(); - tier6AltarPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T6.png"), true)); - tier6AltarPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier6Altar"))); + tier6AltarPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T6.png"), + true)); + tier6AltarPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier6Altar"))); tier6AltarPages.add(new PageIRecipe(RecipeHolder.crystalCluserRecipe)); tier6AltarPages.add(new PageAltarRecipe(RecipeHolder.transcendentBloodOrbRecipe)); entries.add(new EntryUniText(tier6AltarPages, "guide.BloodMagic.entryName.architect.tier6Altar")); @@ -421,16 +438,19 @@ public class BloodMagicGuide { PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.moreThanHuman"))); entries.add(new EntryUniText(moreThanHumanPages, "guide.BloodMagic.entryName.architect.moreThanHuman")); - categories.add(new CategoryItemStack( - entries, "guide.BloodMagic.category.architect", new ItemStack(ModItems.divinationSigil))); + categories.add( + new CategoryItemStack( + entries, + "guide.BloodMagic.category.architect", + new ItemStack(ModItems.divinationSigil))); } public static void registerRitualBook() { List entries = new ArrayList(); - // ArrayList testPages = new ArrayList(); - // testPages.add(PageRitualMultiBlock.getPageForRitual("AW031Convocation")); - // entries.add(new EntryUniText(testPages, "Test page")); + // ArrayList testPages = new ArrayList(); + // testPages.add(PageRitualMultiBlock.getPageForRitual("AW031Convocation")); + // entries.add(new EntryUniText(testPages, "Test page")); ArrayList introPages = new ArrayList(); introPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.intro"))); @@ -438,8 +458,8 @@ public class BloodMagicGuide { ArrayList weakRitualPages = new ArrayList(); weakRitualPages.add(getOrbPageForRecipe(RecipeHolder.weakRitualStoneRecipe)); - weakRitualPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.weakRitual"))); + weakRitualPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.weakRitual"))); entries.add(new EntryUniText(weakRitualPages, "guide.BloodMagic.entryName.rituals.weakRitual")); ArrayList ritualsPages = new ArrayList(); @@ -455,68 +475,88 @@ public class BloodMagicGuide { entries.add(new EntryUniText(ritualsPages, "guide.BloodMagic.entryName.rituals.rituals")); ArrayList waterRitualPages = new ArrayList(); - waterRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Water.png"), true)); - waterRitualPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.waterRitual"))); + waterRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Water.png"), + true)); + waterRitualPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.waterRitual"))); entries.add(new EntryUniText(waterRitualPages, "guide.BloodMagic.entryName.rituals.waterRitual")); ArrayList lavaRitualPages = new ArrayList(); - lavaRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Lava.png"), true)); - lavaRitualPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.lavaRitual"))); + lavaRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Lava.png"), + true)); + lavaRitualPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.lavaRitual"))); entries.add(new EntryUniText(lavaRitualPages, "guide.BloodMagic.entryName.rituals.lavaRitual")); ArrayList groveRitualPages = new ArrayList(); - groveRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/GreenGrove.png"), true)); - groveRitualPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.groveRitual"))); + groveRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/GreenGrove.png"), + true)); + groveRitualPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.groveRitual"))); entries.add(new EntryUniText(groveRitualPages, "guide.BloodMagic.entryName.rituals.groveRitual")); ArrayList interdictionRitualPages = new ArrayList(); - interdictionRitualPages.add(new PageUnlocImage( - "", - new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Interdiction.png"), - true)); + interdictionRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Interdiction.png"), + true)); interdictionRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.interdictionRitual"))); entries.add(new EntryUniText(interdictionRitualPages, "guide.BloodMagic.entryName.rituals.interdictionRitual")); ArrayList containmentRitualPages = new ArrayList(); - containmentRitualPages.add(new PageUnlocImage( - "", - new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Containment.png"), - true)); + containmentRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Containment.png"), + true)); containmentRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.containmentRitual"))); entries.add(new EntryUniText(containmentRitualPages, "guide.BloodMagic.entryName.rituals.containmentRitual")); ArrayList bindingRitualPages = new ArrayList(); - bindingRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Binding.png"), true)); + bindingRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Binding.png"), + true)); bindingRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.bindingRitual"))); entries.add(new EntryUniText(bindingRitualPages, "guide.BloodMagic.entryName.rituals.bindingRitual")); ArrayList beastModePages = new ArrayList(); - beastModePages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.beastMode"))); + beastModePages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.beastMode"))); entries.add(new EntryUniText(beastModePages, "guide.BloodMagic.entryName.rituals.beastMode")); ArrayList unbindingRitualPages = new ArrayList(); - unbindingRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Unbinding.png"), true)); + unbindingRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Unbinding.png"), + true)); unbindingRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.unbindingRitual"))); entries.add(new EntryUniText(unbindingRitualPages, "guide.BloodMagic.entryName.rituals.unbindingRitual")); ArrayList jumpRitualPages = new ArrayList(); - jumpRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Jump.png"), true)); - jumpRitualPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.jumpRitual"))); + jumpRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Jump.png"), + true)); + jumpRitualPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.jumpRitual"))); entries.add(new EntryUniText(jumpRitualPages, "guide.BloodMagic.entryName.rituals.jumpRitual")); ArrayList duskInkPages = new ArrayList(); @@ -525,61 +565,79 @@ public class BloodMagicGuide { entries.add(new EntryUniText(duskInkPages, "guide.BloodMagic.entryName.rituals.duskInk")); ArrayList magnetismRitualPages = new ArrayList(); - magnetismRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Magnetism.png"), true)); + magnetismRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Magnetism.png"), + true)); magnetismRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.magnetismRitual"))); entries.add(new EntryUniText(magnetismRitualPages, "guide.BloodMagic.entryName.rituals.magnetismRitual")); ArrayList crusherRitualPages = new ArrayList(); - crusherRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Crusher.png"), true)); + crusherRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Crusher.png"), + true)); crusherRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.crusherRitual"))); entries.add(new EntryUniText(crusherRitualPages, "guide.BloodMagic.entryName.rituals.crusherRitual")); ArrayList speedRitualPages = new ArrayList(); - speedRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Speed.png"), true)); - speedRitualPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.speedRitual"))); + speedRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Speed.png"), + true)); + speedRitualPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.speedRitual"))); entries.add(new EntryUniText(speedRitualPages, "guide.BloodMagic.entryName.rituals.speedRitual")); ArrayList shepherdRitualPages = new ArrayList(); - shepherdRitualPages.add(new PageUnlocImage( - "", - new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/AnimalGrowth.png"), - true)); + shepherdRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/AnimalGrowth.png"), + true)); shepherdRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.shepherdRitual"))); entries.add(new EntryUniText(shepherdRitualPages, "guide.BloodMagic.entryName.rituals.shepherdRitual")); ArrayList darkMagicPages = new ArrayList(); - darkMagicPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.darkMagic"))); + darkMagicPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.darkMagic"))); entries.add(new EntryUniText(darkMagicPages, "guide.BloodMagic.entryName.rituals.darkMagic")); ArrayList knifeAndSufferingRitualPages = new ArrayList(); - knifeAndSufferingRitualPages.add(new PageUnlocImage( - "", - new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/WellOfSuffering.png"), - true)); - knifeAndSufferingRitualPages.addAll(PageHelper.pagesForLongText( - StatCollector.translateToLocal("aw.entries.rituals.knifeAndSufferingRitual.1"))); - knifeAndSufferingRitualPages.add(new PageUnlocImage( - "", - new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/FeatheredKnife.png"), - true)); - knifeAndSufferingRitualPages.addAll(PageHelper.pagesForLongText( - StatCollector.translateToLocal("aw.entries.rituals.knifeAndSufferingRitual.2"))); - entries.add(new EntryUniText( - knifeAndSufferingRitualPages, "guide.BloodMagic.entryName.rituals.knifeAndSufferingRitual")); + knifeAndSufferingRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation( + "alchemicalwizardry:textures/misc/screenshots/rituals/WellOfSuffering.png"), + true)); + knifeAndSufferingRitualPages.addAll( + PageHelper.pagesForLongText( + StatCollector.translateToLocal("aw.entries.rituals.knifeAndSufferingRitual.1"))); + knifeAndSufferingRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/FeatheredKnife.png"), + true)); + knifeAndSufferingRitualPages.addAll( + PageHelper.pagesForLongText( + StatCollector.translateToLocal("aw.entries.rituals.knifeAndSufferingRitual.2"))); + entries.add( + new EntryUniText( + knifeAndSufferingRitualPages, + "guide.BloodMagic.entryName.rituals.knifeAndSufferingRitual")); ArrayList regenerationRitualPages = new ArrayList(); - regenerationRitualPages.add(new PageUnlocImage( - "", - new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Regeneration.png"), - true)); + regenerationRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Regeneration.png"), + true)); regenerationRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.regenerationRitual"))); entries.add(new EntryUniText(regenerationRitualPages, "guide.BloodMagic.entryName.rituals.regenerationRitual")); @@ -595,17 +653,23 @@ public class BloodMagicGuide { entries.add(new EntryUniText(thenThereWereFivePages, "guide.BloodMagic.entryName.rituals.thenThereWereFive")); ArrayList alchemyRitualPages = new ArrayList(); - alchemyRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Alchemy.png"), true)); + alchemyRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Alchemy.png"), + true)); alchemyRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.alchemyRitual"))); entries.add(new EntryUniText(alchemyRitualPages, "guide.BloodMagic.entryName.rituals.alchemyRitual")); ArrayList domeRitualPages = new ArrayList(); - domeRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Dome.png"), true)); - domeRitualPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.domeRitual"))); + domeRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Dome.png"), + true)); + domeRitualPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.domeRitual"))); entries.add(new EntryUniText(domeRitualPages, "guide.BloodMagic.entryName.rituals.domeRitual")); ArrayList awakenedCrystalPages = new ArrayList(); @@ -614,39 +678,52 @@ public class BloodMagicGuide { entries.add(new EntryUniText(awakenedCrystalPages, "guide.BloodMagic.entryName.rituals.awakenedCrystal")); ArrayList featheredEarthRitualPages = new ArrayList(); - featheredEarthRitualPages.add(new PageUnlocImage( - "", - new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/FeatheredEarth.png"), - true)); + featheredEarthRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/FeatheredEarth.png"), + true)); featheredEarthRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.featheredEarthRitual"))); entries.add( new EntryUniText(featheredEarthRitualPages, "guide.BloodMagic.entryName.rituals.featheredEarthRitual")); ArrayList gaiaRitualPages = new ArrayList(); - gaiaRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Gaia.png"), true)); - gaiaRitualPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.gaiaRitual"))); + gaiaRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Gaia.png"), + true)); + gaiaRitualPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.gaiaRitual"))); entries.add(new EntryUniText(gaiaRitualPages, "guide.BloodMagic.entryName.rituals.gaiaRitual")); ArrayList condorRitualPages = new ArrayList(); - condorRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Flight.png"), true)); - condorRitualPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.condorRitual"))); + condorRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Flight.png"), + true)); + condorRitualPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.condorRitual"))); entries.add(new EntryUniText(condorRitualPages, "guide.BloodMagic.entryName.rituals.condorRitual")); ArrayList meteorRitualPages = new ArrayList(); - meteorRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Meteor.png"), true)); - meteorRitualPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.meteorRitual"))); + meteorRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Meteor.png"), + true)); + meteorRitualPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.meteorRitual"))); entries.add(new EntryUniText(meteorRitualPages, "guide.BloodMagic.entryName.rituals.meteorRitual")); ArrayList expulsionRitualPages = new ArrayList(); - expulsionRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Expulsion.png"), true)); + expulsionRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Expulsion.png"), + true)); expulsionRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.expulsionRitual"))); entries.add(new EntryUniText(expulsionRitualPages, "guide.BloodMagic.entryName.rituals.expulsionRitual")); @@ -659,72 +736,91 @@ public class BloodMagicGuide { entries.add(new EntryUniText(costOfProgressPages, "guide.BloodMagic.entryName.rituals.costOfProgress")); ArrayList zephyrRitualPages = new ArrayList(); - zephyrRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Zephyr.png"), true)); - zephyrRitualPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.zephyrRitual"))); + zephyrRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Zephyr.png"), + true)); + zephyrRitualPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.zephyrRitual"))); entries.add(new EntryUniText(zephyrRitualPages, "guide.BloodMagic.entryName.rituals.zephyrRitual")); ArrayList harvestRitualPages = new ArrayList(); - harvestRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Harvest.png"), true)); + harvestRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Harvest.png"), + true)); harvestRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.harvestRitual"))); entries.add(new EntryUniText(harvestRitualPages, "guide.BloodMagic.entryName.rituals.harvestRitual")); ArrayList eternalSoulRitualPages = new ArrayList(); - eternalSoulRitualPages.add(new PageUnlocImage( - "", - new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/EternalSoul.png"), - true)); + eternalSoulRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/EternalSoul.png"), + true)); eternalSoulRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.eternalSoulRitual"))); entries.add(new EntryUniText(eternalSoulRitualPages, "guide.BloodMagic.entryName.rituals.eternalSoulRitual")); ArrayList ellipsoidRitualPages = new ArrayList(); - ellipsoidRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Ellipsoid.png"), true)); + ellipsoidRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Ellipsoid.png"), + true)); ellipsoidRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.ellipsoidRitual"))); entries.add(new EntryUniText(ellipsoidRitualPages, "guide.BloodMagic.entryName.rituals.ellipsoidRitual")); ArrayList evaporationRitualPages = new ArrayList(); - evaporationRitualPages.add(new PageUnlocImage( - "", - new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Evaporation.png"), - true)); + evaporationRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Evaporation.png"), + true)); evaporationRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.evaporationRitual"))); entries.add(new EntryUniText(evaporationRitualPages, "guide.BloodMagic.entryName.rituals.evaporationRitual")); ArrayList sacrosanctityRitualPages = new ArrayList(); - sacrosanctityRitualPages.add(new PageUnlocImage( - "", - new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Sacrosanctity.png"), - true)); + sacrosanctityRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Sacrosanctity.png"), + true)); sacrosanctityRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.sacrosanctityRitual"))); entries.add( new EntryUniText(sacrosanctityRitualPages, "guide.BloodMagic.entryName.rituals.sacrosanctityRitual")); ArrayList evilRitualPages = new ArrayList(); - evilRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/VeilOfEvil.png"), true)); - evilRitualPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.evilRitual"))); + evilRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/VeilOfEvil.png"), + true)); + evilRitualPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.evilRitual"))); entries.add(new EntryUniText(evilRitualPages, "guide.BloodMagic.entryName.rituals.evilRitual")); ArrayList stomachRitualPages = new ArrayList(); - stomachRitualPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Stomach.png"), true)); + stomachRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Stomach.png"), + true)); stomachRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.stomachRitual"))); entries.add(new EntryUniText(stomachRitualPages, "guide.BloodMagic.entryName.rituals.stomachRitual")); ArrayList reagentEffectsRitualPages = new ArrayList(); for (int i = 1; i <= 24; i++) { - reagentEffectsRitualPages.addAll(PageHelper.pagesForLongText( - StatCollector.translateToLocal("aw.entries.rituals.reagentEffects." + i))); + reagentEffectsRitualPages.addAll( + PageHelper.pagesForLongText( + StatCollector.translateToLocal("aw.entries.rituals.reagentEffects." + i))); } entries.add(new EntryUniText(reagentEffectsRitualPages, "guide.BloodMagic.entryName.rituals.reagentEffects")); @@ -739,35 +835,38 @@ public class BloodMagicGuide { entries.add(new EntryUniText(forbiddenParadisePages, "guide.BloodMagic.entryName.rituals.forbiddenParadise")); ArrayList convocationRitualPages = new ArrayList(); - convocationRitualPages.add(new PageUnlocImage( - "", - new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Convocation.png"), - true)); + convocationRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Convocation.png"), + true)); convocationRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.convocationRitual"))); entries.add(new EntryUniText(convocationRitualPages, "guide.BloodMagic.entryName.rituals.convocationRitual")); ArrayList longHaulPages = new ArrayList(); - longHaulPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.longHaul"))); + longHaulPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.longHaul"))); entries.add(new EntryUniText(longHaulPages, "guide.BloodMagic.entryName.rituals.longHaul")); ArrayList phantomHandsRitualPages = new ArrayList(); - phantomHandsRitualPages.add(new PageUnlocImage( - "", - new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/PhantomHands.png"), - true)); + phantomHandsRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/PhantomHands.png"), + true)); phantomHandsRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.phantomHandsRitual"))); entries.add(new EntryUniText(phantomHandsRitualPages, "guide.BloodMagic.entryName.rituals.phantomHandsRitual")); ArrayList anvilRitualPages = new ArrayList(); - anvilRitualPages.add(new PageUnlocImage( - "", - new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/BeatingAnvil.png"), - true)); - anvilRitualPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.anvilRitual"))); + anvilRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/BeatingAnvil.png"), + true)); + anvilRitualPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.anvilRitual"))); entries.add(new EntryUniText(anvilRitualPages, "guide.BloodMagic.entryName.rituals.anvilRitual")); ArrayList dawnInkPages = new ArrayList(); @@ -776,19 +875,21 @@ public class BloodMagicGuide { entries.add(new EntryUniText(dawnInkPages, "guide.BloodMagic.entryName.rituals.dawnInk")); ArrayList symmetryRitualPages = new ArrayList(); - symmetryRitualPages.add(new PageUnlocImage( - "", - new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/SymmetryOmega.png"), - true)); + symmetryRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/SymmetryOmega.png"), + true)); symmetryRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.symmetryRitual"))); entries.add(new EntryUniText(symmetryRitualPages, "guide.BloodMagic.entryName.rituals.symmetryRitual")); ArrayList stallingRitualPages = new ArrayList(); - stallingRitualPages.add(new PageUnlocImage( - "", - new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/StallingOmega.png"), - true)); + stallingRitualPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/StallingOmega.png"), + true)); stallingRitualPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.stallingRitual"))); entries.add(new EntryUniText(stallingRitualPages, "guide.BloodMagic.entryName.rituals.stallingRitual")); @@ -798,8 +899,11 @@ public class BloodMagicGuide { PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.newMoonRitual"))); entries.add(new EntryUniText(newMoonRitualPages, "guide.BloodMagic.entryName.rituals.newMoonRitual")); - categories.add(new CategoryItemStack( - entries, "guide.BloodMagic.category.rituals", new ItemStack(ModBlocks.blockMasterStone))); + categories.add( + new CategoryItemStack( + entries, + "guide.BloodMagic.category.rituals", + new ItemStack(ModBlocks.blockMasterStone))); } public static void registerDemonBook() { @@ -810,8 +914,8 @@ public class BloodMagicGuide { entries.add(new EntryUniText(ashesPages, "guide.BloodMagic.entryName.demons.ashes")); ArrayList tamedDemonPages = new ArrayList(); - tamedDemonPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.tamedDemon"))); + tamedDemonPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.tamedDemon"))); entries.add(new EntryUniText(tamedDemonPages, "guide.BloodMagic.entryName.demons.tamedDemon")); ArrayList futurePages = new ArrayList(); @@ -823,18 +927,25 @@ public class BloodMagicGuide { entries.add(new EntryUniText(knightPages, "guide.BloodMagic.entryName.demons.knight")); ArrayList demonShardPages = new ArrayList(); - demonShardPages.addAll(PageHelper.pagesForLongText( - (StatCollector.translateToLocal("aw.entries.demons.demonShard")), - new ItemStack(ModItems.demonBloodShard))); + demonShardPages.addAll( + PageHelper.pagesForLongText( + (StatCollector.translateToLocal("aw.entries.demons.demonShard")), + new ItemStack(ModItems.demonBloodShard))); entries.add(new EntryUniText(demonShardPages, "guide.BloodMagic.entryName.demons.demonShard")); ArrayList demonSummoningPages = new ArrayList(); demonSummoningPages.add(new PageIRecipe(RecipeHolder.arcanePedestalRecipe)); demonSummoningPages.add(new PageIRecipe(RecipeHolder.arcanePlinthRecipe)); - demonSummoningPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/demons/Ring1.png"), true)); - demonSummoningPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/demons/Ring2.png"), true)); + demonSummoningPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/demons/Ring1.png"), + true)); + demonSummoningPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/demons/Ring2.png"), + true)); demonSummoningPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.demonSummoning"))); entries.add(new EntryUniText(demonSummoningPages, "guide.BloodMagic.entryName.demons.demonSummoning")); @@ -847,47 +958,53 @@ public class BloodMagicGuide { entries.add(new EntryUniText(keysGatePages, "guide.BloodMagic.entryName.demons.keysGate")); ArrayList futurePlansPages = new ArrayList(); - futurePlansPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.futurePlans"))); + futurePlansPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.futurePlans"))); entries.add(new EntryUniText(futurePlansPages, "guide.BloodMagic.entryName.demons.futurePlans")); ArrayList demonInvasionPages = new ArrayList(); - demonInvasionPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.demonInvasion"))); + demonInvasionPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.demonInvasion"))); entries.add(new EntryUniText(demonInvasionPages, "guide.BloodMagic.entryName.demons.demonInvasion")); ArrayList observationsPages = new ArrayList(); - observationsPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.observations"))); + observationsPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.observations"))); entries.add(new EntryUniText(observationsPages, "guide.BloodMagic.entryName.demons.observations")); - categories.add(new CategoryItemStack( - entries, "guide.BloodMagic.category.demons", new ItemStack(ModItems.demonBloodShard))); + categories.add( + new CategoryItemStack( + entries, + "guide.BloodMagic.category.demons", + new ItemStack(ModItems.demonBloodShard))); } public static void registerSpellBook() { List entries = new ArrayList(); ArrayList demonGirlPages = new ArrayList(); - demonGirlPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.demonGirl"))); + demonGirlPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.demonGirl"))); entries.add(new EntryUniText(demonGirlPages, "guide.BloodMagic.entryName.spells.demonGirl")); ArrayList spellTablePages = new ArrayList(); - spellTablePages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.spellTable.1"))); - spellTablePages.add(new PageUnlocImage( - "", - new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/SimpleSpellTable.png"), - true)); - spellTablePages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.spellTable.2"))); + spellTablePages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.spellTable.1"))); + spellTablePages.add( + new PageUnlocImage( + "", + new ResourceLocation( + "alchemicalwizardry:textures/misc/screenshots/spells/SimpleSpellTable.png"), + true)); + spellTablePages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.spellTable.2"))); entries.add(new EntryUniText(spellTablePages, "guide.BloodMagic.entryName.spells.spellTable")); ArrayList simpleEffectsPages = new ArrayList(); for (int i = 1; i <= 11; i++) { - simpleEffectsPages.addAll(PageHelper.pagesForLongText( - StatCollector.translateToLocal("aw.entries.spells.simpleEffects." + i))); + simpleEffectsPages.addAll( + PageHelper + .pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.simpleEffects." + i))); } entries.add(new EntryUniText(simpleEffectsPages, "guide.BloodMagic.entryName.spells.simpleEffects")); @@ -901,49 +1018,64 @@ public class BloodMagicGuide { entries.add(new EntryUniText(tableAndSkullsPages, "guide.BloodMagic.entryName.spells.tableAndSkulls")); ArrayList timePassesPages = new ArrayList(); - timePassesPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.timePasses"))); + timePassesPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.timePasses"))); entries.add(new EntryUniText(timePassesPages, "guide.BloodMagic.entryName.spells.timePasses")); ArrayList complexSpellBasicsPages = new ArrayList(); complexSpellBasicsPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics.1"))); - complexSpellBasicsPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Paradigm.png"), true)); + complexSpellBasicsPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Paradigm.png"), + true)); - for (int i = 2; i <= 6; i++) - complexSpellBasicsPages.addAll(PageHelper.pagesForLongText( - StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics." + i))); + for (int i = 2; i <= 6; i++) complexSpellBasicsPages.addAll( + PageHelper + .pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics." + i))); - complexSpellBasicsPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Effect.png"), true)); + complexSpellBasicsPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Effect.png"), + true)); complexSpellBasicsPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics.7"))); - complexSpellBasicsPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Modifier.png"), true)); + complexSpellBasicsPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Modifier.png"), + true)); - for (int i = 8; i <= 12; i++) - complexSpellBasicsPages.addAll(PageHelper.pagesForLongText( - StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics." + i))); + for (int i = 8; i <= 12; i++) complexSpellBasicsPages.addAll( + PageHelper + .pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics." + i))); - complexSpellBasicsPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Enhancement.png"), true)); + complexSpellBasicsPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Enhancement.png"), + true)); - for (int i = 13; i <= 16; i++) - complexSpellBasicsPages.addAll(PageHelper.pagesForLongText( - StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics." + i))); + for (int i = 13; i <= 16; i++) complexSpellBasicsPages.addAll( + PageHelper + .pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics." + i))); - complexSpellBasicsPages.add(new PageUnlocImage( - "", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Conduit.png"), true)); + complexSpellBasicsPages.add( + new PageUnlocImage( + "", + new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Conduit.png"), + true)); complexSpellBasicsPages.addAll( PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics.17"))); entries.add(new EntryUniText(complexSpellBasicsPages, "guide.BloodMagic.entryName.spells.complexSpellBasics")); ArrayList complexSpellEffectsPages = new ArrayList(); - for (int i = 1; i <= 17; i++) - complexSpellEffectsPages.addAll(PageHelper.pagesForLongText( - StatCollector.translateToLocal("aw.entries.spells.complexSpellEffects." + i))); + for (int i = 1; i <= 17; i++) complexSpellEffectsPages.addAll( + PageHelper.pagesForLongText( + StatCollector.translateToLocal("aw.entries.spells.complexSpellEffects." + i))); entries.add( new EntryUniText(complexSpellEffectsPages, "guide.BloodMagic.entryName.spells.complexSpellEffects")); @@ -952,47 +1084,49 @@ public class BloodMagicGuide { entries.add(new EntryUniText(offTopicPages, "guide.BloodMagic.entryName.spells.offTopic")); ArrayList demonicPowerPages = new ArrayList(); - demonicPowerPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.demonicPower"))); + demonicPowerPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.demonicPower"))); entries.add(new EntryUniText(demonicPowerPages, "guide.BloodMagic.entryName.spells.demonicPower")); - categories.add(new CategoryItemStack( - entries, "guide.BloodMagic.category.spells", new ItemStack(ModItems.itemComplexSpellCrystal))); + categories.add( + new CategoryItemStack( + entries, + "guide.BloodMagic.category.spells", + new ItemStack(ModItems.itemComplexSpellCrystal))); } public static void registerAlchemyBook() { List entries = new ArrayList(); ArrayList fatedMeetingPages = new ArrayList(); - fatedMeetingPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.fatedMeeting"))); + fatedMeetingPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.fatedMeeting"))); entries.add(new EntryUniText(fatedMeetingPages, "guide.BloodMagic.entryName.alchemy.fatedMeeting")); ArrayList firstStepsPages = new ArrayList(); firstStepsPages.add(getOrbPageForRecipe(RecipeHolder.alchemySetRecipe)); - firstStepsPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.firstSteps"))); + firstStepsPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.firstSteps"))); entries.add(new EntryUniText(firstStepsPages, "guide.BloodMagic.entryName.alchemy.firstSteps")); ArrayList chemistrySetPages = new ArrayList(); - for (int i = 1; i <= 10; i++) - chemistrySetPages.addAll(PageHelper.pagesForLongText( - StatCollector.translateToLocal("aw.entries.alchemy.chemistrySet." + i))); + for (int i = 1; i <= 10; i++) chemistrySetPages.addAll( + PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.chemistrySet." + i))); entries.add(new EntryUniText(chemistrySetPages, "guide.BloodMagic.entryName.alchemy.chemistrySet")); ArrayList incensePages = new ArrayList(); - incensePages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.incense.1"))); + incensePages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.incense.1"))); incensePages.add(new PageIRecipe(RecipeHolder.crucibleRecipe)); incensePages.add(new PageIRecipe(RecipeHolder.woodAshRecipe)); - incensePages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.incense.2"))); + incensePages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.incense.2"))); incensePages.add(getOrbPageForRecipe(RecipeHolder.byrrusRecipe)); incensePages.add(getOrbPageForRecipe(RecipeHolder.livensRecipe)); incensePages.add(getOrbPageForRecipe(RecipeHolder.virRecipe)); incensePages.add(getOrbPageForRecipe(RecipeHolder.purpuraRecipe)); - incensePages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.incense.3"))); + incensePages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.incense.3"))); entries.add(new EntryUniText(incensePages, "guide.BloodMagic.entryName.alchemy.incense")); ArrayList potionsPages = new ArrayList(); @@ -1001,29 +1135,29 @@ public class BloodMagicGuide { entries.add(new EntryUniText(potionsPages, "guide.BloodMagic.entryName.alchemy.potions")); ArrayList reagentRevolutionPages = new ArrayList(); - for (int i = 1; i <= 8; i++) - reagentRevolutionPages.addAll(PageHelper.pagesForLongText( - StatCollector.translateToLocal("aw.entries.alchemy.reagentRevolution." + i))); + for (int i = 1; i <= 8; i++) reagentRevolutionPages.addAll( + PageHelper + .pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentRevolution." + i))); entries.add(new EntryUniText(reagentRevolutionPages, "guide.BloodMagic.entryName.alchemy.reagentRevolution")); ArrayList newPotionsPages = new ArrayList(); - newPotionsPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.newPotions"))); + newPotionsPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.newPotions"))); entries.add(new EntryUniText(newPotionsPages, "guide.BloodMagic.entryName.alchemy.newPotions")); ArrayList soulSandPages = new ArrayList(); - soulSandPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.soulSand"))); + soulSandPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.soulSand"))); entries.add(new EntryUniText(soulSandPages, "guide.BloodMagic.entryName.alchemy.soulSand")); ArrayList timeGoesByPages = new ArrayList(); - timeGoesByPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.timeGoesBy"))); + timeGoesByPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.timeGoesBy"))); entries.add(new EntryUniText(timeGoesByPages, "guide.BloodMagic.entryName.alchemy.timeGoesBy")); ArrayList catalystsPages = new ArrayList(); - catalystsPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.catalysts"))); + catalystsPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.catalysts"))); entries.add(new EntryUniText(catalystsPages, "guide.BloodMagic.entryName.alchemy.catalysts")); ArrayList activationCrystalPages = new ArrayList(); @@ -1057,8 +1191,8 @@ public class BloodMagicGuide { entries.add(new EntryUniText(reagentSystemPages, "guide.BloodMagic.entryName.alchemy.reagentSystem")); ArrayList magusSecretPages = new ArrayList(); - magusSecretPages.addAll( - PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.magusSecret"))); + magusSecretPages + .addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.magusSecret"))); entries.add(new EntryUniText(magusSecretPages, "guide.BloodMagic.entryName.alchemy.magusSecret")); ArrayList simpleCreationsPages = new ArrayList(); @@ -1066,7 +1200,10 @@ public class BloodMagicGuide { PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.simpleCreations"))); entries.add(new EntryUniText(simpleCreationsPages, "guide.BloodMagic.entryName.alchemy.simpleCreations")); - categories.add(new CategoryItemStack( - entries, "guide.BloodMagic.category.alchemy", new ItemStack(ModItems.alchemyFlask))); + categories.add( + new CategoryItemStack( + entries, + "guide.BloodMagic.category.alchemy", + new ItemStack(ModItems.alchemyFlask))); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandBind.java b/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandBind.java index d750de83..f6aca90b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandBind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandBind.java @@ -1,8 +1,7 @@ package WayofTime.alchemicalWizardry.common.commands; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; import java.util.List; + import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; @@ -10,7 +9,11 @@ import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.server.MinecraftServer; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; + public class CommandBind extends CommandBase { + public CommandBind() {} public String getCommandName() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandBloodMagic.java b/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandBloodMagic.java index 2b95f972..8f69c561 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandBloodMagic.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandBloodMagic.java @@ -1,16 +1,18 @@ package WayofTime.alchemicalWizardry.common.commands; +import java.util.*; + +import net.minecraft.command.CommandBase; +import net.minecraft.command.ICommandSender; +import net.minecraft.util.ChatComponentTranslation; +import net.minecraft.util.ChatStyle; +import net.minecraft.util.EnumChatFormatting; + import WayofTime.alchemicalWizardry.api.command.ISubCommand; import WayofTime.alchemicalWizardry.common.commands.sub.SubCommandBind; import WayofTime.alchemicalWizardry.common.commands.sub.SubCommandHelp; import WayofTime.alchemicalWizardry.common.commands.sub.SubCommandNetwork; import WayofTime.alchemicalWizardry.common.commands.sub.SubCommandOrb; -import java.util.*; -import net.minecraft.command.CommandBase; -import net.minecraft.command.ICommandSender; -import net.minecraft.util.ChatComponentTranslation; -import net.minecraft.util.ChatStyle; -import net.minecraft.util.EnumChatFormatting; public class CommandBloodMagic extends CommandBase { @@ -58,12 +60,13 @@ public class CommandBloodMagic extends CommandBase { String[] subArgs = Arrays.copyOfRange(args, 1, args.length); if (subCommand.canSenderUseSubCommand(commandSender)) subCommand.processSubCommand(commandSender, subArgs); - else - commandSender.addChatMessage(new ChatComponentTranslation("commands.error.perm") - .setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED))); + else commandSender.addChatMessage( + new ChatComponentTranslation("commands.error.perm") + .setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED))); } else { - commandSender.addChatMessage(new ChatComponentTranslation("commands.error.unknown") - .setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED))); + commandSender.addChatMessage( + new ChatComponentTranslation("commands.error.unknown") + .setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED))); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandSN.java b/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandSN.java index c858ead4..7c75555d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandSN.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandSN.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.commands; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import java.util.List; + import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.server.MinecraftServer; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; + public class CommandSN extends CommandBase { + public CommandSN() {} @Override @@ -91,7 +94,14 @@ public class CommandSN extends CommandBase { return getListOfStringsMatchingLastWord(astring, this.getPlayer()); } else if (astring.length == 2) { return getListOfStringsMatchingLastWord( - astring, "add", "subtract", "fill", "empty", "get", "fillMax", "create"); + astring, + "add", + "subtract", + "fill", + "empty", + "get", + "fillMax", + "create"); } return null; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandUnbind.java b/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandUnbind.java index b7e33f3c..0b5cb2de 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandUnbind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandUnbind.java @@ -1,14 +1,16 @@ package WayofTime.alchemicalWizardry.common.commands; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; + public class CommandUnbind extends CommandBase { + public CommandUnbind() {} public String getCommandName() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/commands/sub/SubCommandBind.java b/src/main/java/WayofTime/alchemicalWizardry/common/commands/sub/SubCommandBind.java index a43f5a0a..359b4648 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/commands/sub/SubCommandBind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/commands/sub/SubCommandBind.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.commands.sub; -import WayofTime.alchemicalWizardry.api.command.SubCommandBase; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayer; @@ -10,6 +7,10 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.ChatComponentTranslation; import net.minecraft.util.StatCollector; +import WayofTime.alchemicalWizardry.api.command.SubCommandBase; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; + public class SubCommandBind extends SubCommandBase { public SubCommandBind(ICommand parent) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/commands/sub/SubCommandHelp.java b/src/main/java/WayofTime/alchemicalWizardry/common/commands/sub/SubCommandHelp.java index 007c2380..e9d0a818 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/commands/sub/SubCommandHelp.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/commands/sub/SubCommandHelp.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.commands.sub; -import WayofTime.alchemicalWizardry.api.command.ISubCommand; -import WayofTime.alchemicalWizardry.api.command.SubCommandBase; -import WayofTime.alchemicalWizardry.common.commands.CommandBloodMagic; import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; import net.minecraft.util.ChatComponentText; @@ -10,6 +7,10 @@ import net.minecraft.util.ChatStyle; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; +import WayofTime.alchemicalWizardry.api.command.ISubCommand; +import WayofTime.alchemicalWizardry.api.command.SubCommandBase; +import WayofTime.alchemicalWizardry.common.commands.CommandBloodMagic; + public class SubCommandHelp extends SubCommandBase { public SubCommandHelp(ICommand parent) { @@ -37,12 +38,13 @@ public class SubCommandHelp extends SubCommandBase { if (args.length > 0) return; - for (ISubCommand subCommand : - ((CommandBloodMagic) getParentCommand()).getSubCommands().values()) - commandSender.addChatMessage(new ChatComponentText(StatCollector.translateToLocalFormatted( - "commands.format.help", - capitalizeFirstLetter(subCommand.getSubCommandName()), - subCommand.getArgUsage(commandSender))) - .setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GREEN))); + for (ISubCommand subCommand : ((CommandBloodMagic) getParentCommand()).getSubCommands().values()) + commandSender.addChatMessage( + new ChatComponentText( + StatCollector.translateToLocalFormatted( + "commands.format.help", + capitalizeFirstLetter(subCommand.getSubCommandName()), + subCommand.getArgUsage(commandSender))) + .setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GREEN))); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/commands/sub/SubCommandNetwork.java b/src/main/java/WayofTime/alchemicalWizardry/common/commands/sub/SubCommandNetwork.java index 0104d3b6..b3b9841a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/commands/sub/SubCommandNetwork.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/commands/sub/SubCommandNetwork.java @@ -1,14 +1,16 @@ package WayofTime.alchemicalWizardry.common.commands.sub; -import WayofTime.alchemicalWizardry.api.command.SubCommandBase; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import java.util.Locale; + import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ChatComponentText; import net.minecraft.util.StatCollector; +import WayofTime.alchemicalWizardry.api.command.SubCommandBase; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; + public class SubCommandNetwork extends SubCommandBase { public SubCommandNetwork(ICommand parent) { @@ -61,7 +63,10 @@ public class SubCommandNetwork extends SubCommandBase { int amount = Integer.parseInt(args[2]); SoulNetworkHandler.syphonAndDamageFromNetwork(givenName, player, amount); displaySuccessString( - commandSender, "commands.network.syphon.success", amount, givenName); + commandSender, + "commands.network.syphon.success", + amount, + givenName); } else { displayErrorString(commandSender, "commands.error.arg.invalid"); } @@ -80,8 +85,8 @@ public class SubCommandNetwork extends SubCommandBase { if (args.length == 3) { if (isInteger(args[2])) { int amount = Integer.parseInt(args[2]); - int maxOrb = SoulNetworkHandler.getMaximumForOrbTier( - SoulNetworkHandler.getCurrentMaxOrb(givenName)); + int maxOrb = SoulNetworkHandler + .getMaximumForOrbTier(SoulNetworkHandler.getCurrentMaxOrb(givenName)); SoulNetworkHandler.addCurrentEssenceToMaximum(givenName, amount, maxOrb); displaySuccessString(commandSender, "commands.network.add.success", amount, givenName); } else { @@ -119,10 +124,11 @@ public class SubCommandNetwork extends SubCommandBase { break; } - if (args.length > 1) - commandSender.addChatMessage(new ChatComponentText( - StatCollector.translateToLocal("message.divinationsigil.currentessence") + " " - + SoulNetworkHandler.getCurrentEssence(givenName) + "LP")); + if (args.length > 1) commandSender.addChatMessage( + new ChatComponentText( + StatCollector.translateToLocal("message.divinationsigil.currentessence") + " " + + SoulNetworkHandler.getCurrentEssence(givenName) + + "LP")); break; } @@ -146,8 +152,8 @@ public class SubCommandNetwork extends SubCommandBase { } if (args.length > 1) { - int maxOrb = SoulNetworkHandler.getMaximumForOrbTier( - SoulNetworkHandler.getCurrentMaxOrb(givenName)); + int maxOrb = SoulNetworkHandler + .getMaximumForOrbTier(SoulNetworkHandler.getCurrentMaxOrb(givenName)); SoulNetworkHandler.setCurrentEssence(givenName, maxOrb); displaySuccessString(commandSender, "commands.network.cap.success", givenName); } @@ -162,6 +168,7 @@ public class SubCommandNetwork extends SubCommandBase { } private enum ValidCommands { + SYPHON("commands.network.syphon.help"), ADD("commands.network.add.help"), SET("commands.network.set.help"), diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/commands/sub/SubCommandOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/commands/sub/SubCommandOrb.java index ed5971bc..e953d32a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/commands/sub/SubCommandOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/commands/sub/SubCommandOrb.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.commands.sub; -import WayofTime.alchemicalWizardry.api.command.SubCommandBase; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import java.util.Locale; + import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; import net.minecraft.util.ChatComponentText; import net.minecraft.util.StatCollector; +import WayofTime.alchemicalWizardry.api.command.SubCommandBase; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; + public class SubCommandOrb extends SubCommandBase { public SubCommandOrb(ICommand parent) { @@ -71,9 +73,11 @@ public class SubCommandOrb extends SubCommandBase { break; } - if (args.length > 1) - commandSender.addChatMessage(new ChatComponentText(StatCollector.translateToLocalFormatted( - "message.orb.currenttier", SoulNetworkHandler.getCurrentMaxOrb(givenName)))); + if (args.length > 1) commandSender.addChatMessage( + new ChatComponentText( + StatCollector.translateToLocalFormatted( + "message.orb.currenttier", + SoulNetworkHandler.getCurrentMaxOrb(givenName)))); break; } @@ -85,6 +89,7 @@ public class SubCommandOrb extends SubCommandBase { } private enum ValidCommands { + SET("commands.orb.set.help"), GET("commands.orb.get.help"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/compress/AdvancedCompressionHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/compress/AdvancedCompressionHandler.java index 6c2403c9..9745737c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/compress/AdvancedCompressionHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/compress/AdvancedCompressionHandler.java @@ -1,15 +1,17 @@ package WayofTime.alchemicalWizardry.common.compress; -import WayofTime.alchemicalWizardry.api.compress.CompressionHandler; -import WayofTime.alchemicalWizardry.api.compress.CompressionRegistry; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.compress.CompressionHandler; +import WayofTime.alchemicalWizardry.api.compress.CompressionRegistry; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class AdvancedCompressionHandler extends CompressionHandler { + @Override public ItemStack compressInventory(ItemStack[] inv, World world) { return test(inv, true, world); @@ -28,7 +30,11 @@ public class AdvancedCompressionHandler extends CompressionHandler { int needed = i * i; int neededLeft = iterateThroughInventory( - invStack, threshold + invStack.getMaxStackSize() - needed, inv, needed, false); + invStack, + threshold + invStack.getMaxStackSize() - needed, + inv, + needed, + false); if (neededLeft <= 0) { iterateThroughInventory(invStack, 0, inv, needed, true); return stacky; @@ -50,10 +56,8 @@ public class AdvancedCompressionHandler extends CompressionHandler { continue; } - if (invStack.isItemEqual(required) - && (invStack.getTagCompound() == null - ? required.getTagCompound() == null - : invStack.getTagCompound().equals(required.getTagCompound()))) { + if (invStack.isItemEqual(required) && (invStack.getTagCompound() == null ? required.getTagCompound() == null + : invStack.getTagCompound().equals(required.getTagCompound()))) { int stackSize = invStack.stackSize; int used = 0; if (kept > 0) { @@ -88,14 +92,12 @@ public class AdvancedCompressionHandler extends CompressionHandler { if (stack == null) { return false; } - InventoryCrafting inventory = new InventoryCrafting( - new Container() { - public boolean canInteractWith(EntityPlayer player) { - return false; - } - }, - 2, - 2); + InventoryCrafting inventory = new InventoryCrafting(new Container() { + + public boolean canInteractWith(EntityPlayer player) { + return false; + } + }, 2, 2); inventory.setInventorySlotContents(0, stack); @@ -122,14 +124,12 @@ public class AdvancedCompressionHandler extends CompressionHandler { } public static ItemStack getRecipe(ItemStack stack, World world, int gridSize) { - InventoryCrafting inventory = new InventoryCrafting( - new Container() { - public boolean canInteractWith(EntityPlayer player) { - return false; - } - }, - gridSize, - gridSize); + InventoryCrafting inventory = new InventoryCrafting(new Container() { + + public boolean canInteractWith(EntityPlayer player) { + return false; + } + }, gridSize, gridSize); for (int i = 0; i < inventory.getSizeInventory(); i++) { inventory.setInventorySlotContents(i, stack); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/compress/BaseCompressionHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/compress/BaseCompressionHandler.java index 37015007..e0d0b703 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/compress/BaseCompressionHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/compress/BaseCompressionHandler.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.compress; -import WayofTime.alchemicalWizardry.api.compress.CompressionHandler; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.compress.CompressionHandler; + public class BaseCompressionHandler extends CompressionHandler { + private final ItemStack required; private final ItemStack result; private final int leftover; @@ -56,8 +58,7 @@ public class BaseCompressionHandler extends CompressionHandler { } if (invStack.isItemEqual(this.required) - && (invStack.getTagCompound() == null - ? this.required.getTagCompound() == null + && (invStack.getTagCompound() == null ? this.required.getTagCompound() == null : invStack.getTagCompound().equals(this.required.getTagCompound()))) { int stackSize = invStack.stackSize; int used = 0; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingManager.java b/src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingManager.java index 74edce65..b88798af 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingManager.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingManager.java @@ -1,9 +1,8 @@ package WayofTime.alchemicalWizardry.common.compress; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.LinkedList; import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.InventoryCrafting; @@ -12,7 +11,11 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class StorageBlockCraftingManager { + private static final StorageBlockCraftingManager instance = new StorageBlockCraftingManager(); private List recipes = new LinkedList(); @@ -24,111 +27,109 @@ public class StorageBlockCraftingManager { this.recipes = new StorageBlockCraftingRecipeAssimilator().getPackingRecipes(); AlchemicalWizardry.logger.info("Total number of compression recipes: " + this.recipes.size()); - // List tempRecipeList = new LinkedList(); + // List tempRecipeList = new LinkedList(); // - // World world = DimensionManager.getWorld(0); + // World world = DimensionManager.getWorld(0); // - // for(Object obj : this.recipes) - // { - // if(obj instanceof IRecipe) - // { - // IRecipe recipe = (IRecipe)obj; - // ItemStack outputStack = recipe.getRecipeOutput(); - // if(outputStack == null || outputStack.getItem() == null) - // { - // continue; - // } + // for(Object obj : this.recipes) + // { + // if(obj instanceof IRecipe) + // { + // IRecipe recipe = (IRecipe)obj; + // ItemStack outputStack = recipe.getRecipeOutput(); + // if(outputStack == null || outputStack.getItem() == null) + // { + // continue; + // } // - // if(recipe instanceof ShapedRecipes) - // { - // ShapedRecipes sRecipe = (ShapedRecipes)recipe; - // ItemStack[] input = sRecipe.recipeItems; + // if(recipe instanceof ShapedRecipes) + // { + // ShapedRecipes sRecipe = (ShapedRecipes)recipe; + // ItemStack[] input = sRecipe.recipeItems; // - // if(outputStack.stackSize == 1 && (input.length == 9 || input.length == 4)) - // { - // tempRecipeList.add(recipe); - // }else if((outputStack.stackSize == 9 || outputStack.stackSize == 4) && input.length == 1) - // { - // tempRecipeList.add(recipe); - // } - // } - // else if(recipe instanceof ShapelessRecipes) - // { - // ShapelessRecipes sRecipe = (ShapelessRecipes)recipe; - // List input = sRecipe.recipeItems; + // if(outputStack.stackSize == 1 && (input.length == 9 || input.length == 4)) + // { + // tempRecipeList.add(recipe); + // }else if((outputStack.stackSize == 9 || outputStack.stackSize == 4) && input.length == 1) + // { + // tempRecipeList.add(recipe); + // } + // } + // else if(recipe instanceof ShapelessRecipes) + // { + // ShapelessRecipes sRecipe = (ShapelessRecipes)recipe; + // List input = sRecipe.recipeItems; // - // if(outputStack.stackSize == 1 && (input.size() == 9 || input.size() == 4)) - // { - // Object obj1 = input.get(0); - // if(obj1 != null) - // { - // boolean allMatch = true; - // for(Object obj2 : input) - // { - // if(obj2 == null || !obj2.equals(obj1)) - // { - // allMatch = false; - // break; - // } - // } - // if(allMatch) - // { - // tempRecipeList.add(recipe); - // } - // } + // if(outputStack.stackSize == 1 && (input.size() == 9 || input.size() == 4)) + // { + // Object obj1 = input.get(0); + // if(obj1 != null) + // { + // boolean allMatch = true; + // for(Object obj2 : input) + // { + // if(obj2 == null || !obj2.equals(obj1)) + // { + // allMatch = false; + // break; + // } + // } + // if(allMatch) + // { + // tempRecipeList.add(recipe); + // } + // } // - // }else if((outputStack.stackSize == 9 || outputStack.stackSize == 4) && input.size() == 1) - // { - // tempRecipeList.add(recipe); - // } - // } - // else if((outputStack.stackSize == 1 && (recipe.getRecipeSize() == 9 || recipe.getRecipeSize() == 4)) || + // }else if((outputStack.stackSize == 9 || outputStack.stackSize == 4) && input.size() == 1) + // { + // tempRecipeList.add(recipe); + // } + // } + // else if((outputStack.stackSize == 1 && (recipe.getRecipeSize() == 9 || recipe.getRecipeSize() == 4)) || // ((outputStack.stackSize == 9 || outputStack.stackSize == 4) && recipe.getRecipeSize() == 1)) - // { - // tempRecipeList.add(recipe); - // continue; - // } - // } - // } + // { + // tempRecipeList.add(recipe); + // continue; + // } + // } + // } // - // List tempRecipeList2 = new LinkedList(); + // List tempRecipeList2 = new LinkedList(); // - // for(Object obj : tempRecipeList) - // { - // if(obj instanceof IRecipe) - // { - // IRecipe recipe = (IRecipe)obj; - // ItemStack outputStack = recipe.getRecipeOutput(); - // if(outputStack == null || outputStack.getItem() == null) - // { - // continue; - // } + // for(Object obj : tempRecipeList) + // { + // if(obj instanceof IRecipe) + // { + // IRecipe recipe = (IRecipe)obj; + // ItemStack outputStack = recipe.getRecipeOutput(); + // if(outputStack == null || outputStack.getItem() == null) + // { + // continue; + // } // - // if(isResultStackReversible(outputStack, 2, world, tempRecipeList) || + // if(isResultStackReversible(outputStack, 2, world, tempRecipeList) || // isResultStackReversible(outputStack, 3, world, tempRecipeList)) - // { - // tempRecipeList2.add(recipe); - // AlchemicalWizardry.logger.info("Now adding recipe for " + outputStack + " to the compression + // { + // tempRecipeList2.add(recipe); + // AlchemicalWizardry.logger.info("Now adding recipe for " + outputStack + " to the compression // handler."); - // } - // } - // } + // } + // } + // } // - // this.recipes = tempRecipeList2; + // this.recipes = tempRecipeList2; } private static boolean isResultStackReversible(ItemStack stack, int gridSize, World world, List list) { if (stack == null) { return false; } - InventoryCrafting inventory = new InventoryCrafting( - new Container() { - public boolean canInteractWith(EntityPlayer player) { - return false; - } - }, - 2, - 2); + InventoryCrafting inventory = new InventoryCrafting(new Container() { + + public boolean canInteractWith(EntityPlayer player) { + return false; + } + }, 2, 2); inventory.setInventorySlotContents(0, stack); @@ -155,14 +156,12 @@ public class StorageBlockCraftingManager { } private static ItemStack getRecipe(ItemStack stack, World world, int gridSize, List list) { - InventoryCrafting inventory = new InventoryCrafting( - new Container() { - public boolean canInteractWith(EntityPlayer player) { - return false; - } - }, - gridSize, - gridSize); + InventoryCrafting inventory = new InventoryCrafting(new Container() { + + public boolean canInteractWith(EntityPlayer player) { + return false; + } + }, gridSize, gridSize); for (int i = 0; i < inventory.getSizeInventory(); i++) { inventory.setInventorySlotContents(i, stack); } @@ -212,8 +211,7 @@ public class StorageBlockCraftingManager { } } - if (i == 2 - && itemstack.getItem() == itemstack1.getItem() + if (i == 2 && itemstack.getItem() == itemstack1.getItem() && itemstack.stackSize == 1 && itemstack1.stackSize == 1 && itemstack.getItem().isRepairable()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingRecipeAssimilator.java b/src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingRecipeAssimilator.java index 7cd5db76..5ea6c7f6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingRecipeAssimilator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingRecipeAssimilator.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.common.compress; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.LinkedList; import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.InventoryCrafting; @@ -19,9 +19,11 @@ import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; + public class StorageBlockCraftingRecipeAssimilator { - public static String[] problemMods = {"BiblioWoodsForestry"}; + public static String[] problemMods = { "BiblioWoodsForestry" }; public List getPackingRecipes() { // grab all recipes potentially suitable for packing or unpacking @@ -58,15 +60,15 @@ public class StorageBlockCraftingRecipeAssimilator { ItemStack unpacked = recipeUnpack.getRecipeOutput(); InventoryCrafting inventory = null; - for (Iterator it = packingRecipes.iterator(); it.hasNext(); ) { + for (Iterator it = packingRecipes.iterator(); it.hasNext();) { PackingRecipe recipePack = it.next(); // check if the packing recipe accepts the unpacking recipe's output boolean matched = false; - if (recipePack.possibleInputs - != null) { // the recipe could be parsed, use its inputs directly since that's faster + if (recipePack.possibleInputs != null) { // the recipe could be parsed, use its inputs directly since + // that's faster // verify recipe size if (recipePack.inputCount != unpacked.stackSize) continue; @@ -111,8 +113,8 @@ public class StorageBlockCraftingRecipeAssimilator { if (recipeUnpack.matches(inventoryUnpack, world)) { ret.add(recipePack.recipe); - AlchemicalWizardry.logger.info( - "Adding the following recipe to the Compression Handler: " + packOutput); + AlchemicalWizardry.logger + .info("Adding the following recipe to the Compression Handler: " + packOutput); it.remove(); } } @@ -129,6 +131,7 @@ public class StorageBlockCraftingRecipeAssimilator { private Container makeDummyContainer() { return new Container() { + @Override public boolean canInteractWith(EntityPlayer p_75145_1_) { return true; @@ -201,7 +204,7 @@ public class StorageBlockCraftingRecipeAssimilator { continue; } - for (Iterator it = options.iterator(); it.hasNext(); ) { + for (Iterator it = options.iterator(); it.hasNext();) { ItemStack stackReq = it.next(); boolean found = false; @@ -234,8 +237,8 @@ public class StorageBlockCraftingRecipeAssimilator { return dmgA == dmgB || dmgA == OreDictionary.WILDCARD_VALUE || dmgB == OreDictionary.WILDCARD_VALUE; } catch (NullPointerException e) { - AlchemicalWizardry.logger.error( - "A mod in this instance has registered an item with a null input. Known problem mods are:"); + AlchemicalWizardry.logger + .error("A mod in this instance has registered an item with a null input. Known problem mods are:"); String err = ""; for (String problem : problemMods) err += (err.length() > 0 ? ", " : "") + problem; @@ -246,6 +249,7 @@ public class StorageBlockCraftingRecipeAssimilator { } private static class PackingRecipe { + PackingRecipe(IRecipe recipe, List possibleInputs, int inputCount) { this.recipe = recipe; this.possibleInputs = possibleInputs; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java index 125a05d0..bcd70d4b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java @@ -1,14 +1,8 @@ package WayofTime.alchemicalWizardry.common.demonVillage; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.common.demonVillage.loot.DemonVillageLootRegistry; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.IBlockPortalNode; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.ITilePortalNode; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier; import java.util.ArrayList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.BlockDoor; import net.minecraft.block.BlockLadder; @@ -23,7 +17,16 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.common.demonVillage.loot.DemonVillageLootRegistry; +import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.IBlockPortalNode; +import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.ITilePortalNode; +import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier; + public class BlockSet { + protected String blockid; protected int[] metadata; protected List positions; @@ -48,14 +51,14 @@ public class BlockSet { metadata[i] = meta; } if (block instanceof BlockStairs) { - int[] northSet = new int[] {2, 3, 0, 1}; - int[] eastSet = new int[] {1, 0, 2, 3}; - int[] southSet = new int[] {3, 2, 1, 0}; - int[] westSet = new int[] {0, 1, 3, 2}; - int[] northUpSet = new int[] {6, 7, 4, 5}; - int[] eastUpSet = new int[] {5, 4, 6, 7}; - int[] southUpSet = new int[] {7, 6, 5, 4}; - int[] westUpSet = new int[] {4, 5, 7, 6}; + int[] northSet = new int[] { 2, 3, 0, 1 }; + int[] eastSet = new int[] { 1, 0, 2, 3 }; + int[] southSet = new int[] { 3, 2, 1, 0 }; + int[] westSet = new int[] { 0, 1, 3, 2 }; + int[] northUpSet = new int[] { 6, 7, 4, 5 }; + int[] eastUpSet = new int[] { 5, 4, 6, 7 }; + int[] southUpSet = new int[] { 7, 6, 5, 4 }; + int[] westUpSet = new int[] { 4, 5, 7, 6 }; switch (meta) { case 0: @@ -84,10 +87,10 @@ public class BlockSet { break; } } else if (block instanceof BlockLadder) { - int[] northSet = new int[] {3, 2, 5, 4}; - int[] eastSet = new int[] {4, 5, 3, 2}; - int[] southSet = new int[] {2, 3, 4, 5}; - int[] westSet = new int[] {5, 4, 2, 3}; + int[] northSet = new int[] { 3, 2, 5, 4 }; + int[] eastSet = new int[] { 4, 5, 3, 2 }; + int[] southSet = new int[] { 2, 3, 4, 5 }; + int[] westSet = new int[] { 5, 4, 2, 3 }; switch (meta) { case 3: @@ -106,10 +109,10 @@ public class BlockSet { } else if (block instanceof BlockTrapDoor) { int div = meta / 4; int mod = meta % 4; - int[] northSet = new int[] {1 + div * 4, div * 4, 3 + div * 4, 2 + div * 4}; // Second one: 0 + - int[] eastSet = new int[] {2 + div * 4, 3 + div * 4, 1 + div * 4, div * 4}; // Last one: 0 + - int[] southSet = new int[] {div * 4, 1 + div * 4, 2 + div * 4, 3 + div * 4}; // First one: 0 + - int[] westSet = new int[] {3 + div * 4, 2 + div * 4, div * 4, 1 + div * 4}; // Third one: 0 + + int[] northSet = new int[] { 1 + div * 4, div * 4, 3 + div * 4, 2 + div * 4 }; // Second one: 0 + + int[] eastSet = new int[] { 2 + div * 4, 3 + div * 4, 1 + div * 4, div * 4 }; // Last one: 0 + + int[] southSet = new int[] { div * 4, 1 + div * 4, 2 + div * 4, 3 + div * 4 }; // First one: 0 + + int[] westSet = new int[] { 3 + div * 4, 2 + div * 4, div * 4, 1 + div * 4 }; // Third one: 0 + switch (mod) { case 0: @@ -126,10 +129,10 @@ public class BlockSet { break; } } else if (block instanceof BlockTorch) { - int[] northSet = new int[] {3, 4, 1, 2}; - int[] eastSet = new int[] {2, 1, 3, 4}; - int[] southSet = new int[] {4, 3, 2, 1}; - int[] westSet = new int[] {1, 2, 4, 3}; + int[] northSet = new int[] { 3, 4, 1, 2 }; + int[] eastSet = new int[] { 2, 1, 3, 4 }; + int[] southSet = new int[] { 4, 3, 2, 1 }; + int[] westSet = new int[] { 1, 2, 4, 3 }; switch (meta) { case 1: @@ -146,10 +149,10 @@ public class BlockSet { break; } } else if (block instanceof BlockDoor) { - int[] northSet = new int[] {3, 1, 2, 0}; - int[] eastSet = new int[] {0, 2, 3, 1}; - int[] southSet = new int[] {1, 3, 0, 2}; - int[] westSet = new int[] {2, 0, 1, 3}; + int[] northSet = new int[] { 3, 1, 2, 0 }; + int[] eastSet = new int[] { 0, 2, 3, 1 }; + int[] southSet = new int[] { 1, 3, 0, 2 }; + int[] westSet = new int[] { 2, 0, 1, 3 }; switch (meta) { case 0: @@ -168,10 +171,10 @@ public class BlockSet { } else if (block instanceof BlockRedstoneComparator) { int div = meta / 4; int mod = meta % 4; - int[] northSet = new int[] {div * 4, 2 + div * 4, 3 + div * 4, 1 + div * 4}; // First one: 0 + - int[] eastSet = new int[] {1 + div * 4, 3 + div * 4, div * 4, 2 + div * 4}; // Third one: 0 + - int[] southSet = new int[] {2 + div * 4, div * 4, 1 + div * 4, 3 + div * 4}; // Second one: 0 + - int[] westSet = new int[] {3 + div * 4, 1 + div * 4, 2 + div * 4, div * 4}; // Last one: 0 + + int[] northSet = new int[] { div * 4, 2 + div * 4, 3 + div * 4, 1 + div * 4 }; // First one: 0 + + int[] eastSet = new int[] { 1 + div * 4, 3 + div * 4, div * 4, 2 + div * 4 }; // Third one: 0 + + int[] southSet = new int[] { 2 + div * 4, div * 4, 1 + div * 4, 3 + div * 4 }; // Second one: 0 + + int[] westSet = new int[] { 3 + div * 4, 1 + div * 4, 2 + div * 4, div * 4 }; // Last one: 0 + switch (mod) { case 0: @@ -190,10 +193,10 @@ public class BlockSet { } else if (block instanceof BlockRedstoneRepeater) { int div = meta / 4; int mod = meta % 4; - int[] northSet = new int[] {div * 4, 2 + div * 4, 3 + div * 4, 1 + div * 4}; // First one: 0 + - int[] eastSet = new int[] {1 + div * 4, 3 + div * 4, div * 4, 2 + div * 4}; // Third one: 0 + - int[] southSet = new int[] {2 + div * 4, div * 4, 1 + div * 4, 3 + div * 4}; // Second one: 0 + - int[] westSet = new int[] {3 + div * 4, 1 + div * 4, 2 + div * 4, div * 4}; // Last one: 0 + + int[] northSet = new int[] { div * 4, 2 + div * 4, 3 + div * 4, 1 + div * 4 }; // First one: 0 + + int[] eastSet = new int[] { 1 + div * 4, 3 + div * 4, div * 4, 2 + div * 4 }; // Third one: 0 + + int[] southSet = new int[] { 2 + div * 4, div * 4, 1 + div * 4, 3 + div * 4 }; // Second one: 0 + + int[] westSet = new int[] { 3 + div * 4, 1 + div * 4, 2 + div * 4, div * 4 }; // Last one: 0 + switch (mod) { case 0: @@ -261,16 +264,8 @@ public class BlockSet { } } - public void buildAtIndex( - TEDemonPortal teDemonPortal, - World world, - int xCoord, - int yCoord, - int zCoord, - ForgeDirection dir, - int index, - boolean populateInventories, - int tier) { + public void buildAtIndex(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, + ForgeDirection dir, int index, boolean populateInventories, int tier) { Block block = this.getBlock(); if (index >= positions.size() || block == null) { return; @@ -321,15 +316,8 @@ public class BlockSet { } } - public void buildAll( - TEDemonPortal teDemonPortal, - World world, - int xCoord, - int yCoord, - int zCoord, - ForgeDirection dir, - boolean populateInventories, - int tier) { + public void buildAll(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, + ForgeDirection dir, boolean populateInventories, int tier) { for (int i = 0; i < positions.size(); i++) { this.buildAtIndex(teDemonPortal, world, xCoord, yCoord, zCoord, dir, i, populateInventories, tier); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java index ea548a86..e6ba8fd7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java @@ -1,15 +1,18 @@ package WayofTime.alchemicalWizardry.common.demonVillage; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; import java.util.ArrayList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; + public class BuildingSchematic { + public String name; public int doorX; public int doorZ; @@ -45,14 +48,8 @@ public class BuildingSchematic { blockList.add(set); } - public void buildAll( - TEDemonPortal teDemonPortal, - World world, - int xCoord, - int yCoord, - int zCoord, - ForgeDirection dir, - boolean populateInventories) { + public void buildAll(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, + ForgeDirection dir, boolean populateInventories) { for (BlockSet set : blockList) { set.buildAll(teDemonPortal, world, xCoord, yCoord, zCoord, dir, populateInventories, this.buildingTier); } @@ -117,7 +114,7 @@ public class BuildingSchematic { } public void destroyAllInField(World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir) { - // GridSpaceHolder grid = this.createGSH(); //GridSpaceHolder is not aware of the buildings - need to use + // GridSpaceHolder grid = this.createGSH(); //GridSpaceHolder is not aware of the buildings - need to use // the schematic List positionList = getGriddedPositions(dir); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonBuilding.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonBuilding.java index 39f59010..db85f532 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonBuilding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonBuilding.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.demonVillage; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; + public class DemonBuilding { + public static final int BUILDING_HOUSE = 0; public static final int BUILDING_PORTAL = 1; @@ -31,19 +33,13 @@ public class DemonBuilding { return area.doesContainAll(master, gridX, gridZ, dir); } - public void buildAll( - TEDemonPortal teDemonPortal, - World world, - int xCoord, - int yCoord, - int zCoord, - ForgeDirection dir, - boolean populateInventories) { + public void buildAll(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, + ForgeDirection dir, boolean populateInventories) { schematic.buildAll(teDemonPortal, world, xCoord, yCoord, zCoord, dir, populateInventories); } - public void setAllGridSpaces( - int xInit, int zInit, int yLevel, ForgeDirection dir, int type, GridSpaceHolder master) { + public void setAllGridSpaces(int xInit, int zInit, int yLevel, ForgeDirection dir, int type, + GridSpaceHolder master) { area.setAllGridSpaces(xInit, zInit, yLevel, dir, type, master); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonCrosspath.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonCrosspath.java index 9b5c7272..09b1ed74 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonCrosspath.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonCrosspath.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.demonVillage; import net.minecraft.world.World; public class DemonCrosspath { + private int xCoord; private int yLevel; private int zCoord; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonVillagePath.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonVillagePath.java index 2185c591..5035069d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonVillagePath.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonVillagePath.java @@ -1,9 +1,5 @@ package WayofTime.alchemicalWizardry.common.demonVillage; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.IRoadWard; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; import net.minecraft.block.Block; import net.minecraft.block.BlockFlower; import net.minecraft.block.material.Material; @@ -11,7 +7,13 @@ import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.IRoadWard; +import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; + public class DemonVillagePath { + public int xPos; public int yPos; public int zPos; @@ -38,7 +40,15 @@ public class DemonVillagePath { int value = 0; int finalYPos = this.constructPartialPath( - portal, world, clearance, xi - rad * dir.offsetX, yi, zi - rad * dir.offsetZ, dir, length + rad, false); + portal, + world, + clearance, + xi - rad * dir.offsetX, + yi, + zi - rad * dir.offsetZ, + dir, + length + rad, + false); for (int i = -rad; i <= rad; i++) { value = Math.max( @@ -64,6 +74,7 @@ public class DemonVillagePath { } public class Int3AndBool { + public Int3 coords; public boolean bool; @@ -84,18 +95,10 @@ public class DemonVillagePath { * @param dir * @param length * @param doConstruct - * @return length if doConstruct, yi if !doConstruct + * @return length if doConstruct, yi if !doConstruct */ - public int constructPartialPath( - TEDemonPortal portal, - World world, - int clearance, - int xi, - int yi, - int zi, - ForgeDirection dir, - int length, - boolean doConstruct) { + public int constructPartialPath(TEDemonPortal portal, World world, int clearance, int xi, int yi, int zi, + ForgeDirection dir, int length, boolean doConstruct) { for (int i = 0; i < length; i++) { int xOffset = i * dir.offsetX; int zOffset = i * dir.offsetZ; @@ -110,10 +113,9 @@ public class DemonVillagePath { if ((this.forceReplaceBlock(block1)) || (!block1.isReplaceable(world, xi + xOffset, yi + sign * yOffset, zi + zOffset) - && this.isBlockReplaceable(block1)) - && (this.forceCanTunnelUnder(highBlock1) - || highBlock1.isReplaceable( - world, xi + xOffset, yi + sign * yOffset + 1, zi + zOffset))) { + && this.isBlockReplaceable(block1)) + && (this.forceCanTunnelUnder(highBlock1) || highBlock1 + .isReplaceable(world, xi + xOffset, yi + sign * yOffset + 1, zi + zOffset))) { if (doConstruct) { world.setBlock( xi + xOffset, @@ -131,12 +133,11 @@ public class DemonVillagePath { Block block2 = world.getBlock(xi + xOffset, yi + sign * yOffset, zi + zOffset); Block highBlock2 = world.getBlock(xi + xOffset, yi + sign * yOffset + 1, zi + zOffset); - if ((this.forceReplaceBlock(block2)) - || (!block2.isReplaceable(world, xi + xOffset, yi + sign * yOffset, zi + zOffset) - && this.isBlockReplaceable(block2)) - && (this.forceCanTunnelUnder(highBlock2) - || highBlock2.isReplaceable( - world, xi + xOffset, yi + sign * yOffset + 1, zi + zOffset))) { + if ((this.forceReplaceBlock(block2)) || (!block2 + .isReplaceable(world, xi + xOffset, yi + sign * yOffset, zi + zOffset) + && this.isBlockReplaceable(block2)) + && (this.forceCanTunnelUnder(highBlock2) || highBlock2 + .isReplaceable(world, xi + xOffset, yi + sign * yOffset + 1, zi + zOffset))) { if (doConstruct) { world.setBlock( xi + xOffset, @@ -158,14 +159,18 @@ public class DemonVillagePath { if (createBridgeInAirIfObstructed) { Block block1 = world.getBlock(xi + xOffset, yi, zi + zOffset); - if (block1.isReplaceable(world, xi + xOffset, yi, zi + zOffset) - || !this.isBlockReplaceable(block1) + if (block1.isReplaceable(world, xi + xOffset, yi, zi + zOffset) || !this.isBlockReplaceable(block1) || !this.forceReplaceBlock(block1)) { returnAmount = false; if (doConstruct) { world.setBlock( - xi + xOffset, yi, zi + zOffset, portal.getRoadBlock(), portal.getRoadMeta(), 3); + xi + xOffset, + yi, + zi + zOffset, + portal.getRoadBlock(), + portal.getRoadMeta(), + 3); } } else { returnAmount = true; @@ -174,14 +179,18 @@ public class DemonVillagePath { } else if (tunnelIfObstructed) { Block block1 = world.getBlock(xi + xOffset, yi, zi + zOffset); - if (!block1.isReplaceable(world, xi + xOffset, yi, zi + zOffset) - || this.isBlockReplaceable(block1) + if (!block1.isReplaceable(world, xi + xOffset, yi, zi + zOffset) || this.isBlockReplaceable(block1) || !this.forceReplaceBlock(block1)) { returnAmount = false; if (doConstruct) { world.setBlock( - xi + xOffset, yi, zi + zOffset, portal.getRoadBlock(), portal.getRoadMeta(), 3); + xi + xOffset, + yi, + zi + zOffset, + portal.getRoadBlock(), + portal.getRoadMeta(), + 3); world.setBlockToAir(xi + xOffset, yi + 1, zi + zOffset); world.setBlockToAir(xi + xOffset, yi + 2, zi + zOffset); world.setBlockToAir(xi + xOffset, yi + 3, zi + zOffset); @@ -217,10 +226,9 @@ public class DemonVillagePath { if ((this.forceReplaceBlock(block1)) || (!block1.isReplaceable(world, xi + xOffset, yi + sign * yOffset, zi + zOffset) - && this.isBlockReplaceable(block1)) - && (this.forceCanTunnelUnder(highBlock1) - || highBlock1.isReplaceable( - world, xi + xOffset, yi + sign * yOffset + 1, zi + zOffset))) { + && this.isBlockReplaceable(block1)) + && (this.forceCanTunnelUnder(highBlock1) || highBlock1 + .isReplaceable(world, xi + xOffset, yi + sign * yOffset + 1, zi + zOffset))) { yi += sign * yOffset; break; } else { @@ -228,12 +236,11 @@ public class DemonVillagePath { Block block2 = world.getBlock(xi + xOffset, yi + sign * yOffset, zi + zOffset); Block highBlock2 = world.getBlock(xi + xOffset, yi + sign * yOffset + 1, zi + zOffset); - if ((this.forceReplaceBlock(block2)) - || (!block2.isReplaceable(world, xi + xOffset, yi + sign * yOffset, zi + zOffset) - && this.isBlockReplaceable(block2)) - && (this.forceCanTunnelUnder(highBlock2) - || highBlock2.isReplaceable( - world, xi + xOffset, yi + sign * yOffset + 1, zi + zOffset))) { + if ((this.forceReplaceBlock(block2)) || (!block2 + .isReplaceable(world, xi + xOffset, yi + sign * yOffset, zi + zOffset) + && this.isBlockReplaceable(block2)) + && (this.forceCanTunnelUnder(highBlock2) || highBlock2 + .isReplaceable(world, xi + xOffset, yi + sign * yOffset + 1, zi + zOffset))) { yi += sign * yOffset; break; } @@ -249,10 +256,8 @@ public class DemonVillagePath { } public boolean isBlockReplaceable(Block block) { - return !(block.getMaterial() == Material.leaves - || block.getMaterial() == Material.vine - || block instanceof IRoadWard) - && !block.equals(ModBlocks.blockDemonPortal); + return !(block.getMaterial() == Material.leaves || block.getMaterial() == Material.vine + || block instanceof IRoadWard) && !block.equals(ModBlocks.blockDemonPortal); } public boolean forceReplaceBlock(Block block) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpace.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpace.java index eaf4db2a..f3478d80 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpace.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpace.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.demonVillage; import net.minecraft.nbt.NBTTagCompound; public class GridSpace { + public static final int EMPTY = 0; public static final int MAIN_PORTAL = 1; public static final int MINI_PORTAL = 2; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpaceHolder.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpaceHolder.java index 403823bb..1ca02690 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpaceHolder.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpaceHolder.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.demonVillage; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; + public class GridSpaceHolder { + public GridSpace[][] area; public int negXRadius; // These variables indicate how much the grid has expanded from the 1x1 public int posXRadius; // matrix in each direction @@ -114,9 +116,14 @@ public class GridSpaceHolder { public boolean doesContainAll(GridSpaceHolder master, int xInit, int zInit, ForgeDirection dir) { if (master != null) { - if (TEDemonPortal.printDebug) - AlchemicalWizardry.logger.info("negXRadius: " + negXRadius + " posXRadius: " + posXRadius - + " negZRadius: " + negZRadius + " posZRadius: " + posZRadius); + if (TEDemonPortal.printDebug) AlchemicalWizardry.logger.info( + "negXRadius: " + negXRadius + + " posXRadius: " + + posXRadius + + " negZRadius: " + + negZRadius + + " posZRadius: " + + posZRadius); for (int i = -negXRadius; i <= posXRadius; i++) { for (int j = -negZRadius; j <= posZRadius; j++) { GridSpace thisSpace = this.getGridSpace(i, j); @@ -157,8 +164,8 @@ public class GridSpaceHolder { return false; } - public void setAllGridSpaces( - int xInit, int zInit, int yLevel, ForgeDirection dir, int type, GridSpaceHolder master) { + public void setAllGridSpaces(int xInit, int zInit, int yLevel, ForgeDirection dir, int type, + GridSpaceHolder master) { if (TEDemonPortal.printDebug) AlchemicalWizardry.logger.info("Grid space selected: (" + xInit + "," + zInit + ")"); if (master != null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/TileBlockSet.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/TileBlockSet.java index 6c71e768..a529b67e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/TileBlockSet.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/TileBlockSet.java @@ -3,5 +3,6 @@ package WayofTime.alchemicalWizardry.common.demonVillage; import net.minecraft.nbt.NBTTagCompound; public class TileBlockSet extends BlockSet { + public NBTTagCompound tag; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityAIOccasionalRangedAttack.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityAIOccasionalRangedAttack.java index afbf32c3..d2dac20d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityAIOccasionalRangedAttack.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityAIOccasionalRangedAttack.java @@ -6,6 +6,7 @@ import net.minecraft.entity.ai.EntityAIBase; import net.minecraft.util.MathHelper; public class EntityAIOccasionalRangedAttack extends EntityAIBase { + /** The entity the AI instance has been applied to */ private final EntityLiving entityHost; /** The entity (as a RangedAttackMob) the AI instance has been applied to. */ @@ -26,21 +27,15 @@ public class EntityAIOccasionalRangedAttack extends EntityAIBase { private float field_96562_i; private float field_82642_h; - private static final String __OBFID = "CL_00001609"; private double range; - public EntityAIOccasionalRangedAttack( - IOccasionalRangedAttackMob p_i1649_1_, double p_i1649_2_, int p_i1649_4_, float p_i1649_5_, double range) { + public EntityAIOccasionalRangedAttack(IOccasionalRangedAttackMob p_i1649_1_, double p_i1649_2_, int p_i1649_4_, + float p_i1649_5_, double range) { this(p_i1649_1_, p_i1649_2_, p_i1649_4_, p_i1649_4_, p_i1649_5_, range); } - public EntityAIOccasionalRangedAttack( - IOccasionalRangedAttackMob p_i1650_1_, - double p_i1650_2_, - int p_i1650_4_, - int p_i1650_5_, - float p_i1650_6_, - double range) { + public EntityAIOccasionalRangedAttack(IOccasionalRangedAttackMob p_i1650_1_, double p_i1650_2_, int p_i1650_4_, + int p_i1650_5_, float p_i1650_6_, double range) { this.rangedAttackTime = -1; if (!(p_i1650_1_ instanceof EntityLivingBase)) { @@ -106,8 +101,8 @@ public class EntityAIOccasionalRangedAttack extends EntityAIBase { * Updates the task */ public void updateTask() { - double d0 = this.entityHost.getDistanceSq( - this.attackTarget.posX, this.attackTarget.boundingBox.minY, this.attackTarget.posZ); + double d0 = this.entityHost + .getDistanceSq(this.attackTarget.posX, this.attackTarget.boundingBox.minY, this.attackTarget.posZ); boolean flag = this.entityHost.getEntitySenses().canSee(this.attackTarget); if (flag) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java index 68d48d5c..c9b2db93 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.demonVillage.ai; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.ai.EntityAIHurtByTarget; import net.minecraft.tileentity.TileEntity; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; +import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; + public class EntityDemonAIHurtByTarget extends EntityAIHurtByTarget { + boolean entityCallsForHelp; public EntityDemonAIHurtByTarget(EntityCreature demon, boolean callsForHelp) { @@ -23,8 +25,8 @@ public class EntityDemonAIHurtByTarget extends EntityAIHurtByTarget { return; } - TileEntity portal = this.taskOwner.worldObj.getTileEntity( - portalPosition.xCoord, portalPosition.yCoord, portalPosition.zCoord); + TileEntity portal = this.taskOwner.worldObj + .getTileEntity(portalPosition.xCoord, portalPosition.yCoord, portalPosition.zCoord); if ((this.taskOwner.getAITarget() instanceof IHoardDemon && portalPosition.equals(((IHoardDemon) this.taskOwner.getAITarget()).getPortalLocation()))) { @@ -39,23 +41,23 @@ public class EntityDemonAIHurtByTarget extends EntityAIHurtByTarget { ((TEDemonPortal) portal).notifyDemons(taskOwner, this.taskOwner.getAITarget(), 25); } - // double d0 = this.getTargetDistance(); - // List list = this.taskOwner.worldObj.getEntitiesWithinAABB(this.taskOwner.getClass(), + // double d0 = this.getTargetDistance(); + // List list = this.taskOwner.worldObj.getEntitiesWithinAABB(this.taskOwner.getClass(), // AxisAlignedBB.getBoundingBox(this.taskOwner.posX, this.taskOwner.posY, this.taskOwner.posZ, // this.taskOwner.posX + 1.0D, this.taskOwner.posY + 1.0D, this.taskOwner.posZ + 1.0D).expand(d0, 10.0D, // d0)); - // Iterator iterator = list.iterator(); + // Iterator iterator = list.iterator(); // - // while (iterator.hasNext()) - // { - // EntityCreature entitycreature = (EntityCreature)iterator.next(); + // while (iterator.hasNext()) + // { + // EntityCreature entitycreature = (EntityCreature)iterator.next(); // - // if (this.taskOwner != entitycreature && entitycreature.getAttackTarget() == null && + // if (this.taskOwner != entitycreature && entitycreature.getAttackTarget() == null && // !entitycreature.isOnSameTeam(this.taskOwner.getAITarget())) - // { - // entitycreature.setAttackTarget(this.taskOwner.getAITarget()); - // } - // } + // { + // entitycreature.setAttackTarget(this.taskOwner.getAITarget()); + // } + // } } super.startExecuting(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/IOccasionalRangedAttackMob.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/IOccasionalRangedAttackMob.java index b66075e3..c9c7822a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/IOccasionalRangedAttackMob.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/IOccasionalRangedAttackMob.java @@ -3,5 +3,6 @@ package WayofTime.alchemicalWizardry.common.demonVillage.ai; import net.minecraft.entity.IRangedAttackMob; public interface IOccasionalRangedAttackMob extends IRangedAttackMob { + boolean shouldUseRangedAttack(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonHoardPacket.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonHoardPacket.java index 99aa2505..91846f0f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonHoardPacket.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonHoardPacket.java @@ -1,20 +1,15 @@ package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; + public abstract class DemonHoardPacket { + public DemonHoardPacket() {} - public abstract int summonDemons( - TEDemonPortal teDemonPortal, - World world, - int x, - int y, - int z, - DemonType type, - int tier, - boolean spawnGuardian); + public abstract int summonDemons(TEDemonPortal teDemonPortal, World world, int x, int y, int z, DemonType type, + int tier, boolean spawnGuardian); public abstract boolean canFitType(DemonType type); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketMinorGrunt.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketMinorGrunt.java index 4b7937e3..afaf5b27 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketMinorGrunt.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketMinorGrunt.java @@ -1,5 +1,7 @@ package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGrunt; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntEarth; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntFire; @@ -11,9 +13,9 @@ import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityM import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntIce; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntWind; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; -import net.minecraft.world.World; public class DemonPacketMinorGrunt extends DemonHoardPacket { + @Override public boolean canFitType(DemonType type) { return true; @@ -25,14 +27,7 @@ public class DemonPacketMinorGrunt extends DemonHoardPacket { } @Override - public int summonDemons( - TEDemonPortal teDemonPortal, - World world, - int x, - int y, - int z, - DemonType type, - int tier, + public int summonDemons(TEDemonPortal teDemonPortal, World world, int x, int y, int z, DemonType type, int tier, boolean spawnGuardian) { EntityMinorDemonGrunt entity; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketRegistry.java index 71c5948d..35d81669 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketRegistry.java @@ -1,12 +1,15 @@ package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; + import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; + public class DemonPacketRegistry { + public static Map packetMap = new HashMap(); public static boolean registerDemonPacket(String string, DemonHoardPacket packet) { @@ -51,15 +54,8 @@ public class DemonPacketRegistry { return ""; } - public static int spawnDemons( - TEDemonPortal teDemonPortal, - World world, - int x, - int y, - int z, - DemonType type, - int tier, - boolean spawnGuardian) { + public static int spawnDemons(TEDemonPortal teDemonPortal, World world, int x, int y, int z, DemonType type, + int tier, boolean spawnGuardian) { return spawnDemons( teDemonPortal, world, @@ -72,16 +68,8 @@ public class DemonPacketRegistry { spawnGuardian); } - public static int spawnDemons( - TEDemonPortal teDemonPortal, - World world, - int x, - int y, - int z, - String name, - DemonType type, - int tier, - boolean spawnGuardian) { + public static int spawnDemons(TEDemonPortal teDemonPortal, World world, int x, int y, int z, String name, + DemonType type, int tier, boolean spawnGuardian) { DemonHoardPacket packet = packetMap.get(name); if (packet != null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGrunt.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGrunt.java index efecbfeb..eeff9bf8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGrunt.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGrunt.java @@ -1,19 +1,5 @@ package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage; -import WayofTime.alchemicalWizardry.common.EntityAITargetAggroCloaking; -import WayofTime.alchemicalWizardry.common.demonVillage.ai.EntityAIOccasionalRangedAttack; -import WayofTime.alchemicalWizardry.common.demonVillage.ai.EntityDemonAIHurtByTarget; -import WayofTime.alchemicalWizardry.common.demonVillage.ai.IOccasionalRangedAttackMob; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; -import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; -import WayofTime.alchemicalWizardry.common.rituals.LocalStorageAlphaPact; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; @@ -37,11 +23,35 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage; +import WayofTime.alchemicalWizardry.common.EntityAITargetAggroCloaking; +import WayofTime.alchemicalWizardry.common.demonVillage.ai.EntityAIOccasionalRangedAttack; +import WayofTime.alchemicalWizardry.common.demonVillage.ai.EntityDemonAIHurtByTarget; +import WayofTime.alchemicalWizardry.common.demonVillage.ai.IOccasionalRangedAttackMob; +import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; +import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; +import WayofTime.alchemicalWizardry.common.rituals.LocalStorageAlphaPact; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRangedAttackMob, IHoardDemon { - private EntityAIOccasionalRangedAttack aiArrowAttack = - new EntityAIOccasionalRangedAttack(this, 1.0D, 40, 40, 15.0F, 5); - private EntityAIAttackOnCollide aiAttackOnCollide = - new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); + + private EntityAIOccasionalRangedAttack aiArrowAttack = new EntityAIOccasionalRangedAttack( + this, + 1.0D, + 40, + 40, + 15.0F, + 5); + private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide( + this, + EntityPlayer.class, + 1.2D, + false); private boolean isAngry = true; private Int3 demonPortal; @@ -150,11 +160,11 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan /** * main AI tick function, replaces updateEntityActionState */ - // @Override - // protected void updateAITick() - // { - // this.dataWatcher.updateObject(18, Float.valueOf(this.getHealth())); - // } + // @Override + // protected void updateAITick() + // { + // this.dataWatcher.updateObject(18, Float.valueOf(this.getHealth())); + // } /** * (abstract) Protected helper method to write subclass entity data to NBT. @@ -227,8 +237,8 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan @Override public void onUpdate() { if (!this.enthralled) { - TileEntity tile = this.worldObj.getTileEntity( - this.demonPortal.xCoord, this.demonPortal.yCoord, this.demonPortal.zCoord); + TileEntity tile = this.worldObj + .getTileEntity(this.demonPortal.xCoord, this.demonPortal.yCoord, this.demonPortal.zCoord); if (tile instanceof TEDemonPortal) { ((TEDemonPortal) tile).enthrallDemon(this); this.enthralled = true; @@ -291,8 +301,8 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan this.heal((float) itemfood.func_150905_g(itemstack)); if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents( - par1EntityPlayer.inventory.currentItem, null); + par1EntityPlayer.inventory + .setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); } return true; @@ -314,36 +324,36 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); } - } else if (this.isTameable() - && itemstack != null + } else if (this.isTameable() && itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) { - if (!par1EntityPlayer.capabilities.isCreativeMode) { - --itemstack.stackSize; - } + if (!par1EntityPlayer.capabilities.isCreativeMode) { + --itemstack.stackSize; + } - if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); - } + if (itemstack.stackSize <= 0) { + par1EntityPlayer.inventory + .setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); + } - if (!this.worldObj.isRemote) { - if (this.rand.nextInt(1) == 0) { - this.setTamed(true); - this.setPathToEntity(null); - this.setAttackTarget(null); - this.aiSit.setSitting(true); - this.setHealth(maxTamedHealth); - this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); - this.playTameEffect(true); - this.worldObj.setEntityState(this, (byte) 7); - } else { - this.playTameEffect(false); - this.worldObj.setEntityState(this, (byte) 6); + if (!this.worldObj.isRemote) { + if (this.rand.nextInt(1) == 0) { + this.setTamed(true); + this.setPathToEntity(null); + this.setAttackTarget(null); + this.aiSit.setSitting(true); + this.setHealth(maxTamedHealth); + this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); + this.playTameEffect(true); + this.worldObj.setEntityState(this, (byte) 7); + } else { + this.playTameEffect(false); + this.worldObj.setEntityState(this, (byte) 6); + } + } + + return true; } - } - - return true; - } return super.interact(par1EntityPlayer); } @@ -397,12 +407,11 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan } } - return par1EntityLivingBase instanceof EntityPlayer - && par2EntityLivingBase instanceof EntityPlayer - && !((EntityPlayer) par2EntityLivingBase) - .canAttackPlayer((EntityPlayer) par1EntityLivingBase) - ? false - : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer + && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) + ? false + : !(par1EntityLivingBase instanceof EntityHorse) + || !((EntityHorse) par1EntityLivingBase).isTame(); } else { return false; } @@ -455,8 +464,8 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan @Override public boolean isSamePortal(IHoardDemon demon) { Int3 position = demon.getPortalLocation(); - TileEntity portal = - worldObj.getTileEntity(this.demonPortal.xCoord, this.demonPortal.yCoord, this.demonPortal.zCoord); + TileEntity portal = worldObj + .getTileEntity(this.demonPortal.xCoord, this.demonPortal.yCoord, this.demonPortal.zCoord); return portal instanceof TEDemonPortal ? portal == worldObj.getTileEntity(position.xCoord, position.yCoord, position.zCoord) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntEarth.java index c702dc4c..9a7b725d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntEarth.java @@ -1,7 +1,5 @@ package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.potion.Potion; @@ -9,7 +7,11 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile; + public class EntityMinorDemonGruntEarth extends EntityMinorDemonGrunt { + public EntityMinorDemonGruntEarth(World par1World) { super(par1World); this.setDemonID(AlchemicalWizardry.entityMinorDemonGruntEarthID); @@ -34,8 +36,15 @@ public class EntityMinorDemonGruntEarth extends EntityMinorDemonGrunt { if (par1EntityLivingBase instanceof IHoardDemon && ((IHoardDemon) par1EntityLivingBase).isSamePortal(this)) { return; } - ExplosionProjectile hol = - new ExplosionProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 15, 600, false); + ExplosionProjectile hol = new ExplosionProjectile( + worldObj, + this, + par1EntityLivingBase, + 1.8f, + 0f, + 15, + 600, + false); this.worldObj.spawnEntityInWorld(hol); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntFire.java index bffcf15c..aa8bda72 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntFire.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; + public class EntityMinorDemonGruntFire extends EntityMinorDemonGrunt { + public EntityMinorDemonGruntFire(World par1World) { super(par1World); this.setDemonID(AlchemicalWizardry.entityMinorDemonGruntFireID); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardian.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardian.java index a7fcf2be..eb13bb12 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardian.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardian.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; + public class EntityMinorDemonGruntGuardian extends EntityMinorDemonGrunt { + public EntityMinorDemonGruntGuardian(World par1World) { super(par1World); this.setDemonID(AlchemicalWizardry.entityMinorDemonGruntGuardianID); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianEarth.java index 0cbdfbc5..8469ac0d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianEarth.java @@ -1,7 +1,5 @@ package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.potion.Potion; @@ -9,7 +7,11 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile; + public class EntityMinorDemonGruntGuardianEarth extends EntityMinorDemonGruntGuardian { + public EntityMinorDemonGruntGuardianEarth(World par1World) { super(par1World); this.setDemonID(AlchemicalWizardry.entityMinorDemonGruntGuardianEarthID); @@ -38,8 +40,15 @@ public class EntityMinorDemonGruntGuardianEarth extends EntityMinorDemonGruntGua if (par1EntityLivingBase instanceof IHoardDemon && ((IHoardDemon) par1EntityLivingBase).isSamePortal(this)) { return; } - ExplosionProjectile hol = - new ExplosionProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 20, 600, false); + ExplosionProjectile hol = new ExplosionProjectile( + worldObj, + this, + par1EntityLivingBase, + 1.8f, + 0f, + 20, + 600, + false); this.worldObj.spawnEntityInWorld(hol); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianFire.java index c0690482..ec7293a3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianFire.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; + public class EntityMinorDemonGruntGuardianFire extends EntityMinorDemonGruntGuardian { + public EntityMinorDemonGruntGuardianFire(World par1World) { super(par1World); this.setDemonID(AlchemicalWizardry.entityMinorDemonGruntGuardianFireID); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianIce.java index fd67cfde..01953c5e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianIce.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; + public class EntityMinorDemonGruntGuardianIce extends EntityMinorDemonGruntGuardian { + public EntityMinorDemonGruntGuardianIce(World par1World) { super(par1World); this.setDemonID(AlchemicalWizardry.entityMinorDemonGruntGuardianIceID); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianWind.java index 1aa4d8d3..626c7666 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianWind.java @@ -1,15 +1,17 @@ package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class EntityMinorDemonGruntGuardianWind extends EntityMinorDemonGruntGuardian { + public EntityMinorDemonGruntGuardianWind(World par1World) { super(par1World); this.setDemonID(AlchemicalWizardry.entityMinorDemonGruntGuardianWindID); @@ -25,7 +27,10 @@ public class EntityMinorDemonGruntGuardianWind extends EntityMinorDemonGruntGuar if (par1Entity instanceof EntityPlayer) { SpellHelper.setPlayerSpeedFromServer( - (EntityPlayer) par1Entity, par1Entity.motionX, par1Entity.motionY + 4, par1Entity.motionZ); + (EntityPlayer) par1Entity, + par1Entity.motionX, + par1Entity.motionY + 4, + par1Entity.motionZ); } else if (par1Entity instanceof EntityLivingBase) { ((EntityLivingBase) par1Entity).motionY += 4.0D; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntIce.java index 14770d71..28b6d958 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntIce.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; + public class EntityMinorDemonGruntIce extends EntityMinorDemonGrunt { + public EntityMinorDemonGruntIce(World par1World) { super(par1World); this.setDemonID(AlchemicalWizardry.entityMinorDemonGruntIceID); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntWind.java index 1645276c..5a28d996 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntWind.java @@ -1,15 +1,17 @@ package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class EntityMinorDemonGruntWind extends EntityMinorDemonGrunt { + public EntityMinorDemonGruntWind(World par1World) { super(par1World); this.setDemonID(AlchemicalWizardry.entityMinorDemonGruntWindID); @@ -24,7 +26,10 @@ public class EntityMinorDemonGruntWind extends EntityMinorDemonGrunt { if (par1Entity instanceof EntityPlayer) { SpellHelper.setPlayerSpeedFromServer( - (EntityPlayer) par1Entity, par1Entity.motionX, par1Entity.motionY + 3, par1Entity.motionZ); + (EntityPlayer) par1Entity, + par1Entity.motionX, + par1Entity.motionY + 3, + par1Entity.motionZ); } else if (par1Entity instanceof EntityLivingBase) { ((EntityLivingBase) par1Entity).motionY += 3.0D; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/IHoardDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/IHoardDemon.java index 1b1367dc..668700b6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/IHoardDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/IHoardDemon.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; import WayofTime.alchemicalWizardry.api.Int3; public interface IHoardDemon { + void setPortalLocation(Int3 position); Int3 getPortalLocation(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java index 5134e82b..7b4632a5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java @@ -1,18 +1,21 @@ package WayofTime.alchemicalWizardry.common.demonVillage.loot; -import WayofTime.alchemicalWizardry.ModItems; import java.util.ArrayList; import java.util.List; import java.util.Random; + import net.minecraft.inventory.IInventory; import net.minecraft.util.WeightedRandomChestContent; import net.minecraftforge.common.ChestGenHooks; +import WayofTime.alchemicalWizardry.ModItems; + public class DemonVillageLootRegistry { + public static ArrayList list1 = new ArrayList(); public static void init() { - String[] tier1Strings = new String[] {ChestGenHooks.DUNGEON_CHEST, ChestGenHooks.PYRAMID_DESERT_CHEST}; + String[] tier1Strings = new String[] { ChestGenHooks.DUNGEON_CHEST, ChestGenHooks.PYRAMID_DESERT_CHEST }; for (String str : tier1Strings) { WeightedRandomChestContent[] contents = ChestGenHooks.getItems(str, new Random()); if (contents != null) { @@ -27,8 +30,8 @@ public class DemonVillageLootRegistry { } public static void populateChest(IInventory tile, int tier) { - WeightedRandomChestContent.generateChestContents( - new Random(), toArray(list1), tile, tile.getSizeInventory() / 3); + WeightedRandomChestContent + .generateChestContents(new Random(), toArray(list1), tile, tile.getSizeInventory() / 3); } public static WeightedRandomChestContent[] toArray(List aList) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/BlockDemonChest.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/BlockDemonChest.java index abb6d930..ef6ae55b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/BlockDemonChest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/BlockDemonChest.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.demonVillage.tileEntity; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import net.minecraft.block.Block; import net.minecraft.block.BlockChest; import net.minecraft.inventory.IInventory; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; + public class BlockDemonChest extends BlockChest implements IBlockPortalNode { + public BlockDemonChest() { super(0); this.setHardness(2.5F).setStepSound(soundTypeWood).setBlockName("demonChest"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/IBlockPortalNode.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/IBlockPortalNode.java index 38ed2306..f893ce3d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/IBlockPortalNode.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/IBlockPortalNode.java @@ -1,3 +1,4 @@ package WayofTime.alchemicalWizardry.common.demonVillage.tileEntity; -public interface IBlockPortalNode {} +public interface IBlockPortalNode { +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/IRoadWard.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/IRoadWard.java index cf18e266..38b552f2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/IRoadWard.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/IRoadWard.java @@ -1,3 +1,4 @@ package WayofTime.alchemicalWizardry.common.demonVillage.tileEntity; -public interface IRoadWard {} +public interface IRoadWard { +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/ITilePortalNode.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/ITilePortalNode.java index 5b1f69bc..16c35b91 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/ITilePortalNode.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/ITilePortalNode.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.common.demonVillage.tileEntity; public interface ITilePortalNode { + void setPortalLocation(TEDemonPortal teDemonPortal); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonChest.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonChest.java index e754df23..3672c78b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonChest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonChest.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.demonVillage.tileEntity; -import WayofTime.alchemicalWizardry.api.Int3; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityChest; +import WayofTime.alchemicalWizardry.api.Int3; + public class TEDemonChest extends TileEntityChest implements ITilePortalNode { + public Int3 portalLocation = new Int3(0, 0, 0); @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java index c48bb3c6..4ad0a355 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java @@ -1,5 +1,31 @@ package WayofTime.alchemicalWizardry.common.demonVillage.tileEntity; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Random; +import java.util.Set; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityCreature; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.Constants; +import net.minecraftforge.common.util.ForgeDirection; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; @@ -13,34 +39,12 @@ import WayofTime.alchemicalWizardry.common.demonVillage.GridSpaceHolder; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.DemonPacketRegistry; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.DemonType; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; + import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import java.io.BufferedReader; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Random; -import java.util.Set; -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityCreature; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.Constants; -import net.minecraftforge.common.util.ForgeDirection; public class TEDemonPortal extends TileEntity { + public DemonType type = DemonType.FIRE; public static boolean printDebug = false; @@ -58,7 +62,7 @@ public class TEDemonPortal extends TileEntity { public static float demonHoardChance = 0.8f; public static float portalTickRate = 1f; - public static int[] tierCostList = new int[] {1500}; + public static int[] tierCostList = new int[] { 1500 }; public Set hoardList = new HashSet(); @@ -198,12 +202,11 @@ public class TEDemonPortal extends TileEntity { } public void notifyDemons(EntityLivingBase demon, EntityLivingBase target, double radius) // TODO - { + { this.lockdownTimer = 1000; for (IHoardDemon thrallDemon : this.hoardList) { if (thrallDemon instanceof EntityCreature) { - if (thrallDemon != demon - && ((EntityCreature) thrallDemon).getAttackTarget() == null + if (thrallDemon != demon && ((EntityCreature) thrallDemon).getAttackTarget() == null && !((EntityCreature) thrallDemon).isOnSameTeam(target)) { double xf = demon.posX; double yf = demon.posY; @@ -297,7 +300,8 @@ public class TEDemonPortal extends TileEntity { } /** - * Randomly increase one of the cooldowns such that a road, house, or a demon portal tier is caused. Demons are also randomly spawned via this mechanic. + * Randomly increase one of the cooldowns such that a road, house, or a demon portal tier is caused. Demons are also + * randomly spawned via this mechanic. */ @Override public void updateEntity() { @@ -328,9 +332,8 @@ public class TEDemonPortal extends TileEntity { this.incrementPoints(); this.assignPoints(); - if (printDebug) - AlchemicalWizardry.logger.info( - "Roads: " + roadCooldown + " Buildings: " + houseCooldown + " Lockdown: " + lockdownTimer); + if (printDebug) AlchemicalWizardry.logger + .info("Roads: " + roadCooldown + " Buildings: " + houseCooldown + " Lockdown: " + lockdownTimer); if (buildingStage >= 0 && buildingStage <= 2) { if (printDebug) AlchemicalWizardry.logger.info("BuildingStage = " + buildingStage); @@ -374,9 +377,9 @@ public class TEDemonPortal extends TileEntity { } } - // this.houseCooldown = Math.max(0, this.houseCooldown - 1); //Current dummy implementation of the + // this.houseCooldown = Math.max(0, this.houseCooldown - 1); //Current dummy implementation of the // increasing costs - // this.roadCooldown = Math.max(0, this.roadCooldown - 1); + // this.roadCooldown = Math.max(0, this.roadCooldown - 1); } public void assignPoints() { @@ -425,8 +428,8 @@ public class TEDemonPortal extends TileEntity { this.nextDemonPortalName = par1NBTTagCompound.getString("nextDemonPortalName"); this.buildingStage = par1NBTTagCompound.getInteger("buildingStage"); - this.nextDemonPortalDirection = - ForgeDirection.getOrientation(par1NBTTagCompound.getInteger("nextDemonPortalDirection")); + this.nextDemonPortalDirection = ForgeDirection + .getOrientation(par1NBTTagCompound.getInteger("nextDemonPortalDirection")); this.pointPool = par1NBTTagCompound.getFloat("pointPool"); this.lockdownTimer = par1NBTTagCompound.getInteger("lockdownTimer"); @@ -499,8 +502,9 @@ public class TEDemonPortal extends TileEntity { dir = ForgeDirection.NORTH; } - Int3 road = - findRoadSpaceFromDirection(dir, (rand.nextInt(negXRadius + negZRadius + posXRadius + posZRadius)) + 1); + Int3 road = findRoadSpaceFromDirection( + dir, + (rand.nextInt(negXRadius + negZRadius + posXRadius + posZRadius)) + 1); if (road == null) { return 0; } @@ -519,7 +523,7 @@ public class TEDemonPortal extends TileEntity { } public int createRandomRoad() // Return the number of road spaces - { + { int next = rand.nextInt(4); ForgeDirection dir; @@ -540,8 +544,9 @@ public class TEDemonPortal extends TileEntity { dir = ForgeDirection.NORTH; } - Int3 road = - findRoadSpaceFromDirection(dir, (rand.nextInt(negXRadius + negZRadius + posXRadius + posZRadius)) + 1); + Int3 road = findRoadSpaceFromDirection( + dir, + (rand.nextInt(negXRadius + negZRadius + posXRadius + posZRadius)) + 1); int x = road.xCoord; int yLevel = road.yCoord; @@ -574,9 +579,8 @@ public class TEDemonPortal extends TileEntity { return 0; } if (printDebug) AlchemicalWizardry.logger.info("I got here!"); - if (printDebug) - AlchemicalWizardry.logger.info( - "Distance: " + distance + " Direction: " + dominantDirection.toString() + " yLevel: " + yLevel); + if (printDebug) AlchemicalWizardry.logger + .info("Distance: " + distance + " Direction: " + dominantDirection.toString() + " yLevel: " + yLevel); this.createGriddedRoad(x, yLevel, z, dominantDirection, distance + 1, true); @@ -614,15 +618,15 @@ public class TEDemonPortal extends TileEntity { } public int getLength(ForgeDirection dir, int maxLength, int x, int z) // Number of spaces forward - { + { for (int i = 1; i <= maxLength; i++) { GridSpace space = this.getGridSpace(x + i * dir.offsetX, z + i * dir.offsetZ); if (space.isEmpty()) { for (int k = 1; k <= this.getRoadSpacer(); k++) { - GridSpace space1 = this.getGridSpace( - x + i * dir.offsetX + dir.offsetZ * k, z + i * dir.offsetZ + dir.offsetX * k); - GridSpace space2 = this.getGridSpace( - x + i * dir.offsetX - dir.offsetZ * k, z + i * dir.offsetZ - dir.offsetX * k); + GridSpace space1 = this + .getGridSpace(x + i * dir.offsetX + dir.offsetZ * k, z + i * dir.offsetZ + dir.offsetX * k); + GridSpace space2 = this + .getGridSpace(x + i * dir.offsetX - dir.offsetZ * k, z + i * dir.offsetZ - dir.offsetX * k); if (space1.isRoadSegment() || space2.isRoadSegment()) { return i - 1; @@ -641,7 +645,7 @@ public class TEDemonPortal extends TileEntity { } public Int3 findRoadSpaceFromDirection(ForgeDirection dir, int amount) // TODO - { + { int index = 0; if (dir == ForgeDirection.NORTH) { if (printDebug) System.out.print("NORTH!"); @@ -825,14 +829,9 @@ public class TEDemonPortal extends TileEntity { return new Int3(0, 0, 0); } - public int createGriddedRoad( - int gridXi, - int yi, - int gridZi, - ForgeDirection dir, - int gridLength, + public int createGriddedRoad(int gridXi, int yi, int gridZi, ForgeDirection dir, int gridLength, boolean convertStarter) // Total grid length - { + { if (gridLength == 0 || gridLength == 1) { return 0; } @@ -970,23 +969,23 @@ public class TEDemonPortal extends TileEntity { } public void rightClickBlock(EntityPlayer player, int side) { - // if (worldObj.isRemote) - // { - // return; - // } + // if (worldObj.isRemote) + // { + // return; + // } // - // this.initialize(); + // this.initialize(); // - // if (ForgeDirection.getOrientation(side) == ForgeDirection.UP) - // { - // this.createRandomBuilding(DemonBuilding.BUILDING_HOUSE, 0); - // } else if (ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) - // { - // this.createRandomBuilding(DemonBuilding.BUILDING_PORTAL, 0); - // } else - // { - // this.createRandomRoad(); - // } + // if (ForgeDirection.getOrientation(side) == ForgeDirection.UP) + // { + // this.createRandomBuilding(DemonBuilding.BUILDING_HOUSE, 0); + // } else if (ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) + // { + // this.createRandomBuilding(DemonBuilding.BUILDING_PORTAL, 0); + // } else + // { + // this.createRandomRoad(); + // } } public int createRandomBuilding(int type, int tier) { @@ -1001,15 +1000,15 @@ public class TEDemonPortal extends TileEntity { } public int createPortalBuilding(int buildingTier) // TODO Telepose block next time, then build the new building. - { + { if (printDebug) AlchemicalWizardry.logger.info("Hello, I am here!"); int x = 0; int z = 0; - // GridSpace home = this.getGridSpace(x, z); - // int yLevel = home.getYLevel(); + // GridSpace home = this.getGridSpace(x, z); + // int yLevel = home.getYLevel(); - // GridSpaceHolder grid = this.createGSH(); + // GridSpaceHolder grid = this.createGSH(); List directions = new ArrayList(); @@ -1043,31 +1042,30 @@ public class TEDemonPortal extends TileEntity { return 0; } - ForgeDirection chosenDirection = (ForgeDirection) schemMap.keySet() - .toArray()[new Random().nextInt(schemMap.keySet().size())]; + ForgeDirection chosenDirection = (ForgeDirection) schemMap.keySet().toArray()[new Random() + .nextInt(schemMap.keySet().size())]; DemonBuilding build = schemMap.get(chosenDirection) .get(new Random().nextInt(schemMap.get(chosenDirection).size())); - // Int3 portalSpace = build.getDoorSpace(chosenDirection); + // Int3 portalSpace = build.getDoorSpace(chosenDirection); this.nextDemonPortalDirection = chosenDirection; this.nextDemonPortalName = build.getName(); - // build.destroyAllInField(worldObj, xCoord + (x) * 5, yLevel, zCoord + (z) * 5, + // build.destroyAllInField(worldObj, xCoord + (x) * 5, yLevel, zCoord + (z) * 5, // chosenDirection.getOpposite()); // - // int yOffset = portalSpace.yCoord; - // build.buildAll(worldObj, xCoord + (x) * 5, yLevel, zCoord + (z) * 5, chosenDirection.getOpposite()); - // build.setAllGridSpaces(x, z, yLevel, chosenDirection.getOpposite(), GridSpace.MAIN_PORTAL, grid); - // this.loadGSH(grid); + // int yOffset = portalSpace.yCoord; + // build.buildAll(worldObj, xCoord + (x) * 5, yLevel, zCoord + (z) * 5, chosenDirection.getOpposite()); + // build.setAllGridSpaces(x, z, yLevel, chosenDirection.getOpposite(), GridSpace.MAIN_PORTAL, grid); + // this.loadGSH(grid); return build.getNumberOfGridSpaces(); } /** - * The Stage is at what point the portal is in reacting to the creation of the Demon Portal. - * Stage == 0 means just the saving - * Stage == 1 means to telepose the portal - * Stage == 2 means the teleposition is complete and that the building may be constructed + * The Stage is at what point the portal is in reacting to the creation of the Demon Portal. Stage == 0 means just + * the saving Stage == 1 means to telepose the portal Stage == 2 means the teleposition is complete and that the + * building may be constructed */ public void createPortalBuilding(int stage, String name, int tier) { for (DemonBuilding build : TEDemonPortal.buildingList) { @@ -1096,7 +1094,15 @@ public class TEDemonPortal extends TileEntity { int yDestination = yLevel + yOffset; if (yCoord != yDestination) { BlockTeleposer.swapBlocks( - this, worldObj, worldObj, xCoord, yCoord, zCoord, xCoord, yDestination, zCoord); + this, + worldObj, + worldObj, + xCoord, + yCoord, + zCoord, + xCoord, + yDestination, + zCoord); } else { // Nuthin - just as a reminder that we can now increment properly } @@ -1104,7 +1110,11 @@ public class TEDemonPortal extends TileEntity { case 2: build.destroyAllInField( - worldObj, xCoord + (x) * 5, yLevel, zCoord + (z) * 5, chosenDirection.getOpposite()); + worldObj, + xCoord + (x) * 5, + yLevel, + zCoord + (z) * 5, + chosenDirection.getOpposite()); build.buildAll( this, @@ -1115,7 +1125,12 @@ public class TEDemonPortal extends TileEntity { chosenDirection.getOpposite(), true); build.setAllGridSpaces( - x, z, yLevel, chosenDirection.getOpposite(), GridSpace.MAIN_PORTAL, grid); + x, + z, + yLevel, + chosenDirection.getOpposite(), + GridSpace.MAIN_PORTAL, + grid); this.loadGSH(grid); break; } @@ -1146,8 +1161,10 @@ public class TEDemonPortal extends TileEntity { dir = ForgeDirection.NORTH; } - Int3 space = this.findRoadSpaceFromDirection( - dir, (rand.nextInt(negXRadius + negZRadius + posXRadius + posZRadius)) + 1); // Second: 1 * + Int3 space = this + .findRoadSpaceFromDirection(dir, (rand.nextInt(negXRadius + negZRadius + posXRadius + posZRadius)) + 1); // Second: + // 1 + // * int x = space.xCoord; int z = space.zCoord; @@ -1202,8 +1219,8 @@ public class TEDemonPortal extends TileEntity { return 0; } - ForgeDirection chosenDirection = (ForgeDirection) schemMap.keySet() - .toArray()[new Random().nextInt(schemMap.keySet().size())]; + ForgeDirection chosenDirection = (ForgeDirection) schemMap.keySet().toArray()[new Random() + .nextInt(schemMap.keySet().size())]; DemonBuilding build = schemMap.get(chosenDirection) .get(new Random().nextInt(schemMap.get(chosenDirection).size())); @@ -1212,7 +1229,11 @@ public class TEDemonPortal extends TileEntity { int zOff = offsetSpace.zCoord; build.destroyAllInField( - worldObj, xCoord + (x + xOff) * 5, yLevel, zCoord + (z + zOff) * 5, chosenDirection.getOpposite()); + worldObj, + xCoord + (x + xOff) * 5, + yLevel, + zCoord + (z + zOff) * 5, + chosenDirection.getOpposite()); build.buildAll( this, worldObj, diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/BookEntityItem.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/BookEntityItem.java index 7958535c..a2faa27f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/BookEntityItem.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/BookEntityItem.java @@ -7,6 +7,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.world.World; public class BookEntityItem extends EntityItem { + public BookEntityItem(World par1World, double par2, double par4, double par6) { super(par1World, par2, par4, par6); this.isImmuneToFire = true; @@ -16,8 +17,7 @@ public class BookEntityItem extends EntityItem { public BookEntityItem(World par1World, double par2, double par4, double par6, ItemStack par8ItemStack) { this(par1World, par2, par4, par6); this.setEntityItemStack(par8ItemStack); - this.lifespan = (par8ItemStack.getItem() == null - ? 6000 + this.lifespan = (par8ItemStack.getItem() == null ? 6000 : par8ItemStack.getItem().getEntityLifespan(par8ItemStack, par1World)); this.isImmuneToFire = true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityAirElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityAirElemental.java index 4330622f..07b9d1b2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityAirElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityAirElemental.java @@ -1,7 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.IMob; @@ -9,7 +7,11 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class EntityAirElemental extends EntityElemental implements IMob { + public EntityAirElemental(World world) { super(world, AlchemicalWizardry.entityAirElementalID); } @@ -17,7 +19,10 @@ public class EntityAirElemental extends EntityElemental implements IMob { public void inflictEffectOnEntity(Entity target) { if (target instanceof EntityPlayer) { SpellHelper.setPlayerSpeedFromServer( - (EntityPlayer) target, target.motionX, target.motionY + 3, target.motionZ); + (EntityPlayer) target, + target.motionX, + target.motionY + 3, + target.motionZ); ((EntityLivingBase) target) .addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); } else if (target instanceof EntityLivingBase) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java index 08189de7..06347b51 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; @@ -18,7 +15,12 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class EntityBileDemon extends EntityDemon { + private static float maxTamedHealth = 100.0F; private static float maxUntamedHealth = 200.0F; private int attackTimer; @@ -196,8 +198,8 @@ public class EntityBileDemon extends EntityDemon { public boolean attackEntityAsMob(Entity par1Entity) { this.attackTimer = 10; this.worldObj.setEntityState(this, (byte) 4); - boolean flag = - par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) (7 + this.rand.nextInt(15))); + boolean flag = par1Entity + .attackEntityFrom(DamageSource.causeMobDamage(this), (float) (7 + this.rand.nextInt(15))); if (flag) { par1Entity.motionY += 0.4000000059604645D; @@ -238,8 +240,8 @@ public class EntityBileDemon extends EntityDemon { this.heal((float) itemfood.func_150905_g(itemstack)); if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents( - par1EntityPlayer.inventory.currentItem, null); + par1EntityPlayer.inventory + .setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); } return true; @@ -338,12 +340,11 @@ public class EntityBileDemon extends EntityDemon { } } - return par1EntityLivingBase instanceof EntityPlayer - && par2EntityLivingBase instanceof EntityPlayer - && !((EntityPlayer) par2EntityLivingBase) - .canAttackPlayer((EntityPlayer) par1EntityLivingBase) - ? false - : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer + && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) + ? false + : !(par1EntityLivingBase instanceof EntityHorse) + || !((EntityHorse) par1EntityLivingBase).isTame(); } else { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java index 909557c4..eaaa8804 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java @@ -1,10 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; -import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; @@ -20,9 +15,19 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; +import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class EntityBoulderFist extends EntityDemon { - private EntityAIAttackOnCollide aiAttackOnCollide = - new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); + + private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide( + this, + EntityPlayer.class, + 1.2D, + false); private static float maxTamedHealth = 60.0F; private static float maxUntamedHealth = 50.0F; @@ -126,11 +131,9 @@ public class EntityBoulderFist extends EntityDemon { */ protected String getLivingSound() { // TODO change sounds - return this.isAngry() - ? "mob.wolf.growl" + return this.isAngry() ? "mob.wolf.growl" : (this.rand.nextInt(3) == 0 - ? (this.isTamed() && this.dataWatcher.getWatchableObjectFloat(18) < 10.0F - ? "mob.wolf.whine" + ? (this.isTamed() && this.dataWatcher.getWatchableObjectFloat(18) < 10.0F ? "mob.wolf.whine" : "mob.wolf.panting") : "mob.wolf.bark"); } @@ -237,8 +240,8 @@ public class EntityBoulderFist extends EntityDemon { this.heal((float) itemfood.func_150905_g(itemstack)); if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents( - par1EntityPlayer.inventory.currentItem, null); + par1EntityPlayer.inventory + .setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); } return true; @@ -337,12 +340,11 @@ public class EntityBoulderFist extends EntityDemon { } } - return par1EntityLivingBase instanceof EntityPlayer - && par2EntityLivingBase instanceof EntityPlayer - && !((EntityPlayer) par2EntityLivingBase) - .canAttackPlayer((EntityPlayer) par1EntityLivingBase) - ? false - : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer + && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) + ? false + : !(par1EntityLivingBase instanceof EntityHorse) + || !((EntityHorse) par1EntityLivingBase).isTame(); } else { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java index 764f3858..9e759117 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java @@ -1,9 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.IDemon; -import WayofTime.alchemicalWizardry.common.items.DemonPlacer; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.passive.EntityTameable; import net.minecraft.entity.player.EntityPlayer; @@ -12,7 +8,13 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ChatComponentTranslation; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.IDemon; +import WayofTime.alchemicalWizardry.common.items.DemonPlacer; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class EntityDemon extends EntityTameable implements IDemon { + private boolean isAggro; private String demonID; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityEarthElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityEarthElemental.java index a4a25675..10791f97 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityEarthElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityEarthElemental.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.IMob; @@ -9,7 +8,10 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; + public class EntityEarthElemental extends EntityElemental implements IMob { + public EntityEarthElemental(World world) { super(world, AlchemicalWizardry.entityEarthElementalID); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java index 9c399482..6d2d2c43 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java @@ -1,8 +1,7 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -21,9 +20,16 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; + public class EntityElemental extends EntityDemon { - private EntityAIAttackOnCollide aiAttackOnCollide = - new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); + + private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide( + this, + EntityPlayer.class, + 1.2D, + false); private static float maxTamedHealth = 100.0F; private static float maxUntamedHealth = 100.0F; @@ -66,12 +72,12 @@ public class EntityElemental extends EntityDemon { /** * Takes in the distance the entity has fallen this tick and whether its on the ground to update the fall distance - * and deal fall damage if landing on the ground. Args: distanceFallenThisTick, onGround + * and deal fall damage if landing on the ground. Args: distanceFallenThisTick, onGround */ protected void updateFallState(double par1, boolean par3) {} /** - * Moves the entity based on the specified heading. Args: strafe, forward + * Moves the entity based on the specified heading. Args: strafe, forward */ public void moveEntityWithHeading(float par1, float par2) { if (this.isInWater()) { @@ -179,8 +185,7 @@ public class EntityElemental extends EntityDemon { if (this.targetedEntity != null && this.targetedEntity.getDistanceSqToEntity(this) < d4 * d4) { double d5 = this.targetedEntity.posX - this.posX; - double d6 = this.targetedEntity.boundingBox.minY - + (double) (this.targetedEntity.height / 2.0F) + double d6 = this.targetedEntity.boundingBox.minY + (double) (this.targetedEntity.height / 2.0F) - (this.posY + (double) (this.height / 2.0F)); double d7 = this.targetedEntity.posZ - this.posZ; this.renderYawOffset = this.rotationYaw = -((float) Math.atan2(d5, d7)) * 180.0F / (float) Math.PI; @@ -212,8 +217,8 @@ public class EntityElemental extends EntityDemon { ++this.attackCounter; if (this.attackCounter >= 10) { - this.worldObj.playAuxSFXAtEntity( - null, 1008, (int) this.posX, (int) this.posY, (int) this.posZ, 0); + this.worldObj + .playAuxSFXAtEntity(null, 1008, (int) this.posX, (int) this.posY, (int) this.posZ, 0); this.inflictEffectOnEntity(this.targetedEntity); this.attackCounter = -40; } @@ -222,8 +227,8 @@ public class EntityElemental extends EntityDemon { --this.attackCounter; } } else { - this.renderYawOffset = - this.rotationYaw = -((float) Math.atan2(motionX, this.motionZ)) * 180.0F / (float) Math.PI; + this.renderYawOffset = this.rotationYaw = -((float) Math.atan2(motionX, this.motionZ)) * 180.0F + / (float) Math.PI; if (this.attackCounter > 0) { --this.attackCounter; @@ -441,12 +446,11 @@ public class EntityElemental extends EntityDemon { } } - return par1EntityLivingBase instanceof EntityPlayer - && par2EntityLivingBase instanceof EntityPlayer - && !((EntityPlayer) par2EntityLivingBase) - .canAttackPlayer((EntityPlayer) par1EntityLivingBase) - ? false - : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer + && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) + ? false + : !(par1EntityLivingBase instanceof EntityHorse) + || !((EntityHorse) par1EntityLivingBase).isTame(); } else { return false; } @@ -480,8 +484,8 @@ public class EntityElemental extends EntityDemon { double verticalRange = Math.sqrt(par2); List entities = world.getEntitiesWithinAABB( EntityLivingBase.class, - AxisAlignedBB.getBoundingBox( - par1 - 0.5f, par3 - 0.5f, par5 - 0.5f, par1 + 0.5f, par3 + 0.5f, par5 + 0.5f) + AxisAlignedBB + .getBoundingBox(par1 - 0.5f, par3 - 0.5f, par5 - 0.5f, par1 + 0.5f, par3 + 0.5f, par5 + 0.5f) .expand(range, verticalRange, range)); if (entities == null) { return null; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java index 68aed12d..eac7d5fe 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java @@ -1,10 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; -import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.*; import net.minecraft.entity.ai.*; import net.minecraft.entity.monster.EntityCreeper; @@ -18,10 +13,20 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; +import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob { + private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 40, 40, 15.0F); - private EntityAIAttackOnCollide aiAttackOnCollide = - new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); + private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide( + this, + EntityPlayer.class, + 1.2D, + false); private static float maxTamedHealth = 50.0F; private static float maxUntamedHealth = 50.0F; @@ -231,8 +236,8 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob { this.heal((float) itemfood.func_150905_g(itemstack)); if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents( - par1EntityPlayer.inventory.currentItem, null); + par1EntityPlayer.inventory + .setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); } return true; @@ -333,12 +338,11 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob { } } - return par1EntityLivingBase instanceof EntityPlayer - && par2EntityLivingBase instanceof EntityPlayer - && !((EntityPlayer) par2EntityLivingBase) - .canAttackPlayer((EntityPlayer) par1EntityLivingBase) - ? false - : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer + && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) + ? false + : !(par1EntityLivingBase instanceof EntityHorse) + || !((EntityHorse) par1EntityLivingBase).isTame(); } else { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java index fe6c49ba..fc29aa18 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.IMob; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; + public class EntityFireElemental extends EntityElemental implements IMob { + public EntityFireElemental(World world) { super(world, AlchemicalWizardry.entityFireElementalID); this.isImmuneToFire = true; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java index 7132ae67..0b48fa70 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.IMob; @@ -9,7 +8,10 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; + public class EntityHolyElemental extends EntityElemental implements IMob { + public EntityHolyElemental(World world) { super(world, AlchemicalWizardry.entityHolyElementalID); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java index dfdca9b4..8d3a33ca 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java @@ -1,10 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; -import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IRangedAttackMob; @@ -31,10 +26,20 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; +import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class EntityIceDemon extends EntityDemon implements IRangedAttackMob { + private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 30, 50, 15.0F); - private EntityAIAttackOnCollide aiAttackOnCollide = - new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); + private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide( + this, + EntityPlayer.class, + 1.2D, + false); private static float maxTamedHealth = 50.0F; private static float maxUntamedHealth = 30.0F; @@ -257,8 +262,8 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob { this.heal((float) itemfood.func_150905_g(itemstack)); if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents( - par1EntityPlayer.inventory.currentItem, null); + par1EntityPlayer.inventory + .setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); } return true; @@ -356,12 +361,11 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob { } } - return par1EntityLivingBase instanceof EntityPlayer - && par2EntityLivingBase instanceof EntityPlayer - && !((EntityPlayer) par2EntityLivingBase) - .canAttackPlayer((EntityPlayer) par1EntityLivingBase) - ? false - : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer + && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) + ? false + : !(par1EntityLivingBase instanceof EntityHorse) + || !((EntityHorse) par1EntityLivingBase).isTame(); } else { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java index b84d2bca..f2cbe6e3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java @@ -1,9 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; @@ -19,7 +15,13 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class EntityLowerGuardian extends EntityDemon { + private static float maxTamedHealth = 50.0F; private static float maxUntamedHealth = 30.0F; private int attackTimer; @@ -201,8 +203,8 @@ public class EntityLowerGuardian extends EntityDemon { public boolean attackEntityAsMob(Entity par1Entity) { this.attackTimer = 10; this.worldObj.setEntityState(this, (byte) 4); - boolean flag = - par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) (7 + this.rand.nextInt(15))); + boolean flag = par1Entity + .attackEntityFrom(DamageSource.causeMobDamage(this), (float) (7 + this.rand.nextInt(15))); if (flag) { par1Entity.motionY += 0.4000000059604645D; @@ -243,8 +245,8 @@ public class EntityLowerGuardian extends EntityDemon { this.heal((float) itemfood.func_150905_g(itemstack)); if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents( - par1EntityPlayer.inventory.currentItem, null); + par1EntityPlayer.inventory + .setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); } return true; @@ -342,12 +344,11 @@ public class EntityLowerGuardian extends EntityDemon { } } - return par1EntityLivingBase instanceof EntityPlayer - && par2EntityLivingBase instanceof EntityPlayer - && !((EntityPlayer) par2EntityLivingBase) - .canAttackPlayer((EntityPlayer) par1EntityLivingBase) - ? false - : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer + && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) + ? false + : !(par1EntityLivingBase instanceof EntityHorse) + || !((EntityHorse) par1EntityLivingBase).isTame(); } else { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java index 0609dd03..5042392d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java @@ -1,10 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; -import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; @@ -20,9 +15,19 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; +import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class EntityShade extends EntityDemon { - private EntityAIAttackOnCollide aiAttackOnCollide = - new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); + + private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide( + this, + EntityPlayer.class, + 1.2D, + false); private static float maxTamedHealth = 50.0F; private static float maxUntamedHealth = 100.0F; @@ -231,8 +236,8 @@ public class EntityShade extends EntityDemon { this.heal((float) itemfood.func_150905_g(itemstack)); if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents( - par1EntityPlayer.inventory.currentItem, null); + par1EntityPlayer.inventory + .setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); } return true; @@ -260,8 +265,8 @@ public class EntityShade extends EntityDemon { } if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents( - par1EntityPlayer.inventory.currentItem, (ItemStack) null); + par1EntityPlayer.inventory + .setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); } if (!this.worldObj.isRemote) { @@ -331,12 +336,11 @@ public class EntityShade extends EntityDemon { } } - return par1EntityLivingBase instanceof EntityPlayer - && par2EntityLivingBase instanceof EntityPlayer - && !((EntityPlayer) par2EntityLivingBase) - .canAttackPlayer((EntityPlayer) par1EntityLivingBase) - ? false - : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer + && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) + ? false + : !(par1EntityLivingBase instanceof EntityHorse) + || !((EntityHorse) par1EntityLivingBase).isTame(); } else { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java index 033ab94a..374869d6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.IMob; @@ -8,7 +7,10 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; + public class EntityShadeElemental extends EntityElemental implements IMob { + public EntityShadeElemental(World world) { super(world, AlchemicalWizardry.entityShadeElementalID); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java index e54fe21a..5c3abfbd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java @@ -1,10 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; -import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.*; import net.minecraft.entity.ai.*; import net.minecraft.entity.monster.EntityCreeper; @@ -18,10 +13,20 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; +import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackMob { + private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 25, 25, 15.0F); - private EntityAIAttackOnCollide aiAttackOnCollide = - new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); + private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide( + this, + EntityPlayer.class, + 1.2D, + false); private static float maxTamedHealth = 20.0F; private static float maxUntamedHealth = 10.0F; @@ -228,8 +233,8 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM this.heal((float) itemfood.func_150905_g(itemstack)); if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents( - par1EntityPlayer.inventory.currentItem, null); + par1EntityPlayer.inventory + .setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); } return true; @@ -257,8 +262,8 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM } if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents( - par1EntityPlayer.inventory.currentItem, (ItemStack) null); + par1EntityPlayer.inventory + .setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); } if (!this.worldObj.isRemote) { @@ -328,12 +333,11 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM } } - return par1EntityLivingBase instanceof EntityPlayer - && par2EntityLivingBase instanceof EntityPlayer - && !((EntityPlayer) par2EntityLivingBase) - .canAttackPlayer((EntityPlayer) par1EntityLivingBase) - ? false - : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer + && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) + ? false + : !(par1EntityLivingBase instanceof EntityHorse) + || !((EntityHorse) par1EntityLivingBase).isTame(); } else { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java index 0018e9b1..151a7389 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.IMob; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; + public class EntityWaterElemental extends EntityElemental implements IMob { + public EntityWaterElemental(World world) { super(world, AlchemicalWizardry.entityWaterElementalID); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java index 1e1afaf4..494a131e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java @@ -1,10 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; -import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.*; import net.minecraft.entity.ai.*; import net.minecraft.entity.monster.EntityCreeper; @@ -18,10 +13,20 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; +import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackMob { + private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 40, 40, 15.0F); - private EntityAIAttackOnCollide aiAttackOnCollide = - new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); + private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide( + this, + EntityPlayer.class, + 1.2D, + false); private static float maxTamedHealth = 100.0F; private static float maxUntamedHealth = 200.0F; @@ -239,8 +244,8 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM this.heal((float) itemfood.func_150905_g(itemstack)); if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents( - par1EntityPlayer.inventory.currentItem, null); + par1EntityPlayer.inventory + .setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); } return true; @@ -338,12 +343,11 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM } } - return par1EntityLivingBase instanceof EntityPlayer - && par2EntityLivingBase instanceof EntityPlayer - && !((EntityPlayer) par2EntityLivingBase) - .canAttackPlayer((EntityPlayer) par1EntityLivingBase) - ? false - : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer + && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) + ? false + : !(par1EntityLivingBase instanceof EntityHorse) + || !((EntityHorse) par1EntityLivingBase).isTame(); } else { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java index 354eeb11..40a78687 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java @@ -1,17 +1,19 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.book.BloodMagicGuide; -import amerifrance.guideapi.api.GuideRegistry; -import cpw.mods.fml.common.Optional; import net.minecraft.entity.Entity; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; import net.minecraft.world.World; + import pneumaticCraft.api.PneumaticRegistry; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.book.BloodMagicGuide; +import amerifrance.guideapi.api.GuideRegistry; +import cpw.mods.fml.common.Optional; public class MailOrderEntityItem extends EntityItem { + public MailOrderEntityItem(World par1World, double par2, double par4, double par6) { super(par1World, par2, par4, par6); this.isImmuneToFire = true; @@ -22,8 +24,7 @@ public class MailOrderEntityItem extends EntityItem { this(par1World, par2, par4, par6); this.setEntityItemStack(par8ItemStack); this.isImmuneToFire = true; - this.lifespan = (par8ItemStack.getItem() == null - ? 6000 + this.lifespan = (par8ItemStack.getItem() == null ? 6000 : par8ItemStack.getItem().getEntityLifespan(par8ItemStack, par1World)); } @@ -68,12 +69,11 @@ public class MailOrderEntityItem extends EntityItem { @Optional.Method(modid = "PneumaticCraft") public void deliverItemViaDrone(double x, double y, double z) { - PneumaticRegistry.getInstance() - .deliverItemsAmazonStyle( - worldObj, - (int) x, - (int) y, - (int) z, - GuideRegistry.getItemStackForBook(BloodMagicGuide.bloodMagicGuide)); + PneumaticRegistry.getInstance().deliverItemsAmazonStyle( + worldObj, + (int) x, + (int) y, + (int) z, + GuideRegistry.getItemStackForBook(BloodMagicGuide.bloodMagicGuide)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java index 65c59a35..a7962ab1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java @@ -1,11 +1,8 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.common.registry.IThrowableEntity; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.Iterator; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -21,8 +18,14 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.common.registry.IThrowableEntity; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + // Shamelessly ripped off from x3n0ph0b3 public class EnergyBlastProjectile extends Entity implements IProjectile, IThrowableEntity { + protected int xTile = -1; protected int yTile = -1; protected int zTile = -1; @@ -80,16 +83,8 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow this.maxTicksInAir = 600; } - public EnergyBlastProjectile( - World par1World, - EntityLivingBase par2EntityPlayer, - int damage, - int maxTicksInAir, - double posX, - double posY, - double posZ, - float rotationYaw, - float rotationPitch) { + public EnergyBlastProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage, int maxTicksInAir, + double posX, double posY, double posZ, float rotationYaw, float rotationPitch) { super(par1World); shootingEntity = par2EntityPlayer; float par3 = 0.8F; @@ -110,14 +105,8 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow this.maxTicksInAir = maxTicksInAir; } - public EnergyBlastProjectile( - World par1World, - EntityLivingBase par2EntityLivingBase, - EntityLivingBase par3EntityLivingBase, - float par4, - float par5, - int damage, - int maxTicksInAir) { + public EnergyBlastProjectile(World par1World, EntityLivingBase par2EntityLivingBase, + EntityLivingBase par3EntityLivingBase, float par4, float par5, int damage, int maxTicksInAir) { super(par1World); this.renderDistanceWeight = 10.0D; this.shootingEntity = par2EntityLivingBase; @@ -133,7 +122,11 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow double d4 = d0 / d3; double d5 = d2 / d3; this.setLocationAndAngles( - par2EntityLivingBase.posX + d4, this.posY, par2EntityLivingBase.posZ + d5, f2, f3); + par2EntityLivingBase.posX + d4, + this.posY, + par2EntityLivingBase.posZ + d5, + f2, + f3); this.yOffset = 0.0F; float f4 = (float) d3 * 0.2F; this.setThrowableHeading(d0, d1, d2, par4, par5); @@ -149,8 +142,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow } /** - * Similar to setArrowHeading, it's point the throwable entity to a x, y, z - * direction. + * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction. */ @Override public void setThrowableHeading(double var1, double var3, double var5, float var7, float var8) { @@ -279,7 +271,8 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow Entity var5 = null; List var6 = worldObj.getEntitiesWithinAABBExcludingEntity( - this, boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); + this, + boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); double var7 = 0.0D; Iterator var9 = var6.iterator(); float var11; @@ -368,8 +361,8 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow } /** - * returns if this entity triggers Block.onEntityWalking on the blocks they - * walk on. used for spiders and wolves to prevent them from trampling crops + * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to + * prevent them from trampling crops */ @Override protected boolean canTriggerWalking() { @@ -396,8 +389,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow } /** - * Whether the arrow has a stream of critical hit particles flying behind - * it. + * Whether the arrow has a stream of critical hit particles flying behind it. */ public void setIsCritical(boolean par1) { byte var2 = dataWatcher.getWatchableObjectByte(16); @@ -410,8 +402,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow } /** - * Whether the arrow has a stream of critical hit particles flying behind - * it. + * Whether the arrow has a stream of critical hit particles flying behind it. */ public boolean getIsCritical() { byte var1 = dataWatcher.getWatchableObjectByte(16); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java index 1c8dc485..81e15fc5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; -import WayofTime.alchemicalWizardry.ModBlocks; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Blocks; @@ -8,7 +7,10 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.ModBlocks; + public class EntityBloodLightProjectile extends EnergyBlastProjectile { + public EntityBloodLightProjectile(World par1World) { super(par1World); } @@ -21,27 +23,13 @@ public class EntityBloodLightProjectile extends EnergyBlastProjectile { super(par1World, par2EntityPlayer, damage); } - public EntityBloodLightProjectile( - World par1World, - EntityLivingBase par2EntityPlayer, - int damage, - int maxTicksInAir, - double posX, - double posY, - double posZ, - float rotationYaw, - float rotationPitch) { + public EntityBloodLightProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage, int maxTicksInAir, + double posX, double posY, double posZ, float rotationYaw, float rotationPitch) { super(par1World, par2EntityPlayer, damage, maxTicksInAir, posX, posY, posZ, rotationYaw, rotationPitch); } - public EntityBloodLightProjectile( - World par1World, - EntityLivingBase par2EntityLivingBase, - EntityLivingBase par3EntityLivingBase, - float par4, - float par5, - int damage, - int maxTicksInAir) { + public EntityBloodLightProjectile(World par1World, EntityLivingBase par2EntityLivingBase, + EntityLivingBase par3EntityLivingBase, float par4, float par5, int damage, int maxTicksInAir) { super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java index 279127ff..61774ab5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; + public class EntityEnergyBazookaMainProjectile extends EnergyBlastProjectile { + public EntityEnergyBazookaMainProjectile(World par1World) { super(par1World); } @@ -20,27 +22,13 @@ public class EntityEnergyBazookaMainProjectile extends EnergyBlastProjectile { super(par1World, par2EntityPlayer, damage); } - public EntityEnergyBazookaMainProjectile( - World par1World, - EntityLivingBase par2EntityPlayer, - int damage, - int maxTicksInAir, - double posX, - double posY, - double posZ, - float rotationYaw, - float rotationPitch) { + public EntityEnergyBazookaMainProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage, + int maxTicksInAir, double posX, double posY, double posZ, float rotationYaw, float rotationPitch) { super(par1World, par2EntityPlayer, damage, maxTicksInAir, posX, posY, posZ, rotationYaw, rotationPitch); } - public EntityEnergyBazookaMainProjectile( - World par1World, - EntityLivingBase par2EntityLivingBase, - EntityLivingBase par3EntityLivingBase, - float par4, - float par5, - int damage, - int maxTicksInAir) { + public EntityEnergyBazookaMainProjectile(World par1World, EntityLivingBase par2EntityLivingBase, + EntityLivingBase par3EntityLivingBase, float par4, float par5, int damage, int maxTicksInAir) { super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); } @@ -95,7 +83,11 @@ public class EntityEnergyBazookaMainProjectile extends EnergyBlastProjectile { } for (int i = 0; i < 20; i++) { EntityEnergyBazookaSecondaryProjectile secProj = new EntityEnergyBazookaSecondaryProjectile( - worldObj, this.posX, this.posY, this.posZ, secondaryDamage); + worldObj, + this.posX, + this.posY, + this.posZ, + secondaryDamage); secProj.shootingEntity = this.shootingEntity; float xVel = rand.nextFloat() - rand.nextFloat(); float yVel = rand.nextFloat() - rand.nextFloat(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java index bd6baaa7..235745ea 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java @@ -1,10 +1,8 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.Iterator; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -18,7 +16,12 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectile implements IProjectile { + private int xTile = -1; private int yTile = -1; private int zTile = -1; @@ -80,8 +83,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil } /** - * Similar to setArrowHeading, it's point the throwable entity to a x, y, z - * direction. + * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction. */ @Override public void setThrowableHeading(double var1, double var3, double var5, float var7, float var8) { @@ -210,7 +212,8 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil Entity var5 = null; List var6 = worldObj.getEntitiesWithinAABBExcludingEntity( - this, boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); + this, + boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); double var7 = 0.0D; Iterator var9 = var6.iterator(); float var11; @@ -293,8 +296,8 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil } /** - * returns if this entity triggers Block.onEntityWalking on the blocks they - * walk on. used for spiders and wolves to prevent them from trampling crops + * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to + * prevent them from trampling crops */ @Override protected boolean canTriggerWalking() { @@ -321,8 +324,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil } /** - * Whether the arrow has a stream of critical hit particles flying behind - * it. + * Whether the arrow has a stream of critical hit particles flying behind it. */ public void setIsCritical(boolean par1) { byte var2 = dataWatcher.getWatchableObjectByte(16); @@ -335,8 +337,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil } /** - * Whether the arrow has a stream of critical hit particles flying behind - * it. + * Whether the arrow has a stream of critical hit particles flying behind it. */ public boolean getIsCritical() { byte var1 = dataWatcher.getWatchableObjectByte(16); @@ -436,32 +437,68 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil switch (sideHit) { case 0: worldObj.spawnParticle( - "smoke", posX, posY, posZ, gaussian(0.1D), -gaussian(0.1D), gaussian(0.1D)); + "smoke", + posX, + posY, + posZ, + gaussian(0.1D), + -gaussian(0.1D), + gaussian(0.1D)); break; case 1: worldObj.spawnParticle( - "smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + "smoke", + posX, + posY, + posZ, + gaussian(0.1D), + gaussian(0.1D), + gaussian(0.1D)); break; case 2: worldObj.spawnParticle( - "smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), -gaussian(0.1D)); + "smoke", + posX, + posY, + posZ, + gaussian(0.1D), + gaussian(0.1D), + -gaussian(0.1D)); break; case 3: worldObj.spawnParticle( - "smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + "smoke", + posX, + posY, + posZ, + gaussian(0.1D), + gaussian(0.1D), + gaussian(0.1D)); break; case 4: worldObj.spawnParticle( - "smoke", posX, posY, posZ, -gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + "smoke", + posX, + posY, + posZ, + -gaussian(0.1D), + gaussian(0.1D), + gaussian(0.1D)); break; case 5: worldObj.spawnParticle( - "smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + "smoke", + posX, + posY, + posZ, + gaussian(0.1D), + gaussian(0.1D), + gaussian(0.1D)); break; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java index 863f5879..72c9759d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; -import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; import net.minecraft.entity.Entity; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; + public class EntityMeteor extends EnergyBlastProjectile { + private int meteorID; public boolean hasTerrae; @@ -65,9 +67,12 @@ public class EntityMeteor extends EnergyBlastProjectile { this.onImpact(mop.entityHit); } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { MeteorRegistry.createMeteorImpact( - worldObj, mop.blockX, mop.blockY, mop.blockZ, this.meteorID, new boolean[] { - hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae - }); + worldObj, + mop.blockX, + mop.blockY, + mop.blockZ, + this.meteorID, + new boolean[] { hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae }); } this.setDead(); @@ -76,9 +81,12 @@ public class EntityMeteor extends EnergyBlastProjectile { @Override public void onImpact(Entity mop) { MeteorRegistry.createMeteorImpact( - worldObj, (int) this.posX, (int) this.posY, (int) this.posZ, meteorID, new boolean[] { - hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae - }); + worldObj, + (int) this.posX, + (int) this.posY, + (int) this.posZ, + meteorID, + new boolean[] { hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae }); this.setDead(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityParticleBeam.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityParticleBeam.java index 2e8683aa..f8976091 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityParticleBeam.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityParticleBeam.java @@ -1,9 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; -import cpw.mods.fml.client.FMLClientHandler; -import cpw.mods.fml.common.registry.IThrowableEntity; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.particle.EntityCloudFX; import net.minecraft.client.particle.EntityFX; import net.minecraft.entity.Entity; @@ -14,8 +10,14 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.world.World; +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.common.registry.IThrowableEntity; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + // Shamelessly ripped off from x3n0ph0b3 public class EntityParticleBeam extends Entity implements IProjectile, IThrowableEntity { + protected int xTile = -1; protected int yTile = -1; protected int zTile = -1; @@ -79,16 +81,8 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl this.maxTicksInAir = 600; } - public EntityParticleBeam( - World par1World, - EntityLivingBase par2EntityPlayer, - int damage, - int maxTicksInAir, - double posX, - double posY, - double posZ, - float rotationYaw, - float rotationPitch) { + public EntityParticleBeam(World par1World, EntityLivingBase par2EntityPlayer, int damage, int maxTicksInAir, + double posX, double posY, double posZ, float rotationYaw, float rotationPitch) { super(par1World); shootingEntity = par2EntityPlayer; float par3 = 0.8F; @@ -109,14 +103,8 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl this.maxTicksInAir = maxTicksInAir; } - public EntityParticleBeam( - World par1World, - EntityLivingBase par2EntityLivingBase, - EntityLivingBase par3EntityLivingBase, - float par4, - float par5, - int damage, - int maxTicksInAir) { + public EntityParticleBeam(World par1World, EntityLivingBase par2EntityLivingBase, + EntityLivingBase par3EntityLivingBase, float par4, float par5, int damage, int maxTicksInAir) { super(par1World); this.renderDistanceWeight = 10.0D; this.shootingEntity = par2EntityLivingBase; @@ -132,7 +120,11 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl double d4 = d0 / d3; double d5 = d2 / d3; this.setLocationAndAngles( - par2EntityLivingBase.posX + d4, this.posY, par2EntityLivingBase.posZ + d5, f2, f3); + par2EntityLivingBase.posX + d4, + this.posY, + par2EntityLivingBase.posZ + d5, + f2, + f3); this.yOffset = 0.0F; float f4 = (float) d3 * 0.2F; this.setThrowableHeading(d0, d1, d2, par4, par5); @@ -148,8 +140,7 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl } /** - * Similar to setArrowHeading, it's point the throwable entity to a x, y, z - * direction. + * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction. */ @Override public void setThrowableHeading(double var1, double var3, double var5, float var7, float var8) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java index cf3cb802..23b6919d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java @@ -8,6 +8,7 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; public class ExplosionProjectile extends EnergyBlastProjectile { + protected boolean causesEnvDamage; public ExplosionProjectile(World par1World) { @@ -23,29 +24,14 @@ public class ExplosionProjectile extends EnergyBlastProjectile { causesEnvDamage = flag; } - public ExplosionProjectile( - World par1World, - EntityLivingBase par2EntityPlayer, - int damage, - int maxTicksInAir, - double posX, - double posY, - double posZ, - float rotationYaw, - float rotationPitch, - boolean flag) { + public ExplosionProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage, int maxTicksInAir, + double posX, double posY, double posZ, float rotationYaw, float rotationPitch, boolean flag) { super(par1World, par2EntityPlayer, damage, maxTicksInAir, posX, posY, posZ, rotationYaw, rotationPitch); causesEnvDamage = flag; } - public ExplosionProjectile( - World par1World, - EntityLivingBase par2EntityLivingBase, - EntityLivingBase par3EntityLivingBase, - float par4, - float par5, - int damage, - int maxTicksInAir, + public ExplosionProjectile(World par1World, EntityLivingBase par2EntityLivingBase, + EntityLivingBase par3EntityLivingBase, float par4, float par5, int damage, int maxTicksInAir, boolean flag) { super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); causesEnvDamage = flag; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java index 73f4377d..7bb0e16e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java @@ -9,6 +9,7 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; public class FireProjectile extends EnergyBlastProjectile { + public FireProjectile(World par1World) { super(par1World); } @@ -21,27 +22,13 @@ public class FireProjectile extends EnergyBlastProjectile { super(par1World, par2EntityPlayer, damage); } - public FireProjectile( - World par1World, - EntityLivingBase par2EntityPlayer, - int damage, - int maxTicksInAir, - double posX, - double posY, - double posZ, - float rotationYaw, - float rotationPitch) { + public FireProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage, int maxTicksInAir, + double posX, double posY, double posZ, float rotationYaw, float rotationPitch) { super(par1World, par2EntityPlayer, damage, maxTicksInAir, posX, posY, posZ, rotationYaw, rotationPitch); } - public FireProjectile( - World par1World, - EntityLivingBase par2EntityLivingBase, - EntityLivingBase par3EntityLivingBase, - float par4, - float par5, - int damage, - int maxTicksInAir) { + public FireProjectile(World par1World, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase, + float par4, float par5, int damage, int maxTicksInAir) { super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); } @@ -64,7 +51,10 @@ public class FireProjectile extends EnergyBlastProjectile { for (int k = -1; k <= 1; k++) { if (worldObj.isAirBlock((int) this.posX + i, (int) this.posY + j, (int) this.posZ + k)) { worldObj.setBlock( - (int) this.posX + i, (int) this.posY + j, (int) this.posZ + k, Blocks.fire); + (int) this.posX + i, + (int) this.posY + j, + (int) this.posZ + k, + Blocks.fire); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java index 51de84ba..091b8d95 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class HolyProjectile extends EnergyBlastProjectile { + public HolyProjectile(World par1World) { super(par1World); } @@ -20,27 +22,13 @@ public class HolyProjectile extends EnergyBlastProjectile { super(par1World, par2EntityPlayer, damage); } - public HolyProjectile( - World par1World, - EntityLivingBase par2EntityPlayer, - int damage, - int maxTicksInAir, - double posX, - double posY, - double posZ, - float rotationYaw, - float rotationPitch) { + public HolyProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage, int maxTicksInAir, + double posX, double posY, double posZ, float rotationYaw, float rotationPitch) { super(par1World, par2EntityPlayer, damage, maxTicksInAir, posX, posY, posZ, rotationYaw, rotationPitch); } - public HolyProjectile( - World par1World, - EntityLivingBase par2EntityLivingBase, - EntityLivingBase par3EntityLivingBase, - float par4, - float par5, - int damage, - int maxTicksInAir) { + public HolyProjectile(World par1World, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase, + float par4, float par5, int damage, int maxTicksInAir) { super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); } @@ -57,8 +45,7 @@ public class HolyProjectile extends EnergyBlastProjectile { } this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - } + } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {} this.setDead(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java index 61deae9a..93935d0d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.potion.Potion; @@ -9,7 +8,10 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class IceProjectile extends EnergyBlastProjectile { + public IceProjectile(World par1World) { super(par1World); } @@ -22,27 +24,13 @@ public class IceProjectile extends EnergyBlastProjectile { super(par1World, par2EntityPlayer, damage); } - public IceProjectile( - World par1World, - EntityLivingBase par2EntityPlayer, - int damage, - int maxTicksInAir, - double posX, - double posY, - double posZ, - float rotationYaw, - float rotationPitch) { + public IceProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage, int maxTicksInAir, double posX, + double posY, double posZ, float rotationYaw, float rotationPitch) { super(par1World, par2EntityPlayer, damage, maxTicksInAir, posX, posY, posZ, rotationYaw, rotationPitch); } - public IceProjectile( - World par1World, - EntityLivingBase par2EntityLivingBase, - EntityLivingBase par3EntityLivingBase, - float par4, - float par5, - int damage, - int maxTicksInAir) { + public IceProjectile(World par1World, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase, + float par4, float par5, int damage, int maxTicksInAir) { super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); } @@ -59,8 +47,7 @@ public class IceProjectile extends EnergyBlastProjectile { } this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - } + } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {} this.setDead(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java index f00b0223..0a33c2a3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.effect.EntityLightningBolt; @@ -9,7 +8,10 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class LightningBoltProjectile extends EnergyBlastProjectile { + private boolean causeLightning; public LightningBoltProjectile(World par1World) { @@ -25,17 +27,8 @@ public class LightningBoltProjectile extends EnergyBlastProjectile { causeLightning = flag; } - public LightningBoltProjectile( - World par1World, - EntityLivingBase par2EntityPlayer, - int damage, - int maxTicksInAir, - double posX, - double posY, - double posZ, - float rotationYaw, - float rotationPitch, - boolean flag) { + public LightningBoltProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage, int maxTicksInAir, + double posX, double posY, double posZ, float rotationYaw, float rotationPitch, boolean flag) { super(par1World, par2EntityPlayer, damage, maxTicksInAir, posX, posY, posZ, rotationYaw, rotationPitch); causeLightning = flag; } @@ -69,11 +62,12 @@ public class LightningBoltProjectile extends EnergyBlastProjectile { } else { if (mop instanceof EntityLivingBase) { if (causeLightning) { - this.worldObj.addWeatherEffect(new EntityLightningBolt( - this.worldObj, - ((EntityLivingBase) mop).posX, - ((EntityLivingBase) mop).posY, - ((EntityLivingBase) mop).posZ)); + this.worldObj.addWeatherEffect( + new EntityLightningBolt( + this.worldObj, + ((EntityLivingBase) mop).posX, + ((EntityLivingBase) mop).posY, + ((EntityLivingBase) mop).posZ)); } else { doDamage(projectileDamage, mop); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java index d7826895..d6dddd34 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.nbt.NBTTagCompound; @@ -10,7 +9,10 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class MudProjectile extends EnergyBlastProjectile { + private boolean doesBlindness; // True for when it applies blindness, false for slowness public MudProjectile(World par1World) { @@ -26,30 +28,14 @@ public class MudProjectile extends EnergyBlastProjectile { doesBlindness = flag; } - public MudProjectile( - World par1World, - EntityLivingBase par2EntityPlayer, - int damage, - int maxTicksInAir, - double posX, - double posY, - double posZ, - float rotationYaw, - float rotationPitch, - boolean flag) { + public MudProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage, int maxTicksInAir, double posX, + double posY, double posZ, float rotationYaw, float rotationPitch, boolean flag) { super(par1World, par2EntityPlayer, damage, maxTicksInAir, posX, posY, posZ, rotationYaw, rotationPitch); doesBlindness = flag; } - public MudProjectile( - World par1World, - EntityLivingBase par2EntityLivingBase, - EntityLivingBase par3EntityLivingBase, - float par4, - float par5, - int damage, - int maxTicksInAir, - boolean flag) { + public MudProjectile(World par1World, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase, + float par4, float par5, int damage, int maxTicksInAir, boolean flag) { super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); doesBlindness = flag; } @@ -67,8 +53,7 @@ public class MudProjectile extends EnergyBlastProjectile { } this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - } + } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {} this.setDead(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java index 17b17217..80a0f139 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java @@ -1,7 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayerMP; @@ -12,7 +10,11 @@ import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.EnderTeleportEvent; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport; + public class TeleportProjectile extends EnergyBlastProjectile { + private boolean isEntityTeleport; public TeleportProjectile(World par1World) { @@ -37,17 +39,8 @@ public class TeleportProjectile extends EnergyBlastProjectile { this.motionZ *= 3; } - public TeleportProjectile( - World par1World, - EntityLivingBase par2EntityPlayer, - int damage, - int maxTicksInAir, - double posX, - double posY, - double posZ, - float rotationYaw, - float rotationPitch, - boolean flag) { + public TeleportProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage, int maxTicksInAir, + double posX, double posY, double posZ, float rotationYaw, float rotationPitch, boolean flag) { super(par1World, par2EntityPlayer, damage, maxTicksInAir, posX, posY, posZ, rotationYaw, rotationPitch); isEntityTeleport = flag; this.motionX *= 3; @@ -74,8 +67,12 @@ public class TeleportProjectile extends EnergyBlastProjectile { EntityPlayerMP entityplayermp = (EntityPlayerMP) shootingEntity; if (entityplayermp.worldObj == this.worldObj) { - EnderTeleportEvent event = - new EnderTeleportEvent(entityplayermp, this.posX, this.posY, this.posZ, 5.0F); + EnderTeleportEvent event = new EnderTeleportEvent( + entityplayermp, + this.posX, + this.posY, + this.posZ, + 5.0F); if (!MinecraftForge.EVENT_BUS.post(event)) { if (shootingEntity.isRiding()) { @@ -101,8 +98,12 @@ public class TeleportProjectile extends EnergyBlastProjectile { if (shootingEntity != null && shootingEntity instanceof EntityPlayerMP) { EntityPlayerMP entityplayermp = (EntityPlayerMP) shootingEntity; if (entityplayermp.worldObj == this.worldObj) { - EnderTeleportEvent event = - new EnderTeleportEvent(entityplayermp, this.posX, this.posY, this.posZ, 5.0F); + EnderTeleportEvent event = new EnderTeleportEvent( + entityplayermp, + this.posX, + this.posY, + this.posZ, + 5.0F); if (!MinecraftForge.EVENT_BUS.post(event)) { if (shootingEntity.isRiding()) { shootingEntity.mountEntity((Entity) null); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java index 0c0fad91..dac1b204 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java @@ -1,7 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.potion.PotionEffect; @@ -9,7 +7,11 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class WaterProjectile extends EnergyBlastProjectile { + public WaterProjectile(World par1World) { super(par1World); } @@ -22,16 +24,8 @@ public class WaterProjectile extends EnergyBlastProjectile { super(par1World, par2EntityPlayer, damage); } - public WaterProjectile( - World par1World, - EntityLivingBase par2EntityPlayer, - int damage, - int maxTicksInAir, - double posX, - double posY, - double posZ, - float rotationYaw, - float rotationPitch) { + public WaterProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage, int maxTicksInAir, + double posX, double posY, double posZ, float rotationYaw, float rotationPitch) { super(par1World, par2EntityPlayer, damage, maxTicksInAir, posX, posY, posZ, rotationYaw, rotationPitch); } @@ -48,8 +42,7 @@ public class WaterProjectile extends EnergyBlastProjectile { } this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - } + } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {} this.setDead(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java index 560ca1c2..3d009d50 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class WindGustProjectile extends EnergyBlastProjectile { + public WindGustProjectile(World par1World) { super(par1World); } @@ -20,27 +22,13 @@ public class WindGustProjectile extends EnergyBlastProjectile { super(par1World, par2EntityPlayer, damage); } - public WindGustProjectile( - World par1World, - EntityLivingBase par2EntityPlayer, - int damage, - int maxTicksInAir, - double posX, - double posY, - double posZ, - float rotationYaw, - float rotationPitch) { + public WindGustProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage, int maxTicksInAir, + double posX, double posY, double posZ, float rotationYaw, float rotationPitch) { super(par1World, par2EntityPlayer, damage, maxTicksInAir, posX, posY, posZ, rotationYaw, rotationPitch); } - public WindGustProjectile( - World par1World, - EntityLivingBase par2EntityLivingBase, - EntityLivingBase par3EntityLivingBase, - float par4, - float par5, - int damage, - int maxTicksInAir) { + public WindGustProjectile(World par1World, EntityLivingBase par2EntityLivingBase, + EntityLivingBase par3EntityLivingBase, float par4, float par5, int damage, int maxTicksInAir) { super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); } @@ -57,8 +45,7 @@ public class WindGustProjectile extends EnergyBlastProjectile { } this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - } + } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {} this.setDead(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/guide/RecipeHolder.java b/src/main/java/WayofTime/alchemicalWizardry/common/guide/RecipeHolder.java index 9253e648..c42a6b08 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/guide/RecipeHolder.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/guide/RecipeHolder.java @@ -1,15 +1,18 @@ package WayofTime.alchemicalWizardry.common.guide; +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.item.crafting.IRecipe; + import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; -import java.util.List; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.item.crafting.IRecipe; public class RecipeHolder { + private static List recipeList; public static IRecipe bloodAltarRecipe; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/AgriCraftCropHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/AgriCraftCropHarvestHandler.java index 3f10456c..5c311e69 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/AgriCraftCropHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/AgriCraftCropHarvestHandler.java @@ -1,13 +1,16 @@ package WayofTime.alchemicalWizardry.common.harvest; -import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; -import cpw.mods.fml.common.registry.GameRegistry; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; + import net.minecraft.block.Block; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; +import cpw.mods.fml.common.registry.GameRegistry; + public class AgriCraftCropHarvestHandler implements IHarvestHandler { + public Block harvestBlock; public Method isMature; public Method harvest; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java index 276fca86..b6664c36 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.common.harvest; -import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.BlockCrops; import net.minecraft.entity.item.EntityItem; @@ -12,10 +12,12 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.common.IPlantable; +import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; + public class BloodMagicHarvestHandler implements IHarvestHandler { + public boolean canHandleBlock(Block block) { - return block == Blocks.wheat - || block == Blocks.carrots + return block == Blocks.wheat || block == Blocks.carrots || block == Blocks.potatoes || block == Blocks.nether_wart; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java index c75b7c72..f69b8e45 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.harvest; -import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; + public class CactusReedHarvestHandler implements IHarvestHandler { + public boolean canHandleBlock(Block block) { return block == Blocks.reeds || block == Blocks.cactus; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericItemStackHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericItemStackHarvestHandler.java index c2289746..780dda0e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericItemStackHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericItemStackHarvestHandler.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.harvest; -import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.common.IPlantable; +import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; + public class GenericItemStackHarvestHandler implements IHarvestHandler { public Block harvestBlock; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java index ca731c56..a727bb91 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java @@ -1,12 +1,14 @@ package WayofTime.alchemicalWizardry.common.harvest; -import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; -import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; +import cpw.mods.fml.common.registry.GameRegistry; + public class GenericPamSeedlessFruitHarvestHandler implements IHarvestHandler { + public Block harvestBlock; public int harvestMeta; public int resetMeta; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java index 3753b3ce..fd085cbb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java @@ -1,8 +1,7 @@ package WayofTime.alchemicalWizardry.common.harvest; -import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; -import cpw.mods.fml.common.registry.GameRegistry; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.Item; @@ -10,7 +9,11 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.common.IPlantable; +import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; +import cpw.mods.fml.common.registry.GameRegistry; + public class GenericSeededHarvestHandler implements IHarvestHandler { + public Block harvestBlock; public int harvestMeta; public IPlantable harvestSeed; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java index a9bd1997..a15c51f1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.harvest; -import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; + public class GourdHarvestHandler implements IHarvestHandler { + public boolean canHandleBlock(Block block) { return block == Blocks.melon_block || block == Blocks.pumpkin; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/PamHarvestCompatRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/PamHarvestCompatRegistry.java index 13959b9b..b519fcb5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/PamHarvestCompatRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/PamHarvestCompatRegistry.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.harvest; import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; public class PamHarvestCompatRegistry { + public static void registerPamHandlers() { registerSeededHandler("blackberry", 7); registerSeededHandler("blueberry", 7); @@ -111,8 +112,10 @@ public class PamHarvestCompatRegistry { public static void registerFruitHandler(String name, int harvestMeta, int resetMeta) { String block = "harvestcraft:pam" + name; - GenericPamSeedlessFruitHarvestHandler handler = - new GenericPamSeedlessFruitHarvestHandler(block, harvestMeta, resetMeta); + GenericPamSeedlessFruitHarvestHandler handler = new GenericPamSeedlessFruitHarvestHandler( + block, + harvestMeta, + resetMeta); if (handler.isHarvesterValid()) { HarvestRegistry.registerHarvestHandler(handler); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/AWBaseItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/AWBaseItems.java index 47ebbbfd..8fbf6389 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/AWBaseItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/AWBaseItems.java @@ -1,15 +1,18 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; + public class AWBaseItems extends Item { + public AWBaseItems() { super(); setMaxStackSize(64); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java index 6ef570d7..e72706c0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java @@ -1,10 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -15,10 +12,17 @@ import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.util.StatCollector; import net.minecraft.world.World; + import org.lwjgl.input.Keyboard; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ActivationCrystal extends EnergyItems { - private static final String[] ACTIVATION_CRYSTAL_NAMES = new String[] {"Weak", "Awakened", "Creative"}; + + private static final String[] ACTIVATION_CRYSTAL_NAMES = new String[] { "Weak", "Awakened", "Creative" }; @SideOnly(Side.CLIENT) private IIcon[] icons; @@ -37,8 +41,8 @@ public class ActivationCrystal extends EnergyItems { icons = new IIcon[ACTIVATION_CRYSTAL_NAMES.length]; for (int i = 0; i < ACTIVATION_CRYSTAL_NAMES.length; ++i) { - icons[i] = iconRegister.registerIcon( - "AlchemicalWizardry:" + "activationCrystal" + ACTIVATION_CRYSTAL_NAMES[i]); + icons[i] = iconRegister + .registerIcon("AlchemicalWizardry:" + "activationCrystal" + ACTIVATION_CRYSTAL_NAMES[i]); } } @@ -67,10 +71,15 @@ public class ActivationCrystal extends EnergyItems { } } } else { - par3List.add("-" + StatCollector.translateToLocal("tooltip.alchemy.press") + " " - + EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.shift") - + EnumChatFormatting.GRAY + " " - + StatCollector.translateToLocal("tooltip.alchemy.forrecipe") + "-"); + par3List.add( + "-" + StatCollector.translateToLocal("tooltip.alchemy.press") + + " " + + EnumChatFormatting.BLUE + + StatCollector.translateToLocal("tooltip.alchemy.shift") + + EnumChatFormatting.GRAY + + " " + + StatCollector.translateToLocal("tooltip.alchemy.forrecipe") + + "-"); } break; @@ -84,8 +93,9 @@ public class ActivationCrystal extends EnergyItems { } if (!(par1ItemStack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java index bbb1c1d5..7f33fb02 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.items; +import net.minecraft.client.renderer.texture.IIconRegister; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class AirScribeTool extends ScribeTool { + public AirScribeTool() { super(4); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java index 1068776e..dcb4054c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.items; +import net.minecraft.client.renderer.texture.IIconRegister; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class ApprenticeBloodOrb extends EnergyBattery { + public ApprenticeBloodOrb(int damage) { super(damage); orbLevel = 2; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java index 37afdd4b..962c988f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.items; +import net.minecraft.client.renderer.texture.IIconRegister; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class ArchmageBloodOrb extends EnergyBattery { + public ArchmageBloodOrb(int damage) { super(damage); orbLevel = 5; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java index 7ac9fb73..dc1e061c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java @@ -1,9 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -14,7 +12,12 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ArmourInhibitor extends EnergyItems { + @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -42,8 +45,9 @@ public class ArmourInhibitor extends EnergyItems { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); } - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } @@ -116,8 +120,7 @@ public class ArmourInhibitor extends EnergyItems { } if (par1ItemStack.getTagCompound().getBoolean("isActive")) { - if (par2World.getWorldTime() % tickDelay - == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) {} + if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) {} // TODO Do stuff par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 2, 0)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java index e41dec8b..fc98b07f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java @@ -1,10 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -14,7 +11,13 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlankSpell extends EnergyItems { + public BlankSpell() { super(); this.setMaxStackSize(1); @@ -35,12 +38,18 @@ public class BlankSpell extends EnergyItems { NBTTagCompound itemTag = par1ItemStack.getTagCompound(); if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + itemTag.getInteger("xCoord") - + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord")); + par3List.add( + StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + + itemTag.getInteger("xCoord") + + ", " + + itemTag.getInteger("yCoord") + + ", " + + itemTag.getInteger("zCoord")); par3List.add( StatCollector.translateToLocal("tooltip.alchemy.dimension") + " " + getDimensionID(par1ItemStack)); } @@ -58,7 +67,9 @@ public class BlankSpell extends EnergyItems { if (world != null) { NBTTagCompound itemTag = par1ItemStack.getTagCompound(); TileEntity tileEntity = world.getTileEntity( - itemTag.getInteger("xCoord"), itemTag.getInteger("yCoord"), itemTag.getInteger("zCoord")); + itemTag.getInteger("xCoord"), + itemTag.getInteger("yCoord"), + itemTag.getInteger("zCoord")); if (tileEntity instanceof TEHomHeart) { TEHomHeart homHeart = (TEHomHeart) tileEntity; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java index 325bbb38..e0d6160d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java @@ -1,17 +1,19 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BloodShard extends Item implements ArmourUpgrade { + public BloodShard() { super(); this.maxStackSize = 64; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java index f9b743c4..a16f9014 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java @@ -1,14 +1,8 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.common.ItemType; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import com.google.common.collect.HashMultiset; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.BlockLeavesBase; import net.minecraft.client.renderer.texture.IIconRegister; @@ -25,7 +19,18 @@ import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; +import WayofTime.alchemicalWizardry.common.ItemType; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + +import com.google.common.collect.HashMultiset; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BoundAxe extends ItemAxe implements IBindable { + public float efficiencyOnProperMaterial = 12.0F; public float damageVsEntity; @@ -67,8 +72,9 @@ public class BoundAxe extends ItemAxe implements IBindable { } if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } } @@ -142,16 +148,14 @@ public class BoundAxe extends ItemAxe implements IBindable { if (block != null) { float str = func_150893_a(par1ItemStack, block); - if (str > 1.1f - || block instanceof BlockLeavesBase - && par2World.canMineBlock(par3EntityPlayer, posX + i, posY + j, posZ + k)) { - if (silkTouch - && block.canSilkHarvest( - par2World, par3EntityPlayer, posX + i, posY + j, posZ + k, meta)) { + if (str > 1.1f || block instanceof BlockLeavesBase + && par2World.canMineBlock(par3EntityPlayer, posX + i, posY + j, posZ + k)) { + if (silkTouch && block + .canSilkHarvest(par2World, par3EntityPlayer, posX + i, posY + j, posZ + k, meta)) { dropMultiset.add(new ItemType(block, meta)); } else { - ArrayList itemDropList = - block.getDrops(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl); + ArrayList itemDropList = block + .getDrops(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl); if (itemDropList != null) { for (ItemStack stack : itemDropList) @@ -231,18 +235,12 @@ public class BoundAxe extends ItemAxe implements IBindable { * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise * the damage on the stack. */ - public boolean hitEntity( - ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) { + public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, + EntityLivingBase par3EntityLivingBase) { return getActivated(par1ItemStack); } - public boolean onBlockDestroyed( - ItemStack par1ItemStack, - World par2World, - Block par3, - int par4, - int par5, - int par6, + public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, Block par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase) { return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java index fb6d2b75..af8fd990 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java @@ -1,15 +1,8 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.common.ItemType; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import com.google.common.collect.HashMultiset; -import com.google.common.collect.Multiset; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.enchantment.EnchantmentHelper; @@ -26,7 +19,19 @@ import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; +import WayofTime.alchemicalWizardry.common.ItemType; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + +import com.google.common.collect.HashMultiset; +import com.google.common.collect.Multiset; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BoundPickaxe extends ItemPickaxe implements IBindable { + public float efficiencyOnProperMaterial = 12.0F; public float damageVsEntity; @@ -69,8 +74,9 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable { } if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } } @@ -145,13 +151,12 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable { float str = func_150893_a(par1ItemStack, block); if (str > 1.1f && par2World.canMineBlock(par3EntityPlayer, posX + i, posY + j, posZ + k)) { - if (silkTouch - && block.canSilkHarvest( - par2World, par3EntityPlayer, posX + i, posY + j, posZ + k, meta)) { + if (silkTouch && block + .canSilkHarvest(par2World, par3EntityPlayer, posX + i, posY + j, posZ + k, meta)) { dropMultiset.add(new ItemType(block, meta)); } else { - ArrayList itemDropList = - block.getDrops(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl); + ArrayList itemDropList = block + .getDrops(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl); if (itemDropList != null) { for (ItemStack stack : itemDropList) @@ -237,7 +242,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable { */ @Override public float func_150893_a(ItemStack par1ItemStack, Block par2Block) // getStrVsBlock - { + { if (!getActivated(par1ItemStack)) { return 0.0F; } @@ -249,19 +254,13 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable { * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise * the damage on the stack. */ - public boolean hitEntity( - ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) { + public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, + EntityLivingBase par3EntityLivingBase) { return getActivated(par1ItemStack); } @Override - public boolean onBlockDestroyed( - ItemStack par1ItemStack, - World par2World, - Block par3, - int par4, - int par5, - int par6, + public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, Block par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase) { if (par7EntityLivingBase instanceof EntityPlayer) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java index 0efafac7..832fa448 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java @@ -1,15 +1,8 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.common.ItemType; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import com.google.common.collect.HashMultiset; -import com.google.common.collect.Multimap; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.enchantment.EnchantmentHelper; @@ -27,7 +20,19 @@ import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; +import WayofTime.alchemicalWizardry.common.ItemType; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + +import com.google.common.collect.HashMultiset; +import com.google.common.collect.Multimap; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BoundShovel extends ItemSpade implements IBindable { + public float efficiencyOnProperMaterial = 12.0F; public float damageVsEntity; @@ -69,8 +74,9 @@ public class BoundShovel extends ItemSpade implements IBindable { } if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } } @@ -145,13 +151,12 @@ public class BoundShovel extends ItemSpade implements IBindable { float str = func_150893_a(par1ItemStack, block); if (str > 1.1f && par2World.canMineBlock(par3EntityPlayer, posX + i, posY + j, posZ + k)) { - if (silkTouch - && block.canSilkHarvest( - par2World, par3EntityPlayer, posX + i, posY + j, posZ + k, meta)) { + if (silkTouch && block + .canSilkHarvest(par2World, par3EntityPlayer, posX + i, posY + j, posZ + k, meta)) { dropMultiset.add(new ItemType(block, meta)); } else { - ArrayList itemDropList = - block.getDrops(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl); + ArrayList itemDropList = block + .getDrops(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl); if (itemDropList != null) { for (ItemStack stack : itemDropList) @@ -231,18 +236,12 @@ public class BoundShovel extends ItemSpade implements IBindable { * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise * the damage on the stack. */ - public boolean hitEntity( - ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) { + public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, + EntityLivingBase par3EntityLivingBase) { return getActivated(par1ItemStack); } - public boolean onBlockDestroyed( - ItemStack par1ItemStack, - World par2World, - int par3, - int par4, - int par5, - int par6, + public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase) { return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/CheatyItem.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/CheatyItem.java index c0b2171a..f3d6e069 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/CheatyItem.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/CheatyItem.java @@ -1,13 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -18,7 +12,16 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.FakePlayer; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; +import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class CheatyItem extends Item implements IBindable { + public CheatyItem() { super(); setMaxStackSize(1); @@ -38,8 +41,9 @@ public class CheatyItem extends Item implements IBindable { par3List.add(StatCollector.translateToLocal("tooltip.cheatyitem.desc2")); if (!(par1ItemStack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } @@ -63,7 +67,16 @@ public class CheatyItem extends Item implements IBindable { 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); SpellHelper.sendIndexedParticleToAllAround( - world, posX, posY, posZ, 20, world.provider.dimensionId, 4, posX, posY, posZ); + world, + posX, + posY, + posZ, + 20, + world.provider.dimensionId, + 4, + posX, + posY, + posZ); } if (par3EntityPlayer.worldObj.isRemote) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java index 30fd3ce9..7d5a50b8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java @@ -1,10 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.event.SacrificeKnifeUsedEvent; -import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; -import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -15,7 +10,14 @@ import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.FakePlayer; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.event.SacrificeKnifeUsedEvent; +import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; +import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class CreativeDagger extends Item { + public CreativeDagger() { super(); setTextureName("AlchemicalWizardry:SacrificialDagger"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java index 57f27a73..50949e5b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java @@ -1,14 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; -import WayofTime.alchemicalWizardry.common.IDemon; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import com.google.common.collect.Multimap; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -24,7 +17,19 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; +import WayofTime.alchemicalWizardry.common.IDemon; +import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + +import com.google.common.collect.Multimap; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class DaggerOfSacrifice extends EnergyItems { + public DaggerOfSacrifice() { super(); this.maxStackSize = 1; @@ -41,14 +46,12 @@ public class DaggerOfSacrifice extends EnergyItems { } @Override - public boolean hitEntity( - ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) { - if (par3EntityLivingBase == null - || par2EntityLivingBase == null + public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, + EntityLivingBase par3EntityLivingBase) { + if (par3EntityLivingBase == null || par2EntityLivingBase == null || par3EntityLivingBase.worldObj.isRemote - || (par3EntityLivingBase instanceof EntityPlayer - && SpellHelper.isFakePlayer( - par3EntityLivingBase.worldObj, (EntityPlayer) par3EntityLivingBase))) { + || (par3EntityLivingBase instanceof EntityPlayer && SpellHelper + .isFakePlayer(par3EntityLivingBase.worldObj, (EntityPlayer) par3EntityLivingBase))) { return false; } @@ -56,8 +59,7 @@ public class DaggerOfSacrifice extends EnergyItems { return false; } - if (par2EntityLivingBase.isChild() - || par2EntityLivingBase instanceof EntityPlayer + if (par2EntityLivingBase.isChild() || par2EntityLivingBase instanceof EntityPlayer || par2EntityLivingBase instanceof IBossDisplayData) { return false; } @@ -84,7 +86,16 @@ public class DaggerOfSacrifice extends EnergyItems { for (int i = 0; i < 8; i++) { SpellHelper.sendIndexedParticleToAllAround( - world, posX, posY, posZ, 20, world.provider.dimensionId, 1, posX, posY, posZ); + world, + posX, + posY, + posZ, + 20, + world.provider.dimensionId, + 1, + posX, + posY, + posZ); } par2EntityLivingBase.setHealth(-1); @@ -110,13 +121,10 @@ public class DaggerOfSacrifice extends EnergyItems { return 15.0F; } else { Material material = par2Block.getMaterial(); - return material != Material.plants - && material != Material.vine - && material != Material.coral - && material != Material.leaves - && material != Material.gourd - ? 1.0F - : 1.5F; + return material != Material.plants && material != Material.vine + && material != Material.coral + && material != Material.leaves + && material != Material.gourd ? 1.0F : 1.5F; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java index 2bdf9b65..b1b716e3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.items; +import net.minecraft.client.renderer.texture.IIconRegister; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class DawnScribeTool extends ScribeTool { + public DawnScribeTool() { super(6); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java index c741590c..ccc5da98 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java @@ -1,11 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -25,7 +21,14 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class DemonPlacer extends Item { + public DemonPlacer() { super(); this.setHasSubtypes(true); @@ -35,10 +38,9 @@ public class DemonPlacer extends Item { @SideOnly(Side.CLIENT) public int getColorFromItemStack(ItemStack par1ItemStack, int par2) { - EntityEggInfo entityegginfo = - (EntityEggInfo) EntityList.entityEggs.get(Integer.valueOf(par1ItemStack.getItemDamage())); - return entityegginfo != null - ? (par2 == 0 ? entityegginfo.primaryColor : entityegginfo.secondaryColor) + EntityEggInfo entityegginfo = (EntityEggInfo) EntityList.entityEggs + .get(Integer.valueOf(par1ItemStack.getItemDamage())); + return entityegginfo != null ? (par2 == 0 ? entityegginfo.primaryColor : entityegginfo.secondaryColor) : 16777215; } @@ -46,17 +48,8 @@ public class DemonPlacer extends Item { * Callback for item usage. If the item does something special on right clicking, he will have one of those. Return * True if something happen and false if it don't. This is for ITEMS, not BLOCKS */ - public boolean onItemUse( - ItemStack par1ItemStack, - EntityPlayer par2EntityPlayer, - World par3World, - int par4, - int par5, - int par6, - int par7, - float par8, - float par9, - float par10) { + public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, + int par5, int par6, int par7, float par8, float par9, float par10) { if (par3World.isRemote) { return true; } else { @@ -100,8 +93,8 @@ public class DemonPlacer extends Item { if (par2World.isRemote) { return par1ItemStack; } else { - MovingObjectPosition movingobjectposition = - this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, true); + MovingObjectPosition movingobjectposition = this + .getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, true); if (movingobjectposition == null) { return par1ItemStack; @@ -121,8 +114,13 @@ public class DemonPlacer extends Item { if (par2World.getBlock(i, j, k).getMaterial() == Material.water) { String demonName = DemonPlacer.getDemonString(par1ItemStack); - Entity entity = - spawnCreature(par2World, demonName, (double) i, (double) j, (double) k, par1ItemStack); + Entity entity = spawnCreature( + par2World, + demonName, + (double) i, + (double) j, + (double) k, + par1ItemStack); if (entity != null) { if (entity instanceof EntityLivingBase && par1ItemStack.hasDisplayName()) { @@ -145,8 +143,8 @@ public class DemonPlacer extends Item { * Spawns the creature specified by the egg's type in the location specified by the last three parameters. * Parameters: world, entityID, x, y, z. */ - public static Entity spawnCreature( - World par0World, String par1, double par2, double par4, double par6, ItemStack itemStack) { + public static Entity spawnCreature(World par0World, String par1, double par2, double par4, double par6, + ItemStack itemStack) { Entity entity = null; for (int j = 0; j < 1; ++j) { @@ -155,14 +153,17 @@ public class DemonPlacer extends Item { if (entity != null && entity instanceof EntityLivingBase) { EntityLiving entityliving = (EntityLiving) entity; entity.setLocationAndAngles( - par2, par4, par6, MathHelper.wrapAngleTo180_float(par0World.rand.nextFloat() * 360.0F), 0.0F); + par2, + par4, + par6, + MathHelper.wrapAngleTo180_float(par0World.rand.nextFloat() * 360.0F), + 0.0F); entityliving.rotationYawHead = entityliving.rotationYaw; entityliving.renderYawOffset = entityliving.rotationYaw; if (entityliving instanceof EntityDemon) { Entity owner = SpellHelper.getPlayerForUsername(DemonPlacer.getOwnerName(itemStack)); if (owner != null) { - ((EntityDemon) entityliving) - .func_152115_b(owner.getPersistentID().toString()); + ((EntityDemon) entityliving).func_152115_b(owner.getPersistentID().toString()); if (!DemonPlacer.getOwnerName(itemStack).equals("")) { ((EntityDemon) entityliving).setTamed(true); @@ -215,8 +216,9 @@ public class DemonPlacer extends Item { if (!(par1ItemStack.getTagCompound() == null)) { if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.demonsowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.demonsowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonicTelepositionFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonicTelepositionFocus.java index 9d5d75f3..99ee30ef 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonicTelepositionFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonicTelepositionFocus.java @@ -1,15 +1,18 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class DemonicTelepositionFocus extends TelepositionFocus { + public DemonicTelepositionFocus() { super(4); } @@ -29,12 +32,18 @@ public class DemonicTelepositionFocus extends TelepositionFocus { NBTTagCompound itemTag = par1ItemStack.getTagCompound(); if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + itemTag.getInteger("xCoord") - + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord")); + par3List.add( + StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + + itemTag.getInteger("xCoord") + + ", " + + itemTag.getInteger("yCoord") + + ", " + + itemTag.getInteger("zCoord")); par3List.add( StatCollector.translateToLocal("tooltip.alchemy.dimension") + " " + getDimensionID(par1ItemStack)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java index 0c6b507e..ce30af3d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.items; +import net.minecraft.client.renderer.texture.IIconRegister; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class DuskScribeTool extends ScribeTool { + public DuskScribeTool() { super(5); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java index 984fbd28..6691c070 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.items; +import net.minecraft.client.renderer.texture.IIconRegister; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class EarthScribeTool extends ScribeTool { + public EarthScribeTool() { super(3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java index 06d0294b..c9bbd245 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java @@ -1,5 +1,16 @@ package WayofTime.alchemicalWizardry.common.items; +import java.util.List; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.server.MinecraftServer; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; @@ -9,17 +20,9 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import java.util.List; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBloodOrb { + private int maxEssence; protected int orbLevel; @@ -41,8 +44,9 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { par3List.add(StatCollector.translateToLocal("tooltip.energybattery.desc")); if (!(par1ItemStack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } @@ -65,7 +69,16 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); SpellHelper.sendIndexedParticleToAllAround( - world, posX, posY, posZ, 20, world.provider.dimensionId, 4, posX, posY, posZ); + world, + posX, + posY, + posZ, + 20, + world.provider.dimensionId, + 4, + posX, + posY, + posZ); } NBTTagCompound itemTag = par1ItemStack.getTagCompound(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java index 197a3bb9..21ca452f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java @@ -1,10 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaMainProjectile; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -15,7 +12,13 @@ import net.minecraft.util.StatCollector; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaMainProjectile; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class EnergyBazooka extends EnergyItems { + @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -107,8 +110,7 @@ public class EnergyBazooka extends EnergyItems { } if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); - par1ItemStack - .getTagCompound() + par1ItemStack.getTagCompound() .setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % maxDelayAfterActivation); return par1ItemStack; } @@ -184,7 +186,7 @@ public class EnergyBazooka extends EnergyItems { break; } if (par2World.getWorldTime() % maxDelayAfterActivation - == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") + == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) { if (!par3EntityPlayer.capabilities.isCreativeMode) { if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, lpPerActivation)) { @@ -198,7 +200,7 @@ public class EnergyBazooka extends EnergyItems { @Override @SideOnly(Side.CLIENT) - @SuppressWarnings({"unchecked", "rawtypes"}) + @SuppressWarnings({ "unchecked", "rawtypes" }) public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { par3List.add(StatCollector.translateToLocal("tooltip.energybazooka.desc")); par3List.add(StatCollector.translateToLocal("tooltip.alchemy.damage") + " " + this.damage); @@ -209,8 +211,9 @@ public class EnergyBazooka extends EnergyItems { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); } if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlast.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlast.java index 18b6d99a..d9b6b5cc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlast.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlast.java @@ -1,10 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -14,7 +11,13 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class EnergyBlast extends EnergyItems { + @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -108,8 +111,7 @@ public class EnergyBlast extends EnergyItems { } if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); - par1ItemStack - .getTagCompound() + par1ItemStack.getTagCompound() .setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % maxDelayAfterActivation); return par1ItemStack; } @@ -170,7 +172,7 @@ public class EnergyBlast extends EnergyItems { break; } if (par2World.getWorldTime() % maxDelayAfterActivation - == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") + == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) { if (!par3EntityPlayer.capabilities.isCreativeMode) { if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, lpPerActivation)) { @@ -184,7 +186,7 @@ public class EnergyBlast extends EnergyItems { @Override @SideOnly(Side.CLIENT) - @SuppressWarnings({"unchecked", "rawtypes"}) + @SuppressWarnings({ "unchecked", "rawtypes" }) public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { par3List.add(StatCollector.translateToLocal("tooltip.energyblast.desc1")); par3List.add(StatCollector.translateToLocal("tooltip.energyblast.desc2")); @@ -196,8 +198,9 @@ public class EnergyBlast extends EnergyItems { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); } if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java index 0b559bb9..d6b6de55 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java @@ -1,10 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -13,7 +8,14 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; +import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class EnergyItems extends Item implements IBindable { + private int energyUsed; public EnergyItems() { @@ -77,7 +79,16 @@ public class EnergyItems extends Item implements IBindable { double posZ = player.posZ; SpellHelper.sendIndexedParticleToAllAround( - world, posX, posY, posZ, 20, world.provider.dimensionId, 4, posX, posY, posZ); + world, + posX, + posY, + posZ, + 20, + world.provider.dimensionId, + 4, + posX, + posY, + posZ); world.playSoundEffect( (double) ((float) player.posX + 0.5F), (double) ((float) player.posY + 0.5F), @@ -92,8 +103,7 @@ public class EnergyItems extends Item implements IBindable { @Deprecated public static boolean syphonWhileInContainer(ItemStack ist, int damageToBeDone) { - if (ist.getTagCompound() != null - && !(ist.getTagCompound().getString("ownerName").equals(""))) { + if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) { String ownerName = ist.getTagCompound().getString("ownerName"); if (MinecraftServer.getServer() == null) { @@ -119,8 +129,7 @@ public class EnergyItems extends Item implements IBindable { } public static boolean canSyphonInContainer(ItemStack ist, int damageToBeDone) { - if (ist.getTagCompound() != null - && !(ist.getTagCompound().getString("ownerName").equals(""))) { + if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) { String ownerName = ist.getTagCompound().getString("ownerName"); if (MinecraftServer.getServer() == null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergySword.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergySword.java index 3ca7b742..92207166 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergySword.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergySword.java @@ -1,11 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; -import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -22,7 +18,14 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; +import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class EnergySword extends ItemSword { + @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -91,12 +94,11 @@ public class EnergySword extends ItemSword { } @Override - public boolean hitEntity( - ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) { + public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, + EntityLivingBase par3EntityLivingBase) { if (par3EntityLivingBase instanceof EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, (EntityPlayer) par3EntityLivingBase) - || !EnergyItems.syphonBatteries( - par1ItemStack, (EntityPlayer) par3EntityLivingBase, this.getEnergyUsed())) { + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, (EntityPlayer) par3EntityLivingBase) || !EnergyItems + .syphonBatteries(par1ItemStack, (EntityPlayer) par3EntityLivingBase, this.getEnergyUsed())) { return false; } } @@ -187,8 +189,9 @@ public class EnergySword extends ItemSword { } if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } } @@ -199,13 +202,10 @@ public class EnergySword extends ItemSword { return 15.0F; } else { Material material = par2Block.getMaterial(); - return material != Material.plants - && material != Material.vine - && material != Material.coral - && material != Material.leaves - && material != Material.gourd - ? 1.0F - : 1.5F; + return material != Material.plants && material != Material.vine + && material != Material.coral + && material != Material.leaves + && material != Material.gourd ? 1.0F : 1.5F; } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnhancedTelepositionFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnhancedTelepositionFocus.java index 8e3a1934..cfd5943e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnhancedTelepositionFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnhancedTelepositionFocus.java @@ -1,15 +1,18 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class EnhancedTelepositionFocus extends TelepositionFocus { + public EnhancedTelepositionFocus() { super(2); } @@ -28,12 +31,18 @@ public class EnhancedTelepositionFocus extends TelepositionFocus { NBTTagCompound itemTag = par1ItemStack.getTagCompound(); if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + itemTag.getInteger("xCoord") - + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord")); + par3List.add( + StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + + itemTag.getInteger("xCoord") + + ", " + + itemTag.getInteger("yCoord") + + ", " + + itemTag.getInteger("zCoord")); par3List.add( StatCollector.translateToLocal("tooltip.alchemy.dimension") + " " + getDimensionID(par1ItemStack)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/FireScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/FireScribeTool.java index 7c624ff7..dfd59cd0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/FireScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/FireScribeTool.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.items; +import net.minecraft.client.renderer.texture.IIconRegister; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class FireScribeTool extends ScribeTool { + public FireScribeTool() { super(2); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java index b793d306..b9357dda 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java @@ -1,10 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -15,20 +12,18 @@ import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.util.StatCollector; import net.minecraft.world.World; + import org.lwjgl.input.Keyboard; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ItemAlchemyBase extends Item { - private static final String[] ITEM_NAMES = new String[] { - "Offensa", - "Praesidium", - "OrbisTerrae", - "StrengthenedCatalyst", - "ConcentratedCatalyst", - "FracturedBone", - "Virtus", - "Reductus", - "Potentia" - }; + + private static final String[] ITEM_NAMES = new String[] { "Offensa", "Praesidium", "OrbisTerrae", + "StrengthenedCatalyst", "ConcentratedCatalyst", "FracturedBone", "Virtus", "Reductus", "Potentia" }; @SideOnly(Side.CLIENT) private IIcon[] icons; @@ -67,9 +62,15 @@ public class ItemAlchemyBase extends Item { } } } else { - par3List.add("-" + StatCollector.translateToLocal("tooltip.alchemy.press") + " " + EnumChatFormatting.BLUE - + StatCollector.translateToLocal("tooltip.alchemy.shift") + EnumChatFormatting.GRAY + " " - + StatCollector.translateToLocal("tooltip.alchemy.forrecipe") + "-"); + par3List.add( + "-" + StatCollector.translateToLocal("tooltip.alchemy.press") + + " " + + EnumChatFormatting.BLUE + + StatCollector.translateToLocal("tooltip.alchemy.shift") + + EnumChatFormatting.GRAY + + " " + + StatCollector.translateToLocal("tooltip.alchemy.forrecipe") + + "-"); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java index 1b0c88f1..fba23158 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java @@ -1,8 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; @@ -13,7 +12,11 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; + public class ItemBlockCrystalBelljar extends ItemBlock { + public ItemBlockCrystalBelljar(Block par1) { super(par1); this.setHasSubtypes(true); @@ -57,26 +60,21 @@ public class ItemBlockCrystalBelljar extends ItemBlock { list.add("- Empty"); } else { ReagentStack reagentStack = tanks[i].getReagent(); - list.add("- " + reagentStack.reagent.name + ": " + reagentStack.amount + "/" - + tanks[i].getCapacity() / 1000 + "k AR"); + list.add( + "- " + reagentStack.reagent.name + + ": " + + reagentStack.amount + + "/" + + tanks[i].getCapacity() / 1000 + + "k AR"); } } } } @Override - public boolean placeBlockAt( - ItemStack stack, - EntityPlayer player, - World world, - int x, - int y, - int z, - int side, - float hitX, - float hitY, - float hitZ, - int metadata) { + public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, + float hitX, float hitY, float hitZ, int metadata) { if (!world.setBlock(x, y, z, field_150939_a, metadata, 3)) { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java index b779c855..f6bab41d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java @@ -1,13 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.IAltarManipulator; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -20,7 +14,16 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.IAltarManipulator; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAltarManipulator { + @SideOnly(Side.CLIENT) private IIcon plateIcon; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java index 289c28da..3f22a75a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java @@ -5,6 +5,7 @@ import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; public class ItemBloodRuneBlock extends ItemBlock { + public ItemBloodRuneBlock(Block block) { super(block); setHasSubtypes(true); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java index 10b3f06f..e9312645 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java @@ -1,10 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -14,7 +11,13 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ItemComplexSpellCrystal extends EnergyItems { + public ItemComplexSpellCrystal() { super(); this.setMaxStackSize(1); @@ -35,12 +38,18 @@ public class ItemComplexSpellCrystal extends EnergyItems { NBTTagCompound itemTag = par1ItemStack.getTagCompound(); if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + itemTag.getInteger("xCoord") - + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord")); + par3List.add( + StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + + itemTag.getInteger("xCoord") + + ", " + + itemTag.getInteger("yCoord") + + ", " + + itemTag.getInteger("zCoord")); par3List.add( StatCollector.translateToLocal("tooltip.alchemy.dimension") + " " + getDimensionID(par1ItemStack)); } @@ -58,7 +67,9 @@ public class ItemComplexSpellCrystal extends EnergyItems { if (world != null) { NBTTagCompound itemTag = par1ItemStack.getTagCompound(); TileEntity tileEntity = world.getTileEntity( - itemTag.getInteger("xCoord"), itemTag.getInteger("yCoord"), itemTag.getInteger("zCoord")); + itemTag.getInteger("xCoord"), + itemTag.getInteger("yCoord"), + itemTag.getInteger("zCoord")); if (tileEntity instanceof TESpellParadigmBlock) { TESpellParadigmBlock tileParad = (TESpellParadigmBlock) tileEntity; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java index cf097efc..d11ca0a4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java @@ -1,9 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -13,42 +11,18 @@ import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ItemComponents extends Item { - private static final String[] ITEM_NAMES = new String[] { - "QuartzRod", - "EmptyCore", - "MagicalesCable", - "WoodBrace", - "StoneBrace", - "ProjectileCore", - "SelfCore", - "MeleeCore", - "ParadigmBackPlate", - "OutputCable", - "FlameCore", - "IcyCore", - "GustCore", - "EarthenCore", - "InputCable", - "CrackedRunicPlate", - "RunicPlate", - "ScribedRunicPlate", - "DefaultCore", - "OffensiveCore", - "DefensiveCore", - "EnvironmentalCore", - "PowerCore", - "CostCore", - "PotencyCore", - "ObsidianBrace", - "ToolCore", - "EtherealSlate", - "LifeShard", - "SoulShard", - "SoulRunicPlate", - "LifeBrace", - "EnderShard" - }; + + private static final String[] ITEM_NAMES = new String[] { "QuartzRod", "EmptyCore", "MagicalesCable", "WoodBrace", + "StoneBrace", "ProjectileCore", "SelfCore", "MeleeCore", "ParadigmBackPlate", "OutputCable", "FlameCore", + "IcyCore", "GustCore", "EarthenCore", "InputCable", "CrackedRunicPlate", "RunicPlate", "ScribedRunicPlate", + "DefaultCore", "OffensiveCore", "DefensiveCore", "EnvironmentalCore", "PowerCore", "CostCore", + "PotencyCore", "ObsidianBrace", "ToolCore", "EtherealSlate", "LifeShard", "SoulShard", "SoulRunicPlate", + "LifeBrace", "EnderShard" }; @SideOnly(Side.CLIENT) private IIcon[] icons; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemCrystalBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemCrystalBlock.java index 4c071531..2707efd8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemCrystalBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemCrystalBlock.java @@ -5,6 +5,7 @@ import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; public class ItemCrystalBlock extends ItemBlock { + public ItemCrystalBlock(Block par1) { super(par1); setHasSubtypes(true); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java index 0c60ccc6..4e07e46b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java @@ -1,12 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -17,7 +12,15 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.FakePlayer; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ItemDiabloKey extends EnergyItems { + public ItemDiabloKey() { super(); setMaxStackSize(1); @@ -36,8 +39,9 @@ public class ItemDiabloKey extends EnergyItems { public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { par3List.add(StatCollector.translateToLocal("tooltip.diablokey.desc")); if (!(par1ItemStack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } @@ -60,7 +64,16 @@ public class ItemDiabloKey extends EnergyItems { 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); SpellHelper.sendIndexedParticleToAllAround( - world, posX, posY, posZ, 20, world.provider.dimensionId, 4, posX, posY, posZ); + world, + posX, + posY, + posZ, + 20, + world.provider.dimensionId, + 4, + posX, + posY, + posZ); } if (par3EntityPlayer.worldObj.isRemote) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemEnchantmentGlyphBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemEnchantmentGlyphBlock.java index 6467e769..2eed72ff 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemEnchantmentGlyphBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemEnchantmentGlyphBlock.java @@ -5,6 +5,7 @@ import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; public class ItemEnchantmentGlyphBlock extends ItemBlock { + public ItemEnchantmentGlyphBlock(Block block) { super(block); setHasSubtypes(true); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java index cd936061..2a38bf21 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java @@ -1,13 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; -import WayofTime.alchemicalWizardry.api.sacrifice.IIncense; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -20,8 +14,17 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.StatCollector; import net.minecraftforge.oredict.OreDictionary; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; +import WayofTime.alchemicalWizardry.api.sacrifice.IIncense; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ItemIncense extends Item implements IIncense { - private static final String[] ITEM_NAMES = new String[] {"Woodash", "Byrrus", "Livens", "Viridis", "Purpura"}; + + private static final String[] ITEM_NAMES = new String[] { "Woodash", "Byrrus", "Livens", "Viridis", "Purpura" }; @SideOnly(Side.CLIENT) private IIcon[] icons; @@ -144,49 +147,54 @@ public class ItemIncense extends Item implements IIncense { ItemStack woodashStack = new ItemStack(ModItems.itemIncense, 1, 0); GameRegistry.addRecipe(woodashStack, "WWW", "WCW", "WWW", 'W', woodStack, 'C', charcoalStack); // WOODASH - GameRegistry.addRecipe(new ShapelessBloodOrbRecipe( - new ItemStack(ModItems.itemIncense, 1, 1), - woodashStack, - "dyeRed", - "dyeRed", - new ItemStack(Items.redstone), - leavesStack, - leavesStack, - new ItemStack(ModItems.apprenticeBloodOrb))); - GameRegistry.addRecipe(new ShapelessBloodOrbRecipe( - new ItemStack(ModItems.itemIncense, 1, 2), - woodashStack, - "dyeBlue", - "dyeBlue", - goldNuggetStack, - goldNuggetStack, - glowstoneStack, - stringStack, - stringStack, - new ItemStack(ModItems.magicianBloodOrb))); - GameRegistry.addRecipe(new ShapelessBloodOrbRecipe( - new ItemStack(ModItems.itemIncense, 1, 3), - woodashStack, - "dyeGreen", - "dyeGreen", - soulSandStack, - gunpowderStack, - fermentedEyeStack, - new ItemStack(ModItems.masterBloodOrb))); - GameRegistry.addRecipe(new ShapelessBloodOrbRecipe( - new ItemStack(ModItems.itemIncense, 1, 4), - woodashStack, - "dyePurple", - "dyePurple", - quartzStack, - netherwartStack, - blazePowderStack, - fracturedBoneStack, - goldNuggetStack, - new ItemStack(ModItems.archmageBloodOrb))); + GameRegistry.addRecipe( + new ShapelessBloodOrbRecipe( + new ItemStack(ModItems.itemIncense, 1, 1), + woodashStack, + "dyeRed", + "dyeRed", + new ItemStack(Items.redstone), + leavesStack, + leavesStack, + new ItemStack(ModItems.apprenticeBloodOrb))); + GameRegistry.addRecipe( + new ShapelessBloodOrbRecipe( + new ItemStack(ModItems.itemIncense, 1, 2), + woodashStack, + "dyeBlue", + "dyeBlue", + goldNuggetStack, + goldNuggetStack, + glowstoneStack, + stringStack, + stringStack, + new ItemStack(ModItems.magicianBloodOrb))); + GameRegistry.addRecipe( + new ShapelessBloodOrbRecipe( + new ItemStack(ModItems.itemIncense, 1, 3), + woodashStack, + "dyeGreen", + "dyeGreen", + soulSandStack, + gunpowderStack, + fermentedEyeStack, + new ItemStack(ModItems.masterBloodOrb))); + GameRegistry.addRecipe( + new ShapelessBloodOrbRecipe( + new ItemStack(ModItems.itemIncense, 1, 4), + woodashStack, + "dyePurple", + "dyePurple", + quartzStack, + netherwartStack, + blazePowderStack, + fracturedBoneStack, + goldNuggetStack, + new ItemStack(ModItems.archmageBloodOrb))); } public enum EnumIncense { + WOODASH(0, 200, 1.0f, 1000, 0.937f, 0.898f, 0.820f), RED(200, 600, 1.5f, 1000, 1.0f, 0, 0), BLUE(600, 1200, 3.0f, 1000, 0, 0, 1.0f), diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java index b919fbeb..8df5f9f5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java @@ -1,16 +1,18 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.mob.MailOrderEntityItem; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.mob.MailOrderEntityItem; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ItemMailOrderCatalogue extends Item { + public ItemMailOrderCatalogue() { super(); this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java index b14e7152..680ab5a0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java @@ -1,5 +1,15 @@ package WayofTime.alchemicalWizardry.common.items; +import java.util.List; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; @@ -8,16 +18,9 @@ import WayofTime.alchemicalWizardry.common.block.RitualStone; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import java.util.List; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; public class ItemRitualDismantler extends EnergyItems { + public ItemRitualDismantler() { super(); setMaxStackSize(1); @@ -33,29 +36,20 @@ public class ItemRitualDismantler extends EnergyItems { @Override public void addInformation(ItemStack stack, EntityPlayer player, List par3List, boolean x) { par3List.add(StatCollector.translateToLocal("tooltip.dismatler.desc")); - if (stack.hasTagCompound()) - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + stack.getTagCompound().getString("ownerName")); + if (stack.hasTagCompound()) par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + stack.getTagCompound().getString("ownerName")); } @Override - public boolean onItemUse( - ItemStack stack, - EntityPlayer player, - World world, - int x, - int y, - int z, - int par7, - float par8, - float par9, - float par10) { + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, + float par8, float par9, float par10) { return EnergyItems.checkAndSetItemOwner(stack, player) && breakRitualStoneAtMasterStone(stack, player, world, x, y, z); } - public boolean breakRitualStoneAtMasterStone( - ItemStack stack, EntityPlayer player, World world, int x, int y, int z) { + public boolean breakRitualStoneAtMasterStone(ItemStack stack, EntityPlayer player, World world, int x, int y, + int z) { TileEntity tileEntity = world.getTileEntity(x, y, z); if (tileEntity instanceof TEMasterStone) { @@ -69,14 +63,19 @@ public class ItemRitualDismantler extends EnergyItems { } for (RitualComponent rc : ritualList) { - if (!world.isAirBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)) - && world.getBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)) - instanceof RitualStone) { + if (!world.isAirBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)) && world.getBlock( + x + rc.getX(direction), + y + rc.getY(), + z + rc.getZ(direction)) instanceof RitualStone) { if (EnergyItems.syphonBatteries(stack, player, getEnergyUsed()) || player.capabilities.isCreativeMode) { world.setBlockToAir(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)); EntityItem entityItem = new EntityItem( - world, player.posX, player.posY, player.posZ, new ItemStack(ModBlocks.ritualStone)); + world, + player.posX, + player.posY, + player.posZ, + new ItemStack(ModBlocks.ritualStone)); if (world.isRemote) { world.playAuxSFX(2005, x, y + 1, z, 0); } else { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java index 66ea9fca..0e4d20b1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java @@ -1,17 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.api.items.interfaces.IRitualDiviner; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.IRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.Rituals; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -27,9 +17,23 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; import net.minecraft.util.StatCollector; import net.minecraft.world.World; + import org.lwjgl.input.Keyboard; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.api.items.interfaces.IRitualDiviner; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.IRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.Rituals; +import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner { + private int maxMetaData; public ItemRitualDiviner() { @@ -60,8 +64,9 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner { par3List.add(StatCollector.translateToLocal("tooltip.ritualdiviner.cannotplace")); } - par3List.add(StatCollector.translateToLocal("tooltip.ritualdiviner.ritualtunedto") + " " - + this.getNameForDirection(this.getDirection(stack))); + par3List.add( + StatCollector.translateToLocal("tooltip.ritualdiviner.ritualtunedto") + " " + + this.getNameForDirection(this.getDirection(stack))); boolean sneaking = Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT); @@ -69,8 +74,9 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner { if (!(stack.getTagCompound() == null)) { String ritualID = this.getCurrentRitual(stack); // TODO - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + stack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + stack.getTagCompound().getString("ownerName")); par3List.add(StatCollector.translateToLocal("tooltip.alchemy.ritualid") + " " + ritualID); List ritualList = Rituals.getRitualList(this.getCurrentRitual(stack)); if (ritualList == null) { @@ -117,29 +123,54 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner { } } - int totalStones = - blankStones + airStones + waterStones + fireStones + earthStones + duskStones + dawnStones; + int totalStones = blankStones + airStones + + waterStones + + fireStones + + earthStones + + duskStones + + dawnStones; - par3List.add(EnumChatFormatting.WHITE - + StatCollector.translateToLocal("tooltip.ritualdiviner.blankstones") + " " + blankStones); - par3List.add(EnumChatFormatting.AQUA + StatCollector.translateToLocal("tooltip.ritualdiviner.airstones") - + " " + airStones); - par3List.add(EnumChatFormatting.BLUE - + StatCollector.translateToLocal("tooltip.ritualdiviner.waterstones") + " " + waterStones); - par3List.add(EnumChatFormatting.RED + StatCollector.translateToLocal("tooltip.ritualdiviner.firestones") - + " " + fireStones); - par3List.add(EnumChatFormatting.DARK_GREEN - + StatCollector.translateToLocal("tooltip.ritualdiviner.earthstones") + " " + earthStones); - par3List.add(EnumChatFormatting.DARK_PURPLE - + StatCollector.translateToLocal("tooltip.ritualdiviner.duskstones") + " " + duskStones); - par3List.add(EnumChatFormatting.GOLD - + StatCollector.translateToLocal("tooltip.ritualdiviner.dawnstones") + " " + dawnStones); - par3List.add(EnumChatFormatting.UNDERLINE - + StatCollector.translateToLocal("tooltip.ritualdiviner.totalStones") + " " + totalStones); + par3List.add( + EnumChatFormatting.WHITE + StatCollector.translateToLocal("tooltip.ritualdiviner.blankstones") + + " " + + blankStones); + par3List.add( + EnumChatFormatting.AQUA + StatCollector.translateToLocal("tooltip.ritualdiviner.airstones") + + " " + + airStones); + par3List.add( + EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.ritualdiviner.waterstones") + + " " + + waterStones); + par3List.add( + EnumChatFormatting.RED + StatCollector.translateToLocal("tooltip.ritualdiviner.firestones") + + " " + + fireStones); + par3List.add( + EnumChatFormatting.DARK_GREEN + + StatCollector.translateToLocal("tooltip.ritualdiviner.earthstones") + + " " + + earthStones); + par3List.add( + EnumChatFormatting.DARK_PURPLE + + StatCollector.translateToLocal("tooltip.ritualdiviner.duskstones") + + " " + + duskStones); + par3List.add( + EnumChatFormatting.GOLD + StatCollector.translateToLocal("tooltip.ritualdiviner.dawnstones") + + " " + + dawnStones); + par3List.add( + EnumChatFormatting.UNDERLINE + + StatCollector.translateToLocal("tooltip.ritualdiviner.totalStones") + + " " + + totalStones); } } else { - par3List.add(EnumChatFormatting.AQUA + "-" - + StatCollector.translateToLocal("tooltip.ritualdiviner.moreinfo") + "-"); + par3List.add( + EnumChatFormatting.AQUA + "-" + + StatCollector.translateToLocal("tooltip.ritualdiviner.moreinfo") + + "-"); } } @@ -150,48 +181,39 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner { if (ritualID.equals("")) { return super.getItemStackDisplayName(stack); } - return StatCollector.translateToLocalFormatted( - "bm.string.ritualDiviner", Rituals.getLocalizedNameOfRitual(ritualID)); + return StatCollector + .translateToLocalFormatted("bm.string.ritualDiviner", Rituals.getLocalizedNameOfRitual(ritualID)); } else { return super.getItemStackDisplayName(stack); } } @Override - public boolean onItemUse( - ItemStack stack, - EntityPlayer player, - World world, - int x, - int y, - int z, - int par7, - float par8, - float par9, - float par10) { + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, + float par8, float par9, float par10) { if (!EnergyItems.checkAndSetItemOwner(stack, player)) return false; if (placeRitualStoneAtMasterStone(stack, player, world, x, y, z)) { this.setStoredLocation(stack, new Int3(x, y, z)); return true; } else if (!(world.getBlock(x, y, z) instanceof IRitualStone - || world.getBlock(x, y, z) instanceof IMasterRitualStone) - && !player.isSneaking()) { - if (world.isRemote) { - return false; - } - this.cycleDirection(stack); - player.addChatComponentMessage( - new ChatComponentText(StatCollector.translateToLocal("tooltip.ritualdiviner.ritualtunedto") + " " - + this.getNameForDirection(this.getDirection(stack)))); - return true; - } + || world.getBlock(x, y, z) instanceof IMasterRitualStone) && !player.isSneaking()) { + if (world.isRemote) { + return false; + } + this.cycleDirection(stack); + player.addChatComponentMessage( + new ChatComponentText( + StatCollector.translateToLocal("tooltip.ritualdiviner.ritualtunedto") + " " + + this.getNameForDirection(this.getDirection(stack)))); + return true; + } return false; } - public boolean placeRitualStoneAtMasterStone( - ItemStack stack, EntityPlayer player, World world, int x, int y, int z) { + public boolean placeRitualStoneAtMasterStone(ItemStack stack, EntityPlayer player, World world, int x, int y, + int z) { int direction = this.getDirection(stack); ItemStack[] playerInventory = player.inventory.mainInventory; @@ -250,8 +272,8 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner { Block block = world.getBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)); if (block == ModBlocks.ritualStone) { - int metadata = - world.getBlockMetadata(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)); + int metadata = world + .getBlockMetadata(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)); if (metadata != rc.getStoneType()) { if (EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) { @@ -311,8 +333,8 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner { public void voidStoredLocation(ItemStack stack) { NBTTagCompound tag = stack.getTagCompound(); if (tag == null || !tag.hasKey("location")) { - // tag = new NBTTagCompound(); - // stack.setTagCompound(tag); + // tag = new NBTTagCompound(); + // stack.setTagCompound(tag); this.setStoredLocation(stack, new Int3(0, 0, 0)); return; } @@ -365,18 +387,18 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner { if (player.isSneaking()) { rotateRituals(player.worldObj, player, stack, false); } - // else - // { - // if (!player.worldObj.isRemote) - // { - // int direction = this.getDirection(stack) - 1; - // if (direction == 0) direction = 4; - // this.setDirection(stack, direction); - // player.addChatComponentMessage(new + // else + // { + // if (!player.worldObj.isRemote) + // { + // int direction = this.getDirection(stack) - 1; + // if (direction == 0) direction = 4; + // this.setDirection(stack, direction); + // player.addChatComponentMessage(new // ChatComponentText(StatCollector.translateToLocal("tooltip.ritualdiviner.ritualtunedto") + " " + // this.getNameForDirection(direction))); - // } - // } + // } + // } } } @@ -392,8 +414,8 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner { next ? Rituals.getNextRitualKey(currentRitualID) : Rituals.getPreviousRitualKey(currentRitualID)); if (world.isRemote) { - IChatComponent chatmessagecomponent = - new ChatComponentText(StatCollector.translateToLocal("message.ritual.currentritual") + " " + IChatComponent chatmessagecomponent = new ChatComponentText( + StatCollector.translateToLocal("message.ritual.currentritual") + " " + Rituals.getLocalizedNameOfRitual(this.getCurrentRitual(stack))); player.addChatComponentMessage(chatmessagecomponent); } @@ -418,9 +440,9 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner { } @Override - public int getMaxRuneDisplacement( - ItemStack stack) // 0 indicates the starting 4 runes, 1 indicates it can use Dusk runes - { + public int getMaxRuneDisplacement(ItemStack stack) // 0 indicates the starting 4 runes, 1 indicates it can use Dusk + // runes + { return stack.getItemDamage(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEffectBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEffectBlock.java index 89391527..5cf1a637 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEffectBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEffectBlock.java @@ -5,6 +5,7 @@ import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; public class ItemSpellEffectBlock extends ItemBlock { + public ItemSpellEffectBlock(Block par1) { super(par1); setHasSubtypes(true); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEnhancementBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEnhancementBlock.java index 3c466f0e..f782005e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEnhancementBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEnhancementBlock.java @@ -5,6 +5,7 @@ import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; public class ItemSpellEnhancementBlock extends ItemBlock { + public ItemSpellEnhancementBlock(Block par1) { super(par1); setHasSubtypes(true); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellModifierBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellModifierBlock.java index 01a34b7a..5fd5712d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellModifierBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellModifierBlock.java @@ -5,6 +5,7 @@ import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; public class ItemSpellModifierBlock extends ItemBlock { + public ItemSpellModifierBlock(Block par1) { super(par1); setHasSubtypes(true); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellParadigmBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellParadigmBlock.java index aa955d1f..e2a0a879 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellParadigmBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellParadigmBlock.java @@ -5,6 +5,7 @@ import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; public class ItemSpellParadigmBlock extends ItemBlock { + public ItemSpellParadigmBlock(Block par1) { super(par1); setHasSubtypes(true); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemStabilityGlyphBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemStabilityGlyphBlock.java index 01eea323..c42b930b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemStabilityGlyphBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemStabilityGlyphBlock.java @@ -5,6 +5,7 @@ import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; public class ItemStabilityGlyphBlock extends ItemBlock { + public ItemStabilityGlyphBlock(Block block) { super(block); setHasSubtypes(true); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java index dce7ec45..920d3831 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java @@ -1,10 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -14,7 +11,13 @@ import net.minecraft.world.World; import net.minecraft.world.WorldProvider; import net.minecraftforge.common.DimensionManager; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class LavaCrystal extends EnergyItems { + public LavaCrystal() { super(); setMaxStackSize(1); @@ -59,21 +62,21 @@ public class LavaCrystal extends EnergyItems { par3List.add(StatCollector.translateToLocal("tooltip.lavacrystal.desc2")); if (!(par1ItemStack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } public boolean hasEnoughEssence(ItemStack itemStack) { - if (itemStack.getTagCompound() != null - && !(itemStack.getTagCompound().getString("ownerName").equals(""))) { + if (itemStack.getTagCompound() != null && !(itemStack.getTagCompound().getString("ownerName").equals(""))) { String ownerName = itemStack.getTagCompound().getString("ownerName"); if (MinecraftServer.getServer() == null) { return false; } - // World world = MinecraftServer.getServer().worldServers[0]; + // World world = MinecraftServer.getServer().worldServers[0]; WorldProvider provider = DimensionManager.getProvider(0); if (provider == null || provider.worldObj == null) { return false; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/LifeBucket.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/LifeBucket.java index 8450fd0f..ba0b74e8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/LifeBucket.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/LifeBucket.java @@ -1,12 +1,14 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemBucket; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class LifeBucket extends ItemBucket { + public LifeBucket(Block block) { super(block); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/MagicianBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/MagicianBloodOrb.java index e83e0b96..8d6a08f1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/MagicianBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/MagicianBloodOrb.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.items; +import net.minecraft.client.renderer.texture.IIconRegister; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class MagicianBloodOrb extends EnergyBattery { + public MagicianBloodOrb(int damage) { super(damage); orbLevel = 3; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java index 681ce433..a696b37a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.items; +import net.minecraft.client.renderer.texture.IIconRegister; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class MasterBloodOrb extends EnergyBattery { + public MasterBloodOrb(int damage) { super(damage); orbLevel = 4; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java index a6a9030d..3f4aca3b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java @@ -1,14 +1,16 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class OrbOfTesting extends EnergyItems { + public OrbOfTesting() { super(); setMaxStackSize(1); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java index e41e8ce0..f28be15c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java @@ -1,15 +1,18 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ReinforcedTelepositionFocus extends TelepositionFocus { + public ReinforcedTelepositionFocus() { super(3); } @@ -29,12 +32,18 @@ public class ReinforcedTelepositionFocus extends TelepositionFocus { NBTTagCompound itemTag = par1ItemStack.getTagCompound(); if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + itemTag.getInteger("xCoord") - + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord")); + par3List.add( + StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + + itemTag.getInteger("xCoord") + + ", " + + itemTag.getInteger("yCoord") + + ", " + + itemTag.getInteger("zCoord")); par3List.add( StatCollector.translateToLocal("tooltip.alchemy.dimension") + " " + getDimensionID(par1ItemStack)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java index 53674e46..72ceadc4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java @@ -1,13 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.event.SacrificeKnifeUsedEvent; -import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; -import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -22,7 +16,16 @@ import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.FakePlayer; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.event.SacrificeKnifeUsedEvent; +import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; +import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SacrificialDagger extends Item { + public SacrificialDagger() { super(); this.maxStackSize = 1; @@ -55,10 +58,10 @@ public class SacrificialDagger extends Item { */ @Override public void onPlayerStoppedUsing(ItemStack stack, World world, EntityPlayer player, int itemInUseCount) { - // if(itemInUseCount < 32) - // { - // return; - // } + // if(itemInUseCount < 32) + // { + // return; + // } PlayerSacrificeHandler.sacrificePlayerHealth(player); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ScribeTool.java index de951eab..5b80d337 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ScribeTool.java @@ -1,13 +1,16 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; + public class ScribeTool extends EnergyItems { + private int meta; public ScribeTool(int inkType) { @@ -24,8 +27,9 @@ public class ScribeTool extends EnergyItems { par3List.add(StatCollector.translateToLocal("tooltip.scribetool.desc")); if (!(par1ItemStack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java index 3cb90abb..87635c52 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java @@ -1,9 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -12,7 +10,12 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class TelepositionFocus extends EnergyItems { + private int focusLevel; public TelepositionFocus(int focusLevel) { @@ -36,12 +39,18 @@ public class TelepositionFocus extends EnergyItems { NBTTagCompound itemTag = par1ItemStack.getTagCompound(); if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + itemTag.getInteger("xCoord") - + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord")); + par3List.add( + StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + + itemTag.getInteger("xCoord") + + ", " + + itemTag.getInteger("yCoord") + + ", " + + itemTag.getInteger("zCoord")); par3List.add( StatCollector.translateToLocal("tooltip.alchemy.dimension") + " " + getDimensionID(par1ItemStack)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java index 9b153fcd..a6a3683c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.items; +import net.minecraft.client.renderer.texture.IIconRegister; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class TranscendentBloodOrb extends EnergyBattery { + public TranscendentBloodOrb(int damage) { super(damage); orbLevel = 6; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java index de34dcd5..125e4506 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.items; +import net.minecraft.client.renderer.texture.IIconRegister; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class WaterScribeTool extends ScribeTool { + public WaterScribeTool() { super(1); setCreativeTab(AlchemicalWizardry.tabBloodMagic); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java index 30302b96..d1db40ca 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java @@ -1,19 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.armour; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.api.items.interfaces.ILPGauge; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilDivination; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaArmour; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.Optional.Interface; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; @@ -31,18 +19,31 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.ISpecialArmor; import net.minecraftforge.common.util.Constants; + import thaumcraft.api.IGoggles; import thaumcraft.api.IRunicArmor; import thaumcraft.api.nodes.IRevealer; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; +import WayofTime.alchemicalWizardry.api.items.interfaces.ILPGauge; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.sigil.SigilDivination; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaArmour; +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.Optional.Interface; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @Optional.InterfaceList( - value = { - @Interface(iface = "thaumcraft.api.nodes.IRevealer", modid = "Thaumcraft"), - @Interface(iface = "thaumcraft.api.IGoggles", modid = "Thaumcraft"), - @Interface(iface = "thaumcraft.api.IRunicArmor", modid = "Thaumcraft") - }) + value = { @Interface(iface = "thaumcraft.api.nodes.IRevealer", modid = "Thaumcraft"), + @Interface(iface = "thaumcraft.api.IGoggles", modid = "Thaumcraft"), + @Interface(iface = "thaumcraft.api.IRunicArmor", modid = "Thaumcraft") }) public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialArmor, IBindable, IRevealer, IGoggles, IRunicArmor, ILPGauge { + private static int invSize = 9; @SideOnly(Side.CLIENT) @@ -110,8 +111,7 @@ public class BoundArmour extends ItemArmor if ((entityLiving instanceof EntityPlayer)) { if (((EntityPlayer) entityLiving).getItemInUseDuration() > 0) { - EnumAction enumaction = - ((EntityPlayer) entityLiving).getItemInUse().getItemUseAction(); + EnumAction enumaction = ((EntityPlayer) entityLiving).getItemInUse().getItemUseAction(); if (enumaction == EnumAction.block) { this.model.heldItemRight = 3; } else if (enumaction == EnumAction.bow) { @@ -178,30 +178,25 @@ public class BoundArmour extends ItemArmor } @Override - public ArmorProperties getProperties( - EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { + public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, + int slot) { double armourReduction = 0.0; int f = 0; int h = 0; if (player.isPotionActive(AlchemicalWizardry.customPotionSoulFray)) { - f = player.getActivePotionEffect(AlchemicalWizardry.customPotionSoulFray) - .getAmplifier() - + 1; + f = player.getActivePotionEffect(AlchemicalWizardry.customPotionSoulFray).getAmplifier() + 1; } double damageAmount = 0.25; if (player.isPotionActive(AlchemicalWizardry.customPotionSoulHarden)) { - h = player.getActivePotionEffect(AlchemicalWizardry.customPotionSoulHarden) - .getAmplifier() - + 1; + h = player.getActivePotionEffect(AlchemicalWizardry.customPotionSoulHarden).getAmplifier() + 1; } armourReduction = isAffectedBySoulHarden() - ? 1 - - (1 - this.getBaseArmourReduction()) * Math.pow(1.0 / 3.0, Math.max(0, h - f)) + ? 1 - (1 - this.getBaseArmourReduction()) * Math.pow(1.0 / 3.0, Math.max(0, h - f)) - 0.1 * Math.max(0, f - h) : getBaseArmourReduction(); @@ -230,8 +225,7 @@ public class BoundArmour extends ItemArmor return new ArmorProperties(-1, 0, 0); } - if (helmet.getItem() instanceof BoundArmour - && plate.getItem() instanceof BoundArmour + if (helmet.getItem() instanceof BoundArmour && plate.getItem() instanceof BoundArmour && leggings.getItem() instanceof BoundArmour && boots.getItem() instanceof BoundArmour) { if (source.isUnblockable()) { @@ -284,8 +278,9 @@ public class BoundArmour extends ItemArmor if (!(par1ItemStack.getTagCompound() == null)) { if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } ItemStack[] inv = getInternalInventory(par1ItemStack); @@ -296,8 +291,11 @@ public class BoundArmour extends ItemArmor for (int i = 0; i < invSize; i++) { if (inv[i] != null) { - par3List.add(StatCollector.translateToLocal("tooltip.item.iteminslot") + " " + i + ": " - + inv[i].getDisplayName()); + par3List.add( + StatCollector.translateToLocal("tooltip.item.iteminslot") + " " + + i + + ": " + + inv[i].getDisplayName()); } } } @@ -365,8 +363,8 @@ public class BoundArmour extends ItemArmor } } - public void tickInternalInventory( - ItemStack par1ItemStack, World par2World, EntityPlayer par3Entity, int par4, boolean par5) { + public void tickInternalInventory(ItemStack par1ItemStack, World par2World, EntityPlayer par3Entity, int par4, + boolean par5) { ItemStack[] inv = getInternalInventory(par1ItemStack); if (inv == null) { @@ -387,8 +385,10 @@ public class BoundArmour extends ItemArmor if (par2World.getWorldTime() % 200 == 0) { if (getUpgradeCostMultiplier(par1ItemStack) > 0.02f) { - EnergyItems.syphonBatteries(par1ItemStack, par3Entity, (int) - (((ArmourUpgrade) inv[i].getItem()).getEnergyForTenSeconds() + EnergyItems.syphonBatteries( + par1ItemStack, + par3Entity, + (int) (((ArmourUpgrade) inv[i].getItem()).getEnergyForTenSeconds() * getUpgradeCostMultiplier(par1ItemStack))); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java index 0b897774..f2525bcf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java @@ -1,12 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.armour; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -15,6 +8,7 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Random; + import net.minecraft.client.model.ModelBiped; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentData; @@ -29,7 +23,16 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public abstract class OmegaArmour extends BoundArmour { + public OmegaParadigm paradigm; public Reagent reagent; protected boolean storeBiomeID = false; @@ -126,8 +129,8 @@ public abstract class OmegaArmour extends BoundArmour { player.inventory.armorInventory[3 - this.armorType] = stack; } - public ItemStack getSubstituteStack( - ItemStack boundStack, int stability, int affinity, int enchantability, int enchantmentLevel, Random rand) { + public ItemStack getSubstituteStack(ItemStack boundStack, int stability, int affinity, int enchantability, + int enchantmentLevel, Random rand) { ItemStack omegaStack = new ItemStack(this); if (boundStack != null && boundStack.hasTagCompound()) { NBTTagCompound tag = (NBTTagCompound) boundStack.getTagCompound().copy(); @@ -233,7 +236,7 @@ public abstract class OmegaArmour extends BoundArmour { } for (int i = 0; i < 1; i++) { - // omegaStack = EnchantmentHelper.addRandomEnchantment(new Random(), omegaStack, 30); + // omegaStack = EnchantmentHelper.addRandomEnchantment(new Random(), omegaStack, 30); } return omegaStack; } @@ -323,8 +326,7 @@ public abstract class OmegaArmour extends BoundArmour { if ((entityLiving instanceof EntityPlayer)) { if (((EntityPlayer) entityLiving).getItemInUseDuration() > 0) { - EnumAction enumaction = - ((EntityPlayer) entityLiving).getItemInUse().getItemUseAction(); + EnumAction enumaction = ((EntityPlayer) entityLiving).getItemInUse().getItemUseAction(); if (enumaction == EnumAction.block) { this.model.heldItemRight = 3; } else if (enumaction == EnumAction.bow) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java index 7e6efcb0..4f619d8e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java @@ -1,12 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.armour; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaEarth; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.UUID; + import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; @@ -15,7 +10,17 @@ import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaEarth; + +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class OmegaArmourEarth extends OmegaArmour { + @SideOnly(Side.CLIENT) private IIcon helmetIcon; @@ -88,34 +93,21 @@ public class OmegaArmourEarth extends OmegaArmour { int yLevel = this.getYLevelStored(stack); map.put( SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), - new AttributeModifier( - new UUID( - 179618 - /** Random number **/ - , armorType), - "Knockback modifier" + armorType, - getKnockbackResist(), - 0)); - map.put( - SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), - new AttributeModifier( - new UUID( - 80532 - /** Random number **/ - , armorType), - "Health modifier" + armorType, - getDefaultArmourBoost() * getHealthBoostModifierForLevel(yLevel), - 1)); - map.put( - SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), - new AttributeModifier( - new UUID( - 85112 - /** Random number **/ - , armorType), - "Damage modifier" + armorType, - getDefaultArmourBoost() * getDamageModifierForLevel(yLevel), - 2)); + new AttributeModifier(new UUID(179618 + /** Random number **/ + , armorType), "Knockback modifier" + armorType, getKnockbackResist(), 0)); + map.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(80532 + /** Random number **/ + , armorType), + "Health modifier" + armorType, + getDefaultArmourBoost() * getHealthBoostModifierForLevel(yLevel), + 1)); + map.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(85112 + /** Random number **/ + , armorType), + "Damage modifier" + armorType, + getDefaultArmourBoost() * getDamageModifierForLevel(yLevel), + 2)); return map; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java index d8e0cf32..704a6f2e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java @@ -1,12 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.armour; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaFire; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.UUID; + import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.enchantment.Enchantment; @@ -17,7 +12,17 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.biome.BiomeGenBase; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaFire; + +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class OmegaArmourFire extends OmegaArmour { + @SideOnly(Side.CLIENT) private IIcon helmetIcon; @@ -93,21 +98,17 @@ public class OmegaArmourFire extends OmegaArmour { if (biome != null) { map.put( SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), - new AttributeModifier( - new UUID( - 895132 - /** Random number **/ - , armorType), + new AttributeModifier(new UUID(895132 + /** Random number **/ + , armorType), "Health modifier" + armorType, getDefaultArmourBoost() * getHealthBoostModifierForBiome(biome), 1)); map.put( SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), - new AttributeModifier( - new UUID( - 196312 - /** Random number **/ - , armorType), + new AttributeModifier(new UUID(196312 + /** Random number **/ + , armorType), "Damage modifier" + armorType, getDefaultArmourBoost() * getDamageModifierForBiome(biome), 1)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java index 60b7bdc2..4ba67151 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java @@ -1,12 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.armour; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWater; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.UUID; + import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; @@ -16,7 +11,17 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.biome.BiomeGenBase; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWater; + +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class OmegaArmourWater extends OmegaArmour { + @SideOnly(Side.CLIENT) private IIcon helmetIcon; @@ -91,21 +96,17 @@ public class OmegaArmourWater extends OmegaArmour { if (biome != null) { map.put( SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), - new AttributeModifier( - new UUID( - 85312 - /** Random number **/ - , armorType), + new AttributeModifier(new UUID(85312 + /** Random number **/ + , armorType), "Health modifier" + armorType, getDefaultArmourBoost() * getHealthBoostModifierForBiome(biome), 2)); map.put( SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), - new AttributeModifier( - new UUID( - 85432 - /** Random number **/ - , armorType), + new AttributeModifier(new UUID(85432 + /** Random number **/ + , armorType), "Damage modifier" + armorType, getDefaultArmourBoost() * getDamageModifierForBiome(biome), 2)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java index b5432707..d345cfd4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java @@ -1,12 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.armour; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWind; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.UUID; + import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; @@ -15,7 +10,17 @@ import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWind; + +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class OmegaArmourWind extends OmegaArmour { + @SideOnly(Side.CLIENT) private IIcon helmetIcon; @@ -86,26 +91,18 @@ public class OmegaArmourWind extends OmegaArmour { public Multimap getAttributeModifiers(ItemStack stack) { Multimap map = HashMultimap.create(); int yLevel = this.getYLevelStored(stack); - map.put( - SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), - new AttributeModifier( - new UUID( - 85212 - /** Random number **/ - , armorType), - "Health modifier" + armorType, - getDefaultArmourBoost() * getHealthBoostModifierForLevel(yLevel), - 1)); - map.put( - SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), - new AttributeModifier( - new UUID( - 86212 - /** Random number **/ - , armorType), - "Damage modifier" + armorType, - getDefaultArmourBoost() * getDamageModifierForLevel(yLevel), - 2)); + map.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(85212 + /** Random number **/ + , armorType), + "Health modifier" + armorType, + getDefaultArmourBoost() * getHealthBoostModifierForLevel(yLevel), + 1)); + map.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(86212 + /** Random number **/ + , armorType), + "Damage modifier" + armorType, + getDefaultArmourBoost() * getDamageModifierForLevel(yLevel), + 2)); return map; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemAttunedCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemAttunedCrystal.java index d4f782a8..0d7864b6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemAttunedCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemAttunedCrystal.java @@ -1,14 +1,8 @@ package WayofTime.alchemicalWizardry.common.items.energy; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.api.alchemy.energy.*; -import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.LinkedList; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -23,7 +17,16 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.api.alchemy.energy.*; +import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ItemAttunedCrystal extends Item implements IReagentManipulator { + public static final int maxDistance = 6; public IIcon crystalBody; @@ -63,10 +66,16 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator { if (this.getHasSavedCoordinates(par1ItemStack)) { par3List.add(""); Int3 coords = this.getCoordinates(par1ItemStack); - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + coords.xCoord + ", " - + coords.yCoord + ", " + coords.zCoord); - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.dimension") + " " - + getDimension(par1ItemStack)); + par3List.add( + StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + + coords.xCoord + + ", " + + coords.yCoord + + ", " + + coords.zCoord); + par3List.add( + StatCollector.translateToLocal("tooltip.alchemy.dimension") + " " + + getDimension(par1ItemStack)); } } } @@ -87,8 +96,7 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator { case 1: Reagent reagent = this.getReagent(stack); if (reagent != null) { - return (reagent.getColourRed() * 256 * 256 - + reagent.getColourGreen() * 256 + return (reagent.getColourRed() * 256 * 256 + reagent.getColourGreen() * 256 + reagent.getColourBlue()); } break; @@ -191,8 +199,7 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator { return itemStack; } - if (dimension != world.provider.dimensionId - || Math.abs(coords.xCoord - x) > maxDistance + if (dimension != world.provider.dimensionId || Math.abs(coords.xCoord - x) > maxDistance || Math.abs(coords.yCoord - y) > maxDistance || Math.abs(coords.zCoord - z) > maxDistance) { player.addChatComponentMessage( @@ -219,9 +226,10 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator { pastRelay.removeReagentDestinationViaActual(reagent, x, y, z); } else { if (pastRelay.addReagentDestinationViaActual(reagent, x, y, z)) { - player.addChatComponentMessage(new ChatComponentText( - StatCollector.translateToLocal("message.attunedcrystal.linked") + " " - + reagent.name)); + player.addChatComponentMessage( + new ChatComponentText( + StatCollector.translateToLocal("message.attunedcrystal.linked") + " " + + reagent.name)); } else { player.addChatComponentMessage( new ChatComponentTranslation("message.attunedcrystal.error.noconnections")); @@ -329,8 +337,9 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator { this.setReagent(stack, reagent); if (reagent != null) { - player.addChatComponentMessage(new ChatComponentText( - StatCollector.translateToLocal("message.attunedcrystal.setto") + " " + reagent.name)); + player.addChatComponentMessage( + new ChatComponentText( + StatCollector.translateToLocal("message.attunedcrystal.setto") + " " + reagent.name)); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemDestinationClearer.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemDestinationClearer.java index b94cfef2..7f80604b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemDestinationClearer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemDestinationClearer.java @@ -1,11 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.energy; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -16,7 +12,14 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ItemDestinationClearer extends Item implements IReagentManipulator { + public ItemDestinationClearer() { super(); this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemTankSegmenter.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemTankSegmenter.java index af82599f..db31ef3a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemTankSegmenter.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemTankSegmenter.java @@ -1,12 +1,8 @@ package WayofTime.alchemicalWizardry.common.items.energy; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.*; -import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.LinkedList; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -20,7 +16,14 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.*; +import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ItemTankSegmenter extends Item implements IReagentManipulator { + @SideOnly(Side.CLIENT) public IIcon crystalBody; @@ -73,8 +76,7 @@ public class ItemTankSegmenter extends Item implements IReagentManipulator { case 1: Reagent reagent = this.getReagent(stack); if (reagent != null) { - return (reagent.getColourRed() * 256 * 256 - + reagent.getColourGreen() * 256 + return (reagent.getColourRed() * 256 * 256 + reagent.getColourGreen() * 256 + reagent.getColourBlue()); } break; @@ -180,10 +182,14 @@ public class ItemTankSegmenter extends Item implements IReagentManipulator { numberAssigned = 0; } - player.addChatComponentMessage(new ChatComponentText( - StatCollector.translateToLocal("message.tanksegmenter.nowhas") + " " + numberAssigned + " " - + StatCollector.translateToLocal("message.tanksegmenter.tankssetto") + " " - + reagent.name)); + player.addChatComponentMessage( + new ChatComponentText( + StatCollector.translateToLocal("message.tanksegmenter.nowhas") + " " + + numberAssigned + + " " + + StatCollector.translateToLocal("message.tanksegmenter.tankssetto") + + " " + + reagent.name)); reagentHandler.setTanksTunedToReagent(reagent, numberAssigned); } @@ -219,8 +225,9 @@ public class ItemTankSegmenter extends Item implements IReagentManipulator { this.setReagent(stack, reagent); if (reagent != null) { - player.addChatComponentMessage(new ChatComponentText( - StatCollector.translateToLocal("message.tanksegmenter.setto") + " " + reagent.name)); + player.addChatComponentMessage( + new ChatComponentText( + StatCollector.translateToLocal("message.tanksegmenter.setto") + " " + reagent.name)); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/forestry/ItemBloodFrame.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/forestry/ItemBloodFrame.java index c6a0bb11..05ea2b75 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/forestry/ItemBloodFrame.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/forestry/ItemBloodFrame.java @@ -1,18 +1,21 @@ package WayofTime.alchemicalWizardry.common.items.forestry; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import forestry.api.apiculture.*; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import forestry.api.apiculture.*; + public class ItemBloodFrame extends EnergyItems implements IHiveFrame { + private final IBeeModifier beeModifier = new BloodFrameBeeModifier(); public ItemBloodFrame() { @@ -81,8 +84,9 @@ public class ItemBloodFrame extends EnergyItems implements IHiveFrame { par3List.add(StatCollector.translateToLocal("tooltip.bloodframe.desc")); if (!(par1ItemStack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java index 8b4a4a92..958209c7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java @@ -1,15 +1,11 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper; -import com.google.common.collect.HashMultimap; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.ai.attributes.AttributeModifier; @@ -29,7 +25,16 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper; + +import com.google.common.collect.HashMultimap; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class AlchemyFlask extends Item { + public AlchemyFlask() { super(); this.setMaxDamage(8); @@ -46,8 +51,8 @@ public class AlchemyFlask extends Item { public static ArrayList getEffects(ItemStack par1ItemStack) { if (par1ItemStack.hasTagCompound() && par1ItemStack.getTagCompound().hasKey("CustomFlaskEffects")) { ArrayList arraylist = new ArrayList(); - NBTTagList nbttaglist = - par1ItemStack.getTagCompound().getTagList("CustomFlaskEffects", Constants.NBT.TAG_COMPOUND); + NBTTagList nbttaglist = par1ItemStack.getTagCompound() + .getTagList("CustomFlaskEffects", Constants.NBT.TAG_COMPOUND); for (int i = 0; i < nbttaglist.tagCount(); ++i) { NBTTagCompound nbttagcompound = nbttaglist.getCompoundTagAt(i); @@ -217,8 +222,12 @@ public class AlchemyFlask extends Item { } public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { - par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemyflask.swigsleft") + " " - + (par1ItemStack.getMaxDamage() - par1ItemStack.getItemDamage()) + "/" + par1ItemStack.getMaxDamage()); + par3List.add( + EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemyflask.swigsleft") + + " " + + (par1ItemStack.getMaxDamage() - par1ItemStack.getItemDamage()) + + "/" + + par1ItemStack.getMaxDamage()); if (this.isPotionThrowable(par1ItemStack)) { par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemyflask.caution")); @@ -233,8 +242,7 @@ public class AlchemyFlask extends Item { while (iterator.hasNext()) { PotionEffect potioneffect = (PotionEffect) iterator.next(); - String s = StatCollector.translateToLocal(potioneffect.getEffectName()) - .trim(); + String s = StatCollector.translateToLocal(potioneffect.getEffectName()).trim(); Potion potion = Potion.potionTypes[potioneffect.getPotionID()]; Map map = potion.func_111186_k(); @@ -248,15 +256,14 @@ public class AlchemyFlask extends Item { attributemodifier.getName(), potion.func_111183_a(potioneffect.getAmplifier(), attributemodifier), attributemodifier.getOperation()); - hashmultimap.put( - ((IAttribute) entry.getKey()).getAttributeUnlocalizedName(), attributemodifier1); + hashmultimap + .put(((IAttribute) entry.getKey()).getAttributeUnlocalizedName(), attributemodifier1); } } if (potioneffect.getAmplifier() > 0) { s = s + " " - + StatCollector.translateToLocal("potion.potency." + potioneffect.getAmplifier()) - .trim(); + + StatCollector.translateToLocal("potion.potency." + potioneffect.getAmplifier()).trim(); } if (potioneffect.getDuration() > 20) { @@ -292,20 +299,18 @@ public class AlchemyFlask extends Item { } if (d0 > 0.0D) { - par3List.add(EnumChatFormatting.BLUE - + StatCollector.translateToLocalFormatted( - "attribute.modifier.plus." + attributemodifier2.getOperation(), new Object[] { - ItemStack.field_111284_a.format(d1), - StatCollector.translateToLocal("attribute.name." + (String) entry1.getKey()) - })); + par3List.add( + EnumChatFormatting.BLUE + StatCollector.translateToLocalFormatted( + "attribute.modifier.plus." + attributemodifier2.getOperation(), + new Object[] { ItemStack.field_111284_a.format(d1), StatCollector + .translateToLocal("attribute.name." + (String) entry1.getKey()) })); } else if (d0 < 0.0D) { d1 *= -1.0D; - par3List.add(EnumChatFormatting.RED - + StatCollector.translateToLocalFormatted( - "attribute.modifier.take." + attributemodifier2.getOperation(), new Object[] { - ItemStack.field_111284_a.format(d1), - StatCollector.translateToLocal("attribute.name." + (String) entry1.getKey()) - })); + par3List.add( + EnumChatFormatting.RED + StatCollector.translateToLocalFormatted( + "attribute.modifier.take." + attributemodifier2.getOperation(), + new Object[] { ItemStack.field_111284_a.format(d1), StatCollector + .translateToLocal("attribute.name." + (String) entry1.getKey()) })); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java index 2fb0c621..b71bc6f9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java @@ -1,20 +1,24 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; + import org.lwjgl.input.Keyboard; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class AlchemyReagent extends Item { + public AlchemyReagent() { super(); setCreativeTab(AlchemicalWizardry.tabBloodMagic); @@ -82,9 +86,15 @@ public class AlchemyReagent extends Item { } } } else { - par3List.add("-" + StatCollector.translateToLocal("tooltip.alchemy.press") + " " + EnumChatFormatting.BLUE - + StatCollector.translateToLocal("tooltip.alchemy.shift") + EnumChatFormatting.GRAY + " " - + StatCollector.translateToLocal("tooltip.alchemy.forrecipe") + "-"); + par3List.add( + "-" + StatCollector.translateToLocal("tooltip.alchemy.press") + + " " + + EnumChatFormatting.BLUE + + StatCollector.translateToLocal("tooltip.alchemy.shift") + + EnumChatFormatting.GRAY + + " " + + StatCollector.translateToLocal("tooltip.alchemy.forrecipe") + + "-"); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java index 882c771f..974c279d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import net.minecraft.client.renderer.texture.IIconRegister; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class AverageLengtheningCatalyst extends LengtheningCatalyst { + public AverageLengtheningCatalyst() { super(2); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java index 6b298d2d..688830b7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import net.minecraft.client.renderer.texture.IIconRegister; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class AveragePowerCatalyst extends PowerCatalyst { + public AveragePowerCatalyst() { super(2); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java index 72e9388f..67efe5db 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.Item; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.alchemy.ICombinationalCatalyst; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.Item; public class CombinationalCatalyst extends Item implements ICombinationalCatalyst { + public CombinationalCatalyst() { super(); this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java index 712f1f8e..ad0a988e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import net.minecraft.client.renderer.texture.IIconRegister; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class EnhancedFillingAgent extends WeakFillingAgent { + public EnhancedFillingAgent() { super(); setCreativeTab(AlchemicalWizardry.tabBloodMagic); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java index 06931162..f20056f6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import net.minecraft.client.renderer.texture.IIconRegister; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class GreaterLengtheningCatalyst extends LengtheningCatalyst { + public GreaterLengtheningCatalyst() { super(3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java index cc2466e6..52caa808 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import net.minecraft.client.renderer.texture.IIconRegister; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class GreaterPowerCatalyst extends PowerCatalyst { + public GreaterPowerCatalyst() { super(3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java index 233c9855..1ca16b34 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java @@ -1,17 +1,21 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import WayofTime.alchemicalWizardry.common.ICatalyst; import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; + import org.lwjgl.input.Keyboard; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +import WayofTime.alchemicalWizardry.common.ICatalyst; + public class LengtheningCatalyst extends Item implements ICatalyst { + private int catalystStrength; public LengtheningCatalyst(int catalystStrength) { @@ -46,9 +50,15 @@ public class LengtheningCatalyst extends Item implements ICatalyst { } } } else { - par3List.add("-" + StatCollector.translateToLocal("tooltip.alchemy.press") + " " + EnumChatFormatting.BLUE - + StatCollector.translateToLocal("tooltip.alchemy.shift") + EnumChatFormatting.GRAY + " " - + StatCollector.translateToLocal("tooltip.alchemy.forrecipe") + "-"); + par3List.add( + "-" + StatCollector.translateToLocal("tooltip.alchemy.press") + + " " + + EnumChatFormatting.BLUE + + StatCollector.translateToLocal("tooltip.alchemy.shift") + + EnumChatFormatting.GRAY + + " " + + StatCollector.translateToLocal("tooltip.alchemy.forrecipe") + + "-"); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java index ee5571ab..6cd11ffe 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import net.minecraft.client.renderer.texture.IIconRegister; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class MundaneLengtheningCatalyst extends LengtheningCatalyst { + public MundaneLengtheningCatalyst() { super(1); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java index f8cae7aa..dfd9a55c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import net.minecraft.client.renderer.texture.IIconRegister; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class MundanePowerCatalyst extends PowerCatalyst { + public MundanePowerCatalyst() { super(1); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/PowerCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/PowerCatalyst.java index a4ef611c..83f036cb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/PowerCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/PowerCatalyst.java @@ -1,17 +1,21 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import WayofTime.alchemicalWizardry.common.ICatalyst; import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; + import org.lwjgl.input.Keyboard; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +import WayofTime.alchemicalWizardry.common.ICatalyst; + public class PowerCatalyst extends Item implements ICatalyst { + private int catalystStrength; public PowerCatalyst(int catalystStrength) { @@ -47,9 +51,15 @@ public class PowerCatalyst extends Item implements ICatalyst { } } } else { - par3List.add("-" + StatCollector.translateToLocal("tooltip.alchemy.press") + " " + EnumChatFormatting.BLUE - + StatCollector.translateToLocal("tooltip.alchemy.shift") + EnumChatFormatting.GRAY + " " - + StatCollector.translateToLocal("tooltip.alchemy.forrecipe") + "-"); + par3List.add( + "-" + StatCollector.translateToLocal("tooltip.alchemy.press") + + " " + + EnumChatFormatting.BLUE + + StatCollector.translateToLocal("tooltip.alchemy.shift") + + EnumChatFormatting.GRAY + + " " + + StatCollector.translateToLocal("tooltip.alchemy.forrecipe") + + "-"); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java index ef27c36d..305d73fe 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java @@ -1,20 +1,24 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import WayofTime.alchemicalWizardry.common.IBindingAgent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; + import org.lwjgl.input.Keyboard; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +import WayofTime.alchemicalWizardry.common.IBindingAgent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class StandardBindingAgent extends Item implements IBindingAgent { + public StandardBindingAgent() { super(); setCreativeTab(AlchemicalWizardry.tabBloodMagic); @@ -48,9 +52,15 @@ public class StandardBindingAgent extends Item implements IBindingAgent { } } } else { - par3List.add("-" + StatCollector.translateToLocal("tooltip.alchemy.press") + " " + EnumChatFormatting.BLUE - + StatCollector.translateToLocal("tooltip.alchemy.shift") + EnumChatFormatting.GRAY + " " - + StatCollector.translateToLocal("tooltip.alchemy.forrecipe") + "-"); + par3List.add( + "-" + StatCollector.translateToLocal("tooltip.alchemy.press") + + " " + + EnumChatFormatting.BLUE + + StatCollector.translateToLocal("tooltip.alchemy.shift") + + EnumChatFormatting.GRAY + + " " + + StatCollector.translateToLocal("tooltip.alchemy.forrecipe") + + "-"); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java index f60369a9..1ec1460a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import net.minecraft.client.renderer.texture.IIconRegister; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class StandardFillingAgent extends WeakFillingAgent { + public StandardFillingAgent() { super(); setCreativeTab(AlchemicalWizardry.tabBloodMagic); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java index 1cd0e1e9..7eec5f03 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import net.minecraft.client.renderer.texture.IIconRegister; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class WeakBindingAgent extends StandardBindingAgent { + public WeakBindingAgent() { super(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java index cb425904..9dd10e2b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java @@ -1,21 +1,25 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import WayofTime.alchemicalWizardry.common.IFillingAgent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; import java.util.Random; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; + import org.lwjgl.input.Keyboard; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +import WayofTime.alchemicalWizardry.common.IFillingAgent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class WeakFillingAgent extends Item implements IFillingAgent { + public WeakFillingAgent() { super(); setCreativeTab(AlchemicalWizardry.tabBloodMagic); @@ -63,9 +67,15 @@ public class WeakFillingAgent extends Item implements IFillingAgent { } } } else { - par3List.add("-" + StatCollector.translateToLocal("tooltip.alchemy.press") + " " + EnumChatFormatting.BLUE - + StatCollector.translateToLocal("tooltip.alchemy.shift") + EnumChatFormatting.GRAY + " " - + StatCollector.translateToLocal("tooltip.alchemy.forrecipe") + "-"); + par3List.add( + "-" + StatCollector.translateToLocal("tooltip.alchemy.press") + + " " + + EnumChatFormatting.BLUE + + StatCollector.translateToLocal("tooltip.alchemy.shift") + + EnumChatFormatting.GRAY + + " " + + StatCollector.translateToLocal("tooltip.alchemy.forrecipe") + + "-"); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/ILimitedRoutingFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/ILimitedRoutingFocus.java index c7f55f0f..0938f256 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/ILimitedRoutingFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/ILimitedRoutingFocus.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.items.routing; import net.minecraft.item.ItemStack; public interface ILimitedRoutingFocus { + int getRoutingFocusLimit(ItemStack stack); void setRoutingFocusLimit(ItemStack stack, int limit); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java index 15009871..ddab2ec1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.items.routing; +import net.minecraft.client.renderer.texture.IIconRegister; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class InputRoutingFocus extends RoutingFocus { + public InputRoutingFocus() { super(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/OutputRoutingFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/OutputRoutingFocus.java index 43920d24..76879eda 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/OutputRoutingFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/OutputRoutingFocus.java @@ -1,14 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.routing; -import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; -import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitDefault; -import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitGlobal; -import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitIgnMeta; -import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitMatchNBT; -import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitModItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -18,7 +11,17 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; +import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; +import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitDefault; +import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitGlobal; +import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitIgnMeta; +import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitMatchNBT; +import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitModItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class OutputRoutingFocus extends RoutingFocus implements ILimitedRoutingFocus { + IIcon modItemIcon; IIcon ignMetaIcon; IIcon matchNBTIcon; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/RoutingFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/RoutingFocus.java index f1090a1c..0718af50 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/RoutingFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/RoutingFocus.java @@ -1,11 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.routing; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; -import WayofTime.alchemicalWizardry.api.RoutingFocusPosAndFacing; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.Item; @@ -17,7 +13,14 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; +import WayofTime.alchemicalWizardry.api.RoutingFocusPosAndFacing; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class RoutingFocus extends Item { + public RoutingFocus() { super(); this.maxStackSize = 1; @@ -30,25 +33,25 @@ public class RoutingFocus extends Item { this.getSetDirection(itemStack)); } - // @Override - // public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) - // { - // this.cycleDirection(itemStack); - // return itemStack; - // } + // @Override + // public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) + // { + // this.cycleDirection(itemStack); + // return itemStack; + // } // - // public void cycleDirection(ItemStack itemStack) - // { - // ForgeDirection dir = this.getSetDirection(itemStack); - // int direction = dir.ordinal(); - // direction++; - // if(direction >= ForgeDirection.VALID_DIRECTIONS.length) - // { - // direction = 0; - // } + // public void cycleDirection(ItemStack itemStack) + // { + // ForgeDirection dir = this.getSetDirection(itemStack); + // int direction = dir.ordinal(); + // direction++; + // if(direction >= ForgeDirection.VALID_DIRECTIONS.length) + // { + // direction = 0; + // } // - // this.setSetDirection(itemStack, ForgeDirection.getOrientation(direction)); - // } + // this.setSetDirection(itemStack, ForgeDirection.getOrientation(direction)); + // } public ForgeDirection getSetDirection(ItemStack itemStack) { if (!itemStack.hasTagCompound()) { @@ -77,10 +80,16 @@ public class RoutingFocus extends Item { if (!(par1ItemStack.getTagCompound() == null)) { NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + itemTag.getInteger("xCoord") - + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord")); - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.direction") + " " - + this.getSetDirection(par1ItemStack)); + par3List.add( + StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + + itemTag.getInteger("xCoord") + + ", " + + itemTag.getInteger("yCoord") + + ", " + + itemTag.getInteger("zCoord")); + par3List.add( + StatCollector.translateToLocal("tooltip.alchemy.direction") + " " + + this.getSetDirection(par1ItemStack)); } } @@ -89,17 +98,8 @@ public class RoutingFocus extends Item { } @Override - public boolean onItemUseFirst( - ItemStack stack, - EntityPlayer player, - World world, - int x, - int y, - int z, - int side, - float hitX, - float hitY, - float hitZ) { + public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, + float hitX, float hitY, float hitZ) { if (world.isRemote) { return false; } @@ -109,12 +109,13 @@ public class RoutingFocus extends Item { if (player.isSneaking()) { if (this instanceof ILimitedRoutingFocus) { int pastAmount = ((ILimitedRoutingFocus) this).getRoutingFocusLimit(stack); - int amount = SpellHelper.getNumberOfItemsInInventory( - (IInventory) tile, ForgeDirection.getOrientation(side)); + int amount = SpellHelper + .getNumberOfItemsInInventory((IInventory) tile, ForgeDirection.getOrientation(side)); if (amount != pastAmount) { ((ILimitedRoutingFocus) this).setRoutingFocusLimit(stack, amount); - player.addChatComponentMessage(new ChatComponentText( - StatCollector.translateToLocal("message.routerfocus.limit") + amount)); + player.addChatComponentMessage( + new ChatComponentText( + StatCollector.translateToLocal("message.routerfocus.limit") + amount)); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java index 80cec05d..2cd7a19f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java @@ -1,12 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -15,7 +10,15 @@ import net.minecraft.util.StatCollector; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SigilAir extends EnergyItems implements ArmourUpgrade, ISigil { + public SigilAir() { super(); this.maxStackSize = 1; @@ -29,8 +32,9 @@ public class SigilAir extends EnergyItems implements ArmourUpgrade, ISigil { par3List.add(StatCollector.translateToLocal("tooltip.airsigil.desc")); if (!(par1ItemStack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } @@ -54,9 +58,7 @@ public class SigilAir extends EnergyItems implements ArmourUpgrade, ISigil { double wantedVelocity = 1.7; if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionBoost)) { - int i = par3EntityPlayer - .getActivePotionEffect(AlchemicalWizardry.customPotionBoost) - .getAmplifier(); + int i = par3EntityPlayer.getActivePotionEffect(AlchemicalWizardry.customPotionBoost).getAmplifier(); wantedVelocity += (1 + i) * (0.35); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java index 628e9e24..d934628c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java @@ -1,5 +1,16 @@ package WayofTime.alchemicalWizardry.common.items.sigil; +import java.util.List; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; @@ -9,17 +20,9 @@ import WayofTime.alchemicalWizardry.common.entity.projectile.EntityBloodLightPro import WayofTime.alchemicalWizardry.common.items.EnergyItems; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import java.util.List; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; public class SigilBloodLight extends EnergyItems implements IHolding, ArmourUpgrade, ISigil { + public SigilBloodLight() { super(); this.maxStackSize = 1; @@ -32,8 +35,9 @@ public class SigilBloodLight extends EnergyItems implements IHolding, ArmourUpgr par3List.add(StatCollector.translateToLocal("tooltip.bloodlightsigil.desc")); if (!(par1ItemStack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } @@ -44,17 +48,8 @@ public class SigilBloodLight extends EnergyItems implements IHolding, ArmourUpgr } @Override - public boolean onItemUse( - ItemStack par1ItemStack, - EntityPlayer par2EntityPlayer, - World par3World, - int par4, - int par5, - int par6, - int par7, - float par8, - float par9, - float par10) { + public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, + int par5, int par6, int par7, float par8, float par9, float par10) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par2EntityPlayer) || !EnergyItems.syphonBatteries(par1ItemStack, par2EntityPlayer, getEnergyUsed())) { return true; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java index d682e9f2..bdb69464 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java @@ -1,5 +1,19 @@ package WayofTime.alchemicalWizardry.common.items.sigil; +import java.util.List; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; @@ -12,20 +26,9 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.items.EnergyItems; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import java.util.List; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; public class SigilDivination extends Item implements ArmourUpgrade, IReagentManipulator, IBindable, ISigil { + public SigilDivination() { super(); this.maxStackSize = 1; @@ -44,8 +47,9 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani par3List.add(StatCollector.translateToLocal("tooltip.divinationsigil.desc2")); if (!(par1ItemStack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } @@ -69,13 +73,15 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani String ownerName = itemTag.getString("ownerName"); - MovingObjectPosition movingobjectposition = - this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, false); + MovingObjectPosition movingobjectposition = this + .getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, false); if (movingobjectposition == null) { par3EntityPlayer.addChatMessage( - new ChatComponentText(StatCollector.translateToLocal("message.divinationsigil.currentessence") + " " - + SoulNetworkHandler.getCurrentEssence(ownerName) + "LP")); + new ChatComponentText( + StatCollector.translateToLocal("message.divinationsigil.currentessence") + " " + + SoulNetworkHandler.getCurrentEssence(ownerName) + + "LP")); return par1ItemStack; } else { @@ -87,9 +93,11 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani TileEntity tile = par2World.getTileEntity(x, y, z); if (!(tile instanceof IReagentHandler)) { - par3EntityPlayer.addChatMessage(new ChatComponentText( - StatCollector.translateToLocal("message.divinationsigil.currentessence") + " " - + SoulNetworkHandler.getCurrentEssence(ownerName) + "LP")); + par3EntityPlayer.addChatMessage( + new ChatComponentText( + StatCollector.translateToLocal("message.divinationsigil.currentessence") + " " + + SoulNetworkHandler.getCurrentEssence(ownerName) + + "LP")); return par1ItemStack; } @@ -100,11 +108,14 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani if (infoList != null) { for (ReagentContainerInfo info : infoList) { if (info != null && info.reagent != null && info.reagent.reagent != null) { - par3EntityPlayer.addChatComponentMessage(new ChatComponentText( - StatCollector.translateToLocal("message.divinationsigil.reagent") + " " - + ReagentRegistry.getKeyForReagent(info.reagent.reagent) + "," - + StatCollector.translateToLocal("message.divinationsigil.amount") + " " - + info.reagent.amount)); + par3EntityPlayer.addChatComponentMessage( + new ChatComponentText( + StatCollector.translateToLocal("message.divinationsigil.reagent") + " " + + ReagentRegistry.getKeyForReagent(info.reagent.reagent) + + "," + + StatCollector.translateToLocal("message.divinationsigil.amount") + + " " + + info.reagent.amount)); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilFluid.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilFluid.java index 8dc6f272..52c297fa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilFluid.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilFluid.java @@ -1,12 +1,8 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.material.MaterialLiquid; import net.minecraft.client.renderer.texture.IIconRegister; @@ -23,7 +19,14 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.*; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SigilFluid extends Item implements IFluidContainerItem, ISigil { + private int capacity = 128 * 1000; private static final int STATE_SYPHON = 0; private static final int STATE_FORCE_SYPHON = 1; @@ -297,8 +300,7 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil { } if (world.getBlock(x + i - range, y + j - range, z + k - range) != null && world.getBlock(x + i - range, y + j - range, z + k - range) - .getMaterial() - instanceof MaterialLiquid) { + .getMaterial() instanceof MaterialLiquid) { // world.setBlockToAir(x+i-range, y+j-range, z+k-range); Block block = world.getBlock(x + i - range, y + j - range, z + k - range); if (block == null) { @@ -306,8 +308,8 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil { } Fluid fluid = FluidRegistry.lookupFluidForBlock(block); - AlchemicalWizardry.logger.info( - "x: " + (i - range) + " y: " + (j - range) + " z: " + (k - range)); + AlchemicalWizardry.logger + .info("x: " + (i - range) + " y: " + (j - range) + " z: " + (k - range)); if (fluid == null || world.getBlockMetadata(x + i - range, y + j - range, z + k - range) != 0) { continue; @@ -373,8 +375,7 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil { this.fill(container, new FluidStack(fluid, 1000), true); - if (!player.capabilities.isCreativeMode) { - } else { + if (!player.capabilities.isCreativeMode) {} else { return container; } } @@ -393,8 +394,9 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil { float f = 1.0F; double d0 = player.prevPosX + (player.posX - player.prevPosX) * (double) f; - double d1 = - player.prevPosY + (player.posY - player.prevPosY) * (double) f + 1.62D - (double) player.yOffset; + double d1 = player.prevPosY + (player.posY - player.prevPosY) * (double) f + + 1.62D + - (double) player.yOffset; double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f; boolean flag = false; MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, flag); @@ -454,40 +456,39 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil { return container; } - public boolean tryPlaceContainedLiquid( - World par1World, Block block, double par2, double par4, double par6, int par8, int par9, int par10) { - if (!par1World.isAirBlock(par8, par9, par10) - && par1World.getBlock(par8, par9, par10).func_149730_j()) { + public boolean tryPlaceContainedLiquid(World par1World, Block block, double par2, double par4, double par6, + int par8, int par9, int par10) { + if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlock(par8, par9, par10).func_149730_j()) { return false; } else if ((par1World.getBlock(par8, par9, par10).getMaterial() instanceof MaterialLiquid && (par1World.getBlockMetadata(par8, par9, par10) == 0))) { - return false; - } else { - if ((block == Blocks.water || block == Blocks.flowing_water) && par1World.provider.isHellWorld) { - par1World.playSoundEffect( - par2 + 0.5D, - par4 + 0.5D, - par6 + 0.5D, - "random.fizz", - 0.5F, - 2.6F + (par1World.rand.nextFloat() - par1World.rand.nextFloat()) * 0.8F); + return false; + } else { + if ((block == Blocks.water || block == Blocks.flowing_water) && par1World.provider.isHellWorld) { + par1World.playSoundEffect( + par2 + 0.5D, + par4 + 0.5D, + par6 + 0.5D, + "random.fizz", + 0.5F, + 2.6F + (par1World.rand.nextFloat() - par1World.rand.nextFloat()) * 0.8F); - for (int l = 0; l < 8; ++l) { - par1World.spawnParticle( - "largesmoke", - (double) par8 + Math.random(), - (double) par9 + Math.random(), - (double) par10 + Math.random(), - 0.0D, - 0.0D, - 0.0D); + for (int l = 0; l < 8; ++l) { + par1World.spawnParticle( + "largesmoke", + (double) par8 + Math.random(), + (double) par9 + Math.random(), + (double) par10 + Math.random(), + 0.0D, + 0.0D, + 0.0D); + } + } else { + par1World.setBlock(par8, par9, par10, block, 0, 3); + } + + return true; } - } else { - par1World.setBlock(par8, par9, par10, block, 0, 3); - } - - return true; - } } public ItemStack fillSelectedTank(ItemStack container, World world, EntityPlayer player) { @@ -539,20 +540,18 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil { TileEntity tile = world.getTileEntity(i, j, k); if (tile instanceof IFluidHandler) { - FluidStack fluidAmount = ((IFluidHandler) tile) - .drain( - ForgeDirection.getOrientation(movingobjectposition.sideHit), - this.getCapacity(container), - false); + FluidStack fluidAmount = ((IFluidHandler) tile).drain( + ForgeDirection.getOrientation(movingobjectposition.sideHit), + this.getCapacity(container), + false); int amount = this.fill(container, fluidAmount, false); if (amount > 0) { - ((IFluidHandler) tile) - .drain( - ForgeDirection.getOrientation(movingobjectposition.sideHit), - this.getCapacity(container), - true); + ((IFluidHandler) tile).drain( + ForgeDirection.getOrientation(movingobjectposition.sideHit), + this.getCapacity(container), + true); this.fill(container, fluidAmount, true); } @@ -584,13 +583,11 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil { } if (!doFill) { - if (container.getTagCompound() == null - || !container.getTagCompound().hasKey("Fluid")) { + if (container.getTagCompound() == null || !container.getTagCompound().hasKey("Fluid")) { return Math.min(capacity, resource.amount); } - FluidStack stack = - FluidStack.loadFluidStackFromNBT(container.getTagCompound().getCompoundTag("Fluid")); + FluidStack stack = FluidStack.loadFluidStackFromNBT(container.getTagCompound().getCompoundTag("Fluid")); if (stack == null || stack.amount <= 0) { return Math.min(capacity, resource.amount); @@ -658,8 +655,7 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil { return null; } - FluidStack stack = - FluidStack.loadFluidStackFromNBT(container.getTagCompound().getCompoundTag("Fluid")); + FluidStack stack = FluidStack.loadFluidStackFromNBT(container.getTagCompound().getCompoundTag("Fluid")); if (stack == null) { return null; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java index fe86a465..eeae08e7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java @@ -1,14 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -18,7 +11,17 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SigilHarvest extends EnergyItems implements IHolding, ArmourUpgrade, ISigil { + @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -43,8 +46,9 @@ public class SigilHarvest extends EnergyItems implements IHolding, ArmourUpgrade par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); } - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java index d80b26a0..3d4232ea 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java @@ -1,14 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyBattery; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; @@ -26,7 +19,17 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import WayofTime.alchemicalWizardry.common.items.EnergyBattery; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil { + /** * field for checking if the bucket has been filled. */ @@ -61,8 +64,9 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil { par3List.add(StatCollector.translateToLocal("tooltip.lavasigil.desc2")); if (!(par1ItemStack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } @@ -74,17 +78,8 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil { } @Override - public boolean onItemUseFirst( - ItemStack stack, - EntityPlayer player, - World world, - int x, - int y, - int z, - int side, - float hitX, - float hitY, - float hitZ) { + public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, + float hitX, float hitY, float hitZ) { if (world.isRemote || !EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return false; } @@ -148,33 +143,31 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil { /** * Attempts to place the liquid contained inside the bucket. */ - public boolean tryPlaceContainedLiquid( - World par1World, double par2, double par4, double par6, int par8, int par9, int par10) { - if (!par1World.isAirBlock(par8, par9, par10) - && par1World.getBlock(par8, par9, par10).getMaterial().isSolid()) { + public boolean tryPlaceContainedLiquid(World par1World, double par2, double par4, double par6, int par8, int par9, + int par10) { + if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlock(par8, par9, par10).getMaterial().isSolid()) { return false; } else if ((par1World.getBlock(par8, par9, par10) == Blocks.lava - || par1World.getBlock(par8, par9, par10) == Blocks.flowing_lava) + || par1World.getBlock(par8, par9, par10) == Blocks.flowing_lava) && par1World.getBlockMetadata(par8, par9, par10) == 0) { - return false; - } else { - par1World.setBlock(par8, par9, par10, this.isFull, 0, 3); - return true; - } + return false; + } else { + par1World.setBlock(par8, par9, par10, this.isFull, 0, 3); + return true; + } } - public boolean canPlaceContainedLiquid( - World par1World, double par2, double par4, double par6, int par8, int par9, int par10) { - if (!par1World.isAirBlock(par8, par9, par10) - && par1World.getBlock(par8, par9, par10).getMaterial().isSolid()) { + public boolean canPlaceContainedLiquid(World par1World, double par2, double par4, double par6, int par8, int par9, + int par10) { + if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlock(par8, par9, par10).getMaterial().isSolid()) { return false; } else if ((par1World.getBlock(par8, par9, par10) == Blocks.lava - || par1World.getBlock(par8, par9, par10) == Blocks.flowing_lava) + || par1World.getBlock(par8, par9, par10) == Blocks.flowing_lava) && par1World.getBlockMetadata(par8, par9, par10) == 0) { - return false; - } else { - return true; - } + return false; + } else { + return true; + } } protected void setEnergyUsed(int par1int) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java index 7dfa0c25..86aea99e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java @@ -1,11 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -17,7 +13,14 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SigilOfElementalAffinity extends EnergyItems implements ISigil { + @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -43,8 +46,9 @@ public class SigilOfElementalAffinity extends EnergyItems implements ISigil { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); } - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java index b4dae2ff..5d446612 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java @@ -1,13 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; @@ -19,7 +13,16 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SigilOfEnderSeverance extends EnergyItems implements IHolding, ISigil { + @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -44,8 +47,9 @@ public class SigilOfEnderSeverance extends EnergyItems implements IHolding, ISig par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); } - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } @@ -124,8 +128,8 @@ public class SigilOfEnderSeverance extends EnergyItems implements IHolding, ISig } if (par1ItemStack.getTagCompound().getBoolean("isActive")) { - List list = SpellHelper.getEntitiesInRange( - par2World, par3Entity.posX, par3Entity.posY, par3Entity.posZ, 4.5, 4.5); + List list = SpellHelper + .getEntitiesInRange(par2World, par3Entity.posX, par3Entity.posY, par3Entity.posZ, 4.5, 4.5); for (Entity entity : list) { if (!entity.equals(par3Entity) && entity instanceof EntityLiving) { ((EntityLiving) entity) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java index 80c90aa2..1c6eb834 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java @@ -1,13 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.common.eventhandler.Event.Result; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.IGrowable; import net.minecraft.client.renderer.texture.IIconRegister; @@ -22,7 +16,16 @@ import net.minecraftforge.common.IPlantable; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.player.BonemealEvent; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.common.eventhandler.Event.Result; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil { + @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -50,8 +53,9 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); } - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } @@ -89,17 +93,8 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil } @Override - public boolean onItemUse( - ItemStack par1ItemStack, - EntityPlayer par2EntityPlayer, - World par3World, - int par4, - int par5, - int par6, - int par7, - float par8, - float par9, - float par10) { + public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, + int par5, int par6, int par7, float par8, float par9, float par10) { if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par2EntityPlayer)) { if (applyBonemeal(par1ItemStack, par3World, par4, par5, par6, par2EntityPlayer)) { EnergyItems.syphonBatteries(par1ItemStack, par2EntityPlayer, getEnergyUsed()); @@ -154,8 +149,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil } if (par1ItemStack.getTagCompound().getBoolean("isActive")) { - if (par2World.getWorldTime() % tickDelay - == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) { + if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) { if (!EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed())) { par1ItemStack.getTagCompound().setBoolean("isActive", false); } @@ -182,13 +176,8 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil } } - public static boolean applyBonemeal( - ItemStack p_150919_0_, - World p_150919_1_, - int p_150919_2_, - int p_150919_3_, - int p_150919_4_, - EntityPlayer player) { + public static boolean applyBonemeal(ItemStack p_150919_0_, World p_150919_1_, int p_150919_2_, int p_150919_3_, + int p_150919_4_, EntityPlayer player) { Block block = p_150919_1_.getBlock(p_150919_2_, p_150919_3_, p_150919_4_); BonemealEvent event = new BonemealEvent(player, p_150919_1_, block, p_150919_2_, p_150919_3_, p_150919_4_); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java index a5ea7746..5c32767b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java @@ -1,12 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -17,7 +12,15 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SigilOfHaste extends EnergyItems implements ArmourUpgrade, ISigil { + @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -42,8 +45,9 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade, ISigil { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); } - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java index e53e8763..9865ad0e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java @@ -1,13 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; @@ -20,7 +14,16 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHolding, ISigil { + @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -47,8 +50,9 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); } - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } @@ -122,8 +126,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol } if (par1ItemStack.getTagCompound().getBoolean("isActive")) { - if (par2World.getWorldTime() % tickDelay - == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) { + if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) { if (!EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed())) { par1ItemStack.getTagCompound().setBoolean("isActive", false); } @@ -137,13 +140,21 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol List entities = par3EntityPlayer.worldObj.getEntitiesWithinAABB( EntityItem.class, AxisAlignedBB.getBoundingBox( - posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f) - .expand(range, verticalRange, range)); + posX - 0.5f, + posY - 0.5f, + posZ - 0.5f, + posX + 0.5f, + posY + 0.5f, + posZ + 0.5f).expand(range, verticalRange, range)); List xpOrbs = par3EntityPlayer.worldObj.getEntitiesWithinAABB( EntityXPOrb.class, AxisAlignedBB.getBoundingBox( - posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f) - .expand(range, verticalRange, range)); + posX - 0.5f, + posY - 0.5f, + posZ - 0.5f, + posX + 0.5f, + posY + 0.5f, + posZ + 0.5f).expand(range, verticalRange, range)); for (EntityItem entity : entities) { if (entity != null && !par2World.isRemote) { @@ -168,13 +179,13 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol float posZ = Math.round(player.posZ); List entities = player.worldObj.getEntitiesWithinAABB( EntityItem.class, - AxisAlignedBB.getBoundingBox( - posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f) + AxisAlignedBB + .getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f) .expand(range, verticalRange, range)); List xpOrbs = player.worldObj.getEntitiesWithinAABB( EntityXPOrb.class, - AxisAlignedBB.getBoundingBox( - posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f) + AxisAlignedBB + .getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f) .expand(range, verticalRange, range)); for (EntityItem entity : entities) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java index 1e5481f4..28509158 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java @@ -1,14 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; @@ -21,7 +14,17 @@ import net.minecraft.util.StatCollector; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SigilOfSupression extends EnergyItems implements ArmourUpgrade, ISigil { + @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -49,8 +52,9 @@ public class SigilOfSupression extends EnergyItems implements ArmourUpgrade, ISi par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); } - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java index 6585a95f..84a9a330 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java @@ -1,14 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; @@ -27,7 +20,17 @@ import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.EnderTeleportEvent; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SigilOfTheAssassin extends EnergyItems implements ArmourUpgrade, ISigil { + public SigilOfTheAssassin() { super(); this.maxStackSize = 1; @@ -61,8 +64,9 @@ public class SigilOfTheAssassin extends EnergyItems implements ArmourUpgrade, IS par3List.add(StatCollector.translateToLocal("tooltip.sigiloftheassassin.desc")); if (!(par1ItemStack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } @@ -76,8 +80,8 @@ public class SigilOfTheAssassin extends EnergyItems implements ArmourUpgrade, IS float f = 10.0F; - MovingObjectPosition movingobjectposition = - SpellHelper.raytraceFromEntity(par2World, par3EntityPlayer, false, f); + MovingObjectPosition movingobjectposition = SpellHelper + .raytraceFromEntity(par2World, par3EntityPlayer, false, f); if (movingobjectposition == null) { AlchemicalWizardry.logger.info("I saw nothing."); @@ -109,14 +113,8 @@ public class SigilOfTheAssassin extends EnergyItems implements ArmourUpgrade, IS } } - protected static boolean teleportTo( - EntityLivingBase entityLiving, - double par1, - double par3, - double par5, - double lastX, - double lastY, - double lastZ) { + protected static boolean teleportTo(EntityLivingBase entityLiving, double par1, double par3, double par5, + double lastX, double lastY, double lastZ) { EnderTeleportEvent event = new EnderTeleportEvent(entityLiving, par1, par3, par5, 0); if (MinecraftForge.EVENT_BUS.post(event)) { @@ -148,13 +146,10 @@ public class SigilOfTheAssassin extends EnergyItems implements ArmourUpgrade, IS } if (flag1) { - SpellTeleport.moveEntityViaTeleport( - entityLiving, entityLiving.posX, entityLiving.posY, entityLiving.posZ); + SpellTeleport + .moveEntityViaTeleport(entityLiving, entityLiving.posX, entityLiving.posY, entityLiving.posZ); - if (entityLiving - .worldObj - .getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox) - .isEmpty() + if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.boundingBox)) { flag = true; } @@ -172,14 +167,11 @@ public class SigilOfTheAssassin extends EnergyItems implements ArmourUpgrade, IS float f = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; float f1 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; float f2 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; - double d7 = d3 - + (entityLiving.posX - d3) * d6 + double d7 = d3 + (entityLiving.posX - d3) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; - double d8 = d4 - + (entityLiving.posY - d4) * d6 + double d8 = d4 + (entityLiving.posY - d4) * d6 + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height; - double d9 = d5 - + (entityLiving.posZ - d5) * d6 + double d9 = d5 + (entityLiving.posZ - d5) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; entityLiving.worldObj.spawnParticle("portal", d7, d8, d9, (double) f, (double) f1, (double) f2); } @@ -187,19 +179,15 @@ public class SigilOfTheAssassin extends EnergyItems implements ArmourUpgrade, IS } } - public MovingObjectPosition getMovingObjectPositionFromPlayer( - World p_77621_1_, EntityPlayer p_77621_2_, boolean p_77621_3_, float reach) { + public MovingObjectPosition getMovingObjectPositionFromPlayer(World p_77621_1_, EntityPlayer p_77621_2_, + boolean p_77621_3_, float reach) { float f = 1; float f1 = p_77621_2_.prevRotationPitch + (p_77621_2_.rotationPitch - p_77621_2_.prevRotationPitch) * f; float f2 = p_77621_2_.prevRotationYaw + (p_77621_2_.rotationYaw - p_77621_2_.prevRotationYaw) * f; double d0 = p_77621_2_.prevPosX + (p_77621_2_.posX - p_77621_2_.prevPosX) * (double) f; - double d1 = p_77621_2_.prevPosY - + (p_77621_2_.posY - p_77621_2_.prevPosY) * (double) f - + (double) - (p_77621_1_.isRemote - ? p_77621_2_.getEyeHeight() - p_77621_2_.getDefaultEyeHeight() - : p_77621_2_ - .getEyeHeight()); // isRemote check to revert changes to ray trace position due + double d1 = p_77621_2_.prevPosY + (p_77621_2_.posY - p_77621_2_.prevPosY) * (double) f + + (double) (p_77621_1_.isRemote ? p_77621_2_.getEyeHeight() - p_77621_2_.getDefaultEyeHeight() + : p_77621_2_.getEyeHeight()); // isRemote check to revert changes to ray trace position due // to adding the eye height clientside and player yOffset // differences double d2 = p_77621_2_.prevPosZ + (p_77621_2_.posZ - p_77621_2_.prevPosZ) * (double) f; @@ -212,65 +200,65 @@ public class SigilOfTheAssassin extends EnergyItems implements ArmourUpgrade, IS float f8 = f3 * f5; double d3 = 500.0D; if (p_77621_2_ instanceof EntityPlayerMP) { - // d3 = ((EntityPlayerMP)p_77621_2_).theItemInWorldManager.getBlockReachDistance(); + // d3 = ((EntityPlayerMP)p_77621_2_).theItemInWorldManager.getBlockReachDistance(); } Vec3 vec31 = vec3.addVector((double) f7 * d3, (double) f6 * d3, (double) f8 * d3); return p_77621_1_.func_147447_a(vec3, vec31, p_77621_3_, !p_77621_3_, false); } - // public MovingObjectPosition movingObjectPositiongdsa(WOrld worldObj, int posX, int posY, int posZ) - // { - // Vec3 var17 = SpellHelper.createVec3(posX, posY, posZ); - // Vec3 var3 = SpellHelper.createVec3(posX + motionX, posY + motionY, posZ + motionZ); - // MovingObjectPosition var4 = worldObj.func_147447_a(var17, var3, true, false, false); - // var17 = SpellHelper.createVec3(posX, posY, posZ); - // var3 = SpellHelper.createVec3(posX + motionX, posY + motionY, posZ + motionZ); + // public MovingObjectPosition movingObjectPositiongdsa(WOrld worldObj, int posX, int posY, int posZ) + // { + // Vec3 var17 = SpellHelper.createVec3(posX, posY, posZ); + // Vec3 var3 = SpellHelper.createVec3(posX + motionX, posY + motionY, posZ + motionZ); + // MovingObjectPosition var4 = worldObj.func_147447_a(var17, var3, true, false, false); + // var17 = SpellHelper.createVec3(posX, posY, posZ); + // var3 = SpellHelper.createVec3(posX + motionX, posY + motionY, posZ + motionZ); // - // if (var4 != null) - // { - // var3 = SpellHelper.createVec3(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord); - // } + // if (var4 != null) + // { + // var3 = SpellHelper.createVec3(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord); + // } // - // Entity var5 = null; - // List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.addCoord(motionX, motionY, + // Entity var5 = null; + // List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.addCoord(motionX, motionY, // motionZ).expand(1.0D, 1.0D, 1.0D)); - // double var7 = 0.0D; - // Iterator var9 = var6.iterator(); - // float var11; + // double var7 = 0.0D; + // Iterator var9 = var6.iterator(); + // float var11; // - // while (var9.hasNext()) - // { - // Entity var10 = (Entity) var9.next(); + // while (var9.hasNext()) + // { + // Entity var10 = (Entity) var9.next(); // - // if (var10.canBeCollidedWith() && (var10 != shootingEntity || ticksInAir >= 5)) - // { - // var11 = 0.3F; - // AxisAlignedBB var12 = var10.boundingBox.expand(var11, var11, var11); - // MovingObjectPosition var13 = var12.calculateIntercept(var17, var3); + // if (var10.canBeCollidedWith() && (var10 != shootingEntity || ticksInAir >= 5)) + // { + // var11 = 0.3F; + // AxisAlignedBB var12 = var10.boundingBox.expand(var11, var11, var11); + // MovingObjectPosition var13 = var12.calculateIntercept(var17, var3); // - // if (var13 != null) - // { - // double var14 = var17.distanceTo(var13.hitVec); + // if (var13 != null) + // { + // double var14 = var17.distanceTo(var13.hitVec); // - // if (var14 < var7 || var7 == 0.0D) - // { - // var5 = var10; - // var7 = var14; - // } - // } - // } - // } + // if (var14 < var7 || var7 == 0.0D) + // { + // var5 = var10; + // var7 = var14; + // } + // } + // } + // } // - // if (var5 != null) - // { - // var4 = new MovingObjectPosition(var5); - // } + // if (var5 != null) + // { + // var4 = new MovingObjectPosition(var5); + // } // - // if (var4 != null) - // { - // this.onImpact(var4); - // } - // } + // if (var4 != null) + // { + // this.onImpact(var4); + // } + // } @Override public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java index 5fe7a057..112158d2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java @@ -1,14 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; @@ -20,7 +13,17 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade, ISigil { + @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -48,8 +51,9 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade, ISig par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); } - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } @@ -123,10 +127,9 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade, ISig } if (par1ItemStack.getTagCompound().getBoolean("isActive")) { - if (par2World.getWorldTime() % tickDelay - == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) { - if (EnergyItems.syphonBatteries( - par1ItemStack, (EntityPlayer) par3Entity, this.getLPUsed(par1ItemStack))) { + if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) { + if (EnergyItems + .syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, this.getLPUsed(par1ItemStack))) { this.setLPUsed(par1ItemStack, 0); } else { par1ItemStack.getTagCompound().setBoolean("isActive", false); @@ -195,8 +198,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade, ISig par1ItemStack.setTagCompound(new NBTTagCompound()); } - par1ItemStack - .getTagCompound() + par1ItemStack.getTagCompound() .setInteger("LPUsed", par1ItemStack.getTagCompound().getInteger("LPUsed") + addedLP); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java index 0282fbed..44e583f6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java @@ -1,12 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -18,7 +13,15 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade, ISigil { + @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -43,8 +46,9 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade, I par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); } - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java index 856a9e4b..32a62d71 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java @@ -1,12 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -17,7 +12,15 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SigilOfWind extends EnergyItems implements ArmourUpgrade, ISigil { + @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -42,8 +45,9 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade, ISigil { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); } - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilPackRat.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilPackRat.java index 45bfc05b..320415b3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilPackRat.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilPackRat.java @@ -1,14 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.compress.CompressionRegistry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; @@ -19,7 +12,17 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.compress.CompressionRegistry; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SigilPackRat extends EnergyItems implements IHolding, ArmourUpgrade, ISigil { + @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -44,8 +47,9 @@ public class SigilPackRat extends EnergyItems implements IHolding, ArmourUpgrade par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); } - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } @@ -124,11 +128,15 @@ public class SigilPackRat extends EnergyItems implements IHolding, ArmourUpgrade } if (par1ItemStack.getTagCompound().getBoolean("isActive")) { - ItemStack stack = - CompressionRegistry.compressInventory(par3EntityPlayer.inventory.mainInventory, par2World); + ItemStack stack = CompressionRegistry + .compressInventory(par3EntityPlayer.inventory.mainInventory, par2World); if (stack != null) { EntityItem entityItem = new EntityItem( - par2World, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, stack); + par2World, + par3EntityPlayer.posX, + par3EntityPlayer.posY, + par3EntityPlayer.posZ, + stack); par2World.spawnEntityInWorld(entityItem); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java index 04afd9ad..cb590f8f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java @@ -1,13 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -16,7 +10,16 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SigilSeer extends Item implements IHolding, ArmourUpgrade, ISigil { + public SigilSeer() { super(); this.maxStackSize = 1; @@ -34,8 +37,9 @@ public class SigilSeer extends Item implements IHolding, ArmourUpgrade, ISigil { par3List.add(StatCollector.translateToLocal("tooltip.seersigil.desc")); if (!(par1ItemStack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java index 3e0a91e7..ffd0f043 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java @@ -1,13 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBucket; @@ -19,7 +13,16 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SigilVoid extends ItemBucket implements ArmourUpgrade, ISigil { + private int isFull; private int energyUsed; @@ -42,8 +45,9 @@ public class SigilVoid extends ItemBucket implements ArmourUpgrade, ISigil { par3List.add(StatCollector.translateToLocal("tooltip.voidsigil.desc")); if (!(stack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + stack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + stack.getTagCompound().getString("ownerName")); } } @@ -68,17 +72,8 @@ public class SigilVoid extends ItemBucket implements ArmourUpgrade, ISigil { } @Override - public boolean onItemUseFirst( - ItemStack stack, - EntityPlayer player, - World world, - int x, - int y, - int z, - int side, - float hitX, - float hitY, - float hitZ) { + public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, + float hitX, float hitY, float hitZ) { if (world.isRemote || !EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return false; } @@ -141,8 +136,8 @@ public class SigilVoid extends ItemBucket implements ArmourUpgrade, ISigil { /** * Attempts to place the liquid contained inside the bucket. */ - public boolean tryPlaceContainedLiquid( - World par1World, double par2, double par4, double par6, int par8, int par9, int par10) { + public boolean tryPlaceContainedLiquid(World par1World, double par2, double par4, double par6, int par8, int par9, + int par10) { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java index 3c761b19..bcb74747 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java @@ -1,13 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; @@ -25,7 +19,16 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil { + private Block isFull = Blocks.water; private int energyUsed; @@ -59,8 +62,9 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil { par3List.add(StatCollector.translateToLocal("tooltip.watersigil.desc")); if (!(stack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + stack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + stack.getTagCompound().getString("ownerName")); } } @@ -72,17 +76,8 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil { } @Override - public boolean onItemUseFirst( - ItemStack stack, - EntityPlayer player, - World world, - int x, - int y, - int z, - int side, - float hitX, - float hitY, - float hitZ) { + public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, + float hitX, float hitY, float hitZ) { if (world.isRemote || !EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return false; } @@ -146,56 +141,54 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil { /** * Attempts to place the liquid contained inside the bucket. */ - public boolean tryPlaceContainedLiquid( - World par1World, double par2, double par4, double par6, int par8, int par9, int par10) { - if (!par1World.isAirBlock(par8, par9, par10) - && par1World.getBlock(par8, par9, par10).getMaterial().isSolid()) { + public boolean tryPlaceContainedLiquid(World par1World, double par2, double par4, double par6, int par8, int par9, + int par10) { + if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlock(par8, par9, par10).getMaterial().isSolid()) { return false; } else if ((par1World.getBlock(par8, par9, par10) == Blocks.water - || par1World.getBlock(par8, par9, par10) == Blocks.flowing_water) + || par1World.getBlock(par8, par9, par10) == Blocks.flowing_water) && par1World.getBlockMetadata(par8, par9, par10) == 0) { - return false; - } else { - if (par1World.provider.isHellWorld) { - par1World.playSoundEffect( - par2 + 0.5D, - par4 + 0.5D, - par6 + 0.5D, - "random.fizz", - 0.5F, - 2.6F + (par1World.rand.nextFloat() - par1World.rand.nextFloat()) * 0.8F); + return false; + } else { + if (par1World.provider.isHellWorld) { + par1World.playSoundEffect( + par2 + 0.5D, + par4 + 0.5D, + par6 + 0.5D, + "random.fizz", + 0.5F, + 2.6F + (par1World.rand.nextFloat() - par1World.rand.nextFloat()) * 0.8F); - for (int l = 0; l < 8; ++l) { - par1World.spawnParticle( - "largesmoke", - (double) par8 + Math.random(), - (double) par9 + Math.random(), - (double) par10 + Math.random(), - 0.0D, - 0.0D, - 0.0D); + for (int l = 0; l < 8; ++l) { + par1World.spawnParticle( + "largesmoke", + (double) par8 + Math.random(), + (double) par9 + Math.random(), + (double) par10 + Math.random(), + 0.0D, + 0.0D, + 0.0D); + } + } else { + par1World.setBlock(par8, par9, par10, this.isFull, 0, 3); + par1World.markBlockForUpdate(par8, par9, par10); + } + + return true; } - } else { - par1World.setBlock(par8, par9, par10, this.isFull, 0, 3); - par1World.markBlockForUpdate(par8, par9, par10); - } - - return true; - } } - public boolean canPlaceContainedLiquid( - World par1World, double par2, double par4, double par6, int par8, int par9, int par10) { - if (!par1World.isAirBlock(par8, par9, par10) - && par1World.getBlock(par8, par9, par10).getMaterial().isSolid()) { + public boolean canPlaceContainedLiquid(World par1World, double par2, double par4, double par6, int par8, int par9, + int par10) { + if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlock(par8, par9, par10).getMaterial().isSolid()) { return false; } else if ((par1World.getBlock(par8, par9, par10) == Blocks.water - || par1World.getBlock(par8, par9, par10) == Blocks.flowing_water) + || par1World.getBlock(par8, par9, par10) == Blocks.flowing_water) && par1World.getBlockMetadata(par8, par9, par10) == 0) { - return false; - } else { - return true; - } + return false; + } else { + return true; + } } protected void setEnergyUsed(int par1int) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ContainerHolding.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ContainerHolding.java index cfba7132..3c18a3fd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ContainerHolding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ContainerHolding.java @@ -1,14 +1,16 @@ package WayofTime.alchemicalWizardry.common.items.sigil.holding; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import cpw.mods.fml.common.FMLCommonHandler; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import cpw.mods.fml.common.FMLCommonHandler; + public class ContainerHolding extends Container { + protected final int PLAYER_INVENTORY_ROWS = 3; protected final int PLAYER_INVENTORY_COLUMNS = 9; @@ -29,8 +31,12 @@ public class ContainerHolding extends Container { for (int rowIndex = 0; rowIndex < PLAYER_INVENTORY_ROWS; ++rowIndex) { for (int columnIndex = 0; columnIndex < PLAYER_INVENTORY_COLUMNS; ++columnIndex) { - this.addSlotToContainer(new Slot( - player.inventory, columnIndex + rowIndex * 9 + 9, 8 + columnIndex * 18, 39 + rowIndex * 18)); + this.addSlotToContainer( + new Slot( + player.inventory, + columnIndex + rowIndex * 9 + 9, + 8 + columnIndex * 18, + 39 + rowIndex * 18)); } } @@ -99,8 +105,8 @@ public class ContainerHolding extends Container { inventoryColumns, inventoryColumns + (PLAYER_INVENTORY_ROWS * PLAYER_INVENTORY_COLUMNS), false)) { - return null; - } + return null; + } } if (stackInSlot.stackSize == 0) { @@ -124,16 +130,12 @@ public class ContainerHolding extends Container { } private class SlotHolding extends Slot { + private final EntityPlayer player; private ContainerHolding containerHolding; - public SlotHolding( - ContainerHolding containerHolding, - IInventory inventory, - EntityPlayer player, - int slotIndex, - int x, - int y) { + public SlotHolding(ContainerHolding containerHolding, IInventory inventory, EntityPlayer player, int slotIndex, + int x, int y) { super(inventory, slotIndex, x, y); this.player = player; this.containerHolding = containerHolding; @@ -155,6 +157,7 @@ public class ContainerHolding extends Container { } private class SlotDisabled extends Slot { + public SlotDisabled(IInventory inventory, int slotIndex, int x, int y) { super(inventory, slotIndex, x, y); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/GuiHolding.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/GuiHolding.java index 1ac9ae2c..a4b340e0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/GuiHolding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/GuiHolding.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.items.sigil.holding; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + @SideOnly(Side.CLIENT) public class GuiHolding extends GuiContainer { + public GuiHolding(EntityPlayer player, InventoryHolding inventoryHolding) { super(new ContainerHolding(player, inventoryHolding)); xSize = 176; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketHandler.java index f5f23267..b4be02bf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketHandler.java @@ -5,6 +5,7 @@ import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; import cpw.mods.fml.relauncher.Side; public class HoldingPacketHandler { + public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel("SigilOfHolding"); public static void init() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketProcessor.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketProcessor.java index 00854154..0a0f011d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketProcessor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketProcessor.java @@ -1,12 +1,14 @@ package WayofTime.alchemicalWizardry.common.items.sigil.holding; +import net.minecraft.item.ItemStack; + 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 io.netty.buffer.ByteBuf; -import net.minecraft.item.ItemStack; public class HoldingPacketProcessor implements IMessage, IMessageHandler { + private int slot; private int mode; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/InventoryHolding.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/InventoryHolding.java index 0f01a9e0..75a6c4fc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/InventoryHolding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/InventoryHolding.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.items.sigil.holding; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; import java.util.UUID; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; + public class InventoryHolding implements IInventory { + public ItemStack parentItemStack; protected ItemStack[] inventory; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ScrollHelper.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ScrollHelper.java index ec8012f6..ab29ba20 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ScrollHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ScrollHelper.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.sigil.holding; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityClientPlayerMP; import net.minecraft.entity.player.EntityPlayer; @@ -10,8 +7,13 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.client.event.MouseEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + @SideOnly(Side.CLIENT) public class ScrollHelper { + @SubscribeEvent public void onMouseEvent(MouseEvent event) { EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java index 10ba93f0..7da1ac5b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java @@ -1,10 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil.holding; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -16,7 +13,13 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class SigilOfHolding extends EnergyItems { + private static int invSize = 5; private static final String NBT_CURRENT_SIGIL = "CurrentSigil"; @@ -57,8 +60,9 @@ public class SigilOfHolding extends EnergyItems { par3List.add(StatCollector.translateToLocal("tooltip.sigilofholding.desc")); if (!(par1ItemStack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add( + StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + + par1ItemStack.getTagCompound().getString("ownerName")); ItemStack[] inv = getInternalInventory(par1ItemStack); if (inv == null) { @@ -74,25 +78,19 @@ public class SigilOfHolding extends EnergyItems { for (int i = 0; i < invSize; i++) { if (inv[i] != null) { - par3List.add(StatCollector.translateToLocal("tooltip.item.iteminslot") + " " + (i + 1) + ": " - + inv[i].getDisplayName()); + par3List.add( + StatCollector.translateToLocal("tooltip.item.iteminslot") + " " + + (i + 1) + + ": " + + inv[i].getDisplayName()); } } } } @Override - public boolean onItemUse( - ItemStack par1ItemStack, - EntityPlayer par2EntityPlayer, - World par3World, - int par4, - int par5, - int par6, - int par7, - float par8, - float par9, - float par10) { + public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, + int par5, int par6, int par7, float par8, float par9, float par10) { if (checkAndSetItemOwner(par1ItemStack, par2EntityPlayer)) { int currentSlot = getCurrentItem(par1ItemStack); ItemStack[] inv = getInternalInventory(par1ItemStack); @@ -153,17 +151,8 @@ public class SigilOfHolding extends EnergyItems { } @Override - public boolean onItemUseFirst( - ItemStack stack, - EntityPlayer player, - World world, - int x, - int y, - int z, - int side, - float hitX, - float hitY, - float hitZ) { + public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, + float hitX, float hitY, float hitZ) { if (checkAndSetItemOwner(stack, player)) { int currentSlot = getCurrentItem(stack); ItemStack[] inv = getInternalInventory(stack); @@ -300,8 +289,8 @@ public class SigilOfHolding extends EnergyItems { } } - public void tickInternalInventory( - ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) { + public void tickInternalInventory(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, + boolean par5) { ItemStack[] inv = getInternalInventory(par1ItemStack); if (inv == null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java index b7cc29b9..a39e24d7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java @@ -1,11 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.thaumcraft; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -15,15 +11,22 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; + import thaumcraft.api.IGoggles; import thaumcraft.api.IRepairable; import thaumcraft.api.IRunicArmor; import thaumcraft.api.IVisDiscountGear; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.nodes.IRevealer; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGoggles, IVisDiscountGear, IRevealer, IRunicArmor, IRepairable { + @SideOnly(Side.CLIENT) private IIcon helmetIcon; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java index 6834cc65..c43e3adc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.omega; import net.minecraft.world.World; public interface IEnchantmentGlyph extends IStabilityGlyph { + public int getEnchantability(World world, int x, int y, int z, int meta); public int getEnchantmentLevel(World world, int x, int y, int z, int meta); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java index 8018fccc..e9fd632b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java @@ -3,5 +3,6 @@ package WayofTime.alchemicalWizardry.common.omega; import net.minecraft.world.World; public interface IStabilityGlyph { + public int getAdditionalStabilityForFaceCount(World world, int x, int y, int z, int meta, int faceCount); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigm.java index d62536f2..909e26d4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigm.java @@ -1,15 +1,18 @@ package WayofTime.alchemicalWizardry.common.omega; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; import java.util.Random; + import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; + public class OmegaParadigm { + public OmegaArmour helmet; public OmegaArmour chestPiece; public OmegaArmour leggings; @@ -17,13 +20,8 @@ public class OmegaParadigm { public ReagentRegenConfiguration config; - public OmegaParadigm( - Reagent reagent, - OmegaArmour helmet, - OmegaArmour chestPiece, - OmegaArmour leggings, - OmegaArmour boots, - ReagentRegenConfiguration config) { + public OmegaParadigm(Reagent reagent, OmegaArmour helmet, OmegaArmour chestPiece, OmegaArmour leggings, + OmegaArmour boots, ReagentRegenConfiguration config) { this.helmet = helmet; this.chestPiece = chestPiece; this.leggings = leggings; @@ -41,15 +39,8 @@ public class OmegaParadigm { this.config = new ReagentRegenConfiguration(100, 1, 10); } - public boolean convertPlayerArmour( - EntityPlayer player, - int x, - int y, - int z, - int stability, - int affinity, - int enchantability, - int enchantmentLevel) { + public boolean convertPlayerArmour(EntityPlayer player, int x, int y, int z, int stability, int affinity, + int enchantability, int enchantmentLevel) { ItemStack[] armours = player.inventory.armorInventory; ItemStack helmetStack = armours[3]; @@ -57,8 +48,7 @@ public class OmegaParadigm { ItemStack leggingsStack = armours[1]; ItemStack bootsStack = armours[0]; - if (helmetStack != null - && helmetStack.getItem() == ModItems.boundHelmet + if (helmetStack != null && helmetStack.getItem() == ModItems.boundHelmet && chestStack != null && chestStack.getItem() == ModItems.boundPlate && leggingsStack != null @@ -66,21 +56,21 @@ public class OmegaParadigm { && bootsStack != null && bootsStack.getItem() == ModItems.boundBoots) { long worldSeed = player.worldObj.getSeed(); - Random rand = new Random(worldSeed - + stability * (affinity + 7) * 94 - + 84321 * x - - 17423 * y - + 76 * z - - 1623451 * enchantability - + 2 * enchantmentLevel); - ItemStack omegaHelmetStack = - helmet.getSubstituteStack(helmetStack, stability, affinity, enchantability, enchantmentLevel, rand); - ItemStack omegaChestStack = chestPiece.getSubstituteStack( - chestStack, stability, affinity, enchantability, enchantmentLevel, rand); - ItemStack omegaLeggingsStack = leggings.getSubstituteStack( - leggingsStack, stability, affinity, enchantability, enchantmentLevel, rand); - ItemStack omegaBootsStack = - boots.getSubstituteStack(bootsStack, stability, affinity, enchantability, enchantmentLevel, rand); + Random rand = new Random( + worldSeed + stability * (affinity + 7) * 94 + + 84321 * x + - 17423 * y + + 76 * z + - 1623451 * enchantability + + 2 * enchantmentLevel); + ItemStack omegaHelmetStack = helmet + .getSubstituteStack(helmetStack, stability, affinity, enchantability, enchantmentLevel, rand); + ItemStack omegaChestStack = chestPiece + .getSubstituteStack(chestStack, stability, affinity, enchantability, enchantmentLevel, rand); + ItemStack omegaLeggingsStack = leggings + .getSubstituteStack(leggingsStack, stability, affinity, enchantability, enchantmentLevel, rand); + ItemStack omegaBootsStack = boots + .getSubstituteStack(bootsStack, stability, affinity, enchantability, enchantmentLevel, rand); armours[3] = omegaHelmetStack; armours[2] = omegaChestStack; @@ -137,8 +127,7 @@ public class OmegaParadigm { ItemStack leggingsStack = armours[1]; ItemStack bootsStack = armours[0]; - return helmetStack != null - && helmetStack.getItem() == helmet + return helmetStack != null && helmetStack.getItem() == helmet && chestStack != null && chestStack.getItem() == chestPiece && leggingsStack != null diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java index 2ff3674a..a931df4a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.omega; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -10,7 +7,12 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; + public class OmegaParadigmEarth extends OmegaParadigm { + public OmegaParadigmEarth(OmegaArmour helmet, OmegaArmour chestPiece, OmegaArmour leggings, OmegaArmour boots) { super( ReagentRegistry.terraeReagent, @@ -23,10 +25,10 @@ public class OmegaParadigmEarth extends OmegaParadigm { @Override public float getCostPerTickOfUse(EntityPlayer player) { - // if(player.isBurning()) - // { - // return 0.5f; - // } + // if(player.isBurning()) + // { + // return 0.5f; + // } return 1; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java index ad399095..fbbd57e8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java @@ -1,7 +1,5 @@ package WayofTime.alchemicalWizardry.common.omega; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -10,7 +8,11 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; + public class OmegaParadigmFire extends OmegaParadigm { + public OmegaParadigmFire(OmegaArmour helmet, OmegaArmour chestPiece, OmegaArmour leggings, OmegaArmour boots) { super( ReagentRegistry.incendiumReagent, diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java index 7aa2cf61..e8948d50 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java @@ -1,9 +1,5 @@ package WayofTime.alchemicalWizardry.common.omega; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMimicBlock; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -13,7 +9,13 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; +import WayofTime.alchemicalWizardry.common.tileEntity.TEMimicBlock; + public class OmegaParadigmWater extends OmegaParadigm { + public OmegaParadigmWater(OmegaArmour helmet, OmegaArmour chestPiece, OmegaArmour leggings, OmegaArmour boots) { super( ReagentRegistry.aquasalusReagent, @@ -68,7 +70,14 @@ public class OmegaParadigmWater extends OmegaParadigm { for (int j = -range; j <= range; j++) { for (int k = -range; k <= range; k++) { TEMimicBlock.createMimicBlockAtLocation( - world, x + i, y + j, z + k, 300, Blocks.water, 0, ReagentRegistry.aquasalusReagent); + world, + x + i, + y + j, + z + k, + 300, + Blocks.water, + 0, + ReagentRegistry.aquasalusReagent); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java index 5f22a559..8d851e82 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java @@ -1,7 +1,5 @@ package WayofTime.alchemicalWizardry.common.omega; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -9,7 +7,11 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; + public class OmegaParadigmWind extends OmegaParadigm { + public OmegaParadigmWind(OmegaArmour helmet, OmegaArmour chestPiece, OmegaArmour leggings, OmegaArmour boots) { super( ReagentRegistry.aetherReagent, @@ -31,8 +33,7 @@ public class OmegaParadigmWind extends OmegaParadigm { @Override public void onUpdate(World world, EntityPlayer player, ItemStack stack) { - if (world.getWorldTime() % 100 == 0 - && !world.isRemote + if (world.getWorldTime() % 100 == 0 && !world.isRemote && player.posY > 128 && player.getHealth() < player.getMaxHealth()) { player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, player.posY > 128 + 64 ? 1 : 0, true)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaRegistry.java index 64c4ee5c..20c0432b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaRegistry.java @@ -1,12 +1,15 @@ package WayofTime.alchemicalWizardry.common.omega; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; import java.util.HashMap; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; + public class OmegaRegistry { + public static HashMap omegaList = new HashMap(); public static void registerParadigm(Reagent reagent, OmegaParadigm parad) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java index 930448f5..d7dcb8d7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java @@ -1,24 +1,26 @@ package WayofTime.alchemicalWizardry.common.omega; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.Int3; import net.minecraft.block.Block; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.api.Int3; + public class OmegaStructureHandler { + public static final OmegaStructureParameters emptyParam = new OmegaStructureParameters(0, 0, 0); public static boolean isStructureIntact(World world, int x, int y, int z) { return true; } - public static OmegaStructureParameters getStructureStabilityFactor( - World world, int x, int y, int z, int expLim, Int3 offset) { + public static OmegaStructureParameters getStructureStabilityFactor(World world, int x, int y, int z, int expLim, + Int3 offset) { int range = expLim; - int[][][] boolList = new int[range * 2 + 1][range * 2 + 1] - [range * 2 - + 1]; // 0 indicates unchecked, 1 indicates checked and is air, -1 indicates checked to be right + int[][][] boolList = new int[range * 2 + 1][range * 2 + 1][range * 2 + 1]; // 0 indicates unchecked, 1 indicates + // checked and is air, -1 indicates + // checked to be right // next to air blocks in question but is NOT air for (int i = 0; i < 2 * range + 1; i++) { @@ -43,8 +45,8 @@ public class OmegaStructureHandler { Block block = world.getBlock(x - range + i - 1, y - range + j, z - range + k); if (world.isAirBlock(x - range + i - 1, y - range + j, z - range + k) || block == ModBlocks.blockSpectralContainer) { - if (i - 1 - == 0) // One of the found air blocks is at the range boundary, and thus the + if (i - 1 == 0) // One of the found air blocks is at the range boundary, and thus + // the // container is incomplete { return emptyParam; @@ -172,17 +174,25 @@ public class OmegaStructureHandler { int meta = world.getBlockMetadata(x - range + i, y - range + j, z - range + k); if (block instanceof IEnchantmentGlyph) { - tally += ((IEnchantmentGlyph) block) - .getAdditionalStabilityForFaceCount( - world, x - range + i, y - range + j, z - range + k, meta, indTally); + tally += ((IEnchantmentGlyph) block).getAdditionalStabilityForFaceCount( + world, + x - range + i, + y - range + j, + z - range + k, + meta, + indTally); enchantability += ((IEnchantmentGlyph) block) .getEnchantability(world, x - range + i, y - range + j, z - range + k, meta); enchantmentLevel += ((IEnchantmentGlyph) block) .getEnchantmentLevel(world, x - range + i, y - range + j, z - range + k, meta); } else if (block instanceof IStabilityGlyph) { - tally += ((IStabilityGlyph) block) - .getAdditionalStabilityForFaceCount( - world, x - range + i, y - range + j, z - range + k, meta, indTally); + tally += ((IStabilityGlyph) block).getAdditionalStabilityForFaceCount( + world, + x - range + i, + y - range + j, + z - range + k, + meta, + indTally); } else { tally += indTally; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureParameters.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureParameters.java index 1adbf41d..32521d5c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureParameters.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureParameters.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common.omega; public class OmegaStructureParameters { + public final int stability; public final int enchantability; public final int enchantmentLevel; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/ReagentRegenConfiguration.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/ReagentRegenConfiguration.java index 67d0f609..e7785270 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/ReagentRegenConfiguration.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/ReagentRegenConfiguration.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common.omega; public class ReagentRegenConfiguration { + public int tickRate; public int healPerTick; public float costPerPoint; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionAmphibian.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionAmphibian.java index 93f115b5..e9292805 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionAmphibian.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionAmphibian.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; public class PotionAmphibian extends Potion { + public PotionAmphibian(int par1, boolean par2, int par3) { super(par1, par2, par3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBoost.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBoost.java index dced43c5..4cd8ef2b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBoost.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBoost.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; public class PotionBoost extends Potion { + public PotionBoost(int par1, boolean par2, int par3) { super(par1, par2, par3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDeaf.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDeaf.java index 03a5204e..04799229 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDeaf.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDeaf.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; public class PotionDeaf extends Potion { + public PotionDeaf(int par1, boolean par2, int par3) { super(par1, par2, par3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDemonCloak.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDemonCloak.java index 88be3a0a..6358c71f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDemonCloak.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDemonCloak.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; public class PotionDemonCloak extends Potion { + public PotionDemonCloak(int par1, boolean par2, int par3) { super(par1, par2, par3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDrowning.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDrowning.java index cd1dee1a..ab60f90f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDrowning.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDrowning.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; public class PotionDrowning extends Potion { + public PotionDrowning(int par1, boolean par2, int par3) { super(par1, par2, par3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFeatherFall.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFeatherFall.java index c935ce7b..0064d036 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFeatherFall.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFeatherFall.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; public class PotionFeatherFall extends Potion { + public PotionFeatherFall(int par1, boolean par2, int par3) { super(par1, par2, par3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFireFuse.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFireFuse.java index 56299176..bc1d29bd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFireFuse.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFireFuse.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; public class PotionFireFuse extends Potion { + public PotionFireFuse(int par1, boolean par2, int par3) { super(par1, par2, par3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlameCloak.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlameCloak.java index 8e268d60..303430bd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlameCloak.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlameCloak.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; public class PotionFlameCloak extends Potion { + public PotionFlameCloak(int par1, boolean par2, int par3) { super(par1, par2, par3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlight.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlight.java index d04d5a41..797b9095 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlight.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlight.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; public class PotionFlight extends Potion { + public PotionFlight(int par1, boolean par2, int par3) { super(par1, par2, par3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionHeavyHeart.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionHeavyHeart.java index 87a71879..95a9ad72 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionHeavyHeart.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionHeavyHeart.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; public class PotionHeavyHeart extends Potion { + public PotionHeavyHeart(int par1, boolean par2, int par3) { super(par1, par2, par3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionIceCloak.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionIceCloak.java index ffbd9e9a..3fd112dc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionIceCloak.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionIceCloak.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; public class PotionIceCloak extends Potion { + public PotionIceCloak(int par1, boolean par2, int par3) { super(par1, par2, par3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionInhibit.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionInhibit.java index c9a4431f..1a0d2d9b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionInhibit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionInhibit.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; public class PotionInhibit extends Potion { + public PotionInhibit(int par1, boolean par2, int par3) { super(par1, par2, par3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionPlanarBinding.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionPlanarBinding.java index c2a16632..f731be7f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionPlanarBinding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionPlanarBinding.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; public class PotionPlanarBinding extends Potion { + public PotionPlanarBinding(int par1, boolean par2, int par3) { super(par1, par2, par3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionProjectileProtect.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionProjectileProtect.java index 0ac502cb..3a7db7d9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionProjectileProtect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionProjectileProtect.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; public class PotionProjectileProtect extends Potion { + public PotionProjectileProtect(int par1, boolean par2, int par3) { super(par1, par2, par3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionReciprocation.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionReciprocation.java index 14d7d7a2..e5f8b3c4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionReciprocation.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionReciprocation.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; public class PotionReciprocation extends Potion { + public PotionReciprocation(int par1, boolean par2, int par3) { super(par1, par2, par3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java index 394c5eb2..77d2f2cb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.potion; import java.util.ArrayList; + import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; public class PotionSoulFray extends Potion { + public PotionSoulFray(int par1, boolean par2, int par3) { super(par1, par2, par3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulHarden.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulHarden.java index b2485ecc..203def2e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulHarden.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulHarden.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; public class PotionSoulHarden extends Potion { + public PotionSoulHarden(int par1, boolean par2, int par3) { super(par1, par2, par3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java index 119c127f..10d25843 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java @@ -1,15 +1,18 @@ package WayofTime.alchemicalWizardry.common.renderer; -import WayofTime.alchemicalWizardry.api.renderer.MRSRenderer; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import net.minecraft.client.renderer.Tessellator; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.api.renderer.MRSRenderer; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; + public class AlchemyCircleRenderer extends MRSRenderer { - private ResourceLocation resourceLocation = - new ResourceLocation("alchemicalwizardry:textures/models/TransCircle.png"); + + private ResourceLocation resourceLocation = new ResourceLocation( + "alchemicalwizardry:textures/models/TransCircle.png"); private int colourRed; private int colourGreen; private int colourBlue; @@ -21,18 +24,8 @@ public class AlchemyCircleRenderer extends MRSRenderer { private double initialY; private boolean renderWithoutReagents; - public AlchemyCircleRenderer( - ResourceLocation resource, - int red, - int green, - int blue, - int intensity, - double xOff, - double initialY, - double yOff, - double zOff, - double radius, - boolean renderWithoutReagents) { + public AlchemyCircleRenderer(ResourceLocation resource, int red, int green, int blue, int intensity, double xOff, + double initialY, double yOff, double zOff, double radius, boolean renderWithoutReagents) { this.resourceLocation = resource; this.colourRed = red; this.colourGreen = green; @@ -62,10 +55,10 @@ public class AlchemyCircleRenderer extends MRSRenderer { GL11.glDisable(GL11.GL_CULL_FACE); float f2 = 0; float f3 = -f2 * 0.2F - (float) MathHelper.floor_float(-f2 * 0.1F); - // GL11.glEnable(GL11.GL_BLEND); - // GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + // GL11.glEnable(GL11.GL_BLEND); + // GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - // GL11.glDepthMask(false); + // GL11.glDepthMask(false); tessellator.startDrawingQuads(); tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity); @@ -89,7 +82,7 @@ public class AlchemyCircleRenderer extends MRSRenderer { tessellator.draw(); - // GL11.glDepthMask(true); + // GL11.glDepthMask(true); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_TEXTURE_2D); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/BeamRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/BeamRenderer.java index aeaa7034..07f9b127 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/BeamRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/BeamRenderer.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.renderer; -import WayofTime.alchemicalWizardry.api.ColourAndCoords; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.api.ColourAndCoords; + public class BeamRenderer { + private static final ResourceLocation field_110629_a = new ResourceLocation("textures/entity/beacon_beam.png"); public int xInit; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java index 32f16ea3..4eb57df5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java @@ -1,11 +1,5 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelAlchemicalCalcinator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.RenderItem; @@ -17,9 +11,18 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.util.ForgeDirection; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelAlchemicalCalcinator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; +import cpw.mods.fml.client.FMLClientHandler; + public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer { + private final RenderItem customRenderItem; private ModelAlchemicalCalcinator modelConduit = new ModelAlchemicalCalcinator(); @@ -27,6 +30,7 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer { public RenderAlchemicCalcinator() { customRenderItem = new RenderItem() { + @Override public boolean shouldBob() { return false; @@ -134,8 +138,8 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer { } } - private void renderTankContents( - double x, double y, double z, int colourRed, int colourGreen, int colourBlue, int colourIntensity) { + private void renderTankContents(double x, double y, double z, int colourRed, int colourGreen, int colourBlue, + int colourIntensity) { GL11.glPushMatrix(); Tessellator tessellator = Tessellator.instance; this.bindTexture(resourceLocation); @@ -304,8 +308,8 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer { } } - private void translateGhostItemByOrientation( - ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection) { + private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, + ForgeDirection forgeDirection) { if (ghostItemStack != null) { if (ghostItemStack.getItem() instanceof ItemBlock) { switch (forgeDirection) { @@ -343,8 +347,7 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer { return; } - default: { - } + default: {} } } else { switch (forgeDirection) { @@ -382,8 +385,7 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer { return; } - default: { - } + default: {} } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java index 1f934f7d..89909139 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java @@ -1,15 +1,18 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelConduit; -import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelConduit; +import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; +import cpw.mods.fml.client.FMLClientHandler; + public class RenderConduit extends TileEntitySpecialRenderer { + private ModelConduit modelConduit = new ModelConduit(); @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java index 213cc292..36f605d0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java @@ -1,20 +1,23 @@ package WayofTime.alchemicalWizardry.common.renderer.block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.util.ForgeDirection; + +import org.lwjgl.opengl.GL11; + import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar; import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; import cpw.mods.fml.client.FMLClientHandler; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.MathHelper; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.util.ForgeDirection; -import org.lwjgl.opengl.GL11; public class RenderCrystalBelljar extends TileEntitySpecialRenderer { + private ModelCrystalBelljar modelConduit = new ModelCrystalBelljar(); private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/Reagent.png"); @@ -52,8 +55,8 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer { } } - private void renderTankContents( - double x, double y, double z, int colourRed, int colourGreen, int colourBlue, int colourIntensity) { + private void renderTankContents(double x, double y, double z, int colourRed, int colourGreen, int colourBlue, + int colourIntensity) { GL11.glPushMatrix(); float f1 = 1.0f; Tessellator tessellator = Tessellator.instance; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderMasterStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderMasterStone.java index 34a9f0a6..ad9e2f78 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderMasterStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderMasterStone.java @@ -1,12 +1,14 @@ package WayofTime.alchemicalWizardry.common.renderer.block; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; + import WayofTime.alchemicalWizardry.api.renderer.MRSRenderer; import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; public class RenderMasterStone extends TileEntitySpecialRenderer { + @Override public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { if (tileEntity instanceof TEMasterStone) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java index ae8c6af4..64f32baa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelPedestal; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderManager; @@ -13,14 +10,21 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.util.ForgeDirection; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelPedestal; +import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; +import cpw.mods.fml.client.FMLClientHandler; + public class RenderPedestal extends TileEntitySpecialRenderer { + private ModelPedestal modelPedestal = new ModelPedestal(); private final RenderItem customRenderItem; public RenderPedestal() { customRenderItem = new RenderItem() { + @Override public boolean shouldBob() { return false; @@ -125,8 +129,8 @@ public class RenderPedestal extends TileEntitySpecialRenderer { return scaleFactor; } - private void translateGhostItemByOrientation( - ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection) { + private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, + ForgeDirection forgeDirection) { if (ghostItemStack != null) { if (ghostItemStack.getItem() instanceof ItemBlock) { switch (forgeDirection) { @@ -164,8 +168,7 @@ public class RenderPedestal extends TileEntitySpecialRenderer { return; } - default: { - } + default: {} } } else { switch (forgeDirection) { @@ -203,8 +206,7 @@ public class RenderPedestal extends TileEntitySpecialRenderer { return; } - default: { - } + default: {} } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java index 646ddca2..63b4371c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelPlinth; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderManager; @@ -13,14 +10,21 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.util.ForgeDirection; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelPlinth; +import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; +import cpw.mods.fml.client.FMLClientHandler; + public class RenderPlinth extends TileEntitySpecialRenderer { + private ModelPlinth modelPlinth = new ModelPlinth(); private final RenderItem customRenderItem; public RenderPlinth() { customRenderItem = new RenderItem() { + @Override public boolean shouldBob() { return false; @@ -59,7 +63,9 @@ public class RenderPlinth extends TileEntitySpecialRenderer { GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.7F, (float) d2 + 0.5F); } else { GL11.glTranslatef( - (float) d0 + 0.5F, (float) d1 + displacement + 10.4f / 16.0f, (float) d2 + 0.5F - 0.1875f); + (float) d0 + 0.5F, + (float) d1 + displacement + 10.4f / 16.0f, + (float) d2 + 0.5F - 0.1875f); } GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); @@ -123,8 +129,8 @@ public class RenderPlinth extends TileEntitySpecialRenderer { return scaleFactor; } - private void translateGhostItemByOrientation( - ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection) { + private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, + ForgeDirection forgeDirection) { if (ghostItemStack != null) { if (ghostItemStack.getItem() instanceof ItemBlock) { switch (forgeDirection) { @@ -162,8 +168,7 @@ public class RenderPlinth extends TileEntitySpecialRenderer { return; } - default: { - } + default: {} } } else { switch (forgeDirection) { @@ -201,8 +206,7 @@ public class RenderPlinth extends TileEntitySpecialRenderer { return; } - default: { - } + default: {} } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderReagentConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderReagentConduit.java index 67e4582e..0c8f9ccc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderReagentConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderReagentConduit.java @@ -1,16 +1,19 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; + public class RenderReagentConduit extends TileEntitySpecialRenderer { - private static final ResourceLocation field_110629_a = - new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"); + + private static final ResourceLocation field_110629_a = new ResourceLocation( + "alchemicalwizardry:textures/models/SimpleTransCircle.png"); @Override public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEffectBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEffectBlock.java index a94740a5..b3ed37a7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEffectBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEffectBlock.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.renderer.block; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; + +import org.lwjgl.opengl.GL11; + import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEffectBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock; import cpw.mods.fml.client.FMLClientHandler; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; public class RenderSpellEffectBlock extends TileEntitySpecialRenderer { + private ModelSpellEffectBlock modelSpellEffectBlock = new ModelSpellEffectBlock(); @Override @@ -18,8 +21,8 @@ public class RenderSpellEffectBlock extends TileEntitySpecialRenderer { GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); ResourceLocation test; - int meta = - tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); + int meta = tileEntity.getWorldObj() + .getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); String resource = tileSpellBlock.getResourceLocationForMeta(meta); test = new ResourceLocation(resource); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEnhancementBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEnhancementBlock.java index 7de1b873..6cbaa4fe 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEnhancementBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEnhancementBlock.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.renderer.block; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; + +import org.lwjgl.opengl.GL11; + import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; import cpw.mods.fml.client.FMLClientHandler; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; public class RenderSpellEnhancementBlock extends TileEntitySpecialRenderer { + private ModelSpellEnhancementBlock modelSpellEnhancementBlock = new ModelSpellEnhancementBlock(); @Override @@ -18,8 +21,8 @@ public class RenderSpellEnhancementBlock extends TileEntitySpecialRenderer { GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); ResourceLocation test; - int meta = - tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); + int meta = tileEntity.getWorldObj() + .getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); String resource = tileSpellBlock.getResourceLocationForMeta(meta); test = new ResourceLocation(resource); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellModifierBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellModifierBlock.java index f8bc9723..a5bc2cc9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellModifierBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellModifierBlock.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.renderer.block; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; + +import org.lwjgl.opengl.GL11; + import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellModifierBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; import cpw.mods.fml.client.FMLClientHandler; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; public class RenderSpellModifierBlock extends TileEntitySpecialRenderer { + private ModelSpellModifierBlock modelSpellModifierBlock = new ModelSpellModifierBlock(); @Override @@ -18,8 +21,8 @@ public class RenderSpellModifierBlock extends TileEntitySpecialRenderer { GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); ResourceLocation test; - int meta = - tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); + int meta = tileEntity.getWorldObj() + .getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); String resource = tileSpellBlock.getResourceLocationForMeta(meta); test = new ResourceLocation(resource); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellParadigmBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellParadigmBlock.java index 28105cdc..e7892f55 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellParadigmBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellParadigmBlock.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.renderer.block; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; + +import org.lwjgl.opengl.GL11; + import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellParadigmBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; import cpw.mods.fml.client.FMLClientHandler; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; public class RenderSpellParadigmBlock extends TileEntitySpecialRenderer { + private ModelSpellParadigmBlock modelSpellParadigmBlock = new ModelSpellParadigmBlock(); @Override @@ -18,8 +21,8 @@ public class RenderSpellParadigmBlock extends TileEntitySpecialRenderer { GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); ResourceLocation test; - int meta = - tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); + int meta = tileEntity.getWorldObj() + .getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); String resource = tileSpellBlock.getResourceLocationForMeta(meta); test = new ResourceLocation(resource); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java index 1350185c..47dd41e4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderManager; @@ -13,14 +10,21 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.util.ForgeDirection; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import cpw.mods.fml.client.FMLClientHandler; + public class RenderWritingTable extends TileEntitySpecialRenderer { + private ModelWritingTable modelWritingTable = new ModelWritingTable(); private final RenderItem customRenderItem; public RenderWritingTable() { customRenderItem = new RenderItem() { + @Override public boolean shouldBob() { return false; @@ -193,8 +197,8 @@ public class RenderWritingTable extends TileEntitySpecialRenderer { } } - private void translateGhostItemByOrientation( - ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection) { + private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, + ForgeDirection forgeDirection) { if (ghostItemStack != null) { if (ghostItemStack.getItem() instanceof ItemBlock) { switch (forgeDirection) { @@ -232,8 +236,7 @@ public class RenderWritingTable extends TileEntitySpecialRenderer { return; } - default: { - } + default: {} } } else { switch (forgeDirection) { @@ -271,8 +274,7 @@ public class RenderWritingTable extends TileEntitySpecialRenderer { return; } - default: { - } + default: {} } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java index b6afb745..d9132aec 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java @@ -1,7 +1,5 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderManager; @@ -11,14 +9,20 @@ import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; + public class TEAltarRenderer extends TileEntitySpecialRenderer { + private ModelBloodAltar modelBloodAltar = new ModelBloodAltar(); private final RenderItem customRenderItem; public TEAltarRenderer() { customRenderItem = new RenderItem() { + @Override public boolean shouldBob() { return false; @@ -110,8 +114,8 @@ public class TEAltarRenderer extends TileEntitySpecialRenderer { return scaleFactor; } - private void translateGhostItemByOrientation( - ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection) { + private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, + ForgeDirection forgeDirection) { if (ghostItemStack != null) { if (ghostItemStack.getItem() instanceof ItemBlock) { switch (forgeDirection) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAlchemicalCalcinatorItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAlchemicalCalcinatorItemRenderer.java index 01555384..6342b894 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAlchemicalCalcinatorItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAlchemicalCalcinatorItemRenderer.java @@ -1,18 +1,21 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelAlchemicalCalcinator; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelAlchemicalCalcinator; +import cpw.mods.fml.client.FMLClientHandler; + public class TEAlchemicalCalcinatorItemRenderer implements IItemRenderer { + private ModelAlchemicalCalcinator modelConduit = new ModelAlchemicalCalcinator(); - private void renderConduitItem( - RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) { + private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, + float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef(translateX + 0.5F, translateY + 1.5F, translateZ + 0.5F); ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/AlchemicalCalcinator.png"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAltarItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAltarItemRenderer.java index f8ef4e20..d5a04fdd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAltarItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAltarItemRenderer.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar; +import cpw.mods.fml.client.FMLClientHandler; + public class TEAltarItemRenderer implements IItemRenderer { + private ModelBloodAltar modelBloodAltar; public TEAltarItemRenderer() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java index 00889ad8..60be3cdf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java @@ -1,11 +1,5 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.ItemRenderer; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; @@ -13,17 +7,26 @@ import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import cpw.mods.fml.client.FMLClientHandler; + public class TEBellJarItemRenderer implements IItemRenderer { + ItemRenderer d; private ModelCrystalBelljar modelConduit = new ModelCrystalBelljar(); - private ResourceLocation mainResource = - new ResourceLocation("alchemicalwizardry:textures/models/CrystalBelljar.png"); + private ResourceLocation mainResource = new ResourceLocation( + "alchemicalwizardry:textures/models/CrystalBelljar.png"); private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/Reagent.png"); - private void renderConduitItem( - RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) { + private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, + float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F); FMLClientHandler.instance().getClient().renderEngine.bindTexture(mainResource); @@ -67,8 +70,8 @@ public class TEBellJarItemRenderer implements IItemRenderer { GL11.glDisable(GL11.GL_BLEND); } - private void renderTankContents( - double x, double y, double z, int colourRed, int colourGreen, int colourBlue, int colourIntensity) { + private void renderTankContents(double x, double y, double z, int colourRed, int colourGreen, int colourBlue, + int colourIntensity) { GL11.glPushMatrix(); Tessellator tessellator = Tessellator.instance; FMLClientHandler.instance().getClient().renderEngine.bindTexture(resourceLocation); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEConduitItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEConduitItemRenderer.java index 5ed9ecde..12ed671d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEConduitItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEConduitItemRenderer.java @@ -1,28 +1,31 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelConduit; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.common.util.ForgeDirection; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelConduit; +import cpw.mods.fml.client.FMLClientHandler; + public class TEConduitItemRenderer implements IItemRenderer { + private ModelConduit modelConduit = new ModelConduit(); - private void renderConduitItem( - RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) { + private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, + float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F); ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/Conduit.png"); FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelConduit.render( - (Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); + this.modelConduit + .render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); GL11.glPopMatrix(); GL11.glPopMatrix(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEffectBlockItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEffectBlockItemRenderer.java index 5a9db90d..e29ef41f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEffectBlockItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEffectBlockItemRenderer.java @@ -1,20 +1,23 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEffectBlock; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.common.util.ForgeDirection; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEffectBlock; +import cpw.mods.fml.client.FMLClientHandler; + public class TESpellEffectBlockItemRenderer implements IItemRenderer { + private ModelSpellEffectBlock modelSpellBlock = new ModelSpellEffectBlock(); - private void renderConduitItem( - RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) { + private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, + float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F); ResourceLocation test = new ResourceLocation(this.getResourceLocationForMeta(item.getItemDamage())); @@ -22,8 +25,8 @@ public class TESpellEffectBlockItemRenderer implements IItemRenderer { FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelSpellBlock.render( - (Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); + this.modelSpellBlock + .render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); GL11.glPopMatrix(); GL11.glPopMatrix(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEnhancementBlockItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEnhancementBlockItemRenderer.java index c9c67657..3f490732 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEnhancementBlockItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEnhancementBlockItemRenderer.java @@ -1,20 +1,23 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.common.util.ForgeDirection; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock; +import cpw.mods.fml.client.FMLClientHandler; + public class TESpellEnhancementBlockItemRenderer implements IItemRenderer { + private ModelSpellEnhancementBlock modelSpellBlock = new ModelSpellEnhancementBlock(); - private void renderConduitItem( - RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) { + private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, + float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F); ResourceLocation test = new ResourceLocation(this.getResourceLocationForMeta(item.getItemDamage())); @@ -22,8 +25,8 @@ public class TESpellEnhancementBlockItemRenderer implements IItemRenderer { FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelSpellBlock.render( - (Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); + this.modelSpellBlock + .render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); GL11.glPopMatrix(); GL11.glPopMatrix(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellModifierBlockItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellModifierBlockItemRenderer.java index e5ef0cc6..fa3a6fe8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellModifierBlockItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellModifierBlockItemRenderer.java @@ -1,20 +1,23 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellModifierBlock; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.common.util.ForgeDirection; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellModifierBlock; +import cpw.mods.fml.client.FMLClientHandler; + public class TESpellModifierBlockItemRenderer implements IItemRenderer { + private ModelSpellModifierBlock modelSpellBlock = new ModelSpellModifierBlock(); - private void renderConduitItem( - RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) { + private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, + float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F); ResourceLocation test = new ResourceLocation(this.getResourceLocationForMeta(item.getItemDamage())); @@ -22,8 +25,8 @@ public class TESpellModifierBlockItemRenderer implements IItemRenderer { FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelSpellBlock.render( - (Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); + this.modelSpellBlock + .render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); GL11.glPopMatrix(); GL11.glPopMatrix(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellParadigmBlockItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellParadigmBlockItemRenderer.java index 93272438..0cafb727 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellParadigmBlockItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellParadigmBlockItemRenderer.java @@ -1,28 +1,31 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellParadigmBlock; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.common.util.ForgeDirection; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellParadigmBlock; +import cpw.mods.fml.client.FMLClientHandler; + public class TESpellParadigmBlockItemRenderer implements IItemRenderer { + private ModelSpellParadigmBlock modelSpellBlock = new ModelSpellParadigmBlock(); - private void renderConduitItem( - RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) { + private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, + float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F); ResourceLocation test = new ResourceLocation(this.getResourceLocationForMeta(item.getItemDamage())); FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelSpellBlock.render( - (Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); + this.modelSpellBlock + .render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); GL11.glPopMatrix(); GL11.glPopMatrix(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEWritingTableItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEWritingTableItemRenderer.java index 271328ed..52931e95 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEWritingTableItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEWritingTableItemRenderer.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable; +import cpw.mods.fml.client.FMLClientHandler; + public class TEWritingTableItemRenderer implements IItemRenderer { + private ModelWritingTable model; public TEWritingTableItemRenderer() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java index 96773ed3..27fe4ca9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBileDemon; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityBileDemon; + public class RenderBileDemon extends RenderLiving { - private static final ResourceLocation field_110833_a = - new ResourceLocation("alchemicalwizardry", "textures/models/BileDemon.png"); + + private static final ResourceLocation field_110833_a = new ResourceLocation( + "alchemicalwizardry", + "textures/models/BileDemon.png"); public RenderBileDemon(ModelBase par1ModelBase, float par2) { super(par1ModelBase, par2); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java index 5799e1a3..ef761e50 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBoulderFist; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityBoulderFist; + public class RenderBoulderFist extends RenderLiving { - private static final ResourceLocation field_110833_a = - new ResourceLocation("alchemicalwizardry", "textures/models/BoulderFist.png"); + + private static final ResourceLocation field_110833_a = new ResourceLocation( + "alchemicalwizardry", + "textures/models/BoulderFist.png"); public RenderBoulderFist(ModelBase par1ModelBase, float par2) { super(par1ModelBase, par2); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java index 7e631390..ac850577 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java @@ -1,24 +1,32 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; -import WayofTime.alchemicalWizardry.common.entity.mob.*; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; +import WayofTime.alchemicalWizardry.common.entity.mob.*; + public class RenderElemental extends RenderLiving { - private static final ResourceLocation airBeacon = - new ResourceLocation("alchemicalwizardry", "textures/models/AirFloatingBeacon.png"); - private static final ResourceLocation waterBeacon = - new ResourceLocation("alchemicalwizardry", "textures/models/WaterFloatingBeacon.png"); - private static final ResourceLocation earthBeacon = - new ResourceLocation("alchemicalwizardry", "textures/models/EarthFloatingBeacon.png"); - private static final ResourceLocation fireBeacon = - new ResourceLocation("alchemicalwizardry", "textures/models/FireFloatingBeacon.png"); - private static final ResourceLocation shadeBeacon = - new ResourceLocation("alchemicalwizardry", "textures/models/DarkFloatingBeacon.png"); - private static final ResourceLocation holyBeacon = - new ResourceLocation("alchemicalwizardry", "textures/models/HolyFloatingBeacon.png"); + + private static final ResourceLocation airBeacon = new ResourceLocation( + "alchemicalwizardry", + "textures/models/AirFloatingBeacon.png"); + private static final ResourceLocation waterBeacon = new ResourceLocation( + "alchemicalwizardry", + "textures/models/WaterFloatingBeacon.png"); + private static final ResourceLocation earthBeacon = new ResourceLocation( + "alchemicalwizardry", + "textures/models/EarthFloatingBeacon.png"); + private static final ResourceLocation fireBeacon = new ResourceLocation( + "alchemicalwizardry", + "textures/models/FireFloatingBeacon.png"); + private static final ResourceLocation shadeBeacon = new ResourceLocation( + "alchemicalwizardry", + "textures/models/DarkFloatingBeacon.png"); + private static final ResourceLocation holyBeacon = new ResourceLocation( + "alchemicalwizardry", + "textures/models/HolyFloatingBeacon.png"); public RenderElemental(ModelBase par1ModelBase, float par2) { super(par1ModelBase, par2); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java index b9e07a67..01480427 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java @@ -1,17 +1,20 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + @SideOnly(Side.CLIENT) public class RenderFallenAngel extends RenderLiving { - private static final ResourceLocation field_110833_a = - new ResourceLocation("alchemicalwizardry", "textures/models/WingedAngel.png"); + + private static final ResourceLocation field_110833_a = new ResourceLocation( + "alchemicalwizardry", + "textures/models/WingedAngel.png"); public RenderFallenAngel(ModelBase par1ModelBase, float par2) { super(par1ModelBase, par2); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java index 17896de4..40b66902 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon; + public class RenderIceDemon extends RenderLiving { - private static final ResourceLocation field_110833_a = - new ResourceLocation("alchemicalwizardry", "textures/models/IceDemon.png"); + + private static final ResourceLocation field_110833_a = new ResourceLocation( + "alchemicalwizardry", + "textures/models/IceDemon.png"); public RenderIceDemon(ModelBase par1ModelBase, float par2) { super(par1ModelBase, par2); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java index e72a396c..dd46553d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; + public class RenderLowerGuardian extends RenderLiving { - private static final ResourceLocation field_110833_a = - new ResourceLocation("alchemicalwizardry", "textures/models/LowerGuardian.png"); + + private static final ResourceLocation field_110833_a = new ResourceLocation( + "alchemicalwizardry", + "textures/models/LowerGuardian.png"); public RenderLowerGuardian(ModelBase par1ModelBase, float par2) { super(par1ModelBase, par2); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGrunt.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGrunt.java index 127b6e56..f7b794d7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGrunt.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGrunt.java @@ -1,26 +1,33 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.renderer.entity.RenderLiving; +import net.minecraft.entity.Entity; +import net.minecraft.util.ResourceLocation; + import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGrunt; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntEarth; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntFire; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntIce; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntWind; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.entity.Entity; -import net.minecraft.util.ResourceLocation; public class RenderMinorDemonGrunt extends RenderLiving { - private static final ResourceLocation normalTexture = - new ResourceLocation("alchemicalwizardry", "textures/models/MinorDemonGrunt_normal.png"); - private static final ResourceLocation fireTexture = - new ResourceLocation("alchemicalwizardry", "textures/models/MinorDemonGrunt_fire.png"); - private static final ResourceLocation iceTexture = - new ResourceLocation("alchemicalwizardry", "textures/models/MinorDemonGrunt_ice.png"); - private static final ResourceLocation windTexture = - new ResourceLocation("alchemicalwizardry", "textures/models/MinorDemonGrunt_wind.png"); - private static final ResourceLocation earthTexture = - new ResourceLocation("alchemicalwizardry", "textures/models/MinorDemonGrunt_earth.png"); + + private static final ResourceLocation normalTexture = new ResourceLocation( + "alchemicalwizardry", + "textures/models/MinorDemonGrunt_normal.png"); + private static final ResourceLocation fireTexture = new ResourceLocation( + "alchemicalwizardry", + "textures/models/MinorDemonGrunt_fire.png"); + private static final ResourceLocation iceTexture = new ResourceLocation( + "alchemicalwizardry", + "textures/models/MinorDemonGrunt_ice.png"); + private static final ResourceLocation windTexture = new ResourceLocation( + "alchemicalwizardry", + "textures/models/MinorDemonGrunt_wind.png"); + private static final ResourceLocation earthTexture = new ResourceLocation( + "alchemicalwizardry", + "textures/models/MinorDemonGrunt_earth.png"); public RenderMinorDemonGrunt(ModelBase par1ModelBase, float par2) { super(par1ModelBase, par2); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGruntGuardian.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGruntGuardian.java index 81d83f37..0d609d55 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGruntGuardian.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGruntGuardian.java @@ -1,26 +1,33 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.renderer.entity.RenderLiving; +import net.minecraft.entity.Entity; +import net.minecraft.util.ResourceLocation; + import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardian; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardianEarth; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardianFire; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardianIce; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardianWind; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.entity.Entity; -import net.minecraft.util.ResourceLocation; public class RenderMinorDemonGruntGuardian extends RenderLiving { - private static final ResourceLocation normalTexture = - new ResourceLocation("alchemicalwizardry", "textures/models/MinorDemonGruntGuardian_normal.png"); - private static final ResourceLocation fireTexture = - new ResourceLocation("alchemicalwizardry", "textures/models/MinorDemonGruntGuardian_fire.png"); - private static final ResourceLocation iceTexture = - new ResourceLocation("alchemicalwizardry", "textures/models/MinorDemonGruntGuardian_ice.png"); - private static final ResourceLocation windTexture = - new ResourceLocation("alchemicalwizardry", "textures/models/MinorDemonGruntGuardian_wind.png"); - private static final ResourceLocation earthTexture = - new ResourceLocation("alchemicalwizardry", "textures/models/MinorDemonGruntGuardian_earth.png"); + + private static final ResourceLocation normalTexture = new ResourceLocation( + "alchemicalwizardry", + "textures/models/MinorDemonGruntGuardian_normal.png"); + private static final ResourceLocation fireTexture = new ResourceLocation( + "alchemicalwizardry", + "textures/models/MinorDemonGruntGuardian_fire.png"); + private static final ResourceLocation iceTexture = new ResourceLocation( + "alchemicalwizardry", + "textures/models/MinorDemonGruntGuardian_ice.png"); + private static final ResourceLocation windTexture = new ResourceLocation( + "alchemicalwizardry", + "textures/models/MinorDemonGruntGuardian_wind.png"); + private static final ResourceLocation earthTexture = new ResourceLocation( + "alchemicalwizardry", + "textures/models/MinorDemonGruntGuardian_earth.png"); public RenderMinorDemonGruntGuardian(ModelBase par1ModelBase, float par2) { super(par1ModelBase, par2); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java index f28ba22d..bc14155e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityShade; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityShade; + public class RenderShade extends RenderLiving { - private static final ResourceLocation field_110833_a = - new ResourceLocation("alchemicalwizardry", "textures/models/ShadeMob.png"); + + private static final ResourceLocation field_110833_a = new ResourceLocation( + "alchemicalwizardry", + "textures/models/ShadeMob.png"); public RenderShade(ModelBase par1ModelBase, float par2) { super(par1ModelBase, par2); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java index 39b9417a..177d8297 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; -import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; +import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem; + public class RenderSmallEarthGolem extends RenderLiving { - private static final ResourceLocation field_110833_a = - new ResourceLocation("alchemicalwizardry", "textures/models/SmallEarthGolem.png"); + + private static final ResourceLocation field_110833_a = new ResourceLocation( + "alchemicalwizardry", + "textures/models/SmallEarthGolem.png"); public RenderSmallEarthGolem(ModelBase par1ModelBase, float par2) { super(par1ModelBase, par2); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java index a9f28324..546d203c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon; + public class RenderWingedFireDemon extends RenderLiving { - private static final ResourceLocation field_110833_a = - new ResourceLocation("alchemicalwizardry", "textures/models/WingedFireDemon.png"); + + private static final ResourceLocation field_110833_a = new ResourceLocation( + "alchemicalwizardry", + "textures/models/WingedFireDemon.png"); public RenderWingedFireDemon(ModelBase par1ModelBase, float par2) { super(par1ModelBase, par2); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelAlchemicalCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelAlchemicalCalcinator.java index 580c07af..209cbdcd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelAlchemicalCalcinator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelAlchemicalCalcinator.java @@ -5,6 +5,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelAlchemicalCalcinator extends ModelBase { + // fields ModelRenderer top1; ModelRenderer top2; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBileDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBileDemon.java index ff154603..f9a8bb4a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBileDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBileDemon.java @@ -4,9 +4,11 @@ import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; + import org.lwjgl.opengl.GL11; public class ModelBileDemon extends ModelBase { + // fields ModelRenderer belly; ModelRenderer chest; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java index 5321571e..53ba2cdc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.renderer.model; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.texture.TextureMap; @@ -10,17 +7,23 @@ import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.model.AdvancedModelLoader; import net.minecraftforge.client.model.IModelCustom; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; +import cpw.mods.fml.client.FMLClientHandler; + public class ModelBloodAltar extends ModelBase { - private static final ResourceLocation altar_texture = - new ResourceLocation("alchemicalwizardry:textures/models/altar.png"); + + private static final ResourceLocation altar_texture = new ResourceLocation( + "alchemicalwizardry:textures/models/altar.png"); private IModelCustom modelBloodAltar; public ModelBloodAltar() { - modelBloodAltar = - AdvancedModelLoader.loadModel(new ResourceLocation("alchemicalwizardry:models/bloodaltar-fixeUV.obj")); + modelBloodAltar = AdvancedModelLoader + .loadModel(new ResourceLocation("alchemicalwizardry:models/bloodaltar-fixeUV.obj")); } public void renderBloodAltar() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBoulderFist.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBoulderFist.java index 185b84ef..89d573b5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBoulderFist.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBoulderFist.java @@ -6,6 +6,7 @@ import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; public class ModelBoulderFist extends ModelBase { + // fields ModelRenderer leftFist; ModelRenderer leftArm; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java index 73b5e664..7df47a52 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java @@ -12,6 +12,7 @@ import net.minecraft.entity.Entity; import net.minecraftforge.common.util.ForgeDirection; public class ModelConduit extends ModelBase { + // fields ModelRenderer curvedInput; ModelRenderer curvedOutput; @@ -145,15 +146,7 @@ public class ModelConduit extends ModelBase { setRotation(spacer8, 0F, 0F, 0F); } - public void render( - Entity entity, - float f, - float f1, - float f2, - float f3, - float f4, - float f5, - ForgeDirection input, + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelCrystalBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelCrystalBelljar.java index 0fa13168..11fefe50 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelCrystalBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelCrystalBelljar.java @@ -5,6 +5,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelCrystalBelljar extends ModelBase { + // fields ModelRenderer handle1; ModelRenderer handle2; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java index c2a0cca2..563868de 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java @@ -6,6 +6,7 @@ import net.minecraft.entity.Entity; import net.minecraft.world.World; public class ModelElemental extends ModelBase { + // fields ModelRenderer body; ModelRenderer Shape2; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelEnergyBazookaMainProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelEnergyBazookaMainProjectile.java index 44f7fd4f..ce8cc8c3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelEnergyBazookaMainProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelEnergyBazookaMainProjectile.java @@ -5,6 +5,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelEnergyBazookaMainProjectile extends ModelBase { + // fields ModelRenderer thirdWarHead; ModelRenderer firstWarHead; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelFallenAngel.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelFallenAngel.java index 5fe2b3a7..afcbb8c2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelFallenAngel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelFallenAngel.java @@ -6,6 +6,7 @@ import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; public class ModelFallenAngel extends ModelBase { + // fields ModelRenderer leftWing; ModelRenderer rightWing; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelIceDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelIceDemon.java index 19a7ce23..240b2c93 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelIceDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelIceDemon.java @@ -6,6 +6,7 @@ import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; public class ModelIceDemon extends ModelBase { + // fields ModelRenderer head; ModelRenderer leftHorn; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelLowerGuardian.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelLowerGuardian.java index c8699940..432f7042 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelLowerGuardian.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelLowerGuardian.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.renderer.model; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.MathHelper; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; + public class ModelLowerGuardian extends ModelBase { + // fields ModelRenderer Body; ModelRenderer Torso; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMeteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMeteor.java index e6120c41..b39a11e6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMeteor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMeteor.java @@ -5,6 +5,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelMeteor extends ModelBase { + // fields ModelRenderer Shape1; ModelRenderer Shape2; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMinorDemonGrunt.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMinorDemonGrunt.java index 612094e8..0e2db480 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMinorDemonGrunt.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMinorDemonGrunt.java @@ -6,6 +6,7 @@ import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; public class ModelMinorDemonGrunt extends ModelBase { + // fields ModelRenderer head; ModelRenderer chest; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMinorDemonGruntGuardian.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMinorDemonGruntGuardian.java index 440a629c..949f713c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMinorDemonGruntGuardian.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMinorDemonGruntGuardian.java @@ -6,6 +6,7 @@ import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; public class ModelMinorDemonGruntGuardian extends ModelBase { + // fields ModelRenderer head; ModelRenderer chest; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaArmour.java index 6436bbff..21301e67 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaArmour.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaArmour.java @@ -5,12 +5,13 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelOmegaArmour extends ModelBiped { - // ModelRenderer head; - // ModelRenderer body; - // ModelRenderer rightarm; - // ModelRenderer leftarm; - // ModelRenderer rightleg; - // ModelRenderer leftleg; + + // ModelRenderer head; + // ModelRenderer body; + // ModelRenderer rightarm; + // ModelRenderer leftarm; + // ModelRenderer rightleg; + // ModelRenderer leftleg; ModelRenderer leftFacePlate; ModelRenderer rightFacePlate; ModelRenderer facePlate1; @@ -90,49 +91,49 @@ public class ModelOmegaArmour extends ModelBiped { textureWidth = 128; textureHeight = 128; - // boolean addHelmet = true; - // boolean addChestPiece = true; - // boolean addLeggings = true; - // boolean addBoots = true; + // boolean addHelmet = true; + // boolean addChestPiece = true; + // boolean addLeggings = true; + // boolean addBoots = true; /* Duplicate player model */ { - // head = new ModelRenderer(this, 0, 0); - // head.addBox(-4F, -8F, -4F, 8, 8, 8); - // head.setRotationPoint(0F, 0F, 0F); - // head.setTextureSize(128, 128); - // head.mirror = true; - // setRotation(head, 0F, 0F, 0F); - // body = new ModelRenderer(this, 16, 16); - // body.addBox(-4F, 0F, -2F, 8, 12, 4); - // body.setRotationPoint(0F, 0F, 0F); - // body.setTextureSize(128, 128); - // body.mirror = true; - // setRotation(body, 0F, 0F, 0F); - // rightarm = new ModelRenderer(this, 40, 16); - // rightarm.addBox(-3F, -2F, -2F, 4, 12, 4); - // rightarm.setRotationPoint(0F, 0F, 0F); - // rightarm.setTextureSize(128, 128); - // rightarm.mirror = true; - // setRotation(rightarm, 0F, 0F, 0F); - // leftarm = new ModelRenderer(this, 40, 16); - // leftarm.addBox(-1F, -2F, -2F, 4, 12, 4); - // leftarm.setRotationPoint(0F, 0F, 0F); - // leftarm.setTextureSize(128, 128); - // leftarm.mirror = true; - // setRotation(leftarm, 0F, 0F, 0F); - // rightleg = new ModelRenderer(this, 0, 16); - // rightleg.addBox(-2F, 0F, -2F, 4, 12, 4); - // rightleg.setRotationPoint(-2F, 12F, 0F); - // rightleg.setTextureSize(128, 128); - // rightleg.mirror = true; - // setRotation(rightleg, 0F, 0F, 0F); - // leftleg = new ModelRenderer(this, 0, 16); - // leftleg.addBox(-2F, 0F, -2F, 4, 12, 4); - // leftleg.setRotationPoint(2F, 12F, 0F); - // leftleg.setTextureSize(128, 128); - // leftleg.mirror = true; - // setRotation(leftleg, 0F, 0F, 0F); + // head = new ModelRenderer(this, 0, 0); + // head.addBox(-4F, -8F, -4F, 8, 8, 8); + // head.setRotationPoint(0F, 0F, 0F); + // head.setTextureSize(128, 128); + // head.mirror = true; + // setRotation(head, 0F, 0F, 0F); + // body = new ModelRenderer(this, 16, 16); + // body.addBox(-4F, 0F, -2F, 8, 12, 4); + // body.setRotationPoint(0F, 0F, 0F); + // body.setTextureSize(128, 128); + // body.mirror = true; + // setRotation(body, 0F, 0F, 0F); + // rightarm = new ModelRenderer(this, 40, 16); + // rightarm.addBox(-3F, -2F, -2F, 4, 12, 4); + // rightarm.setRotationPoint(0F, 0F, 0F); + // rightarm.setTextureSize(128, 128); + // rightarm.mirror = true; + // setRotation(rightarm, 0F, 0F, 0F); + // leftarm = new ModelRenderer(this, 40, 16); + // leftarm.addBox(-1F, -2F, -2F, 4, 12, 4); + // leftarm.setRotationPoint(0F, 0F, 0F); + // leftarm.setTextureSize(128, 128); + // leftarm.mirror = true; + // setRotation(leftarm, 0F, 0F, 0F); + // rightleg = new ModelRenderer(this, 0, 16); + // rightleg.addBox(-2F, 0F, -2F, 4, 12, 4); + // rightleg.setRotationPoint(-2F, 12F, 0F); + // rightleg.setTextureSize(128, 128); + // rightleg.mirror = true; + // setRotation(rightleg, 0F, 0F, 0F); + // leftleg = new ModelRenderer(this, 0, 16); + // leftleg.addBox(-2F, 0F, -2F, 4, 12, 4); + // leftleg.setRotationPoint(2F, 12F, 0F); + // leftleg.setTextureSize(128, 128); + // leftleg.mirror = true; + // setRotation(leftleg, 0F, 0F, 0F); } /* Helmet */ @@ -791,7 +792,7 @@ public class ModelOmegaArmour extends ModelBiped { } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - // super.render(entity, f, f1, f2, f3, f4, f5); + // super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -802,72 +803,72 @@ public class ModelOmegaArmour extends ModelBiped { this.bipedLeftLeg.render(f5); this.bipedRightLeg.render(f5); - // head.render(f5); - // body.render(f5); - // rightarm.render(f5); - // leftarm.render(f5); - // rightleg.render(f5); - // leftleg.render(f5); - // rightArmMain.render(f5); - // rightKnucklePlate.render(f5); - // rightKnuckleBrace.render(f5); - // rightKnuckle1.render(f5); - // rightKnuckle2.render(f5); - // rightKnuckle3.render(f5); - // rightKnuckle4.render(f5); - // rightKnuckle5.render(f5); - // rightKnuckle6.render(f5); - // rightShoulder1.render(f5); - // rightShoulder2.render(f5); - // rightShoulder3.render(f5); - // mainPlate.render(f5); - // chestPlate1.render(f5); - // chestPlate2.render(f5); - // chestPlate3.render(f5); - // chestPlate4.render(f5); - // chestPlate5.render(f5); - // chestPlate6.render(f5); - // belt.render(f5); - // leftArmMain.render(f5); - // leftKnucklePlate.render(f5); - // leftKnuckleBrace.render(f5); - // leftKnuckle1.render(f5); - // leftKnuckle2.render(f5); - // leftKnuckle3.render(f5); - // leftKnuckle4.render(f5); - // leftKnuckle5.render(f5); - // leftKnuckle6.render(f5); - // leftShoulder1.render(f5); - // leftShoulder2.render(f5); - // leftShoulder3.render(f5); - // leftBootBottom.render(f5); - // leftBootPlate.render(f5); - // leftBootBrace.render(f5); - // leftBootWing1.render(f5); - // leftBootWing2.render(f5); - // rightBootBottom.render(f5); - // rightBootPlate.render(f5); - // rightBootBrace.render(f5); - // rightBootWing1.render(f5); - // rightBootWing2.render(f5); + // head.render(f5); + // body.render(f5); + // rightarm.render(f5); + // leftarm.render(f5); + // rightleg.render(f5); + // leftleg.render(f5); + // rightArmMain.render(f5); + // rightKnucklePlate.render(f5); + // rightKnuckleBrace.render(f5); + // rightKnuckle1.render(f5); + // rightKnuckle2.render(f5); + // rightKnuckle3.render(f5); + // rightKnuckle4.render(f5); + // rightKnuckle5.render(f5); + // rightKnuckle6.render(f5); + // rightShoulder1.render(f5); + // rightShoulder2.render(f5); + // rightShoulder3.render(f5); + // mainPlate.render(f5); + // chestPlate1.render(f5); + // chestPlate2.render(f5); + // chestPlate3.render(f5); + // chestPlate4.render(f5); + // chestPlate5.render(f5); + // chestPlate6.render(f5); + // belt.render(f5); + // leftArmMain.render(f5); + // leftKnucklePlate.render(f5); + // leftKnuckleBrace.render(f5); + // leftKnuckle1.render(f5); + // leftKnuckle2.render(f5); + // leftKnuckle3.render(f5); + // leftKnuckle4.render(f5); + // leftKnuckle5.render(f5); + // leftKnuckle6.render(f5); + // leftShoulder1.render(f5); + // leftShoulder2.render(f5); + // leftShoulder3.render(f5); + // leftBootBottom.render(f5); + // leftBootPlate.render(f5); + // leftBootBrace.render(f5); + // leftBootWing1.render(f5); + // leftBootWing2.render(f5); + // rightBootBottom.render(f5); + // rightBootPlate.render(f5); + // rightBootBrace.render(f5); + // rightBootWing1.render(f5); + // rightBootWing2.render(f5); // - // { - // leftLegSidePlate.render(f5); - // leftLegMain.render(f5); - // leftLegPlate1.render(f5); - // leftLegPlate2.render(f5); - // leftLegPlate3.render(f5); - // leftLegPlate4.render(f5); - // } + // { + // leftLegSidePlate.render(f5); + // leftLegMain.render(f5); + // leftLegPlate1.render(f5); + // leftLegPlate2.render(f5); + // leftLegPlate3.render(f5); + // leftLegPlate4.render(f5); + // } // - // { - // rightLegSidePlate.render(f5); - // rightLegMain.render(f5); - // rightLegPlate1.render(f5); - // rightLegPlate2.render(f5); - // rightLegPlate3.render(f5); - // rightLegPlate4.render(f5); - // } + // { + // rightLegSidePlate.render(f5); + // rightLegMain.render(f5); + // rightLegPlate1.render(f5); + // rightLegPlate2.render(f5); + // rightLegPlate3.render(f5); + // rightLegPlate4.render(f5); + // } } private void setRotation(ModelRenderer model, float x, float y, float z) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaEarth.java index 6cb0d80c..3a3c6bb2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaEarth.java @@ -5,8 +5,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; /** - * OmegaEarth.tcn - TechneToTabulaImporter - * Created using Tabula 4.1.0 + * OmegaEarth.tcn - TechneToTabulaImporter Created using Tabula 4.1.0 */ public class ModelOmegaEarth extends ModelBiped { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaFire.java index ee69159d..a09c6ba6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaFire.java @@ -5,10 +5,10 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; /** - * OmegaFire - WayofTime - * Created using Tabula 4.1.0 + * OmegaFire - WayofTime Created using Tabula 4.1.0 */ public class ModelOmegaFire extends ModelBiped { + public ModelRenderer facePlate1; public ModelRenderer facePlate2; public ModelRenderer facePlate3; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaWater.java index a9c02c25..1e49ce13 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaWater.java @@ -5,6 +5,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelOmegaWater extends ModelBiped { + // fields ModelRenderer belt; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaWind.java index a057eadc..c7c8bbe9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaWind.java @@ -5,10 +5,10 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; /** - * OmegaWind.tcn - TechneToTabulaImporter - * Created using Tabula 4.1.0 + * OmegaWind.tcn - TechneToTabulaImporter Created using Tabula 4.1.0 */ public class ModelOmegaWind extends ModelBiped { + public ModelRenderer facePlate1; public ModelRenderer facePlate2; public ModelRenderer facePlate3; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelPedestal.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelPedestal.java index 05cf5c46..5eccbfe1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelPedestal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelPedestal.java @@ -5,6 +5,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelPedestal extends ModelBase { + // fields ModelRenderer base; ModelRenderer top; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelPlinth.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelPlinth.java index 87186268..f92f1910 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelPlinth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelPlinth.java @@ -5,6 +5,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelPlinth extends ModelBase { + // fields ModelRenderer base; ModelRenderer table; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelShade.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelShade.java index 4582deb1..0c988075 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelShade.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelShade.java @@ -5,6 +5,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelShade extends ModelBase { + // fields ModelRenderer body; ModelRenderer tail1; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSmallEarthGolem.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSmallEarthGolem.java index e51d4838..4ec3dc01 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSmallEarthGolem.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSmallEarthGolem.java @@ -6,6 +6,7 @@ import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; public class ModelSmallEarthGolem extends ModelBase { + // fields ModelRenderer leftLeg; ModelRenderer rightLeg; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEffectBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEffectBlock.java index 0e805a02..424152b0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEffectBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEffectBlock.java @@ -6,6 +6,7 @@ import net.minecraft.entity.Entity; import net.minecraftforge.common.util.ForgeDirection; public class ModelSpellEffectBlock extends ModelBase { + // fields ModelRenderer core; ModelRenderer frame1; @@ -182,15 +183,7 @@ public class ModelSpellEffectBlock extends ModelBase { setRotation(outputSpacer4, 0F, 0F, 0F); } - public void render( - Entity entity, - float f, - float f1, - float f2, - float f3, - float f4, - float f5, - ForgeDirection input, + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEnhancementBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEnhancementBlock.java index 5ff6102c..630af816 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEnhancementBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEnhancementBlock.java @@ -6,6 +6,7 @@ import net.minecraft.entity.Entity; import net.minecraftforge.common.util.ForgeDirection; public class ModelSpellEnhancementBlock extends ModelBase { + // fields ModelRenderer core; ModelRenderer frame1; @@ -182,15 +183,7 @@ public class ModelSpellEnhancementBlock extends ModelBase { setRotation(outputSecond, 0F, 0F, 0F); } - public void render( - Entity entity, - float f, - float f1, - float f2, - float f3, - float f4, - float f5, - ForgeDirection input, + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellModifierBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellModifierBlock.java index e670d493..464e9670 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellModifierBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellModifierBlock.java @@ -6,6 +6,7 @@ import net.minecraft.entity.Entity; import net.minecraftforge.common.util.ForgeDirection; public class ModelSpellModifierBlock extends ModelBase { + // fields ModelRenderer core; ModelRenderer inputMain; @@ -147,15 +148,7 @@ public class ModelSpellModifierBlock extends ModelBase { setRotation(output4, 0F, 0F, 0F); } - public void render( - Entity entity, - float f, - float f1, - float f2, - float f3, - float f4, - float f5, - ForgeDirection input, + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellParadigmBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellParadigmBlock.java index 6b2e7301..3668607d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellParadigmBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellParadigmBlock.java @@ -12,6 +12,7 @@ import net.minecraft.entity.Entity; import net.minecraftforge.common.util.ForgeDirection; public class ModelSpellParadigmBlock extends ModelBase { + // fields ModelRenderer core; ModelRenderer outputMain; @@ -97,15 +98,7 @@ public class ModelSpellParadigmBlock extends ModelBase { setRotation(Shape5, 0F, 0F, 0F); } - public void render( - Entity entity, - float f, - float f1, - float f2, - float f3, - float f4, - float f5, - ForgeDirection input, + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelWingedFireDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelWingedFireDemon.java index 519dda3c..cbaa6622 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelWingedFireDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelWingedFireDemon.java @@ -6,6 +6,7 @@ import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; public class ModelWingedFireDemon extends ModelBase { + // fields ModelRenderer leftLegPlate; ModelRenderer leftLeg; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelWritingTable.java index 96d28357..4e68919e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelWritingTable.java @@ -5,6 +5,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelWritingTable extends ModelBase { + // fields ModelRenderer base; ModelRenderer support; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java index 8f2364be..df389d86 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java @@ -1,17 +1,21 @@ package WayofTime.alchemicalWizardry.common.renderer.projectile; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelEnergyBazookaMainProjectile; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelEnergyBazookaMainProjectile; + public class RenderEnergyBazookaMainProjectile extends Render { + public ModelBase model = new ModelEnergyBazookaMainProjectile(); - private static final ResourceLocation field_110833_a = - new ResourceLocation("alchemicalwizardry", "textures/models/EnergyBazookaMainProjectile.png"); + private static final ResourceLocation field_110833_a = new ResourceLocation( + "alchemicalwizardry", + "textures/models/EnergyBazookaMainProjectile.png"); private float scale = 1.0f; @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java index ca4518fd..ad387ed4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java @@ -1,20 +1,23 @@ package WayofTime.alchemicalWizardry.common.renderer.projectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.*; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.entity.IProjectile; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import WayofTime.alchemicalWizardry.common.entity.projectile.*; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + @SideOnly(Side.CLIENT) public class RenderEnergyBlastProjectile extends Render { - public void doRenderEnergyBlastProjectile( - Entity entityShot, double par2, double par4, double par6, float par8, float par9) { + + public void doRenderEnergyBlastProjectile(Entity entityShot, double par2, double par4, double par6, float par8, + float par9) { GL11.glPushMatrix(); GL11.glTranslatef((float) par2, (float) par4, (float) par6); GL11.glEnable(GL12.GL_RESCALE_NORMAL); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderFireProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderFireProjectile.java index 0d314397..a319abfc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderFireProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderFireProjectile.java @@ -5,37 +5,37 @@ import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class RenderFireProjectile { - // public void doRenderProjectile(FireProjectile entityShot, double par2, double par4, double par6, float par8, + // public void doRenderProjectile(FireProjectile entityShot, double par2, double par4, double par6, float par8, // float par9) - // { - // GL11.glPushMatrix(); - // GL11.glTranslatef((float)par2, (float)par4, (float)par6); - // GL11.glEnable(GL12.GL_RESCALE_NORMAL); - // GL11.glScalef(0.1F, 0.1F, 0.1F); - // this.func_110776_a(this.func_110775_a(entityShot)); - // Tessellator var12 = Tessellator.instance; - // GL11.glRotatef(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F); - // GL11.glRotatef(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F); - // var12.startDrawingQuads(); - // var12.setNormal(0.0F, 1.0F, 0.0F); - // var12.addVertexWithUV(-0.5F, -0.25F, 0.0D, 0, 1); - // var12.addVertexWithUV(0.5F, -0.25F, 0.0D, 1, 1); - // var12.addVertexWithUV(0.5F, 0.75F, 0.0D, 1, 0); - // var12.addVertexWithUV(-0.5F, 0.75F, 0.0D, 0, 0); - // var12.draw(); - // GL11.glDisable(GL12.GL_RESCALE_NORMAL); - // GL11.glPopMatrix(); - // } + // { + // GL11.glPushMatrix(); + // GL11.glTranslatef((float)par2, (float)par4, (float)par6); + // GL11.glEnable(GL12.GL_RESCALE_NORMAL); + // GL11.glScalef(0.1F, 0.1F, 0.1F); + // this.func_110776_a(this.func_110775_a(entityShot)); + // Tessellator var12 = Tessellator.instance; + // GL11.glRotatef(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F); + // GL11.glRotatef(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F); + // var12.startDrawingQuads(); + // var12.setNormal(0.0F, 1.0F, 0.0F); + // var12.addVertexWithUV(-0.5F, -0.25F, 0.0D, 0, 1); + // var12.addVertexWithUV(0.5F, -0.25F, 0.0D, 1, 1); + // var12.addVertexWithUV(0.5F, 0.75F, 0.0D, 1, 0); + // var12.addVertexWithUV(-0.5F, 0.75F, 0.0D, 0, 0); + // var12.draw(); + // GL11.glDisable(GL12.GL_RESCALE_NORMAL); + // GL11.glPopMatrix(); + // } // - // @Override - // public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) - // { - // this.doRenderProjectile((FireProjectile)par1Entity, par2, par4, par6, par8, par9); - // } + // @Override + // public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) + // { + // this.doRenderProjectile((FireProjectile)par1Entity, par2, par4, par6, par8, par9); + // } // - // @Override - // protected ResourceLocation func_110775_a(Entity entity) - // { - // return new ResourceLocation("alchemicalwizardry:/textures/entities/fireProjectile.png"); - // } + // @Override + // protected ResourceLocation func_110775_a(Entity entity) + // { + // return new ResourceLocation("alchemicalwizardry:/textures/entities/fireProjectile.png"); + // } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java index e5d221f4..6e6d79fa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java @@ -1,17 +1,21 @@ package WayofTime.alchemicalWizardry.common.renderer.projectile; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelMeteor; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelMeteor; + public class RenderMeteor extends Render { + public ModelBase model = new ModelMeteor(); - private static final ResourceLocation field_110833_a = - new ResourceLocation("alchemicalwizardry", "textures/models/Meteor.png"); + private static final ResourceLocation field_110833_a = new ResourceLocation( + "alchemicalwizardry", + "textures/models/Meteor.png"); private float scale = 1.0f; @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/LocalStorageAlphaPact.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/LocalStorageAlphaPact.java index 7dd6aff1..03879491 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/LocalStorageAlphaPact.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/LocalStorageAlphaPact.java @@ -1,12 +1,14 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.HashSet; +import java.util.Set; + import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; -import java.util.HashSet; -import java.util.Set; public class LocalStorageAlphaPact extends LocalRitualStorage { + public static Set hoardList = new HashSet(); public void thrallDemon(IHoardDemon demon) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAlphaPact.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAlphaPact.java index 855c2f65..8791fc59 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAlphaPact.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAlphaPact.java @@ -1,5 +1,14 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; @@ -7,15 +16,9 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGrunt; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; -import net.minecraft.block.Block; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; public class RitualEffectAlphaPact extends RitualEffect { + Random rand = new Random(); @Override @@ -59,13 +62,12 @@ public class RitualEffectAlphaPact extends RitualEffect { world.spawnEntityInWorld((EntityLivingBase) demon); storage.thrallDemon(demon); } - } else { - } + } else {} } } - public IHoardDemon getRandomDemonForStage( - World world, int x, int y, int z, int horizontalRange, int verticalRange) { + public IHoardDemon getRandomDemonForStage(World world, int x, int y, int z, int horizontalRange, + int verticalRange) { EntityLivingBase entityLiving = new EntityMinorDemonGrunt(world); boolean isGood = false; @@ -98,10 +100,7 @@ public class RitualEffectAlphaPact extends RitualEffect { } } - if (entityLiving - .worldObj - .getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox) - .isEmpty() + if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.boundingBox)) { entityLiving.setPositionAndUpdate(newX, newY, newZ); isGood = true; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java index 4defa319..6b20eb43 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java @@ -1,13 +1,8 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import java.util.ArrayList; import java.util.List; + import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.inventory.IInventory; @@ -16,7 +11,15 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; + public class RitualEffectAnimalGrowth extends RitualEffect { + public static final int breedingCost = 50; public static final int reductusDrain = 1; public static final int virtusDrain = 10; @@ -38,8 +41,12 @@ public class RitualEffectAnimalGrowth extends RitualEffect { double range = 2; AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox( - (double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 3), (double) (z + 1)) - .expand(range, 0, range); + (double) x, + (double) y + 1, + (double) z, + (double) (x + 1), + (double) (y + 3), + (double) (z + 1)).expand(range, 0, range); List list = world.getEntitiesWithinAABB(EntityAgeable.class, axisalignedbb); int entityCount = 0; @@ -48,8 +55,8 @@ public class RitualEffectAnimalGrowth extends RitualEffect { if (currentEssence < this.getCostPerRefresh() * list.size()) { SoulNetworkHandler.causeNauseaToPlayer(owner); } else { - boolean hasReductus = - this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); + boolean hasReductus = this + .canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); for (EntityAgeable entity : list) { if (entity.getGrowingAge() < 0) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java index 88aaf1af..34bb4dd2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java @@ -1,19 +1,22 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.ArrayList; import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class RitualEffectApiaryOverclock extends RitualEffect { + @Override public void performEffect(IMasterRitualStone ritualStone) { String owner = ritualStone.getOwner(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java index 5bcc4ad1..830acbde 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java @@ -1,5 +1,16 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.oredict.OreDictionary; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; @@ -9,17 +20,9 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.oredict.OreDictionary; public class RitualEffectAutoAlchemy extends RitualEffect { + public static final boolean fillToOne = true; public static final int potentiaDrain = 2; @@ -37,8 +40,8 @@ public class RitualEffectAutoAlchemy extends RitualEffect { if (currentEssence < this.getCostPerRefresh() * 6) { SoulNetworkHandler.causeNauseaToPlayer(owner); } else { - boolean hasPotentia = - this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); + boolean hasPotentia = this + .canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); int flag = 0; @@ -139,21 +142,21 @@ public class RitualEffectAutoAlchemy extends RitualEffect { outputInv.setInventorySlotContents(i, copyStack); flag++; break; - } else if (curStack.isItemEqual(outputStack) - && curStack.stackSize < curStack.getMaxStackSize() - && ItemStack.areItemStackTagsEqual(outputStack, curStack)) { - outputStack.stackSize--; - if (outputStack.stackSize <= 0) { - alchemyEntity.setInventorySlotContents(6, null); - } else { - alchemyEntity.setInventorySlotContents(6, outputStack); - } + } else + if (curStack.isItemEqual(outputStack) && curStack.stackSize < curStack.getMaxStackSize() + && ItemStack.areItemStackTagsEqual(outputStack, curStack)) { + outputStack.stackSize--; + if (outputStack.stackSize <= 0) { + alchemyEntity.setInventorySlotContents(6, null); + } else { + alchemyEntity.setInventorySlotContents(6, outputStack); + } - curStack.stackSize++; - outputInv.setInventorySlotContents(i, curStack); - flag++; - break; - } + curStack.stackSize++; + outputInv.setInventorySlotContents(i, curStack); + flag++; + break; + } } } @@ -187,18 +190,18 @@ public class RitualEffectAutoAlchemy extends RitualEffect { } else if (curStack.isItemEqual(alchStack) && curStack.stackSize < curStack.getMaxStackSize() && ItemStack.areItemStackTagsEqual(alchStack, curStack)) { - alchStack.stackSize--; - if (alchStack.stackSize <= 0) { - alchemyEntity.setInventorySlotContents(i + 1, null); - } else { - alchemyEntity.setInventorySlotContents(i + 1, alchStack); - } + alchStack.stackSize--; + if (alchStack.stackSize <= 0) { + alchemyEntity.setInventorySlotContents(i + 1, null); + } else { + alchemyEntity.setInventorySlotContents(i + 1, alchStack); + } - curStack.stackSize++; - outputInv.setInventorySlotContents(j, curStack); - flag++; - break; - } + curStack.stackSize++; + outputInv.setInventorySlotContents(j, curStack); + flag++; + break; + } } continue; } @@ -214,9 +217,8 @@ public class RitualEffectAutoAlchemy extends RitualEffect { } ItemStack alchStack = alchemyEntity.getStackInSlot(i + 1); - if (alchStack != null - && ((!areItemStacksEqualWithWildcard(recItem, alchStack)) - || alchStack.stackSize >= (fillToOne ? 1 : alchStack.getMaxStackSize()))) { + if (alchStack != null && ((!areItemStacksEqualWithWildcard(recItem, alchStack)) + || alchStack.stackSize >= (fillToOne ? 1 : alchStack.getMaxStackSize()))) { continue; } @@ -227,9 +229,8 @@ public class RitualEffectAutoAlchemy extends RitualEffect { } if (!inputInv1.isItemValidForSlot(j, curItem) - || (inputInv1 instanceof ISidedInventory - && !((ISidedInventory) inputInv1) - .canExtractItem(j, curItem, ForgeDirection.DOWN.ordinal()))) { + || (inputInv1 instanceof ISidedInventory && !((ISidedInventory) inputInv1) + .canExtractItem(j, curItem, ForgeDirection.DOWN.ordinal()))) { continue; } @@ -274,9 +275,8 @@ public class RitualEffectAutoAlchemy extends RitualEffect { continue; } ItemStack alchStack = alchemyEntity.getStackInSlot(i + 1); - if (alchStack != null - && ((!areItemStacksEqualWithWildcard(recItem, alchStack)) - || alchStack.stackSize >= (fillToOne ? 1 : alchStack.getMaxStackSize()))) { + if (alchStack != null && ((!areItemStacksEqualWithWildcard(recItem, alchStack)) + || alchStack.stackSize >= (fillToOne ? 1 : alchStack.getMaxStackSize()))) { continue; } @@ -360,8 +360,7 @@ public class RitualEffectAutoAlchemy extends RitualEffect { } public boolean areItemStacksEqualWithWildcard(ItemStack recipeStack, ItemStack comparedStack) { - return recipeStack.isItemEqual(comparedStack) - || (recipeStack.getItemDamage() == OreDictionary.WILDCARD_VALUE - && recipeStack.getItem() == comparedStack.getItem()); + return recipeStack.isItemEqual(comparedStack) || (recipeStack.getItemDamage() == OreDictionary.WILDCARD_VALUE + && recipeStack.getItem() == comparedStack.getItem()); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java index 8d93de8e..006f7c52 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java @@ -1,15 +1,9 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.ArrayList; import java.util.Iterator; import java.util.List; + import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -19,7 +13,16 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class RitualEffectBinding extends RitualEffect { + @Override public void performEffect(IMasterRitualStone ritualStone) { String owner = ritualStone.getOwner(); @@ -42,9 +45,12 @@ public class RitualEffectBinding extends RitualEffect { if (ritualStone.getVar1() == 0) { int d0 = 0; AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox( - (double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 2), (double) - (z + 1)) - .expand(d0, d0, d0); + (double) x, + (double) y + 1, + (double) z, + (double) (x + 1), + (double) (y + 2), + (double) (z + 1)).expand(d0, d0, d0); List list = world.getEntitiesWithinAABB(EntityItem.class, axisalignedbb); Iterator iterator = list.iterator(); EntityItem item; @@ -70,7 +76,16 @@ public class RitualEffectBinding extends RitualEffect { if (world.rand.nextInt(10) == 0) { SpellHelper.sendIndexedParticleToAllAround( - world, x, y, z, 20, world.provider.dimensionId, 1, x, y, z); + world, + x, + y, + z, + 20, + world.provider.dimensionId, + 1, + x, + y, + z); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java index 7ff4ba60..6bef634f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java @@ -1,15 +1,8 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; import java.util.ArrayList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.player.EntityPlayer; @@ -25,7 +18,17 @@ import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.chunk.Chunk; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; + public class RitualEffectBiomeChanger extends RitualEffect { + @Override public void performEffect(IMasterRitualStone ritualStone) { String owner = ritualStone.getOwner(); @@ -39,8 +42,12 @@ public class RitualEffectBiomeChanger extends RitualEffect { ritualStone.setCooldown(cooldown - 1); if (world.rand.nextInt(15) == 0) { - world.addWeatherEffect(new EntityLightningBolt( - world, x - 1 + world.rand.nextInt(3), y + 1, z - 1 + world.rand.nextInt(3))); + world.addWeatherEffect( + new EntityLightningBolt( + world, + x - 1 + world.rand.nextInt(3), + y + 1, + z - 1 + world.rand.nextInt(3))); } return; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java index 2602c557..97f6a0fa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java @@ -1,5 +1,15 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -8,17 +18,10 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import cpw.mods.fml.relauncher.ReflectionHelper; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; public class RitualEffectContainment extends RitualEffect { - public final String[] TIME_SINCE_IGNITED = new String[] {"timeSinceIgnited", "field_70833_d", "bq"}; + + public final String[] TIME_SINCE_IGNITED = new String[] { "timeSinceIgnited", "field_70833_d", "bq" }; @Override public void performEffect(IMasterRitualStone ritualStone) { @@ -38,11 +41,11 @@ public class RitualEffectContainment extends RitualEffect { final int magicalesDrain = 10; boolean flag = false; - boolean hasCrepitous = - this.canDrainReagent(ritualStone, ReagentRegistry.crepitousReagent, crepitousDrain, false); + boolean hasCrepitous = this + .canDrainReagent(ritualStone, ReagentRegistry.crepitousReagent, crepitousDrain, false); boolean hasTerrae = this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false); - boolean hasMagicales = - this.canDrainReagent(ritualStone, ReagentRegistry.magicalesReagent, magicalesDrain, false); + boolean hasMagicales = this + .canDrainReagent(ritualStone, ReagentRegistry.magicalesReagent, magicalesDrain, false); int d0 = hasTerrae ? 10 : 5; List entityList = SpellHelper.getEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, d0, d0); @@ -79,8 +82,8 @@ public class RitualEffectContainment extends RitualEffect { if (hasCrepitous && this.canDrainReagent(ritualStone, ReagentRegistry.crepitousReagent, crepitousDrain, false)) { if (entity instanceof EntityCreeper) { - ReflectionHelper.setPrivateValue( - EntityCreeper.class, (EntityCreeper) entity, 2, TIME_SINCE_IGNITED); + ReflectionHelper + .setPrivateValue(EntityCreeper.class, (EntityCreeper) entity, 2, TIME_SINCE_IGNITED); ((EntityCreeper) entity).setAttackTarget(null); this.canDrainReagent(ritualStone, ReagentRegistry.crepitousReagent, crepitousDrain, true); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java index 858dd128..e51d6433 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java @@ -1,18 +1,11 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; @@ -26,14 +19,24 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.oredict.OreDictionary; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class RitualEffectCrafting extends RitualEffect { + public static final boolean limitToSingleStack = true; public static final int potentiaDrain = 2; public static final int virtusDrain = 2; @Override public void performEffect(IMasterRitualStone ritualStone) { - // long startTime = System.nanoTime(); + // long startTime = System.nanoTime(); String owner = ritualStone.getOwner(); @@ -72,14 +75,12 @@ public class RitualEffectCrafting extends RitualEffect { boolean canContinue = false; ItemStack[] recipe = new ItemStack[9]; - InventoryCrafting inventory = new InventoryCrafting( - new Container() { - public boolean canInteractWith(EntityPlayer player) { - return false; - } - }, - 3, - 3); + InventoryCrafting inventory = new InventoryCrafting(new Container() { + + public boolean canInteractWith(EntityPlayer player) { + return false; + } + }, 3, 3); for (int i = -1; i <= 1; i++) { for (int j = -1; j <= 1; j++) { @@ -89,9 +90,9 @@ public class RitualEffectCrafting extends RitualEffect { TileEntity inv = world.getTileEntity(x + pos.xCoord, y + pos.yCoord, z + pos.zCoord); if (inv instanceof IInventory) { if (((IInventory) inv).getSizeInventory() <= slotDesignation - || !((IInventory) inv) - .isItemValidForSlot( - slotDesignation, ((IInventory) inv).getStackInSlot(slotDesignation))) { + || !((IInventory) inv).isItemValidForSlot( + slotDesignation, + ((IInventory) inv).getStackInSlot(slotDesignation))) { continue; } else { ItemStack invStack = ((IInventory) inv).getStackInSlot(slotDesignation); @@ -115,8 +116,8 @@ public class RitualEffectCrafting extends RitualEffect { if (returnStack == null) { tag.setBoolean("didLastCraftFail", true); } else { - boolean hasVirtus = - this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false); + boolean hasVirtus = this + .canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false); boolean addOutputToInputs = hasVirtus; IInventory outputInv = null; @@ -256,13 +257,13 @@ public class RitualEffectCrafting extends RitualEffect { if (this.areItemsEqualForCrafting(recipeStack, invItem)) { // TODO inventory.setInventorySlotContents(n, invItem); - // ItemStack returnedStack = + // ItemStack returnedStack = // CraftingManager.getInstance().findMatchingRecipe(inventory, world); - // if(returnedStack == null || returnedStack.getItem() == null + // if(returnedStack == null || returnedStack.getItem() == null // || returnedStack.getItem() != returnStack.getItem()) - // { - // continue; - // } + // { + // continue; + // } Map slotMap = syphonMap.get(i); if (slotMap == null) { slotMap = new HashMap(); @@ -329,10 +330,10 @@ public class RitualEffectCrafting extends RitualEffect { world.markBlockForUpdate(x + 2, y - 1, z); world.markBlockForUpdate(x - 2, y - 1, z); - // long endTime = System.nanoTime(); + // long endTime = System.nanoTime(); // - // long duration = (endTime - startTime); //divide by 1000000 to get milliseconds. - // System.out.println("(Total) method time in ms: " + (float)(duration)/1000000.0); + // long duration = (endTime - startTime); //divide by 1000000 to get milliseconds. + // System.out.println("(Total) method time in ms: " + (float)(duration)/1000000.0); } } } @@ -366,19 +367,18 @@ public class RitualEffectCrafting extends RitualEffect { return false; } // - // if (stack1.isItemStackDamageable() ^ stack2.isItemStackDamageable()) - // { - // return false; - // } + // if (stack1.isItemStackDamageable() ^ stack2.isItemStackDamageable()) + // { + // return false; + // } return stack1.getItem() == stack2.getItem() && !stack1.getItem().getHasSubtypes() || stack1.getItemDamage() == stack2.getItemDamage(); } public boolean areItemStacksEqualWithWildcard(ItemStack recipeStack, ItemStack comparedStack) { - return recipeStack.isItemEqual(comparedStack) - || (recipeStack.getItemDamage() == OreDictionary.WILDCARD_VALUE - && recipeStack.getItem() == comparedStack.getItem()); + return recipeStack.isItemEqual(comparedStack) || (recipeStack.getItemDamage() == OreDictionary.WILDCARD_VALUE + && recipeStack.getItem() == comparedStack.getItem()); } public Int3 getSlotPositionForDirection(int slot, int direction) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java index 44fdfff1..2f928943 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java @@ -1,15 +1,8 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.ArrayList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.item.EntityItem; import net.minecraft.init.Blocks; @@ -21,7 +14,17 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class RitualEffectCrushing extends RitualEffect { + public static final int crystallosDrain = 10; public static final int orbisTerraeDrain = 10; public static final int potentiaDrain = 10; @@ -67,14 +70,14 @@ public class RitualEffectCrushing extends RitualEffect { return; // Prevents overflow } - boolean hasCrystallos = - this.canDrainReagent(ritualStone, ReagentRegistry.crystallosReagent, crystallosDrain, false); - boolean hasOrbisTerrae = - this.canDrainReagent(ritualStone, ReagentRegistry.orbisTerraeReagent, orbisTerraeDrain, false); + boolean hasCrystallos = this + .canDrainReagent(ritualStone, ReagentRegistry.crystallosReagent, crystallosDrain, false); + boolean hasOrbisTerrae = this + .canDrainReagent(ritualStone, ReagentRegistry.orbisTerraeReagent, orbisTerraeDrain, false); boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); boolean hasVirtus = this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false); - boolean hasIncendium = - this.canDrainReagent(ritualStone, ReagentRegistry.incendiumReagent, incendiumDrain, false); + boolean hasIncendium = this + .canDrainReagent(ritualStone, ReagentRegistry.incendiumReagent, incendiumDrain, false); boolean isSilkTouch = hasCrystallos; int fortuneLevel = 0; @@ -118,22 +121,24 @@ public class RitualEffectCrushing extends RitualEffect { if (hasCrystallos) { this.canDrainReagent( - ritualStone, ReagentRegistry.crystallosReagent, crystallosDrain, true); + ritualStone, + ReagentRegistry.crystallosReagent, + crystallosDrain, + true); } } else { - ArrayList itemDropList = - block.getDrops(world, x + i, y + j, z + k, meta, fortuneLevel); + ArrayList itemDropList = block + .getDrops(world, x + i, y + j, z + k, meta, fortuneLevel); if (itemDropList != null) { int invSize = tileEntity.getSizeInventory(); for (ItemStack item : itemDropList) { - hasIncendium = hasIncendium - && this.canDrainReagent( - ritualStone, - ReagentRegistry.incendiumReagent, - incendiumDrain, - false); + hasIncendium = hasIncendium && this.canDrainReagent( + ritualStone, + ReagentRegistry.incendiumReagent, + incendiumDrain, + false); ItemStack copyStack = item.copyItemStack(item); if (this.usesIncendium(copyStack)) { @@ -145,8 +150,8 @@ public class RitualEffectCrushing extends RitualEffect { true); } - SpellHelper.insertStackIntoInventory( - copyStack, tileEntity, ForgeDirection.DOWN); + SpellHelper + .insertStackIntoInventory(copyStack, tileEntity, ForgeDirection.DOWN); if (copyStack.stackSize > 0) { world.spawnEntityInWorld( new EntityItem(world, x + 0.4, y + 2, z + 0.5, copyStack)); @@ -162,11 +167,17 @@ public class RitualEffectCrushing extends RitualEffect { } if (hasPotentia) { this.canDrainReagent( - ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, true); + ritualStone, + ReagentRegistry.potentiaReagent, + potentiaDrain, + true); } if (hasVirtus) { this.canDrainReagent( - ritualStone, ReagentRegistry.virtusReagent, virtusDrain, true); + ritualStone, + ReagentRegistry.virtusReagent, + virtusDrain, + true); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java index 7dc91a4c..723abd5b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java @@ -1,5 +1,16 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import net.minecraft.entity.effect.EntityLightningBolt; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChatComponentTranslation; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.Int3; @@ -12,40 +23,18 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChatComponentTranslation; -import net.minecraft.world.World; public class RitualEffectDemonPortal extends RitualEffect { + public static final int neededAmount = 16000; public static final Random rand = new Random(); public static final int drainRate = 50; - public static final Reagent[] reagents = new Reagent[] { - ReagentRegistry.aetherReagent, - ReagentRegistry.aquasalusReagent, - ReagentRegistry.terraeReagent, - ReagentRegistry.incendiumReagent, - ReagentRegistry.sanctusReagent, - ReagentRegistry.tenebraeReagent, - ReagentRegistry.magicalesReagent, - ReagentRegistry.potentiaReagent - }; - public static final Int3[] jarLocations = new Int3[] { - new Int3(4, 5, 4), - new Int3(-4, 5, 4), - new Int3(4, 5, -4), - new Int3(-4, 5, -4), - new Int3(0, 5, 6), - new Int3(0, 5, -6), - new Int3(6, 5, 0), - new Int3(-6, 5, 0) - }; + public static final Reagent[] reagents = new Reagent[] { ReagentRegistry.aetherReagent, + ReagentRegistry.aquasalusReagent, ReagentRegistry.terraeReagent, ReagentRegistry.incendiumReagent, + ReagentRegistry.sanctusReagent, ReagentRegistry.tenebraeReagent, ReagentRegistry.magicalesReagent, + ReagentRegistry.potentiaReagent }; + public static final Int3[] jarLocations = new Int3[] { new Int3(4, 5, 4), new Int3(-4, 5, 4), new Int3(4, 5, -4), + new Int3(-4, 5, -4), new Int3(0, 5, 6), new Int3(0, 5, -6), new Int3(6, 5, 0), new Int3(-6, 5, 0) }; @Override public void performEffect(IMasterRitualStone ritualStone) { @@ -68,7 +57,7 @@ public class RitualEffectDemonPortal extends RitualEffect { int reagentAmount = tag.getInteger(ReagentRegistry.getKeyForReagent(reagent)); if (reagentAmount < neededAmount) { reagentsFulfilled = false; - // System.out.println("Reagents not fulfilled. Missing: " + + // System.out.println("Reagents not fulfilled. Missing: " + // ReagentRegistry.getKeyForReagent(reagent)); int drainAmount = Math.min(drainRate, neededAmount - reagentAmount); @@ -104,16 +93,12 @@ public class RitualEffectDemonPortal extends RitualEffect { } public boolean checkCreatePortal(IMasterRitualStone ritualStone) { - TileEntity entity = ritualStone - .getWorld() + TileEntity entity = ritualStone.getWorld() .getTileEntity(ritualStone.getXCoord(), ritualStone.getYCoord() + 1, ritualStone.getZCoord()); if (entity instanceof IBloodAltar) { IBloodAltar altar = (IBloodAltar) entity; - if (altar.hasDemonBlood() - && ritualStone - .getWorld() - .isAirBlock( - ritualStone.getXCoord(), ritualStone.getYCoord() + 2, ritualStone.getZCoord())) { + if (altar.hasDemonBlood() && ritualStone.getWorld() + .isAirBlock(ritualStone.getXCoord(), ritualStone.getYCoord() + 2, ritualStone.getZCoord())) { return true; } } @@ -126,8 +111,12 @@ public class RitualEffectDemonPortal extends RitualEffect { } public void createRandomLightning(World world, int x, int y, int z) { - world.addWeatherEffect(new EntityLightningBolt( - world, x + rand.nextInt(10) - rand.nextInt(10), y + 1, z + rand.nextInt(10) - rand.nextInt(10))); + world.addWeatherEffect( + new EntityLightningBolt( + world, + x + rand.nextInt(10) - rand.nextInt(10), + y + 1, + z + rand.nextInt(10) - rand.nextInt(10))); } @Override @@ -149,8 +138,8 @@ public class RitualEffectDemonPortal extends RitualEffect { int z = ritualStone.getZCoord(); for (Int3 pos : jarLocations) { - if (!(ritualStone.getWorld().getTileEntity(x + pos.xCoord, y + pos.yCoord, z + pos.zCoord) - instanceof TEBellJar)) { + if (!(ritualStone.getWorld() + .getTileEntity(x + pos.xCoord, y + pos.yCoord, z + pos.zCoord) instanceof TEBellJar)) { return false; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java index 0d597827..1c676987 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java @@ -1,14 +1,8 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.ArrayList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -20,7 +14,16 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class RitualEffectEllipsoid extends RitualEffect { + @Override public void performEffect(IMasterRitualStone ritualStone) { String owner = ritualStone.getOwner(); @@ -109,16 +112,16 @@ public class RitualEffectEllipsoid extends RitualEffect { while (i <= xSize) { while (k <= zSize) { if (Math.pow(i * (ySize - 0.50f) * (zSize - 0.50f), 2) - + Math.pow(j * (xSize - 0.50f) * (zSize - 0.50f), 2) - + Math.pow(k * (xSize - 0.50f) * (ySize - 0.50f), 2) + + Math.pow(j * (xSize - 0.50f) * (zSize - 0.50f), 2) + + Math.pow(k * (xSize - 0.50f) * (ySize - 0.50f), 2) <= Math.pow((xSize - 1 + 0.50f) * (ySize - 1 + 0.50f) * (zSize - 1 + 0.50f), 2)) { k++; continue; } if (Math.pow(i * (ySize + 0.50f) * (zSize + 0.50f), 2) - + Math.pow(j * (xSize + 0.50f) * (zSize + 0.50f), 2) - + Math.pow(k * (xSize + 0.50f) * (ySize + 0.50f), 2) + + Math.pow(j * (xSize + 0.50f) * (zSize + 0.50f), 2) + + Math.pow(k * (xSize + 0.50f) * (ySize + 0.50f), 2) >= Math.pow((xSize + 0.50f) * (ySize + 0.50f) * (zSize + 0.50f), 2)) { k++; continue; @@ -139,8 +142,8 @@ public class RitualEffectEllipsoid extends RitualEffect { } else { // This is pulled from the ItemBlock's placing calls int i1 = placedBlock.getMetadata(stack.getItemDamage()); - int j1 = placedBlock.field_150939_a.onBlockPlaced( - world, x + i, y + j, z + k, 0, 0, 0, 0, i1); + int j1 = placedBlock.field_150939_a + .onBlockPlaced(world, x + i, y + j, z + k, 0, 0, 0, 0, i1); if (placedBlock.placeBlockAt(stack, null, world, x + i, y + j, z + k, 0, 0, 0, 0, j1)) { world.playSoundEffect( @@ -161,7 +164,7 @@ public class RitualEffectEllipsoid extends RitualEffect { SoulNetworkHandler.syphonFromNetwork(owner, cost); } - // world.setBlock(x + i, y + j, z + k, Blocks.stone); + // world.setBlock(x + i, y + j, z + k, Blocks.stone); k++; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java index 05544545..e1e69f72 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java @@ -1,5 +1,15 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -7,16 +17,9 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; public class RitualEffectEvaporation extends RitualEffect { + @Override public void performEffect(IMasterRitualStone ritualStone) { String owner = ritualStone.getOwner(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java index 0e2d8484..197d6b8d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java @@ -1,18 +1,9 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport; import java.util.ArrayList; import java.util.List; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -26,7 +17,19 @@ import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.EnderTeleportEvent; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport; + public class RitualEffectExpulsion extends RitualEffect { + public static final int virtusDrain = 10; public static final int potentiaDrain = 10; public static final int tennebraeDrain = 5; @@ -45,13 +48,13 @@ public class RitualEffectExpulsion extends RitualEffect { SoulNetworkHandler.causeNauseaToPlayer(owner); } else { boolean hasVirtus = this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false); - boolean hasPotentia = - this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); + boolean hasPotentia = this + .canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); int teleportDistance = hasVirtus ? 300 : 100; int range = hasPotentia ? 50 : 25; - List playerList = - SpellHelper.getPlayersInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); + List playerList = SpellHelper + .getPlayersInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); boolean flag = false; TileEntity tile = world.getTileEntity(x, y + 1, z); @@ -70,8 +73,7 @@ public class RitualEffectExpulsion extends RitualEffect { boolean test = false; for (int i = 0; i < inventoryTile.getSizeInventory(); i++) { ItemStack stack = inventoryTile.getStackInSlot(i); - if (stack != null - && stack.getItem() instanceof IBindable + if (stack != null && stack.getItem() instanceof IBindable && EnergyItems.getOwnerName(stack).equals(playerString)) { test = true; } @@ -98,17 +100,17 @@ public class RitualEffectExpulsion extends RitualEffect { } } - boolean hasTennebrae = - this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tennebraeDrain, false); + boolean hasTennebrae = this + .canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tennebraeDrain, false); if (hasTennebrae && SoulNetworkHandler.canSyphonFromOnlyNetwork(owner, 1000)) { boolean hasVirtus = this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false); - boolean hasPotentia = - this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); + boolean hasPotentia = this + .canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); int teleportDistance = hasVirtus ? 300 : 100; int range = hasPotentia ? 50 : 25; - List livingList = - SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); + List livingList = SpellHelper + .getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); boolean flag = false; for (EntityLivingBase livingEntity : livingList) { @@ -169,14 +171,8 @@ public class RitualEffectExpulsion extends RitualEffect { return true; } - public boolean teleportTo( - EntityLivingBase entityLiving, - double par1, - double par3, - double par5, - double lastX, - double lastY, - double lastZ) { + public boolean teleportTo(EntityLivingBase entityLiving, double par1, double par3, double par5, double lastX, + double lastY, double lastZ) { EnderTeleportEvent event = new EnderTeleportEvent(entityLiving, par1, par3, par5, 0); if (MinecraftForge.EVENT_BUS.post(event)) { @@ -208,13 +204,10 @@ public class RitualEffectExpulsion extends RitualEffect { } if (flag1) { - SpellTeleport.moveEntityViaTeleport( - entityLiving, entityLiving.posX, entityLiving.posY, entityLiving.posZ); + SpellTeleport + .moveEntityViaTeleport(entityLiving, entityLiving.posX, entityLiving.posY, entityLiving.posZ); - if (entityLiving - .worldObj - .getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox) - .isEmpty() + if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.boundingBox)) { flag = true; } @@ -232,14 +225,11 @@ public class RitualEffectExpulsion extends RitualEffect { float f = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; float f1 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; float f2 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; - double d7 = d3 - + (entityLiving.posX - d3) * d6 + double d7 = d3 + (entityLiving.posX - d3) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; - double d8 = d4 - + (entityLiving.posY - d4) * d6 + double d8 = d4 + (entityLiving.posY - d4) * d6 + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height; - double d9 = d5 - + (entityLiving.posZ - d5) * d6 + double d9 = d5 + (entityLiving.posZ - d5) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; entityLiving.worldObj.spawnParticle("portal", d7, d8, d9, (double) f, (double) f1, (double) f2); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java index 006b50f4..b183f9cf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java @@ -1,20 +1,23 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.effect.EntityLightningBolt; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.world.World; public class RitualEffectFeatheredEarth extends RitualEffect // Nullifies all fall damage in the area of effect { + public static final int terraeDrain = 1; public static final int orbisTerraeDrain = 1; public static final int aetherDrain = 1; @@ -40,8 +43,8 @@ public class RitualEffectFeatheredEarth extends RitualEffect // Nullifies all fa } boolean hasTerrae = this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false); - boolean hasOrbisTerrae = - this.canDrainReagent(ritualStone, ReagentRegistry.orbisTerraeReagent, orbisTerraeDrain, false); + boolean hasOrbisTerrae = this + .canDrainReagent(ritualStone, ReagentRegistry.orbisTerraeReagent, orbisTerraeDrain, false); boolean hasAether = this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false); int range = this.getHorizontalRangeForReagent(hasTerrae, hasOrbisTerrae); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java index 3d525cbd..b7ed0fa2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java @@ -1,5 +1,11 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -8,12 +14,9 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; public class RitualEffectFeatheredKnife extends RitualEffect { + public final int amount = AlchemicalWizardry.lpPerSelfSacrificeFeatheredKnife; public static final int sanctusDrain = 5; @@ -69,8 +72,8 @@ public class RitualEffectFeatheredKnife extends RitualEffect { if (currentEssence < this.getCostPerRefresh() * list.size()) { SoulNetworkHandler.causeNauseaToPlayer(owner); } else { - boolean hasMagicales = - this.canDrainReagent(ritualStone, ReagentRegistry.magicalesReagent, magicalesDrain, false); + boolean hasMagicales = this + .canDrainReagent(ritualStone, ReagentRegistry.magicalesReagent, magicalesDrain, false); boolean hasSanctus = this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false); EntityPlayer ownerPlayer = SpellHelper.getPlayerForUsername(owner); @@ -90,7 +93,10 @@ public class RitualEffectFeatheredKnife extends RitualEffect { } if (hasMagicales) { this.canDrainReagent( - ritualStone, ReagentRegistry.magicalesReagent, magicalesDrain, true); + ritualStone, + ReagentRegistry.magicalesReagent, + magicalesDrain, + true); break; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java index d0359d00..92cb7290 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java @@ -1,5 +1,13 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -7,14 +15,9 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.world.World; public class RitualEffectFlight extends RitualEffect { + public static final int aetherDrain = 10; public static final int reductusDrain = 5; public static final int reagentCooldown = 50; @@ -31,8 +34,8 @@ public class RitualEffectFlight extends RitualEffect { int range = 20; int verticalRange = 30; - AxisAlignedBB axis = - AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1).expand(range, verticalRange, range); + AxisAlignedBB axis = AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1) + .expand(range, verticalRange, range); axis.maxY = 256; axis.minY = 0; List entities = world.getEntitiesWithinAABB(EntityPlayer.class, axis); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java index de31f704..5bfe2639 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java @@ -1,13 +1,8 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.ArrayList; import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemFood; @@ -17,6 +12,13 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.FoodStats; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class RitualEffectFullStomach extends RitualEffect { @Override @@ -36,8 +38,8 @@ public class RitualEffectFullStomach extends RitualEffect { double horizRange = 16; double vertRange = 16; - List playerList = - SpellHelper.getPlayersInRange(world, x + 0.5, y + 0.5, z + 0.5, horizRange, vertRange); + List playerList = SpellHelper + .getPlayersInRange(world, x + 0.5, y + 0.5, z + 0.5, horizRange, vertRange); if (playerList == null) { return; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java index 5e0cefdf..dae63b5d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java @@ -1,5 +1,13 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.block.IGrowable; +import net.minecraft.world.World; +import net.minecraftforge.common.IPlantable; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -7,14 +15,9 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.block.IGrowable; -import net.minecraft.world.World; -import net.minecraftforge.common.IPlantable; public class RitualEffectGrowth extends RitualEffect { + private static final int aquasalusDrain = 10; private static final int terraeDrain = 20; private static final int orbisTerraeDrain = 20; @@ -34,8 +37,8 @@ public class RitualEffectGrowth extends RitualEffect { SoulNetworkHandler.causeNauseaToPlayer(owner); } else { boolean hasTerrae = this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false); - boolean hasOrbisTerrae = - this.canDrainReagent(ritualStone, ReagentRegistry.orbisTerraeReagent, orbisTerraeDrain, false); + boolean hasOrbisTerrae = this + .canDrainReagent(ritualStone, ReagentRegistry.orbisTerraeReagent, orbisTerraeDrain, false); boolean hasVirtus = this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false); int speed = this.getSpeedForReagents(hasTerrae, hasOrbisTerrae); @@ -50,10 +53,16 @@ public class RitualEffectGrowth extends RitualEffect { for (int k = -hydrationRange; k <= hydrationRange; k++) { if (this.canDrainReagent( - ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, false)) { + ritualStone, + ReagentRegistry.aquasalusReagent, + aquasalusDrain, + false)) { if (SpellHelper.hydrateSoil(world, x + i, y + k, z + j)) { this.canDrainReagent( - ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, true); + ritualStone, + ReagentRegistry.aquasalusReagent, + aquasalusDrain, + true); } } } @@ -74,7 +83,16 @@ public class RitualEffectGrowth extends RitualEffect { if (block instanceof IPlantable || block instanceof IGrowable) { { SpellHelper.sendIndexedParticleToAllAround( - world, x, y, z, 20, world.provider.dimensionId, 3, x, y, z); + world, + x, + y, + z, + 20, + world.provider.dimensionId, + 3, + x, + y, + z); block.updateTick(world, x + i, y + k, z + j, world.rand); flag++; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java index 09ff7959..80b0fec1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java @@ -1,5 +1,15 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -7,16 +17,9 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; public class RitualEffectHarvest extends RitualEffect { + @Override public void performEffect(IMasterRitualStone ritualStone) { String owner = ritualStone.getOwner(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java index d7581ef2..297e8911 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java @@ -1,5 +1,14 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -7,15 +16,9 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; public class RitualEffectHealing extends RitualEffect { + public static final int reductusDrain = 10; public static final int virtusDrain = 10; public static final int praesidiumDrain = 2; @@ -36,14 +39,14 @@ public class RitualEffectHealing extends RitualEffect { return; } - boolean hasPraesidium = - this.canDrainReagent(ritualStone, ReagentRegistry.praesidiumReagent, praesidiumDrain, false); + boolean hasPraesidium = this + .canDrainReagent(ritualStone, ReagentRegistry.praesidiumReagent, praesidiumDrain, false); int range = 15 * (hasPraesidium ? 3 : 1); int vertRange = 15 * (hasPraesidium ? 3 : 1); - List list = - SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, vertRange); + List list = SpellHelper + .getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, vertRange); int entityCount = 0; boolean flag = false; @@ -65,8 +68,8 @@ public class RitualEffectHealing extends RitualEffect { } else { entityCount = 0; - boolean hasReductus = - this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); + boolean hasReductus = this + .canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); for (EntityLivingBase livingEntity : list) { hasReductus = hasReductus @@ -77,15 +80,12 @@ public class RitualEffectHealing extends RitualEffect { if (livingEntity.getHealth() + 0.1f < livingEntity.getMaxHealth()) { PotionEffect effect = livingEntity.getActivePotionEffect(Potion.regeneration); - if (effect == null - || (effect != null - && effect.getAmplifier() <= potency - && effect.getDuration() <= timeDelay)) { - if (!hasVirtus - || (this.canDrainReagent( - ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false))) { - livingEntity.addPotionEffect( - new PotionEffect(Potion.regeneration.id, timeDelay + 2, potency)); + if (effect == null || (effect != null && effect.getAmplifier() <= potency + && effect.getDuration() <= timeDelay)) { + if (!hasVirtus || (this + .canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false))) { + livingEntity + .addPotionEffect(new PotionEffect(Potion.regeneration.id, timeDelay + 2, potency)); if (hasReductus) { this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java index 9f5c461b..5aa25ff8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java @@ -1,5 +1,14 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -7,15 +16,9 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.world.World; public class RitualEffectInterdiction extends RitualEffect { + public static final int aetherDrain = 1; public static final int magicalesDrain = 1; @@ -34,12 +37,12 @@ public class RitualEffectInterdiction extends RitualEffect { } else { int d0 = 5; - List list = - SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, d0, d0); + List list = SpellHelper + .getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, d0, d0); boolean flag = false; - boolean hasOffensa = - this.canDrainReagent(ritualStone, ReagentRegistry.magicalesReagent, magicalesDrain, false); + boolean hasOffensa = this + .canDrainReagent(ritualStone, ReagentRegistry.magicalesReagent, magicalesDrain, false); boolean playerFlag = false; for (EntityLivingBase entityLiving : list) { @@ -54,7 +57,10 @@ public class RitualEffectInterdiction extends RitualEffect { if (hasOffensa && entityLiving instanceof EntityPlayer) { SpellHelper.setPlayerSpeedFromServer( - (EntityPlayer) entityLiving, 0.1 * xDif, 0.1 * yDif, 0.1 * zDif); + (EntityPlayer) entityLiving, + 0.1 * xDif, + 0.1 * yDif, + 0.1 * zDif); playerFlag = true; } entityLiving.fallDistance = 0; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java index c6bc9699..deefa831 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java @@ -1,5 +1,18 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; + +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.RoutingFocusParadigm; @@ -11,19 +24,9 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.items.routing.InputRoutingFocus; import WayofTime.alchemicalWizardry.common.items.routing.OutputRoutingFocus; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; public class RitualEffectItemRouting extends RitualEffect { + Random rand = new Random(); @Override @@ -47,7 +50,9 @@ public class RitualEffectItemRouting extends RitualEffect { { Int3 outputFocusChest = this.getOutputBufferChestLocation(i); TileEntity outputFocusInv = world.getTileEntity( - x + outputFocusChest.xCoord, y + outputFocusChest.yCoord, z + outputFocusChest.zCoord); + x + outputFocusChest.xCoord, + y + outputFocusChest.yCoord, + z + outputFocusChest.zCoord); if (outputFocusInv instanceof IInventory) { outputList.add((IInventory) outputFocusInv); } @@ -59,8 +64,7 @@ public class RitualEffectItemRouting extends RitualEffect { for (IInventory outputFocusInventory : outputList) { { - OutputRoutingFocus outputFocus; - ; + OutputRoutingFocus outputFocus;; RoutingFocusParadigm parad = new RoutingFocusParadigm(); @@ -98,9 +102,8 @@ public class RitualEffectItemRouting extends RitualEffect { continue; } inputDirection = posAndFacing.facing; - if (outputChest == null - || !posAndFacing.location.equals( - new Int3(outputChest.xCoord, outputChest.yCoord, outputChest.zCoord))) { + if (outputChest == null || !posAndFacing.location + .equals(new Int3(outputChest.xCoord, outputChest.yCoord, outputChest.zCoord))) { outputChest = world.getTileEntity( posAndFacing.location.xCoord, posAndFacing.location.yCoord, @@ -119,25 +122,26 @@ public class RitualEffectItemRouting extends RitualEffect { y + inputFocusChest.yCoord, z + inputFocusChest.zCoord); if (inputFocusInv instanceof IInventory) { - for (int ji = 0; - ji < ((IInventory) inputFocusInv).getSizeInventory(); - ji++) // Iterate through foci inventory + for (int ji = 0; ji < ((IInventory) inputFocusInv).getSizeInventory(); ji++) // Iterate + // through + // foci + // inventory { ItemStack inputFocusStack = ((IInventory) inputFocusInv).getStackInSlot(ji); if (inputFocusStack != null && inputFocusStack.getItem() instanceof InputRoutingFocus) { - InputRoutingFocus inputFocus = - (InputRoutingFocus) inputFocusStack.getItem(); + InputRoutingFocus inputFocus = (InputRoutingFocus) inputFocusStack + .getItem(); TileEntity inputChest = world.getTileEntity( inputFocus.xCoord(inputFocusStack), inputFocus.yCoord(inputFocusStack), inputFocus.zCoord(inputFocusStack)); if (inputChest instanceof IInventory) { IInventory inputChestInventory = (IInventory) inputChest; - ForgeDirection syphonDirection = - inputFocus.getSetDirection(inputFocusStack); - boolean[] canSyphonList = - new boolean[inputChestInventory.getSizeInventory()]; + ForgeDirection syphonDirection = inputFocus + .getSetDirection(inputFocusStack); + boolean[] canSyphonList = new boolean[inputChestInventory + .getSizeInventory()]; if (inputChest instanceof ISidedInventory) { int[] validSlots = ((ISidedInventory) inputChest) .getAccessibleSlotsFromSide(syphonDirection.ordinal()); @@ -145,17 +149,17 @@ public class RitualEffectItemRouting extends RitualEffect { canSyphonList[in] = true; } } else { - for (int ni = 0; - ni < inputChestInventory.getSizeInventory(); - ni++) { + for (int ni = 0; ni + < inputChestInventory.getSizeInventory(); ni++) { canSyphonList[ni] = true; } } for (int ni = 0; ni < inputChestInventory.getSizeInventory(); ni++) { if (canSyphonList[ni]) { - ItemStack syphonedStack = inputChestInventory.getStackInSlot( - ni); // Has a syphoned item linked, next need to find a + ItemStack syphonedStack = inputChestInventory + .getStackInSlot(ni); // Has a syphoned item linked, next + // need to find a // destination if (syphonedStack == null || (inputChestInventory instanceof ISidedInventory @@ -194,7 +198,7 @@ public class RitualEffectItemRouting extends RitualEffect { newStack = null; } inputChestInventory.setInventorySlotContents(ni, newStack); - // break; + // break; } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java index e47239c3..ce981a66 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java @@ -1,5 +1,15 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.entity.item.EntityItem; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -7,16 +17,9 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; public class RitualEffectItemSuction extends RitualEffect { + public static final int reductusDrain = 1; public static final int timeDelayMin = 60; @@ -49,8 +52,8 @@ public class RitualEffectItemSuction extends RitualEffect { } else { List itemDropList = SpellHelper.getItemsInRange(world, x + 0.5f, y + 0.5f, z + 0.5f, 10, 10); - boolean hasReductus = - this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); + boolean hasReductus = this + .canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); int count = 0; @@ -67,8 +70,8 @@ public class RitualEffectItemSuction extends RitualEffect { ItemStack copyStack = itemEntity.getEntityItem().copy(); int pastAmount = copyStack.stackSize; - ItemStack newStack = - SpellHelper.insertStackIntoInventory(copyStack, tileEntity, ForgeDirection.DOWN); + ItemStack newStack = SpellHelper + .insertStackIntoInventory(copyStack, tileEntity, ForgeDirection.DOWN); if (newStack != null && newStack.stackSize < pastAmount) { count++; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java index 643fe6bf..5af0bd34 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java @@ -1,5 +1,13 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -7,14 +15,9 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; public class RitualEffectJumping extends RitualEffect { + public static final int aetherDrain = 10; public static final int terraeDrain = 10; @@ -29,8 +32,8 @@ public class RitualEffectJumping extends RitualEffect { int z = ritualStone.getZCoord(); double range = 0.5; - List livingList = - SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 1.5, z + 0.5, range, range); + List livingList = SpellHelper + .getLivingEntitiesInRange(world, x + 0.5, y + 1.5, z + 0.5, range, range); if (currentEssence < this.getCostPerRefresh() * livingList.size()) { SoulNetworkHandler.causeNauseaToPlayer(owner); @@ -54,7 +57,10 @@ public class RitualEffectJumping extends RitualEffect { if (livingEntity instanceof EntityPlayer) { SpellHelper.setPlayerSpeedFromServer( - (EntityPlayer) livingEntity, livingEntity.motionX, motionY, livingEntity.motionZ); + (EntityPlayer) livingEntity, + livingEntity.motionX, + motionY, + livingEntity.motionZ); livingEntity.motionY = motionY; livingEntity.fallDistance = 0; flag++; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java index 113c3972..4486f32c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java @@ -1,15 +1,8 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.block.BlockSpectralContainer; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.ArrayList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -22,7 +15,17 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.block.BlockSpectralContainer; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class RitualEffectLava extends RitualEffect { + public static final int sanctusDrain = 20; public static final int offensaDrain = 50; public static final int reductusDrain = 5; @@ -41,13 +44,13 @@ public class RitualEffectLava extends RitualEffect { if (this.canDrainReagent(ritualStone, ReagentRegistry.offensaReagent, offensaDrain, false) && SoulNetworkHandler.canSyphonFromOnlyNetwork(owner, fireFuseCost)) { - boolean hasReductus = - this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); + boolean hasReductus = this + .canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); boolean drainReductus = world.getWorldTime() % 100 == 0; int range = 5; - List entityList = - SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); + List entityList = SpellHelper + .getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); EntityPlayer player = SpellHelper.getPlayerForUsername(owner); for (EntityLivingBase entity : entityList) { @@ -55,9 +58,8 @@ public class RitualEffectLava extends RitualEffect { && this.canDrainReagent(ritualStone, ReagentRegistry.offensaReagent, offensaDrain, false) && SoulNetworkHandler.canSyphonFromOnlyNetwork(owner, fireFuseCost) && !entity.isPotionActive(AlchemicalWizardry.customPotionFireFuse)) { - if (hasReductus - && this.canDrainReagent( - ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false)) { + if (hasReductus && this + .canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false)) { if (entity instanceof EntityPlayer) { if (drainReductus) { this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true); @@ -81,8 +83,8 @@ public class RitualEffectLava extends RitualEffect { SoulNetworkHandler.causeNauseaToPlayer(owner); } else { for (int i = 0; i < 10; i++) { - SpellHelper.sendIndexedParticleToAllAround( - world, x, y, z, 20, world.provider.dimensionId, 3, x, y, z); + SpellHelper + .sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 3, x, y, z); } world.setBlock(x, y + 1, z, Blocks.lava, 0, 3); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java index 112a436d..764c1ded 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java @@ -1,5 +1,13 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -7,14 +15,9 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; public class RitualEffectLeap extends RitualEffect { + public static final int aetherDrain = 10; public static final int terraeDrain = 10; public static final int reductusDrain = 10; @@ -33,8 +36,8 @@ public class RitualEffectLeap extends RitualEffect { double range = 2.0; - List livingList = - SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); + List livingList = SpellHelper + .getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); if (livingList == null) { return; @@ -45,10 +48,10 @@ public class RitualEffectLeap extends RitualEffect { } else { boolean hasAether = this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false); boolean hasTerrae = this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false); - boolean hasReductus = - this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); - boolean hasTenebrae = - this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, false); + boolean hasReductus = this + .canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); + boolean hasTenebrae = this + .canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, false); boolean hasSanctus = this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false); int direction = ritualStone.getDirection(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java index dfef107c..3972e187 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java @@ -1,5 +1,14 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidHandler; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; @@ -7,15 +16,9 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; public class RitualEffectLifeConduit extends RitualEffect { + @Override public void performEffect(IMasterRitualStone ritualStone) { String owner = ritualStone.getOwner(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java index 8eeb57c0..647d7c54 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java @@ -1,5 +1,19 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockOre; +import net.minecraft.block.BlockRedstoneOre; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; +import net.minecraftforge.oredict.OreDictionary; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; @@ -9,20 +23,9 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.ItemType; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import net.minecraft.block.Block; -import net.minecraft.block.BlockOre; -import net.minecraft.block.BlockRedstoneOre; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; public class RitualEffectMagnetic extends RitualEffect { + private static final int potentiaDrain = 10; private static final int terraeDrain = 10; private static final int orbisTerraeDrain = 10; @@ -70,8 +73,8 @@ public class RitualEffectMagnetic extends RitualEffect { } boolean hasTerrae = this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false); - boolean hasOrbisTerrae = - this.canDrainReagent(ritualStone, ReagentRegistry.orbisTerraeReagent, orbisTerraeDrain, false); + boolean hasOrbisTerrae = this + .canDrainReagent(ritualStone, ReagentRegistry.orbisTerraeReagent, orbisTerraeDrain, false); int radius = this.getRadiusForReagents(hasTerrae, hasOrbisTerrae); @@ -83,8 +86,7 @@ public class RitualEffectMagnetic extends RitualEffect { int zRep = 0; boolean replace = false; - outer: - for (int j = 1; j <= 3; j++) { + outer: for (int j = 1; j <= 3; j++) { for (int i = -1; i <= 1; i++) { for (int k = -1; k <= 1; k++) { if ((!replace) && world.isAirBlock(x + i, y + j, z + k)) { @@ -124,7 +126,10 @@ public class RitualEffectMagnetic extends RitualEffect { if (hasPotentia) { this.canDrainReagent( - ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, true); + ritualStone, + ReagentRegistry.potentiaReagent, + potentiaDrain, + true); } if (hasTerrae) { @@ -133,7 +138,10 @@ public class RitualEffectMagnetic extends RitualEffect { if (hasOrbisTerrae) { this.canDrainReagent( - ritualStone, ReagentRegistry.orbisTerraeReagent, orbisTerraeDrain, true); + ritualStone, + ReagentRegistry.orbisTerraeReagent, + orbisTerraeDrain, + true); } this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java index 769cb65f..89c5a121 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java @@ -1,5 +1,13 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityBeacon; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -10,14 +18,9 @@ import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityBeacon; -import net.minecraft.world.World; public class RitualEffectOmegaStalling extends RitualEffect { + @Override public void performEffect(IMasterRitualStone ritualStone) { String owner = ritualStone.getOwner(); @@ -39,8 +42,8 @@ public class RitualEffectOmegaStalling extends RitualEffect { int horizontalRadius = 100; int verticalRadius = 100; - List playerList = SpellHelper.getPlayersInRange( - world, x + 0.5, y + 0.5, z + 0.5, horizontalRadius, verticalRadius); + List playerList = SpellHelper + .getPlayersInRange(world, x + 0.5, y + 0.5, z + 0.5, horizontalRadius, verticalRadius); for (EntityPlayer player : playerList) { if (SoulNetworkHandler.canSyphonFromOnlyNetwork(owner, getCostPerRefresh())) { @@ -49,8 +52,8 @@ public class RitualEffectOmegaStalling extends RitualEffect { if (parad != null) { float costOffset = parad.getCostPerTickOfUse(player); parad.setOmegaStalling(player, 100); - SoulNetworkHandler.syphonFromNetwork( - owner, (int) (getCostPerRefresh() * Math.min(costOffset, 1))); + SoulNetworkHandler + .syphonFromNetwork(owner, (int) (getCostPerRefresh() * Math.min(costOffset, 1))); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java index d8806f76..243ea71d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java @@ -1,5 +1,18 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import net.minecraft.entity.effect.EntityLightningBolt; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler; @@ -17,19 +30,9 @@ import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; import WayofTime.alchemicalWizardry.common.omega.OmegaStructureHandler; import WayofTime.alchemicalWizardry.common.omega.OmegaStructureParameters; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; public class RitualEffectOmegaTest extends RitualEffect { + public static final boolean isTesting = false; public static final int drainTotal = 32 * 1000; @@ -47,8 +50,8 @@ public class RitualEffectOmegaTest extends RitualEffect { return; } - OmegaStructureParameters param = - OmegaStructureHandler.getStructureStabilityFactor(world, x, y, z, 5, new Int3(0, 1, 0)); + OmegaStructureParameters param = OmegaStructureHandler + .getStructureStabilityFactor(world, x, y, z, 5, new Int3(0, 1, 0)); int stab = param.stability; int enchantability = param.enchantability; int enchantmentLevel = param.enchantmentLevel; @@ -57,7 +60,7 @@ public class RitualEffectOmegaTest extends RitualEffect { return; } - // System.out.println("Stability: " + stab + ", Enchantability: " + enchantability + ", Enchantment + // System.out.println("Stability: " + stab + ", Enchantability: " + enchantability + ", Enchantment // Level: " + enchantmentLevel); double range = 0.5; @@ -110,9 +113,8 @@ public class RitualEffectOmegaTest extends RitualEffect { for (EntityPlayer player : playerList) { OmegaParadigm waterParadigm = OmegaRegistry.getParadigmForReagent(reagent); - if (waterParadigm != null - && waterParadigm.convertPlayerArmour( - player, x, y, z, stab, affinity, enchantability, enchantmentLevel)) { + if (waterParadigm != null && waterParadigm + .convertPlayerArmour(player, x, y, z, stab, affinity, enchantability, enchantmentLevel)) { APISpellHelper.setPlayerCurrentReagentAmount(player, tickDuration); APISpellHelper.setPlayerMaxReagentAmount(player, tickDuration); APISpellHelper.setPlayerReagentType(player, reagent); @@ -134,13 +136,17 @@ public class RitualEffectOmegaTest extends RitualEffect { TileEntity tile = world.getTileEntity(x + jarLoc.xCoord, y + jarLoc.yCoord, z + jarLoc.zCoord); if (tile instanceof IReagentHandler) { IReagentHandler container = (IReagentHandler) tile; - ReagentStack drained = - container.drain(ForgeDirection.UP, new ReagentStack(reagent, drainLeft), true); + ReagentStack drained = container + .drain(ForgeDirection.UP, new ReagentStack(reagent, drainLeft), true); if (drained != null) { drainLeft -= drained.amount; world.markBlockForUpdate(x + jarLoc.xCoord, y + jarLoc.yCoord, z + jarLoc.zCoord); - world.addWeatherEffect(new EntityLightningBolt( - world, x + jarLoc.xCoord, y + jarLoc.yCoord, z + jarLoc.zCoord)); + world.addWeatherEffect( + new EntityLightningBolt( + world, + x + jarLoc.xCoord, + y + jarLoc.yCoord, + z + jarLoc.zCoord)); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java index 70057c27..c4cea72d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java @@ -1,5 +1,11 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; @@ -7,12 +13,9 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks; import WayofTime.alchemicalWizardry.common.CoordAndRange; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import net.minecraft.world.World; public class RitualEffectSpawnWard extends RitualEffect { + @Override public void performEffect(IMasterRitualStone ritualStone) { String owner = ritualStone.getOwner(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java index c63ec5ac..2c882ffb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java @@ -1,5 +1,16 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; @@ -9,18 +20,10 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; public class RitualEffectSphereCreator extends RitualEffect { - // private static final int potentiaDrain = 10; + + // private static final int potentiaDrain = 10; public static int MAX_RADIUS = 32; private static final int terraeDrain = 1; @@ -34,7 +37,7 @@ public class RitualEffectSphereCreator extends RitualEffect { int y = ritualStone.getYCoord(); int z = ritualStone.getZCoord(); - // boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, + // boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, // potentiaDrain, false); if (world.getWorldTime() % 1 != 0) { @@ -121,8 +124,8 @@ public class RitualEffectSphereCreator extends RitualEffect { continue; } - if (BlockTeleposer.swapBlocks( - this, world, world, x + i, yN + j, z + k, x + i, yP + j, z + k, false, 2)) { + if (BlockTeleposer + .swapBlocks(this, world, world, x + i, yN + j, z + k, x + i, yP + j, z + k, false, 2)) { SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); if (this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true)) { world.setBlock(x + i, yN + j, z + k, Blocks.dirt, 0, 2); @@ -140,8 +143,8 @@ public class RitualEffectSphereCreator extends RitualEffect { } j = -radius; i++; - // this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); - // return; + // this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); + // return; } ritualStone.setActive(false); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java index c3c7748f..2d5138b9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java @@ -1,5 +1,15 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -9,16 +19,9 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.entity.projectile.EntityMeteor; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.world.World; public class RitualEffectSummonMeteor extends RitualEffect { + @Override public void performEffect(IMasterRitualStone ritualStone) { String owner = ritualStone.getOwner(); @@ -34,7 +37,8 @@ public class RitualEffectSummonMeteor extends RitualEffect { } List entities = world.getEntitiesWithinAABB( - EntityItem.class, AxisAlignedBB.getBoundingBox(x, y + 1, z, x + 1, y + 2, z + 1)); + EntityItem.class, + AxisAlignedBB.getBoundingBox(x, y + 1, z, x + 1, y + 2, z + 1)); if (entities == null) return; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java index 7be7fea5..72205246 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java @@ -1,5 +1,15 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -8,16 +18,9 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; public class RitualEffectSupression extends RitualEffect { + public static final int aquasalusDrain = 15; public static final int aetherDrain = 15; @@ -33,8 +36,8 @@ public class RitualEffectSupression extends RitualEffect { Block blockish = world.getBlock(x, y - 1, z); - boolean hasAquasalus = - this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, false); + boolean hasAquasalus = this + .canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, false); boolean hasAether = this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false); int costMod = this.getCostModifier(blockish); @@ -69,8 +72,8 @@ public class RitualEffectSupression extends RitualEffect { Block block = world.getBlock(x + i, y + j, z + k); if (SpellHelper.isBlockFluid(block)) { - TESpectralContainer.createSpectralBlockAtLocation( - world, x + i, y + j, z + k, 3 * masterRadius); + TESpectralContainer + .createSpectralBlockAtLocation(world, x + i, y + j, z + k, 3 * masterRadius); } else { TileEntity tile = world.getTileEntity(x + i, y + j, z + k); if (tile instanceof TESpectralContainer) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java index 5037e110..2da10b30 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java @@ -1,5 +1,15 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import net.minecraft.entity.effect.EntityLightningBolt; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.ItemStack; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.ModItems; @@ -13,16 +23,9 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.world.World; public class RitualEffectUnbinding extends RitualEffect { + @Override public void performEffect(IMasterRitualStone ritualStone) { String owner = ritualStone.getOwner(); @@ -38,9 +41,12 @@ public class RitualEffectUnbinding extends RitualEffect { } else { int d0 = 0; AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox( - (double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 2), (double) - (z + 1)) - .expand(d0, d0, d0); + (double) x, + (double) y + 1, + (double) z, + (double) (x + 1), + (double) (y + 2), + (double) (z + 1)).expand(d0, d0, d0); List list = world.getEntitiesWithinAABB(EntityItem.class, axisalignedbb); Iterator iterator = list.iterator(); EntityItem item; @@ -56,11 +62,10 @@ public class RitualEffectUnbinding extends RitualEffect { continue; } - boolean hasSanctus = - this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false); + boolean hasSanctus = this + .canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false); if (hasSanctus) { - if (itemStack.getItem() instanceof IBindable - && !EnergyItems.getOwnerName(itemStack).equals("")) { + if (itemStack.getItem() instanceof IBindable && !EnergyItems.getOwnerName(itemStack).equals("")) { world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z - 5)); world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z + 5)); world.addWeatherEffect(new EntityLightningBolt(world, x - 5, y + 1, z)); @@ -104,15 +109,23 @@ public class RitualEffectUnbinding extends RitualEffect { for (ItemStack internalItem : inv) { if (internalItem != null) { doLightning(world, x, y, z); - EntityItem newItem = - new EntityItem(world, x + 0.5, y + 1, z + 0.5, internalItem.copy()); + EntityItem newItem = new EntityItem( + world, + x + 0.5, + y + 1, + z + 0.5, + internalItem.copy()); world.spawnEntityInWorld(newItem); } } } EntityItem newItem = new EntityItem( - world, x + 0.5, y + 1, z + 0.5, new ItemStack(ModBlocks.bloodSocket, bloodSockets)); + world, + x + 0.5, + y + 1, + z + 0.5, + new ItemStack(ModBlocks.bloodSocket, bloodSockets)); world.spawnEntityInWorld(newItem); ritualStone.setActive(false); drain = true; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java index 5d200b7c..a64b7416 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java @@ -1,5 +1,11 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; @@ -7,12 +13,9 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks; import WayofTime.alchemicalWizardry.common.CoordAndRange; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import net.minecraft.world.World; public class RitualEffectVeilOfEvil extends RitualEffect { + @Override public void performEffect(IMasterRitualStone ritualStone) { String owner = ritualStone.getOwner(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java index aa3eaafd..1b814f12 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java @@ -1,15 +1,8 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.block.BlockSpectralContainer; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.ArrayList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -23,7 +16,17 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.block.BlockSpectralContainer; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class RitualEffectWater extends RitualEffect { + public static final int aquasalusDrain = 5; public static final int offensaDrain = 20; public static final int sanctusDrain = 5; @@ -39,10 +42,10 @@ public class RitualEffectWater extends RitualEffect { int y = ritualStone.getYCoord(); int z = ritualStone.getZCoord(); - boolean hasCrystallos = - this.canDrainReagent(ritualStone, ReagentRegistry.crystallosReagent, crystallosDrain, false); - boolean hasAquasalus = - this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, false); + boolean hasCrystallos = this + .canDrainReagent(ritualStone, ReagentRegistry.crystallosReagent, crystallosDrain, false); + boolean hasAquasalus = this + .canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, false); boolean hasOffensa = this.canDrainReagent(ritualStone, ReagentRegistry.offensaReagent, offensaDrain, false); if (hasAquasalus) { @@ -61,8 +64,8 @@ public class RitualEffectWater extends RitualEffect { } if (hasOffensa) { - boolean hasReductus = - this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); + boolean hasReductus = this + .canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); boolean drainReductus = world.getWorldTime() % 100 == 0; int range = 10; @@ -75,9 +78,8 @@ public class RitualEffectWater extends RitualEffect { continue; } - if (hasReductus - && this.canDrainReagent( - ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false)) { + if (hasReductus && this + .canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false)) { if (livingEntity instanceof EntityPlayer) { if (drainReductus) { this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true); @@ -88,8 +90,8 @@ public class RitualEffectWater extends RitualEffect { } if (!livingEntity.isPotionActive(AlchemicalWizardry.customPotionDrowning)) { - livingEntity.addPotionEffect( - new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 100, 0)); + livingEntity + .addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 100, 0)); this.canDrainReagent(ritualStone, ReagentRegistry.offensaReagent, offensaDrain, true); } } @@ -103,8 +105,8 @@ public class RitualEffectWater extends RitualEffect { SoulNetworkHandler.causeNauseaToPlayer(owner); } else { for (int i = 0; i < 10; i++) { - SpellHelper.sendIndexedParticleToAllAround( - world, x, y, z, 20, world.provider.dimensionId, 3, x, y, z); + SpellHelper + .sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 3, x, y, z); } world.setBlock(x, y + 1, z, Blocks.water, 0, 3); @@ -134,9 +136,11 @@ public class RitualEffectWater extends RitualEffect { for (int i = -range; i <= range; i++) { for (int j = -range; j <= range; j++) { for (int k = -range; k <= range; k++) { - hasCrystallos = hasCrystallos - && this.canDrainReagent( - ritualStone, ReagentRegistry.crystallosReagent, crystallosDrain, false); + hasCrystallos = hasCrystallos && this.canDrainReagent( + ritualStone, + ReagentRegistry.crystallosReagent, + crystallosDrain, + false); if (hasCrystallos) { boolean success = false; @@ -152,7 +156,10 @@ public class RitualEffectWater extends RitualEffect { if (success) { this.canDrainReagent( - ritualStone, ReagentRegistry.crystallosReagent, crystallosDrain, true); + ritualStone, + ReagentRegistry.crystallosReagent, + crystallosDrain, + true); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java index 4c116a7d..faca2746 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java @@ -1,5 +1,14 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -7,15 +16,9 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; public class RitualEffectWellOfSuffering extends RitualEffect { + public static final int timeDelay = 25; public static final int amount = AlchemicalWizardry.lpPerSacrificeWellOfSuffering; @@ -60,21 +63,24 @@ public class RitualEffectWellOfSuffering extends RitualEffect { int d0 = 10; int vertRange = hasPotentia ? 20 : 10; AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox( - (double) x, (double) y, (double) z, (double) (x + 1), (double) (y + 1), (double) (z + 1)) - .expand(d0, vertRange, d0); + (double) x, + (double) y, + (double) z, + (double) (x + 1), + (double) (y + 1), + (double) (z + 1)).expand(d0, vertRange, d0); List list = world.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); int entityCount = 0; - boolean hasTennebrae = - this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tennebraeDrain, false); + boolean hasTennebrae = this + .canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tennebraeDrain, false); boolean hasOffensa = this.canDrainReagent(ritualStone, ReagentRegistry.offensaReagent, offensaDrain, false); if (currentEssence < this.getCostPerRefresh() * list.size()) { SoulNetworkHandler.causeNauseaToPlayer(owner); } else { for (EntityLivingBase livingEntity : list) { - if (!livingEntity.isEntityAlive() - || livingEntity instanceof EntityPlayer + if (!livingEntity.isEntityAlive() || livingEntity instanceof EntityPlayer || AlchemicalWizardry.wellBlacklist.contains(livingEntity.getClass())) { continue; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicIgnMeta.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicIgnMeta.java index a41943af..78f4335b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicIgnMeta.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicIgnMeta.java @@ -1,9 +1,11 @@ package WayofTime.alchemicalWizardry.common.routing; -import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; + public class RoutingFocusLogicIgnMeta extends RoutingFocusLogic { + @Override public boolean getDefaultMatch(ItemStack keyStack, ItemStack checkedStack) { return (keyStack != null ? checkedStack != null && keyStack.getItem() == checkedStack.getItem() : false); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimit.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimit.java index 1f479cec..bb95e509 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimit.java @@ -4,6 +4,7 @@ import WayofTime.alchemicalWizardry.api.ILimitingLogic; import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; public class RoutingFocusLogicLimit extends RoutingFocusLogic implements ILimitingLogic { + public int getRoutingLimit() { return 0; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitDefault.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitDefault.java index 8adabbd6..5e1de4f0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitDefault.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitDefault.java @@ -1,9 +1,11 @@ package WayofTime.alchemicalWizardry.common.routing; -import WayofTime.alchemicalWizardry.common.items.routing.ILimitedRoutingFocus; import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.common.items.routing.ILimitedRoutingFocus; + public class RoutingFocusLogicLimitDefault extends RoutingFocusLogicLimit { + public int limit = 0; public RoutingFocusLogicLimitDefault(ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitGlobal.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitGlobal.java index 73bc4297..0ab0595b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitGlobal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitGlobal.java @@ -1,9 +1,11 @@ package WayofTime.alchemicalWizardry.common.routing; -import WayofTime.alchemicalWizardry.common.items.routing.ILimitedRoutingFocus; import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.common.items.routing.ILimitedRoutingFocus; + public class RoutingFocusLogicLimitGlobal extends RoutingFocusLogicLimit { + public int limit = 0; public RoutingFocusLogicLimitGlobal(ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitIgnMeta.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitIgnMeta.java index 827eda11..dfaff296 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitIgnMeta.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitIgnMeta.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.routing; +import net.minecraft.item.ItemStack; + import WayofTime.alchemicalWizardry.api.ILimitingLogic; import WayofTime.alchemicalWizardry.common.items.routing.ILimitedRoutingFocus; -import net.minecraft.item.ItemStack; public class RoutingFocusLogicLimitIgnMeta extends RoutingFocusLogicIgnMeta implements ILimitingLogic { + public int limit = 0; public RoutingFocusLogicLimitIgnMeta(ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitMatchNBT.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitMatchNBT.java index e3fe2c5b..f6da8c80 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitMatchNBT.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitMatchNBT.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.routing; +import net.minecraft.item.ItemStack; + import WayofTime.alchemicalWizardry.api.ILimitingLogic; import WayofTime.alchemicalWizardry.common.items.routing.ILimitedRoutingFocus; -import net.minecraft.item.ItemStack; public class RoutingFocusLogicLimitMatchNBT extends RoutingFocusLogicMatchNBT implements ILimitingLogic { + public int limit = 0; public RoutingFocusLogicLimitMatchNBT(ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitModItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitModItems.java index 9438abba..41a8b8cf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitModItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitModItems.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.routing; +import net.minecraft.item.ItemStack; + import WayofTime.alchemicalWizardry.api.ILimitingLogic; import WayofTime.alchemicalWizardry.common.items.routing.ILimitedRoutingFocus; -import net.minecraft.item.ItemStack; public class RoutingFocusLogicLimitModItems extends RoutingFocusLogicModItems implements ILimitingLogic { + public int limit = 0; public RoutingFocusLogicLimitModItems(ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicMatchNBT.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicMatchNBT.java index 74267741..9bc8f658 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicMatchNBT.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicMatchNBT.java @@ -1,18 +1,16 @@ package WayofTime.alchemicalWizardry.common.routing; -import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; + public class RoutingFocusLogicMatchNBT extends RoutingFocusLogic { + public boolean getDefaultMatch(ItemStack keyStack, ItemStack checkedStack) { - return (keyStack != null - ? checkedStack != null - && keyStack.getItem() == checkedStack.getItem() - && (keyStack.getItem().getHasSubtypes() - ? keyStack.getItemDamage() == checkedStack.getItemDamage() - : true) - && keyStack.areItemStackTagsEqual(keyStack, checkedStack) - : false); + return (keyStack != null ? checkedStack != null && keyStack.getItem() == checkedStack.getItem() + && (keyStack.getItem().getHasSubtypes() ? keyStack.getItemDamage() == checkedStack.getItemDamage() + : true) + && keyStack.areItemStackTagsEqual(keyStack, checkedStack) : false); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java index 508742b9..8979fe34 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.routing; -import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; -import cpw.mods.fml.common.registry.GameData; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; +import cpw.mods.fml.common.registry.GameData; + public class RoutingFocusLogicModItems extends RoutingFocusLogic { + @Override public boolean getDefaultMatch(ItemStack keyStack, ItemStack checkedStack) { if (keyStack != null && checkedStack != null && keyStack.getItem() != null && checkedStack.getItem() != null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/OutputRoutingFocusModItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/OutputRoutingFocusModItems.java index 6a4f1a7c..1c9476df 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/OutputRoutingFocusModItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/OutputRoutingFocusModItems.java @@ -5,6 +5,7 @@ import WayofTime.alchemicalWizardry.common.items.routing.OutputRoutingFocus; import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicModItems; public class OutputRoutingFocusModItems extends OutputRoutingFocus { + @Override public String getFocusDescription() { return "Only accepts items that are the same modID"; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java index d3a228c5..63debc80 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java @@ -1,19 +1,11 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles; -import WayofTime.alchemicalWizardry.api.items.interfaces.ILPGauge; -import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; -import WayofTime.alchemicalWizardry.common.NewPacketHandler; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilDivination; -import cpw.mods.fml.common.FMLCommonHandler; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Random; import java.util.regex.Pattern; + import net.minecraft.block.Block; import net.minecraft.block.BlockLiquid; import net.minecraft.enchantment.Enchantment; @@ -52,16 +44,26 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.oredict.OreDictionary; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles; +import WayofTime.alchemicalWizardry.api.items.interfaces.ILPGauge; +import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; +import WayofTime.alchemicalWizardry.common.NewPacketHandler; +import WayofTime.alchemicalWizardry.common.items.sigil.SigilDivination; +import cpw.mods.fml.common.FMLCommonHandler; + public class SpellHelper { + public static Random rand = new Random(); public static final double root2 = Math.sqrt(2); public static boolean canEntityBeSeen(Entity entity, Entity entity2) { return entity.worldObj.rayTraceBlocks( - SpellHelper.createVec3(entity.posX, entity.posY, entity.posZ), - SpellHelper.createVec3(entity2.posX, entity2.posY, entity2.posZ), - false) - == null; + SpellHelper.createVec3(entity.posX, entity.posY, entity.posZ), + SpellHelper.createVec3(entity2.posX, entity2.posY, entity2.posZ), + false) == null; } public static Vec3 createVec3(double x, double y, double z) { @@ -132,39 +134,39 @@ public class SpellHelper { return false; } - public static List getEntitiesInRange( - World world, double posX, double posY, double posZ, double horizontalRadius, double verticalRadius) { + public static List getEntitiesInRange(World world, double posX, double posY, double posZ, + double horizontalRadius, double verticalRadius) { return world.getEntitiesWithinAABB( Entity.class, - AxisAlignedBB.getBoundingBox( - posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f) + AxisAlignedBB + .getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f) .expand(horizontalRadius, verticalRadius, horizontalRadius)); } - public static List getLivingEntitiesInRange( - World world, double posX, double posY, double posZ, double horizontalRadius, double verticalRadius) { + public static List getLivingEntitiesInRange(World world, double posX, double posY, double posZ, + double horizontalRadius, double verticalRadius) { return world.getEntitiesWithinAABB( EntityLivingBase.class, - AxisAlignedBB.getBoundingBox( - posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f) + AxisAlignedBB + .getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f) .expand(horizontalRadius, verticalRadius, horizontalRadius)); } - public static List getItemsInRange( - World world, double posX, double posY, double posZ, double horizontalRadius, double verticalRadius) { + public static List getItemsInRange(World world, double posX, double posY, double posZ, + double horizontalRadius, double verticalRadius) { return world.getEntitiesWithinAABB( EntityItem.class, - AxisAlignedBB.getBoundingBox( - posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f) + AxisAlignedBB + .getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f) .expand(horizontalRadius, verticalRadius, horizontalRadius)); } - public static List getPlayersInRange( - World world, double posX, double posY, double posZ, double horizontalRadius, double verticalRadius) { + public static List getPlayersInRange(World world, double posX, double posY, double posZ, + double horizontalRadius, double verticalRadius) { return world.getEntitiesWithinAABB( EntityPlayer.class, - AxisAlignedBB.getBoundingBox( - posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f) + AxisAlignedBB + .getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f) .expand(horizontalRadius, verticalRadius, horizontalRadius)); } @@ -231,15 +233,8 @@ public class SpellHelper { return SoulNetworkHandler.getPlayerForUsername(str); } - public static void sendParticleToPlayer( - EntityPlayer player, - String str, - double xCoord, - double yCoord, - double zCoord, - double xVel, - double yVel, - double zVel) { + public static void sendParticleToPlayer(EntityPlayer player, String str, double xCoord, double yCoord, + double zCoord, double xVel, double yVel, double zVel) { if (player instanceof EntityPlayerMP) { NewPacketHandler.INSTANCE.sendTo( NewPacketHandler.getParticlePacket(str, xCoord, yCoord, zCoord, xVel, yVel, zVel), @@ -247,8 +242,8 @@ public class SpellHelper { } } - public static void sendIndexedParticleToPlayer( - EntityPlayer player, int index, double xCoord, double yCoord, double zCoord) { + public static void sendIndexedParticleToPlayer(EntityPlayer player, int index, double xCoord, double yCoord, + double zCoord) { switch (index) { case 1: SpellHelper.sendParticleToPlayer( @@ -304,19 +299,8 @@ public class SpellHelper { } } - public static void sendParticleToAllAround( - World world, - double xPos, - double yPos, - double zPos, - int radius, - int dimension, - String str, - double xCoord, - double yCoord, - double zCoord, - double xVel, - double yVel, + public static void sendParticleToAllAround(World world, double xPos, double yPos, double zPos, int radius, + int dimension, String str, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel) { List entities = SpellHelper.getPlayersInRange(world, xPos, yPos, zPos, radius, radius); @@ -329,17 +313,8 @@ public class SpellHelper { } } - public static void sendIndexedParticleToAllAround( - World world, - double xPos, - double yPos, - double zPos, - int radius, - int dimension, - int index, - double xCoord, - double yCoord, - double zCoord) { + public static void sendIndexedParticleToAllAround(World world, double xPos, double yPos, double zPos, int radius, + int dimension, int index, double xCoord, double yCoord, double zCoord) { List entities = SpellHelper.getPlayersInRange(world, xPos, yPos, zPos, radius, radius); if (entities == null) { @@ -353,8 +328,8 @@ public class SpellHelper { public static void setPlayerSpeedFromServer(EntityPlayer player, double motionX, double motionY, double motionZ) { if (player instanceof EntityPlayerMP) { - NewPacketHandler.INSTANCE.sendTo( - NewPacketHandler.getVelSettingPacket(motionX, motionY, motionZ), (EntityPlayerMP) player); + NewPacketHandler.INSTANCE + .sendTo(NewPacketHandler.getVelSettingPacket(motionX, motionY, motionZ), (EntityPlayerMP) player); } } @@ -365,8 +340,7 @@ public class SpellHelper { private static final Pattern FAKE_PLAYER_PATTERN = Pattern.compile("^(?:\\[.*\\])|(?:ComputerCraft)$"); public static boolean isFakePlayer(EntityPlayer player) { - return player instanceof FakePlayer - || FAKE_PLAYER_PATTERN.matcher(SpellHelper.getUsername(player)).matches(); + return player instanceof FakePlayer || FAKE_PLAYER_PATTERN.matcher(SpellHelper.getUsername(player)).matches(); } public static void smashBlock(World world, int posX, int posY, int posZ) { @@ -425,8 +399,8 @@ public class SpellHelper { return null; } - public static List getItemsFromBlock( - World world, Block block, int x, int y, int z, int meta, boolean silkTouch, int fortune) { + public static List getItemsFromBlock(World world, Block block, int x, int y, int z, int meta, + boolean silkTouch, int fortune) { return APISpellHelper.getItemsFromBlock(world, block, x, y, z, meta, silkTouch, fortune); } @@ -466,7 +440,8 @@ public class SpellHelper { } /** - * Used to determine if stack1 can be placed into stack2. If stack2 is null and stack1 isn't null, returns true. Ignores stack size + * Used to determine if stack1 can be placed into stack2. If stack2 is null and stack1 isn't null, returns true. + * Ignores stack size * * @param stack1 Stack that is placed into a slot * @param stack2 Slot content that stack1 is placed into @@ -485,8 +460,7 @@ public class SpellHelper { return false; } - return stack1.getItem() == stack2.getItem() - && stack1.getItemDamage() == stack2.getItemDamage() + return stack1.getItem() == stack2.getItem() && stack1.getItemDamage() == stack2.getItemDamage() && ItemStack.areItemStackTagsEqual(stack1, stack2); } @@ -501,8 +475,7 @@ public class SpellHelper { if (canCombine(stack1, stack2)) { int transferedAmount = Math.min( transferMax, - stack2 == null - ? stack1.stackSize + stack2 == null ? stack1.stackSize : Math.min(stack2.getMaxStackSize() - stack2.stackSize, stack1.stackSize)); if (transferedAmount > 0) { ItemStack copyStack = stack1.splitStack(transferedAmount); @@ -529,8 +502,7 @@ public class SpellHelper { ItemStack[] returned = new ItemStack[2]; if (canCombine(stack1, stack2)) { - int transferedAmount = stack2 == null - ? stack1.stackSize + int transferedAmount = stack2 == null ? stack1.stackSize : Math.min(stack2.getMaxStackSize() - stack2.stackSize, stack1.stackSize); if (transferedAmount > 0) { ItemStack copyStack = stack1.splitStack(transferedAmount); @@ -588,8 +560,8 @@ public class SpellHelper { return canInsertStackFullyIntoInventory(stack, inventory, dir, false, 0); } - public static boolean canInsertStackFullyIntoInventory( - ItemStack stack, IInventory inventory, ForgeDirection dir, boolean fillToLimit, int limit) { + public static boolean canInsertStackFullyIntoInventory(ItemStack stack, IInventory inventory, ForgeDirection dir, + boolean fillToLimit, int limit) { if (stack == null) { return true; } @@ -653,8 +625,8 @@ public class SpellHelper { return false; } - public static ItemStack insertStackIntoInventory( - ItemStack stack, IInventory inventory, ForgeDirection dir, int limit) { + public static ItemStack insertStackIntoInventory(ItemStack stack, IInventory inventory, ForgeDirection dir, + int limit) { if (stack == null) { return null; } @@ -744,8 +716,7 @@ public class SpellHelper { public static boolean hydrateSoil(World world, int x, int y, int z) { Block block = world.getBlock(x, y, z); - if (block == Blocks.dirt - || block == Blocks.grass + if (block == Blocks.dirt || block == Blocks.grass || (block == Blocks.farmland && world.getBlockMetadata(x, y, z) == 0)) { world.setBlock(x, y, z, Blocks.farmland, 15, 2); @@ -762,10 +733,11 @@ public class SpellHelper { EntityPlayerMP player = (EntityPlayerMP) entity; player.setPositionAndUpdate(x, y, z); player.worldObj.updateEntityWithOptionalForce(player, false); - player.playerNetServerHandler.sendPacket(new S06PacketUpdateHealth( - player.getHealth(), - player.getFoodStats().getFoodLevel(), - player.getFoodStats().getSaturationLevel())); + player.playerNetServerHandler.sendPacket( + new S06PacketUpdateHealth( + player.getHealth(), + player.getFoodStats().getFoodLevel(), + player.getFoodStats().getSaturationLevel())); player.timeUntilPortal = 150; player.worldObj.playSoundEffect(x, y, z, "mob.endermen.portal", 1.0F, 1.0F); return player; @@ -785,8 +757,8 @@ public class SpellHelper { } // Adapated from Enhanced Portals 3 code - public static Entity teleportEntityToDim( - World oldWorld, int newWorldID, double d, double e, double f, Entity entity) { + public static Entity teleportEntityToDim(World oldWorld, int newWorldID, double d, double e, double f, + Entity entity) { if (entity != null) { if (entity.timeUntilPortal <= 0) { WorldServer oldWorldServer = MinecraftServer.getServer().worldServerForDimension(entity.dimension); @@ -798,22 +770,28 @@ public class SpellHelper { player.worldObj.theProfiler.startSection("changeDimension"); ServerConfigurationManager config = player.mcServer.getConfigurationManager(); oldWorld.playSoundEffect( - player.posX, player.posY, player.posZ, "mob.endermen.portal", 1.0F, 1.0F); + player.posX, + player.posY, + player.posZ, + "mob.endermen.portal", + 1.0F, + 1.0F); player.closeScreen(); player.dimension = newWorldServer.provider.dimensionId; - player.playerNetServerHandler.sendPacket(new S07PacketRespawn( - player.dimension, - player.worldObj.difficultySetting, - newWorldServer.getWorldInfo().getTerrainType(), - player.theItemInWorldManager.getGameType())); + player.playerNetServerHandler.sendPacket( + new S07PacketRespawn( + player.dimension, + player.worldObj.difficultySetting, + newWorldServer.getWorldInfo().getTerrainType(), + player.theItemInWorldManager.getGameType())); oldWorldServer.removeEntity(player); player.isDead = false; player.setLocationAndAngles(d, e, f, player.rotationYaw, player.rotationPitch); newWorldServer.spawnEntityInWorld(player); player.setWorld(newWorldServer); config.func_72375_a(player, oldWorldServer); - player.playerNetServerHandler.setPlayerLocation( - d, e, f, entity.rotationYaw, entity.rotationPitch); + player.playerNetServerHandler + .setPlayerLocation(d, e, f, entity.rotationYaw, entity.rotationPitch); player.theItemInWorldManager.setWorld(newWorldServer); config.updateTimeAndWeatherForPlayer(player, newWorldServer); config.syncPlayerInventory(player); @@ -821,17 +799,20 @@ public class SpellHelper { oldWorldServer.resetUpdateEntityTick(); newWorldServer.resetUpdateEntityTick(); player.worldObj.theProfiler.endSection(); - for (Iterator potion = - player.getActivePotionEffects().iterator(); - potion.hasNext(); ) { - player.playerNetServerHandler.sendPacket( - new S1DPacketEntityEffect(player.getEntityId(), potion.next())); + for (Iterator potion = player.getActivePotionEffects().iterator(); potion + .hasNext();) { + player.playerNetServerHandler + .sendPacket(new S1DPacketEntityEffect(player.getEntityId(), potion.next())); } - player.playerNetServerHandler.sendPacket(new S1FPacketSetExperience( - player.experience, player.experienceTotal, player.experienceLevel)); - FMLCommonHandler.instance() - .firePlayerChangedDimensionEvent( - player, oldWorldServer.provider.dimensionId, player.dimension); + player.playerNetServerHandler.sendPacket( + new S1FPacketSetExperience( + player.experience, + player.experienceTotal, + player.experienceLevel)); + FMLCommonHandler.instance().firePlayerChangedDimensionEvent( + player, + oldWorldServer.provider.dimensionId, + player.dimension); player.timeUntilPortal = 150; } player.worldObj.theProfiler.endSection(); @@ -862,23 +843,22 @@ public class SpellHelper { public static boolean areItemStacksEqual(ItemStack stack, ItemStack compressedStack) { return stack.isItemEqual(compressedStack) - && (stack.getTagCompound() == null - ? compressedStack.getTagCompound() == null + && (stack.getTagCompound() == null ? compressedStack.getTagCompound() == null : stack.getTagCompound().equals(compressedStack.getTagCompound())); } /* * Ripped from EntityLivingBase, since it decided to be a scrub and make the method protected. */ - public static float applyPotionDamageCalculations( - EntityLivingBase entity, DamageSource p_70672_1_, float p_70672_2_) { - // if (p_70672_1_.isDamageAbsolute()) - // { - // return p_70672_2_; - // } - // else + public static float applyPotionDamageCalculations(EntityLivingBase entity, DamageSource p_70672_1_, + float p_70672_2_) { + // if (p_70672_1_.isDamageAbsolute()) + // { + // return p_70672_2_; + // } + // else { - // if (entity instanceof EntityZombie) + // if (entity instanceof EntityZombie) { // par2 = par2; // Forge: Noop Warning } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefaultEarth.java index 5a3fcf92..701ee73a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefaultEarth.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeDefaultEarth; public class CSEMeleeDefaultEarth extends ComplexSpellEffect { + public CSEMeleeDefaultEarth() { super(ComplexSpellType.EARTH, ComplexSpellModifier.DEFAULT); } @@ -22,9 +23,8 @@ public class CSEMeleeDefaultEarth extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmMelee) { - ((SpellParadigmMelee) parad) - .addWorldEffect(new MeleeDefaultEarth( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmMelee) parad).addWorldEffect( + new MeleeDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -35,8 +35,7 @@ public class CSEMeleeDefaultEarth extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (50 - * Math.pow(1.5 * this.potencyEnhancement + 1, 3) + return (int) (50 * Math.pow(1.5 * this.potencyEnhancement + 1, 3) * (0.5 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefensiveEarth.java index 22c43c85..39dc03c1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefensiveEarth.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeDefensiveEarth; public class CSEMeleeDefensiveEarth extends ComplexSpellEffect { + public CSEMeleeDefensiveEarth() { super(ComplexSpellType.EARTH, ComplexSpellModifier.DEFENSIVE); } @@ -22,9 +23,8 @@ public class CSEMeleeDefensiveEarth extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmMelee) { - ((SpellParadigmMelee) parad) - .addWorldEffect(new MeleeDefensiveEarth( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmMelee) parad).addWorldEffect( + new MeleeDefensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -35,8 +35,7 @@ public class CSEMeleeDefensiveEarth extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (5 - * (1.2 * this.powerEnhancement + 1) + return (int) (5 * (1.2 * this.powerEnhancement + 1) * (1.0f / 3.0f * Math.pow(this.potencyEnhancement, 2) + 2 + 1.0f / 2.0f * this.potencyEnhancement) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeEnvironmentalEarth.java index dfd1b688..c7b183da 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeEnvironmentalEarth.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeEnvironmentalEarth; public class CSEMeleeEnvironmentalEarth extends ComplexSpellEffect { + public CSEMeleeEnvironmentalEarth() { super(ComplexSpellType.EARTH, ComplexSpellModifier.ENVIRONMENTAL); } @@ -22,9 +23,8 @@ public class CSEMeleeEnvironmentalEarth extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmMelee) { - ((SpellParadigmMelee) parad) - .addWorldEffect(new MeleeEnvironmentalEarth( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmMelee) parad).addWorldEffect( + new MeleeEnvironmentalEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -35,8 +35,7 @@ public class CSEMeleeEnvironmentalEarth extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (500 - * Math.pow(2 * this.potencyEnhancement + 1, 3) + return (int) (500 * Math.pow(2 * this.potencyEnhancement + 1, 3) * (0.25 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeOffensiveEarth.java index 3b35dded..85986eb5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeOffensiveEarth.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeOffensiveEarth; public class CSEMeleeOffensiveEarth extends ComplexSpellEffect { + public CSEMeleeOffensiveEarth() { super(ComplexSpellType.EARTH, ComplexSpellModifier.OFFENSIVE); } @@ -22,9 +23,8 @@ public class CSEMeleeOffensiveEarth extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmMelee) { - ((SpellParadigmMelee) parad) - .addWorldEffect(new MeleeOffensiveEarth( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmMelee) parad).addWorldEffect( + new MeleeOffensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -35,8 +35,7 @@ public class CSEMeleeOffensiveEarth extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (20 - * Math.pow(1.5 * this.powerEnhancement + 1, 3) + return (int) (20 * Math.pow(1.5 * this.powerEnhancement + 1, 3) * (0.25 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefaultEarth.java index ac4b1531..3f7feb36 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefaultEarth.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileDefaultEarth; public class CSEProjectileDefaultEarth extends ComplexSpellEffect { + public CSEProjectileDefaultEarth() { super(ComplexSpellType.EARTH, ComplexSpellModifier.DEFAULT); } @@ -22,9 +23,8 @@ public class CSEProjectileDefaultEarth extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmProjectile) { - ((SpellParadigmProjectile) parad) - .addImpactEffect(new ProjectileDefaultEarth( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmProjectile) parad).addImpactEffect( + new ProjectileDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefensiveEarth.java index 4a8c2d6c..dac866af 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefensiveEarth.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileDefensiveEarth; public class CSEProjectileDefensiveEarth extends ComplexSpellEffect { + public CSEProjectileDefensiveEarth() { super(ComplexSpellType.EARTH, ComplexSpellModifier.DEFENSIVE); } @@ -23,9 +24,8 @@ public class CSEProjectileDefensiveEarth extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmProjectile) { - ((SpellParadigmProjectile) parad) - .addImpactEffect(new ProjectileDefensiveEarth( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmProjectile) parad).addImpactEffect( + new ProjectileDefensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -36,8 +36,7 @@ public class CSEProjectileDefensiveEarth extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (3 - * Math.pow((this.powerEnhancement * 2 + 1), 2) + return (int) (3 * Math.pow((this.powerEnhancement * 2 + 1), 2) * (this.potencyEnhancement * 2 + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileEnvironmentalEarth.java index 071e979d..165cf2fa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileEnvironmentalEarth.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileEnvironmentalEarth; public class CSEProjectileEnvironmentalEarth extends ComplexSpellEffect { + public CSEProjectileEnvironmentalEarth() { super(ComplexSpellType.EARTH, ComplexSpellModifier.ENVIRONMENTAL); } @@ -22,9 +23,11 @@ public class CSEProjectileEnvironmentalEarth extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmProjectile) { - ((SpellParadigmProjectile) parad) - .addUpdateEffect(new ProjectileEnvironmentalEarth( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmProjectile) parad).addUpdateEffect( + new ProjectileEnvironmentalEarth( + this.powerEnhancement, + this.potencyEnhancement, + this.costEnhancement)); } } @@ -35,8 +38,7 @@ public class CSEProjectileEnvironmentalEarth extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (10 - * 2 + return (int) (10 * 2 * (0.1d * (this.potencyEnhancement + 1)) * Math.pow(3.47, this.potencyEnhancement) * Math.pow(0.85, costEnhancement)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileOffensiveEarth.java index 6d5a01cb..e19b2aea 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileOffensiveEarth.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileOffensiveEarth; public class CSEProjectileOffensiveEarth extends ComplexSpellEffect { + public CSEProjectileOffensiveEarth() { super(ComplexSpellType.EARTH, ComplexSpellModifier.OFFENSIVE); } @@ -22,9 +23,8 @@ public class CSEProjectileOffensiveEarth extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmProjectile) { - ((SpellParadigmProjectile) parad) - .addImpactEffect(new ProjectileOffensiveEarth( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmProjectile) parad).addImpactEffect( + new ProjectileOffensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -35,8 +35,7 @@ public class CSEProjectileOffensiveEarth extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (10 - * (1.5 * this.potencyEnhancement + 1) + return (int) (10 * (1.5 * this.potencyEnhancement + 1) * (Math.pow(1 * this.powerEnhancement + 1, 2)) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefaultEarth.java index 58c6683a..09a04139 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefaultEarth.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfDefaultEarth; public class CSESelfDefaultEarth extends ComplexSpellEffect { + public CSESelfDefaultEarth() { super(ComplexSpellType.EARTH, ComplexSpellModifier.DEFAULT); } @@ -22,9 +23,8 @@ public class CSESelfDefaultEarth extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmSelf) { - ((SpellParadigmSelf) parad) - .addSelfSpellEffect( - new SelfDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmSelf) parad).addSelfSpellEffect( + new SelfDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -35,8 +35,7 @@ public class CSESelfDefaultEarth extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (20 - * Math.pow(1.5 * powerEnhancement + 1, 2) + return (int) (20 * Math.pow(1.5 * powerEnhancement + 1, 2) * (2 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefensiveEarth.java index fc935587..ef7ac0a6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefensiveEarth.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfDefensiveEarth; public class CSESelfDefensiveEarth extends ComplexSpellEffect { + public CSESelfDefensiveEarth() { super(ComplexSpellType.EARTH, ComplexSpellModifier.DEFENSIVE); } @@ -22,9 +23,8 @@ public class CSESelfDefensiveEarth extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmSelf) { - ((SpellParadigmSelf) parad) - .addSelfSpellEffect(new SelfDefensiveEarth( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmSelf) parad).addSelfSpellEffect( + new SelfDefensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -35,8 +35,7 @@ public class CSESelfDefensiveEarth extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (750 - * (1.1 * this.powerEnhancement + 1) + return (int) (750 * (1.1 * this.powerEnhancement + 1) * (0.5 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfEnvironmentalEarth.java index fff202fd..017af646 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfEnvironmentalEarth.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfEnvironmentalEarth; public class CSESelfEnvironmentalEarth extends ComplexSpellEffect { + public CSESelfEnvironmentalEarth() { super(ComplexSpellType.EARTH, ComplexSpellModifier.ENVIRONMENTAL); } @@ -23,9 +24,8 @@ public class CSESelfEnvironmentalEarth extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmSelf) { - ((SpellParadigmSelf) parad) - .addSelfSpellEffect(new SelfEnvironmentalEarth( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmSelf) parad).addSelfSpellEffect( + new SelfEnvironmentalEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -36,8 +36,7 @@ public class CSESelfEnvironmentalEarth extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (250 - * (1.2 * this.potencyEnhancement + 1) + return (int) (250 * (1.2 * this.potencyEnhancement + 1) * (3 * this.powerEnhancement + 2.5) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfOffensiveEarth.java index b62c795f..34cf0274 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfOffensiveEarth.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfOffensiveEarth; public class CSESelfOffensiveEarth extends ComplexSpellEffect { + public CSESelfOffensiveEarth() { super(ComplexSpellType.EARTH, ComplexSpellModifier.OFFENSIVE); } @@ -22,9 +23,8 @@ public class CSESelfOffensiveEarth extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmSelf) { - ((SpellParadigmSelf) parad) - .addSelfSpellEffect(new SelfOffensiveEarth( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmSelf) parad).addSelfSpellEffect( + new SelfOffensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -35,8 +35,7 @@ public class CSESelfOffensiveEarth extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (10 - * Math.pow(2 * this.powerEnhancement + 1, 2) + return (int) (10 * Math.pow(2 * this.powerEnhancement + 1, 2) * (this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefaultEarth.java index a46ca643..c6e0d192 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefaultEarth.java @@ -7,6 +7,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; public class CSEToolDefaultEarth extends ComplexSpellEffect { + public CSEToolDefaultEarth() { super(ComplexSpellType.EARTH, ComplexSpellModifier.DEFAULT); } @@ -58,8 +59,7 @@ public class CSEToolDefaultEarth extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (1000 - * (1 + this.potencyEnhancement * 0.1f) + return (int) (1000 * (1 + this.potencyEnhancement * 0.1f) * (1 + this.powerEnhancement * 0.2f) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefensiveEarth.java index 581a4471..db95e8ec 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefensiveEarth.java @@ -7,6 +7,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; public class CSEToolDefensiveEarth extends ComplexSpellEffect { + public CSEToolDefensiveEarth() { super(ComplexSpellType.EARTH, ComplexSpellModifier.DEFENSIVE); } @@ -58,8 +59,7 @@ public class CSEToolDefensiveEarth extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (1000 - * (1 + this.potencyEnhancement * 0.1f) + return (int) (1000 * (1 + this.potencyEnhancement * 0.1f) * (1 + this.powerEnhancement * 0.2f) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolEnvironmentalEarth.java index 8b62e5f9..9c43ab81 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolEnvironmentalEarth.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ToolEnvironmentalEarth; public class CSEToolEnvironmentalEarth extends ComplexSpellEffect { + public CSEToolEnvironmentalEarth() { super(ComplexSpellType.EARTH, ComplexSpellModifier.ENVIRONMENTAL); } @@ -22,9 +23,8 @@ public class CSEToolEnvironmentalEarth extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmTool) { - ((SpellParadigmTool) parad) - .addDigAreaEffect(new ToolEnvironmentalEarth( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmTool) parad).addDigAreaEffect( + new ToolEnvironmentalEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -35,8 +35,7 @@ public class CSEToolEnvironmentalEarth extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (10 - * (1 + this.potencyEnhancement * 0.8) + return (int) (10 * (1 + this.potencyEnhancement * 0.8) * Math.pow(1.5 * this.powerEnhancement + 3, 2) * Math.pow(0.85, this.costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolOffensiveEarth.java index 9c0e39a2..4fba029e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolOffensiveEarth.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ToolOffensiveEarth; public class CSEToolOffensiveEarth extends ComplexSpellEffect { + public CSEToolOffensiveEarth() { super(ComplexSpellType.EARTH, ComplexSpellModifier.OFFENSIVE); } @@ -22,9 +23,8 @@ public class CSEToolOffensiveEarth extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmTool) { - ((SpellParadigmTool) parad) - .addItemManipulatorEffect(new ToolOffensiveEarth( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmTool) parad).addItemManipulatorEffect( + new ToolOffensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeDefaultFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeDefaultFire.java index 72be77a2..31c318e1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeDefaultFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeDefaultFire.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.MeleeDefaultFire; public class CSEMeleeDefaultFire extends ComplexSpellEffect { + public CSEMeleeDefaultFire() { super(ComplexSpellType.FIRE, ComplexSpellModifier.DEFAULT); } @@ -35,8 +36,7 @@ public class CSEMeleeDefaultFire extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (25 - * (1.2 * this.potencyEnhancement + 1) + return (int) (25 * (1.2 * this.potencyEnhancement + 1) * (2.5 * this.powerEnhancement + 2) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeDefensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeDefensiveFire.java index f6224a28..abe32206 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeDefensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeDefensiveFire.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.MeleeDefensiveFire; public class CSEMeleeDefensiveFire extends ComplexSpellEffect { + public CSEMeleeDefensiveFire() { super(ComplexSpellType.FIRE, ComplexSpellModifier.DEFENSIVE); } @@ -35,7 +36,8 @@ public class CSEMeleeDefensiveFire extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) - (30 * (1.5 * potencyEnhancement + 1) * (3 * powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + return (int) (30 * (1.5 * potencyEnhancement + 1) + * (3 * powerEnhancement + 1) + * Math.pow(0.85, costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeEnvironmentalFire.java index 08d0ca34..d4a1308d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeEnvironmentalFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeEnvironmentalFire.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.MeleeEnvironmentalFire; public class CSEMeleeEnvironmentalFire extends ComplexSpellEffect { + public CSEMeleeEnvironmentalFire() { super(ComplexSpellType.FIRE, ComplexSpellModifier.ENVIRONMENTAL); } @@ -35,8 +36,7 @@ public class CSEMeleeEnvironmentalFire extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (25 - * Math.pow(1.5 * this.powerEnhancement + 1, 3) + return (int) (25 * Math.pow(1.5 * this.powerEnhancement + 1, 3) * (0.25 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeOffensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeOffensiveFire.java index b792ba32..9858cf2a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeOffensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeOffensiveFire.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.MeleeOffensiveFire; public class CSEMeleeOffensiveFire extends ComplexSpellEffect { + public CSEMeleeOffensiveFire() { super(ComplexSpellType.FIRE, ComplexSpellModifier.OFFENSIVE); } @@ -35,7 +36,8 @@ public class CSEMeleeOffensiveFire extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) - (500 * (1 + this.potencyEnhancement) * (this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + return (int) (500 * (1 + this.potencyEnhancement) + * (this.powerEnhancement + 1) + * Math.pow(0.85, costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileDefaultFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileDefaultFire.java index 3ab872cf..666f0296 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileDefaultFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileDefaultFire.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileDefaultFire; public class CSEProjectileDefaultFire extends ComplexSpellEffect { + public CSEProjectileDefaultFire() { super(ComplexSpellType.FIRE, ComplexSpellModifier.DEFAULT); } @@ -37,7 +38,6 @@ public class CSEProjectileDefaultFire extends ComplexSpellEffect { @Override public int getCostOfEffect() { return (int) ((5 * Math.pow(1.5 * this.powerEnhancement + 1, 2) * (1.5 * this.potencyEnhancement + 1) - + this.potencyEnhancement * 15) - * Math.pow(0.85, costEnhancement)); + + this.potencyEnhancement * 15) * Math.pow(0.85, costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileDefensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileDefensiveFire.java index a095cf9f..bab4c0aa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileDefensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileDefensiveFire.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileDefensiveFire; public class CSEProjectileDefensiveFire extends ComplexSpellEffect { + public CSEProjectileDefensiveFire() { super(ComplexSpellType.FIRE, ComplexSpellModifier.DEFENSIVE); } @@ -23,9 +24,8 @@ public class CSEProjectileDefensiveFire extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmProjectile) { - ((SpellParadigmProjectile) parad) - .addImpactEffect( - new ProjectileDefensiveFire(powerEnhancement, potencyEnhancement, costEnhancement)); + ((SpellParadigmProjectile) parad).addImpactEffect( + new ProjectileDefensiveFire(powerEnhancement, potencyEnhancement, costEnhancement)); } } @@ -36,8 +36,7 @@ public class CSEProjectileDefensiveFire extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (25 - * Math.pow(1 * this.powerEnhancement + 1, 2) + return (int) (25 * Math.pow(1 * this.powerEnhancement + 1, 2) * (1 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileEnvironmentalFire.java index 4c2e6533..bbd84cab 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileEnvironmentalFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileEnvironmentalFire.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileEnvironmentalFire; public class CSEProjectileEnvironmentalFire extends ComplexSpellEffect { + public CSEProjectileEnvironmentalFire() { super(ComplexSpellType.FIRE, ComplexSpellModifier.ENVIRONMENTAL); } @@ -23,9 +24,8 @@ public class CSEProjectileEnvironmentalFire extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmProjectile) { - ((SpellParadigmProjectile) parad) - .addUpdateEffect( - new ProjectileEnvironmentalFire(powerEnhancement, potencyEnhancement, costEnhancement)); + ((SpellParadigmProjectile) parad).addUpdateEffect( + new ProjectileEnvironmentalFire(powerEnhancement, potencyEnhancement, costEnhancement)); } } @@ -36,8 +36,7 @@ public class CSEProjectileEnvironmentalFire extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (75 - * (0.5 * this.powerEnhancement + 1) + return (int) (75 * (0.5 * this.powerEnhancement + 1) * (0.5 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileOffensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileOffensiveFire.java index 9473dcfc..dae832a6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileOffensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileOffensiveFire.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileOffensiveFire; public class CSEProjectileOffensiveFire extends ComplexSpellEffect { + public CSEProjectileOffensiveFire() { super(ComplexSpellType.FIRE, ComplexSpellModifier.OFFENSIVE); } @@ -23,9 +24,8 @@ public class CSEProjectileOffensiveFire extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmProjectile) { - ((SpellParadigmProjectile) parad) - .addImpactEffect( - new ProjectileOffensiveFire(powerEnhancement, potencyEnhancement, costEnhancement)); + ((SpellParadigmProjectile) parad).addImpactEffect( + new ProjectileOffensiveFire(powerEnhancement, potencyEnhancement, costEnhancement)); } } @@ -36,8 +36,7 @@ public class CSEProjectileOffensiveFire extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (10 - * Math.pow((this.powerEnhancement) * 1.3 + 1, 2) + return (int) (10 * Math.pow((this.powerEnhancement) * 1.3 + 1, 2) * ((1.5 * this.potencyEnhancement + 1)) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfDefaultFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfDefaultFire.java index 659b6ea6..b9c5e3ce 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfDefaultFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfDefaultFire.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfDefaultFire; public class CSESelfDefaultFire extends ComplexSpellEffect { + public CSESelfDefaultFire() { super(ComplexSpellType.FIRE, ComplexSpellModifier.DEFAULT); } @@ -35,9 +36,7 @@ public class CSESelfDefaultFire extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return 10 - * (int) (10 - * Math.pow(1.5, this.powerEnhancement + 1.5 * this.potencyEnhancement) - * Math.pow(0.85, costEnhancement)); + return 10 * (int) (10 * Math.pow(1.5, this.powerEnhancement + 1.5 * this.potencyEnhancement) + * Math.pow(0.85, costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfDefensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfDefensiveFire.java index c3222462..3f73d6a6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfDefensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfDefensiveFire.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfDefensiveFire; public class CSESelfDefensiveFire extends ComplexSpellEffect { + public CSESelfDefensiveFire() { super(ComplexSpellType.FIRE, ComplexSpellModifier.DEFENSIVE); } @@ -35,8 +36,7 @@ public class CSESelfDefensiveFire extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (25 - * (3 * this.potencyEnhancement + 1) + return (int) (25 * (3 * this.potencyEnhancement + 1) * (2 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfEnvironmentalFire.java index ca0cb265..02d92197 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfEnvironmentalFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfEnvironmentalFire.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfEnvironmentalFire; public class CSESelfEnvironmentalFire extends ComplexSpellEffect { + public CSESelfEnvironmentalFire() { super(ComplexSpellType.FIRE, ComplexSpellModifier.ENVIRONMENTAL); } @@ -23,9 +24,8 @@ public class CSESelfEnvironmentalFire extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmSelf) { - ((SpellParadigmSelf) parad) - .addSelfSpellEffect( - new SelfEnvironmentalFire(powerEnhancement, potencyEnhancement, costEnhancement)); + ((SpellParadigmSelf) parad).addSelfSpellEffect( + new SelfEnvironmentalFire(powerEnhancement, potencyEnhancement, costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfOffensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfOffensiveFire.java index 3f2ceb5f..0445e6e5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfOffensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfOffensiveFire.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfOffensiveFire; public class CSESelfOffensiveFire extends ComplexSpellEffect { + public CSESelfOffensiveFire() { super(ComplexSpellType.FIRE, ComplexSpellModifier.OFFENSIVE); } @@ -35,7 +36,8 @@ public class CSESelfOffensiveFire extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) - (300 * (3 * powerEnhancement + 1) * (2 * potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); + return (int) (300 * (3 * powerEnhancement + 1) + * (2 * potencyEnhancement + 1) + * Math.pow(0.85, costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolDefaultFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolDefaultFire.java index 491ae311..cd732f06 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolDefaultFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolDefaultFire.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ToolDefaultFire; public class CSEToolDefaultFire extends ComplexSpellEffect { + public CSEToolDefaultFire() { super(ComplexSpellType.FIRE, ComplexSpellModifier.DEFAULT); } @@ -23,9 +24,8 @@ public class CSEToolDefaultFire extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmTool) { - ((SpellParadigmTool) parad) - .addItemManipulatorEffect( - new ToolDefaultFire(powerEnhancement, potencyEnhancement, costEnhancement)); + ((SpellParadigmTool) parad).addItemManipulatorEffect( + new ToolDefaultFire(powerEnhancement, potencyEnhancement, costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolDefensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolDefensiveFire.java index 9a1242f9..06c4705e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolDefensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolDefensiveFire.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class CSEToolDefensiveFire extends ComplexSpellEffect { + public CSEToolDefensiveFire() { super(ComplexSpellType.FIRE, ComplexSpellModifier.DEFENSIVE); } @@ -27,9 +28,9 @@ public class CSEToolDefensiveFire extends ComplexSpellEffect { ((SpellParadigmTool) parad).addDuration("defFire", 1200 * this.powerEnhancement); - ((SpellParadigmTool) parad) - .addToolString( - "defFire", "Unbreaking" + " " + SpellHelper.getNumeralForInt(this.powerEnhancement + 1)); + ((SpellParadigmTool) parad).addToolString( + "defFire", + "Unbreaking" + " " + SpellHelper.getNumeralForInt(this.powerEnhancement + 1)); } } @@ -40,8 +41,7 @@ public class CSEToolDefensiveFire extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (500 - * (1 + this.powerEnhancement * 0.5f) + return (int) (500 * (1 + this.powerEnhancement * 0.5f) * (1 + this.potencyEnhancement) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolEnvironmentalFire.java index bc00d14f..d07cb9f3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolEnvironmentalFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolEnvironmentalFire.java @@ -9,6 +9,7 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ToolEnvironmentalFire; public class CSEToolEnvironmentalFire extends ComplexSpellEffect { + public CSEToolEnvironmentalFire() { super(ComplexSpellType.FIRE, ComplexSpellModifier.ENVIRONMENTAL); } @@ -24,13 +25,12 @@ public class CSEToolEnvironmentalFire extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmTool) { - ((SpellParadigmTool) parad) - .addBlockBreakEffect(new ToolEnvironmentalFire( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmTool) parad).addBlockBreakEffect( + new ToolEnvironmentalFire(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - ((SpellParadigmTool) parad) - .addToolString( - "envFire", "Magma Plume" + " " + SpellHelper.getNumeralForInt(this.powerEnhancement + 1)); + ((SpellParadigmTool) parad).addToolString( + "envFire", + "Magma Plume" + " " + SpellHelper.getNumeralForInt(this.powerEnhancement + 1)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolOffensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolOffensiveFire.java index 19d24d7c..50467068 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolOffensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolOffensiveFire.java @@ -9,6 +9,7 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ToolOffensiveFire; public class CSEToolOffensiveFire extends ComplexSpellEffect { + public CSEToolOffensiveFire() { super(ComplexSpellType.FIRE, ComplexSpellModifier.OFFENSIVE); } @@ -24,13 +25,12 @@ public class CSEToolOffensiveFire extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmTool) { - ((SpellParadigmTool) parad) - .addLeftClickEffect(new ToolOffensiveFire( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmTool) parad).addLeftClickEffect( + new ToolOffensiveFire(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - ((SpellParadigmTool) parad) - .addToolString( - "offFire", "Fire Aspect" + " " + SpellHelper.getNumeralForInt(this.powerEnhancement + 1)); + ((SpellParadigmTool) parad).addToolString( + "offFire", + "Fire Aspect" + " " + SpellHelper.getNumeralForInt(this.powerEnhancement + 1)); } } @@ -41,8 +41,7 @@ public class CSEToolOffensiveFire extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (1000 - * (1 + this.powerEnhancement * 0.3f) + return (int) (1000 * (1 + this.powerEnhancement * 0.3f) * (1 + this.potencyEnhancement * 0.2f) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeDefaultIce.java index d17a8ef6..33e5fd81 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeDefaultIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeDefaultIce.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.MeleeDefaultIce; public class CSEMeleeDefaultIce extends ComplexSpellEffect { + public CSEMeleeDefaultIce() { super(ComplexSpellType.ICE, ComplexSpellModifier.DEFAULT); } @@ -23,9 +24,8 @@ public class CSEMeleeDefaultIce extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmMelee) { - ((SpellParadigmMelee) parad) - .addEntityEffect( - new MeleeDefaultIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmMelee) parad).addEntityEffect( + new MeleeDefaultIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeDefensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeDefensiveIce.java index 65b3e9e6..caf2a42c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeDefensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeDefensiveIce.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.MeleeDefensiveIce; public class CSEMeleeDefensiveIce extends ComplexSpellEffect { + public CSEMeleeDefensiveIce() { super(ComplexSpellType.ICE, ComplexSpellModifier.DEFENSIVE); } @@ -23,9 +24,8 @@ public class CSEMeleeDefensiveIce extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmMelee) { - ((SpellParadigmMelee) parad) - .addWorldEffect(new MeleeDefensiveIce( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmMelee) parad).addWorldEffect( + new MeleeDefensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -36,8 +36,7 @@ public class CSEMeleeDefensiveIce extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (50 - * (0.5 * potencyEnhancement + 1) + return (int) (50 * (0.5 * potencyEnhancement + 1) * (0.7 * powerEnhancement + 1) * (0.5 * powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeEnvironmentalIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeEnvironmentalIce.java index 87aeac22..2cdce791 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeEnvironmentalIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeEnvironmentalIce.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.MeleeEnvironmentalIce; public class CSEMeleeEnvironmentalIce extends ComplexSpellEffect { + public CSEMeleeEnvironmentalIce() { super(ComplexSpellType.ICE, ComplexSpellModifier.ENVIRONMENTAL); } @@ -23,9 +24,8 @@ public class CSEMeleeEnvironmentalIce extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmMelee) { - ((SpellParadigmMelee) parad) - .addEntityEffect(new MeleeEnvironmentalIce( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmMelee) parad).addEntityEffect( + new MeleeEnvironmentalIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -36,9 +36,9 @@ public class CSEMeleeEnvironmentalIce extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (20 - * (0.5 * potencyEnhancement + 1) - * 1 - * Math.pow(0.85, costEnhancement)); // where the lone 1 is: (0 * potencyEnhancement + 1) + return (int) (20 * (0.5 * potencyEnhancement + 1) * 1 * Math.pow(0.85, costEnhancement)); // where the lone 1 + // is: (0 * + // potencyEnhancement + // + 1) } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeOffensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeOffensiveIce.java index 01fdd9ea..28a73fb1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeOffensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeOffensiveIce.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.MeleeOffensiveIce; public class CSEMeleeOffensiveIce extends ComplexSpellEffect { + public CSEMeleeOffensiveIce() { super(ComplexSpellType.ICE, ComplexSpellModifier.OFFENSIVE); } @@ -23,9 +24,8 @@ public class CSEMeleeOffensiveIce extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmMelee) { - ((SpellParadigmMelee) parad) - .addEntityEffect(new MeleeOffensiveIce( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmMelee) parad).addEntityEffect( + new MeleeOffensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -36,8 +36,7 @@ public class CSEMeleeOffensiveIce extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (40 - * (1.5 * potencyEnhancement + 1) + return (int) (40 * (1.5 * potencyEnhancement + 1) * Math.pow(1.5, powerEnhancement) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileDefaultIce.java index e8213c94..94da7231 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileDefaultIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileDefaultIce.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.ProjectileDefaultIce; public class CSEProjectileDefaultIce extends ComplexSpellEffect { + public CSEProjectileDefaultIce() { super(ComplexSpellType.ICE, ComplexSpellModifier.DEFAULT); } @@ -24,9 +25,8 @@ public class CSEProjectileDefaultIce extends ComplexSpellEffect { public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmProjectile) { ((SpellParadigmProjectile) parad).damage += this.potencyEnhancement; - ((SpellParadigmProjectile) parad) - .addImpactEffect(new ProjectileDefaultIce( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmProjectile) parad).addImpactEffect( + new ProjectileDefaultIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileDefensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileDefensiveIce.java index b624fc84..ba7bd1da 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileDefensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileDefensiveIce.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.ProjectileDefensiveIce; public class CSEProjectileDefensiveIce extends ComplexSpellEffect { + public CSEProjectileDefensiveIce() { super(ComplexSpellType.ICE, ComplexSpellModifier.DEFENSIVE); } @@ -23,9 +24,8 @@ public class CSEProjectileDefensiveIce extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmProjectile) { - ((SpellParadigmProjectile) parad) - .addImpactEffect(new ProjectileDefensiveIce( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmProjectile) parad).addImpactEffect( + new ProjectileDefensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -36,8 +36,7 @@ public class CSEProjectileDefensiveIce extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (75 - * (2 * this.powerEnhancement + 1) + return (int) (75 * (2 * this.powerEnhancement + 1) * (this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileEnvironmentalIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileEnvironmentalIce.java index d377c314..24ff98c7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileEnvironmentalIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileEnvironmentalIce.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.ProjectileEnvironmentalIce; public class CSEProjectileEnvironmentalIce extends ComplexSpellEffect { + public CSEProjectileEnvironmentalIce() { super(ComplexSpellType.ICE, ComplexSpellModifier.ENVIRONMENTAL); } @@ -23,9 +24,11 @@ public class CSEProjectileEnvironmentalIce extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmProjectile) { - ((SpellParadigmProjectile) parad) - .addUpdateEffect(new ProjectileEnvironmentalIce( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmProjectile) parad).addUpdateEffect( + new ProjectileEnvironmentalIce( + this.powerEnhancement, + this.potencyEnhancement, + this.costEnhancement)); } } @@ -36,8 +39,7 @@ public class CSEProjectileEnvironmentalIce extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (200 - * (2 * this.powerEnhancement + 1) + return (int) (200 * (2 * this.powerEnhancement + 1) * (2 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileOffensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileOffensiveIce.java index 0040e0eb..14999ef9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileOffensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileOffensiveIce.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.ProjectileOffensiveIce; public class CSEProjectileOffensiveIce extends ComplexSpellEffect { + public CSEProjectileOffensiveIce() { super(ComplexSpellType.ICE, ComplexSpellModifier.OFFENSIVE); } @@ -23,9 +24,8 @@ public class CSEProjectileOffensiveIce extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmProjectile) { - ((SpellParadigmProjectile) parad) - .addImpactEffect(new ProjectileOffensiveIce( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmProjectile) parad).addImpactEffect( + new ProjectileOffensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -36,8 +36,7 @@ public class CSEProjectileOffensiveIce extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) ((60) - * (this.powerEnhancement + 1) + return (int) ((60) * (this.powerEnhancement + 1) * (3 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfDefaultIce.java index c8c05620..33ed8fa8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfDefaultIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfDefaultIce.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.SelfDefaultIce; public class CSESelfDefaultIce extends ComplexSpellEffect { + public CSESelfDefaultIce() { super(ComplexSpellType.ICE, ComplexSpellModifier.DEFAULT); } @@ -23,9 +24,8 @@ public class CSESelfDefaultIce extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmSelf) { - ((SpellParadigmSelf) parad) - .addSelfSpellEffect( - new SelfDefaultIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmSelf) parad).addSelfSpellEffect( + new SelfDefaultIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfDefensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfDefensiveIce.java index 2a722893..2d79d374 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfDefensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfDefensiveIce.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.SelfDefensiveIce; public class CSESelfDefensiveIce extends ComplexSpellEffect { + public CSESelfDefensiveIce() { super(ComplexSpellType.ICE, ComplexSpellModifier.DEFENSIVE); } @@ -23,9 +24,8 @@ public class CSESelfDefensiveIce extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmSelf) { - ((SpellParadigmSelf) parad) - .addSelfSpellEffect( - new SelfDefensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmSelf) parad).addSelfSpellEffect( + new SelfDefensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -36,7 +36,8 @@ public class CSESelfDefensiveIce extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) - (200 * (3 * powerEnhancement + 1) * (2 * potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); + return (int) (200 * (3 * powerEnhancement + 1) + * (2 * potencyEnhancement + 1) + * Math.pow(0.85, costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfEnvironmentalIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfEnvironmentalIce.java index ba57840b..ec067da1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfEnvironmentalIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfEnvironmentalIce.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.SelfEnvironmentalIce; public class CSESelfEnvironmentalIce extends ComplexSpellEffect { + public CSESelfEnvironmentalIce() { super(ComplexSpellType.ICE, ComplexSpellModifier.ENVIRONMENTAL); } @@ -23,9 +24,8 @@ public class CSESelfEnvironmentalIce extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmSelf) { - ((SpellParadigmSelf) parad) - .addSelfSpellEffect(new SelfEnvironmentalIce( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmSelf) parad).addSelfSpellEffect( + new SelfEnvironmentalIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -36,7 +36,8 @@ public class CSESelfEnvironmentalIce extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) - (10 * (1.5 * potencyEnhancement + 1) * (3 * powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + return (int) (10 * (1.5 * potencyEnhancement + 1) + * (3 * powerEnhancement + 1) + * Math.pow(0.85, costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfOffensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfOffensiveIce.java index beff6a64..0d42c451 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfOffensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfOffensiveIce.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.SelfOffensiveIce; public class CSESelfOffensiveIce extends ComplexSpellEffect { + public CSESelfOffensiveIce() { super(ComplexSpellType.ICE, ComplexSpellModifier.OFFENSIVE); } @@ -23,9 +24,8 @@ public class CSESelfOffensiveIce extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmSelf) { - ((SpellParadigmSelf) parad) - .addSelfSpellEffect( - new SelfOffensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmSelf) parad).addSelfSpellEffect( + new SelfOffensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -36,8 +36,7 @@ public class CSESelfOffensiveIce extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (100 - * (2 * this.powerEnhancement + 1) + return (int) (100 * (2 * this.powerEnhancement + 1) * (2 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolDefaultIce.java index be41013b..571d7d66 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolDefaultIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolDefaultIce.java @@ -9,6 +9,7 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.ToolDefaultIce; public class CSEToolDefaultIce extends ComplexSpellEffect { + public CSEToolDefaultIce() { super(ComplexSpellType.ICE, ComplexSpellModifier.DEFAULT); } @@ -24,14 +25,12 @@ public class CSEToolDefaultIce extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmTool) { - ((SpellParadigmTool) parad) - .addLeftClickEffect( - new ToolDefaultIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmTool) parad).addLeftClickEffect( + new ToolDefaultIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - ((SpellParadigmTool) parad) - .addToolString( - "FrostTouch", - "FrostTouch" + " " + SpellHelper.getNumeralForInt((this.powerEnhancement + 1))); + ((SpellParadigmTool) parad).addToolString( + "FrostTouch", + "FrostTouch" + " " + SpellHelper.getNumeralForInt((this.powerEnhancement + 1))); ((SpellParadigmTool) parad).addCritChance("FrostCrit", this.potencyEnhancement * 0.5f); } @@ -44,8 +43,7 @@ public class CSEToolDefaultIce extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (500 - * (1 + this.powerEnhancement * 0.3f) + return (int) (500 * (1 + this.powerEnhancement * 0.3f) * (1 + this.potencyEnhancement * 0.1f) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolDefensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolDefensiveIce.java index 56402307..17290da4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolDefensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolDefensiveIce.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice.ToolDefensiveIce; public class CSEToolDefensiveIce extends ComplexSpellEffect { + public CSEToolDefensiveIce() { super(ComplexSpellType.ICE, ComplexSpellModifier.DEFENSIVE); } @@ -23,9 +24,8 @@ public class CSEToolDefensiveIce extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmTool) { - ((SpellParadigmTool) parad) - .addToolSummonEffect( - new ToolDefensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmTool) parad).addToolSummonEffect( + new ToolDefensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -36,8 +36,7 @@ public class CSEToolDefensiveIce extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (500 - * (1 + this.powerEnhancement * 0.2) + return (int) (500 * (1 + this.powerEnhancement * 0.2) * (1 + this.potencyEnhancement * 0.5) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolEnvironmentalIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolEnvironmentalIce.java index e62cfae7..5b95b79b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolEnvironmentalIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolEnvironmentalIce.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class CSEToolEnvironmentalIce extends ComplexSpellEffect { + public CSEToolEnvironmentalIce() { super(ComplexSpellType.ICE, ComplexSpellModifier.ENVIRONMENTAL); } @@ -23,10 +24,9 @@ public class CSEToolEnvironmentalIce extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmTool) { - ((SpellParadigmTool) parad) - .addToolString( - "SilkTouch", - "Silk Touch" + " " + SpellHelper.getNumeralForInt((this.powerEnhancement + 1))); + ((SpellParadigmTool) parad).addToolString( + "SilkTouch", + "Silk Touch" + " " + SpellHelper.getNumeralForInt((this.powerEnhancement + 1))); ((SpellParadigmTool) parad).setSilkTouch(true); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolOffensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolOffensiveIce.java index fdfda609..95287760 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolOffensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolOffensiveIce.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class CSEToolOffensiveIce extends ComplexSpellEffect { + public CSEToolOffensiveIce() { super(ComplexSpellType.ICE, ComplexSpellModifier.OFFENSIVE); } @@ -25,9 +26,9 @@ public class CSEToolOffensiveIce extends ComplexSpellEffect { if (parad instanceof SpellParadigmTool) { ((SpellParadigmTool) parad).addDamageToHash("Sharpness", (this.powerEnhancement + 1) * 1.5f); - ((SpellParadigmTool) parad) - .addToolString( - "Sharpness", "Sharpness" + " " + SpellHelper.getNumeralForInt((this.powerEnhancement + 1))); + ((SpellParadigmTool) parad).addToolString( + "Sharpness", + "Sharpness" + " " + SpellHelper.getNumeralForInt((this.powerEnhancement + 1))); ((SpellParadigmTool) parad).addCritChance("SharpCrit", this.potencyEnhancement); } @@ -40,8 +41,7 @@ public class CSEToolOffensiveIce extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (1000 - * (1 + this.powerEnhancement * 0.3f) + return (int) (1000 * (1 + this.powerEnhancement * 0.3f) * (1 + this.potencyEnhancement * 0.2f) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefaultWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefaultWind.java index 3769f781..26becdc0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefaultWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefaultWind.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.MeleeDefaultWind; public class CSEMeleeDefaultWind extends ComplexSpellEffect { + public CSEMeleeDefaultWind() { super(ComplexSpellType.WIND, ComplexSpellModifier.DEFAULT); } @@ -22,9 +23,8 @@ public class CSEMeleeDefaultWind extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmMelee) { - ((SpellParadigmMelee) parad) - .addEntityEffect( - new MeleeDefaultWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmMelee) parad).addEntityEffect( + new MeleeDefaultWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -35,8 +35,7 @@ public class CSEMeleeDefaultWind extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (350 - * (1.0 * this.potencyEnhancement + 1) + return (int) (350 * (1.0 * this.potencyEnhancement + 1) * (1.2 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefensiveWind.java index bd1e8471..572d74f5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefensiveWind.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.MeleeDefensiveWind; public class CSEMeleeDefensiveWind extends ComplexSpellEffect { + public CSEMeleeDefensiveWind() { super(ComplexSpellType.WIND, ComplexSpellModifier.DEFENSIVE); } @@ -23,9 +24,8 @@ public class CSEMeleeDefensiveWind extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmMelee) { - ((SpellParadigmMelee) parad) - .addEntityEffect(new MeleeDefensiveWind( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmMelee) parad).addEntityEffect( + new MeleeDefensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -36,8 +36,7 @@ public class CSEMeleeDefensiveWind extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (150 - * (1.0 * this.potencyEnhancement + 1) + return (int) (150 * (1.0 * this.potencyEnhancement + 1) * (0.7 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeEnvironmentalWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeEnvironmentalWind.java index b9fc3aa8..71e6f006 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeEnvironmentalWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeEnvironmentalWind.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.MeleeEnvironmentalWind; public class CSEMeleeEnvironmentalWind extends ComplexSpellEffect { + public CSEMeleeEnvironmentalWind() { super(ComplexSpellType.WIND, ComplexSpellModifier.ENVIRONMENTAL); } @@ -23,9 +24,8 @@ public class CSEMeleeEnvironmentalWind extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmMelee) { - ((SpellParadigmMelee) parad) - .addWorldEffect(new MeleeEnvironmentalWind( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmMelee) parad).addWorldEffect( + new MeleeEnvironmentalWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -36,8 +36,7 @@ public class CSEMeleeEnvironmentalWind extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (100 - * (1.0 * this.potencyEnhancement + 1) + return (int) (100 * (1.0 * this.potencyEnhancement + 1) * (0.7 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeOffensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeOffensiveWind.java index 240cd283..60a8c19b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeOffensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeOffensiveWind.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.MeleeOffensiveWind; public class CSEMeleeOffensiveWind extends ComplexSpellEffect { + public CSEMeleeOffensiveWind() { super(ComplexSpellType.WIND, ComplexSpellModifier.OFFENSIVE); } @@ -23,9 +24,8 @@ public class CSEMeleeOffensiveWind extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmMelee) { - ((SpellParadigmMelee) parad) - .addEntityEffect(new MeleeOffensiveWind( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmMelee) parad).addEntityEffect( + new MeleeOffensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -36,8 +36,7 @@ public class CSEMeleeOffensiveWind extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (250 - * (1.0 * this.potencyEnhancement + 1) + return (int) (250 * (1.0 * this.potencyEnhancement + 1) * (0.7 * this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefaultWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefaultWind.java index 41a65561..f83d2247 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefaultWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefaultWind.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ProjectileDefaultWind; public class CSEProjectileDefaultWind extends ComplexSpellEffect { + public CSEProjectileDefaultWind() { super(ComplexSpellType.WIND, ComplexSpellModifier.DEFAULT); } @@ -23,9 +24,8 @@ public class CSEProjectileDefaultWind extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmProjectile) { - ((SpellParadigmProjectile) parad) - .addImpactEffect(new ProjectileDefaultWind( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmProjectile) parad).addImpactEffect( + new ProjectileDefaultWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefensiveWind.java index 2941db05..752a2596 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefensiveWind.java @@ -7,6 +7,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; public class CSEProjectileDefensiveWind extends ComplexSpellEffect { + public CSEProjectileDefensiveWind() { super(ComplexSpellType.WIND, ComplexSpellModifier.DEFENSIVE); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileEnvironmentalWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileEnvironmentalWind.java index 26422ca2..8e4a2ea3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileEnvironmentalWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileEnvironmentalWind.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ProjectileEnvironmentalWind; public class CSEProjectileEnvironmentalWind extends ComplexSpellEffect { + public CSEProjectileEnvironmentalWind() { super(ComplexSpellType.WIND, ComplexSpellModifier.ENVIRONMENTAL); } @@ -23,9 +24,11 @@ public class CSEProjectileEnvironmentalWind extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmProjectile) { - ((SpellParadigmProjectile) parad) - .addUpdateEffect(new ProjectileEnvironmentalWind( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmProjectile) parad).addUpdateEffect( + new ProjectileEnvironmentalWind( + this.powerEnhancement, + this.potencyEnhancement, + this.costEnhancement)); } } @@ -36,7 +39,8 @@ public class CSEProjectileEnvironmentalWind extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) - (50 * (this.powerEnhancement + 1) * (this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); + return (int) (50 * (this.powerEnhancement + 1) + * (this.potencyEnhancement + 1) + * Math.pow(0.85, costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileOffensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileOffensiveWind.java index d1c93093..76d97df7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileOffensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileOffensiveWind.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ProjectileOffensiveWind; public class CSEProjectileOffensiveWind extends ComplexSpellEffect { + public CSEProjectileOffensiveWind() { super(ComplexSpellType.WIND, ComplexSpellModifier.OFFENSIVE); } @@ -23,9 +24,8 @@ public class CSEProjectileOffensiveWind extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmProjectile) { - ((SpellParadigmProjectile) parad) - .addImpactEffect(new ProjectileOffensiveWind( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmProjectile) parad).addImpactEffect( + new ProjectileOffensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -36,8 +36,7 @@ public class CSEProjectileOffensiveWind extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (100 - * (0.5 * this.potencyEnhancement + 1) + return (int) (100 * (0.5 * this.potencyEnhancement + 1) * (this.powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfDefaultWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfDefaultWind.java index 981ea168..a6e517c9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfDefaultWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfDefaultWind.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.SelfDefaultWind; public class CSESelfDefaultWind extends ComplexSpellEffect { + public CSESelfDefaultWind() { super(ComplexSpellType.WIND, ComplexSpellModifier.DEFAULT); } @@ -23,9 +24,8 @@ public class CSESelfDefaultWind extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmSelf) { - ((SpellParadigmSelf) parad) - .addSelfSpellEffect( - new SelfDefaultWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmSelf) parad).addSelfSpellEffect( + new SelfDefaultWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfDefensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfDefensiveWind.java index f86bc4f2..ed85fdec 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfDefensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfDefensiveWind.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.SelfDefensiveWind; public class CSESelfDefensiveWind extends ComplexSpellEffect { + public CSESelfDefensiveWind() { super(ComplexSpellType.WIND, ComplexSpellModifier.DEFENSIVE); } @@ -23,9 +24,8 @@ public class CSESelfDefensiveWind extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmSelf) { - ((SpellParadigmSelf) parad) - .addSelfSpellEffect(new SelfDefensiveWind( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmSelf) parad).addSelfSpellEffect( + new SelfDefensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -36,8 +36,7 @@ public class CSESelfDefensiveWind extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (500 - * (0.7d * this.powerEnhancement + 1) + return (int) (500 * (0.7d * this.powerEnhancement + 1) * (0.8 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfEnvironmentalWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfEnvironmentalWind.java index 2cc6a4a3..95334e91 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfEnvironmentalWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfEnvironmentalWind.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.SelfEnvironmentalWind; public class CSESelfEnvironmentalWind extends ComplexSpellEffect { + public CSESelfEnvironmentalWind() { super(ComplexSpellType.WIND, ComplexSpellModifier.ENVIRONMENTAL); } @@ -23,9 +24,8 @@ public class CSESelfEnvironmentalWind extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmSelf) { - ((SpellParadigmSelf) parad) - .addSelfSpellEffect(new SelfEnvironmentalWind( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmSelf) parad).addSelfSpellEffect( + new SelfEnvironmentalWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } @@ -36,8 +36,7 @@ public class CSESelfEnvironmentalWind extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (500 - * (0.7d * this.powerEnhancement + 1) + return (int) (500 * (0.7d * this.powerEnhancement + 1) * (0.2 * this.potencyEnhancement + 1) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfOffensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfOffensiveWind.java index 0dbbbe9f..99e49c4d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfOffensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfOffensiveWind.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.SelfOffensiveWind; public class CSESelfOffensiveWind extends ComplexSpellEffect { + public CSESelfOffensiveWind() { super(ComplexSpellType.WIND, ComplexSpellModifier.OFFENSIVE); } @@ -23,9 +24,8 @@ public class CSESelfOffensiveWind extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmSelf) { - ((SpellParadigmSelf) parad) - .addSelfSpellEffect(new SelfOffensiveWind( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmSelf) parad).addSelfSpellEffect( + new SelfOffensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolDefaultWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolDefaultWind.java index 941b4563..77fd31f4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolDefaultWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolDefaultWind.java @@ -7,6 +7,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; public class CSEToolDefaultWind extends ComplexSpellEffect { + public CSEToolDefaultWind() { super(ComplexSpellType.WIND, ComplexSpellModifier.DEFAULT); } @@ -58,8 +59,7 @@ public class CSEToolDefaultWind extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (1000 - * (1 + this.potencyEnhancement * 0.1f) + return (int) (1000 * (1 + this.potencyEnhancement * 0.1f) * (1 + this.powerEnhancement * 0.2f) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolDefensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolDefensiveWind.java index 4c9550a4..0b0d40c3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolDefensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolDefensiveWind.java @@ -9,6 +9,7 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ToolDefensiveWind; public class CSEToolDefensiveWind extends ComplexSpellEffect { + public CSEToolDefensiveWind() { super(ComplexSpellType.WIND, ComplexSpellModifier.DEFENSIVE); } @@ -24,12 +25,11 @@ public class CSEToolDefensiveWind extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmTool) { - ((SpellParadigmTool) parad) - .addLeftClickEffect(new ToolDefensiveWind( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - ((SpellParadigmTool) parad) - .addToolString( - "DefWind", "Knockback" + " " + SpellHelper.getNumeralForInt(this.powerEnhancement + 1)); + ((SpellParadigmTool) parad).addLeftClickEffect( + new ToolDefensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmTool) parad).addToolString( + "DefWind", + "Knockback" + " " + SpellHelper.getNumeralForInt(this.powerEnhancement + 1)); } } @@ -40,8 +40,7 @@ public class CSEToolDefensiveWind extends ComplexSpellEffect { @Override public int getCostOfEffect() { - return (int) (150 - * (1 + this.powerEnhancement * 0.4f) + return (int) (150 * (1 + this.powerEnhancement * 0.4f) * (1 + this.potencyEnhancement * 0.3f) * Math.pow(0.85, costEnhancement)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolEnvironmentalWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolEnvironmentalWind.java index b422f0b4..a91d83c8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolEnvironmentalWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolEnvironmentalWind.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ToolEnvironmentalWind; public class CSEToolEnvironmentalWind extends ComplexSpellEffect { + public CSEToolEnvironmentalWind() { super(ComplexSpellType.WIND, ComplexSpellModifier.ENVIRONMENTAL); } @@ -23,9 +24,8 @@ public class CSEToolEnvironmentalWind extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmTool) { - ((SpellParadigmTool) parad) - .addBlockBreakEffect(new ToolEnvironmentalWind( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmTool) parad).addBlockBreakEffect( + new ToolEnvironmentalWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolOffensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolOffensiveWind.java index 5d8b430a..4ddf248a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolOffensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolOffensiveWind.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ToolOffensiveWind; public class CSEToolOffensiveWind extends ComplexSpellEffect { + public CSEToolOffensiveWind() { super(ComplexSpellType.WIND, ComplexSpellModifier.OFFENSIVE); } @@ -23,9 +24,8 @@ public class CSEToolOffensiveWind extends ComplexSpellEffect { @Override public void modifyParadigm(SpellParadigm parad) { if (parad instanceof SpellParadigmTool) { - ((SpellParadigmTool) parad) - .addLeftClickEffect(new ToolOffensiveWind( - this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); + ((SpellParadigmTool) parad).addLeftClickEffect( + new ToolOffensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefaultEarth.java index fcff2d75..dd811d1f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefaultEarth.java @@ -1,12 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; import net.minecraft.block.Block; import net.minecraft.entity.item.EntityFallingBlock; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; + public class MeleeDefaultEarth extends MeleeSpellCenteredWorldEffect { + public MeleeDefaultEarth(int power, int potency, int cost) { super(power, potency, cost); this.setRange(3 * power + 2); @@ -29,7 +31,12 @@ public class MeleeDefaultEarth extends MeleeSpellCenteredWorldEffect { int meta = world.getBlockMetadata(posX + i, posY + j, posZ + k); EntityFallingBlock entity = new EntityFallingBlock( - world, posX + i + 0.5f, posY + j + 0.5f, posZ + k + 0.5f, block, meta); + world, + posX + i + 0.5f, + posY + j + 0.5f, + posZ + k + 0.5f, + block, + meta); world.spawnEntityInWorld(entity); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefensiveEarth.java index 1938b748..a60ec013 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefensiveEarth.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; -import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; +import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class MeleeDefensiveEarth extends MeleeSpellCenteredWorldEffect { + public MeleeDefensiveEarth(int power, int potency, int cost) { super(power, potency, cost); this.setRange(3 * power + 2); @@ -17,8 +19,8 @@ public class MeleeDefensiveEarth extends MeleeSpellCenteredWorldEffect { public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ) { ForgeDirection dir = SpellHelper.getDirectionForLookVector(player.getLook(1)); - int vertRadius = - (int) (2 + 1.0f / 2.0f * Math.pow(this.potencyUpgrades, 2) + 1.0f / 2.0f * this.potencyUpgrades); + int vertRadius = (int) (2 + 1.0f / 2.0f * Math.pow(this.potencyUpgrades, 2) + + 1.0f / 2.0f * this.potencyUpgrades); int horizRadius = this.potencyUpgrades + 1; int xOff = dir.offsetX; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeEnvironmentalEarth.java index f9c86e74..10c5982d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeEnvironmentalEarth.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class MeleeEnvironmentalEarth extends MeleeSpellCenteredWorldEffect { + public MeleeEnvironmentalEarth(int power, int potency, int cost) { super(power, potency, cost); this.setRange(3 * power + 2); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeOffensiveEarth.java index ec2f8d44..838f2fe5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeOffensiveEarth.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class MeleeOffensiveEarth extends MeleeSpellCenteredWorldEffect { + public MeleeOffensiveEarth(int power, int potency, int cost) { super(power, potency, cost); this.setRange(3 * power + 2); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefaultEarth.java index 9655636d..5d53059d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefaultEarth.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class ProjectileDefaultEarth extends ProjectileImpactEffect { + public ProjectileDefaultEarth(int power, int potency, int cost) { super(power, potency, cost); } @@ -29,8 +31,7 @@ public class ProjectileDefaultEarth extends ProjectileImpactEffect { for (int k = -horizRange; k <= horizRange; k++) { if (!world.isAirBlock(posX + i, posY + j, posZ + k)) { Block block = world.getBlock(posX + i, posY + j, posZ + k); - if (block == null - || block.getBlockHardness(world, posX + i, posY + j, posZ + k) == -1 + if (block == null || block.getBlockHardness(world, posX + i, posY + j, posZ + k) == -1 || SpellHelper.isBlockFluid(block)) { continue; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefensiveEarth.java index 767a1113..5cecac88 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefensiveEarth.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class ProjectileDefensiveEarth extends ProjectileImpactEffect { + public ProjectileDefensiveEarth(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileEnvironmentalEarth.java index fa7e2bed..f8dc35b1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileEnvironmentalEarth.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; -import WayofTime.alchemicalWizardry.api.spell.ProjectileUpdateEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; @@ -10,7 +7,12 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; +import WayofTime.alchemicalWizardry.api.spell.ProjectileUpdateEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class ProjectileEnvironmentalEarth extends ProjectileUpdateEffect { + public ProjectileEnvironmentalEarth(int power, int potency, int cost) { super(power, potency, cost); } @@ -42,23 +44,25 @@ public class ProjectileEnvironmentalEarth extends ProjectileUpdateEffect { if (!worldObj.isAirBlock(posX + i, posY + j, posZ + k) && blocksBroken < maxBlocks) { Block block = worldObj.getBlock(posX + i, posY + j, posZ + k); int meta = worldObj.getBlockMetadata(posX + i, posY + j, posZ + k); - if (block == null - || block.getBlockHardness(worldObj, posX + i, posY + j, posZ + k) == -1 + if (block == null || block.getBlockHardness(worldObj, posX + i, posY + j, posZ + k) == -1 || SpellHelper.isBlockFluid(block)) { continue; } - if (((EntitySpellProjectile) projectile).getIsSilkTouch() - && block.canSilkHarvest( - worldObj, - ((EntitySpellProjectile) projectile).shootingEntity, - posX + i, - posY + j, - posZ + k, - meta)) { + if (((EntitySpellProjectile) projectile).getIsSilkTouch() && block.canSilkHarvest( + worldObj, + ((EntitySpellProjectile) projectile).shootingEntity, + posX + i, + posY + j, + posZ + k, + meta)) { ItemStack stack = new ItemStack(block, 1, meta); - EntityItem itemEntity = - new EntityItem(worldObj, posX + i + 0.5, posY + j + 0.5, posZ + k + 0.5, stack); + EntityItem itemEntity = new EntityItem( + worldObj, + posX + i + 0.5, + posY + j + 0.5, + posZ + k + 0.5, + stack); worldObj.spawnEntityInWorld(itemEntity); worldObj.setBlockToAir(posX + i, posY + j, posZ + k); } else { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileOffensiveEarth.java index 230d3f59..cf74692c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileOffensiveEarth.java @@ -1,7 +1,5 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; @@ -9,7 +7,11 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class ProjectileOffensiveEarth extends ProjectileImpactEffect { + public ProjectileOffensiveEarth(int power, int potency, int cost) { super(power, potency, cost); } @@ -35,8 +37,7 @@ public class ProjectileOffensiveEarth extends ProjectileImpactEffect { if (block == null || block.getBlockHardness(world, posX + i, posY + j, posZ + k) == -1) { continue; } - if (block == Blocks.stone - || block == Blocks.cobblestone + if (block == Blocks.stone || block == Blocks.cobblestone || block == Blocks.sand || block == Blocks.gravel || block == Blocks.grass diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefaultEarth.java index 506f0fdf..b459dfdf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefaultEarth.java @@ -1,11 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; public class SelfDefaultEarth extends SelfSpellEffect { @@ -33,8 +34,8 @@ public class SelfDefaultEarth extends SelfSpellEffect { for (int j = -1; j >= -vertRange; j--) { if (!world.isAirBlock(posX + i, posY + j, posZ + k) && !SpellHelper.isBlockFluid(world.getBlock(posX + i, posY + j, posZ + k))) { - BlockTeleposer.swapBlocks( - this, world, world, posX + i, posY, posZ + k, posX + i, posY + j, posZ + k); + BlockTeleposer + .swapBlocks(this, world, world, posX + i, posY, posZ + k, posX + i, posY + j, posZ + k); break; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefensiveEarth.java index b552c28e..9188f2bf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefensiveEarth.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; + public class SelfDefensiveEarth extends SelfSpellEffect { public SelfDefensiveEarth(int power, int potency, int cost) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfEnvironmentalEarth.java index f9a66ce6..c09efdef 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfEnvironmentalEarth.java @@ -1,8 +1,7 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.List; + import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -10,7 +9,11 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class SelfEnvironmentalEarth extends SelfSpellEffect { + public SelfEnvironmentalEarth(int power, int potency, int cost) { super(power, potency, cost); } @@ -20,8 +23,8 @@ public class SelfEnvironmentalEarth extends SelfSpellEffect { float radius = this.powerUpgrades * 2 + 1.5f; int dur = this.powerUpgrades * 5 * 20 + 60; - List entities = - SpellHelper.getEntitiesInRange(world, player.posX, player.posY, player.posZ, radius, radius); + List entities = SpellHelper + .getEntitiesInRange(world, player.posX, player.posY, player.posZ, radius, radius); for (Entity entity : entities) { if (entity instanceof EntityLivingBase) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfOffensiveEarth.java index 5bae1f71..4b7131f4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfOffensiveEarth.java @@ -1,12 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class SelfOffensiveEarth extends SelfSpellEffect { + public SelfOffensiveEarth(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolEnvironmentalEarth.java index 4f841efa..9a8478df 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolEnvironmentalEarth.java @@ -1,28 +1,23 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.DigAreaEffect; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.DigAreaEffect; + public class ToolEnvironmentalEarth extends DigAreaEffect { + public ToolEnvironmentalEarth(int power, int potency, int cost) { super(power, potency, cost); } @Override - public int digSurroundingArea( - ItemStack container, - World world, - EntityPlayer player, - MovingObjectPosition blockPos, - String usedToolClass, - float blockHardness, - int harvestLvl, - ItemSpellMultiTool itemTool) { + public int digSurroundingArea(ItemStack container, World world, EntityPlayer player, MovingObjectPosition blockPos, + String usedToolClass, float blockHardness, int harvestLvl, ItemSpellMultiTool itemTool) { if (!blockPos.typeOfHit.equals(MovingObjectPosition.MovingObjectType.BLOCK)) { return 0; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolOffensiveEarth.java index 16322a6e..9e16ce93 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolOffensiveEarth.java @@ -1,16 +1,19 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.ItemManipulator; import java.util.LinkedList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.ItemManipulator; + public class ToolOffensiveEarth extends ItemManipulator { - public static Block[] mundaneList = - new Block[] {Blocks.stone, Blocks.cobblestone, Blocks.sand, Blocks.gravel, Blocks.netherrack, Blocks.dirt}; + + public static Block[] mundaneList = new Block[] { Blocks.stone, Blocks.cobblestone, Blocks.sand, Blocks.gravel, + Blocks.netherrack, Blocks.dirt }; public ToolOffensiveEarth(int power, int potency, int cost) { super(power, potency, cost); @@ -21,8 +24,7 @@ public class ToolOffensiveEarth extends ItemManipulator { List newList = new LinkedList(); for (ItemStack stack : itemList) { - if (stack != null - && stack.getItem() instanceof ItemBlock + if (stack != null && stack.getItem() instanceof ItemBlock && !this.isMundaneBlock(((ItemBlock) stack.getItem()).field_150939_a)) { newList.add(stack); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefaultFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefaultFire.java index 2b3f609c..e3b4448a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefaultFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefaultFire.java @@ -1,12 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; + public class MeleeDefaultFire extends ExtrapolatedMeleeEntityEffect { + public MeleeDefaultFire(int power, int potency, int cost) { super(power, potency, cost); this.setRange(3 + 0.3f * potency); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefensiveFire.java index 0dfe3afd..a82c8086 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefensiveFire.java @@ -1,14 +1,16 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.api.spell.MeleeSpellWorldEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.spell.MeleeSpellWorldEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class MeleeDefensiveFire extends MeleeSpellWorldEffect { + public MeleeDefensiveFire(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeEnvironmentalFire.java index a5f92abd..936b93a7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeEnvironmentalFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeEnvironmentalFire.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class MeleeEnvironmentalFire extends MeleeSpellCenteredWorldEffect { + public MeleeEnvironmentalFire(int power, int potency, int cost) { super(power, potency, cost); this.setRange(3 * power + 2); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeOffensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeOffensiveFire.java index eed3b5a1..44e22417 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeOffensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeOffensiveFire.java @@ -1,14 +1,16 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; + public class MeleeOffensiveFire extends ExtrapolatedMeleeEntityEffect { + public MeleeOffensiveFire(int power, int potency, int cost) { super(power, potency, cost); this.setRange(3 + 0.3f * potency); @@ -19,8 +21,8 @@ public class MeleeOffensiveFire extends ExtrapolatedMeleeEntityEffect { @Override protected boolean entityEffect(World world, Entity entity, EntityPlayer entityPlayer) { if (entity instanceof EntityLivingBase) { - ((EntityLivingBase) entity) - .addPotionEffect(new PotionEffect( + ((EntityLivingBase) entity).addPotionEffect( + new PotionEffect( AlchemicalWizardry.customPotionFireFuse.id, 20 * (7 - this.powerUpgrades), this.potencyUpgrades)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefaultFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefaultFire.java index 7159243d..71003b13 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefaultFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefaultFire.java @@ -1,14 +1,16 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class ProjectileDefaultFire extends ProjectileImpactEffect { + public ProjectileDefaultFire(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefensiveFire.java index c16990c4..02c6a51a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefensiveFire.java @@ -1,12 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class ProjectileDefensiveFire extends ProjectileImpactEffect { + public ProjectileDefensiveFire(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileEnvironmentalFire.java index f8736a75..7f0ebf36 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileEnvironmentalFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileEnvironmentalFire.java @@ -1,12 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.api.spell.ProjectileUpdateEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ProjectileUpdateEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class ProjectileEnvironmentalFire extends ProjectileUpdateEffect { + public ProjectileEnvironmentalFire(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileOffensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileOffensiveFire.java index 06465889..3b680478 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileOffensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileOffensiveFire.java @@ -1,14 +1,16 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class ProjectileOffensiveFire extends ProjectileImpactEffect { + public ProjectileOffensiveFire(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefaultFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefaultFire.java index 074d8996..93c6a0d7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefaultFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefaultFire.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; + public class SelfDefaultFire extends SelfSpellEffect { + public SelfDefaultFire(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefensiveFire.java index 2cee8043..25c641a2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefensiveFire.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class SelfDefensiveFire extends SelfSpellEffect { public SelfDefensiveFire(int power, int potency, int cost) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfEnvironmentalFire.java index d5de43d3..4062fab0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfEnvironmentalFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfEnvironmentalFire.java @@ -1,12 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class SelfEnvironmentalFire extends SelfSpellEffect { + public SelfEnvironmentalFire(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfOffensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfOffensiveFire.java index 675ba157..19344fd5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfOffensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfOffensiveFire.java @@ -1,21 +1,24 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; + public class SelfOffensiveFire extends SelfSpellEffect { + public SelfOffensiveFire(int power, int potency, int cost) { super(power, potency, cost); } @Override public void onSelfUse(World world, EntityPlayer player) { - player.addPotionEffect(new PotionEffect( - AlchemicalWizardry.customPotionFlameCloak.id, - 300 * (2 * this.powerUpgrades + 1), - this.potencyUpgrades)); + player.addPotionEffect( + new PotionEffect( + AlchemicalWizardry.customPotionFlameCloak.id, + 300 * (2 * this.powerUpgrades + 1), + this.potencyUpgrades)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolDefaultFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolDefaultFire.java index db99384f..63be504d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolDefaultFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolDefaultFire.java @@ -1,12 +1,15 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.ItemManipulator; import java.util.LinkedList; import java.util.List; + import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.ItemManipulator; + public class ToolDefaultFire extends ItemManipulator { + public ToolDefaultFire(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolEnvironmentalFire.java index b2ab58b0..7a0bb9c2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolEnvironmentalFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolEnvironmentalFire.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.OnBreakBlockEffect; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -9,22 +9,17 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.OnBreakBlockEffect; + public class ToolEnvironmentalFire extends OnBreakBlockEffect { + public ToolEnvironmentalFire(int power, int potency, int cost) { super(power, potency, cost); } @Override - public int onBlockBroken( - ItemStack container, - World world, - EntityPlayer player, - Block block, - int meta, - int x, - int y, - int z, - ForgeDirection sideBroken) { + public int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, int meta, int x, int y, + int z, ForgeDirection sideBroken) { int amount = 0; int cost = (int) (250 * (1 - 0.1f * powerUpgrades) * Math.pow(0.85, costUpgrades)); int radius = this.powerUpgrades; @@ -36,8 +31,7 @@ public class ToolEnvironmentalFire extends OnBreakBlockEffect { Block blockAffected = world.getBlock(x + i - sideBroken.offsetX, y + j, z + k - sideBroken.offsetZ); if ((new Random().nextFloat() <= chance) - && (blockAffected == Blocks.gravel - || blockAffected == Blocks.stone + && (blockAffected == Blocks.gravel || blockAffected == Blocks.stone || blockAffected == Blocks.cobblestone)) { world.setBlock(x + i - sideBroken.offsetX, y + j, z + k - sideBroken.offsetZ, Blocks.lava); amount += cost; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolOffensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolOffensiveFire.java index 007a33bd..1e7339e4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolOffensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolOffensiveFire.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.LeftClickEffect; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.LeftClickEffect; + public class ToolOffensiveFire extends LeftClickEffect { + public ToolOffensiveFire(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefaultIce.java index a4e243bb..f3ebd2b9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefaultIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefaultIce.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; + public class MeleeDefaultIce extends ExtrapolatedMeleeEntityEffect { + public MeleeDefaultIce(int power, int potency, int cost) { super(power, potency, cost); this.setRange(3 + 0.3f * potency); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefensiveIce.java index 5a78a43c..ae5103c3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefensiveIce.java @@ -1,14 +1,16 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import WayofTime.alchemicalWizardry.api.spell.MeleeSpellWorldEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.spell.MeleeSpellWorldEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class MeleeDefensiveIce extends MeleeSpellWorldEffect { + public MeleeDefensiveIce(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeEnvironmentalIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeEnvironmentalIce.java index ba6ae394..b54270b5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeEnvironmentalIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeEnvironmentalIce.java @@ -1,12 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntitySnowball; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; + public class MeleeEnvironmentalIce extends ExtrapolatedMeleeEntityEffect { + public MeleeEnvironmentalIce(int power, int potency, int cost) { super(power, potency, cost); this.setMaxNumberHit(1 + potency); @@ -23,7 +25,10 @@ public class MeleeEnvironmentalIce extends ExtrapolatedMeleeEntityEffect { double randZ = (world.rand.nextDouble() - world.rand.nextDouble()) * 3; EntitySnowball snowball = new EntitySnowball( - world, entity.posX - 3 * randX, entity.posY - 3 * randY, entity.posZ - 3 * randZ); + world, + entity.posX - 3 * randX, + entity.posY - 3 * randY, + entity.posZ - 3 * randZ); snowball.motionX = randX; snowball.motionY = randY; snowball.motionZ = randZ; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeOffensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeOffensiveIce.java index f8eef147..3797bb21 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeOffensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeOffensiveIce.java @@ -1,14 +1,16 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class MeleeOffensiveIce extends ExtrapolatedMeleeEntityEffect { + public MeleeOffensiveIce(int power, int potency, int cost) { super(power, potency, cost); this.setMaxNumberHit(1 + potency); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefaultIce.java index 07b5d592..ee3903d6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefaultIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefaultIce.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; + public class ProjectileDefaultIce extends ProjectileImpactEffect { + public ProjectileDefaultIce(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefensiveIce.java index 982e664f..40bf9026 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefensiveIce.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class ProjectileDefensiveIce extends ProjectileImpactEffect { + public ProjectileDefensiveIce(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileEnvironmentalIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileEnvironmentalIce.java index ace6c95b..c66d9b12 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileEnvironmentalIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileEnvironmentalIce.java @@ -1,9 +1,10 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; +import net.minecraft.entity.Entity; +import net.minecraft.util.Vec3; + import WayofTime.alchemicalWizardry.api.spell.ProjectileUpdateEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.Entity; -import net.minecraft.util.Vec3; public class ProjectileEnvironmentalIce extends ProjectileUpdateEffect { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileOffensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileOffensiveIce.java index 93b5c4d1..67baf2f3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileOffensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileOffensiveIce.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.potion.Potion; @@ -8,7 +7,10 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; + public class ProjectileOffensiveIce extends ProjectileImpactEffect { + public ProjectileOffensiveIce(int power, int potency, int cost) { super(power, potency, cost); } @@ -16,9 +18,8 @@ public class ProjectileOffensiveIce extends ProjectileImpactEffect { @Override public void onEntityImpact(Entity mop, Entity proj) { if (mop instanceof EntityLivingBase) { - ((EntityLivingBase) mop) - .addPotionEffect(new PotionEffect( - Potion.moveSlowdown.id, 60 * (this.powerUpgrades + 1), this.potencyUpgrades)); + ((EntityLivingBase) mop).addPotionEffect( + new PotionEffect(Potion.moveSlowdown.id, 60 * (this.powerUpgrades + 1), this.potencyUpgrades)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefaultIce.java index b5811aee..174a99d2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefaultIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefaultIce.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class SelfDefaultIce extends SelfSpellEffect { + public SelfDefaultIce(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefensiveIce.java index 2cdbfa60..1b761578 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefensiveIce.java @@ -1,19 +1,24 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; + public class SelfDefensiveIce extends SelfSpellEffect { + public SelfDefensiveIce(int power, int potency, int cost) { super(power, potency, cost); } @Override public void onSelfUse(World world, EntityPlayer player) { - player.addPotionEffect(new PotionEffect( - AlchemicalWizardry.customPotionIceCloak.id, 300 * (2 * this.powerUpgrades + 1), this.potencyUpgrades)); + player.addPotionEffect( + new PotionEffect( + AlchemicalWizardry.customPotionIceCloak.id, + 300 * (2 * this.powerUpgrades + 1), + this.potencyUpgrades)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfEnvironmentalIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfEnvironmentalIce.java index 12ad8f3a..253165a1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfEnvironmentalIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfEnvironmentalIce.java @@ -1,14 +1,16 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class SelfEnvironmentalIce extends SelfSpellEffect { + public SelfEnvironmentalIce(int power, int potency, int cost) { super(power, potency, cost); } @@ -32,7 +34,9 @@ public class SelfEnvironmentalIce extends SelfSpellEffect { for (int i = -width; i <= width; i++) { for (int j = 0; j < length; j++) { if (world.isAirBlock( - xStart + i * (zOffset) + j * (xOffset), yStart, zStart + i * (xOffset) + j * (zOffset))) { + xStart + i * (zOffset) + j * (xOffset), + yStart, + zStart + i * (xOffset) + j * (zOffset))) { world.setBlock( xStart + i * (zOffset) + j * (xOffset), yStart, diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfOffensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfOffensiveIce.java index f0889ded..68fd0aef 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfOffensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfOffensiveIce.java @@ -1,8 +1,7 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.List; + import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -10,7 +9,11 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class SelfOffensiveIce extends SelfSpellEffect { + public SelfOffensiveIce(int power, int potency, int cost) { super(power, potency, cost); } @@ -20,8 +23,8 @@ public class SelfOffensiveIce extends SelfSpellEffect { double horizRadius = this.powerUpgrades + 1; double vertRadius = 0.5 * this.powerUpgrades + 1; - List entities = - SpellHelper.getEntitiesInRange(world, player.posX, player.posY, player.posZ, horizRadius, vertRadius); + List entities = SpellHelper + .getEntitiesInRange(world, player.posX, player.posY, player.posZ, horizRadius, vertRadius); if (entities == null) { return; @@ -36,9 +39,8 @@ public class SelfOffensiveIce extends SelfSpellEffect { } if (entity instanceof EntityLivingBase && !entity.equals(player)) { - ((EntityLivingBase) entity) - .addPotionEffect(new PotionEffect( - Potion.moveSlowdown.id, 60 * (1 + this.powerUpgrades), this.potencyUpgrades)); + ((EntityLivingBase) entity).addPotionEffect( + new PotionEffect(Potion.moveSlowdown.id, 60 * (1 + this.powerUpgrades), this.potencyUpgrades)); i++; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefaultIce.java index 2df8e36f..ba9f7bc1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefaultIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefaultIce.java @@ -1,12 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.LeftClickEffect; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.LeftClickEffect; + public class ToolDefaultIce extends LeftClickEffect { + public ToolDefaultIce(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefensiveIce.java index c06ee036..f3191675 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefensiveIce.java @@ -1,8 +1,7 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.SummonToolEffect; import java.util.List; + import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Blocks; @@ -13,7 +12,11 @@ import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.SummonToolEffect; + public class ToolDefensiveIce extends SummonToolEffect { + public ToolDefensiveIce(int power, int potency, int cost) { super(power, potency, cost); } @@ -22,8 +25,8 @@ public class ToolDefensiveIce extends SummonToolEffect { public int onSummonTool(ItemStack toolStack, World world, Entity entity) { int horizRadius = this.powerUpgrades * 2 + 2; int vertRadius = this.powerUpgrades * 3 + 2; - List entityList = - SpellHelper.getEntitiesInRange(world, entity.posX, entity.posY, entity.posZ, horizRadius, vertRadius); + List entityList = SpellHelper + .getEntitiesInRange(world, entity.posX, entity.posY, entity.posZ, horizRadius, vertRadius); for (Entity ent : entityList) { if (ent instanceof EntityLivingBase && !ent.equals(entity)) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaEffect.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaEffect.java index 1a923156..79976659 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaEffect.java @@ -1,17 +1,20 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool; -import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; -import WayofTime.alchemicalWizardry.api.spell.IDigAreaEffect; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; +import WayofTime.alchemicalWizardry.api.spell.IDigAreaEffect; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class DigAreaEffect implements IDigAreaEffect { + protected int powerUpgrades; protected int potencyUpgrades; protected int costUpgrades; @@ -23,15 +26,8 @@ public class DigAreaEffect implements IDigAreaEffect { } @Override - public int digSurroundingArea( - ItemStack container, - World world, - EntityPlayer player, - MovingObjectPosition blockPos, - String usedToolClass, - float blockHardness, - int harvestLvl, - ItemSpellMultiTool itemTool) { + public int digSurroundingArea(ItemStack container, World world, EntityPlayer player, MovingObjectPosition blockPos, + String usedToolClass, float blockHardness, int harvestLvl, ItemSpellMultiTool itemTool) { if (!blockPos.typeOfHit.equals(MovingObjectPosition.MovingObjectType.BLOCK)) { return 0; } @@ -51,15 +47,8 @@ public class DigAreaEffect implements IDigAreaEffect { return 0; } - public void breakBlock( - ItemStack container, - World world, - EntityPlayer player, - float blockHardness, - int x, - int y, - int z, - ItemSpellMultiTool itemTool) { + public void breakBlock(ItemStack container, World world, EntityPlayer player, float blockHardness, int x, int y, + int z, ItemSpellMultiTool itemTool) { int hlvl = -1; Block localBlock = world.getBlock(x, y, z); int localMeta = world.getBlockMetadata(x, y, z); @@ -79,9 +68,8 @@ public class DigAreaEffect implements IDigAreaEffect { String localToolClass = itemTool.getToolClassForMaterial(localBlock.getMaterial()); - if (localToolClass != null - && itemTool.getHarvestLevel(container, toolClass) - >= localBlock.getHarvestLevel(localMeta)) { + if (localToolClass != null && itemTool.getHarvestLevel(container, toolClass) + >= localBlock.getHarvestLevel(localMeta)) { isEffective = true; } @@ -116,8 +104,7 @@ public class DigAreaEffect implements IDigAreaEffect { } world.func_147479_m(x, y, z); - } else { - } + } else {} } else { world.setBlockToAir(x, y, z); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaTunnel.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaTunnel.java index d2e7e5da..4a9ec9d8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaTunnel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaTunnel.java @@ -1,11 +1,9 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.LinkedList; import java.util.List; import java.util.Random; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; @@ -13,7 +11,12 @@ import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class DigAreaTunnel extends DigAreaEffect { + Random rand = new Random(); public DigAreaTunnel(int power, int potency, int cost) { @@ -21,15 +24,8 @@ public class DigAreaTunnel extends DigAreaEffect { } @Override - public int digSurroundingArea( - ItemStack container, - World world, - EntityPlayer player, - MovingObjectPosition blockPos, - String usedToolClass, - float blockHardness, - int harvestLvl, - ItemSpellMultiTool itemTool) { + public int digSurroundingArea(ItemStack container, World world, EntityPlayer player, MovingObjectPosition blockPos, + String usedToolClass, float blockHardness, int harvestLvl, ItemSpellMultiTool itemTool) { if (!blockPos.typeOfHit.equals(MovingObjectPosition.MovingObjectType.BLOCK)) { return 0; } @@ -47,7 +43,9 @@ public class DigAreaTunnel extends DigAreaEffect { double initialLength = this.getRandomVectorLength(); Vec3 initialVector = SpellHelper.createVec3( - opposite.offsetX * initialLength, opposite.offsetY * initialLength, opposite.offsetZ * initialLength); + opposite.offsetX * initialLength, + opposite.offsetY * initialLength, + opposite.offsetZ * initialLength); Vec3 lastVec = SpellHelper.createVec3(initialVector.xCoord, initialVector.yCoord, initialVector.zCoord); vectorLine.add(initialVector); @@ -157,7 +155,11 @@ public class DigAreaTunnel extends DigAreaEffect { prevVec = prevVec.addVector(stepLength * normVec.xCoord, stepLength * normVec.yCoord, normVec.zCoord); this.destroySphereOfMundane( - world, prevVec.xCoord + x, prevVec.yCoord + y, prevVec.zCoord + z, this.getRandomRadius()); + world, + prevVec.xCoord + x, + prevVec.yCoord + y, + prevVec.zCoord + z, + this.getRandomRadius()); distanceTravelled = prevVec.lengthVector(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/ItemManipulator.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/ItemManipulator.java index 2d33017e..336d0179 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/ItemManipulator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/ItemManipulator.java @@ -1,10 +1,13 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool; -import WayofTime.alchemicalWizardry.api.spell.IItemManipulator; import java.util.List; + import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.api.spell.IItemManipulator; + public abstract class ItemManipulator implements IItemManipulator { + protected int powerUpgrades; protected int potencyUpgrades; protected int costUpgrades; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/LeftClickEffect.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/LeftClickEffect.java index bfbfff3c..a6ee7a95 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/LeftClickEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/LeftClickEffect.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool; -import WayofTime.alchemicalWizardry.api.spell.ILeftClickEffect; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.api.spell.ILeftClickEffect; + public abstract class LeftClickEffect implements ILeftClickEffect { + protected int powerUpgrades; protected int potencyUpgrades; protected int costUpgrades; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/OnBreakBlockEffect.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/OnBreakBlockEffect.java index e00f53d1..9faa6181 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/OnBreakBlockEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/OnBreakBlockEffect.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.t import WayofTime.alchemicalWizardry.api.spell.IOnBreakBlock; public abstract class OnBreakBlockEffect implements IOnBreakBlock { + protected int powerUpgrades; protected int potencyUpgrades; protected int costUpgrades; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickEffect.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickEffect.java index 3ebe89cc..853edaa6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickEffect.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.t import WayofTime.alchemicalWizardry.api.spell.IRightClickEffect; public abstract class RightClickEffect implements IRightClickEffect { + protected int powerUpgrades; protected int potencyUpgrades; protected int costUpgrades; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickTunnel.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickTunnel.java index 752bfadc..d438a686 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickTunnel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickTunnel.java @@ -1,9 +1,9 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.LinkedList; import java.util.List; import java.util.Random; + import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; @@ -11,7 +11,10 @@ import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class RightClickTunnel extends RightClickEffect { + Random rand = new Random(); public RightClickTunnel(int power, int potency, int cost) { @@ -38,7 +41,9 @@ public class RightClickTunnel extends RightClickEffect { double initialLength = this.getRandomVectorLength(); Vec3 initialVector = SpellHelper.createVec3( - opposite.offsetX * initialLength, opposite.offsetY * initialLength, opposite.offsetZ * initialLength); + opposite.offsetX * initialLength, + opposite.offsetY * initialLength, + opposite.offsetZ * initialLength); Vec3 lastVec = SpellHelper.createVec3(initialVector.xCoord, initialVector.yCoord, initialVector.zCoord); vectorLine.add(initialVector); @@ -152,7 +157,11 @@ public class RightClickTunnel extends RightClickEffect { prevVec = prevVec.addVector(stepLength * normVec.xCoord, stepLength * normVec.yCoord, normVec.zCoord); this.destroySphereOfMundane( - world, prevVec.xCoord + x, prevVec.yCoord + y, prevVec.zCoord + z, this.getRandomRadius()); + world, + prevVec.xCoord + x, + prevVec.yCoord + y, + prevVec.zCoord + z, + this.getRandomRadius()); distanceTravelled = prevVec.lengthVector(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/SummonToolEffect.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/SummonToolEffect.java index 55a10bc6..79b3c9fd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/SummonToolEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/SummonToolEffect.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.t import WayofTime.alchemicalWizardry.api.spell.IOnSummonTool; public abstract class SummonToolEffect implements IOnSummonTool { + protected int powerUpgrades; protected int potencyUpgrades; protected int costUpgrades; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeDefaultWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeDefaultWind.java index 7b4ee1bc..c53a34a9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeDefaultWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeDefaultWind.java @@ -1,12 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; + public class MeleeDefaultWind extends ExtrapolatedMeleeEntityEffect { + public MeleeDefaultWind(int power, int potency, int cost) { super(power, potency, cost); this.setRange(4 + 2.0f * potency); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeDefensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeDefensiveWind.java index 99cb4883..8fb5b435 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeDefensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeDefensiveWind.java @@ -1,12 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; + public class MeleeDefensiveWind extends ExtrapolatedMeleeEntityEffect { + public MeleeDefensiveWind(int power, int potency, int cost) { super(power, potency, cost); this.setRange(3 + 0.3f * potency); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeEnvironmentalWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeEnvironmentalWind.java index a87b5f35..7fc8c640 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeEnvironmentalWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeEnvironmentalWind.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.List; + import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class MeleeEnvironmentalWind extends MeleeSpellCenteredWorldEffect { + public MeleeEnvironmentalWind(int power, int potency, int cost) { super(power, potency, cost); this.setRange(5 * power + 5); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeOffensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeOffensiveWind.java index bd636822..259c56b7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeOffensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeOffensiveWind.java @@ -1,12 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; + public class MeleeOffensiveWind extends ExtrapolatedMeleeEntityEffect { + public MeleeOffensiveWind(int power, int potency, int cost) { super(power, potency, cost); this.setRange(3 + 0.3f * potency); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileDefaultWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileDefaultWind.java index f561be1f..3c3f5e5f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileDefaultWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileDefaultWind.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; import net.minecraft.entity.Entity; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; + public class ProjectileDefaultWind extends ProjectileImpactEffect { + public ProjectileDefaultWind(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileEnvironmentalWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileEnvironmentalWind.java index d67a87b3..13eee2fc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileEnvironmentalWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileEnvironmentalWind.java @@ -1,15 +1,18 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; -import WayofTime.alchemicalWizardry.api.spell.ProjectileUpdateEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.List; + import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; +import WayofTime.alchemicalWizardry.api.spell.ProjectileUpdateEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class ProjectileEnvironmentalWind extends ProjectileUpdateEffect { + public ProjectileEnvironmentalWind(int power, int potency, int cost) { super(power, potency, cost); } @@ -25,7 +28,12 @@ public class ProjectileEnvironmentalWind extends ProjectileUpdateEffect { Entity shooter = ((EntitySpellProjectile) projectile).shootingEntity; if (shooter instanceof EntityPlayer) { List entitylist = SpellHelper.getEntitiesInRange( - worldObj, projectile.posX, projectile.posY, projectile.posZ, horizRange, vertRange); + worldObj, + projectile.posX, + projectile.posY, + projectile.posZ, + horizRange, + vertRange); if (entitylist != null) { for (Entity entity : entitylist) { if (entity instanceof EntityItem) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileOffensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileOffensiveWind.java index d519ec3e..fdf1e871 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileOffensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileOffensiveWind.java @@ -1,14 +1,16 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.potion.PotionEffect; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; + public class ProjectileOffensiveWind extends ProjectileImpactEffect { + public ProjectileOffensiveWind(int power, int potency, int cost) { super(power, potency, cost); } @@ -16,8 +18,8 @@ public class ProjectileOffensiveWind extends ProjectileImpactEffect { @Override public void onEntityImpact(Entity mop, Entity proj) { if (mop instanceof EntityLivingBase) { - ((EntityLivingBase) mop) - .addPotionEffect(new PotionEffect( + ((EntityLivingBase) mop).addPotionEffect( + new PotionEffect( AlchemicalWizardry.customPotionHeavyHeart.id, (100 * (2 * this.powerUpgrades + 1) * (1 / (this.potencyUpgrades + 1))), this.potencyUpgrades)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfDefaultWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfDefaultWind.java index 17e8f07d..41a6df3d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfDefaultWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfDefaultWind.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; + public class SelfDefaultWind extends SelfSpellEffect { + public SelfDefaultWind(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfDefensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfDefensiveWind.java index 7b4d6379..eb515bac 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfDefensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfDefensiveWind.java @@ -1,16 +1,19 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.List; + import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class SelfDefensiveWind extends SelfSpellEffect { + public SelfDefensiveWind(int power, int potency, int cost) { super(power, potency, cost); } @@ -26,9 +29,8 @@ public class SelfDefensiveWind extends SelfSpellEffect { for (Entity entity : entities) { if ((!entity.equals(player)) && entity instanceof EntityLiving) { - ((EntityLiving) entity) - .addPotionEffect(new PotionEffect( - AlchemicalWizardry.customPotionHeavyHeart.id, 200, this.potencyUpgrades)); + ((EntityLiving) entity).addPotionEffect( + new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, 200, this.potencyUpgrades)); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfEnvironmentalWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfEnvironmentalWind.java index af967d15..5c5f3314 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfEnvironmentalWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfEnvironmentalWind.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.List; + import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class SelfEnvironmentalWind extends SelfSpellEffect { + public SelfEnvironmentalWind(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfOffensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfOffensiveWind.java index 33846b0f..34ce3e68 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfOffensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfOffensiveWind.java @@ -1,12 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class SelfOffensiveWind extends SelfSpellEffect { + public SelfOffensiveWind(int power, int potency, int cost) { super(power, potency, cost); } @@ -17,7 +19,10 @@ public class SelfOffensiveWind extends SelfSpellEffect { double wantedVelocity = 1.5 + this.powerUpgrades * 0.4; SpellHelper.setPlayerSpeedFromServer( - player, vec.xCoord * wantedVelocity, vec.yCoord * wantedVelocity, vec.zCoord * wantedVelocity); + player, + vec.xCoord * wantedVelocity, + vec.yCoord * wantedVelocity, + vec.zCoord * wantedVelocity); player.fallDistance = 0; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolDefensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolDefensiveWind.java index f43cc648..627cdc37 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolDefensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolDefensiveWind.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.LeftClickEffect; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.util.Vec3; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.LeftClickEffect; + public class ToolDefensiveWind extends LeftClickEffect { + public ToolDefensiveWind(int power, int potency, int cost) { super(power, potency, cost); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolEnvironmentalWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolEnvironmentalWind.java index cb3c3f8c..bf17070b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolEnvironmentalWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolEnvironmentalWind.java @@ -1,8 +1,7 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.OnBreakBlockEffect; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -10,26 +9,22 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.OnBreakBlockEffect; + public class ToolEnvironmentalWind extends OnBreakBlockEffect { + public ToolEnvironmentalWind(int power, int potency, int cost) { super(power, potency, cost); } @Override - public int onBlockBroken( - ItemStack container, - World world, - EntityPlayer player, - Block block, - int meta, - int x, - int y, - int z, - ForgeDirection sideBroken) { + public int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, int meta, int x, int y, + int z, ForgeDirection sideBroken) { double vertRange = 0.5 + (this.powerUpgrades * this.powerUpgrades + this.powerUpgrades) / 2; - List itemList = - SpellHelper.getItemsInRange(world, x + 0.5f, y + 0.5f, z + 0.5f, vertRange, vertRange); + List itemList = SpellHelper + .getItemsInRange(world, x + 0.5f, y + 0.5f, z + 0.5f, vertRange, vertRange); for (EntityItem entity : itemList) { if (!world.isRemote) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolOffensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolOffensiveWind.java index e816d2bd..36eed5a0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolOffensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolOffensiveWind.java @@ -1,22 +1,25 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.LeftClickEffect; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionEffect; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.LeftClickEffect; + public class ToolOffensiveWind extends LeftClickEffect { + public ToolOffensiveWind(int power, int potency, int cost) { super(power, potency, cost); } @Override public int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder) { - attacked.addPotionEffect(new PotionEffect( - AlchemicalWizardry.customPotionHeavyHeart.id, - (100 * (2 * this.powerUpgrades + 1) * (1 / (this.potencyUpgrades + 1))), - this.potencyUpgrades)); + attacked.addPotionEffect( + new PotionEffect( + AlchemicalWizardry.customPotionHeavyHeart.id, + (100 * (2 * this.powerUpgrades + 1) * (1 / (this.potencyUpgrades + 1))), + this.potencyUpgrades)); return (int) (100 * (0.5 * this.potencyUpgrades + 1) * (this.powerUpgrades + 1) * Math.pow(0.85, costUpgrades)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpell.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpell.java index b2ca3621..52bd2a4c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpell.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpell.java @@ -6,6 +6,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; public abstract class HomSpell implements ISimpleSpell { + private int offensiveRangedEnergy; private int offensiveMeleeEnergy; private int defensiveEnergy; @@ -18,20 +19,20 @@ public abstract class HomSpell implements ISimpleSpell { } @Override - public abstract ItemStack onOffensiveRangedRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); + public abstract ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer); @Override - public abstract ItemStack onOffensiveMeleeRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); + public abstract ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer); @Override - public abstract ItemStack onDefensiveRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); + public abstract ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer); @Override - public abstract ItemStack onEnvironmentalRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); + public abstract ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer); public int getOffensiveRangedEnergy() { return offensiveRangedEnergy; @@ -103,20 +104,20 @@ public abstract class HomSpell implements ISimpleSpell { return par1ItemStack; } - // @Override - // public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean + // @Override + // public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean // par4) - // { - // if (!(par1ItemStack.getTagCompound() == null)) - // { - // if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) - // { - // par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName")); - // } + // { + // if (!(par1ItemStack.getTagCompound() == null)) + // { + // if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) + // { + // par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName")); + // } // - // par3List.add("Current paradigm: " + this.getSpellParadigm(par1ItemStack)); - // } - // } + // par3List.add("Current paradigm: " + this.getSpellParadigm(par1ItemStack)); + // } + // } public int getDimensionID(ItemStack itemStack) { if (itemStack.getTagCompound() == null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellComponent.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellComponent.java index 8256d487..f8209911 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellComponent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellComponent.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.spell.simple; import net.minecraft.item.ItemStack; public class HomSpellComponent { + public HomSpell spell; public ItemStack item; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellRegistry.java index 32cba0c4..f01734e2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellRegistry.java @@ -2,10 +2,12 @@ package WayofTime.alchemicalWizardry.common.spell.simple; import java.util.ArrayList; import java.util.List; + import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; public class HomSpellRegistry { + public static List spellList = new ArrayList(); public static void registerBasicSpell(ItemStack item, HomSpell spell) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java index 04160548..e267ca10 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java @@ -5,6 +5,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; public interface ISimpleSpell { + ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java index 73a3f6dd..1d373ee6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java @@ -1,16 +1,19 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class SpellEarthBender extends HomSpell { + Random itemRand = new Random(); public SpellEarthBender() { @@ -19,15 +22,15 @@ public class SpellEarthBender extends HomSpell { } @Override - public ItemStack onOffensiveRangedRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer( - par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + EnergyItems + .syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.spawnEntityInWorld(new MudProjectile(par2World, par3EntityPlayer, 8, false)); @@ -36,31 +39,32 @@ public class SpellEarthBender extends HomSpell { } @Override - public ItemStack onOffensiveMeleeRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer( - par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + EnergyItems + .syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } if (!par2World.isRemote) { for (int i = -1; i <= 1; i++) { for (int j = -1; j <= 1; j++) { - par2World.spawnEntityInWorld(new MudProjectile( - par2World, - par3EntityPlayer, - 3, - 3, - par3EntityPlayer.posX, - par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight(), - par3EntityPlayer.posZ, - par3EntityPlayer.rotationYaw + i * 10F, - par3EntityPlayer.rotationPitch + j * 5F, - true)); + par2World.spawnEntityInWorld( + new MudProjectile( + par2World, + par3EntityPlayer, + 3, + 3, + par3EntityPlayer.posX, + par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight(), + par3EntityPlayer.posZ, + par3EntityPlayer.rotationYaw + i * 10F, + par3EntityPlayer.rotationPitch + j * 5F, + true)); } } } @@ -137,8 +141,8 @@ public class SpellEarthBender extends HomSpell { } @Override - public ItemStack onEnvironmentalRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -154,15 +158,13 @@ public class SpellEarthBender extends HomSpell { for (int j = -1; j <= 1; j++) { for (int k = -range; k <= range; k++) { if (par2World.getBlock( - (int) par3EntityPlayer.posX + i, - (int) par3EntityPlayer.posY + j, - (int) par3EntityPlayer.posZ + k) - == Blocks.water + (int) par3EntityPlayer.posX + i, + (int) par3EntityPlayer.posY + j, + (int) par3EntityPlayer.posZ + k) == Blocks.water || par2World.getBlock( - (int) par3EntityPlayer.posX + i, - (int) par3EntityPlayer.posY + j, - (int) par3EntityPlayer.posZ + k) - == Blocks.flowing_water) { + (int) par3EntityPlayer.posX + i, + (int) par3EntityPlayer.posY + j, + (int) par3EntityPlayer.posZ + k) == Blocks.flowing_water) { int x = par2World.rand.nextInt(2); if (x == 0) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java index 857cca9b..db2a1756 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java @@ -1,13 +1,16 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; import java.util.Random; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; + public class SpellExplosions extends HomSpell { + Random itemRand = new Random(); public SpellExplosions() { @@ -16,15 +19,15 @@ public class SpellExplosions extends HomSpell { } @Override - public ItemStack onOffensiveRangedRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer( - par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + EnergyItems + .syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -37,15 +40,15 @@ public class SpellExplosions extends HomSpell { } @Override - public ItemStack onOffensiveMeleeRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer( - par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + EnergyItems + .syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } int distance = 4; @@ -83,8 +86,8 @@ public class SpellExplosions extends HomSpell { } @Override - public ItemStack onEnvironmentalRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java index 4058d04c..abfe1cf4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java @@ -1,10 +1,9 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; import java.util.Iterator; import java.util.List; import java.util.Random; + import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -13,7 +12,11 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; + public class SpellFireBurst extends HomSpell { + public Random itemRand = new Random(); public SpellFireBurst() { @@ -22,15 +25,15 @@ public class SpellFireBurst extends HomSpell { } @Override - public ItemStack onOffensiveRangedRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer( - par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + EnergyItems + .syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -44,15 +47,15 @@ public class SpellFireBurst extends HomSpell { } @Override - public ItemStack onOffensiveMeleeRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer( - par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + EnergyItems + .syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -60,16 +63,17 @@ public class SpellFireBurst extends HomSpell { if (!par2World.isRemote) { for (int i = -1; i <= 1; i++) { for (int j = -1; j <= 1; j++) { - par2World.spawnEntityInWorld(new FireProjectile( - par2World, - par3EntityPlayer, - 8, - 2, - par3EntityPlayer.posX, - par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight(), - par3EntityPlayer.posZ, - par3EntityPlayer.rotationYaw + i * 10F, - par3EntityPlayer.rotationPitch + j * 10F)); + par2World.spawnEntityInWorld( + new FireProjectile( + par2World, + par3EntityPlayer, + 8, + 2, + par3EntityPlayer.posX, + par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight(), + par3EntityPlayer.posZ, + par3EntityPlayer.rotationYaw + i * 10F, + par3EntityPlayer.rotationPitch + j * 10F)); } } } @@ -90,13 +94,12 @@ public class SpellFireBurst extends HomSpell { par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); int d0 = 2; AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox( - par3EntityPlayer.posX, - par3EntityPlayer.posY, - par3EntityPlayer.posZ, - (par3EntityPlayer.posX + 1), - (par3EntityPlayer.posY + 2), - (par3EntityPlayer.posZ + 1)) - .expand(d0, d0, d0); + par3EntityPlayer.posX, + par3EntityPlayer.posY, + par3EntityPlayer.posZ, + (par3EntityPlayer.posX + 1), + (par3EntityPlayer.posY + 2), + (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); @@ -116,8 +119,8 @@ public class SpellFireBurst extends HomSpell { } @Override - public ItemStack onEnvironmentalRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java index 13bbc762..31a1eef0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java @@ -1,15 +1,18 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; + public class SpellFrozenWater extends HomSpell { + public Random itemRand = new Random(); public SpellFrozenWater() { @@ -18,15 +21,15 @@ public class SpellFrozenWater extends HomSpell { } @Override - public ItemStack onOffensiveRangedRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer( - par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + EnergyItems + .syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -39,28 +42,29 @@ public class SpellFrozenWater extends HomSpell { } @Override - public ItemStack onOffensiveMeleeRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer( - par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + EnergyItems + .syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } for (int i = -2; i <= 2; i++) { - par2World.spawnEntityInWorld(new IceProjectile( - par2World, - par3EntityPlayer, - 6, - 2, - par3EntityPlayer.posX, - par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight(), - par3EntityPlayer.posZ, - par3EntityPlayer.rotationYaw + i * 5F, - par3EntityPlayer.rotationPitch)); + par2World.spawnEntityInWorld( + new IceProjectile( + par2World, + par3EntityPlayer, + 6, + 2, + par3EntityPlayer.posX, + par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight(), + par3EntityPlayer.posZ, + par3EntityPlayer.rotationYaw + i * 5F, + par3EntityPlayer.rotationPitch)); } return par1ItemStack; @@ -178,8 +182,8 @@ public class SpellFrozenWater extends HomSpell { } @Override - public ItemStack onEnvironmentalRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java index b0e81d2f..507ec181 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java @@ -1,11 +1,9 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.Iterator; import java.util.List; import java.util.Random; + import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -13,7 +11,12 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class SpellHolyBlast extends HomSpell { + Random itemRand = new Random(); public SpellHolyBlast() { @@ -22,15 +25,15 @@ public class SpellHolyBlast extends HomSpell { } @Override - public ItemStack onOffensiveRangedRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer( - par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + EnergyItems + .syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -43,15 +46,15 @@ public class SpellHolyBlast extends HomSpell { } @Override - public ItemStack onOffensiveMeleeRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer( - par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + EnergyItems + .syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } int distance = 2; @@ -62,13 +65,12 @@ public class SpellHolyBlast extends HomSpell { double zCoord = par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance; float d0 = 0.5f; AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox( - par3EntityPlayer.posX - 0.5 + Math.sin(yaw) * Math.cos(pitch) * (-distance), - par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance, - par3EntityPlayer.posZ - 0.5 + Math.cos(yaw) * Math.cos(pitch) * distance, - par3EntityPlayer.posX + Math.sin(yaw) * Math.cos(pitch) * (-distance) + 0.5, - par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance + 1, - par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance + 0.5) - .expand(d0, d0, d0); + par3EntityPlayer.posX - 0.5 + Math.sin(yaw) * Math.cos(pitch) * (-distance), + par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance, + par3EntityPlayer.posZ - 0.5 + Math.cos(yaw) * Math.cos(pitch) * distance, + par3EntityPlayer.posX + Math.sin(yaw) * Math.cos(pitch) * (-distance) + 0.5, + par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance + 1, + par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance + 0.5).expand(d0, d0, d0); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); @@ -123,16 +125,17 @@ public class SpellHolyBlast extends HomSpell { if (!par2World.isRemote) { for (int i = 0; i < 360; i += 18) { - par2World.spawnEntityInWorld(new HolyProjectile( - par2World, - par3EntityPlayer, - 8, - 3, - par3EntityPlayer.posX, - par3EntityPlayer.posY + (par3EntityPlayer.height / 2), - par3EntityPlayer.posZ, - i, - 0)); + par2World.spawnEntityInWorld( + new HolyProjectile( + par2World, + par3EntityPlayer, + 8, + 3, + par3EntityPlayer.posX, + par3EntityPlayer.posY + (par3EntityPlayer.height / 2), + par3EntityPlayer.posZ, + i, + 0)); } } @@ -140,8 +143,8 @@ public class SpellHolyBlast extends HomSpell { } @Override - public ItemStack onEnvironmentalRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -152,13 +155,12 @@ public class SpellHolyBlast extends HomSpell { int d0 = 3; AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox( - par3EntityPlayer.posX, - par3EntityPlayer.posY, - par3EntityPlayer.posZ, - (par3EntityPlayer.posX + 1), - (par3EntityPlayer.posY + 2), - (par3EntityPlayer.posZ + 1)) - .expand(d0, d0, d0); + par3EntityPlayer.posX, + par3EntityPlayer.posY, + par3EntityPlayer.posZ, + (par3EntityPlayer.posX + 1), + (par3EntityPlayer.posY + 2), + (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java index 6d57c4fc..3ffc8adc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java @@ -1,15 +1,18 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import WayofTime.alchemicalWizardry.common.entity.projectile.LightningBoltProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.Random; + import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.entity.projectile.LightningBoltProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class SpellLightningBolt extends HomSpell { + Random itemRand = new Random(); public SpellLightningBolt() { @@ -18,15 +21,15 @@ public class SpellLightningBolt extends HomSpell { } @Override - public ItemStack onOffensiveRangedRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer( - par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + EnergyItems + .syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -39,16 +42,16 @@ public class SpellLightningBolt extends HomSpell { } @Override - public ItemStack onOffensiveMeleeRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { // TODO Make it work better...? if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer( - par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + EnergyItems + .syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } double xCoord = par3EntityPlayer.posX; @@ -98,11 +101,12 @@ public class SpellLightningBolt extends HomSpell { double zCoord = par3EntityPlayer.posZ; for (int i = 0; i < 5; i++) { - par2World.addWeatherEffect(new EntityLightningBolt( - par2World, - xCoord + itemRand.nextInt(64) - 32, - yCoord + itemRand.nextInt(8) - 8, - zCoord + itemRand.nextInt(64) - 32)); + par2World.addWeatherEffect( + new EntityLightningBolt( + par2World, + xCoord + itemRand.nextInt(64) - 32, + yCoord + itemRand.nextInt(8) - 8, + zCoord + itemRand.nextInt(64) - 32)); } for (int i = 0; i < 8; i++) { @@ -126,8 +130,8 @@ public class SpellLightningBolt extends HomSpell { } @Override - public ItemStack onEnvironmentalRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java index 70cbcdac..a305abd8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java @@ -1,11 +1,9 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import WayofTime.alchemicalWizardry.common.entity.projectile.TeleportProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.Iterator; import java.util.List; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -17,7 +15,12 @@ import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.EnderTeleportEvent; +import WayofTime.alchemicalWizardry.common.entity.projectile.TeleportProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class SpellTeleport extends HomSpell { + Random itemRand = new Random(); public SpellTeleport() { @@ -26,15 +29,15 @@ public class SpellTeleport extends HomSpell { } @Override - public ItemStack onOffensiveRangedRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer( - par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + EnergyItems + .syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.spawnEntityInWorld(new TeleportProjectile(par2World, par3EntityPlayer, 8, true)); @@ -43,15 +46,15 @@ public class SpellTeleport extends HomSpell { } @Override - public ItemStack onOffensiveMeleeRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer( - par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + EnergyItems + .syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } par2World.spawnEntityInWorld(new TeleportProjectile(par2World, par3EntityPlayer, 8, false)); @@ -94,8 +97,8 @@ public class SpellTeleport extends HomSpell { } @Override - public ItemStack onEnvironmentalRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -107,13 +110,12 @@ public class SpellTeleport extends HomSpell { if (!par2World.isRemote) { int d0 = 3; AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox( - par3EntityPlayer.posX, - par3EntityPlayer.posY, - par3EntityPlayer.posZ, - (par3EntityPlayer.posX + 1), - (par3EntityPlayer.posY + 2), - (par3EntityPlayer.posZ + 1)) - .expand(d0, d0, d0); + par3EntityPlayer.posX, + par3EntityPlayer.posY, + par3EntityPlayer.posZ, + (par3EntityPlayer.posX + 1), + (par3EntityPlayer.posY + 2), + (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); @@ -177,14 +179,8 @@ public class SpellTeleport extends HomSpell { return true; } - private static boolean teleportTo( - EntityLivingBase entityLiving, - double par1, - double par3, - double par5, - double lastX, - double lastY, - double lastZ) { + private static boolean teleportTo(EntityLivingBase entityLiving, double par1, double par3, double par5, + double lastX, double lastY, double lastZ) { EnderTeleportEvent event = new EnderTeleportEvent(entityLiving, par1, par3, par5, 0); if (MinecraftForge.EVENT_BUS.post(event)) { @@ -213,13 +209,10 @@ public class SpellTeleport extends HomSpell { } if (flag1) { - SpellTeleport.moveEntityViaTeleport( - entityLiving, entityLiving.posX, entityLiving.posY, entityLiving.posZ); + SpellTeleport + .moveEntityViaTeleport(entityLiving, entityLiving.posX, entityLiving.posY, entityLiving.posZ); - if (entityLiving - .worldObj - .getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox) - .isEmpty() + if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.boundingBox)) { flag = true; } @@ -237,14 +230,11 @@ public class SpellTeleport extends HomSpell { float f = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; float f1 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; float f2 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; - double d7 = lastX - + (entityLiving.posX - lastX) * d6 + double d7 = lastX + (entityLiving.posX - lastX) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; - double d8 = lastY - + (entityLiving.posY - lastY) * d6 + double d8 = lastY + (entityLiving.posY - lastY) * d6 + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height; - double d9 = lastZ - + (entityLiving.posZ - lastZ) * d6 + double d9 = lastZ + (entityLiving.posZ - lastZ) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; entityLiving.worldObj.spawnParticle("portal", d7, d8, d9, (double) f, (double) f1, (double) f2); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java index 620bf7e1..c34755e4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java @@ -1,12 +1,9 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.Iterator; import java.util.List; import java.util.Random; + import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -16,7 +13,13 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class SpellWateryGrave extends HomSpell { + Random itemRand = new Random(); public SpellWateryGrave() { @@ -25,15 +28,15 @@ public class SpellWateryGrave extends HomSpell { } @Override - public ItemStack onOffensiveRangedRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer( - par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + EnergyItems + .syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.spawnEntityInWorld(new WaterProjectile(par2World, par3EntityPlayer, 8)); @@ -42,30 +45,31 @@ public class SpellWateryGrave extends HomSpell { } @Override - public ItemStack onOffensiveMeleeRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer( - par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + EnergyItems + .syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } if (!par2World.isRemote) { for (int i = -1; i <= 1; i++) { for (int j = -1; j <= 1; j++) { - par2World.spawnEntityInWorld(new WaterProjectile( - par2World, - par3EntityPlayer, - 3, - 3, - par3EntityPlayer.posX, - par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight(), - par3EntityPlayer.posZ, - par3EntityPlayer.rotationYaw + i * 10F, - par3EntityPlayer.rotationPitch + j * 5F)); + par2World.spawnEntityInWorld( + new WaterProjectile( + par2World, + par3EntityPlayer, + 3, + 3, + par3EntityPlayer.posX, + par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight(), + par3EntityPlayer.posZ, + par3EntityPlayer.rotationYaw + i * 10F, + par3EntityPlayer.rotationPitch + j * 5F)); } } } @@ -85,13 +89,12 @@ public class SpellWateryGrave extends HomSpell { int d0 = 3; AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox( - par3EntityPlayer.posX, - par3EntityPlayer.posY, - par3EntityPlayer.posZ, - (par3EntityPlayer.posX + 1), - (par3EntityPlayer.posY + 2), - (par3EntityPlayer.posZ + 1)) - .expand(d0, d0, d0); + par3EntityPlayer.posX, + par3EntityPlayer.posY, + par3EntityPlayer.posZ, + (par3EntityPlayer.posX + 1), + (par3EntityPlayer.posY + 2), + (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); @@ -139,8 +142,8 @@ public class SpellWateryGrave extends HomSpell { } @Override - public ItemStack onEnvironmentalRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java index 4cdd6b42..ecd1ab81 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java @@ -1,11 +1,9 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.Iterator; import java.util.List; import java.util.Random; + import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -13,7 +11,12 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class SpellWindGust extends HomSpell { + Random itemRand = new Random(); public SpellWindGust() { @@ -22,15 +25,15 @@ public class SpellWindGust extends HomSpell { } @Override - public ItemStack onOffensiveRangedRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer( - par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + EnergyItems + .syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -43,15 +46,15 @@ public class SpellWindGust extends HomSpell { } @Override - public ItemStack onOffensiveMeleeRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer( - par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + EnergyItems + .syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } int distance = 3; @@ -62,13 +65,12 @@ public class SpellWindGust extends HomSpell { double zCoord = par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance; float d0 = 0.5f; AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox( - par3EntityPlayer.posX - 0.5 + Math.sin(yaw) * Math.cos(pitch) * (-distance), - par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance, - par3EntityPlayer.posZ - 0.5 + Math.cos(yaw) * Math.cos(pitch) * distance, - par3EntityPlayer.posX + Math.sin(yaw) * Math.cos(pitch) * (-distance) + 0.5, - par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance + 1, - par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance + 0.5) - .expand(d0, d0, d0); + par3EntityPlayer.posX - 0.5 + Math.sin(yaw) * Math.cos(pitch) * (-distance), + par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance, + par3EntityPlayer.posZ - 0.5 + Math.cos(yaw) * Math.cos(pitch) * distance, + par3EntityPlayer.posX + Math.sin(yaw) * Math.cos(pitch) * (-distance) + 0.5, + par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance + 1, + par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance + 0.5).expand(d0, d0, d0); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); @@ -157,8 +159,8 @@ public class SpellWindGust extends HomSpell { } @Override - public ItemStack onEnvironmentalRightClick( - ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, + EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -169,13 +171,12 @@ public class SpellWindGust extends HomSpell { int d0 = 3; AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox( - par3EntityPlayer.posX, - par3EntityPlayer.posY, - par3EntityPlayer.posZ, - (par3EntityPlayer.posX + 1), - (par3EntityPlayer.posY + 2), - (par3EntityPlayer.posZ + 1)) - .expand(d0, d0, d0); + par3EntityPlayer.posX, + par3EntityPlayer.posY, + par3EntityPlayer.posZ, + (par3EntityPlayer.posX + 1), + (par3EntityPlayer.posY + 2), + (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); double xCoord = par3EntityPlayer.posX; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/SummoningFallenAngel.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/SummoningFallenAngel.java index 72d872fe..85b8189f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/SummoningFallenAngel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/SummoningFallenAngel.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.summoning; -import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningHelper; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel; import net.minecraft.entity.EntityLivingBase; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningHelper; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel; + public class SummoningFallenAngel extends SummoningHelper { + public SummoningFallenAngel(String id) { super(id); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/SummoningHelperAW.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/SummoningHelperAW.java index 285d091d..e762f10c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/SummoningHelperAW.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/SummoningHelperAW.java @@ -1,5 +1,9 @@ package WayofTime.alchemicalWizardry.common.summoning; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.passive.EntityPig; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningHelper; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGrunt; @@ -21,11 +25,9 @@ import WayofTime.alchemicalWizardry.common.entity.mob.EntityShadeElemental; import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem; import WayofTime.alchemicalWizardry.common.entity.mob.EntityWaterElemental; import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.passive.EntityPig; -import net.minecraft.world.World; public class SummoningHelperAW extends SummoningHelper { + public SummoningHelperAW(String id) { super(id); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/Meteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/Meteor.java index bd3809d9..d3e72b72 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/Meteor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/Meteor.java @@ -1,16 +1,19 @@ package WayofTime.alchemicalWizardry.common.summoning.meteor; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import cpw.mods.fml.common.registry.GameRegistry; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; + import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import cpw.mods.fml.common.registry.GameRegistry; + public class Meteor { + public String[] ores; public int radius; public int cost; @@ -28,7 +31,10 @@ public class Meteor { BufferedReader br = new BufferedReader(new FileReader(f)); Meteor m = gson.fromJson(br, Meteor.class); MeteorRegistry.registerMeteorParadigm( - findItemStack(m.focusModId, m.focusName, m.focusMeta), m.ores, m.radius, m.cost); + findItemStack(m.focusModId, m.focusName, m.focusMeta), + m.ores, + m.radius, + m.cost); } } catch (FileNotFoundException e) { e.printStackTrace(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java index c079d5e3..92609e8c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java @@ -1,18 +1,21 @@ package WayofTime.alchemicalWizardry.common.summoning.meteor; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.common.Optional; -import gregtech.common.blocks.GT_TileEntity_Ores; import java.util.ArrayList; import java.util.List; import java.util.Random; + import net.minecraft.init.Blocks; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.common.Optional; +import gregtech.common.blocks.GT_TileEntity_Ores; + public class MeteorParadigm { + public List componentList = new ArrayList<>(); public ItemStack focusStack; public int radius; @@ -105,30 +108,29 @@ public class MeteorParadigm { if (randNum < 0) { ItemStack blockStack = mpc.getValidBlockParadigm(); if (blockStack != null && blockStack.getItem() instanceof ItemBlock) { - ((ItemBlock) blockStack.getItem()) - .placeBlockAt( - blockStack, - null, - world, - x + i, - y + j, - z + k, - 0, - 0, - 0, - 0, - blockStack.getItemDamage()); + ((ItemBlock) blockStack.getItem()).placeBlockAt( + blockStack, + null, + world, + x + i, + y + j, + z + k, + 0, + 0, + 0, + 0, + blockStack.getItemDamage()); if (AlchemicalWizardry.isGregTechLoaded) setGTOresNaturalIfNeeded(world, x + i, y + j, z + k); world.markBlockForUpdate(x + i, y + j, z + k); hasPlacedBlock = true; break; } - // world.setBlock(x + i, y + j, z + k, + // world.setBlock(x + i, y + j, z + k, // Block.getBlockById(Item.getIdFromItem(blockStack.getItem())), blockStack.getItemDamage(), // 3); - // hasPlacedBlock = true; - // break; + // hasPlacedBlock = true; + // break; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigmComponent.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigmComponent.java index 8c6b97cb..17426528 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigmComponent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigmComponent.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.summoning.meteor; import java.util.List; + import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; public class MeteorParadigmComponent { + public String oreDictName; public int chance; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java index 47c3b100..d338a194 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java @@ -2,11 +2,13 @@ package WayofTime.alchemicalWizardry.common.summoning.meteor; import java.util.ArrayList; import java.util.List; + import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.oredict.OreDictionary; public class MeteorRegistry { + public static List paradigmList = new ArrayList<>(); public static void registerMeteorParadigm(MeteorParadigm paradigm) { @@ -35,8 +37,7 @@ public class MeteorRegistry { for (int i = 0; i < paradigmList.size(); i++) { ItemStack focusStack = paradigmList.get(i).focusStack; - if (focusStack != null - && focusStack.getItem() == stack.getItem() + if (focusStack != null && focusStack.getItem() == stack.getItem() && (focusStack.getItemDamage() == OreDictionary.WILDCARD_VALUE || focusStack.getItemDamage() == stack.getItemDamage())) { return i; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicCalcinator.java index f28cd820..31261b6c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicCalcinator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicCalcinator.java @@ -1,12 +1,5 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; @@ -18,7 +11,16 @@ import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import net.minecraftforge.common.util.Constants; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory { + protected ItemStack[] inv; protected ReagentContainer bufferTank = new ReagentContainer(Reagent.REAGENT_SIZE * 2); @@ -138,7 +140,16 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory if (worldObj.getWorldTime() % 4 == 0) { SpellHelper.sendIndexedParticleToAllAround( - worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); + worldObj, + xCoord, + yCoord, + zCoord, + 20, + worldObj.provider.dimensionId, + 1, + xCoord, + yCoord, + zCoord); } if (progress >= ticksPerReagent) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java index de2642b1..7b49e13f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java @@ -1,16 +1,7 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; -import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; -import WayofTime.alchemicalWizardry.common.NewPacketHandler; -import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.AltarUpgradeComponent; -import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -33,7 +24,19 @@ import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.fluids.IFluidTank; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; +import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; +import WayofTime.alchemicalWizardry.common.NewPacketHandler; +import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.AltarUpgradeComponent; +import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, IBloodAltar { + public static final int sizeInv = 1; private int resultID; @@ -91,10 +94,10 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I /** * - * @return Amount filled + * @return Amount filled */ public int fillMainTank(int amount) // TODO - { + { int filledAmount = Math.min(capacity - fluid.amount, amount); fluid.amount += filledAmount; @@ -131,15 +134,17 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I setMainFluid(fluid); } - FluidStack fluidOut = - new FluidStack(AlchemicalWizardry.lifeEssenceFluid, par1NBTTagCompound.getInteger("outputAmount")); + FluidStack fluidOut = new FluidStack( + AlchemicalWizardry.lifeEssenceFluid, + par1NBTTagCompound.getInteger("outputAmount")); if (fluidOut != null) { setOutputFluid(fluidOut); } - FluidStack fluidIn = - new FluidStack(AlchemicalWizardry.lifeEssenceFluid, par1NBTTagCompound.getInteger("inputAmount")); + FluidStack fluidIn = new FluidStack( + AlchemicalWizardry.lifeEssenceFluid, + par1NBTTagCompound.getInteger("inputAmount")); if (fluidIn != null) { setInputFluid(fluidIn); @@ -324,8 +329,14 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if (fluidInput == null) { fluidInput = new FluidStack(resource, Math.min(bufferCapacity, resource.amount)); if (tile != null) { - FluidEvent.fireEvent(new FluidEvent.FluidFillingEvent( - fluidInput, tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, this)); + FluidEvent.fireEvent( + new FluidEvent.FluidFillingEvent( + fluidInput, + tile.getWorldObj(), + tile.xCoord, + tile.yCoord, + tile.zCoord, + this)); } return fluidInput.amount; @@ -345,8 +356,14 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I } if (tile != null) { - FluidEvent.fireEvent(new FluidEvent.FluidFillingEvent( - fluidInput, tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, this)); + FluidEvent.fireEvent( + new FluidEvent.FluidFillingEvent( + fluidInput, + tile.getWorldObj(), + tile.xCoord, + tile.yCoord, + tile.zCoord, + this)); } return filled; @@ -374,8 +391,14 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I } if (this != null) { - FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent( - fluidOutput, this.worldObj, this.xCoord, this.yCoord, this.zCoord, this)); + FluidEvent.fireEvent( + new FluidEvent.FluidDrainingEvent( + fluidOutput, + this.worldObj, + this.xCoord, + this.yCoord, + this.zCoord, + this)); } } @@ -397,7 +420,16 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if (this.hasDemonBlood() && !worldObj.isRemote) { SpellHelper.sendIndexedParticleToAllAround( - worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); + worldObj, + xCoord, + yCoord, + zCoord, + 20, + worldObj.provider.dimensionId, + 1, + xCoord, + yCoord, + zCoord); } if (this.lockdownDuration > 0) { @@ -425,8 +457,8 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I } if (AlchemicalWizardry.lockdownAltar) { - List list = - SpellHelper.getPlayersInRange(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, 15, 15); + List list = SpellHelper + .getPlayersInRange(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, 15, 15); for (EntityPlayer player : list) { PotionEffect regenEffect = player.getActivePotionEffect(Potion.regeneration); if (regenEffect != null && regenEffect.getAmplifier() >= 2) { @@ -435,26 +467,26 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I } } - // if (AlchemicalWizardry.causeHungerWithRegen) - // { - // List list = SpellHelper.getPlayersInRange(worldObj, xCoord + 0.5, yCoord + + // if (AlchemicalWizardry.causeHungerWithRegen) + // { + // List list = SpellHelper.getPlayersInRange(worldObj, xCoord + 0.5, yCoord + // 0.5, zCoord + 0.5, 15, 15); - // for (EntityPlayer player : list) - // { - // PotionEffect regenEffect = player.getActivePotionEffect(Potion.regeneration); - // if (regenEffect != null && regenEffect.getAmplifier() > 0) - // { - // if(AlchemicalWizardry.causeHungerChatMessage && + // for (EntityPlayer player : list) + // { + // PotionEffect regenEffect = player.getActivePotionEffect(Potion.regeneration); + // if (regenEffect != null && regenEffect.getAmplifier() > 0) + // { + // if(AlchemicalWizardry.causeHungerChatMessage && // !player.isPotionActive(Potion.hunger.id)) - // { - // player.addChatComponentMessage(new + // { + // player.addChatComponentMessage(new // ChatComponentText(StatCollector.translateToLocal("message.altar.hunger"))); - // } - // player.addPotionEffect(new PotionEffect(Potion.hunger.id, 40, + // } + // player.addPotionEffect(new PotionEffect(Potion.hunger.id, 40, // regenEffect.getAmplifier() * 2 - 2)); - // } - // } - // } + // } + // } + // } } if (worldObj.getWorldTime() % Math.max(20 - this.accelerationUpgrades, 1) == 0) { @@ -588,7 +620,9 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I fluid.amount); int drain = SoulNetworkHandler.addCurrentEssenceToMaximum( - ownerName, liquidDrained, (int) (item.getMaxEssence() * this.orbCapacityMultiplier)); + ownerName, + liquidDrained, + (int) (item.getMaxEssence() * this.orbCapacityMultiplier)); fluid.amount = fluid.amount - drain; @@ -646,8 +680,10 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if (intData.length == 3) { for (int i = 0; i < 1; i++) { if (intData[i * 3 + 2] != 0) { - ItemStack is = - new ItemStack(Item.getItemById(intData[i * 3]), intData[i * 3 + 2], intData[i * 3 + 1]); + ItemStack is = new ItemStack( + Item.getItemById(intData[i * 3]), + intData[i * 3 + 2], + intData[i * 3 + 1]); inv[i] = is; } else { inv[i] = null; @@ -831,7 +867,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I public FluidTankInfo[] getTankInfo(ForgeDirection from) { FluidTank compositeTank = new FluidTank(capacity); compositeTank.setFluid(fluid); - return new FluidTankInfo[] {compositeTank.getInfo()}; + return new FluidTankInfo[] { compositeTank.getInfo() }; } public int[] buildFluidList() { @@ -867,9 +903,10 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I public void sendChatInfoToPlayer(EntityPlayer player) { player.addChatMessage( new ChatComponentTranslation(String.format("message.altar.currentessence"), this.fluid.amount)); - player.addChatMessage(new ChatComponentTranslation( - String.format("message.altar.currenttier"), - UpgradedAltars.isAltarValid(worldObj, xCoord, yCoord, zCoord))); + player.addChatMessage( + new ChatComponentTranslation( + String.format("message.altar.currenttier"), + UpgradedAltars.isAltarValid(worldObj, xCoord, yCoord, zCoord))); player.addChatMessage( new ChatComponentTranslation(String.format("message.altar.capacity"), this.getCapacity())); } @@ -877,10 +914,18 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I public void sendMoreChatInfoToPlayer(EntityPlayer player) { if (getStackInSlot(0) != null) { int stackSize = getStackInSlot(0).stackSize; - player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.altar.progress") + " " - + progress + "LP/" + liquidRequired * stackSize + "LP")); - player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.altar.consumptionrate") - + " " + (int) (consumptionRate * (1 + consumptionMultiplier)) + "LP/t")); + player.addChatMessage( + new ChatComponentText( + StatCollector.translateToLocal("message.altar.progress") + " " + + progress + + "LP/" + + liquidRequired * stackSize + + "LP")); + player.addChatMessage( + new ChatComponentText( + StatCollector.translateToLocal("message.altar.consumptionrate") + " " + + (int) (consumptionRate * (1 + consumptionMultiplier)) + + "LP/t")); } player.addChatMessage( new ChatComponentTranslation(String.format("message.altar.currentessence"), this.fluid.amount)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java index 87f460ad..7f870d0c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java @@ -1,9 +1,5 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import net.minecraft.block.Block; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; @@ -11,7 +7,13 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraftforge.common.util.Constants; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; + public class TEBellJar extends TEReagentConduit { + public TEBellJar() { super(1, 16000); this.maxConnextions = 1; @@ -30,8 +32,7 @@ public class TEBellJar extends TEReagentConduit { } public static ReagentContainerInfo[] getContainerInfoFromItem(ItemStack stack) { - if (stack != null - && stack.getItem() instanceof ItemBlock + if (stack != null && stack.getItem() instanceof ItemBlock && ModBlocks.blockCrystalBelljar == ((ItemBlock) stack.getItem()).field_150939_a) { NBTTagCompound tag = stack.getTagCompound(); if (tag != null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java index e07ef6e1..79e59138 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java @@ -1,9 +1,11 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; import net.minecraft.nbt.NBTTagCompound; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; + public class TEConduit extends TESpellBlock { + @Override public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java index 6285b2a5..5f7b4f48 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java @@ -1,10 +1,8 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.api.sacrifice.IIncense; -import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.List; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -16,7 +14,12 @@ import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; +import WayofTime.alchemicalWizardry.api.sacrifice.IIncense; +import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class TECrucible extends TEInventory { + private int radius = 5; public float rColour; @@ -28,8 +31,8 @@ public class TECrucible extends TEInventory { public int maxValue = 0; public float incrementValue = 0; - public int state = - 0; // 0 is when it gives off gray particles, 1 is when it gives off white particles (player can't use this + public int state = 0; // 0 is when it gives off gray particles, 1 is when it gives off white particles (player can't + // use this // incense anymore), 2 is the normal colour of the incense, 3 means no particles (it is out) public TECrucible() { @@ -74,8 +77,8 @@ public class TECrucible extends TEInventory { } if (ticksRemaining > 0) { - List playerList = - SpellHelper.getPlayersInRange(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, radius, radius); + List playerList = SpellHelper + .getPlayersInRange(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, radius, radius); if (playerList != null && !playerList.isEmpty()) { boolean allAreGood = true; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java index 63b15429..52f45d12 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java @@ -1,14 +1,16 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.common.spell.simple.HomSpell; -import WayofTime.alchemicalWizardry.common.spell.simple.HomSpellRegistry; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntitySkull; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.spell.simple.HomSpell; +import WayofTime.alchemicalWizardry.common.spell.simple.HomSpellRegistry; + public class TEHomHeart extends TileEntity { + public boolean canCastSpell(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEInventory.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEInventory.java index d61fe96a..4c17a1b8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEInventory.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEInventory.java @@ -14,6 +14,7 @@ import net.minecraftforge.common.util.Constants; * @author ljfa-ag */ public abstract class TEInventory extends TileEntity implements IInventory { + protected ItemStack[] inv; public TEInventory(int size) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java index d36129fe..cbf38bf8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java @@ -1,22 +1,9 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; -import WayofTime.alchemicalWizardry.api.event.RitualActivatedEvent; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage; -import WayofTime.alchemicalWizardry.api.rituals.RitualBreakMethod; -import WayofTime.alchemicalWizardry.api.rituals.Rituals; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.common.eventhandler.Event; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -32,7 +19,23 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.Constants; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; +import WayofTime.alchemicalWizardry.api.event.RitualActivatedEvent; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage; +import WayofTime.alchemicalWizardry.api.rituals.RitualBreakMethod; +import WayofTime.alchemicalWizardry.api.rituals.Rituals; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.common.eventhandler.Event; + public class TEMasterStone extends TileEntity implements IMasterRitualStone { + private String currentRitualString; private boolean isActive; private String owner; @@ -51,9 +54,8 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone { protected Map attunedTankMap; public TEMasterStone() { - tanks = new ReagentContainer[] { - new ReagentContainer(1000), new ReagentContainer(1000), new ReagentContainer(1000) - }; + tanks = new ReagentContainer[] { new ReagentContainer(1000), new ReagentContainer(1000), + new ReagentContainer(1000) }; this.attunedTankMap = new HashMap(); isActive = false; @@ -192,8 +194,8 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone { } } - public void activateRitual( - World world, int crystalLevel, ItemStack activationCrystal, EntityPlayer player, String crystalOwner) { + public void activateRitual(World world, int crystalLevel, ItemStack activationCrystal, EntityPlayer player, + String crystalOwner) { if (world.isRemote) { return; } @@ -206,8 +208,13 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone { } // TODO - RitualActivatedEvent event = - new RitualActivatedEvent(this, crystalOwner, testRitual, player, activationCrystal, crystalLevel); + RitualActivatedEvent event = new RitualActivatedEvent( + this, + crystalOwner, + testRitual, + player, + activationCrystal, + crystalLevel); if (MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Event.Result.DENY) { player.addChatMessage(new ChatComponentTranslation("message.masterstone.somethingstoppedyou")); @@ -240,8 +247,8 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone { return; } else { - int drain = - SoulNetworkHandler.syphonFromNetwork(eventOwnerKey, Rituals.getCostForActivation(testRitual)); + int drain = SoulNetworkHandler + .syphonFromNetwork(eventOwnerKey, Rituals.getCostForActivation(testRitual)); if (drain > 0) { player.addChatMessage(new ChatComponentTranslation("message.masterstone.energyflows")); @@ -313,10 +320,19 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone { } if (worldTime % 100 == 0) { - boolean testRunes = Rituals.checkDirectionOfRitualValid( - worldObj, xCoord, yCoord, zCoord, currentRitualString, direction); + boolean testRunes = Rituals + .checkDirectionOfRitualValid(worldObj, xCoord, yCoord, zCoord, currentRitualString, direction); SpellHelper.sendIndexedParticleToAllAround( - worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); + worldObj, + xCoord, + yCoord, + zCoord, + 20, + worldObj.provider.dimensionId, + 1, + xCoord, + yCoord, + zCoord); if (!testRunes) { Rituals.onRitualBroken(this, currentRitualString, RitualBreakMethod.BREAK_STONE); @@ -454,8 +470,8 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone { ReagentStack remainingStack = resource.copy(); remainingStack.amount = maxFill - totalFill; - boolean doesReagentMatch = - tanks[i].getReagent() != null && tanks[i].getReagent().isReagentEqual(remainingStack); + boolean doesReagentMatch = tanks[i].getReagent() != null + && tanks[i].getReagent().isReagentEqual(remainingStack); if (doesReagentMatch) { totalFill += tanks[i].fill(remainingStack, doFill); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java index 58ec13ed..7fdd907b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java @@ -1,10 +1,5 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; -import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.item.ItemBlock; @@ -18,7 +13,14 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; +import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; + public class TEMimicBlock extends TileEntity { + private ItemStack[] inv; public Reagent reagent; @@ -91,8 +93,8 @@ public class TEMimicBlock extends TileEntity { } } - public static boolean createMimicBlockAtLocation( - World world, int x, int y, int z, int duration, Block block, int meta, Reagent reagent) { + public static boolean createMimicBlockAtLocation(World world, int x, int y, int z, int duration, Block block, + int meta, Reagent reagent) { if (block == null) { return false; } @@ -115,8 +117,8 @@ public class TEMimicBlock extends TileEntity { if (tileEntity instanceof TEMimicBlock) { if (((TEMimicBlock) tileEntity).getBlock() == block && ((TEMimicBlock) tileEntity).getMetaOfMimic() == meta) { - ((TEMimicBlock) tileEntity).ticksRemaining = - Math.max(duration, ((TEMimicBlock) tileEntity).ticksRemaining); + ((TEMimicBlock) tileEntity).ticksRemaining = Math + .max(duration, ((TEMimicBlock) tileEntity).ticksRemaining); } } } @@ -124,8 +126,8 @@ public class TEMimicBlock extends TileEntity { return false; } - public static boolean createMimicBlockAtLocation( - World world, int x, int y, int z, int duration, Block block, int meta) { + public static boolean createMimicBlockAtLocation(World world, int x, int y, int z, int duration, Block block, + int meta) { return createMimicBlockAtLocation(world, x, y, z, duration, block, meta); } @@ -144,21 +146,21 @@ public class TEMimicBlock extends TileEntity { } public void returnContainedBlock() { - // ItemStack item = this.inv[0]; - // if (item != null) - // { - // if (item.getItem() instanceof ItemBlock) - // { - // Block block = ((ItemBlock) item.getItem()).field_150939_a; - // int meta = item.getItemDamage(); + // ItemStack item = this.inv[0]; + // if (item != null) + // { + // if (item.getItem() instanceof ItemBlock) + // { + // Block block = ((ItemBlock) item.getItem()).field_150939_a; + // int meta = item.getItemDamage(); // - // if (block != null) - // { - // this.worldObj.setBlock(xCoord, yCoord, zCoord, block, meta, 6); - // } - // } + // if (block != null) + // { + // this.worldObj.setBlock(xCoord, yCoord, zCoord, block, meta, 6); + // } + // } // - // } else + // } else { this.worldObj.setBlockToAir(xCoord, yCoord, zCoord); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEOrientable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEOrientable.java index c32dd432..a6d1ede2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEOrientable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEOrientable.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.common.NewPacketHandler; -import WayofTime.alchemicalWizardry.common.block.IOrientable; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.common.NewPacketHandler; +import WayofTime.alchemicalWizardry.common.block.IOrientable; + public class TEOrientable extends TileEntity implements IOrientable { + protected ForgeDirection inputFace; protected ForgeDirection outputFace; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java index 779c3a20..ccb41de7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java @@ -1,14 +1,16 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.common.NewPacketHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.Packet; +import WayofTime.alchemicalWizardry.common.NewPacketHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class TEPedestal extends TEInventory { + public static final int sizeInv = 1; private int resultID; @@ -78,8 +80,10 @@ public class TEPedestal extends TEInventory { if (intData.length == 3) { for (int i = 0; i < 1; i++) { if (intData[i * 3 + 2] != 0) { - ItemStack is = - new ItemStack(Item.getItemById(intData[i * 3]), intData[i * 3 + 2], intData[i * 3 + 1]); + ItemStack is = new ItemStack( + Item.getItemById(intData[i * 3]), + intData[i * 3 + 2], + intData[i * 3 + 1]); inv[i] = is; } else { inv[i] = null; @@ -118,7 +122,16 @@ public class TEPedestal extends TEInventory { for (int i = 0; i < 16; i++) { SpellHelper.sendIndexedParticleToAllAround( - worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 2, xCoord, yCoord, zCoord); + worldObj, + xCoord, + yCoord, + zCoord, + 20, + worldObj.provider.dimensionId, + 2, + xCoord, + yCoord, + zCoord); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java index b6332140..4177df6d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java @@ -1,13 +1,8 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; -import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistryComponent; -import WayofTime.alchemicalWizardry.common.IDemon; -import WayofTime.alchemicalWizardry.common.NewPacketHandler; -import WayofTime.alchemicalWizardry.common.PlinthComponent; -import WayofTime.alchemicalWizardry.common.items.EnergyBattery; import java.util.ArrayList; import java.util.List; + import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; @@ -19,7 +14,15 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.Constants; import net.minecraftforge.oredict.OreDictionary; +import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; +import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistryComponent; +import WayofTime.alchemicalWizardry.common.IDemon; +import WayofTime.alchemicalWizardry.common.NewPacketHandler; +import WayofTime.alchemicalWizardry.common.PlinthComponent; +import WayofTime.alchemicalWizardry.common.items.EnergyBattery; + public class TEPlinth extends TEInventory { + public static final int sizeInv = 1; private boolean isActive; @@ -175,21 +178,21 @@ public class TEPlinth extends TEInventory { composeItemsForRingAndParadigm(1, false), composeItemsForRingAndParadigm(2, false), composeItemsForRingAndParadigm(3, false))) { - SummoningRegistryComponent src = SummoningRegistry.getRegistryComponent( - bloodOrbLevel, - composeItemsForRingAndParadigm(1, false), - composeItemsForRingAndParadigm(2, false), - composeItemsForRingAndParadigm(3, false)); - isActive = true; - paradigm = false; - progress = 0; - ring1Inv = src.getRingRecipeForRing(1); - ring2Inv = src.getRingRecipeForRing(2); - ring3Inv = src.getRingRecipeForRing(3); - } else { - isActive = false; - progress = 0; - } + SummoningRegistryComponent src = SummoningRegistry.getRegistryComponent( + bloodOrbLevel, + composeItemsForRingAndParadigm(1, false), + composeItemsForRingAndParadigm(2, false), + composeItemsForRingAndParadigm(3, false)); + isActive = true; + paradigm = false; + progress = 0; + ring1Inv = src.getRingRecipeForRing(1); + ring2Inv = src.getRingRecipeForRing(2); + ring3Inv = src.getRingRecipeForRing(3); + } else { + isActive = false; + progress = 0; + } } } else { if (getStackInSlot(0) != null && getStackInSlot(0).getItem() instanceof EnergyBattery) { @@ -228,8 +231,8 @@ public class TEPlinth extends TEInventory { if (progress >= progressInterval * 18) { int bloodOrbLevel = ((EnergyBattery) getStackInSlot(0).getItem()).getOrbLevel(); - EntityLivingBase entity = - SummoningRegistry.getEntity(worldObj, bloodOrbLevel, ring1Inv, ring2Inv, ring3Inv); + EntityLivingBase entity = SummoningRegistry + .getEntity(worldObj, bloodOrbLevel, ring1Inv, ring2Inv, ring3Inv); if (entity != null) { entity.setPosition(xCoord + 0.5, yCoord + 1, zCoord + 0.5); @@ -259,8 +262,8 @@ public class TEPlinth extends TEInventory { for (PlinthComponent pc : pedestalPositions) { if (i < 6 && pc.getRing() == ring) { - TileEntity tileEntity = - worldObj.getTileEntity(xCoord + pc.xOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); + TileEntity tileEntity = worldObj + .getTileEntity(xCoord + pc.xOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); if (tileEntity instanceof TEPedestal) { ((TEPedestal) tileEntity).setInventorySlotContents(0, null); @@ -274,8 +277,8 @@ public class TEPlinth extends TEInventory { for (PlinthComponent pc : pedestalPositions) { if (i < 6 && pc.getRing() == ring) { - TileEntity tileEntity = - worldObj.getTileEntity(xCoord + pc.zOffset, yCoord + pc.yOffset, zCoord + pc.xOffset); + TileEntity tileEntity = worldObj + .getTileEntity(xCoord + pc.zOffset, yCoord + pc.yOffset, zCoord + pc.xOffset); if (tileEntity instanceof TEPedestal) { ((TEPedestal) tileEntity).setInventorySlotContents(0, null); @@ -297,8 +300,8 @@ public class TEPlinth extends TEInventory { for (PlinthComponent pc : pedestalPositions) { if (i < 6 && pc.getRing() == ring) { - TileEntity tileEntity = - worldObj.getTileEntity(xCoord + pc.xOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); + TileEntity tileEntity = worldObj + .getTileEntity(xCoord + pc.xOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); if (tileEntity instanceof TEPedestal) { ItemStack possibleItem = ((TEPedestal) tileEntity).getStackInSlot(0); @@ -329,7 +332,9 @@ public class TEPlinth extends TEInventory { } ((TEPedestal) tileEntity).onItemDeletion(); worldObj.markBlockForUpdate( - xCoord + pc.xOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); + xCoord + pc.xOffset, + yCoord + pc.yOffset, + zCoord + pc.zOffset); return true; } } @@ -343,8 +348,8 @@ public class TEPlinth extends TEInventory { for (PlinthComponent pc : pedestalPositions) { if (i < 6 && pc.getRing() == ring) { - TileEntity tileEntity = - worldObj.getTileEntity(xCoord + pc.zOffset, yCoord + pc.yOffset, zCoord + pc.xOffset); + TileEntity tileEntity = worldObj + .getTileEntity(xCoord + pc.zOffset, yCoord + pc.yOffset, zCoord + pc.xOffset); if (tileEntity instanceof TEPedestal) { ItemStack possibleItem = ((TEPedestal) tileEntity).getStackInSlot(0); @@ -371,7 +376,9 @@ public class TEPlinth extends TEInventory { ((TEPedestal) tileEntity).decrStackSize(0, 1); ((TEPedestal) tileEntity).onItemDeletion(); worldObj.markBlockForUpdate( - xCoord + pc.zOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); + xCoord + pc.zOffset, + yCoord + pc.yOffset, + zCoord + pc.zOffset); return true; } } @@ -393,8 +400,8 @@ public class TEPlinth extends TEInventory { for (PlinthComponent pc : pedestalPositions) { if (i < 6 && pc.getRing() == ring) { - TileEntity tileEntity = - worldObj.getTileEntity(xCoord + pc.xOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); + TileEntity tileEntity = worldObj + .getTileEntity(xCoord + pc.xOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); if (tileEntity instanceof TEPedestal) { composed[i] = ((TEPedestal) tileEntity).getStackInSlot(0); @@ -407,8 +414,8 @@ public class TEPlinth extends TEInventory { for (PlinthComponent pc : pedestalPositions) { if (i < 6 && pc.getRing() == ring) { - TileEntity tileEntity = - worldObj.getTileEntity(xCoord + pc.zOffset, yCoord + pc.yOffset, zCoord + pc.xOffset); + TileEntity tileEntity = worldObj + .getTileEntity(xCoord + pc.zOffset, yCoord + pc.yOffset, zCoord + pc.xOffset); if (tileEntity instanceof TEPedestal) { composed[i] = ((TEPedestal) tileEntity).getStackInSlot(0); @@ -442,8 +449,10 @@ public class TEPlinth extends TEInventory { if (intData.length == 3) { for (int i = 0; i < 1; i++) { if (intData[i * 3 + 2] != 0) { - ItemStack is = - new ItemStack(Item.getItemById(intData[i * 3]), intData[i * 3 + 2], intData[i * 3 + 1]); + ItemStack is = new ItemStack( + Item.getItemById(intData[i * 3]), + intData[i * 3 + 2], + intData[i * 3 + 1]); inv[i] = is; } else { inv[i] = null; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java index af89a600..0daf8ebc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java @@ -1,17 +1,11 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.api.ColourAndCoords; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.api.alchemy.energy.*; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityParticleBeam; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Map.Entry; + import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; @@ -24,7 +18,16 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.ColourAndCoords; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.api.alchemy.energy.*; +import WayofTime.alchemicalWizardry.common.entity.projectile.EntityParticleBeam; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class TEReagentConduit extends TileSegmentedReagentHandler { + public List destinationList; // These are offsets public Map> reagentTargetList; public Map reagentTankDesignationList; @@ -281,8 +284,8 @@ public class TEReagentConduit extends TileSegmentedReagentHandler { amountLeft -= amount; totalTransfered += amount; - ReagentStack stack = - this.drain(ForgeDirection.UNKNOWN, new ReagentStack(entry.getKey(), amount), true); + ReagentStack stack = this + .drain(ForgeDirection.UNKNOWN, new ReagentStack(entry.getKey(), amount), true); ((IReagentHandler) tile).fill(ForgeDirection.UNKNOWN, stack, true); } } @@ -311,8 +314,9 @@ public class TEReagentConduit extends TileSegmentedReagentHandler { if (SpellHelper.canPlayerSeeAlchemy(player)) { for (ColourAndCoords colourSet : this.destinationList) { if (!(worldObj.getTileEntity( - xCoord + colourSet.xCoord, yCoord + colourSet.yCoord, zCoord + colourSet.zCoord) - instanceof IReagentHandler)) { + xCoord + colourSet.xCoord, + yCoord + colourSet.yCoord, + zCoord + colourSet.zCoord) instanceof IReagentHandler)) { continue; } EntityParticleBeam beam = new EntityParticleBeam(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5); @@ -357,14 +361,15 @@ public class TEReagentConduit extends TileSegmentedReagentHandler { if (coord == null) { continue; } - list.add(new ColourAndCoords( - reagent.getColourRed(), - reagent.getColourGreen(), - reagent.getColourBlue(), - reagent.getColourIntensity(), - coord.xCoord, - coord.yCoord, - coord.zCoord)); + list.add( + new ColourAndCoords( + reagent.getColourRed(), + reagent.getColourGreen(), + reagent.getColourBlue(), + reagent.getColourIntensity(), + coord.xCoord, + coord.yCoord, + coord.zCoord)); } } } @@ -372,8 +377,8 @@ public class TEReagentConduit extends TileSegmentedReagentHandler { return list; } - public boolean addDestinationViaOffset( - int red, int green, int blue, int intensity, int xOffset, int yOffset, int zOffset) { + public boolean addDestinationViaOffset(int red, int green, int blue, int intensity, int xOffset, int yOffset, + int zOffset) { if (xOffset == 0 && yOffset == 0 && zOffset == 0) { return false; } @@ -385,7 +390,13 @@ public class TEReagentConduit extends TileSegmentedReagentHandler { public boolean addDestinationViaActual(int red, int green, int blue, int intensity, int x, int y, int z) { return this.addDestinationViaOffset( - red, green, blue, intensity, x - this.xCoord, y - this.yCoord, z - this.zCoord); + red, + green, + blue, + intensity, + x - this.xCoord, + y - this.yCoord, + z - this.zCoord); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java index 81798cc4..7e2f6f03 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java @@ -1,19 +1,23 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.common.demonVillage.BuildingSchematic; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; import java.io.FileWriter; import java.io.IOException; import java.io.Writer; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.common.demonVillage.BuildingSchematic; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + public class TESchematicSaver extends TileEntity { + public Block targetBlock = ModBlocks.largeBloodStoneBrick; public void rightClickBlock(EntityPlayer player, int side) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java index 3fd149c4..c763801b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.NewPacketHandler; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.Packet; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.common.NewPacketHandler; + public class TESocket extends TEInventory { + public static final int sizeInv = 1; private int resultID; @@ -77,8 +79,10 @@ public class TESocket extends TEInventory { if (intData.length == 3) { for (int i = 0; i < 1; i++) { if (intData[i * 3 + 2] != 0) { - ItemStack is = - new ItemStack(Item.getItemById(intData[i * 3]), intData[i * 3 + 2], intData[i * 3 + 1]); + ItemStack is = new ItemStack( + Item.getItemById(intData[i * 3]), + intData[i * 3 + 2], + intData[i * 3 + 1]); inv[i] = is; } else { inv[i] = null; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java index b4d656b1..cbeb16f4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.ModBlocks; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.ModBlocks; + public class TESpectralBlock extends TileEntity { + private int ticksRemaining; public TESpectralBlock() { @@ -30,9 +32,9 @@ public class TESpectralBlock extends TileEntity { public void updateEntity() { super.updateEntity(); - // if (worldObj.isRemote) + // if (worldObj.isRemote) { - // return; + // return; } this.ticksRemaining--; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralContainer.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralContainer.java index 2943948e..c4c0c479 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralContainer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralContainer.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.ModBlocks; import net.minecraft.block.Block; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; @@ -11,7 +10,10 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; import net.minecraftforge.fluids.IFluidBlock; +import WayofTime.alchemicalWizardry.ModBlocks; + public class TESpectralContainer extends TileEntity { + private ItemStack[] inv; private int ticksRemaining; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java index 5bdf4157..f7fe7060 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -import WayofTime.alchemicalWizardry.api.tile.ISpellTile; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; +import WayofTime.alchemicalWizardry.api.tile.ISpellTile; + public abstract class TESpellBlock extends TEOrientable implements ISpellTile { + @Override public void modifySpellParadigm(SpellParadigm parad) { this.applySpellChange(parad); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java index 79064432..968f0f34 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java @@ -5,6 +5,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellEffect; import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; public class TESpellEffectBlock extends TESpellBlock { + @Override protected void applySpellChange(SpellParadigm parad) { parad.addBufferedEffect(this.getSpellEffect()); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java index 2e7ec04e..39448f3c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java @@ -7,6 +7,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellEnhancementPower; import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; public class TESpellEnhancementBlock extends TESpellBlock { + @Override protected void applySpellChange(SpellParadigm parad) { int i = -1; @@ -93,7 +94,7 @@ public class TESpellEnhancementBlock extends TESpellBlock { } public int enhancementType() // 0 is power, 1 is cost, 2 is potency - { + { int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); switch (meta) { case 0: diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java index 94951752..12c7df08 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java @@ -4,6 +4,7 @@ import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; public class TESpellModifierBlock extends TESpellBlock { + @Override protected void applySpellChange(SpellParadigm parad) { parad.modifyBufferedEffect(this.getSpellModifier()); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java index 961bbbe3..0f422a90 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java @@ -1,17 +1,19 @@ package WayofTime.alchemicalWizardry.common.tileEntity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf; import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; import WayofTime.alchemicalWizardry.api.tile.ISpellParadigmTile; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; public class TESpellParadigmBlock extends TESpellBlock implements ISpellParadigmTile { + public SpellParadigm getSpellParadigm() { int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); switch (meta) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java index c2254f03..0f55ea43 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java @@ -1,13 +1,8 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.NewPacketHandler; -import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import java.util.Iterator; import java.util.List; + import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -16,7 +11,15 @@ import net.minecraft.network.Packet; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.NewPacketHandler; +import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class TETeleposer extends TEInventory { + public static final int sizeInv = 1; private int resultID; @@ -83,27 +86,24 @@ public class TETeleposer extends TEInventory { int yf = focusItem.yCoord(focus); int zf = focusItem.zCoord(focus); World worldF = focusItem.getWorld(focus); - int damage = (int) (0.5f - * Math.sqrt((xCoord - xf) * (xCoord - xf) - + (yCoord - yf + 1) * (yCoord - yf + 1) + int damage = (int) (0.5f * Math.sqrt( + (xCoord - xf) * (xCoord - xf) + (yCoord - yf + 1) * (yCoord - yf + 1) + (zCoord - zf) * (zCoord - zf))); int focusLevel = focusItem.getFocusLevel(); int transportCount = 0; int entityCount = 0; - if (worldF != null - && worldF.getTileEntity(xf, yf, zf) instanceof TETeleposer + if (worldF != null && worldF.getTileEntity(xf, yf, zf) instanceof TETeleposer && !worldF.getTileEntity(xf, yf, zf).equals(this)) { // Prime the teleportation int d0 = focusLevel - 1; AxisAlignedBB axisalignedbb1 = AxisAlignedBB.getBoundingBox( - (double) this.xCoord - 0.5, - (double) this.yCoord + d0 + 0.5, - (double) this.zCoord - 0.5, - (double) (this.xCoord + 0.5), - (double) (this.yCoord + 1.5 + d0), - (double) (this.zCoord + 0.5)) - .expand(d0, d0, d0); + (double) this.xCoord - 0.5, + (double) this.yCoord + d0 + 0.5, + (double) this.zCoord - 0.5, + (double) (this.xCoord + 0.5), + (double) (this.yCoord + 1.5 + d0), + (double) (this.zCoord + 0.5)).expand(d0, d0, d0); axisalignedbb1.maxY = Math.min((double) this.worldObj.getHeight(), this.yCoord + 2 + d0 + d0); List list1 = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb1); Iterator iterator1 = list1.iterator(); @@ -114,8 +114,8 @@ public class TETeleposer extends TEInventory { entityCount++; } - AxisAlignedBB axisalignedbb2 = AxisAlignedBB.getBoundingBox( - xf - 0.5, yf + d0 + 0.5, zf - 0.5, xf + 0.5, yf + 1.5 + d0, zf + 0.5) + AxisAlignedBB axisalignedbb2 = AxisAlignedBB + .getBoundingBox(xf - 0.5, yf + d0 + 0.5, zf - 0.5, xf + 0.5, yf + 1.5 + d0, zf + 0.5) .expand(d0, d0, d0); List list2 = worldF.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb2); Iterator iterator2 = list2.iterator(); @@ -192,8 +192,8 @@ public class TETeleposer extends TEInventory { entityplayer1.posY - this.yCoord + yf, entityplayer1.posZ - this.zCoord + zf, entityplayer1); - // entityplayer1.worldObj = worldF; - // entityplayer1.setPositionAndUpdate(entityplayer1.posX + // entityplayer1.worldObj = worldF; + // entityplayer1.setPositionAndUpdate(entityplayer1.posX // - this.xCoord + xf, entityplayer1.posY - this.yCoord + yf, entityplayer1.posZ - // this.zCoord + zf); } @@ -207,8 +207,8 @@ public class TETeleposer extends TEInventory { entityplayer2.posY + this.yCoord - yf, entityplayer2.posZ + this.zCoord - zf, entityplayer2); - // entityplayer2.worldObj = worldF; - // entityplayer2.setPositionAndUpdate(entityplayer2.posX + // entityplayer2.worldObj = worldF; + // entityplayer2.setPositionAndUpdate(entityplayer2.posX // + this.xCoord - xf, entityplayer2.posY + this.yCoord - yf, entityplayer2.posZ + // this.zCoord - zf); } @@ -242,8 +242,10 @@ public class TETeleposer extends TEInventory { if (intData.length == 3) { for (int i = 0; i < 1; i++) { if (intData[i * 3 + 2] != 0) { - ItemStack is = - new ItemStack(Item.getItemById(intData[i * 3]), intData[i * 3 + 2], intData[i * 3 + 1]); + ItemStack is = new ItemStack( + Item.getItemById(intData[i * 3]), + intData[i * 3 + 2], + intData[i * 3 + 1]); inv[i] = is; } else { inv[i] = null; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java index 3a95d79f..af4a0d65 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java @@ -1,5 +1,13 @@ package WayofTime.alchemicalWizardry.common.tileEntity; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.oredict.OreDictionary; + import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe; @@ -14,15 +22,9 @@ import WayofTime.alchemicalWizardry.common.alchemy.CombinedPotionRegistry; import WayofTime.alchemicalWizardry.common.alchemy.ICombinationalCatalyst; import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.oredict.OreDictionary; public class TEWritingTable extends TEInventory implements ISidedInventory { + public static final int sizeInv = 7; private int progress; @@ -83,8 +85,10 @@ public class TEWritingTable extends TEInventory implements ISidedInventory { if (intData.length == 3 * 7) { for (int i = 0; i < 7; i++) { if (intData[i * 3 + 2] != 0) { - ItemStack is = - new ItemStack(Item.getItemById(intData[i * 3]), intData[i * 3 + 2], intData[i * 3 + 1]); + ItemStack is = new ItemStack( + Item.getItemById(intData[i * 3]), + intData[i * 3 + 2], + intData[i * 3 + 1]); inv[i] = is; } else { inv[i] = null; @@ -142,8 +146,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory { public int getPotionFlaskPosition() { for (int i = 1; i <= 5; i++) { - if (inv[i] != null - && !(inv[i].getItem() instanceof ItemBlock) + if (inv[i] != null && !(inv[i].getItem() instanceof ItemBlock) && inv[i].getItem() == ModItems.alchemyFlask) { return i; } @@ -357,11 +360,11 @@ public class TEWritingTable extends TEInventory implements ISidedInventory { return; } - int potionEffectNumber = - ((AlchemyFlask) flaskStack.getItem()).getNumberOfPotionEffects(flaskStack); + int potionEffectNumber = ((AlchemyFlask) flaskStack.getItem()) + .getNumberOfPotionEffects(flaskStack); int potionID = AlchemicalPotionCreationHandler.getPotionIDForStack(ingredientStack); - int tickDuration = - AlchemicalPotionCreationHandler.getPotionTickDurationForStack(ingredientStack); + int tickDuration = AlchemicalPotionCreationHandler + .getPotionTickDurationForStack(ingredientStack); float successChance = ((IBindingAgent) agentStack.getItem()) .getSuccessRateForPotionNumber(potionEffectNumber); if (potionID == -1) { @@ -466,8 +469,8 @@ public class TEWritingTable extends TEInventory implements ISidedInventory { return; } int potionEffects = ((AlchemyFlask) flaskStack.getItem()).getNumberOfPotionEffects(flaskStack); - int potionFillAmount = - ((IFillingAgent) fillingAgent.getItem()).getFilledAmountForPotionNumber(potionEffects); + int potionFillAmount = ((IFillingAgent) fillingAgent.getItem()) + .getFilledAmountForPotionNumber(potionEffects); flaskStack.setItemDamage(Math.max(0, flaskStack.getItemDamage() - potionFillAmount)); this.setInventorySlotContents(6, flaskStack); this.decrStackSize(this.getPotionFlaskPosition(), 1); @@ -545,8 +548,8 @@ public class TEWritingTable extends TEInventory implements ISidedInventory { int acceleration = this.getSpeedIncrease(); if (getStackInSlot(6) == null) { - if (!SoulNetworkHandler.syphonFromNetworkWhileInContainer( - getStackInSlot(0), amountUsed * acceleration)) { + if (!SoulNetworkHandler + .syphonFromNetworkWhileInContainer(getStackInSlot(0), amountUsed * acceleration)) { return; } @@ -585,52 +588,53 @@ public class TEWritingTable extends TEInventory implements ISidedInventory { } else if (getStackInSlot(6).getItem() == getResultingItemStack().getItem() && getResultingItemStack().stackSize <= (getStackInSlot(6).getMaxStackSize() - getStackInSlot(6).stackSize)) { - if (worldTime % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround( - worldObj, - xCoord, - yCoord, - zCoord, - 20, - worldObj.provider.dimensionId, - 1, - xCoord, - yCoord, - zCoord); - } + if (worldTime % 4 == 0) { + SpellHelper.sendIndexedParticleToAllAround( + worldObj, + xCoord, + yCoord, + zCoord, + 20, + worldObj.provider.dimensionId, + 1, + xCoord, + yCoord, + zCoord); + } - if (!SoulNetworkHandler.syphonFromNetworkWhileInContainer( - getStackInSlot(0), amountUsed * acceleration)) { - return; - } + if (!SoulNetworkHandler.syphonFromNetworkWhileInContainer( + getStackInSlot(0), + amountUsed * acceleration)) { + return; + } - progress += acceleration; + progress += acceleration; - if (progress >= progressNeeded) { - progress = 0; - ItemStack result = getResultingItemStack().copy(); - result.stackSize += getStackInSlot(6).stackSize; - this.setInventorySlotContents(6, result); + if (progress >= progressNeeded) { + progress = 0; + ItemStack result = getResultingItemStack().copy(); + result.stackSize += getStackInSlot(6).stackSize; + this.setInventorySlotContents(6, result); - ItemStack[] composedRecipe = new ItemStack[5]; + ItemStack[] composedRecipe = new ItemStack[5]; - for (int i = 0; i < 5; i++) { - composedRecipe[i] = inv[i + 1]; - } + for (int i = 0; i < 5; i++) { + composedRecipe[i] = inv[i + 1]; + } - this.decrementSlots(this.getRecipeForItems(composedRecipe, inv[0])); + this.decrementSlots(this.getRecipeForItems(composedRecipe, inv[0])); - if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - } - } - } + if (worldObj != null) { + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + } + } } } public void decrementSlots(ItemStack[] recipe) // TODO Fix this. This doesn't work. - { - boolean[] decrementedList = new boolean[] {false, false, false, false, false}; + { + boolean[] decrementedList = new boolean[] { false, false, false, false, false }; for (int i = 0; i < (Math.min(recipe.length, 5)); i++) { ItemStack decStack = recipe[i]; @@ -643,9 +647,8 @@ public class TEWritingTable extends TEInventory implements ISidedInventory { ItemStack testStack = this.getStackInSlot(j + 1); if (testStack != null - && (testStack.isItemEqual(decStack) - || (testStack.getItem() == decStack.getItem() - && decStack.getItemDamage() == OreDictionary.WILDCARD_VALUE)) + && (testStack.isItemEqual(decStack) || (testStack.getItem() == decStack.getItem() + && decStack.getItemDamage() == OreDictionary.WILDCARD_VALUE)) && !(decrementedList[j])) { if (testStack.getItem().hasContainerItem(testStack)) { this.inv[j + 1] = testStack.getItem().getContainerItem(testStack); @@ -697,9 +700,9 @@ public class TEWritingTable extends TEInventory implements ISidedInventory { ForgeDirection dir = ForgeDirection.getOrientation(side); switch (dir) { case DOWN: - return new int[] {6}; + return new int[] { 6 }; default: - return new int[] {0, 1, 2, 3, 4, 5}; + return new int[] { 0, 1, 2, 3, 4, 5 }; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerAltar.java index 3c4e33f9..1ea88f7a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerAltar.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.tileEntity.container; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; + public class ContainerAltar extends Container { + protected TEAltar tileEntity; public ContainerAltar(InventoryPlayer inventoryPlayer, TEAltar te) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerTeleposer.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerTeleposer.java index 92494571..d7a3648d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerTeleposer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerTeleposer.java @@ -1,7 +1,5 @@ package WayofTime.alchemicalWizardry.common.tileEntity.container; -import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; -import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; @@ -9,7 +7,11 @@ import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; +import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; + public class ContainerTeleposer extends Container { + protected TETeleposer tileEntity; public ContainerTeleposer(InventoryPlayer inventoryPlayer, TETeleposer te) { @@ -72,6 +74,7 @@ public class ContainerTeleposer extends Container { } private class SlotTeleposer extends Slot { + public SlotTeleposer(IInventory inventory, int slotIndex, int x, int y) { super(inventory, slotIndex, x, y); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java index 7ca93669..64066c9c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java @@ -1,14 +1,16 @@ package WayofTime.alchemicalWizardry.common.tileEntity.container; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; +import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; + public class ContainerWritingTable extends Container { + protected TEWritingTable tileEntity; public ContainerWritingTable(InventoryPlayer inventoryPlayer, TEWritingTable te) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java index 140f58d2..a9942f9b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java @@ -1,5 +1,9 @@ package WayofTime.alchemicalWizardry.common.tileEntity.gui; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + import WayofTime.alchemicalWizardry.common.items.sigil.holding.ContainerHolding; import WayofTime.alchemicalWizardry.common.items.sigil.holding.GuiHolding; import WayofTime.alchemicalWizardry.common.items.sigil.holding.InventoryHolding; @@ -8,11 +12,9 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerTeleposer; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable; import cpw.mods.fml.common.network.IGuiHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; public class GuiHandler implements IGuiHandler { + // returns an instance of the Container you made earlier @Override public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java index 63c0a346..53bcbf9d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.tileEntity.gui; -import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerTeleposer; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; +import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerTeleposer; + public class GuiTeleposer extends GuiContainer { + public GuiTeleposer(InventoryPlayer inventoryPlayer, TETeleposer tileEntity) { super(new ContainerTeleposer(inventoryPlayer, tileEntity)); xSize = 176; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java index 75922b45..0e7f2573 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.tileEntity.gui; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; -import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable; + public class GuiWritingTable extends GuiContainer { + public GuiWritingTable(InventoryPlayer inventoryPlayer, TEWritingTable tileEntity) { super(new ContainerWritingTable(inventoryPlayer, tileEntity)); xSize = 176; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java index 0b2bf88d..958b75f3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java @@ -3,27 +3,31 @@ package WayofTime.alchemicalWizardry.common.tweaker; import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStacks; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; import minetweaker.IUndoableAction; import minetweaker.MineTweakerAPI; import minetweaker.api.item.IItemStack; + import net.minecraft.item.ItemStack; + import stanhebben.zenscript.annotations.ZenClass; import stanhebben.zenscript.annotations.ZenMethod; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; /** * MineTweaker3 Alchemy Recipe Handler by joshie * */ @ZenClass("mods.bloodmagic.Alchemy") public class Alchemy { + @ZenMethod public static void addRecipe(IItemStack output, IItemStack[] input, int tier, int lp) { - MineTweakerAPI.apply( - new Add(new AlchemyRecipe(toStack(output), (int) (((double) lp) / 100), toStacks(input), tier))); + MineTweakerAPI + .apply(new Add(new AlchemyRecipe(toStack(output), (int) (((double) lp) / 100), toStacks(input), tier))); } private static class Add implements IUndoableAction { + private final AlchemyRecipe recipe; public Add(AlchemyRecipe recipe) { @@ -47,14 +51,12 @@ public class Alchemy { @Override public String describe() { - return "Adding Alchemy Recipe for " - + ((AlchemyRecipe) recipe).getResult().getDisplayName(); + return "Adding Alchemy Recipe for " + ((AlchemyRecipe) recipe).getResult().getDisplayName(); } @Override public String describeUndo() { - return "Removing Alchemy Recipe for " - + ((AlchemyRecipe) recipe).getResult().getDisplayName(); + return "Removing Alchemy Recipe for " + ((AlchemyRecipe) recipe).getResult().getDisplayName(); } @Override @@ -69,6 +71,7 @@ public class Alchemy { } private static class Remove implements IUndoableAction { + private final ItemStack output; private AlchemyRecipe recipe; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java index a3918b6e..9c073460 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java @@ -2,26 +2,30 @@ package WayofTime.alchemicalWizardry.common.tweaker; import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; -import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe; -import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; import minetweaker.IUndoableAction; import minetweaker.MineTweakerAPI; import minetweaker.api.item.IItemStack; + import net.minecraft.item.ItemStack; + import stanhebben.zenscript.annotations.ZenClass; import stanhebben.zenscript.annotations.ZenMethod; +import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe; +import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; /** * MineTweaker3 Binding Recipe Handler by joshie * */ @ZenClass("mods.bloodmagic.Binding") public class Binding { + @ZenMethod public static void addRecipe(IItemStack input, IItemStack output) { MineTweakerAPI.apply(new Add(new BindingRecipe(toStack(output), toStack(input)))); } private static class Add implements IUndoableAction { + private final BindingRecipe recipe; public Add(BindingRecipe recipe) { @@ -45,14 +49,12 @@ public class Binding { @Override public String describe() { - return "Adding Binding Recipe for " - + ((BindingRecipe) recipe).getResult().getDisplayName(); + return "Adding Binding Recipe for " + ((BindingRecipe) recipe).getResult().getDisplayName(); } @Override public String describeUndo() { - return "Removing Binding Recipe for " - + ((BindingRecipe) recipe).getResult().getDisplayName(); + return "Removing Binding Recipe for " + ((BindingRecipe) recipe).getResult().getDisplayName(); } @Override @@ -67,6 +69,7 @@ public class Binding { } private static class Remove implements IUndoableAction { + private final ItemStack output; private BindingRecipe recipe; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java index 5506a380..57def7a2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java @@ -2,31 +2,35 @@ package WayofTime.alchemicalWizardry.common.tweaker; import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; -import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; -import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; import minetweaker.IUndoableAction; import minetweaker.MineTweakerAPI; import minetweaker.api.item.IItemStack; + import net.minecraft.item.ItemStack; + import stanhebben.zenscript.annotations.Optional; import stanhebben.zenscript.annotations.ZenClass; import stanhebben.zenscript.annotations.ZenMethod; +import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; +import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; /** * MineTweaker3 Blood Altar Recipe Handler by joshie * */ @ZenClass("mods.bloodmagic.Altar") public class BloodAltar { + @ZenMethod - public static void addRecipe( - IItemStack output, IItemStack input, int tier, int lp, @Optional int consume, @Optional int drain) { + public static void addRecipe(IItemStack output, IItemStack input, int tier, int lp, @Optional int consume, + @Optional int drain) { consume = consume > 0 ? consume : 20; drain = drain > 0 ? drain : 20; - MineTweakerAPI.apply( - new Add(new AltarRecipe(toStack(output), toStack(input), tier, lp, consume, drain, false))); + MineTweakerAPI + .apply(new Add(new AltarRecipe(toStack(output), toStack(input), tier, lp, consume, drain, false))); } private static class Add implements IUndoableAction { + private final AltarRecipe recipe; public Add(AltarRecipe recipe) { @@ -50,14 +54,12 @@ public class BloodAltar { @Override public String describe() { - return "Adding Blood Altar Recipe for " - + ((AltarRecipe) recipe).getResult().getDisplayName(); + return "Adding Blood Altar Recipe for " + ((AltarRecipe) recipe).getResult().getDisplayName(); } @Override public String describeUndo() { - return "Removing Blood Altar Recipe for " - + ((AltarRecipe) recipe).getResult().getDisplayName(); + return "Removing Blood Altar Recipe for " + ((AltarRecipe) recipe).getResult().getDisplayName(); } @Override @@ -72,6 +74,7 @@ public class BloodAltar { } private static class Remove implements IUndoableAction { + private final ItemStack output; private AltarRecipe recipe; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java index 5addc5d3..2f2f133b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java @@ -4,25 +4,29 @@ import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toObjects; import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toShapedObjects; import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; -import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; -import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; import java.util.ArrayList; import java.util.List; + import minetweaker.IUndoableAction; import minetweaker.MineTweakerAPI; import minetweaker.api.item.IIngredient; import minetweaker.api.item.IItemStack; + import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.IRecipe; + import stanhebben.zenscript.annotations.ZenClass; import stanhebben.zenscript.annotations.ZenMethod; +import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; +import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; /** * MineTweaker3 Blood Orb Recipe Handler by joshie * */ @ZenClass("mods.bloodmagic.BloodOrb") public class BloodOrb { + public static List lateAdditions = new ArrayList<>(); public static List lateRemovals = new ArrayList<>(); @@ -48,6 +52,7 @@ public class BloodOrb { } private static class Add implements IUndoableAction { + private IRecipe iRecipe; private final boolean isShapeless; private final ItemStack output; @@ -98,6 +103,7 @@ public class BloodOrb { } private static class Remove implements IUndoableAction { + private final ItemStack output; private IRecipe iRecipe; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java index 71c6d3e6..12d4b50b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java @@ -2,22 +2,26 @@ package WayofTime.alchemicalWizardry.common.tweaker; import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; -import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm; -import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; import java.util.Iterator; + import minetweaker.IUndoableAction; import minetweaker.MineTweakerAPI; import minetweaker.api.item.IItemStack; + import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; + import stanhebben.zenscript.annotations.ZenClass; import stanhebben.zenscript.annotations.ZenMethod; +import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm; +import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; /** * MineTweaker3 Falling Tower Paradigm Handler by hilburn * */ @ZenClass("mods.bloodmagic.FallingTower") public class FallingTower { + @ZenMethod public static void addFocus(IItemStack stack, int radius, String[] components) { MineTweakerAPI.apply(new Add(toStack(stack), radius, 10000, components)); @@ -44,6 +48,7 @@ public class FallingTower { } private static class Add implements IUndoableAction { + private MeteorParadigm paradigm; public Add(ItemStack stack, int radius, int cost, String[] components) { @@ -83,6 +88,7 @@ public class FallingTower { } private static class Remove implements IUndoableAction { + private final ItemStack focus; private MeteorParadigm paradigm; @@ -92,7 +98,7 @@ public class FallingTower { @Override public void apply() { - for (Iterator itr = MeteorRegistry.paradigmList.iterator(); itr.hasNext(); ) { + for (Iterator itr = MeteorRegistry.paradigmList.iterator(); itr.hasNext();) { MeteorParadigm paradigm = itr.next(); if (OreDictionary.itemMatches(paradigm.focusStack, focus, false)) { this.paradigm = paradigm; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java index 5dfc7804..a9620dc8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java @@ -1,17 +1,19 @@ package WayofTime.alchemicalWizardry.common.tweaker; -import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; -import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; -import WayofTime.alchemicalWizardry.common.harvest.GenericItemStackHarvestHandler; import minetweaker.IUndoableAction; import minetweaker.MineTweakerAPI; import minetweaker.api.item.IItemStack; + import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraftforge.common.IPlantable; + import stanhebben.zenscript.annotations.ZenClass; import stanhebben.zenscript.annotations.ZenMethod; +import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; +import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; +import WayofTime.alchemicalWizardry.common.harvest.GenericItemStackHarvestHandler; /** * MineTweaker3 Harvest Moon Handler by hilburn * @@ -28,8 +30,7 @@ public class HarvestMoon { public static void addHarvestable(IItemStack block, int meta, IItemStack seed) { ItemStack seedStack = MTHelper.toStack(seed); Block plantBlock = Block.getBlockFromItem(MTHelper.toStack(block).getItem()); - if (!(plantBlock == null - || plantBlock == Blocks.air + if (!(plantBlock == null || plantBlock == Blocks.air || seedStack == null || !(seedStack.getItem() instanceof IPlantable))) { MineTweakerAPI.apply(new Add(plantBlock, meta, seedStack)); @@ -39,6 +40,7 @@ public class HarvestMoon { } private static class Add implements IUndoableAction { + private IHarvestHandler handler; private String name; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java index d23c0ea2..957f29be 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java @@ -3,15 +3,18 @@ package WayofTime.alchemicalWizardry.common.tweaker; import static minetweaker.api.minecraft.MineTweakerMC.getItemStack; import java.util.ArrayList; + import minetweaker.api.item.IIngredient; import minetweaker.api.item.IItemStack; import minetweaker.api.oredict.IOreDictEntry; + import net.minecraft.item.ItemStack; /** * MineTweaker3 Helper by joshie * */ public class MTHelper { + public static ItemStack toStack(IItemStack iStack) { return getItemStack(iStack); } @@ -60,7 +63,7 @@ public class MTHelper { prep.add("abc"); prep.add("def"); prep.add("ghi"); - char[][] map = new char[][] {{'a', 'b', 'c'}, {'d', 'e', 'f'}, {'g', 'h', 'i'}}; + char[][] map = new char[][] { { 'a', 'b', 'c' }, { 'd', 'e', 'f' }, { 'g', 'h', 'i' } }; for (int x = 0; x < ingredients.length; x++) { if (ingredients[x] != null) { for (int y = 0; y < ingredients[x].length; y++) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MineTweakerIntegration.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MineTweakerIntegration.java index 6d3fb88a..9737bd3d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MineTweakerIntegration.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MineTweakerIntegration.java @@ -8,6 +8,7 @@ import minetweaker.util.IEventHandler; * MineTweaker3 Integration by joshie * */ public class MineTweakerIntegration { + public static void register() { MineTweakerAPI.registerClass(Alchemy.class); MineTweakerAPI.registerClass(Binding.class); @@ -22,6 +23,7 @@ public class MineTweakerIntegration { public static class HandleLateAdditionsAndRemovals implements IEventHandler { + @Override public void handle(MineTweakerImplementationAPI.ReloadEvent event) { BloodOrb.applyAdditionsAndRemovals();