From e3d4afa123650771775c0f0f9c28a58159cf23c5 Mon Sep 17 00:00:00 2001 From: Nick Date: Thu, 29 Oct 2015 20:22:14 -0700 Subject: [PATCH] Rewrite is Go! Just moving over all my changes from my fork --- build.gradle | 163 +- build.properties | 14 - gradle.properties | 8 + settings.gradle | 1 + .../AlchemicalWizardry.java | 1887 +---------------- .../BloodMagicConfiguration.java | 301 --- .../alchemicalWizardry/ConfigHandler.java | 195 ++ .../alchemicalWizardry/ModBlocks.java | 200 -- .../alchemicalWizardry/ModItems.java | 406 ---- .../alchemicalWizardry/altar/BloodAltar.java | 131 ++ .../api/AlchemicalWizardryAPI.java | 26 + .../alchemicalWizardry/api/BlockStack.java | 28 + .../api/ColourAndCoords.java | 45 - .../api/DamageSourceBloodMagic.java | 12 + .../api/ILimitingLogic.java | 6 - .../alchemicalWizardry/api/Int3.java | 49 - .../alchemicalWizardry/api/NBTHolder.java | 24 + .../api/RoutingFocusLogic.java | 16 - .../api/RoutingFocusParadigm.java | 64 - .../api/RoutingFocusPosAndFacing.java | 21 - .../alchemicalWizardry/api/Vector3.java | 45 - .../AlchemicalPotionCreationHandler.java | 79 - .../AlchemyPotionHandlerComponent.java | 52 - .../api/alchemy/AlchemyPotionHelper.java | 76 - .../api/alchemy/AlchemyRecipe.java | 143 -- .../api/alchemy/AlchemyRecipeRegistry.java | 85 - .../api/alchemy/energy/IAlchemyGoggles.java | 10 - .../api/alchemy/energy/IReagentContainer.java | 16 - .../api/alchemy/energy/IReagentHandler.java | 18 - .../energy/ISegmentedReagentHandler.java | 14 - .../api/alchemy/energy/Reagent.java | 52 - .../api/alchemy/energy/ReagentContainer.java | 153 -- .../alchemy/energy/ReagentContainerInfo.java | 19 - .../api/alchemy/energy/ReagentRegistry.java | 174 -- .../api/alchemy/energy/ReagentStack.java | 62 - .../alchemy/energy/TileReagentHandler.java | 66 - .../energy/TileSegmentedReagentHandler.java | 283 --- .../api/altar/AltarComponent.java | 64 + .../api/altar/AltarRecipe.java | 44 + .../api/altar/AltarUpgrade.java | 20 + .../api/altarRecipeRegistry/AltarRecipe.java | 136 -- .../AltarRecipeRegistry.java | 77 - .../api/altarRecipeRegistry/IFadedRune.java | 6 - .../api/bindingRegistry/BindingRecipe.java | 30 - .../api/bindingRegistry/BindingRegistry.java | 67 - .../api/bindingRegistry/UnbindingRecipe.java | 30 - .../bindingRegistry/UnbindingRegistry.java | 62 - .../api/compress/CompressionHandler.java | 14 - .../api/compress/CompressionRegistry.java | 67 - .../api/enumeration/EnumAltarComponent.java | 10 + .../api/enumeration/EnumAltarTier.java | 136 ++ .../api/enumeration/EnumStoneType.java | 33 + .../api/event/AddToNetworkEvent.java | 52 +- .../api/event/ItemBindEvent.java | 25 +- .../api/event/ItemDrainInContainerEvent.java | 15 - .../api/event/ItemDrainNetworkEvent.java | 29 - .../api/event/PlayerAddToNetworkEvent.java | 18 - .../api/event/PlayerDrainNetworkEvent.java | 20 - .../api/event/RitualActivatedEvent.java | 23 - .../api/event/RitualEvent.java | 18 - .../api/event/RitualRunEvent.java | 13 - .../api/event/RitualStopEvent.java | 15 - .../api/event/SacrificeKnifeUsedEvent.java | 22 - .../api/event/SoulNetworkEvent.java | 77 +- .../api/event/TeleposeEvent.java | 50 - .../api/guide/OrbRecipeRenderer.java | 135 -- .../api/guide/PageAltarRecipe.java | 69 - .../api/guide/PageMultiBlock.java | 145 -- .../api/guide/PageRitualMultiBlock.java | 96 - .../api/harvest/HarvestRegistry.java | 35 - .../api/harvest/IHarvestHandler.java | 18 - .../api/iface/IAltarComponent.java | 8 + .../api/iface/IBindable.java | 17 + .../api/iface/IBloodAltar.java | 40 + .../api/items/IAltarManipulator.java | 6 - .../api/items/ItemSpellMultiTool.java | 803 ------- .../api/items/ShapedBloodOrbRecipe.java | 287 --- .../api/items/ShapelessBloodOrbRecipe.java | 186 -- .../api/items/interfaces/ArmourUpgrade.java | 15 - .../api/items/interfaces/IBindable.java | 5 - .../api/items/interfaces/IBloodOrb.java | 8 - .../api/items/interfaces/IHolding.java | 6 - .../api/items/interfaces/ILPGauge.java | 8 - .../items/interfaces/IReagentManipulator.java | 9 - .../api/items/interfaces/IRitualDiviner.java | 22 - .../api/items/interfaces/ISigil.java | 4 - .../api/network/SoulNetwork.java | 34 + .../alchemicalWizardry/api/orb/BloodOrb.java | 69 + .../alchemicalWizardry/api/orb/IBloodOrb.java | 10 + .../alchemicalWizardry/api/package-info.java | 4 + .../api/registry/AltarRecipeRegistry.java | 25 + .../api/registry/OrbRegistry.java | 62 + .../api/renderer/MRSRenderer.java | 15 - .../api/rituals/IMasterRitualStone.java | 41 - .../api/rituals/IRitualStone.java | 18 - .../api/rituals/ITileRitualStone.java | 6 - .../api/rituals/LocalRitualStorage.java | 36 - .../api/rituals/RitualBreakMethod.java | 11 - .../api/rituals/RitualComponent.java | 72 - .../api/rituals/RitualEffect.java | 87 - .../api/rituals/Rituals.java | 390 ---- .../api/sacrifice/IIncense.java | 21 - .../api/sacrifice/PlayerSacrificeHandler.java | 116 - .../soulNetwork/ComplexNetworkHandler.java | 93 - .../api/soulNetwork/LifeEssenceNetwork.java | 30 - .../api/soulNetwork/SoulNetworkHandler.java | 468 ---- .../api/spell/APISpellHelper.java | 377 ---- .../api/spell/ComplexSpellEffect.java | 92 - .../api/spell/ComplexSpellModifier.java | 9 - .../api/spell/ComplexSpellType.java | 9 - .../api/spell/EntitySpellProjectile.java | 620 ------ .../spell/ExtrapolatedMeleeEntityEffect.java | 72 - .../api/spell/IDigAreaEffect.java | 12 - .../api/spell/IItemManipulator.java | 10 - .../api/spell/ILeftClickEffect.java | 9 - .../api/spell/IMeleeSpellEntityEffect.java | 9 - .../api/spell/IMeleeSpellWorldEffect.java | 9 - .../api/spell/IOnBanishTool.java | 10 - .../api/spell/IOnBreakBlock.java | 14 - .../api/spell/IOnSummonTool.java | 10 - .../api/spell/IProjectileImpactEffect.java | 12 - .../api/spell/IProjectileUpdateEffect.java | 8 - .../api/spell/IRightClickEffect.java | 15 - .../api/spell/ISelfSpellEffect.java | 9 - .../api/spell/ISpecialDamageEffect.java | 10 - .../api/spell/IToolUpdateEffect.java | 10 - .../spell/MeleeSpellCenteredWorldEffect.java | 36 - .../api/spell/MeleeSpellWorldEffect.java | 21 - .../api/spell/ProjectileImpactEffect.java | 15 - .../api/spell/ProjectileUpdateEffect.java | 15 - .../api/spell/SelfSpellEffect.java | 15 - .../api/spell/SpellEffect.java | 500 ----- .../api/spell/SpellEffectRegistry.java | 157 -- .../api/spell/SpellEnhancement.java | 20 - .../api/spell/SpellEnhancementCost.java | 9 - .../api/spell/SpellEnhancementPotency.java | 9 - .../api/spell/SpellEnhancementPower.java | 9 - .../api/spell/SpellParadigm.java | 131 -- .../api/spell/SpellParadigmMelee.java | 67 - .../api/spell/SpellParadigmProjectile.java | 101 - .../api/spell/SpellParadigmSelf.java | 55 - .../api/spell/SpellParadigmTool.java | 483 ----- .../summoningRegistry/SummoningHelper.java | 21 - .../summoningRegistry/SummoningRegistry.java | 70 - .../SummoningRegistryComponent.java | 231 -- .../api/tile/IBloodAltar.java | 42 - .../api/tile/ISpellParadigmTile.java | 10 - .../api/tile/ISpellTile.java | 11 - .../api/util/helper/BindableHelper.java | 76 + .../api/util/helper/LogHelper.java | 37 + .../api/util/helper/NetworkHelper.java | 202 ++ .../api/util/helper/PlayerHelper.java | 53 + .../api/util/helper/TextHelper.java | 7 + .../alchemicalWizardry/block/BlockAltar.java | 24 + .../block/BlockLifeEssence.java | 57 + .../client/BlockRenderer.java | 36 - .../client/ClientEventHandler.java | 86 - .../client/ClientProxy.java | 198 -- .../client/InventoryRenderHelper.java | 248 --- .../client/KeyBindings.java | 14 - .../client/gui/ConfigGui.java | 43 +- .../client/gui/ConfigGuiFactory.java | 34 +- .../client/nei/NEIAlchemyRecipeHandler.java | 178 -- .../client/nei/NEIAltarRecipeHandler.java | 187 -- .../client/nei/NEIBindingRitualHandler.java | 136 -- .../client/nei/NEIBloodOrbShapedHandler.java | 142 -- .../nei/NEIBloodOrbShapelessHandler.java | 135 -- .../client/nei/NEIConfig.java | 36 - .../client/renderer/ColourThreshold.java | 50 - .../client/renderer/HUDElement.java | 142 -- .../client/renderer/HUDUtils.java | 275 --- .../client/renderer/RenderFakeBlocks.java | 103 - .../client/renderer/RenderHelper.java | 326 --- .../client/renderer/RitualDivinerRender.java | 96 - .../common/AlchemicalWizardryEventHooks.java | 825 ------- .../common/AlchemicalWizardryFuelHandler.java | 67 - .../common/ArmourComponent.java | 23 - .../common/ClientToServerPacketHandler.java | 15 - .../common/CommonProxy.java | 67 - .../common/CoordAndRange.java | 37 - .../common/EntityAITargetAggro.java | 24 - .../common/EntityAITargetAggroCloaking.java | 29 - .../common/IBindingAgent.java | 6 - .../alchemicalWizardry/common/ICatalyst.java | 8 - .../alchemicalWizardry/common/IDemon.java | 14 - .../common/IFillingAgent.java | 6 - .../alchemicalWizardry/common/ItemType.java | 93 - .../common/LifeBucketHandler.java | 44 - .../common/LifeEssence.java | 25 - .../common/MessageKeyPressed.java | 67 - .../common/ModLivingDropsEvent.java | 36 - .../common/NewPacketHandler.java | 1100 ---------- .../common/PlinthComponent.java | 37 - .../achievements/AchievementTrigger.java | 46 - .../common/achievements/AchievementsMod.java | 31 - .../achievements/AchievementsRegistry.java | 49 - .../achievements/ICraftAchievement.java | 11 - .../achievements/IPickupAchievement.java | 11 - .../common/achievements/ModAchievements.java | 26 - .../alchemy/CombinedPotionComponent.java | 27 - .../alchemy/CombinedPotionRegistry.java | 182 -- .../alchemy/ICombinationalCatalyst.java | 5 - .../block/BlockAlchemicalCalcinator.java | 158 -- .../common/block/BlockAltar.java | 234 -- .../common/block/BlockArmourForge.java | 322 --- .../common/block/BlockBelljar.java | 157 -- .../common/block/BlockBloodLightSource.java | 58 - .../common/block/BlockBloodRune.java | 100 - .../common/block/BlockBloodStoneBrick.java | 14 - .../common/block/BlockChemistrySet.java | 130 -- .../common/block/BlockConduit.java | 47 - .../common/block/BlockCrystal.java | 46 - .../common/block/BlockDemonPortal.java | 54 - .../common/block/BlockEfficiencyRune.java | 17 - .../common/block/BlockEmptySocket.java | 36 - .../common/block/BlockEnchantmentGlyph.java | 79 - .../common/block/BlockFilledSocket.java | 123 -- .../block/BlockImperfectRitualStone.java | 109 - .../common/block/BlockIncenseCrucible.java | 153 -- .../block/BlockLargeBloodStoneBrick.java | 14 - .../common/block/BlockLifeEssence.java | 29 - .../common/block/BlockMasterStone.java | 91 - .../common/block/BlockMimic.java | 210 -- .../common/block/BlockOrientable.java | 90 - .../common/block/BlockPedestal.java | 127 -- .../common/block/BlockPlinth.java | 127 -- .../common/block/BlockReagentConduit.java | 57 - .../common/block/BlockRitualStone.java | 69 - .../common/block/BlockRuneOfSacrifice.java | 17 - .../block/BlockRuneOfSelfSacrifice.java | 17 - .../common/block/BlockSchematicSaver.java | 42 - .../common/block/BlockSpectral.java | 115 - .../common/block/BlockSpectralContainer.java | 57 - .../common/block/BlockSpeedRune.java | 17 - .../common/block/BlockSpellEffect.java | 55 - .../common/block/BlockSpellEnhancement.java | 55 - .../common/block/BlockSpellModifier.java | 55 - .../common/block/BlockSpellParadigm.java | 87 - .../common/block/BlockSpellTable.java | 69 - .../common/block/BlockStabilityGlyph.java | 46 - .../common/block/BlockTeleposer.java | 259 --- .../common/block/IOrientable.java | 14 - .../bloodAltarUpgrade/AltarComponent.java | 66 - .../AltarUpgradeComponent.java | 117 - .../bloodAltarUpgrade/UpgradedAltars.java | 261 --- .../common/book/BloodMagicGuide.java | 836 -------- .../compress/AdvancedCompressionHandler.java | 178 -- .../compress/BaseCompressionHandler.java | 110 - .../compress/StorageBlockCraftingManager.java | 261 --- ...StorageBlockCraftingRecipeAssimilator.java | 242 --- .../common/demonVillage/BlockSet.java | 375 ---- .../demonVillage/BuildingSchematic.java | 190 -- .../common/demonVillage/DemonBuilding.java | 121 -- .../common/demonVillage/DemonCrosspath.java | 22 - .../common/demonVillage/DemonVillagePath.java | 263 --- .../common/demonVillage/GridSpace.java | 77 - .../common/demonVillage/GridSpaceHolder.java | 313 --- .../ai/EntityAIOccasionalRangedAttack.java | 165 -- .../ai/EntityDemonAIHurtByTarget.java | 64 - .../ai/IOccasionalRangedAttackMob.java | 8 - .../demonHoard/DemonHoardPacket.java | 15 - .../demonHoard/DemonPacketMinorGrunt.java | 98 - .../demonHoard/DemonPacketRegistry.java | 81 - .../demonVillage/demonHoard/DemonType.java | 10 - .../demon/EntityMinorDemonGrunt.java | 518 ----- .../demon/EntityMinorDemonGruntEarth.java | 47 - .../demon/EntityMinorDemonGruntFire.java | 43 - .../demon/EntityMinorDemonGruntGuardian.java | 44 - .../EntityMinorDemonGruntGuardianEarth.java | 51 - .../EntityMinorDemonGruntGuardianFire.java | 47 - .../EntityMinorDemonGruntGuardianIce.java | 44 - .../EntityMinorDemonGruntGuardianWind.java | 61 - .../demon/EntityMinorDemonGruntIce.java | 40 - .../demon/EntityMinorDemonGruntWind.java | 57 - .../demonHoard/demon/IHoardDemon.java | 14 - .../loot/DemonVillageLootRegistry.java | 39 - .../tileEntity/BlockDemonChest.java | 41 - .../tileEntity/IBlockPortalNode.java | 6 - .../demonVillage/tileEntity/IRoadWard.java | 6 - .../tileEntity/ITilePortalNode.java | 6 - .../demonVillage/tileEntity/TEDemonChest.java | 77 - .../tileEntity/TEDemonPortal.java | 1567 -------------- .../common/entity/mob/BookEntityItem.java | 56 - .../common/entity/mob/EntityAirElemental.java | 31 - .../common/entity/mob/EntityBileDemon.java | 60 - .../common/entity/mob/EntityBoulderFist.java | 78 - .../common/entity/mob/EntityDemon.java | 523 ----- .../entity/mob/EntityEarthElemental.java | 28 - .../common/entity/mob/EntityElemental.java | 565 ----- .../common/entity/mob/EntityFallenAngel.java | 91 - .../entity/mob/EntityFireElemental.java | 27 - .../entity/mob/EntityHolyElemental.java | 29 - .../common/entity/mob/EntityIceDemon.java | 88 - .../entity/mob/EntityLowerGuardian.java | 67 - .../common/entity/mob/EntityShade.java | 84 - .../entity/mob/EntityShadeElemental.java | 28 - .../entity/mob/EntitySmallEarthGolem.java | 90 - .../entity/mob/EntityWaterElemental.java | 26 - .../entity/mob/EntityWingedFireDemon.java | 95 - .../entity/mob/MailOrderEntityItem.java | 73 - .../projectile/EnergyBlastProjectile.java | 478 ----- .../EntityBloodLightProjectile.java | 97 - .../EntityEnergyBazookaMainProjectile.java | 100 - ...ntityEnergyBazookaSecondaryProjectile.java | 481 ----- .../entity/projectile/EntityMeteor.java | 90 - .../entity/projectile/EntityParticleBeam.java | 316 --- .../projectile/ExplosionProjectile.java | 112 - .../entity/projectile/FireProjectile.java | 112 - .../entity/projectile/HolyProjectile.java | 93 - .../entity/projectile/IceProjectile.java | 96 - .../projectile/LightningBoltProjectile.java | 111 - .../entity/projectile/MudProjectile.java | 115 - .../entity/projectile/TeleportProjectile.java | 159 -- .../entity/projectile/WaterProjectile.java | 91 - .../entity/projectile/WindGustProjectile.java | 88 - .../common/guide/RecipeHolder.java | 227 -- .../harvest/BloodMagicHarvestHandler.java | 130 -- .../harvest/CactusReedHarvestHandler.java | 34 - .../GenericItemStackHarvestHandler.java | 111 - ...GenericPamSeedlessFruitHarvestHandler.java | 69 - .../harvest/GenericSeededHarvestHandler.java | 138 -- .../common/harvest/GourdHarvestHandler.java | 27 - .../harvest/PamHarvestCompatRegistry.java | 125 -- .../common/items/ActivationCrystal.java | 114 - .../common/items/AirScribeTool.java | 9 - .../common/items/ApprenticeBloodOrb.java | 10 - .../common/items/ArchmageBloodOrb.java | 10 - .../common/items/ArmourInhibitor.java | 98 - .../common/items/BaseItems.java | 23 - .../common/items/BindableItems.java | 293 --- .../common/items/BlankSpell.java | 98 - .../common/items/BloodShard.java | 44 - .../common/items/BoundAxe.java | 274 --- .../common/items/BoundBlade.java | 187 -- .../common/items/BoundPickaxe.java | 292 --- .../common/items/BoundShovel.java | 272 --- .../common/items/CreativeDagger.java | 153 -- .../common/items/CreativeOrb.java | 118 -- .../common/items/DaggerOfSacrifice.java | 189 -- .../common/items/DawnScribeTool.java | 9 - .../common/items/DemonCrystal.java | 167 -- .../items/DemonicTelepositionFocus.java | 36 - .../common/items/DuskScribeTool.java | 9 - .../common/items/EarthScribeTool.java | 9 - .../common/items/EnergyBazooka.java | 166 -- .../common/items/EnergyBlaster.java | 160 -- .../items/EnhancedTelepositionFocus.java | 35 - .../common/items/FireScribeTool.java | 9 - .../common/items/ItemAlchemyBase.java | 79 - .../common/items/ItemBlockCrystalBelljar.java | 96 - .../common/items/ItemBloodLetterPack.java | 154 -- .../common/items/ItemBloodRuneBlock.java | 59 - .../common/items/ItemComplexSpellCrystal.java | 89 - .../common/items/ItemComponents.java | 47 - .../common/items/ItemCrystalBlock.java | 43 - .../items/ItemEnchantmentGlyphBlock.java | 42 - .../common/items/ItemIncense.java | 180 -- .../common/items/ItemMailOrderCatalogue.java | 28 - .../common/items/ItemRitualDismantler.java | 93 - .../common/items/ItemRitualDiviner.java | 527 ----- .../common/items/ItemSpellEffectBlock.java | 51 - .../items/ItemSpellEnhancementBlock.java | 95 - .../common/items/ItemSpellModifierBlock.java | 51 - .../common/items/ItemSpellParadigmBlock.java | 50 - .../common/items/ItemStabilityGlyphBlock.java | 38 - .../common/items/KeyOfBinding.java | 109 - .../common/items/LavaCrystal.java | 76 - .../common/items/LifeBucket.java | 12 - .../common/items/MagicianBloodOrb.java | 10 - .../common/items/MasterBloodOrb.java | 10 - .../alchemicalWizardry/common/items/Orb.java | 201 -- .../items/ReinforcedTelepositionFocus.java | 36 - .../common/items/SacrificialDagger.java | 233 -- .../common/items/ScribeTool.java | 51 - .../common/items/TelepositionFocus.java | 115 - .../common/items/TranscendentBloodOrb.java | 10 - .../common/items/WaterScribeTool.java | 9 - .../common/items/armour/BoundArmour.java | 828 -------- .../common/items/armour/OmegaArmour.java | 525 ----- .../common/items/armour/OmegaArmourEarth.java | 87 - .../common/items/armour/OmegaArmourFire.java | 121 -- .../common/items/armour/OmegaArmourWater.java | 118 -- .../common/items/armour/OmegaArmourWind.java | 81 - .../items/energy/AlchemicalCleanser.java | 68 - .../common/items/energy/AlchemicalRouter.java | 323 --- .../items/energy/AlchemicalSegmenter.java | 200 -- .../common/items/forestry/ItemBloodFrame.java | 145 -- .../common/items/potion/AlchemyFlask.java | 385 ---- .../common/items/potion/AlchemyReagent.java | 49 - .../potion/AverageLengtheningCatalyst.java | 9 - .../items/potion/AveragePowerCatalyst.java | 9 - .../items/potion/CombinationalCatalyst.java | 12 - .../items/potion/EnhancedFillingAgent.java | 38 - .../potion/GreaterLengtheningCatalyst.java | 9 - .../items/potion/GreaterPowerCatalyst.java | 9 - .../items/potion/LengtheningCatalyst.java | 61 - .../potion/MundaneLengtheningCatalyst.java | 9 - .../items/potion/MundanePowerCatalyst.java | 9 - .../common/items/potion/PowerCatalyst.java | 63 - .../items/potion/StandardBindingAgent.java | 55 - .../items/potion/StandardFillingAgent.java | 25 - .../common/items/potion/WeakBindingAgent.java | 15 - .../common/items/potion/WeakFillingAgent.java | 74 - .../items/routing/ILimitedRoutingFocus.java | 10 - .../items/routing/InputRoutingFocus.java | 9 - .../items/routing/OutputRoutingFocus.java | 127 -- .../common/items/routing/RoutingFocus.java | 184 -- .../common/items/sigil/SigilAir.java | 130 -- .../common/items/sigil/SigilBloodLight.java | 132 -- .../common/items/sigil/SigilCompress.java | 143 -- .../common/items/sigil/SigilDivination.java | 119 -- .../common/items/sigil/SigilFluid.java | 739 ------- .../common/items/sigil/SigilHarvest.java | 164 -- .../common/items/sigil/SigilLava.java | 243 --- .../items/sigil/SigilOfElementalAffinity.java | 107 - .../items/sigil/SigilOfEnderSeverance.java | 119 -- .../common/items/sigil/SigilOfGrowth.java | 237 --- .../common/items/sigil/SigilOfHaste.java | 127 -- .../common/items/sigil/SigilOfMagnetism.java | 166 -- .../common/items/sigil/SigilOfSupression.java | 220 -- .../items/sigil/SigilOfTheAssassin.java | 269 --- .../common/items/sigil/SigilOfTheBridge.java | 252 --- .../items/sigil/SigilOfTheFastMiner.java | 127 -- .../common/items/sigil/SigilOfWind.java | 127 -- .../common/items/sigil/SigilSeer.java | 66 - .../common/items/sigil/SigilToggleable.java | 17 - .../common/items/sigil/SigilVoid.java | 164 -- .../common/items/sigil/SigilWater.java | 242 --- .../items/sigil/holding/ContainerHolding.java | 195 -- .../items/sigil/holding/GuiHolding.java | 39 - .../sigil/holding/HoldingPacketHandler.java | 15 - .../sigil/holding/HoldingPacketProcessor.java | 55 - .../items/sigil/holding/InventoryHolding.java | 292 --- .../items/sigil/holding/ScrollHelper.java | 45 - .../items/sigil/holding/SigilOfHolding.java | 281 --- .../items/thaumcraft/ItemSanguineArmour.java | 192 -- .../common/omega/IEnchantmentGlyph.java | 11 - .../common/omega/IStabilityGlyph.java | 9 - .../common/omega/OmegaParadigm.java | 167 -- .../common/omega/OmegaParadigmEarth.java | 51 - .../common/omega/OmegaParadigmFire.java | 64 - .../common/omega/OmegaParadigmWater.java | 83 - .../common/omega/OmegaParadigmWind.java | 46 - .../common/omega/OmegaRegistry.java | 42 - .../common/omega/OmegaStructureHandler.java | 161 -- .../omega/OmegaStructureParameters.java | 15 - .../omega/ReagentRegenConfiguration.java | 15 - .../common/potion/PotionBloodMagic.java | 19 - .../renderer/AlchemyCircleRenderer.java | 88 - .../block/RenderAlchemicalCalcinator.java | 201 -- .../common/renderer/block/RenderAltar.java | 80 - .../renderer/block/RenderChemistrySet.java | 166 -- .../common/renderer/block/RenderConduit.java | 34 - .../renderer/block/RenderCrystalBelljar.java | 115 - .../renderer/block/RenderMasterStone.java | 25 - .../common/renderer/block/RenderPedestal.java | 97 - .../common/renderer/block/RenderPlinth.java | 91 - .../renderer/block/RenderReagentConduit.java | 62 - .../block/RenderSpellEffectBlock.java | 38 - .../block/RenderSpellEnhancementBlock.java | 38 - .../block/RenderSpellModifierBlock.java | 38 - .../block/RenderSpellParadigmBlock.java | 38 - .../TEAlchemicalCalcinatorItemRenderer.java | 78 - .../block/itemRender/TEAltarItemRenderer.java | 68 - .../itemRender/TEBellJarItemRenderer.java | 180 -- .../TEChemistrySetItemRenderer.java | 78 - .../itemRender/TEConduitItemRenderer.java | 82 - .../TESpellEffectBlockItemRenderer.java | 98 - .../TESpellEnhancementBlockItemRenderer.java | 115 - .../TESpellModifierBlockItemRenderer.java | 98 - .../TESpellParadigmBlockItemRenderer.java | 97 - .../common/renderer/mob/RenderBileDemon.java | 28 - .../renderer/mob/RenderBoulderFist.java | 28 - .../common/renderer/mob/RenderElemental.java | 63 - .../renderer/mob/RenderFallenAngel.java | 31 - .../common/renderer/mob/RenderIceDemon.java | 28 - .../renderer/mob/RenderLowerGuardian.java | 28 - .../renderer/mob/RenderMinorDemonGrunt.java | 50 - .../mob/RenderMinorDemonGruntGuardian.java | 50 - .../common/renderer/mob/RenderShade.java | 28 - .../renderer/mob/RenderSmallEarthGolem.java | 28 - .../renderer/mob/RenderWingedFireDemon.java | 28 - .../model/ModelAlchemicalCalcinator.java | 140 -- .../common/renderer/model/ModelBileDemon.java | 181 -- .../renderer/model/ModelBloodAltar.java | 77 - .../renderer/model/ModelBoulderFist.java | 153 -- .../renderer/model/ModelChemistrySet.java | 138 -- .../common/renderer/model/ModelConduit.java | 287 --- .../renderer/model/ModelCrystalBelljar.java | 119 -- .../common/renderer/model/ModelElemental.java | 81 - .../ModelEnergyBazookaMainProjectile.java | 122 -- .../renderer/model/ModelFallenAngel.java | 113 - .../common/renderer/model/ModelIceDemon.java | 197 -- .../renderer/model/ModelLowerGuardian.java | 207 -- .../common/renderer/model/ModelMeteor.java | 90 - .../renderer/model/ModelMinorDemonGrunt.java | 113 - .../model/ModelMinorDemonGruntGuardian.java | 181 -- .../renderer/model/ModelOmegaArmour.java | 898 -------- .../renderer/model/ModelOmegaEarth.java | 509 ----- .../common/renderer/model/ModelOmegaFire.java | 434 ---- .../renderer/model/ModelOmegaWater.java | 500 ----- .../common/renderer/model/ModelOmegaWind.java | 405 ---- .../common/renderer/model/ModelPedestal.java | 58 - .../common/renderer/model/ModelPlinth.java | 90 - .../common/renderer/model/ModelShade.java | 86 - .../renderer/model/ModelSmallEarthGolem.java | 127 -- .../renderer/model/ModelSpellEffectBlock.java | 332 --- .../model/ModelSpellEnhancementBlock.java | 334 --- .../model/ModelSpellModifierBlock.java | 303 --- .../model/ModelSpellParadigmBlock.java | 233 -- .../renderer/model/ModelWingedFireDemon.java | 203 -- .../RenderEnergyBazookaMainProjectile.java | 46 - .../RenderEnergyBlastProjectile.java | 109 - .../renderer/projectile/RenderMeteor.java | 46 - .../common/rituals/LocalStorageAlphaPact.java | 25 - .../common/rituals/RitualEffectAlphaPact.java | 178 -- .../rituals/RitualEffectAnimalGrowth.java | 155 -- .../rituals/RitualEffectApiaryOverclock.java | 71 - .../rituals/RitualEffectAutoAlchemy.java | 430 ---- .../common/rituals/RitualEffectBinding.java | 189 -- .../rituals/RitualEffectBiomeChanger.java | 410 ---- .../rituals/RitualEffectContainment.java | 129 -- .../common/rituals/RitualEffectCrafting.java | 445 ---- .../common/rituals/RitualEffectCrushing.java | 267 --- .../rituals/RitualEffectDemonPortal.java | 182 -- .../common/rituals/RitualEffectEllipsoid.java | 259 --- .../rituals/RitualEffectEvaporation.java | 211 -- .../common/rituals/RitualEffectExpulsion.java | 339 --- .../rituals/RitualEffectFeatheredEarth.java | 171 -- .../rituals/RitualEffectFeatheredKnife.java | 181 -- .../common/rituals/RitualEffectFlight.java | 182 -- .../rituals/RitualEffectFullStomach.java | 151 -- .../common/rituals/RitualEffectGrowth.java | 148 -- .../common/rituals/RitualEffectHarvest.java | 142 -- .../common/rituals/RitualEffectHealing.java | 178 -- .../rituals/RitualEffectInterdiction.java | 137 -- .../rituals/RitualEffectItemRouting.java | 248 --- .../rituals/RitualEffectItemSuction.java | 126 -- .../common/rituals/RitualEffectJumping.java | 112 - .../common/rituals/RitualEffectLava.java | 136 -- .../common/rituals/RitualEffectLeap.java | 223 -- .../rituals/RitualEffectLifeConduit.java | 174 -- .../common/rituals/RitualEffectMagnetic.java | 248 --- .../rituals/RitualEffectOmegaStalling.java | 103 - .../common/rituals/RitualEffectOmegaTest.java | 258 --- .../common/rituals/RitualEffectSpawnWard.java | 117 - .../rituals/RitualEffectSphereCreator.java | 223 -- .../rituals/RitualEffectSummonMeteor.java | 211 -- .../rituals/RitualEffectSupression.java | 169 -- .../common/rituals/RitualEffectUnbinding.java | 204 -- .../rituals/RitualEffectVeilOfEvil.java | 136 -- .../common/rituals/RitualEffectWater.java | 203 -- .../rituals/RitualEffectWellOfSuffering.java | 159 -- .../routing/RoutingFocusLogicIgnMeta.java | 13 - .../routing/RoutingFocusLogicLimit.java | 13 - .../RoutingFocusLogicLimitDefault.java | 26 - .../routing/RoutingFocusLogicLimitGlobal.java | 32 - .../RoutingFocusLogicLimitIgnMeta.java | 27 - .../RoutingFocusLogicLimitMatchNBT.java | 27 - .../RoutingFocusLogicLimitModItems.java | 27 - .../routing/RoutingFocusLogicMatchNBT.java | 18 - .../routing/RoutingFocusLogicModItems.java | 37 - .../common/spell/complex/SpellModifier.java | 21 - .../spell/complex/SpellModifierDefault.java | 9 - .../spell/complex/SpellModifierDefensive.java | 9 - .../complex/SpellModifierEnvironmental.java | 9 - .../spell/complex/SpellModifierOffensive.java | 9 - .../effect/OutputRoutingFocusModItems.java | 19 - .../spell/complex/effect/SpellHelper.java | 967 --------- .../cse/earth/CSEMeleeDefaultEarth.java | 46 - .../cse/earth/CSEMeleeDefensiveEarth.java | 46 - .../cse/earth/CSEMeleeEnvironmentalEarth.java | 46 - .../cse/earth/CSEMeleeOffensiveEarth.java | 46 - .../cse/earth/CSEProjectileDefaultEarth.java | 46 - .../earth/CSEProjectileDefensiveEarth.java | 46 - .../CSEProjectileEnvironmentalEarth.java | 46 - .../earth/CSEProjectileOffensiveEarth.java | 46 - .../effect/cse/earth/CSESelfDefaultEarth.java | 46 - .../cse/earth/CSESelfDefensiveEarth.java | 46 - .../cse/earth/CSESelfEnvironmentalEarth.java | 46 - .../cse/earth/CSESelfOffensiveEarth.java | 46 - .../effect/cse/earth/CSEToolDefaultEarth.java | 75 - .../cse/earth/CSEToolDefensiveEarth.java | 75 - .../cse/earth/CSEToolEnvironmentalEarth.java | 46 - .../cse/earth/CSEToolOffensiveEarth.java | 46 - .../effect/cse/fire/CSEMeleeDefaultFire.java | 46 - .../cse/fire/CSEMeleeDefensiveFire.java | 46 - .../cse/fire/CSEMeleeEnvironmentalFire.java | 46 - .../cse/fire/CSEMeleeOffensiveFire.java | 46 - .../cse/fire/CSEProjectileDefaultFire.java | 47 - .../cse/fire/CSEProjectileDefensiveFire.java | 46 - .../fire/CSEProjectileEnvironmentalFire.java | 46 - .../cse/fire/CSEProjectileOffensiveFire.java | 46 - .../effect/cse/fire/CSESelfDefaultFire.java | 46 - .../effect/cse/fire/CSESelfDefensiveFire.java | 46 - .../cse/fire/CSESelfEnvironmentalFire.java | 46 - .../effect/cse/fire/CSESelfOffensiveFire.java | 46 - .../effect/cse/fire/CSEToolDefaultFire.java | 46 - .../effect/cse/fire/CSEToolDefensiveFire.java | 50 - .../cse/fire/CSEToolEnvironmentalFire.java | 49 - .../effect/cse/fire/CSEToolOffensiveFire.java | 49 - .../effect/cse/ice/CSEMeleeDefaultIce.java | 46 - .../effect/cse/ice/CSEMeleeDefensiveIce.java | 46 - .../cse/ice/CSEMeleeEnvironmentalIce.java | 46 - .../effect/cse/ice/CSEMeleeOffensiveIce.java | 46 - .../cse/ice/CSEProjectileDefaultIce.java | 47 - .../cse/ice/CSEProjectileDefensiveIce.java | 46 - .../ice/CSEProjectileEnvironmentalIce.java | 46 - .../cse/ice/CSEProjectileOffensiveIce.java | 46 - .../effect/cse/ice/CSESelfDefaultIce.java | 46 - .../effect/cse/ice/CSESelfDefensiveIce.java | 46 - .../cse/ice/CSESelfEnvironmentalIce.java | 46 - .../effect/cse/ice/CSESelfOffensiveIce.java | 46 - .../effect/cse/ice/CSEToolDefaultIce.java | 51 - .../effect/cse/ice/CSEToolDefensiveIce.java | 46 - .../cse/ice/CSEToolEnvironmentalIce.java | 48 - .../effect/cse/ice/CSEToolOffensiveIce.java | 50 - .../effect/cse/wind/CSEMeleeDefaultWind.java | 46 - .../cse/wind/CSEMeleeDefensiveWind.java | 46 - .../cse/wind/CSEMeleeEnvironmentalWind.java | 46 - .../cse/wind/CSEMeleeOffensiveWind.java | 46 - .../cse/wind/CSEProjectileDefaultWind.java | 46 - .../cse/wind/CSEProjectileDefensiveWind.java | 45 - .../wind/CSEProjectileEnvironmentalWind.java | 46 - .../cse/wind/CSEProjectileOffensiveWind.java | 46 - .../effect/cse/wind/CSESelfDefaultWind.java | 46 - .../effect/cse/wind/CSESelfDefensiveWind.java | 46 - .../cse/wind/CSESelfEnvironmentalWind.java | 46 - .../effect/cse/wind/CSESelfOffensiveWind.java | 46 - .../effect/cse/wind/CSEToolDefaultWind.java | 71 - .../effect/cse/wind/CSEToolDefensiveWind.java | 48 - .../cse/wind/CSEToolEnvironmentalWind.java | 46 - .../effect/cse/wind/CSEToolOffensiveWind.java | 46 - .../earth/MeleeDefaultEarth.java | 48 - .../earth/MeleeDefensiveEarth.java | 38 - .../earth/MeleeEnvironmentalEarth.java | 53 - .../earth/MeleeOffensiveEarth.java | 34 - .../earth/ProjectileDefaultEarth.java | 55 - .../earth/ProjectileDefensiveEarth.java | 60 - .../earth/ProjectileEnvironmentalEarth.java | 76 - .../earth/ProjectileOffensiveEarth.java | 58 - .../impactEffects/earth/SelfDefaultEarth.java | 49 - .../earth/SelfDefensiveEarth.java | 27 - .../earth/SelfEnvironmentalEarth.java | 37 - .../earth/SelfOffensiveEarth.java | 40 - .../earth/ToolEnvironmentalEarth.java | 86 - .../earth/ToolOffensiveEarth.java | 55 - .../impactEffects/fire/MeleeDefaultFire.java | 30 - .../fire/MeleeDefensiveFire.java | 46 - .../fire/MeleeEnvironmentalFire.java | 34 - .../fire/MeleeOffensiveFire.java | 32 - .../fire/ProjectileDefaultFire.java | 68 - .../fire/ProjectileDefensiveFire.java | 47 - .../fire/ProjectileEnvironmentalFire.java | 42 - .../fire/ProjectileOffensiveFire.java | 47 - .../impactEffects/fire/SelfDefaultFire.java | 19 - .../impactEffects/fire/SelfDefensiveFire.java | 41 - .../fire/SelfEnvironmentalFire.java | 59 - .../impactEffects/fire/SelfOffensiveFire.java | 21 - .../impactEffects/fire/ToolDefaultFire.java | 35 - .../fire/ToolEnvironmentalFire.java | 51 - .../impactEffects/fire/ToolOffensiveFire.java | 21 - .../impactEffects/ice/MeleeDefaultIce.java | 29 - .../impactEffects/ice/MeleeDefensiveIce.java | 49 - .../ice/MeleeEnvironmentalIce.java | 40 - .../impactEffects/ice/MeleeOffensiveIce.java | 43 - .../ice/ProjectileDefaultIce.java | 38 - .../ice/ProjectileDefensiveIce.java | 49 - .../ice/ProjectileEnvironmentalIce.java | 35 - .../ice/ProjectileOffensiveIce.java | 32 - .../impactEffects/ice/SelfDefaultIce.java | 36 - .../impactEffects/ice/SelfDefensiveIce.java | 21 - .../ice/SelfEnvironmentalIce.java | 43 - .../impactEffects/ice/SelfOffensiveIce.java | 52 - .../impactEffects/ice/ToolDefaultIce.java | 30 - .../impactEffects/ice/ToolDefensiveIce.java | 59 - .../impactEffects/tool/DigAreaEffect.java | 58 - .../impactEffects/tool/DigAreaTunnel.java | 169 -- .../impactEffects/tool/ItemManipulator.java | 24 - .../impactEffects/tool/LeftClickEffect.java | 22 - .../tool/OnBreakBlockEffect.java | 17 - .../impactEffects/tool/RightClickEffect.java | 17 - .../impactEffects/tool/RightClickTunnel.java | 176 -- .../impactEffects/tool/SummonToolEffect.java | 17 - .../impactEffects/wind/MeleeDefaultWind.java | 40 - .../wind/MeleeDefensiveWind.java | 33 - .../wind/MeleeEnvironmentalWind.java | 37 - .../wind/MeleeOffensiveWind.java | 40 - .../wind/ProjectileDefaultWind.java | 30 - .../wind/ProjectileEnvironmentalWind.java | 48 - .../wind/ProjectileOffensiveWind.java | 33 - .../impactEffects/wind/SelfDefaultWind.java | 20 - .../impactEffects/wind/SelfDefensiveWind.java | 39 - .../wind/SelfEnvironmentalWind.java | 45 - .../impactEffects/wind/SelfOffensiveWind.java | 26 - .../impactEffects/wind/ToolDefensiveWind.java | 32 - .../wind/ToolEnvironmentalWind.java | 43 - .../impactEffects/wind/ToolOffensiveWind.java | 23 - .../common/spell/simple/HomSpell.java | 141 -- .../spell/simple/HomSpellComponent.java | 26 - .../common/spell/simple/HomSpellRegistry.java | 55 - .../common/spell/simple/ISimpleSpell.java | 16 - .../common/spell/simple/SpellEarthBender.java | 190 -- .../common/spell/simple/SpellExplosions.java | 104 - .../common/spell/simple/SpellFireBurst.java | 154 -- .../common/spell/simple/SpellFrozenWater.java | 209 -- .../common/spell/simple/SpellHolyBlast.java | 181 -- .../spell/simple/SpellLightningBolt.java | 132 -- .../common/spell/simple/SpellTeleport.java | 267 --- .../common/spell/simple/SpellWateryGrave.java | 171 -- .../common/spell/simple/SpellWindGust.java | 187 -- .../summoning/SummoningFallenAngel.java | 19 - .../common/summoning/SummoningHelperAW.java | 139 -- .../summoning/meteor/MeteorParadigm.java | 170 -- .../meteor/MeteorParadigmComponent.java | 54 - .../summoning/meteor/MeteorRegistry.java | 62 - .../common/thread/CommandDownloadGAPI.java | 38 - .../common/thread/GAPIChecker.java | 119 -- .../common/thread/ThreadDownloadGAPI.java | 96 - .../tileEntity/TEAlchemicalCalcinator.java | 400 ---- .../common/tileEntity/TEAltar.java | 954 --------- .../common/tileEntity/TEBelljar.java | 119 -- .../common/tileEntity/TEChemistrySet.java | 757 ------- .../common/tileEntity/TEConduit.java | 25 - .../common/tileEntity/TECrucible.java | 276 --- .../common/tileEntity/TEInventory.java | 175 -- .../common/tileEntity/TEMasterStone.java | 690 ------ .../common/tileEntity/TEMimicBlock.java | 239 --- .../common/tileEntity/TEOrientable.java | 108 - .../common/tileEntity/TEPedestal.java | 138 -- .../common/tileEntity/TEPlinth.java | 568 ----- .../common/tileEntity/TEReagentConduit.java | 551 ----- .../common/tileEntity/TESchematicSaver.java | 160 -- .../common/tileEntity/TESocket.java | 126 -- .../common/tileEntity/TESpectralBlock.java | 76 - .../tileEntity/TESpectralContainer.java | 149 -- .../common/tileEntity/TESpellBlock.java | 48 - .../common/tileEntity/TESpellEffectBlock.java | 48 - .../tileEntity/TESpellEnhancementBlock.java | 169 -- .../tileEntity/TESpellModifierBlock.java | 47 - .../tileEntity/TESpellParadigmBlock.java | 75 - .../common/tileEntity/TESpellTable.java | 126 -- .../common/tileEntity/TETeleposer.java | 268 --- .../tileEntity/container/ContainerAltar.java | 91 - .../container/ContainerTeleposer.java | 104 - .../container/ContainerWritingTable.java | 94 - .../tileEntity/gui/GuiChemistrySet.java | 43 - .../common/tileEntity/gui/GuiHandler.java | 88 - .../common/tileEntity/gui/GuiTeleposer.java | 40 - .../common/tweaker/Alchemy.java | 126 -- .../common/tweaker/Binding.java | 130 -- .../common/tweaker/BloodAltar.java | 133 -- .../common/tweaker/BloodOrb.java | 147 -- .../common/tweaker/FallingTower.java | 139 -- .../common/tweaker/HarvestMoon.java | 90 - .../common/tweaker/MTHelper.java | 82 - .../tweaker/MineTweakerIntegration.java | 19 - .../alchemicalWizardry/item/ItemBindable.java | 131 ++ .../alchemicalWizardry/item/ItemBloodOrb.java | 118 ++ .../alchemicalWizardry/proxy/ClientProxy.java | 23 + .../alchemicalWizardry/proxy/CommonProxy.java | 16 + .../registry/ModBlocks.java | 56 + .../registry/ModEntities.java | 8 + .../alchemicalWizardry/registry/ModItems.java | 63 + .../registry/ModPotions.java | 14 + .../alchemicalWizardry/tile/TileAltar.java | 143 ++ .../tile/TileInventory.java | 124 ++ .../alchemicalWizardry/util/Utils.java | 16 + .../util/helper/InventoryRenderHelper.java | 96 + .../assets/alchemicalwizardry/lang/en_US.lang | 530 +---- .../alchemicalwizardry/lang/en_US.lang_old | 542 +++++ .../{ => old}/COPY THIS - Copy (18).json | 0 .../block/{ => old}/COPY THIS - Copy.json | 0 .../models/block/{ => old}/COPY THIS.json | 0 .../models/block/{ => old}/base_rune.json | 0 .../block/{ => old}/base_rune_capacity.json | 0 .../block/{ => old}/bloodstone_brick.json | 0 .../block/{ => old}/efficiency_rune.json | 0 .../models/block/{ => old}/empty_socket.json | 0 .../block/{ => old}/enchantment_glyph.json | 0 .../models/block/{ => old}/filled_socket.json | 0 .../{ => old}/imperfect_ritual_stone.json | 0 .../{ => old}/large_bloodstone_brick.json | 0 .../block/{ => old}/master_ritual_stone.json | 0 .../block/{ => old}/sacrifice_rune.json | 0 .../block/{ => old}/self_sacrifice_rune.json | 0 .../block/{ => old}/soul_armour_forge.json | 0 .../block/{ => old}/spectral_block.json | 0 .../models/block/{ => old}/speed_rune.json | 0 .../models/block/{ => old}/spell_table.json | 0 .../block/{ => old}/stability_glyph.json | 0 .../models/block/{ => old}/teleposer.json | 0 .../models/item/ItemActivationCrystal0.json | 6 + .../models/item/ItemActivationCrystal1.json | 6 + .../models/item/ItemActivationCrystal2.json | 6 + .../models/item/ItemBloodOrbApprentice.json | 6 + .../models/item/ItemBloodOrbArchmage.json | 6 + .../models/item/ItemBloodOrbMagician.json | 6 + .../models/item/ItemBloodOrbMaster.json | 6 + .../models/item/ItemBloodOrbTranscendent.json | 6 + .../models/item/ItemBloodOrbWeak.json | 6 + .../models/item/ItemModelBase.json | 15 + .../models/item/ItemSacrificialDagger.json | 6 + .../models/item/ItemScribeTool1.json | 6 + .../models/item/ItemScribeTool2.json | 6 + .../models/item/ItemScribeTool3.json | 6 + .../models/item/ItemScribeTool4.json | 6 + .../models/item/ItemScribeTool5.json | 6 + .../models/item/ItemScribeTool6.json | 6 + .../models/item/ItemSigilAir.json | 6 + .../models/item/ItemSigilBloodLight.json | 6 + .../item/ItemSigilCompression_activated.json | 6 + .../ItemSigilCompression_deactivated.json | 6 + .../models/item/ItemSigilDivination.json | 6 + .../models/item/ItemSlate0.json | 6 + .../models/item/ItemSlate1.json | 6 + .../models/item/ItemSlate2.json | 6 + .../models/item/ItemSlate3.json | 6 + .../models/item/ItemTelepositionFocus0.json | 6 + .../models/item/ItemTelepositionFocus1.json | 6 + .../models/item/ItemTelepositionFocus2.json | 6 + .../models/item/ItemTelepositionFocus3.json | 6 + .../item/{ => old}/COPY THIS - Copy (15).json | 0 .../item/{ => old}/COPY THIS - Copy (16).json | 0 .../item/{ => old}/COPY THIS - Copy.json | 0 .../models/item/{ => old}/COPY THIS.json | 0 .../models/item/{ => old}/aether.json | 0 .../item/{ => old}/air_scribe_tool.json | 0 .../models/item/{ => old}/air_sigil.json | 0 .../models/item/{ => old}/alchemy_flask.json | 0 .../item/{ => old}/apprentice_blood_orb.json | 0 .../models/item/{ => old}/aquasalus.json | 0 .../item/{ => old}/archmage_blood_orb.json | 0 .../{ => old}/armour_inhibitor_activated.json | 0 .../armour_inhibitor_deactivated.json | 0 .../average_lengthening_catalyst.json | 0 .../{ => old}/average_power_catalyst.json | 0 ...e_alchemy_items_concentrated_catalyst.json | 0 .../base_alchemy_items_fractured_bone.json | 0 .../{ => old}/base_alchemy_items_offensa.json | 0 .../base_alchemy_items_orbis_terrae.json | 0 .../base_alchemy_items_potentia.json | 0 .../base_alchemy_items_praesidium.json | 0 .../base_alchemy_items_reductus.json | 0 ...e_alchemy_items_strengthened_catalyst.json | 0 .../{ => old}/base_alchemy_items_virtus.json | 0 .../item/{ => old}/base_items_cost_core.json | 0 .../base_items_cracked_runic_plate.json | 0 .../{ => old}/base_items_default_core.json | 0 .../{ => old}/base_items_defensive_core.json | 0 .../{ => old}/base_items_earthen_core.json | 0 .../item/{ => old}/base_items_empty_core.json | 0 .../{ => old}/base_items_ender_shard.json | 0 .../base_items_environmental_core.json | 0 .../{ => old}/base_items_ethereal_slate.json | 0 .../item/{ => old}/base_items_flame_core.json | 0 .../item/{ => old}/base_items_gust_core.json | 0 .../item/{ => old}/base_items_icy_core.json | 0 .../{ => old}/base_items_input_cable.json | 0 .../item/{ => old}/base_items_life_brace.json | 0 .../item/{ => old}/base_items_life_shard.json | 0 .../{ => old}/base_items_magicales_cable.json | 0 .../item/{ => old}/base_items_melee_core.json | 0 .../{ => old}/base_items_obsidian_brace.json | 0 .../{ => old}/base_items_offensive_core.json | 0 .../{ => old}/base_items_output_cable.json | 0 .../base_items_paradigm_back_plate.json | 0 .../{ => old}/base_items_potency_core.json | 0 .../item/{ => old}/base_items_power_core.json | 0 .../{ => old}/base_items_projectile_core.json | 0 .../item/{ => old}/base_items_quartz_rod.json | 0 .../{ => old}/base_items_runic_plate.json | 0 .../base_items_scribed_runic_plate.json | 0 .../item/{ => old}/base_items_self_core.json | 0 .../base_items_soul_runic_plate.json | 0 .../item/{ => old}/base_items_soul_shard.json | 0 .../{ => old}/base_items_stone_brace.json | 0 .../item/{ => old}/base_items_tool_core.json | 0 .../item/{ => old}/base_items_wood_brace.json | 0 .../models/item/{ => old}/blank_slate.json | 0 .../models/item/{ => old}/blank_spell.json | 0 .../item/{ => old}/blood_light_sigil.json | 0 .../item/{ => old}/bloodstone_brick.json | 0 .../models/item/{ => old}/bound_boots.json | 0 .../item/{ => old}/bound_chestplate.json | 0 .../models/item/{ => old}/bound_helmet.json | 0 .../models/item/{ => old}/bound_leggings.json | 0 .../models/item/{ => old}/bucket_life.json | 0 .../item/{ => old}/complex_spell_crystal.json | 0 .../compression_sigil_activated.json | 0 .../compression_sigil_deactivated.json | 0 .../item/{ => old}/creative_dagger.json | 0 .../models/item/{ => old}/creative_orb.json | 0 .../models/item/{ => old}/crepitous.json | 0 .../models/item/{ => old}/crystallos.json | 0 .../item/{ => old}/dagger_of_sacrifice.json | 0 .../item/{ => old}/demon_blood_shard.json | 0 .../models/item/{ => old}/demon_crystal.json | 0 .../models/item/{ => old}/demonic_slate.json | 0 .../{ => old}/demonic_teleposition_focus.json | 0 .../item/{ => old}/divination_sigil.json | 0 .../item/{ => old}/dusk_scribe_tool.json | 0 .../item/{ => old}/earth_scribe_tool.json | 0 .../item/{ => old}/efficiency_rune.json | 0 .../models/item/{ => old}/empty_socket.json | 0 .../item/{ => old}/enchantment_glyph.json | 0 .../{ => old}/energy_blaster_activated.json | 0 .../{ => old}/enhanced_filling_agent.json | 0 .../enhanced_teleposition_focus.json | 0 .../models/item/{ => old}/filled_socket.json | 0 .../item/{ => old}/fire_scribe_tool.json | 0 .../greater_lengthening_catalyst.json | 0 .../{ => old}/greater_power_catalyst.json | 0 .../{ => old}/growth_sigil_activated.json | 0 .../{ => old}/growth_sigil_deactivated.json | 0 .../{ => old}/harvest_sigil_activated.json | 3 +- .../{ => old}/harvest_sigil_deactivated.json | 0 .../models/item/{ => old}/imbued_slate.json | 0 .../{ => old}/imperfect_ritual_stone.json | 0 .../models/item/{ => old}/incendium.json | 0 .../models/item/{ => old}/key_of_binding.json | 0 .../{ => old}/large_bloodstone_brick.json | 0 .../models/item/{ => old}/lava_crystal.json | 0 .../models/item/{ => old}/lava_sigil.json | 0 .../models/item/{ => old}/magicales.json | 0 .../item/{ => old}/magician_blood_orb.json | 0 .../item/{ => old}/master_blood_orb.json | 0 .../item/{ => old}/master_ritual_stone.json | 0 .../models/item/{ => old}/multi_tool.json | 0 .../mundane_lengthening_catalyst.json | 0 .../{ => old}/mundane_power_catalyst.json | 0 .../item/{ => old}/reinforced_slate.json | 0 .../reinforced_teleposition_focus.json | 0 .../models/item/{ => old}/ritual_diviner.json | 0 .../models/item/{ => old}/sacrifice_rune.json | 0 .../item/{ => old}/sacrificial_dagger.json | 0 .../models/item/{ => old}/sanctus.json | 0 .../item/{ => old}/self_sacrifice_rune.json | 0 ...sigil_of_elemental_affinity_activated.json | 0 ...gil_of_elemental_affinity_deactivated.json | 0 .../sigil_of_ender_severance_activated.json | 0 .../sigil_of_ender_severance_deactivated.json | 0 .../{ => old}/sigil_of_haste_activated.json | 0 .../{ => old}/sigil_of_haste_deactivated.json | 0 .../models/item/{ => old}/sigil_of_sight.json | 0 .../sigil_of_the_bridge_activated.json | 0 .../sigil_of_the_bridge_deactivated.json | 0 .../sigil_of_the_fast_miner_activated.json | 0 .../sigil_of_the_fast_miner_deactivated.json | 0 .../{ => old}/sigil_of_wind_activated.json | 0 .../{ => old}/sigil_of_wind_deactivated.json | 0 .../item/{ => old}/simple_catalyst.json | 0 .../item/{ => old}/soul_armour_forge.json | 0 .../models/item/{ => old}/spectral_block.json | 0 .../models/item/{ => old}/speed_rune.json | 0 .../models/item/{ => old}/spell_table.json | 0 .../item/{ => old}/stability_glyph.json | 0 .../{ => old}/standard_binding_agent.json | 0 .../{ => old}/standard_filling_agent.json | 0 .../models/item/{ => old}/standard_item.json | 0 .../models/item/{ => old}/teleposer.json | 0 .../item/{ => old}/teleposition_focus.json | 0 .../models/item/{ => old}/tennebrae.json | 0 .../models/item/{ => old}/terrae.json | 0 .../{ => old}/transcendent_blood_orb.json | 0 .../models/item/{ => old}/void_sigil.json | 0 .../item/{ => old}/water_scribe_tool.json | 0 .../models/item/{ => old}/water_sigil.json | 0 .../item/{ => old}/weak_binding_agent.json | 0 .../models/item/{ => old}/weak_blood_orb.json | 0 .../item/{ => old}/weak_blood_shard.json | 0 .../item/{ => old}/weak_filling_agent.json | 0 src/main/resources/mcmod.info | 8 +- 973 files changed, 3313 insertions(+), 82171 deletions(-) delete mode 100644 build.properties create mode 100644 gradle.properties create mode 100644 settings.gradle delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/ConfigHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/ModItems.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/altar/BloodAltar.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/AlchemicalWizardryAPI.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/BlockStack.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/ColourAndCoords.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/DamageSourceBloodMagic.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/ILimitingLogic.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/Int3.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/NBTHolder.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusLogic.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusParadigm.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusPosAndFacing.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/Vector3.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemicalPotionCreationHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyPotionHandlerComponent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyPotionHelper.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipe.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipeRegistry.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IAlchemyGoggles.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentContainer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ISegmentedReagentHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/Reagent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentContainer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentContainerInfo.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentRegistry.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentStack.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileReagentHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/altar/AltarComponent.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/altar/AltarRecipe.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/altar/AltarUpgrade.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipe.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipeRegistry.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/IFadedRune.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRecipe.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRegistry.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRecipe.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRegistry.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionRegistry.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/enumeration/EnumAltarComponent.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/enumeration/EnumAltarTier.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/enumeration/EnumStoneType.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainInContainerEvent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainNetworkEvent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerAddToNetworkEvent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerDrainNetworkEvent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/event/RitualActivatedEvent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/event/RitualEvent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/event/RitualRunEvent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/event/RitualStopEvent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/event/SacrificeKnifeUsedEvent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/guide/OrbRecipeRenderer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/guide/PageAltarRecipe.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/guide/PageMultiBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/guide/PageRitualMultiBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/harvest/IHarvestHandler.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/iface/IAltarComponent.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/iface/IBindable.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/iface/IBloodAltar.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/items/IAltarManipulator.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/items/ShapedBloodOrbRecipe.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ArmourUpgrade.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IBindable.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IBloodOrb.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IHolding.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ILPGauge.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IReagentManipulator.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IRitualDiviner.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ISigil.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/network/SoulNetwork.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/orb/BloodOrb.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/orb/IBloodOrb.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/package-info.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/registry/AltarRecipeRegistry.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/registry/OrbRegistry.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/renderer/MRSRenderer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/rituals/IMasterRitualStone.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/rituals/IRitualStone.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/rituals/ITileRitualStone.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/rituals/LocalRitualStorage.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualBreakMethod.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualComponent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/IIncense.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/PlayerSacrificeHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/LifeEssenceNetwork.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellModifier.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellType.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/ExtrapolatedMeleeEntityEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/IDigAreaEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/IItemManipulator.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/ILeftClickEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/IMeleeSpellEntityEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/IMeleeSpellWorldEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBanishTool.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBreakBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnSummonTool.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/IProjectileImpactEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/IProjectileUpdateEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/IRightClickEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/ISelfSpellEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/ISpecialDamageEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/IToolUpdateEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellCenteredWorldEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellWorldEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/ProjectileImpactEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/ProjectileUpdateEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/SelfSpellEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffectRegistry.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancement.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementCost.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementPotency.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementPower.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigm.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmMelee.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmProjectile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmSelf.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningHelper.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistry.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistryComponent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/tile/IBloodAltar.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellParadigmTile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellTile.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/util/helper/BindableHelper.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/util/helper/LogHelper.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/util/helper/NetworkHelper.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/util/helper/PlayerHelper.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/api/util/helper/TextHelper.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/block/BlockAltar.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/block/BlockLifeEssence.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/ClientEventHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/InventoryRenderHelper.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/KeyBindings.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBindingRitualHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/renderer/ColourThreshold.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDElement.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDUtils.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderFakeBlocks.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/ArmourComponent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/ClientToServerPacketHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/CoordAndRange.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggroCloaking.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/IBindingAgent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/ICatalyst.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/IDemon.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/IFillingAgent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/ItemType.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/LifeEssence.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/MessageKeyPressed.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/PlinthComponent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementTrigger.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsMod.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/achievements/ICraftAchievement.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/achievements/IPickupAchievement.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionComponent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionRegistry.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/alchemy/ICombinationalCatalyst.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicalCalcinator.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockArmourForge.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodRune.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodStoneBrick.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockConduit.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrystal.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockDemonPortal.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEfficiencyRune.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEmptySocket.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockFilledSocket.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockImperfectRitualStone.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockIncenseCrucible.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLargeBloodStoneBrick.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLifeEssence.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMimic.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockOrientable.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockReagentConduit.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRitualStone.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSacrifice.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSelfSacrifice.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectral.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectralContainer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpeedRune.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEnhancement.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellModifier.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/IOrientable.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarComponent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarUpgradeComponent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/book/BloodMagicGuide.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/compress/AdvancedCompressionHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/compress/BaseCompressionHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingManager.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingRecipeAssimilator.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonBuilding.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonCrosspath.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonVillagePath.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpace.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpaceHolder.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityAIOccasionalRangedAttack.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/IOccasionalRangedAttackMob.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonHoardPacket.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketMinorGrunt.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketRegistry.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonType.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGrunt.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardian.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/IHoardDemon.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/BlockDemonChest.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/IBlockPortalNode.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/IRoadWard.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/ITilePortalNode.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonChest.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/BookEntityItem.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityAirElemental.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityEarthElemental.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityParticleBeam.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/guide/RecipeHolder.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericItemStackHarvestHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/harvest/PamHarvestCompatRegistry.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/BaseItems.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/BindableItems.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/BoundBlade.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeOrb.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/DemonCrystal.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/DemonicTelepositionFocus.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlaster.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/EnhancedTelepositionFocus.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/FireScribeTool.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ItemCrystalBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ItemEnchantmentGlyphBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEffectBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEnhancementBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellModifierBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellParadigmBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ItemStabilityGlyphBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/KeyOfBinding.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/LifeBucket.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/MagicianBloodOrb.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/Orb.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/ScribeTool.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalCleanser.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalRouter.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalSegmenter.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/forestry/ItemBloodFrame.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/potion/PowerCatalyst.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/routing/ILimitedRoutingFocus.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/routing/OutputRoutingFocus.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/routing/RoutingFocus.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilCompress.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilFluid.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilToggleable.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ContainerHolding.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/GuiHolding.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketProcessor.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/InventoryHolding.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ScrollHelper.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigm.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaRegistry.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureParameters.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/omega/ReagentRegenConfiguration.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBloodMagic.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicalCalcinator.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAltar.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderChemistrySet.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderMasterStone.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderReagentConduit.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEffectBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEnhancementBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellModifierBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellParadigmBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAlchemicalCalcinatorItemRenderer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAltarItemRenderer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEChemistrySetItemRenderer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEConduitItemRenderer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEffectBlockItemRenderer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEnhancementBlockItemRenderer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellModifierBlockItemRenderer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellParadigmBlockItemRenderer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGrunt.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGruntGuardian.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelAlchemicalCalcinator.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBileDemon.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBoulderFist.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelChemistrySet.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelCrystalBelljar.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelEnergyBazookaMainProjectile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelFallenAngel.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelIceDemon.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelLowerGuardian.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMeteor.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMinorDemonGrunt.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMinorDemonGruntGuardian.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaArmour.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaWater.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelPedestal.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelPlinth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelShade.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSmallEarthGolem.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEffectBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEnhancementBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellModifierBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellParadigmBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelWingedFireDemon.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/LocalStorageAlphaPact.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAlphaPact.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicIgnMeta.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimit.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitDefault.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitGlobal.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitIgnMeta.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitMatchNBT.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitModItems.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicMatchNBT.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifier.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefault.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefensive.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierEnvironmental.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierOffensive.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/OutputRoutingFocusModItems.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefaultEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefensiveEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeEnvironmentalEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeOffensiveEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefaultEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefensiveEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileEnvironmentalEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileOffensiveEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefaultEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefensiveEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfEnvironmentalEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfOffensiveEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefaultEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefensiveEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolEnvironmentalEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolOffensiveEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeDefaultFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeDefensiveFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeEnvironmentalFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeOffensiveFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileDefaultFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileDefensiveFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileEnvironmentalFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileOffensiveFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfDefaultFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfDefensiveFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfEnvironmentalFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfOffensiveFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolDefaultFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolDefensiveFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolEnvironmentalFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolOffensiveFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeDefaultIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeDefensiveIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeEnvironmentalIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeOffensiveIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileDefaultIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileDefensiveIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileEnvironmentalIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileOffensiveIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfDefaultIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfDefensiveIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfEnvironmentalIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfOffensiveIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolDefaultIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolDefensiveIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolEnvironmentalIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolOffensiveIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefaultWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefensiveWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeEnvironmentalWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeOffensiveWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefaultWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefensiveWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileEnvironmentalWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileOffensiveWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfDefaultWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfDefensiveWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfEnvironmentalWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfOffensiveWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolDefaultWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolDefensiveWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolEnvironmentalWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolOffensiveWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefaultEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefensiveEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeEnvironmentalEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeOffensiveEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefaultEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefensiveEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileEnvironmentalEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileOffensiveEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefaultEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefensiveEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfEnvironmentalEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfOffensiveEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolEnvironmentalEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolOffensiveEarth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefaultFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefensiveFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeEnvironmentalFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeOffensiveFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefaultFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefensiveFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileEnvironmentalFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileOffensiveFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefaultFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefensiveFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfEnvironmentalFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfOffensiveFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolDefaultFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolEnvironmentalFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolOffensiveFire.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefaultIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefensiveIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeEnvironmentalIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeOffensiveIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefaultIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefensiveIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileEnvironmentalIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileOffensiveIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefaultIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefensiveIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfEnvironmentalIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfOffensiveIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefaultIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefensiveIce.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaTunnel.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/ItemManipulator.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/LeftClickEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/OnBreakBlockEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickTunnel.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/SummonToolEffect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeDefaultWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeDefensiveWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeEnvironmentalWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeOffensiveWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileDefaultWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileEnvironmentalWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileOffensiveWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfDefaultWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfDefensiveWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfEnvironmentalWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfOffensiveWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolDefensiveWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolEnvironmentalWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolOffensiveWind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpell.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellComponent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellRegistry.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/summoning/SummoningFallenAngel.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/summoning/SummoningHelperAW.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigmComponent.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/thread/CommandDownloadGAPI.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/thread/GAPIChecker.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/thread/ThreadDownloadGAPI.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicalCalcinator.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBelljar.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEChemistrySet.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEInventory.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEOrientable.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralContainer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellTable.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerAltar.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerTeleposer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiChemistrySet.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MineTweakerIntegration.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/item/ItemBindable.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/item/ItemBloodOrb.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/proxy/ClientProxy.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/proxy/CommonProxy.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/registry/ModBlocks.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/registry/ModEntities.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/registry/ModItems.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/registry/ModPotions.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/tile/TileAltar.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/tile/TileInventory.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/util/Utils.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/util/helper/InventoryRenderHelper.java create mode 100644 src/main/resources/assets/alchemicalwizardry/lang/en_US.lang_old rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/COPY THIS - Copy (18).json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/COPY THIS - Copy.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/COPY THIS.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/base_rune.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/base_rune_capacity.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/bloodstone_brick.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/efficiency_rune.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/empty_socket.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/enchantment_glyph.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/filled_socket.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/imperfect_ritual_stone.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/large_bloodstone_brick.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/master_ritual_stone.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/sacrifice_rune.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/self_sacrifice_rune.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/soul_armour_forge.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/spectral_block.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/speed_rune.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/spell_table.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/stability_glyph.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/block/{ => old}/teleposer.json (100%) create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemActivationCrystal0.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemActivationCrystal1.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemActivationCrystal2.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbApprentice.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbArchmage.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbMagician.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbMaster.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbTranscendent.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbWeak.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemModelBase.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemSacrificialDagger.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool1.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool2.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool3.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool4.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool5.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool6.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilAir.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilBloodLight.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilCompression_activated.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilCompression_deactivated.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilDivination.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemSlate0.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemSlate1.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemSlate2.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemSlate3.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemTelepositionFocus0.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemTelepositionFocus1.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemTelepositionFocus2.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/ItemTelepositionFocus3.json rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/COPY THIS - Copy (15).json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/COPY THIS - Copy (16).json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/COPY THIS - Copy.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/COPY THIS.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/aether.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/air_scribe_tool.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/air_sigil.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/alchemy_flask.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/apprentice_blood_orb.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/aquasalus.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/archmage_blood_orb.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/armour_inhibitor_activated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/armour_inhibitor_deactivated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/average_lengthening_catalyst.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/average_power_catalyst.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_alchemy_items_concentrated_catalyst.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_alchemy_items_fractured_bone.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_alchemy_items_offensa.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_alchemy_items_orbis_terrae.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_alchemy_items_potentia.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_alchemy_items_praesidium.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_alchemy_items_reductus.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_alchemy_items_strengthened_catalyst.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_alchemy_items_virtus.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_cost_core.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_cracked_runic_plate.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_default_core.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_defensive_core.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_earthen_core.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_empty_core.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_ender_shard.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_environmental_core.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_ethereal_slate.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_flame_core.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_gust_core.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_icy_core.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_input_cable.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_life_brace.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_life_shard.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_magicales_cable.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_melee_core.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_obsidian_brace.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_offensive_core.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_output_cable.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_paradigm_back_plate.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_potency_core.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_power_core.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_projectile_core.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_quartz_rod.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_runic_plate.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_scribed_runic_plate.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_self_core.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_soul_runic_plate.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_soul_shard.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_stone_brace.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_tool_core.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/base_items_wood_brace.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/blank_slate.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/blank_spell.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/blood_light_sigil.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/bloodstone_brick.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/bound_boots.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/bound_chestplate.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/bound_helmet.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/bound_leggings.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/bucket_life.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/complex_spell_crystal.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/compression_sigil_activated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/compression_sigil_deactivated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/creative_dagger.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/creative_orb.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/crepitous.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/crystallos.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/dagger_of_sacrifice.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/demon_blood_shard.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/demon_crystal.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/demonic_slate.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/demonic_teleposition_focus.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/divination_sigil.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/dusk_scribe_tool.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/earth_scribe_tool.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/efficiency_rune.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/empty_socket.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/enchantment_glyph.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/energy_blaster_activated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/enhanced_filling_agent.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/enhanced_teleposition_focus.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/filled_socket.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/fire_scribe_tool.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/greater_lengthening_catalyst.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/greater_power_catalyst.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/growth_sigil_activated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/growth_sigil_deactivated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/harvest_sigil_activated.json (94%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/harvest_sigil_deactivated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/imbued_slate.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/imperfect_ritual_stone.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/incendium.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/key_of_binding.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/large_bloodstone_brick.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/lava_crystal.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/lava_sigil.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/magicales.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/magician_blood_orb.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/master_blood_orb.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/master_ritual_stone.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/multi_tool.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/mundane_lengthening_catalyst.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/mundane_power_catalyst.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/reinforced_slate.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/reinforced_teleposition_focus.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/ritual_diviner.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/sacrifice_rune.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/sacrificial_dagger.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/sanctus.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/self_sacrifice_rune.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/sigil_of_elemental_affinity_activated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/sigil_of_elemental_affinity_deactivated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/sigil_of_ender_severance_activated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/sigil_of_ender_severance_deactivated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/sigil_of_haste_activated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/sigil_of_haste_deactivated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/sigil_of_sight.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/sigil_of_the_bridge_activated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/sigil_of_the_bridge_deactivated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/sigil_of_the_fast_miner_activated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/sigil_of_the_fast_miner_deactivated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/sigil_of_wind_activated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/sigil_of_wind_deactivated.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/simple_catalyst.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/soul_armour_forge.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/spectral_block.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/speed_rune.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/spell_table.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/stability_glyph.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/standard_binding_agent.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/standard_filling_agent.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/standard_item.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/teleposer.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/teleposition_focus.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/tennebrae.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/terrae.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/transcendent_blood_orb.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/void_sigil.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/water_scribe_tool.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/water_sigil.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/weak_binding_agent.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/weak_blood_orb.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/weak_blood_shard.json (100%) rename src/main/resources/assets/alchemicalwizardry/models/item/{ => old}/weak_filling_agent.json (100%) diff --git a/build.gradle b/build.gradle index 810e174a..3f59b8b2 100644 --- a/build.gradle +++ b/build.gradle @@ -1,70 +1,59 @@ buildscript { repositories { mavenCentral() - maven { url = "http://files.minecraftforge.net/maven" } - maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" } + maven { url "http://files.minecraftforge.net/maven" } + maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { - classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' - classpath 'org.ajoberstar:gradle-git:0.10.1' + classpath 'net.minecraftforge.gradle:ForgeGradle:2.0-SNAPSHOT' + classpath 'org.ajoberstar:gradle-git:0.10.1' } } -apply plugin: 'forge' - -ext.configFile = file "build.properties" -configFile.withReader { - def prop = new Properties() - prop.load(it) - project.ext.config = new ConfigSlurper().parse prop +plugins { + id 'com.matthewprenger.cursegradle' version '1.0.1' + id "net.minecraftforge.gradle.forge" version "2.0.2" + id 'net.franz-becker.gradle-lombok' version '1.5' } -version = config.mc_version + "-" + config.mod_version + "-" + config.build_number -group= config.package_group -archivesBaseName = config.mod_name +apply plugin: 'maven-publish' -import org.ajoberstar.grgit.Grgit +def build_number = 'CUSTOM' +if (System.getenv('BUILD_NUMBER') != null) + build_number = System.getenv('BUILD_NUMBER') + +group = package_group +archivesBaseName = mod_name +version = "${mc_version}-${mod_version}-${build_number}" + +// Ignore this error. It'll work just fine when building. +import org.ajoberstar.grgit.* + +ext.repo = Grgit.open(project.file('.')) def gitHash = 'unknown' -if (new File(projectDir, '.git').exists()) { - def repo = Grgit.open(project.file('.')) + +if (new File(projectDir, '.git').exists()) gitHash = repo.log().find().abbreviatedId -} repositories { - maven { - name 'CB Maven FS' - url "http://chickenbones.net/maven/" - } - maven { - name 'DVS1 Maven FS' - url 'http://dvs1.progwml6.com/files/maven' - } - maven { - name 'TehNut Repo' - url 'http://tehnut.info/maven/' - } - ivy { - name "MineTweaker3" - artifactPattern "http://minetweaker3.powerofbytes.com/download/[module]-[revision].[ext]" - } + } dependencies { -// compile "codechicken:CodeChickenLib:" + config.mc_version + "-" + config.cclib_version + ":dev" -// compile "codechicken:CodeChickenCore:" + config.mc_version + "-" + config.ccc_version + ":dev" -// compile "codechicken:NotEnoughItems:" + config.mc_version + "-" + config.nei_version + ":dev" -// compile name: 'MineTweaker3', version: config.minetweaker_version, ext: 'jar' -// compile "codechicken:ForgeMultipart:1.7.10-1.1.0.314:dev" -// compile "info.amerifrance.guideapi:Guide-API:" + config.mc_version + "-" + config.guideapi_version + ":deobf" + } minecraft { - version = config.mc_version + "-" + config.forge_version + version = "${mc_version}-${forge_version}" runDir = "run" - - replaceIn "GAPIChecker.java" - replace "@VERSION@", config.guideapi_version + + replace "@VERSION@", project.version + replaceIn "AlchemicalWizardry.java" + replaceIn "AlchemicalWizardryAPI.java" + + if (project.hasProperty('mappings_version')) + mappings = project.mappings_version } processResources { @@ -77,61 +66,91 @@ processResources { expand 'version': project.version, 'mcversion': project.minecraft.version } + from(sourceSets.main.resources.srcDirs) { exclude '**/*.info' exclude '**/*.properties' - exclude '**/*.db' } } jar { - dependsOn "incrementBuildNumber" - classifier = '' - manifest.mainAttributes( - "Built-By": System.getProperty('user.name'), - "Created-By": "${System.getProperty('java.vm.version')} + (${System.getProperty('java.vm.vendor')})", - "Implementation-Title": project.name, - "Implementation-Version": project.version, - "Git-Hash": gitHash + classifier = '' + manifest.mainAttributes( + "Built-By": System.getProperty('user.name'), + "Created-By": "${System.getProperty('java.vm.version')} + (${System.getProperty('java.vm.vendor')})", + "Implementation-Title": project.name, + "Implementation-Version": project.version, + "Git-Hash": gitHash ) } -// add a source jar -task sourceJar(type: Jar) { - from sourceSets.main.allSource - classifier = 'sources' +lombok { + version = "1.16.6" + sha256 = "e0a471be03e1e6b02bf019480cec7a3ac9801702bf7bf62f15d077ad4df8dd5d" } -// add a javadoc jar +// Ignore this one, too +import net.franz_becker.gradle.lombok.task.DelombokTask + +task delombok(type: DelombokTask) { + args("src/main/java", "-d", "build/sources/delomboked/java") +} + +tasks.eclipse.dependsOn installLombok + +// Javadoc jar task javadocJar(type: Jar, dependsOn: javadoc) { from javadoc.destinationDir classifier = 'javadoc' } -// because the normal output has been made to be obfuscated +// Deobfuscated jar task deobfJar(type: Jar) { from sourceSets.main.output classifier = 'deobf' } +javadoc { + source = projectDir.path + "/build/sources/delomboked/java" +} + +tasks.javadoc.dependsOn delombok tasks.build.dependsOn sourceJar, javadocJar, deobfJar tasks.withType(JavaCompile) { task -> task.options.encoding = 'UTF-8' } -task("incrementBuildNumber") { - // increment build number - doFirst { - // increment - config.build_number = (config.build_number.toString().toInteger()) + 1 - - // write back to the file - configFile.withWriter { - config.toProperties().store(it, "") - } - } +publishing { + tasks.publish.dependsOn 'build' + publications { + mavenJava(MavenPublication) { + artifact jar + artifact sourceJar + artifact javadocJar + artifact deobfJar + } + } + repositories { + if (project.hasProperty('maven_repo')) { + maven { url maven_repo } + } else { + mavenLocal() + } + } } -// Uncomment this line if you want to auto-upload to CurseForge when you build. This requires you to setup curse.gradle yourself. -// fileTree('gradle').include('curse.gradle').collect().sort().each { apply from: it } \ No newline at end of file +curseforge { + if (project.hasProperty('curse_key')) + apiKey = project.curse_key + + project { + id = "${curse_id}" + changelog = project.hasProperty('changelog') ? project.changelog : '' + releaseType = 'alpha' + + addArtifact deobfJar + addArtifact sourceJar + addArtifact javadocJar + } +} \ No newline at end of file diff --git a/build.properties b/build.properties deleted file mode 100644 index c1994c31..00000000 --- a/build.properties +++ /dev/null @@ -1,14 +0,0 @@ -# -#Thu Aug 13 06:05:36 EDT 2015 -mod_name=BloodMagic -forge_version=11.14.3.1499 -ccc_version=1.0.5.34 -cclib_version=1.1.2.133 -nei_version=1.0.5.82 -//=Dependency Information -guideapi_version=1.0.1-20 -package_group=com.wayoftime.bloodmagic -mod_version=1.4.0 -minetweaker_version=Dev-1.7.10-3.0.9B -build_number=2 -mc_version=1.8 diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000..e062d0f4 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,8 @@ +mod_name=BloodMagic +package_group=com.wayoftime.bloodmagic +mod_version=2.0.0 +mc_version=1.8 +forge_version=latest +curse_id=224791 + +mappings_version=snapshot_20141130 \ No newline at end of file diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 00000000..af2ab34f --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'BloodMagic' \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index 60bf2a37..cbb74a6f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -1,1873 +1,70 @@ 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.List; -import java.util.zip.ZipEntry; -import java.util.zip.ZipInputStream; - +import WayofTime.alchemicalWizardry.api.util.helper.LogHelper; +import WayofTime.alchemicalWizardry.registry.ModBlocks; +import WayofTime.alchemicalWizardry.registry.ModEntities; +import WayofTime.alchemicalWizardry.registry.ModItems; +import WayofTime.alchemicalWizardry.registry.ModPotions; +import WayofTime.alchemicalWizardry.proxy.CommonProxy; +import WayofTime.alchemicalWizardry.util.helper.InventoryRenderHelper; +import lombok.Getter; 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.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.Mod.EventHandler; -import net.minecraftforge.fml.common.Mod.Instance; -import net.minecraftforge.fml.common.ModContainer; import net.minecraftforge.fml.common.SidedProxy; -import net.minecraftforge.fml.common.event.FMLInitializationEvent; -import net.minecraftforge.fml.common.event.FMLInterModComms; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; -import net.minecraftforge.fml.common.network.NetworkRegistry; -import net.minecraftforge.fml.common.registry.EntityRegistry; -import net.minecraftforge.fml.common.registry.GameRegistry; -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 java.io.File; +import java.util.Locale; -//import thaumcraft.api.ItemApi; -//import thaumcraft.api.ThaumcraftApi; -//import thaumcraft.api.aspects.Aspect; -//import thaumcraft.api.aspects.AspectList; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; -import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; -import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; -import WayofTime.alchemicalWizardry.api.bindingRegistry.UnbindingRegistry; -import WayofTime.alchemicalWizardry.api.compress.CompressionRegistry; -import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; -import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; -import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; -import WayofTime.alchemicalWizardry.api.rituals.Rituals; -import WayofTime.alchemicalWizardry.api.soulNetwork.ComplexNetworkHandler; -import WayofTime.alchemicalWizardry.api.spell.SpellEffectRegistry; -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.summoningRegistry.SummoningRegistry; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardryFuelHandler; -import WayofTime.alchemicalWizardry.common.ClientToServerPacketHandler; -import WayofTime.alchemicalWizardry.common.CommonProxy; -import WayofTime.alchemicalWizardry.common.LifeBucketHandler; -import WayofTime.alchemicalWizardry.common.LifeEssence; -import WayofTime.alchemicalWizardry.common.ModLivingDropsEvent; -import WayofTime.alchemicalWizardry.common.NewPacketHandler; -import WayofTime.alchemicalWizardry.common.achievements.ModAchievements; -import WayofTime.alchemicalWizardry.common.alchemy.CombinedPotionRegistry; -import WayofTime.alchemicalWizardry.common.block.BlockArmourForge; -import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars; -import WayofTime.alchemicalWizardry.common.compress.AdvancedCompressionHandler; -import WayofTime.alchemicalWizardry.common.compress.BaseCompressionHandler; -import WayofTime.alchemicalWizardry.common.compress.StorageBlockCraftingManager; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.DemonPacketMinorGrunt; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.DemonPacketRegistry; -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.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 WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntIce; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntWind; -import WayofTime.alchemicalWizardry.common.demonVillage.loot.DemonVillageLootRegistry; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonChest; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityAirElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBileDemon; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBoulderFist; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityEarthElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFireElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityHolyElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityShade; -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 WayofTime.alchemicalWizardry.common.harvest.BloodMagicHarvestHandler; -import WayofTime.alchemicalWizardry.common.harvest.CactusReedHarvestHandler; -import WayofTime.alchemicalWizardry.common.harvest.GourdHarvestHandler; -import WayofTime.alchemicalWizardry.common.items.ItemIncense; -import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; -import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; -//import WayofTime.alchemicalWizardry.common.items.forestry.ItemBloodFrame; -import WayofTime.alchemicalWizardry.common.items.sigil.holding.HoldingPacketHandler; -import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmEarth; -import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmFire; -import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmWater; -import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmWind; -import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; -import WayofTime.alchemicalWizardry.common.potion.PotionBloodMagic; -import WayofTime.alchemicalWizardry.common.renderer.AlchemyCircleRenderer; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAnimalGrowth; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAutoAlchemy; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectBinding; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectBiomeChanger; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectContainment; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectCrafting; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectCrushing; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectDemonPortal; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectEllipsoid; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectEvaporation; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectExpulsion; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectFeatheredEarth; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectFeatheredKnife; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectFlight; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectFullStomach; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectGrowth; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectHarvest; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectHealing; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectInterdiction; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectItemRouting; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectItemSuction; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectJumping; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectLava; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectLeap; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectLifeConduit; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectMagnetic; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectOmegaStalling; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectOmegaTest; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSpawnWard; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSphereCreator; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSummonMeteor; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSupression; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectUnbinding; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectVeilOfEvil; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectWater; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectWellOfSuffering; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEMeleeDefaultEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEMeleeDefensiveEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEMeleeEnvironmentalEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEMeleeOffensiveEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEProjectileDefaultEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEProjectileDefensiveEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEProjectileEnvironmentalEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEProjectileOffensiveEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSESelfDefaultEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSESelfDefensiveEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSESelfEnvironmentalEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSESelfOffensiveEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEToolDefaultEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEToolDefensiveEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEToolEnvironmentalEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEToolOffensiveEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEMeleeDefaultFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEMeleeDefensiveFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEMeleeEnvironmentalFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEMeleeOffensiveFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEProjectileDefaultFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEProjectileDefensiveFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEProjectileEnvironmentalFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEProjectileOffensiveFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSESelfDefaultFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSESelfDefensiveFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSESelfEnvironmentalFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSESelfOffensiveFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEToolDefaultFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEToolDefensiveFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEToolEnvironmentalFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEToolOffensiveFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEMeleeDefaultIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEMeleeDefensiveIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEMeleeEnvironmentalIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEMeleeOffensiveIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEProjectileDefaultIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEProjectileDefensiveIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEProjectileEnvironmentalIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEProjectileOffensiveIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSESelfDefaultIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSESelfDefensiveIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSESelfEnvironmentalIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSESelfOffensiveIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEToolDefaultIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEToolDefensiveIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEToolEnvironmentalIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEToolOffensiveIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEMeleeDefaultWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEMeleeDefensiveWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEMeleeEnvironmentalWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEMeleeOffensiveWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEProjectileDefaultWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEProjectileDefensiveWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEProjectileEnvironmentalWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEProjectileOffensiveWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSESelfDefaultWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSESelfDefensiveWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSESelfEnvironmentalWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSESelfOffensiveWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEToolDefaultWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEToolDefensiveWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEToolEnvironmentalWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEToolOffensiveWind; -import WayofTime.alchemicalWizardry.common.spell.simple.HomSpellRegistry; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellEarthBender; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellExplosions; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellFireBurst; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellFrozenWater; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellHolyBlast; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellLightningBolt; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellWateryGrave; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellWindGust; -import WayofTime.alchemicalWizardry.common.summoning.SummoningHelperAW; -import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; -import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; -import WayofTime.alchemicalWizardry.common.tileEntity.TECrucible; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMimicBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TEOrientable; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; -import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; -import WayofTime.alchemicalWizardry.common.tileEntity.TESchematicSaver; -import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellTable; -import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiHandler; -//import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration; +@Mod(modid = AlchemicalWizardry.MODID, name = AlchemicalWizardry.NAME, version = AlchemicalWizardry.VERSION, dependencies = AlchemicalWizardry.DEPEND, guiFactory = "WayofTime.alchemicalWizardry.client.gui.ConfigGuiFactory") +@Getter +public class AlchemicalWizardry { + public static final String MODID = "AlchemicalWizardry"; + public static final String NAME = "Blood Magic: Alchemical Wizardry"; + public static final String VERSION = "@VERSION@"; + public static final String DEPEND = ""; + public static final String DOMAIN = MODID.toLowerCase(Locale.ENGLISH) + ":"; -@Mod(modid = "AlchemicalWizardry", name = "AlchemicalWizardry", version = "v1.3.3", guiFactory = "WayofTime.alchemicalWizardry.client.gui.ConfigGuiFactory") -public class AlchemicalWizardry -{ - public static String MODID = "AWWayofTime"; //Temporary + @SidedProxy(serverSide = "WayofTime.alchemicalWizardry.proxy.CommonProxy", clientSide = "WayofTime.alchemicalWizardry.proxy.ClientProxy") + public static CommonProxy proxy; - public static boolean parseTextFiles = false; - - public static boolean doMeteorsDestroyBlocks = true; - public static String[] diamondMeteorArray; - public static int diamondMeteorRadius; - public static String[] stoneMeteorArray; - public static int stoneMeteorRadius; - public static String[] ironBlockMeteorArray; - public static int ironBlockMeteorRadius; - public static String[] netherStarMeteorArray; - public static int netherStarMeteorRadius; + @Mod.Instance + public static AlchemicalWizardry instance; - public static String[] allowedCrushedOresArray; - - public static Potion customPotionDrowning; - public static Potion customPotionBoost; - public static Potion customPotionProjProt; - public static Potion customPotionInhibit; - public static Potion customPotionFlight; - public static Potion customPotionReciprocation; - public static Potion customPotionFlameCloak; - public static Potion customPotionIceCloak; - public static Potion customPotionHeavyHeart; - public static Potion customPotionFireFuse; - public static Potion customPotionPlanarBinding; - public static Potion customPotionSoulFray; - public static Potion customPotionSoulHarden; - public static Potion customPotionDeaf; - public static Potion customPotionFeatherFall; - public static Potion customPotionDemonCloak; - public static Potion customPotionAmphibian; - - public static int customPotionDrowningID; - public static int customPotionBoostID; - public static int customPotionProjProtID; - public static int customPotionInhibitID; - public static int customPotionFlightID; - public static int customPotionReciprocationID; - public static int customPotionFlameCloakID; - public static int customPotionIceCloakID; - public static int customPotionHeavyHeartID; - public static int customPotionFireFuseID; - public static int customPotionPlanarBindingID; - public static int customPotionSoulFrayID; - public static int customPotionSoulHardenID; - public static int customPotionDeafID; - public static int customPotionFeatherFallID; - public static int customPotionDemonCloakID; - public static int customPotionAmphibianID; - - public static boolean ritualDisabledWater; - public static boolean ritualDisabledLava; - public static boolean ritualDisabledGreenGrove; - public static boolean ritualDisabledInterdiction; - public static boolean ritualDisabledContainment; - public static boolean ritualDisabledBinding; - public static boolean ritualDisabledUnbinding; - public static boolean ritualDisabledHighJump; - public static boolean ritualDisabledMagnetism; - public static boolean ritualDisabledCrusher; - public static boolean ritualDisabledSpeed; - public static boolean ritualDisabledAnimalGrowth; - public static boolean ritualDisabledSuffering; - public static boolean ritualDisabledRegen; - public static boolean ritualDisabledFeatheredKnife; - public static boolean ritualDisabledFeatheredEarth; - public static boolean ritualDisabledGaia; - public static boolean ritualDisabledCondor; - public static boolean ritualDisabledFallingTower; - public static boolean ritualDisabledBalladOfAlchemy; - public static boolean ritualDisabledExpulsion; - public static boolean ritualDisabledSuppression; - public static boolean ritualDisabledZephyr; - public static boolean ritualDisabledHarvest; - public static boolean ritualDisabledConduit; - public static boolean ritualDisabledEllipsoid; - public static boolean ritualDisabledEvaporation; - public static boolean ritualDisabledSpawnWard; - public static boolean ritualDisabledVeilOfEvil; - public static boolean ritualDisabledFullStomach; - public static boolean ritualDisabledConvocation; - public static boolean ritualDisabledSymmetry; - public static boolean ritualDisabledStalling; - public static boolean ritualDisabledCrafting; - public static boolean ritualDisabledPhantomHands; - public static boolean ritualDisabledSphereIsland; - - public static boolean potionDisableRegen; - public static boolean potionDisableNightVision; - public static boolean potionDisableFireResistance; - public static boolean potionDisableWaterBreathing; - public static boolean potionDisableMoveSpeed; - public static boolean potionDisableInstantHealth; - public static boolean potionDisablePoison; - public static boolean potionDisableBlindness; - public static boolean potionDisableWeakness; - public static boolean potionDisableStrength; - public static boolean potionDisableJumpBoost; - public static boolean potionDisableSlowness; - public static boolean potionDisableMining; - public static boolean potionDisableDrowning; - public static boolean potionDisableInvisibility; - public static boolean potionDisableResistance; - public static boolean potionDisableSaturation; - public static boolean potionDisableHealthBoost; - public static boolean potionDisableAbsorption; - public static boolean potionDisableBoost; - public static boolean potionDisableFlight; - public static boolean potionDisableReciprocation; - public static boolean potionDisablePlanarBinding; - public static boolean potionDisableSoulFray; - public static boolean potionDisableSoulHarden; - public static boolean potionDisableDeafness; - - public static boolean isThaumcraftLoaded; - public static boolean isForestryLoaded; - public static boolean isBotaniaLoaded; - public static boolean isFMPLoaded; - public static boolean isPneumaticCraftLoaded; - - public static boolean wimpySettings; - public static boolean respawnWithDebuff; - public static boolean lockdownAltar; - public static boolean causeHungerWithRegen; - public static boolean causeHungerChatMessage = true; - - public static List wellBlacklist; - - public static Logger logger = LogManager.getLogger("BloodMagic"); - public static CreativeTabs tabBloodMagic = new CreativeTabs("tabBloodMagic") - { + public static CreativeTabs tabBloodMagic = new CreativeTabs(MODID + ".creativeTab") { @Override - public ItemStack getIconItemStack() - { - return new ItemStack(ModItems.weakBloodOrb, 1, 0); - } - - @Override - public Item getTabIconItem() - { - return ModItems.weakBloodOrb; + public Item getTabIconItem() { + return ModItems.bloodOrb; } }; - public static ToolMaterial bloodBoundToolMaterial = EnumHelper.addToolMaterial("BoundBlood", 4, 1000, 12.0f, 8.0f, 50); - public static ArmorMaterial sanguineArmourArmourMaterial = EnumHelper.addArmorMaterial("SanguineArmour", "test", 33, new int[]{3, 8, 6, 3}, 30); + private InventoryRenderHelper renderHelper = new InventoryRenderHelper(DOMAIN); + private LogHelper logger = new LogHelper(MODID); + private File configDir; - //Dungeon loot chances - public static int standardBindingAgentDungeonChance; - public static int mundanePowerCatalystDungeonChance; - public static int averagePowerCatalystDungeonChance; - public static int greaterPowerCatalystDungeonChance; - public static int mundaneLengtheningCatalystDungeonChance; - public static int averageLengtheningCatalystDungeonChance; - public static int greaterLengtheningCatalystDungeonChance; + @Mod.EventHandler + public void preInit(FMLPreInitializationEvent event) { + configDir = new File(event.getModConfigurationDirectory(), "BloodMagic"); + ConfigHandler.init(new File(getConfigDir(), "BloodMagic.cfg")); - //Mob IDs - public static String entityFallenAngelID = "AW001FallenAngel"; - public static String entityLowerGuardianID = "AW002"; - public static String entityBileDemonID = "AW003"; - public static String entityWingedFireDemonID = "AW004"; - public static String entitySmallEarthGolemID = "AW005"; - public static String entityIceDemonID = "AW006"; - public static String entityBoulderFistID = "AW007"; - public static String entityShadeID = "AW008"; - public static String entityAirElementalID = "AW009"; - public static String entityWaterElementalID = "AW010"; - public static String entityEarthElementalID = "AW011"; - public static String entityFireElementalID = "AW012"; - public static String entityShadeElementalID = "AW013"; - public static String entityHolyElementalID = "AW014"; - public static String entityMinorDemonGruntID = "AW015"; - public static String entityMinorDemonGruntFireID = "AW016"; - public static String entityMinorDemonGruntWindID = "AW017"; - public static String entityMinorDemonGruntIceID = "AW018"; - public static String entityMinorDemonGruntEarthID = "AW019"; - public static String entityMinorDemonGruntGuardianID = "AW020"; - public static String entityMinorDemonGruntGuardianFireID = "AW021"; - public static String entityMinorDemonGruntGuardianWindID = "AW022"; - public static String entityMinorDemonGruntGuardianIceID = "AW023"; - public static String entityMinorDemonGruntGuardianEarthID = "AW024"; - - public static boolean isDemonRitualCreativeOnly = false; + proxy.preInit(); - public static Fluid lifeEssenceFluid; - - // The instance of your mod that Forge uses. - @Instance("AlchemicalWizardry") - public static AlchemicalWizardry instance; - - // Says where the client and server 'proxy' code is loaded. - @SidedProxy(clientSide = "WayofTime.alchemicalWizardry.client.ClientProxy", serverSide = "WayofTime.alchemicalWizardry.common.CommonProxy") - public static CommonProxy proxy; - - public static final HoldingPacketHandler packetPipeline = new HoldingPacketHandler(); - - @EventHandler - public void preInit(FMLPreInitializationEvent event) - { - File bmDirectory = new File("config/BloodMagic/schematics"); - - if (!bmDirectory.exists() && bmDirectory.mkdirs()) - { - try - { - 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!"); - ZipInputStream zipStream = new ZipInputStream(in); - ZipEntry entry; - - while ((entry = zipStream.getNextEntry()) != null) - { - File file = new File(bmDirectory, entry.getName()); - if (file.exists() && file.length() > 3L) - { - continue; - } - FileOutputStream out = new FileOutputStream(file); - - byte[] buffer = new byte[8192]; - int len; - while ((len = zipStream.read(buffer)) != -1) - { - out.write(buffer, 0, len); - } - out.close(); - } - } - } catch (Exception e) - { - } - } - - TEDemonPortal.loadBuildingList(); - - ComplexNetworkHandler.load(); - - MinecraftForge.EVENT_BUS.register(new LifeBucketHandler()); - BloodMagicConfiguration.init(new File(event.getModConfigurationDirectory(), "AWWayofTime.cfg")); - - //Custom config stuff goes here - Potion[] potionTypes; - - for (Field f : Potion.class.getDeclaredFields()) - { - f.setAccessible(true); - - try - { - if (f.getName().equals("potionTypes") || f.getName().equals("field_76425_a")) - { - Field modfield = Field.class.getDeclaredField("modifiers"); - modfield.setAccessible(true); - modfield.setInt(f, f.getModifiers() & ~Modifier.FINAL); - potionTypes = (Potion[]) f.get(null); - final Potion[] newPotionTypes = new Potion[256]; - System.arraycopy(potionTypes, 0, newPotionTypes, 0, potionTypes.length); - f.set(null, newPotionTypes); - } - } catch (Exception e) - { - System.err.println("Severe error, please report this to the mod author:"); - System.err.println(e); - } - } - AlchemicalWizardry.lifeEssenceFluid = new LifeEssence("Life Essence"); - FluidRegistry.registerFluid(lifeEssenceFluid); - - ModBlocks.init(); ModItems.init(); - - RecipeSorter.register("AWWayofTime:shapedorb", ShapedBloodOrbRecipe.class, Category.SHAPED, "before:minecraft:shapeless"); - RecipeSorter.register("AWWayofTime:shapelessorb", ShapelessBloodOrbRecipe.class, Category.SHAPELESS, "after:minecraft:shapeless"); - - Object eventHook = new AlchemicalWizardryEventHooks(); - FMLCommonHandler.instance().bus().register(eventHook); - MinecraftForge.EVENT_BUS.register(eventHook); - NewPacketHandler.INSTANCE.ordinal(); - HoldingPacketHandler.init(); - ClientToServerPacketHandler.init(); - ModAchievements.init(); + ModBlocks.init(); + ModPotions.init(); + ModEntities.init(); } - @EventHandler - public void load(FMLInitializationEvent event) - { - int craftingConstant = OreDictionary.WILDCARD_VALUE; - - proxy.registerRenderers(); - proxy.registerEntities(); - proxy.registerEntityTrackers(); - proxy.registerEvents(); - - //ItemStacks used for crafting go here - ItemStack lapisStack = new ItemStack(Items.dye, 1, 4); - ItemStack lavaBucketStack = new ItemStack(Items.lava_bucket); - ItemStack cobblestoneStack = new ItemStack(Blocks.cobblestone, 1, craftingConstant); - ItemStack glassStack = new ItemStack(Blocks.glass, 1, craftingConstant); - ItemStack ironIngotStack = new ItemStack(Items.iron_ingot); - ItemStack diamondStack = new ItemStack(Items.diamond, 1, craftingConstant); - ItemStack goldNuggetStack = new ItemStack(Items.gold_nugget); - ItemStack stoneStack = new ItemStack(Blocks.stone, 1, craftingConstant); - ItemStack redstoneStack = new ItemStack(Items.redstone); - ItemStack glowstoneBlockStack = new ItemStack(Blocks.glowstone); - ItemStack ironBlockStack = new ItemStack(Blocks.iron_block); - ItemStack waterBucketStack = new ItemStack(Items.water_bucket); - ItemStack emptyBucketStack = new ItemStack(Items.bucket); - ItemStack magmaCreamStack = new ItemStack(Items.magma_cream); - ItemStack stringStack = new ItemStack(Items.string); - ItemStack obsidianStack = new ItemStack(Blocks.obsidian); - ItemStack goldIngotStack = new ItemStack(Items.gold_ingot); - ItemStack furnaceStack = new ItemStack(Blocks.furnace); - ItemStack sugarStack = new ItemStack(Items.sugar); - ItemStack featherStack = new ItemStack(Items.feather); - ItemStack ghastTearStack = new ItemStack(Items.ghast_tear); - ItemStack ironPickaxeStack = new ItemStack(Items.iron_pickaxe); - ItemStack ironAxeStack = new ItemStack(Items.iron_axe); - ItemStack ironShovelStack = new ItemStack(Items.iron_shovel); - ItemStack glowstoneDustStack = new ItemStack(Items.glowstone_dust); - ItemStack saplingStack = new ItemStack(Blocks.sapling); - ItemStack reedStack = new ItemStack(Items.reeds); - ItemStack blankSlateStack = new ItemStack(ModItems.blankSlate, 1, craftingConstant); - ItemStack reinforcedSlateStack = new ItemStack(ModItems.reinforcedSlate, 1, craftingConstant); - ItemStack weakBloodOrbStack = new ItemStack(ModItems.weakBloodOrb, 1, craftingConstant); - ItemStack imbuedSlateStack = new ItemStack(ModItems.imbuedSlate, 1, craftingConstant); - ItemStack demonSlateStack = new ItemStack(ModItems.demonicSlate, 1, craftingConstant); - ItemStack apprenticeBloodOrbStack = new ItemStack(ModItems.apprenticeBloodOrb, 1, craftingConstant); - ItemStack magicianBloodOrbStack = new ItemStack(ModItems.magicianBloodOrb, 1, craftingConstant); - ItemStack waterSigilStackCrafted = new ItemStack(ModItems.waterSigil); - ItemStack lavaSigilStackCrafted = new ItemStack(ModItems.lavaSigil); - ItemStack voidSigilStackCrafted = new ItemStack(ModItems.voidSigil); - ItemStack airSigilStack = new ItemStack(ModItems.airSigil); - ItemStack lavaCrystalStackCrafted = new ItemStack(ModItems.lavaCrystal); - ItemStack lavaCrystalStack = new ItemStack(ModItems.lavaCrystal); - ItemStack sacrificialDaggerStack = new ItemStack(ModItems.sacrificialDagger); - ItemStack bloodAltarStack = new ItemStack(ModBlocks.blockAltar, 1, 0); - ItemStack bloodRuneCraftedStack = new ItemStack(ModBlocks.bloodRune, 1); - ItemStack bloodRuneStack = new ItemStack(ModBlocks.bloodRune); - ItemStack speedRuneStack = new ItemStack(ModBlocks.speedRune); - ItemStack runeOfSacrificeStack = new ItemStack(ModBlocks.runeOfSacrifice); - ItemStack runeOfSelfSacrificeStack = new ItemStack(ModBlocks.runeOfSelfSacrifice); - ItemStack miningSigilStackCrafted = new ItemStack(ModItems.sigilOfTheFastMiner); - ItemStack divinationSigilStackCrafted = new ItemStack(ModItems.divinationSigil); - ItemStack seerSigilStackCrafted = new ItemStack(ModItems.itemSeerSigil); - ItemStack ritualStoneStackCrafted = new ItemStack(ModBlocks.ritualStone, 4); - ItemStack ritualStoneStack = new ItemStack(ModBlocks.ritualStone); - ItemStack masterRitualStoneStack = new ItemStack(ModBlocks.blockMasterStone); - ItemStack imperfectRitualStoneStack = new ItemStack(ModBlocks.imperfectRitualStone); - ItemStack sigilOfElementalAffinityStackCrafted = new ItemStack(ModItems.sigilOfElementalAffinity); - ItemStack lavaSigilStack = new ItemStack(ModItems.lavaSigil); - ItemStack waterSigilStack = new ItemStack(ModItems.waterSigil); - ItemStack sigilOfHoldingStack = new ItemStack(ModItems.sigilOfHolding); - ItemStack weakBloodShardStack = new ItemStack(ModItems.weakBloodShard); - ItemStack emptySocketStack = new ItemStack(ModBlocks.emptySocket); - ItemStack bloodSocketStack = new ItemStack(ModBlocks.bloodSocket); - ItemStack armourForgeStack = new ItemStack(ModBlocks.armourForge); - ItemStack largeBloodStoneBrickStackCrafted = new ItemStack(ModBlocks.largeBloodStoneBrick, 32); - ItemStack largeBloodStoneBrickStack = new ItemStack(ModBlocks.largeBloodStoneBrick); - ItemStack bloodStoneBrickStackCrafted = new ItemStack(ModBlocks.bloodStoneBrick, 4); - ItemStack growthSigilStack = new ItemStack(ModItems.growthSigil); - ItemStack blockHomHeartStack = new ItemStack(ModBlocks.blockSpellTable); - ItemStack redWoolStack = new ItemStack(Blocks.wool, 1, 14); - ItemStack simpleCatalystStack = new ItemStack(ModItems.simpleCatalyst); - ItemStack duskRitualDivinerStack = new ItemStack(ModItems.itemRitualDiviner); - ((ItemRitualDiviner) duskRitualDivinerStack.getItem()).setMaxRuneDisplacement(duskRitualDivinerStack, 1); - ItemStack dawnRitualDivinerStack = new ItemStack(ModItems.itemRitualDiviner); - ((ItemRitualDiviner) dawnRitualDivinerStack.getItem()).setMaxRuneDisplacement(dawnRitualDivinerStack, 2); - waterSigilStackCrafted.setItemDamage(waterSigilStackCrafted.getMaxDamage()); - lavaSigilStackCrafted.setItemDamage(lavaSigilStackCrafted.getMaxDamage()); - voidSigilStackCrafted.setItemDamage(voidSigilStackCrafted.getMaxDamage()); - lavaCrystalStackCrafted.setItemDamage(lavaCrystalStackCrafted.getMaxDamage()); - miningSigilStackCrafted.setItemDamage(miningSigilStackCrafted.getMaxDamage()); - sigilOfElementalAffinityStackCrafted.setItemDamage(sigilOfElementalAffinityStackCrafted.getMaxDamage()); - ItemStack archmageBloodOrbStack = new ItemStack(ModItems.archmageBloodOrb); - ItemStack sanctusStack = new ItemStack(ModItems.sanctus); - ItemStack aetherStack = new ItemStack(ModItems.aether); - ItemStack terraeStack = new ItemStack(ModItems.terrae); - ItemStack incendiumStack = new ItemStack(ModItems.incendium); - ItemStack tennebraeStack = new ItemStack(ModItems.tennebrae); - ItemStack aquasalusStack = new ItemStack(ModItems.aquasalus); - ItemStack crystallosStack = new ItemStack(ModItems.crystallos); - ItemStack crepitousStack = new ItemStack(ModItems.crepitous); - 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", '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", "lbl", "lcl", 'l', lavaBucketStack, 'b', blankSlateStack, 'm', magmaCreamStack, 'c', lavaCrystalStack); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(voidSigilStackCrafted, "ese", "ere", "eoe", 'e', emptyBucketStack, 'r', reinforcedSlateStack, 'o', apprenticeBloodOrbStack, 's', stringStack)); - GameRegistry.addRecipe(bloodAltarStack, "s s", "scs", "gdg", 's', stoneStack, 'c', furnaceStack, 'd', diamondStack, 'g', goldIngotStack); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(bloodRuneCraftedStack, "sss", "ror", "sss", 's', stoneStack, 'o', weakBloodOrbStack, 'r', blankSlateStack)); - GameRegistry.addRecipe(speedRuneStack, "sbs", "uru", "sbs", 'u', sugarStack, 's', stoneStack, 'r', 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)); - 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.addShapelessRecipe(new ItemStack(Items.skull, 1, 2), new ItemStack(Items.skull, 1, 1), new ItemStack(Items.rotten_flesh), new ItemStack(Items.iron_ingot), new ItemStack(Items.leather)); - GameRegistry.addShapelessRecipe(new ItemStack(Items.skull, 1, 0), new ItemStack(Items.skull, 1, 1), new ItemStack(Items.bow, 1, 0), new ItemStack(Items.arrow, 1, 0), new ItemStack(Items.bone)); - GameRegistry.addShapelessRecipe(new ItemStack(Items.skull, 1, 4), new ItemStack(Items.skull, 1, 1), 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 ItemStack(ModBlocks.blockPedestal), "ooo", " c ", "ooo", 'o', obsidianStack, 'c', weakBloodShardStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockPlinth), "iii", " p ", "iii", 'i', ironBlockStack, 'p', new ItemStack(ModBlocks.blockPedestal)); - GameRegistry.addShapelessRecipe(new ItemStack(ModItems.alchemyFlask, 1, 0), new ItemStack(ModItems.alchemyFlask, 1, craftingConstant), 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 ItemStack(ModBlocks.blockTeleposer), "ggg", "efe", "ggg", 'g', goldIngotStack, 'f', new ItemStack(ModItems.telepositionFocus), 'e', new ItemStack(Items.ender_pearl)); - GameRegistry.addShapelessRecipe(new ItemStack(ModItems.reinforcedTelepositionFocus), new ItemStack(ModItems.enhancedTelepositionFocus), new ItemStack(ModItems.weakBloodShard)); - GameRegistry.addShapelessRecipe(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 ItemStack(ModItems.armourInhibitor), " gg", "gsg", "gg ", 'g', goldIngotStack, 's', new ItemStack(ModItems.weakBloodShard)); - GameRegistry.addRecipe(new ItemStack(ModItems.itemRitualDiviner), "d1d", "2e3", "d4d", '1', new ItemStack(ModItems.airScribeTool), '2', new ItemStack(ModItems.waterScribeTool), '3', new ItemStack(ModItems.fireScribeTool), '4', new ItemStack(ModItems.earthScribeTool), 'd', diamondStack, 'e', new ItemStack(Items.emerald)); - GameRegistry.addRecipe(duskRitualDivinerStack, " d ", "srs", " d ", 'd', new ItemStack(ModItems.duskScribeTool), 's', 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 ItemStack(ModItems.itemKeyOfDiablo), " gw", "gdg", "wg ", 'w', weakBloodShardStack, 'g', goldIngotStack, 'd', diamondStack); - GameRegistry.addRecipe(new ItemStack(ModItems.itemBloodPack), "gbg","flf","gsg",'s', blankSlateStack,'g', glassStack,'f',new ItemStack(Items.flint,1,craftingConstant),'b', emptyBucketStack, 'l', new ItemStack(Items.leather_chestplate)); - customPotionDrowning = (new PotionBloodMagic(customPotionDrowningID, true, 0)).setIconIndex(0, 0).setPotionName("Drowning"); - customPotionBoost = (new PotionBloodMagic(customPotionBoostID, false, 0)).setIconIndex(0, 0).setPotionName("Boost"); - customPotionProjProt = (new PotionBloodMagic(customPotionProjProtID, false, 0)).setIconIndex(0, 0).setPotionName("Whirlwind"); - customPotionInhibit = (new PotionBloodMagic(customPotionInhibitID, false, 0)).setIconIndex(0, 0).setPotionName("Inhibit"); - customPotionFlight = (new PotionBloodMagic(customPotionFlightID, false, 0)).setIconIndex(0, 0).setPotionName("Flight"); - customPotionReciprocation = (new PotionBloodMagic(customPotionReciprocationID, false, 0xFFFFFF)).setIconIndex(0, 0).setPotionName("Reciprocation"); - customPotionFlameCloak = (new PotionBloodMagic(customPotionFlameCloakID, false, 0).setIconIndex(0, 0).setPotionName("Flame Cloak")); - customPotionIceCloak = (new PotionBloodMagic(customPotionIceCloakID, false, 0).setIconIndex(0, 0).setPotionName("Ice Cloak")); - customPotionHeavyHeart = (new PotionBloodMagic(customPotionHeavyHeartID, true, 0).setIconIndex(0, 0).setPotionName("Heavy Heart")); - customPotionFireFuse = (new PotionBloodMagic(customPotionFireFuseID, true, 0).setIconIndex(0, 0).setPotionName("Fire Fuse")); - customPotionPlanarBinding = (new PotionBloodMagic(customPotionPlanarBindingID, true, 0).setIconIndex(0, 0).setPotionName("Planar Binding")); - customPotionSoulFray = (new PotionBloodMagic(customPotionSoulFrayID, true, 0).setIconIndex(0, 0).setPotionName("Soul Fray")); - customPotionSoulHarden = (new PotionBloodMagic(customPotionSoulHardenID, false, 0).setIconIndex(0, 0).setPotionName("Soul Harden")); - customPotionDeaf = (new PotionBloodMagic(customPotionDeafID, true, 0).setIconIndex(0, 0).setPotionName("Deafness")); - customPotionFeatherFall = (new PotionBloodMagic(customPotionFeatherFallID, false, 0).setIconIndex(0, 0).setPotionName("Feather Fall")); - customPotionDemonCloak = (new PotionBloodMagic(customPotionDemonCloakID, false, 0).setIconIndex(0, 0).setPotionName("Demon Cloaking")); - customPotionAmphibian = (new PotionBloodMagic(customPotionAmphibianID, false, 0).setIconIndex(0, 0).setPotionName("Amphibian")); - - ItemStack masterBloodOrbStack = new ItemStack(ModItems.masterBloodOrb); - ItemStack transcendentBloodOrbStack = new ItemStack(ModItems.transcendentBloodOrb); - -// ModBlocks.blockLifeEssence.setUnlocalizedName("lifeEssenceBlock"); - FluidContainerRegistry.registerFluidContainer(lifeEssenceFluid, new ItemStack(ModItems.bucketLife), FluidContainerRegistry.EMPTY_BUCKET); - ModBlocks.blockAltar.setHarvestLevel("pickaxe", 1); - - //Register Tile Entity - GameRegistry.registerTileEntity(TEAltar.class, "containerAltar"); - GameRegistry.registerTileEntity(TEMasterStone.class, "containerMasterStone"); - GameRegistry.registerTileEntity(TESocket.class, "containerSocket"); - GameRegistry.registerTileEntity(TEChemistrySet.class, "containerWritingTable"); - GameRegistry.registerTileEntity(TESpellTable.class, "containerHomHeart"); - GameRegistry.registerTileEntity(TEPedestal.class, "containerPedestal"); - GameRegistry.registerTileEntity(TEPlinth.class, "containerPlinth"); - GameRegistry.registerTileEntity(TETeleposer.class, "containerTeleposer"); - GameRegistry.registerTileEntity(TEConduit.class, "containerConduit"); - GameRegistry.registerTileEntity(TEOrientable.class, "containerOrientable"); - GameRegistry.registerTileEntity(TESpellParadigmBlock.class, "containerSpellParadigmBlock"); - GameRegistry.registerTileEntity(TESpellEffectBlock.class, "containerSpellEffectBlock"); - GameRegistry.registerTileEntity(TESpellModifierBlock.class, "containerSpellModifierBlock"); - GameRegistry.registerTileEntity(TESpellEnhancementBlock.class, "containerSpellEnhancementBlock"); - GameRegistry.registerTileEntity(TESpectralContainer.class, "spectralContainerTileEntity"); - GameRegistry.registerTileEntity(TEDemonPortal.class, "containerDemonPortal"); - GameRegistry.registerTileEntity(TESchematicSaver.class, "containerSchematicSaver"); - GameRegistry.registerTileEntity(TESpectralBlock.class, "containerSpectralBlock"); - GameRegistry.registerTileEntity(TEReagentConduit.class, "containerReagentConduit"); - GameRegistry.registerTileEntity(TEBelljar.class, "containerBellJar"); - GameRegistry.registerTileEntity(TEAlchemicalCalcinator.class, "containerAlchemicCalcinator"); - GameRegistry.registerTileEntity(TEDemonChest.class, "containerDemonChest"); - GameRegistry.registerTileEntity(TEMimicBlock.class, "containerMimic"); - GameRegistry.registerTileEntity(TECrucible.class, "containerCrucible"); - ModBlocks.bloodRune.setHarvestLevel("pickaxe", 2); - ModBlocks.speedRune.setHarvestLevel("pickaxe", 2); - ModBlocks.efficiencyRune.setHarvestLevel("pickaxe", 2); - ModBlocks.runeOfSacrifice.setHarvestLevel("pickaxe", 2); - ModBlocks.runeOfSelfSacrifice.setHarvestLevel("pickaxe", 2); - ModBlocks.ritualStone.setHarvestLevel("pickaxe", 2); - ModBlocks.bloodSocket.setHarvestLevel("pickaxe", 2); - ModBlocks.ritualStone.setHarvestLevel("pickaxe", 2); - ModBlocks.imperfectRitualStone.setHarvestLevel("pickaxe", 2); - ModBlocks.blockMasterStone.setHarvestLevel("pickaxe", 2); - ModBlocks.emptySocket.setHarvestLevel("pickaxe", 2); - ModBlocks.bloodStoneBrick.setHarvestLevel("pickaxe", 0); - ModBlocks.largeBloodStoneBrick.setHarvestLevel("pickaxe", 0); - ModBlocks.blockWritingTable.setHarvestLevel("pickaxe", 1); - ModBlocks.blockSpellTable.setHarvestLevel("pickaxe", 1); - ModBlocks.blockPedestal.setHarvestLevel("pickaxe", 2); - ModBlocks.blockPlinth.setHarvestLevel("pickaxe", 2); - ModBlocks.blockTeleposer.setHarvestLevel("pickaxe", 2); - - //Fuel handler - GameRegistry.registerFuelHandler(new AlchemicalWizardryFuelHandler()); - - //Gui registration - UpgradedAltars.loadAltars(); - BlockArmourForge.initializeRecipes(); - TEPlinth.initialize(); - - initAlchemyPotionRecipes(); - initAltarRecipes(); - - initBindingRecipes(); - initHarvestRegistry(); - initCombinedAlchemyPotionRecipes(); - - ReagentRegistry.initReagents(); - initReagentRegistries(); - initRituals(); - - initDemonPacketRegistiry(); - initiateRegistry(); - - blacklistDemons(); - - blacklistAccelerators(); - - MinecraftForge.EVENT_BUS.register(new ModLivingDropsEvent()); - proxy.initRendering(); - NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler()); - - ItemStack gunpowderStack = new ItemStack(Items.gunpowder); - ItemStack offensaStack = new ItemStack(ModItems.baseAlchemyItems, 1, 0); - ItemStack praesidiumStack = new ItemStack(ModItems.baseAlchemyItems, 1, 1); - ItemStack orbisTerraeStack = new ItemStack(ModItems.baseAlchemyItems, 1, 2); - ItemStack strengthenedCatalystStack = new ItemStack(ModItems.baseAlchemyItems, 1, 3); - ItemStack concentratedCatalystStack = new ItemStack(ModItems.baseAlchemyItems, 1, 4); - ItemStack fracturedBoneStack = new ItemStack(ModItems.baseAlchemyItems, 1, 5); - ItemStack virtusStack = new ItemStack(ModItems.baseAlchemyItems, 1, 6); - ItemStack reductusStack = new ItemStack(ModItems.baseAlchemyItems, 1, 7); - ItemStack potentiaStack = new ItemStack(ModItems.baseAlchemyItems, 1, 8); - - ItemStack strengthenedCatalystStackCrafted = new ItemStack(ModItems.baseAlchemyItems, 2, 3); - ItemStack fracturedBoneStackCrafted = new ItemStack(ModItems.baseAlchemyItems, 4, 5); - //TODO NEW RECIPES! - AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.weakBindingAgent), 10, 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)}, 3); - AlchemyRecipeRegistry.registerRecipe(simpleCatalystStack, 2, 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}, 2); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.aether), 5, 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}, 2); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.crepitous), 5, 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}, 2); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.terrae), 5, 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)}, 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)}, 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)}, 2); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.mundanePowerCatalyst), 10, 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}, 3); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.averagePowerCatalyst), 20, 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)}, 4); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.greaterPowerCatalyst), 30, 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)}, 4); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.weakFillingAgent), 5, 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)}, 3); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.enhancedFillingAgent), 25, 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}, 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}, 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)}, 1); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.gunpowder, 2, 0), 2, 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)}, 3); - AlchemyRecipeRegistry.registerRecipe(offensaStack, 10, 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}, 3); - AlchemyRecipeRegistry.registerRecipe(orbisTerraeStack, 10, new ItemStack[]{strengthenedCatalystStack, terraeStack, gunpowderStack, new ItemStack(Blocks.netherrack), new ItemStack(Blocks.sand)}, 3); - AlchemyRecipeRegistry.registerRecipe(concentratedCatalystStack, 10, 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}, 1); - AlchemyRecipeRegistry.registerRecipe(virtusStack, 20, 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)}, 3); - AlchemyRecipeRegistry.registerRecipe(potentiaStack, 20, new ItemStack[]{glowstoneDustStack, strengthenedCatalystStack, lapisStack, lapisStack, new ItemStack(Items.quartz)}, 3); - - HomSpellRegistry.registerBasicSpell(new ItemStack(Items.flint_and_steel), new SpellFireBurst()); - HomSpellRegistry.registerBasicSpell(new ItemStack(Blocks.ice), new SpellFrozenWater()); - HomSpellRegistry.registerBasicSpell(new ItemStack(Blocks.tnt), new SpellExplosions()); - HomSpellRegistry.registerBasicSpell(new ItemStack(ModItems.apprenticeBloodOrb), new SpellHolyBlast()); - HomSpellRegistry.registerBasicSpell(new ItemStack(Items.ghast_tear), new SpellWindGust()); - HomSpellRegistry.registerBasicSpell(new ItemStack(Items.glowstone_dust), new SpellLightningBolt()); - HomSpellRegistry.registerBasicSpell(new ItemStack(Items.water_bucket), new SpellWateryGrave()); - HomSpellRegistry.registerBasicSpell(new ItemStack(Blocks.obsidian), new SpellEarthBender()); - HomSpellRegistry.registerBasicSpell(new ItemStack(Items.ender_pearl), new SpellTeleport()); - SummoningRegistry.registerSummon(new SummoningHelperAW(entityFallenAngelID), 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[]{}, 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[]{}, 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[]{}, 0, 5); - SummoningRegistry.registerSummon(new SummoningHelperAW(entitySmallEarthGolemID), 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[]{}, 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[]{}, new ItemStack[]{}, 0, 4); - SummoningRegistry.registerSummon(new SummoningHelperAW(entityShadeID), 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[]{}, new ItemStack[]{}, 0, 4); - SummoningRegistry.registerSummon(new SummoningHelperAW(entityWaterElementalID), 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[]{}, new ItemStack[]{}, 0, 4); - SummoningRegistry.registerSummon(new SummoningHelperAW(entityFireElementalID), 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[]{}, new ItemStack[]{}, 0, 4); - SummoningRegistry.registerSummon(new SummoningHelperAW(entityHolyElementalID), new ItemStack[]{sanctusStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); -// SummoningRegistry.registerSummon(new SummoningHelperAW(this.entityMinorDemonGruntID), new ItemStack[]{incendiumStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); - - //Custom mobs - EntityRegistry.registerModEntity(EntityFallenAngel.class, "FallenAngel", 20, this, 80, 3, true); - EntityRegistry.registerModEntity(EntityLowerGuardian.class, "LowerGuardian", 21, this, 80, 3, true); - EntityRegistry.registerModEntity(EntityBileDemon.class, "BileDemon", 22, this, 80, 3, true); - EntityRegistry.registerModEntity(EntityWingedFireDemon.class, "WingedFireDemon", 23, this, 80, 3, true); - EntityRegistry.registerModEntity(EntitySmallEarthGolem.class, "SmallEarthGolem", 24, this, 80, 3, true); - EntityRegistry.registerModEntity(EntityIceDemon.class, "IceDemon", 25, this, 80, 3, true); - EntityRegistry.registerModEntity(EntityBoulderFist.class, "BoulderFist", 26, this, 80, 3, true); - EntityRegistry.registerModEntity(EntityShade.class, "Shade", 27, this, 80, 3, true); - EntityRegistry.registerModEntity(EntityAirElemental.class, "AirElemental", 28, this, 120, 3, true); - EntityRegistry.registerModEntity(EntityWaterElemental.class, "WaterElemental", 29, this, 120, 3, true); - EntityRegistry.registerModEntity(EntityEarthElemental.class, "EarthElemental", 30, this, 120, 3, true); - EntityRegistry.registerModEntity(EntityFireElemental.class, "FireElemental", 31, this, 120, 3, true); - EntityRegistry.registerModEntity(EntityShadeElemental.class, "ShadeElemental", 32, this, 120, 3, true); - EntityRegistry.registerModEntity(EntityHolyElemental.class, "HolyElemental", 33, this, 120, 3, true); - EntityRegistry.registerModEntity(EntityMinorDemonGrunt.class, "MinorDemonGrunt", 34, this, 80, 3, true); - 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(EntityMinorDemonGruntGuardian.class, "MinorDemonGruntGuardian", 39, this, 80, 3, true); - EntityRegistry.registerModEntity(EntityMinorDemonGruntGuardianFire.class, "MinorDemonGruntGuardianFire", 40, this, 80, 3, true); - EntityRegistry.registerModEntity(EntityMinorDemonGruntGuardianWind.class, "MinorDemonGruntGuardianWind", 41, this, 80, 3, true); - EntityRegistry.registerModEntity(EntityMinorDemonGruntGuardianIce.class, "MinorDemonGruntGuardianIce", 42, this, 80, 3, true); - EntityRegistry.registerModEntity(EntityMinorDemonGruntGuardianEarth.class, "MinorDemonGruntGuardianEarth", 43, this, 80, 3, true); - - 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(new ItemStack(ModItems.mundanePowerCatalyst), 1, 1, this.mundanePowerCatalystDungeonChance / 5)); - 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(new ItemStack(ModItems.averagePowerCatalyst), 1, 1, this.averagePowerCatalystDungeonChance / 5)); - 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(new ItemStack(ModItems.greaterPowerCatalyst), 1, 1, this.greaterPowerCatalystDungeonChance / 5)); - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.greaterLengtheningCatalyst), 1, 1, this.greaterLengtheningCatalystDungeonChance / 5)); - - //Ore Dictionary Registration - OreDictionary.registerOre("oreCoal", Blocks.coal_ore); - MeteorRegistry.registerMeteorParadigm(diamondStack, diamondMeteorArray, diamondMeteorRadius); - MeteorRegistry.registerMeteorParadigm(stoneStack, stoneMeteorArray, stoneMeteorRadius); - MeteorRegistry.registerMeteorParadigm(ironBlockStack, ironBlockMeteorArray, ironBlockMeteorRadius); - MeteorRegistry.registerMeteorParadigm(new ItemStack(Items.nether_star), netherStarMeteorArray, netherStarMeteorRadius); - - ItemStack stickStack = new ItemStack(Items.stick, 1, craftingConstant); - - //Register spell component recipes - ItemStack complexSpellCrystalStack = new ItemStack(ModItems.itemComplexSpellCrystal); - ItemStack quartzRodStack = new ItemStack(ModItems.baseItems, 1, 0); - ItemStack emptyCoreStack = new ItemStack(ModItems.baseItems, 1, 1); - ItemStack magicalesCableStack = new ItemStack(ModItems.baseItems, 1, 2); - ItemStack woodBraceStack = new ItemStack(ModItems.baseItems, 1, 3); - ItemStack stoneBraceStack = new ItemStack(ModItems.baseItems, 1, 4); - ItemStack projectileCoreStack = new ItemStack(ModItems.baseItems, 1, 5); - ItemStack selfCoreStack = new ItemStack(ModItems.baseItems, 1, 6); - ItemStack meleeCoreStack = new ItemStack(ModItems.baseItems, 1, 7); - ItemStack toolCoreStack = new ItemStack(ModItems.baseItems, 1, 26); - ItemStack paradigmBackPlateStack = new ItemStack(ModItems.baseItems, 1, 8); - ItemStack outputCableStack = new ItemStack(ModItems.baseItems, 1, 9); - ItemStack flameCoreStack = new ItemStack(ModItems.baseItems, 1, 10); - ItemStack iceCoreStack = new ItemStack(ModItems.baseItems, 1, 11); - ItemStack windCoreStack = new ItemStack(ModItems.baseItems, 1, 12); - ItemStack earthCoreStack = new ItemStack(ModItems.baseItems, 1, 13); - ItemStack inputCableStack = new ItemStack(ModItems.baseItems, 1, 14); - ItemStack crackedRunicPlateStack = new ItemStack(ModItems.baseItems, 1, 15); - ItemStack runicPlateStack = new ItemStack(ModItems.baseItems, 1, 16); - ItemStack imbuedRunicPlateStack = new ItemStack(ModItems.baseItems, 1, 17); - ItemStack defaultCoreStack = new ItemStack(ModItems.baseItems, 1, 18); - ItemStack offenseCoreStack = new ItemStack(ModItems.baseItems, 1, 19); - ItemStack defensiveCoreStack = new ItemStack(ModItems.baseItems, 1, 20); - ItemStack environmentalCoreStack = new ItemStack(ModItems.baseItems, 1, 21); - ItemStack powerCoreStack = new ItemStack(ModItems.baseItems, 1, 22); - ItemStack costCoreStack = new ItemStack(ModItems.baseItems, 1, 23); - ItemStack potencyCoreStack = new ItemStack(ModItems.baseItems, 1, 24); - ItemStack obsidianBraceStack = new ItemStack(ModItems.baseItems, 1, 25); - ItemStack etherealSlateStack = new ItemStack(ModItems.baseItems, 1, 27); - ItemStack lifeShardStack = new ItemStack(ModItems.baseItems, 1, 28); - ItemStack soulShardStack = new ItemStack(ModItems.baseItems, 1, 29); - ItemStack soulRunicPlateStack = new ItemStack(ModItems.baseItems, 1, 30); - ItemStack livingBraceStack = new ItemStack(ModItems.baseItems, 1, 31); - ItemStack enderShardStack = new ItemStack(ModItems.baseItems, 1, 32); - ItemStack enderShardCraftedStack = new ItemStack(ModItems.baseItems, 8, 32); - - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockCrystal), "lsl", "sls", "lsl", 'l', lifeShardStack, 's', soulShardStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockCrystal, 4, 1), "ss", "ss", 's', new ItemStack(ModBlocks.blockCrystal, 1, 0)); - - ItemStack magicalesCraftedCableStack = new ItemStack(ModItems.baseItems, 5, 2); - ItemStack crackedRunicPlateStackCrafted = new ItemStack(ModItems.baseItems, 2, 15); - - GameRegistry.addRecipe(quartzRodStack, "qqq", 'q', new ItemStack(Items.quartz)); - GameRegistry.addRecipe(emptyCoreStack, "gig", "nrn", "gig", 'n', goldIngotStack, 'i', ironIngotStack, 'g', glassStack, 'r', simpleCatalystStack); - GameRegistry.addRecipe(magicalesCraftedCableStack, "sss", "mmm", "sss", 's', new ItemStack(Items.string), 'm', magicalesStack); - GameRegistry.addRecipe(woodBraceStack, " il", "ili", "li ", 'l', new ItemStack(Blocks.log, 1, craftingConstant), 'i', new ItemStack(Items.string)); - GameRegistry.addRecipe(stoneBraceStack, " is", "isi", "si ", 'i', ironIngotStack, 's', reinforcedSlateStack); - GameRegistry.addRecipe(obsidianBraceStack, " is", "ibi", "si ", 'i', obsidianStack, 's', reinforcedSlateStack, 'b', stoneBraceStack); - GameRegistry.addRecipe(livingBraceStack, " gc", "gog", "sg ", 'g', goldIngotStack, 'o', obsidianBraceStack, 'c', lifeShardStack, '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(paradigmBackPlateStack, "isi", "rgr", "isi", 'i', ironIngotStack, 'r', stoneStack, 'g', goldIngotStack, 's', reinforcedSlateStack); - GameRegistry.addRecipe(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(inputCableStack, "ws ", "rcs", "ws ", 'w', blankSlateStack, 's', stoneStack, 'r', imbuedSlateStack, '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(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)); - - AlchemyRecipeRegistry.registerRecipe(crackedRunicPlateStackCrafted, 10, new ItemStack[]{imbuedSlateStack, imbuedSlateStack, concentratedCatalystStack}, 4); - AlchemyRecipeRegistry.registerRecipe(runicPlateStack, 30, new ItemStack[]{crackedRunicPlateStack, terraeStack}, 5); - AlchemyRecipeRegistry.registerRecipe(imbuedRunicPlateStack, 100, new ItemStack[]{magicalesStack, incendiumStack, runicPlateStack, runicPlateStack, aquasalusStack}, 5); - AlchemyRecipeRegistry.registerRecipe(complexSpellCrystalStack, 50, new ItemStack[]{new ItemStack(ModItems.blankSpell), weakBloodShardStack, weakBloodShardStack, diamondStack, goldIngotStack}, 3); - AlchemyRecipeRegistry.registerRecipe(soulRunicPlateStack, 150, new ItemStack[]{imbuedRunicPlateStack, soulShardStack, soulShardStack, weakBloodShardStack, diamondStack}, 6); - - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockConduit, 1, 0), "q q", "ccc", "q q", 'q', quartzRodStack, 'c', magicalesCableStack); - - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellParadigm, 1, 0), "gb ", "pcw", "gb ", 'p', paradigmBackPlateStack, 'c', projectileCoreStack, 'g', goldIngotStack, 'b', stoneBraceStack, 'w', outputCableStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellParadigm, 1, 1), "gb ", "pcw", "gb ", 'p', paradigmBackPlateStack, 'c', selfCoreStack, 'g', goldIngotStack, 'b', stoneBraceStack, 'w', outputCableStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellParadigm, 1, 2), "gb ", "pcw", "gb ", 'p', paradigmBackPlateStack, 'c', meleeCoreStack, 'g', goldIngotStack, 'b', stoneBraceStack, 'w', outputCableStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellParadigm, 1, 3), "gb ", "pcw", "gb ", 'p', paradigmBackPlateStack, 'c', toolCoreStack, 'g', goldIngotStack, 'b', stoneBraceStack, 'w', outputCableStack); - - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect, 1, 0), "bgb", "ico", "bgb", 'c', flameCoreStack, 'b', stoneBraceStack, 'g', goldIngotStack, 'i', inputCableStack, 'o', outputCableStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect, 1, 1), "bgb", "ico", "bgb", 'c', iceCoreStack, 'b', stoneBraceStack, 'g', goldIngotStack, 'i', inputCableStack, 'o', outputCableStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect, 1, 2), "bgb", "ico", "bgb", 'c', windCoreStack, 'b', stoneBraceStack, 'g', goldIngotStack, 'i', inputCableStack, 'o', outputCableStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect, 1, 3), "bgb", "ico", "bgb", 'c', earthCoreStack, 'b', stoneBraceStack, 'g', goldIngotStack, 'i', inputCableStack, 'o', outputCableStack); - - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellModifier, 1, 0), "bgb", "ico", "bgb", 'c', defaultCoreStack, 'i', inputCableStack, 'o', outputCableStack, 'b', stoneBraceStack, 'g', ironIngotStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellModifier, 1, 1), "bgb", "ico", "bgb", 'c', offenseCoreStack, 'i', inputCableStack, 'o', outputCableStack, 'b', stoneBraceStack, 'g', ironIngotStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellModifier, 1, 2), "bgb", "ico", "bgb", 'c', defensiveCoreStack, 'i', inputCableStack, 'o', outputCableStack, 'b', stoneBraceStack, 'g', ironIngotStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellModifier, 1, 3), "bgb", "ico", "bgb", 'c', environmentalCoreStack, 'i', inputCableStack, 'o', outputCableStack, 'b', stoneBraceStack, 'g', ironIngotStack); - - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 0), "bpb", "ico", "bpb", 'c', powerCoreStack, 'b', woodBraceStack, 'p', crackedRunicPlateStack, 'i', inputCableStack, 'o', outputCableStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 1), "bpb", "ico", "bpb", 'c', powerCoreStack, 'b', stoneBraceStack, 'p', runicPlateStack, 'i', inputCableStack, 'o', outputCableStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 2), "bpb", "ico", "bpb", 'c', powerCoreStack, 'b', obsidianBraceStack, 'p', imbuedRunicPlateStack, 'i', inputCableStack, 'o', outputCableStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 3), "bpb", "ico", "bpb", 'c', powerCoreStack, 'b', livingBraceStack, 'p', soulRunicPlateStack, 'i', inputCableStack, 'o', outputCableStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 5), "bpb", "ico", "bpb", 'c', costCoreStack, 'b', woodBraceStack, 'p', crackedRunicPlateStack, 'i', inputCableStack, 'o', outputCableStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 6), "bpb", "ico", "bpb", 'c', costCoreStack, 'b', stoneBraceStack, 'p', runicPlateStack, 'i', inputCableStack, 'o', outputCableStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 7), "bpb", "ico", "bpb", 'c', costCoreStack, 'b', obsidianBraceStack, 'p', imbuedRunicPlateStack, 'i', inputCableStack, 'o', outputCableStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 8), "bpb", "ico", "bpb", 'c', costCoreStack, 'b', livingBraceStack, 'p', soulRunicPlateStack, 'i', inputCableStack, 'o', outputCableStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 10), "bpb", "ico", "bpb", 'c', potencyCoreStack, 'b', woodBraceStack, 'p', crackedRunicPlateStack, 'i', inputCableStack, 'o', outputCableStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 11), "bpb", "ico", "bpb", 'c', potencyCoreStack, 'b', stoneBraceStack, 'p', runicPlateStack, 'i', inputCableStack, 'o', outputCableStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 12), "bpb", "ico", "bpb", 'c', potencyCoreStack, 'b', obsidianBraceStack, 'p', imbuedRunicPlateStack, 'i', inputCableStack, 'o', outputCableStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 13), "bpb", "ico", "bpb", 'c', potencyCoreStack, 'b', livingBraceStack, 'p', soulRunicPlateStack, 'i', inputCableStack, 'o', outputCableStack); - - GameRegistry.addRecipe(new ItemStack(ModItems.itemAttunedCrystal), "Sr ", " ar", "s S", 'r', quartzRodStack, 's', new ItemStack(Items.stick, 1, craftingConstant), 'a', strengthenedCatalystStack, 'S', stoneStack); - GameRegistry.addRecipe(new ItemStack(ModItems.itemTankSegmenter), "gqi", " rq", "q g", 'q', quartzRodStack, 'i', ironIngotStack, 'r', strengthenedCatalystStack, 'g', goldIngotStack); - GameRegistry.addRecipe(new ItemStack(ModItems.itemDestinationClearer), "qcq", "c c", "qcq", 'q', quartzRodStack, 'c', simpleCatalystStack); - - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockAlchemicalCalcinator), "pgp", "gsg", "ccc", 'p', crackedRunicPlateStack, 'g', glassStack, 's', strengthenedCatalystStack, 'c', cobblestoneStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockCrystalBelljar), "GGG", "GcG", "www", 'G', glassStack, 'c', concentratedCatalystStack, 'w', new ItemStack(Blocks.wooden_slab, 1, craftingConstant)); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockReagentConduit), "isi", "scs", "isi", 'c', concentratedCatalystStack, 's', stringStack, 'i', ironIngotStack); - - GameRegistry.addRecipe(new ItemStack(ModItems.ritualDismantler), "a a", " b ", 'a', Blocks.redstone_torch, 'b', ModItems.itemRitualDiviner); - - 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.addShapelessRecipe(enderShardCraftedStack, weakBloodShardStack, new ItemStack(Items.ender_pearl)); - - GameRegistry.addRecipe(new ItemStack(ModItems.inputRoutingFocus), "sgs", "geg", "sgs", 'e', enderShardStack, 's', stickStack, 'g', glassStack); - GameRegistry.addRecipe(new ItemStack(ModItems.outputRoutingFocus, 1, 0), "sgs", "geg", "sgs", 'e', enderShardStack, 's', stickStack, 'g', stoneStack); - GameRegistry.addRecipe(new ItemStack(ModItems.outputRoutingFocus, 1, 1), "sgs", "geg", "sgs", 'e', enderShardStack, 's', stickStack, 'g', new ItemStack(Blocks.sandstone)); - GameRegistry.addRecipe(new ItemStack(ModItems.outputRoutingFocus, 1, 2), "sgs", "geg", "sgs", 'e', enderShardStack, 's', stickStack, 'g', new ItemStack(Items.dye, 1, craftingConstant)); - GameRegistry.addRecipe(new ItemStack(ModItems.outputRoutingFocus, 1, 3), "sgs", "geg", "sgs", 'e', enderShardStack, 's', stickStack, 'g', obsidianStack); - GameRegistry.addRecipe(new ItemStack(ModItems.outputRoutingFocus, 1, 4), "sgs", "geg", "sgs", 'e', enderShardStack, 's', stickStack, 'g', stringStack); - - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockStabilityGlyph), "1s1", "grg", "bob", 'o', transcendentBloodOrbStack, 'r', bloodRuneStack, '1', crepitousStack, 'g', etherealSlateStack, 'b', praesidiumStack, 's', magicalesStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockEnchantmentGlyph, 1, 0), "1s1", "grg", "bob", 'o', transcendentBloodOrbStack, 'r', bloodRuneStack, 'g', etherealSlateStack, 'b', magicalesStack, '1', offensaStack, 's', lifeShardStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockEnchantmentGlyph, 1, 1), "1s1", "grg", "bob", 'o', transcendentBloodOrbStack, 'r', bloodRuneStack, 'g', etherealSlateStack, 'b', magicalesStack, '1', virtusStack, 's', soulShardStack); - - GameRegistry.addRecipe(dawnRitualDivinerStack, " d ", "srs", " d ", 'd', new ItemStack(ModItems.dawnScribeTool), 's', etherealSlateStack, 'r', duskRitualDivinerStack); - - AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.flint, 2, 0), 1, 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)}, 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)}, 1); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.bread), 1, 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}, 1); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.sand, 2, 0), 1, 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}, 1); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.string, 4, 0), 1, 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}, 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); - 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}, 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)}, 2); - AlchemyRecipeRegistry.registerRecipe(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)}, 1); - AlchemyRecipeRegistry.registerRecipe(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); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.ghast_tear, 2), 100, 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)}, 1); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.clay_ball, 4), 5, new ItemStack[]{new ItemStack(Blocks.sand), waterBucketStack}, 2); - - ItemIncense.registerIncenseRecipes(); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockCrucible), "i i", "sis", " S ", 's', new ItemStack(Blocks.stone_slab), 'i', ironIngotStack, 'S', stoneStack); + @Mod.EventHandler + public void init(FMLPreInitializationEvent event) { + proxy.init(); } - @EventHandler - public void postInit(FMLPostInitializationEvent event) - { - proxy.registerPostSideObjects(); - //TODO Thaumcraft Integration -/* if (Loader.isModLoaded("Thaumcraft")) - { - isThaumcraftLoaded = true; - - try - { - //do stuff - ModItems.sanguineHelmet = new ItemSanguineArmour(0).setUnlocalizedName("sanguineHelmet"); - ModItems.sanguineRobe = new ItemSanguineArmour(1).setUnlocalizedName("sanguineRobe"); - ModItems.sanguinePants = new ItemSanguineArmour(2).setUnlocalizedName("sanguinePants"); - ModItems.sanguineBoots = new ItemSanguineArmour(3).setUnlocalizedName("sanguineBoots"); - GameRegistry.registerItem(ModItems.sanguineHelmet, "sanguineHelmet"); - GameRegistry.registerItem(ModItems.sanguineRobe, "sanguineRobe"); - GameRegistry.registerItem(ModItems.sanguinePants, "sanguinePants"); - GameRegistry.registerItem(ModItems.sanguineBoots, "sanguineBoots"); - - ItemStack itemGoggles = ItemApi.getItem("itemGoggles", 0); - Item itemThaumChest = GameRegistry.findItem("Thaumcraft", "ItemChestplateThaumium"); - Item itemThaumLeggings = GameRegistry.findItem("Thaumcraft", "ItemLeggingsThaumium"); - Item itemThaumBoots = GameRegistry.findItem("Thaumcraft", "ItemBootsThaumium"); - - AspectList aspectList = new AspectList(); - aspectList.add(Aspect.ARMOR, 5).add(Aspect.MAGIC, 5); - - ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguineHelmet), aspectList); - ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguineRobe), aspectList); - ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguinePants), aspectList); - ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguineBoots), aspectList); - - if (itemGoggles != null) - { - BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineHelmet), itemGoggles); - } - - if (itemThaumChest != null) - { - BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineRobe), new ItemStack(itemThaumChest)); - } - - if (itemThaumLeggings != null) - { - BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguinePants), new ItemStack(itemThaumLeggings)); - } - - if (itemThaumBoots != null) - { - BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineBoots), new ItemStack(itemThaumBoots)); - } - - //LogHelper.log(Level.INFO, "Loaded RP2 World addon"); - } catch (Exception e) - { - //LogHelper.log(Level.SEVERE, "Could not load RP2 World addon"); - e.printStackTrace(System.err); - } - } else - { - isThaumcraftLoaded = false; - } - - if(Loader.isModLoaded("guideapi")) - { - long initialTime = System.nanoTime(); - RecipeHolder.init(); - long finalTime = System.nanoTime(); - AlchemicalWizardry.logger.info("Recipe Holder initialized: took " + (finalTime - initialTime)/1000000f + "ms."); - - ModItems.itemMailCatalogue = new ItemMailOrderCatalogue().setUnlocalizedName("itemMailCatalogue"); - GameRegistry.registerItem(ModItems.itemMailCatalogue, "itemMailCatalogue"); - GameRegistry.addShapelessRecipe(new ItemStack(ModItems.itemMailCatalogue), new ItemStack(Items.book), new ItemStack(Items.dye, 1, 0), new ItemStack(Items.feather), new ItemStack(Blocks.glass, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Blocks.glass, 1, OreDictionary.WILDCARD_VALUE)); - - registerBMBook(); - } - - if (Loader.isModLoaded("Forestry")) - { - isForestryLoaded = true; - - ModItems.itemBloodFrame = new ItemBloodFrame().setUnlocalizedName("bloodFrame"); - - Item provenFrame = GameRegistry.findItem("Forestry", "frameImpregnated"); - - if(provenFrame !=null) - { - AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.itemBloodFrame), new ItemStack(provenFrame, 1), 3, 30000, 20, 20, false); - } - } else - { - isForestryLoaded = false; - } - - if (Loader.isModLoaded("harvestcraft")) - { - PamHarvestCompatRegistry.registerPamHandlers(); - AlchemicalWizardry.logger.info("Loaded Harvestcraft Handlers!"); - } - - if(Loader.isModLoaded("MineTweaker3")) - { - MineTweakerIntegration.register(); - AlchemicalWizardry.logger.info("Loaded MineTweaker 3 Integration"); - } - -// if(Loader.isModLoaded("AgriCraft")) -// { -// HarvestRegistry.registerHarvestHandler(new AgriCraftCropHarvestHandler()); -// AlchemicalWizardry.logger.info("Loaded AgriCraft Handlers!"); -// } -*/ - isThaumcraftLoaded = Loader.isModLoaded("Thaumcraft"); //this is temp. - isBotaniaLoaded = Loader.isModLoaded("Botania"); - isPneumaticCraftLoaded = Loader.isModLoaded("PneumaticCraft"); - isFMPLoaded = Loader.isModLoaded("ForgeMultipart"); - - BloodMagicConfiguration.loadBlacklist(); - BloodMagicConfiguration.blacklistRituals(); - - DemonVillageLootRegistry.init(); - - this.initCompressionHandlers(); - - -// if(parseTextFiles) -// this.parseTextFile(); - -// this.createItemTextureFiles(); + @Mod.EventHandler + public void postInit(FMLPostInitializationEvent event) { + proxy.postInit(); } - -/* @Optional.Method(modid = "guideapi") - public static void registerBMBook() - { - BloodMagicGuide.registerGuide(); - } -*/ - public static void blacklistAccelerators() - { - if (Loader.isModLoaded("Torcherino")) - { - FMLInterModComms.sendMessage("Torcherino", "blacklist-tile", TEAltar.class.getName()); - FMLInterModComms.sendMessage("Torcherino", "blacklist-tile", TEMasterStone.class.getName()); - } - if (Loader.isModLoaded("ChromatiCraft")) - { - try - { - Class api = Class.forName("Reika.ChromatiCraft.API.AcceleratorBlacklist"); - Class reason = Class.forName("Reika.ChromatiCraft.API.AcceleratorBlacklist$BlacklistReason"); - Object exploit = Enum.valueOf(reason,"EXPLOIT"); - Method add = api.getMethod("addBlacklist", Class.class, String.class, reason); - add.invoke(null, TEAltar.class, TEAltar.class.getSimpleName(),exploit); - add.invoke(null, TEMasterStone.class, TEMasterStone.class.getSimpleName(),exploit); - } catch (Exception e) - { - logger.log(Level.ERROR, "ChromatiCraft Accelerator Blacklist Failure"); - } - - } - } - - 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}; - if (Loader.isModLoaded("MineFactoryReloaded")) - { - ModContainer bloodMagic = Loader.instance().activeModContainer(); - Method method = null; - Constructor constructor = null; - try - { - constructor = FMLInterModComms.IMCMessage.class.getDeclaredConstructor(String.class, Object.class); - constructor.setAccessible(true); - method = FMLInterModComms.class.getDeclaredMethod("enqueueMessage", Object.class, String.class, FMLInterModComms.IMCMessage.class); - method.setAccessible(true); - } - catch(Exception e) - { - logger.log(Level.ERROR, "Grinder Message reflection failed"); - } - for (int i = 0; i maxLines) -// { -// changePage = true; -// } -// if(changePage) //Encode into current entry, then move to next entry -// { -// String[] newStrings = new String[currentPage + 1 + 1]; //Just to show that it is increasing -// for(int i=0; i 3L) -//// { -//// -//// }else -// { -// PrintWriter writer = new PrintWriter(file); -// for(String stri : strings) -// { -// writer.println(stri); -// } -// writer.close(); -// } -// -//// -// } -// -// Minecraft.getMinecraft().fontRendererObj.setUnicodeFlag(false); -// -// } catch (FileNotFoundException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } catch (IOException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } -// } -// } - -// @Mod.EventHandler -// public void initCommands(FMLServerStartingEvent event) -// { -// event.registerServerCommand(new CommandBind()); -// event.registerServerCommand(new CommandUnbind()); -// event.registerServerCommand(new CommandSN()); -// event.registerServerCommand(new CommandDownloadGAPI()); -// } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java b/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java deleted file mode 100644 index 3eed0062..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java +++ /dev/null @@ -1,301 +0,0 @@ -package WayofTime.alchemicalWizardry; - -import java.io.File; -import java.lang.reflect.Modifier; -import java.util.ArrayList; -import java.util.List; -import java.util.Map.Entry; - -import net.minecraft.entity.EntityList; -import net.minecraft.entity.EntityLivingBase; -import net.minecraftforge.common.config.Configuration; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.relauncher.Side; -import WayofTime.alchemicalWizardry.api.rituals.Rituals; -import WayofTime.alchemicalWizardry.client.renderer.ColourThreshold; -import WayofTime.alchemicalWizardry.client.renderer.RenderHelper; -import WayofTime.alchemicalWizardry.common.demonVillage.DemonVillagePath; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; -import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; -import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm; - -/** - * 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(); - - public static Configuration config; - - public static String[] blocksToBeDisabled; - public static String[] itemsToBeDisabled; - public static String[] teleposerBlacklist; - public static String[] blacklist = {}; - - public static void init(File configFile) - { - for (String s : DEFAULT_COLOR_LIST.split(";")) - { - String[] ct = s.split(","); - colorList.add(new ColourThreshold(Integer.valueOf(ct[0].trim()), ct[1].trim())); - } - - config = new Configuration(configFile); - - try - { - config.load(); - syncConfig(); - - } catch (Exception e) - { - AlchemicalWizardry.logger.error("There has been a problem loading the configuration, go ask on the forums :p"); - - } finally - { - config.save(); - } - } - - 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(); - - MeteorParadigm.maxChance = config.get("meteor", "maxChance", 1000).getInt(); - AlchemicalWizardry.doMeteorsDestroyBlocks = config.get("meteor", "doMeteorsDestroyBlocks", true).getBoolean(true); - AlchemicalWizardry.diamondMeteorArray = config.get("meteor", "diamondMeteor", new String[]{"oreDiamond", "100", "oreEmerald", "75", "oreCinnabar", "200", "oreAmber", "200"}).getStringList(); - AlchemicalWizardry.diamondMeteorRadius = config.get("meteor", "diamondMeteorRadius", 5).getInt(); - AlchemicalWizardry.stoneMeteorArray = config.get("meteor", "stoneBlockMeteor", new String[]{"oreCoal", "150", "oreApatite", "50", "oreIron", "50"}).getStringList(); - AlchemicalWizardry.stoneMeteorRadius = config.get("meteor", "stoneMeteorRadius", 16).getInt(); - AlchemicalWizardry.ironBlockMeteorArray = config.get("meteor", "ironBlockMeteor", new String[]{"oreIron", "400", "oreGold", "30", "oreCopper", "200", "oreTin", "140", "oreSilver", "70", "oreLead", "80", "oreLapis", "60", "oreRedstone", "100"}).getStringList(); - AlchemicalWizardry.ironBlockMeteorRadius = config.get("meteor", "ironBlockMeteorRadius", 7).getInt(); - AlchemicalWizardry.netherStarMeteorArray = config.get("meteor", "netherStarMeteor", new String[]{"oreDiamond", "150", "oreEmerald", "100", "oreQuartz", "250", "oreSunstone", "5", "oreMoonstone", "50", "oreIridium", "5", "oreCertusQuartz", "150"}).getStringList(); - AlchemicalWizardry.netherStarMeteorRadius = config.get("meteor", "netherStarMeteorRadius", 3).getInt(); - - 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.lockdownAltar = 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.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).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).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).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.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).getBoolean(false); - AlchemicalWizardry.ritualDisabledSphereIsland = config.get("Ritual Blacklist", "Birth of the Bastion", 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").getStringList(); - - 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()); - - 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(); - - BoundArmour.tryComplexRendering = config.get("WimpySettings", "UseFancyBoundArmour", true).getBoolean(true); - - blocksToBeDisabled = config.getStringList("Disable blocks here", "WimpySettings", new String[]{""}, "Type in the unlocalized name of the block you want disabled here (separate them using ENTER)"); - itemsToBeDisabled = config.getStringList("Disable items here", "WimpySettings", new String[]{""}, "Type in the unlocalized name of the item you want disabled (separate them using ENTER)"); - -// 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", 400).getInt(); - - - 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(); - } - - config.save(); - } - - public static void set(String categoryName, String propertyName, String newValue) - { - - config.load(); - if (config.getCategoryNames().contains(categoryName)) - { - if (config.getCategory(categoryName).containsKey(propertyName)) - { - config.getCategory(categoryName).get(propertyName).set(newValue); - } - } - config.save(); - - - } - - public static void loadBlacklist() - { - AlchemicalWizardry.wellBlacklist = new ArrayList(); - for (Object o : EntityList.stringToClassMapping.entrySet()) - { - Entry entry = (Entry) o; - Class curClass = (Class) entry.getValue(); - boolean valid = EntityLivingBase.class.isAssignableFrom(curClass) && !Modifier.isAbstract(curClass.getModifiers()); - if (valid) - { - boolean blacklisted = config.get("wellOfSufferingBlackList", entry.getKey().toString(), false).getBoolean(); - if (blacklisted) - AlchemicalWizardry.wellBlacklist.add(curClass); - } - - } - config.save(); - } - - public static void blacklistRituals() - { - if (AlchemicalWizardry.ritualDisabledWater) r("AW001Water"); - if (AlchemicalWizardry.ritualDisabledLava) r("AW002Lava"); - if (AlchemicalWizardry.ritualDisabledGreenGrove) r("AW003GreenGrove"); - 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.ritualDisabledHighJump) r("AW008HighJump"); - if (AlchemicalWizardry.ritualDisabledMagnetism) r("AW009Magnetism"); - if (AlchemicalWizardry.ritualDisabledCrusher) r("AW010Crusher"); - if (AlchemicalWizardry.ritualDisabledSpeed) r("AW011Speed"); - if (AlchemicalWizardry.ritualDisabledAnimalGrowth) r("AW012AnimalGrowth"); - if (AlchemicalWizardry.ritualDisabledSuffering) r("AW013Suffering"); - if (AlchemicalWizardry.ritualDisabledRegen) r("AW014Regen"); - if (AlchemicalWizardry.ritualDisabledFeatheredKnife) r("AW015FeatheredKnife"); - if (AlchemicalWizardry.ritualDisabledFeatheredEarth) r("AW016FeatheredEarth"); - if (AlchemicalWizardry.ritualDisabledGaia) r("AW017Gaia"); - if (AlchemicalWizardry.ritualDisabledCondor) r("AW018Condor"); - if (AlchemicalWizardry.ritualDisabledFallingTower) r("AW019FallingTower"); - if (AlchemicalWizardry.ritualDisabledBalladOfAlchemy) r("AW020BalladOfAlchemy"); - if (AlchemicalWizardry.ritualDisabledExpulsion) r("AW021Expulsion"); - if (AlchemicalWizardry.ritualDisabledSuppression) r("AW022Suppression"); - if (AlchemicalWizardry.ritualDisabledZephyr) r("AW023Zephyr"); - if (AlchemicalWizardry.ritualDisabledHarvest) r("AW024Harvest"); - if (AlchemicalWizardry.ritualDisabledConduit) r("AW025Conduit"); - if (AlchemicalWizardry.ritualDisabledEllipsoid) r("AW026Ellipsoid"); - if (AlchemicalWizardry.ritualDisabledEvaporation) r("AW027Evaporation"); - if (AlchemicalWizardry.ritualDisabledSpawnWard) r("AW028SpawnWard"); - if (AlchemicalWizardry.ritualDisabledVeilOfEvil) r("AW029VeilOfEvil"); - if (AlchemicalWizardry.ritualDisabledFullStomach) r("AW030FullStomach"); - if (AlchemicalWizardry.ritualDisabledConvocation) r("AW031Convocation"); - if (AlchemicalWizardry.ritualDisabledSymmetry) r("AW032Symmetry"); - if (AlchemicalWizardry.ritualDisabledStalling) r("AW033Stalling"); - if (AlchemicalWizardry.ritualDisabledCrafting) r("AW034Crafting"); - if (AlchemicalWizardry.ritualDisabledPhantomHands) r("AW035PhantomHands"); - if (AlchemicalWizardry.ritualDisabledSphereIsland) r("AW036SphereIsland"); - } - - private static void r(String ritualID) - { - Rituals.ritualMap.remove(ritualID); - Rituals.keyList.remove(ritualID); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/ConfigHandler.java b/src/main/java/WayofTime/alchemicalWizardry/ConfigHandler.java new file mode 100644 index 00000000..607e7b0c --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/ConfigHandler.java @@ -0,0 +1,195 @@ +package WayofTime.alchemicalWizardry; + +import WayofTime.alchemicalWizardry.api.AlchemicalWizardryAPI; +import WayofTime.alchemicalWizardry.api.BlockStack; +import WayofTime.alchemicalWizardry.registry.ModPotions; +import WayofTime.alchemicalWizardry.util.Utils; +import net.minecraft.block.Block; +import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.oredict.OreDictionary; + +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class ConfigHandler { + + public static Configuration config; + + // Teleposer + public static String[] teleposerBlacklisting; + public static ArrayList teleposerBlacklist = new ArrayList(); + + // Item/Block Disabling + public static List itemBlacklist; + public static List blockBlacklist; + + // Potion ID's + public static int customPotionDrowningID; + public static int customPotionBoostID; + public static int customPotionProjProtID; + public static int customPotionInhibitID; + public static int customPotionFlightID; + public static int customPotionReciprocationID; + public static int customPotionFlameCloakID; + public static int customPotionIceCloakID; + public static int customPotionHeavyHeartID; + public static int customPotionFireFuseID; + public static int customPotionPlanarBindingID; + public static int customPotionSoulFrayID; + public static int customPotionSoulHardenID; + public static int customPotionDeafID; + public static int customPotionFeatherFallID; + public static int customPotionDemonCloakID; + public static int customPotionAmphibianID; + + // Potion toggles + public static boolean customPotionDrowningEnabled; + public static boolean customPotionBoostEnabled; + public static boolean customPotionProjProtEnabled; + public static boolean customPotionInhibitEnabled; + public static boolean customPotionFlightEnabled; + public static boolean customPotionReciprocationEnabled; + public static boolean customPotionFlameCloakEnabled; + public static boolean customPotionIceCloakEnabled; + public static boolean customPotionHeavyHeartEnabled; + public static boolean customPotionFireFuseEnabled; + public static boolean customPotionPlanarBindingEnabled; + public static boolean customPotionSoulFrayEnabled; + public static boolean customPotionSoulHardenEnabled; + public static boolean customPotionDeafEnabled; + public static boolean customPotionFeatherFallEnabled; + public static boolean customPotionDemonCloakEnabled; + public static boolean customPotionAmphibianEnabled; + public static boolean vanillaPotionRegenerationEnabled; + public static boolean vanillaPotionNightVisionEnabled; + public static boolean vanillaPotionFireResistEnabled; + public static boolean vanillaPotionWaterBreathingEnabled; + public static boolean vanillaPotionSpeedEnabled; + public static boolean vanillaPotionHealthEnabled; + public static boolean vanillaPotionPoisonEnabled; + public static boolean vanillaPotionBlindnessEnabled; + public static boolean vanillaPotionWeaknessEnabled; + public static boolean vanillaPotionStrengthEnabled; + public static boolean vanillaPotionJumpBoostEnabled; + public static boolean vanillaPotionSlownessEnabled; + public static boolean vanillaPotionMiningEnabled; + public static boolean vanillaPotionInvisibilityEnabled; + public static boolean vanillaPotionResistanceEnabled; + public static boolean vanillaPotionSaturationEnabled; + public static boolean vanillaPotionHealthBoostEnabled; + public static boolean vanillaPotionAbsorptionEnabled; + + public static void init(File file) { + config = new Configuration(file); + syncConfig(); + } + + public static void syncConfig() { + String category; + + category = "Item/Block Blacklisting"; + config.addCustomCategoryComment(category, "Allows disabling of specific Blocks/Items.\nNote that using this may result in crashes. Use is not supported."); + config.setCategoryRequiresMcRestart(category, true); + itemBlacklist = Arrays.asList(config.getStringList("itemBlacklist", category, new String[]{}, "Items to not be registered. This requires their mapping name. Usually the same as the class name. Can be found in F3+H mode.")); + blockBlacklist = Arrays.asList(config.getStringList("blockBlacklist", category, new String[]{}, "Blocks to not be registered. This requires their mapping name. Usually the same as the class name. Can be found in F3+H mode.")); + + category = "Teleposer Blacklist"; + config.addCustomCategoryComment(category, "Block blacklisting"); + teleposerBlacklisting = config.getStringList("teleposerBlacklist", category, new String[] {"minecraft:bedrock"}, "Stops specified blocks from being teleposed. Put entries on new lines. Valid syntax is:\nmodid:blockname:meta"); + buildTeleposerBlacklist(); + + category = "Potions"; + config.addCustomCategoryComment(category, "Potion settings"); + config.addCustomCategoryComment(category + ".id", "Potion ID settings"); + customPotionDrowningID = config.getInt("customPotionDrowningID", category + ".id", 100, 20, ModPotions.getArraySize(), "ID of the Drowning potion"); + customPotionBoostID = config.getInt("customPotionBoostID", category + ".id", 101, 20, ModPotions.getArraySize(), "ID of the Boost potion"); + customPotionProjProtID = config.getInt("customPotionProjProtID", category + ".id", 102, 20, ModPotions.getArraySize(), "ID of the Projectile Protection potion"); + customPotionInhibitID = config.getInt("customPotionInhibitID", category + ".id", 103, 20, ModPotions.getArraySize(), "ID of the Inhibit potion"); + customPotionFlightID = config.getInt("customPotionFlightID", category + ".id", 104, 20, ModPotions.getArraySize(), "ID of the Flight potion"); + customPotionReciprocationID = config.getInt("customPotionReciprocationID", category + ".id", 105, 20, ModPotions.getArraySize(), "ID of the Reciprocation potion"); + customPotionFlameCloakID = config.getInt("customPotionFlameCloakID", category + ".id", 106, 20, ModPotions.getArraySize(), "ID of the Flame Cloak potion"); + customPotionIceCloakID = config.getInt("customPotionIceCloakID", category + ".id", 107, 20, ModPotions.getArraySize(), "ID of the Ice Cloak potion"); + customPotionHeavyHeartID = config.getInt("customPotionHeavyHeartID", category + ".id", 108, 20, ModPotions.getArraySize(), "ID of the Heavy Heart potion"); + customPotionFireFuseID = config.getInt("customPotionFireFuseID", category + ".id", 109, 20, ModPotions.getArraySize(), "ID of the Fire Fuse potion"); + customPotionPlanarBindingID = config.getInt("customPotionPlanarBindingID", category + ".id", 110, 20, ModPotions.getArraySize(), "ID of the Planar Binding potion"); + customPotionSoulFrayID = config.getInt("customPotionSoulFrayID", category + ".id", 111, 20, ModPotions.getArraySize(), "ID of the Soul Fray potion"); + customPotionSoulHardenID = config.getInt("customPotionSoulHardenID", category + ".id", 112, 20, ModPotions.getArraySize(), "ID of the Soul Harden potion"); + customPotionDeafID = config.getInt("customPotionDeafID", category + ".id", 113, 20, ModPotions.getArraySize(), "ID of the Deaf potion"); + customPotionFeatherFallID = config.getInt("customPotionFeatherFallID", category + ".id", 114, 20, ModPotions.getArraySize(), "ID of the Feather Fall potion"); + customPotionDemonCloakID = config.getInt("customPotionDemonCloakID", category + ".id", 115, 20, ModPotions.getArraySize(), "ID of the Demon Cloak potion"); + customPotionAmphibianID = config.getInt("customPotionAmphibianID", category + ".id", 116, 20, ModPotions.getArraySize(), "ID of the Amphibian potion"); + + config.addCustomCategoryComment(category + ".toggle", "Toggle potions available in Alchemy"); + customPotionDrowningEnabled = config.getBoolean("customPotionDrowningEnabled", category + ".toggle", true, "Enables the Drowning potion in Alchemy"); + customPotionBoostEnabled = config.getBoolean("customPotionBoostEnabled", category + ".toggle", true, "Enables the Boost potion in Alchemy"); + customPotionProjProtEnabled = config.getBoolean("customPotionProjProtEnabled", category + ".toggle", true, "Enables the Projectile Protection potion in Alchemy"); + customPotionInhibitEnabled = config.getBoolean("customPotionInhibitEnabled", category + ".toggle", true, "Enables the Inhibit potion in Alchemy"); + customPotionFlightEnabled = config.getBoolean("customPotionFlightEnabled", category + ".toggle", true, "Enables the Flight potion in Alchemy"); + customPotionReciprocationEnabled = config.getBoolean("customPotionReciprocationEnabled", category + ".toggle", true, "Enables the Reciprocation potion in Alchemy"); + customPotionFlameCloakEnabled = config.getBoolean("customPotionFlameCloakEnabled", category + ".toggle", true, "Enables the Flame Cloak potion in Alchemy"); + customPotionIceCloakEnabled = config.getBoolean("customPotionIceCloakEnabled", category + ".toggle", true, "Enables the Ice Cloak potion in Alchemy"); + customPotionHeavyHeartEnabled = config.getBoolean("customPotionHeavyHeartEnabled", category + ".toggle", true, "Enables the Heavy Heart potion in Alchemy"); + customPotionFireFuseEnabled = config.getBoolean("customPotionFireFuseEnabled", category + ".toggle", true, "Enables the Fire Fuse potion in Alchemy"); + customPotionPlanarBindingEnabled = config.getBoolean("customPotionPlanarBindingEnabled", category + ".toggle", true, "Enables the Planar Binding potion in Alchemy"); + customPotionSoulFrayEnabled = config.getBoolean("customPotionSoulFrayEnabled", category + ".toggle", true, "Enables the Soul Fray potion in Alchemy"); + customPotionSoulHardenEnabled = config.getBoolean("customPotionSoulHardenEnabled", category + ".toggle", true, "Enables the Soul Harden potion in Alchemy"); + customPotionDeafEnabled = config.getBoolean("customPotionDeafEnabled", category + ".toggle", true, "Enables the Deaf potion in Alchemy"); + customPotionFeatherFallEnabled = config.getBoolean("customPotionFeatherFallEnabled", category + ".toggle", true, "Enables the Feather Fall potion in Alchemy"); + customPotionDemonCloakEnabled = config.getBoolean("customPotionDemonCloakEnabled", category + ".toggle", true, "Enables the Demon Cloak potion in Alchemy"); + customPotionAmphibianEnabled = config.getBoolean("customPotionAmphibianEnabled", category + ".toggle", true, "Enables the Amphibian potion in Alchemy"); + vanillaPotionAbsorptionEnabled = config.getBoolean("vanillaPotionAbsorptionEnabled", category + ".toggle", true, "Enables the Absorption potion in Alchemy"); + vanillaPotionBlindnessEnabled = config.getBoolean("vanillaPotionBlindnessEnabled", category + ".toggle", true, "Enables the Blindness potion in Alchemy"); + vanillaPotionFireResistEnabled = config.getBoolean("vanillaPotionFireResistEnabled", category + ".toggle", true, "Enables the Fire Resistance potion in Alchemy"); + vanillaPotionHealthBoostEnabled = config.getBoolean("vanillaPotionHealthBoostEnabled", category + ".toggle", true, "Enables the Health Boost potion in Alchemy"); + vanillaPotionHealthEnabled = config.getBoolean("vanillaPotionHealthEnabled", category + ".toggle", true, "Enables the Instant Health potion in Alchemy"); + vanillaPotionInvisibilityEnabled = config.getBoolean("vanillaPotionInvisibilityEnabled", category + ".toggle", true, "Enables the Invisibility potion in Alchemy"); + vanillaPotionJumpBoostEnabled = config.getBoolean("vanillaPotionJumpBoostEnabled", category + ".toggle", true, "Enables the Jump Boost potion in Alchemy"); + vanillaPotionMiningEnabled = config.getBoolean("vanillaPotionMiningEnabled", category + ".toggle", true, "Enables the Mining potion in Alchemy"); + vanillaPotionPoisonEnabled = config.getBoolean("vanillaPotionPoisonEnabled", category + ".toggle", true, "Enables the Poison potion in Alchemy"); + vanillaPotionRegenerationEnabled = config.getBoolean("vanillaPotionRegenerationEnabled", category + ".toggle", true, "Enables the Regeneration potion in Alchemy"); + vanillaPotionNightVisionEnabled = config.getBoolean("vanillaPotionNightVisionEnabled", category + ".toggle", true, "Enables the Night Vision potion in Alchemy"); + vanillaPotionResistanceEnabled = config.getBoolean("vanillaPotionResistanceEnabled", category + ".toggle", true, "Enables the Resistance potion in Alchemy"); + vanillaPotionSaturationEnabled = config.getBoolean("vanillaPotionSaturationEnabled", category + ".toggle", true, "Enables the Saturation potion in Alchemy"); + vanillaPotionSlownessEnabled = config.getBoolean("vanillaPotionSlownessEnabled", category + ".toggle", true, "Enables the Slowness potion in Alchemy"); + vanillaPotionSpeedEnabled = config.getBoolean("vanillaPotionSpeedEnabled", category + ".toggle", true, "Enables the Speed potion in Alchemy"); + vanillaPotionStrengthEnabled = config.getBoolean("vanillaPotionStrengthEnabled", category + ".toggle", true, "Enables the Strength potion in Alchemy"); + vanillaPotionWaterBreathingEnabled = config.getBoolean("vanillaPotionWaterBreathingEnabled", category + ".toggle", true, "Enables the Water Breathing potion in Alchemy"); + vanillaPotionWeaknessEnabled = config.getBoolean("vanillaPotionWeaknessEnabled", category + ".toggle", true, "Enables the Weakness potion in Alchemy"); + + category = "General"; + config.addCustomCategoryComment(category, "General settings"); + AlchemicalWizardryAPI.setLoggingEnabled(config.getBoolean("enableLogging", category, true, "Allows logging information to the console. Fatal errors will bypass this")); + + config.save(); + } + + private static void buildTeleposerBlacklist() { + + // Make sure it's empty before setting the blacklist. + // Otherwise, reloading the config while in-game will duplicate the list. + teleposerBlacklist.clear(); + + for (String blockSet : teleposerBlacklisting) { + String[] blockData = blockSet.split(":"); + + Block block = GameRegistry.findBlock(blockData[0], blockData[1]); + int meta = 0; + + // If the block follows full syntax: modid:blockname:meta + if (blockData.length == 3) { + // Check if it's an int, if so, parse it. If not, set meta to 0 to avoid crashing. + if (Utils.isInteger(blockData[2])) + meta = Integer.parseInt(blockData[2]); + else if (blockData[2].equals("*")) + meta = OreDictionary.WILDCARD_VALUE; + else + meta = 0; + } + + teleposerBlacklist.add(new BlockStack(block, meta)); + } + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java b/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java deleted file mode 100644 index e5da2afb..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java +++ /dev/null @@ -1,200 +0,0 @@ -package WayofTime.alchemicalWizardry; - -import WayofTime.alchemicalWizardry.client.BlockRenderer; -import net.minecraft.block.Block; -import net.minecraft.item.ItemBlock; -import net.minecraftforge.fml.common.registry.GameRegistry; -import WayofTime.alchemicalWizardry.common.block.BlockArmourForge; -import WayofTime.alchemicalWizardry.common.block.BlockAlchemicalCalcinator; -import WayofTime.alchemicalWizardry.common.block.BlockAltar; -import WayofTime.alchemicalWizardry.common.block.BlockBelljar; -import WayofTime.alchemicalWizardry.common.block.BlockBloodLightSource; -import WayofTime.alchemicalWizardry.common.block.BlockConduit; -import WayofTime.alchemicalWizardry.common.block.BlockIncenseCrucible; -import WayofTime.alchemicalWizardry.common.block.BlockCrystal; -import WayofTime.alchemicalWizardry.common.block.BlockDemonPortal; -import WayofTime.alchemicalWizardry.common.block.BlockEnchantmentGlyph; -import WayofTime.alchemicalWizardry.common.block.BlockSpellTable; -import WayofTime.alchemicalWizardry.common.block.BlockMasterStone; -import WayofTime.alchemicalWizardry.common.block.BlockPedestal; -import WayofTime.alchemicalWizardry.common.block.BlockPlinth; -import WayofTime.alchemicalWizardry.common.block.BlockReagentConduit; -import WayofTime.alchemicalWizardry.common.block.BlockSchematicSaver; -import WayofTime.alchemicalWizardry.common.block.BlockFilledSocket; -import WayofTime.alchemicalWizardry.common.block.BlockSpectralContainer; -import WayofTime.alchemicalWizardry.common.block.BlockSpellEffect; -import WayofTime.alchemicalWizardry.common.block.BlockSpellEnhancement; -import WayofTime.alchemicalWizardry.common.block.BlockSpellModifier; -import WayofTime.alchemicalWizardry.common.block.BlockSpellParadigm; -import WayofTime.alchemicalWizardry.common.block.BlockStabilityGlyph; -import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; -import WayofTime.alchemicalWizardry.common.block.BlockChemistrySet; -import WayofTime.alchemicalWizardry.common.block.BlockBloodRune; -import WayofTime.alchemicalWizardry.common.block.BlockBloodStoneBrick; -import WayofTime.alchemicalWizardry.common.block.BlockEfficiencyRune; -import WayofTime.alchemicalWizardry.common.block.BlockEmptySocket; -import WayofTime.alchemicalWizardry.common.block.BlockImperfectRitualStone; -import WayofTime.alchemicalWizardry.common.block.BlockLargeBloodStoneBrick; -import WayofTime.alchemicalWizardry.common.block.BlockLifeEssence; -import WayofTime.alchemicalWizardry.common.block.BlockMimic; -import WayofTime.alchemicalWizardry.common.block.BlockRitualStone; -import WayofTime.alchemicalWizardry.common.block.BlockRuneOfSacrifice; -import WayofTime.alchemicalWizardry.common.block.BlockRuneOfSelfSacrifice; -import WayofTime.alchemicalWizardry.common.block.BlockSpectral; -import WayofTime.alchemicalWizardry.common.block.BlockSpeedRune; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.BlockDemonChest; -import WayofTime.alchemicalWizardry.common.items.ItemBlockCrystalBelljar; -import WayofTime.alchemicalWizardry.common.items.ItemBloodRuneBlock; -import WayofTime.alchemicalWizardry.common.items.ItemCrystalBlock; -import WayofTime.alchemicalWizardry.common.items.ItemEnchantmentGlyphBlock; -import WayofTime.alchemicalWizardry.common.items.ItemSpellEffectBlock; -import WayofTime.alchemicalWizardry.common.items.ItemSpellEnhancementBlock; -import WayofTime.alchemicalWizardry.common.items.ItemSpellModifierBlock; -import WayofTime.alchemicalWizardry.common.items.ItemSpellParadigmBlock; -import WayofTime.alchemicalWizardry.common.items.ItemStabilityGlyphBlock; - -import java.util.ArrayList; - -/** - * 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; - public static BlockBloodRune bloodRune; - public static BlockSpeedRune speedRune; - public static BlockEfficiencyRune efficiencyRune; - public static BlockRuneOfSacrifice runeOfSacrifice; - public static BlockRuneOfSelfSacrifice runeOfSelfSacrifice; - public static Block blockMasterStone; - public static Block ritualStone; - public static Block imperfectRitualStone; - public static Block bloodSocket; - public static Block emptySocket; - public static Block armourForge; - public static Block blockWritingTable; - public static Block blockSpellTable; - public static Block blockPedestal; - public static Block blockPlinth; - public static Block blockLifeEssence; - public static Block blockTeleposer; - public static Block spectralBlock; - public static Block blockConduit; - public static Block blockBloodLight; - public static Block blockSpellEffect; - public static Block blockSpellParadigm; - public static Block blockSpellModifier; - public static Block blockSpellEnhancement; - public static Block blockSpectralContainer; - public static Block blockBuildingSchematicSaver; - public static Block blockDemonPortal; - public static Block blockReagentConduit; - public static Block blockAlchemicalCalcinator; - public static Block blockCrystalBelljar; - public static Block blockDemonChest; - public static Block blockCrystal; - public static Block blockMimic; - public static Block blockEnchantmentGlyph; - public static Block blockStabilityGlyph; - public static Block blockCrucible; - - public static ArrayList blocksNotToBeRegistered = new ArrayList(); - - public static void init() - { - blockAltar = (BlockAltar) registerBlock(new BlockAltar(), "altar"); - bloodRune = (BlockBloodRune) registerBlock(new BlockBloodRune(), ItemBloodRuneBlock.class, "base_rune"); - speedRune = (BlockSpeedRune) registerBlock(new BlockSpeedRune(), "speed_rune"); - efficiencyRune = (BlockEfficiencyRune) registerBlock(new BlockEfficiencyRune(), "efficiency_rune"); - runeOfSacrifice = (BlockRuneOfSacrifice) registerBlock(new BlockRuneOfSacrifice(), "sacrifice_rune"); - runeOfSelfSacrifice = (BlockRuneOfSelfSacrifice) registerBlock(new BlockRuneOfSelfSacrifice(), "self_sacrifice_rune"); - blockTeleposer = registerBlock(new BlockTeleposer(), "teleposer"); - spectralBlock = registerBlock(new BlockSpectral(), "spectral_block"); - ritualStone = registerBlock(new BlockRitualStone(), "ritual_stone"); - blockMasterStone = registerBlock(new BlockMasterStone(), "master_ritual_stone"); - imperfectRitualStone = registerBlock(new BlockImperfectRitualStone(), "imperfect_ritual_stone"); - emptySocket = registerBlock(new BlockEmptySocket(), "empty_socket"); - bloodSocket = registerBlock(new BlockFilledSocket(), "filled_socket"); - armourForge = registerBlock(new BlockArmourForge(), "soul_armour_forge"); - largeBloodStoneBrick = registerBlock(new BlockLargeBloodStoneBrick(), "large_bloodstone_brick"); - bloodStoneBrick = registerBlock(new BlockBloodStoneBrick(), "bloodstone_brick"); - blockWritingTable = registerBlock(new BlockChemistrySet(), "chemistry_set"); - blockSpellTable = registerBlock(new BlockSpellTable(), "spell_table"); - blockPedestal = registerBlock(new BlockPedestal(), "pedestal"); - blockPlinth = registerBlock(new BlockPlinth(), "plinth"); - blockConduit = registerBlock(new BlockConduit(), "spell_conduit"); - blockBloodLight = registerBlock(new BlockBloodLightSource(), "blood_light"); - blockSpellEffect = registerBlock(new BlockSpellEffect(), "spell_effect"); - blockSpellParadigm = registerBlock(new BlockSpellParadigm(), ItemSpellParadigmBlock.class, "spell_paradigm"); - blockSpellModifier = registerBlock(new BlockSpellModifier(), ItemSpellEnhancementBlock.class, "spell_modifier"); - blockSpellEnhancement = registerBlock(new BlockSpellEnhancement(), ItemSpellModifierBlock.class, "spell_enhancement"); - blockSpectralContainer = registerBlock(new BlockSpectralContainer(), ItemSpellEffectBlock.class, "spectral_container"); - blockDemonPortal = registerBlock(new BlockDemonPortal(), "demon_portal"); - blockBuildingSchematicSaver = registerBlock(new BlockSchematicSaver(), "schematic_saver"); - blockReagentConduit = registerBlock(new BlockReagentConduit(), "reagent_conduit"); - blockAlchemicalCalcinator = registerBlock(new BlockAlchemicalCalcinator(), "alchemical_calcinator"); - blockCrystalBelljar = registerBlock(new BlockBelljar(), ItemBlockCrystalBelljar.class, "belljar"); - blockDemonChest = registerBlock(new BlockDemonChest(), "demon_chest"); - blockCrystal = registerBlock(new BlockCrystal(), ItemCrystalBlock.class, "crystal_block"); - blockMimic = registerBlock(new BlockMimic(), "mimic_block"); - - blockLifeEssence = registerBlock(new BlockLifeEssence(), "life_essence"); - blockEnchantmentGlyph = registerBlock(new BlockEnchantmentGlyph(), ItemEnchantmentGlyphBlock.class, "enchantment_glyph"); - blockStabilityGlyph = registerBlock(new BlockStabilityGlyph(), ItemStabilityGlyphBlock.class, "stability_glyph"); - blockCrucible = registerBlock(new BlockIncenseCrucible(), "incense_crucible"); - } - - public static Block registerBlock(Block block, String unlocalizedName) - { - //TODO Insert Model Code here - block.setUnlocalizedName(unlocalizedName); - -// if (!) //creative tab blacklist -// { - block.setCreativeTab(AlchemicalWizardry.tabBloodMagic); -// } - - blocksNotToBeRegistered.clear(); - for (String unlocName : BloodMagicConfiguration.blocksToBeDisabled) - { - if (unlocName.equals(unlocalizedName)) - { - blocksNotToBeRegistered.add(unlocName); - } - } - if (!blocksNotToBeRegistered.contains(unlocalizedName)) - { - GameRegistry.registerBlock(block, unlocalizedName); - } - -// BlockRenderer.registerBlock(block); - - return block; - } - - public static Block registerBlock(Block block, Class itemBlockClass, String unlocalizedName) - { - block.setCreativeTab(AlchemicalWizardry.tabBloodMagic); - - for (String unlocName : BloodMagicConfiguration.blocksToBeDisabled) - { - if (unlocName.equals(unlocalizedName)) - { - blocksNotToBeRegistered.add(unlocName); - } - } - if (!blocksNotToBeRegistered.contains(unlocalizedName)) - { - GameRegistry.registerBlock(block, itemBlockClass, unlocalizedName); - } - -// BlockRenderer.registerBlock(block); - - return block; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/ModItems.java b/src/main/java/WayofTime/alchemicalWizardry/ModItems.java deleted file mode 100644 index c01aeb48..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/ModItems.java +++ /dev/null @@ -1,406 +0,0 @@ -package WayofTime.alchemicalWizardry; - -import java.util.ArrayList; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraftforge.fml.common.registry.GameRegistry; -import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; -import WayofTime.alchemicalWizardry.common.items.ActivationCrystal; -import WayofTime.alchemicalWizardry.common.items.AirScribeTool; -import WayofTime.alchemicalWizardry.common.items.ApprenticeBloodOrb; -import WayofTime.alchemicalWizardry.common.items.ArchmageBloodOrb; -import WayofTime.alchemicalWizardry.common.items.ArmourInhibitor; -import WayofTime.alchemicalWizardry.common.items.BaseItems; -import WayofTime.alchemicalWizardry.common.items.BlankSpell; -import WayofTime.alchemicalWizardry.common.items.BloodShard; -import WayofTime.alchemicalWizardry.common.items.BoundAxe; -import WayofTime.alchemicalWizardry.common.items.BoundBlade; -import WayofTime.alchemicalWizardry.common.items.BoundPickaxe; -import WayofTime.alchemicalWizardry.common.items.BoundShovel; -import WayofTime.alchemicalWizardry.common.items.CreativeDagger; -import WayofTime.alchemicalWizardry.common.items.CreativeOrb; -import WayofTime.alchemicalWizardry.common.items.DaggerOfSacrifice; -import WayofTime.alchemicalWizardry.common.items.DawnScribeTool; -import WayofTime.alchemicalWizardry.common.items.DemonCrystal; -import WayofTime.alchemicalWizardry.common.items.DemonicTelepositionFocus; -import WayofTime.alchemicalWizardry.common.items.DuskScribeTool; -import WayofTime.alchemicalWizardry.common.items.EarthScribeTool; -import WayofTime.alchemicalWizardry.common.items.EnergyBazooka; -import WayofTime.alchemicalWizardry.common.items.EnergyBlaster; -import WayofTime.alchemicalWizardry.common.items.EnhancedTelepositionFocus; -import WayofTime.alchemicalWizardry.common.items.FireScribeTool; -import WayofTime.alchemicalWizardry.common.items.ItemAlchemyBase; -import WayofTime.alchemicalWizardry.common.items.ItemBloodLetterPack; -import WayofTime.alchemicalWizardry.common.items.ItemComplexSpellCrystal; -import WayofTime.alchemicalWizardry.common.items.ItemComponents; -import WayofTime.alchemicalWizardry.common.items.ItemIncense; -import WayofTime.alchemicalWizardry.common.items.ItemRitualDismantler; -import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; -import WayofTime.alchemicalWizardry.common.items.KeyOfBinding; -import WayofTime.alchemicalWizardry.common.items.LavaCrystal; -import WayofTime.alchemicalWizardry.common.items.LifeBucket; -import WayofTime.alchemicalWizardry.common.items.MagicianBloodOrb; -import WayofTime.alchemicalWizardry.common.items.MasterBloodOrb; -import WayofTime.alchemicalWizardry.common.items.Orb; -import WayofTime.alchemicalWizardry.common.items.ReinforcedTelepositionFocus; -import WayofTime.alchemicalWizardry.common.items.SacrificialDagger; -import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; -import WayofTime.alchemicalWizardry.common.items.TranscendentBloodOrb; -import WayofTime.alchemicalWizardry.common.items.WaterScribeTool; -import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; -import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourEarth; -import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourFire; -import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourWater; -import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourWind; -import WayofTime.alchemicalWizardry.common.items.energy.AlchemicalCleanser; -import WayofTime.alchemicalWizardry.common.items.energy.AlchemicalRouter; -import WayofTime.alchemicalWizardry.common.items.energy.AlchemicalSegmenter; -import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask; -import WayofTime.alchemicalWizardry.common.items.potion.AlchemyReagent; -import WayofTime.alchemicalWizardry.common.items.potion.AverageLengtheningCatalyst; -import WayofTime.alchemicalWizardry.common.items.potion.AveragePowerCatalyst; -import WayofTime.alchemicalWizardry.common.items.potion.CombinationalCatalyst; -import WayofTime.alchemicalWizardry.common.items.potion.EnhancedFillingAgent; -import WayofTime.alchemicalWizardry.common.items.potion.GreaterLengtheningCatalyst; -import WayofTime.alchemicalWizardry.common.items.potion.GreaterPowerCatalyst; -import WayofTime.alchemicalWizardry.common.items.potion.MundaneLengtheningCatalyst; -import WayofTime.alchemicalWizardry.common.items.potion.MundanePowerCatalyst; -import WayofTime.alchemicalWizardry.common.items.potion.StandardBindingAgent; -import WayofTime.alchemicalWizardry.common.items.potion.StandardFillingAgent; -import WayofTime.alchemicalWizardry.common.items.potion.WeakBindingAgent; -import WayofTime.alchemicalWizardry.common.items.potion.WeakFillingAgent; -import WayofTime.alchemicalWizardry.common.items.routing.InputRoutingFocus; -import WayofTime.alchemicalWizardry.common.items.routing.OutputRoutingFocus; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilAir; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilBloodLight; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilCompress; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilDivination; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilFluid; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilHarvest; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilLava; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfElementalAffinity; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfEnderSeverance; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfGrowth; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHaste; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfMagnetism; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfSupression; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheAssassin; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheBridge; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheFastMiner; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfWind; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilSeer; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilVoid; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilWater; -import WayofTime.alchemicalWizardry.common.items.sigil.holding.SigilOfHolding; - -/** - * 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; - public static Item energyBlaster; - public static Item energySword; - public static Item lavaCrystal; - public static Item waterSigil; - public static Item lavaSigil; - public static Item voidSigil; - public static Item blankSlate; - public static Item reinforcedSlate; - public static Item sacrificialDagger; - public static Item daggerOfSacrifice; - public static Item airSigil; - public static Item sigilOfTheFastMiner; - public static Item sigilOfElementalAffinity; - public static Item sigilOfHaste; - public static Item sigilOfHolding; - public static Item divinationSigil; - public static Item waterScribeTool; - public static Item fireScribeTool; - public static Item earthScribeTool; - public static Item airScribeTool; - public static Item dawnScribeTool; - public static Item activationCrystal; - public static Item boundPickaxe; - public static Item boundAxe; - public static Item boundShovel; - public static Item boundHelmet; - public static Item boundChestplate; - public static Item boundLeggings; - public static Item boundBoots; - public static Item weakBloodShard; - public static Item growthSigil; - public static Item blankSpell; - public static Item masterBloodOrb; - public static Item alchemyFlask; - public static Item standardBindingAgent; - public static Item mundanePowerCatalyst; - public static Item averagePowerCatalyst; - public static Item greaterPowerCatalyst; - public static Item mundaneLengtheningCatalyst; - public static Item averageLengtheningCatalyst; - public static Item greaterLengtheningCatalyst; - public static Item incendium; - public static Item magicales; - public static Item sanctus; - public static Item aether; - public static Item simpleCatalyst; - public static Item crepitous; - public static Item crystallos; - public static Item terrae; - public static Item aquasalus; - public static Item tennebrae; - public static Item demonBloodShard; - public static Item archmageBloodOrb; - public static Item sigilOfWind; - public static Item telepositionFocus; - public static Item enhancedTelepositionFocus; - public static Item reinforcedTelepositionFocus; - public static Item demonicTelepositionFocus; - public static Item imbuedSlate; - public static Item demonicSlate; - public static Item duskScribeTool; - public static Item sigilOfTheBridge; - public static Item armourInhibitor; - public static Item creativeFiller; - public static Item demonPlacer; - public static Item creativeDagger; - - public static Item baseItems; - public static Item baseAlchemyItems; - - public static Item weakFillingAgent; - public static Item standardFillingAgent; - public static Item enhancedFillingAgent; - public static Item weakBindingAgent; - public static Item itemRitualDiviner; - public static Item sanguineHelmet; - public static Item sanguineRobe; - public static Item sanguinePants; - public static Item sanguineBoots; - public static Item focusBloodBlast; - public static Item focusGravityWell; - public static Item sigilOfMagnetism; - public static Item itemKeyOfDiablo; - public static Item energyBazooka; - public static Item itemBloodLightSigil; - public static Item itemComplexSpellCrystal; - public static Item itemBloodFrame; - - public static Item itemSigilOfEnderSeverance; - public static Item itemSigilOfSupression; - public static Item itemFluidSigil; - public static Item itemSeerSigil; - public static Item itemCombinationalCatalyst; - - public static ItemSpellMultiTool customTool; - - public static Item itemAttunedCrystal; - public static Item itemTankSegmenter; - public static Item itemDestinationClearer; - - public static Item itemHarvestSigil; - public static Item itemCompressionSigil; - - public static Item bucketLife; - - public static Item itemBloodPack; - - public static Item transcendentBloodOrb; - public static Item itemAssassinSigil; - - public static Item boundHelmetWater; - public static Item boundChestplateWater; - public static Item boundLeggingsWater; - public static Item boundBootsWater; - - public static Item boundHelmetEarth; - public static Item boundChestplateEarth; - public static Item boundLeggingsEarth; - public static Item boundBootsEarth; - - public static Item boundHelmetWind; - public static Item boundChestplateWind; - public static Item boundLeggingsWind; - public static Item boundBootsWind; - - public static Item boundHelmetFire; - public static Item boundChestplateFire; - public static Item boundLeggingsFire; - public static Item boundBootsFire; - - public static Item inputRoutingFocus; - public static Item outputRoutingFocus; - - public static Item itemMailCatalogue; - - public static Item itemIncense; - - public static Item ritualDismantler; - - public static ArrayList itemsNotToBeRegistered = new ArrayList(); - - public static void init() - { - weakBloodOrb = registerItem(new Orb(5000), "weak_blood_orb"); - apprenticeBloodOrb = registerItem(new ApprenticeBloodOrb(25000), "apprentice_blood_orb"); - magicianBloodOrb = registerItem(new MagicianBloodOrb(150000), "magician_blood_orb"); - masterBloodOrb = registerItem(new MasterBloodOrb(1000000), "master_blood_orb"); - archmageBloodOrb = registerItem(new ArchmageBloodOrb(10000000), "archmage_blood_orb"); - transcendentBloodOrb = registerItem(new TranscendentBloodOrb(30000000), "transcendent_blood_orb"); - energyBlaster = registerItem(new EnergyBlaster(), "energy_blaster"); - energySword = registerItem(new BoundBlade(), "bound_blade"); - lavaCrystal = registerItem(new LavaCrystal(), "lava_crystal"); - waterSigil = registerItem(new SigilWater(), "water_sigil"); - lavaSigil = registerItem(new SigilLava(), "lava_sigil"); - voidSigil = registerItem(new SigilVoid(), "void_sigil"); - blankSlate = registerItem(new BaseItems(), "blank_slate"); - reinforcedSlate = registerItem(new BaseItems(), "reinforced_slate"); - sacrificialDagger = registerItem(new SacrificialDagger(), "sacrificial_dagger"); - daggerOfSacrifice = registerItem(new DaggerOfSacrifice(), "dagger_of_sacrifice"); - airSigil = registerItem(new SigilAir(), "air_sigil"); - sigilOfTheFastMiner = registerItem(new SigilOfTheFastMiner(), "sigil_of_the_fast_miner"); - sigilOfElementalAffinity = registerItem(new SigilOfElementalAffinity(), "sigil_of_elemental_affinity"); - sigilOfHaste = registerItem(new SigilOfHaste(), "sigil_of_haste"); - sigilOfHolding = registerItem(new SigilOfHolding(), "sigil_of_holding"); - divinationSigil = registerItem(new SigilDivination(), "divination_sigil"); - waterScribeTool = registerItem(new WaterScribeTool(), "water_scribe_tool"); - fireScribeTool = registerItem(new FireScribeTool(), "fire_scribe_tool"); - earthScribeTool = registerItem(new EarthScribeTool(), "earth_scribe_tool"); - airScribeTool = registerItem(new AirScribeTool(), "air_scribe_tool"); - activationCrystal = registerItem(new ActivationCrystal(), "activation_crystal"); - boundPickaxe = registerItem(new BoundPickaxe(), "bound_pickaxe"); - boundAxe = registerItem(new BoundAxe(), "bound_axe"); - boundShovel = registerItem(new BoundShovel(), "bound_shovel"); - boundHelmet = registerItem(new BoundArmour(0), "bound_helmet"); - boundChestplate = registerItem(new BoundArmour(1), "bound_chestplate"); - boundLeggings = registerItem(new BoundArmour(2), "bound_leggings"); - boundBoots = registerItem(new BoundArmour(3), "bound_boots"); - weakBloodShard = registerItem(new BloodShard(), "weak_blood_shard"); - growthSigil = registerItem(new SigilOfGrowth(), "growth_sigil"); - blankSpell = registerItem(new BlankSpell(), "blank_spell"); - alchemyFlask = registerItem(new AlchemyFlask(), "alchemy_flask"); - standardBindingAgent = registerItem(new StandardBindingAgent(), "standard_binding_agent"); - mundanePowerCatalyst = registerItem(new MundanePowerCatalyst(), "mundane_power_catalyst"); - averagePowerCatalyst = registerItem(new AveragePowerCatalyst(), "average_power_catalyst"); - greaterPowerCatalyst = registerItem(new GreaterPowerCatalyst(), "greater_power_catalyst"); - mundaneLengtheningCatalyst = registerItem(new MundaneLengtheningCatalyst(), "mundane_lengthening_catalyst"); - averageLengtheningCatalyst = registerItem(new AverageLengtheningCatalyst(), "average_lengthening_catalyst"); - greaterLengtheningCatalyst = registerItem(new GreaterLengtheningCatalyst(), "greater_lengthening_catalyst"); - incendium = registerItem(new AlchemyReagent(), "incendium"); - magicales = registerItem(new AlchemyReagent(), "magicales"); - sanctus = registerItem(new AlchemyReagent(), "sanctus"); - aether = registerItem(new AlchemyReagent(), "aether"); - simpleCatalyst = registerItem(new AlchemyReagent(), "simple_catalyst"); - crepitous = registerItem(new AlchemyReagent(), "crepitous"); - crystallos = registerItem(new AlchemyReagent(), "crystallos"); - terrae = registerItem(new AlchemyReagent(), "terrae"); - aquasalus = registerItem(new AlchemyReagent(), "aquasalus"); - tennebrae = registerItem(new AlchemyReagent(), "tennebrae"); - demonBloodShard = registerItem(new BloodShard(), "demon_blood_shard"); - sigilOfWind = registerItem(new SigilOfWind(), "sigil_of_wind"); - telepositionFocus = registerItem(new TelepositionFocus(1), "teleposition_focus"); - enhancedTelepositionFocus = registerItem(new EnhancedTelepositionFocus(), "enhanced_teleposition_focus"); - reinforcedTelepositionFocus = registerItem(new ReinforcedTelepositionFocus(), "reinforced_teleposition_focus"); - demonicTelepositionFocus = registerItem(new DemonicTelepositionFocus(), "demonic_teleposition_focus"); - imbuedSlate = registerItem(new BaseItems(), "imbued_slate"); - demonicSlate = registerItem(new BaseItems(), "demonic_slate"); - duskScribeTool = registerItem(new DuskScribeTool(), "dusk_scribe_tool"); - sigilOfTheBridge = registerItem(new SigilOfTheBridge(), "sigil_of_the_bridge"); - armourInhibitor = registerItem(new ArmourInhibitor(), "armour_inhibitor"); - creativeFiller = registerItem(new CreativeOrb(), "creative_orb"); - demonPlacer = registerItem(new DemonCrystal(), "demon_crystal"); - creativeDagger = registerItem(new CreativeDagger(), "creative_dagger"); - weakFillingAgent = registerItem(new WeakFillingAgent(), "weak_filling_agent"); - standardFillingAgent = registerItem(new StandardFillingAgent(), "standard_filling_agent"); - enhancedFillingAgent = registerItem(new EnhancedFillingAgent(), "enhanced_filling_agent"); - weakBindingAgent = registerItem(new WeakBindingAgent(), "weak_binding_agent"); - itemRitualDiviner = registerItem(new ItemRitualDiviner(), "ritual_diviner"); - sigilOfMagnetism = registerItem(new SigilOfMagnetism(), "sigil_of_magnetism"); - itemKeyOfDiablo = registerItem(new KeyOfBinding(), "key_of_binding"); - energyBazooka = registerItem(new EnergyBazooka(), "energy_bazooka"); - itemBloodLightSigil = registerItem(new SigilBloodLight(), "blood_light_sigil"); - itemComplexSpellCrystal = registerItem(new ItemComplexSpellCrystal(), "complex_spell_crystal"); - bucketLife = registerItem(new LifeBucket(ModBlocks.blockLifeEssence), "bucket_life").setContainerItem(Items.bucket).setCreativeTab(CreativeTabs.tabMisc); - itemSigilOfEnderSeverance = registerItem(new SigilOfEnderSeverance(), "sigil_of_ender_severance"); - baseItems = registerItem(new ItemComponents(), "base_items"); - baseAlchemyItems = registerItem(new ItemAlchemyBase(), "base_alchemy_items"); - itemSigilOfSupression = registerItem(new SigilOfSupression(), "sigil_of_suppression"); - itemFluidSigil = registerItem(new SigilFluid(), "fluid_sigil"); - itemSeerSigil = registerItem(new SigilSeer(), "sigil_of_sight"); - customTool = (ItemSpellMultiTool) registerItem(new ItemSpellMultiTool(), "multi_tool"); - - SpellParadigmTool.customTool = customTool; - - itemCombinationalCatalyst = registerItem(new CombinationalCatalyst(), "combinational_catalyst"); - itemAttunedCrystal = registerItem(new AlchemicalRouter(), "alchemical_router"); - itemTankSegmenter = registerItem(new AlchemicalSegmenter(), "alchemical_segmenter"); - itemDestinationClearer = registerItem(new AlchemicalCleanser(), "alchemical_cleanser"); - - dawnScribeTool = registerItem(new DawnScribeTool(), "dawn_scribe_tool"); - - itemBloodPack = registerItem(new ItemBloodLetterPack(), "blood_pack"); - itemHarvestSigil = registerItem(new SigilHarvest(), "harvest_sigil"); - itemCompressionSigil = registerItem(new SigilCompress(), "compression_sigil"); - itemAssassinSigil = registerItem(new SigilOfTheAssassin(), "assassin_sigil"); - - boundHelmetWater = registerItem(new OmegaArmourWater(0), "bound_helmet_water"); - boundChestplateWater = registerItem(new OmegaArmourWater(1), "bound_chestplate_water"); - boundLeggingsWater = registerItem(new OmegaArmourWater(2), "bound_leggings_water"); - boundBootsWater = registerItem(new OmegaArmourWater(3), "bound_boots_water"); - - boundHelmetEarth = registerItem(new OmegaArmourEarth(0), "bound_helmet_earth"); - boundChestplateEarth = registerItem(new OmegaArmourEarth(1), "bound_chestplate_earth"); - boundLeggingsEarth = registerItem(new OmegaArmourEarth(2), "bound_leggings_earth"); - boundBootsEarth = registerItem(new OmegaArmourEarth(3), "bound_boots_earth"); - - boundHelmetWind = registerItem(new OmegaArmourWind(0), "bound_helmet_wind"); - boundChestplateWind = registerItem(new OmegaArmourWind(1), "bound_chestplate_wind"); - boundLeggingsWind = registerItem(new OmegaArmourWind(2), "bound_leggings_wind"); - boundBootsWind = registerItem(new OmegaArmourWind(3), "bound_boots_wind"); - - boundHelmetFire = registerItem(new OmegaArmourFire(0), "bound_helmet_fire"); - boundChestplateFire = registerItem(new OmegaArmourFire(1), "bound_chestplate_fire"); - boundLeggingsFire = registerItem(new OmegaArmourFire(2), "bound_leggings_fire"); - boundBootsFire = registerItem(new OmegaArmourFire(3), "bound_boots_fire"); - - inputRoutingFocus = registerItem(new InputRoutingFocus(), "input_routing_focus"); - outputRoutingFocus = registerItem(new OutputRoutingFocus(), "output_routing_focus"); - - itemIncense = registerItem(new ItemIncense(), "incense"); - - ritualDismantler = registerItem(new ItemRitualDismantler(), "ritual_dismantler"); - } - - public static Item registerItem(Item item, String unlocalizedName) - { - item.setUnlocalizedName(unlocalizedName); - item.setCreativeTab(AlchemicalWizardry.tabBloodMagic); -// itemsNotToBeRegistered.clear(); - -// for (String unlocName : BloodMagicConfiguration.itemsToBeDisabled) - { -// if (unlocName.equals(unlocalizedName)) - { -// itemsNotToBeRegistered.add(unlocName); - } - } - -// if (!itemsNotToBeRegistered.contains(unlocalizedName)) - { - GameRegistry.registerItem(item, unlocalizedName); - } - - return item; - } - - -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/altar/BloodAltar.java b/src/main/java/WayofTime/alchemicalWizardry/altar/BloodAltar.java new file mode 100644 index 00000000..6e4861c9 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/altar/BloodAltar.java @@ -0,0 +1,131 @@ +package WayofTime.alchemicalWizardry.altar; + +import WayofTime.alchemicalWizardry.api.BlockStack; +import WayofTime.alchemicalWizardry.api.altar.AltarComponent; +import WayofTime.alchemicalWizardry.api.iface.IAltarComponent; +import WayofTime.alchemicalWizardry.api.enumeration.EnumAltarComponent; +import WayofTime.alchemicalWizardry.api.enumeration.EnumAltarTier; +import net.minecraft.block.BlockBeacon; +import net.minecraft.block.BlockGlowstone; +import net.minecraft.init.Blocks; +import net.minecraft.util.BlockPos; +import net.minecraft.world.World; + +public class BloodAltar { + + public static EnumAltarTier getAltarTier(World world, BlockPos pos) { + for (int i = EnumAltarTier.MAXTIERS; i >= 2; i--) + if (checkAltarIsValid(world, pos, i)) + return EnumAltarTier.values()[i]; + + return EnumAltarTier.ONE; + } + + public static boolean checkAltarIsValid(World world, BlockPos worldPos, int altarTier) { + for (AltarComponent altarComponent : EnumAltarTier.values()[altarTier].getAltarComponents()) { + + BlockPos componentPos = worldPos.add(altarComponent.getOffset()); + BlockStack worldBlock = new BlockStack(world.getBlockState(componentPos).getBlock(), world.getBlockState(componentPos).getBlock().getMetaFromState(world.getBlockState(componentPos))); + + if (altarComponent.isBloodRune()) { + if (!checkRune(altarComponent, worldBlock)) + return false; + } else { + if (((altarComponent.getBlockStack().getBlock() != worldBlock.getBlock()) || (altarComponent.getBlockStack().getMeta() != worldBlock.getMeta())) && (altarComponent.getBlockStack().getBlock() == Blocks.air && !world.isAirBlock(componentPos))) + if (!checkSpecials(altarComponent, worldBlock)) + return false; + } + } + + return true; + } + +// public static AltarUpgrade getUpgrades(World world, BlockPos pos, int altarTier) { +// if(world.isRemote) +// return null; +// +// AltarUpgrade upgrades = new AltarUpgrade(); +// List list = EnumAltarTier.values()[altarTier].getAltarComponents(); +// +// for (AltarComponent altarComponent : list) { +// BlockPos componentPos = pos.add(altarComponent.getOffset()); +// +// if (altarComponent.isUpgradeSlot()) { +// BlockStack worldBlock = new BlockStack(world.getBlockState(componentPos).getBlock(), world.getBlockState(componentPos).getBlock().getMetaFromState(world.getBlockState(componentPos))); +// +// if (worldBlock.getBlock() instanceof BlockBloodRune) { +// if (worldBlock.getBlock() instanceof IFadedRune && altarTier > ((IFadedRune)worldBlock.getBlock()).getAltarTierLimit(worldBlock.getMeta())) +// return getUpgrades(world, pos, ((IFadedRune) worldBlock.getBlock()).getAltarTierLimit(worldBlock.getMeta())); +// +// switch (((BlockBloodRune) worldBlock.getBlock()).getRuneEffect(worldBlock.getMeta())) { +// case 1: +// upgrades.addSpeed(); +// break; +// +// case 2: +// upgrades.addEfficiencyUpgrade(); +// break; +// +// case 3: +// upgrades.addSacrificeUpgrade(); +// break; +// +// case 4: +// upgrades.addSelfSacrificeUpgrade(); +// break; +// +// case 5: +// upgrades.addaltarCapacitiveUpgrade(); +// break; +// +// case 6: +// upgrades.addDisplacementUpgrade(); +// break; +// +// case 7: +// upgrades.addorbCapacitiveUpgrade(); +// break; +// +// case 8: +// upgrades.addBetterCapacitiveUpgrade(); +// break; +// +// case 9: +// upgrades.addAccelerationUpgrade(); +// break; +// } +// } +// } +// } +// +// return upgrades; +// } + + private static boolean checkRune(AltarComponent altarComponent, BlockStack blockStack) { +// if (altarComponent.getBlockStack().getBlock() == ModBlocks.rune) +// if (blockStack.getBlock() instanceof BlockBloodRune || (blockStack.getBlock() instanceof IAltarComponent && (((IAltarComponent) blockStack.getBlock()).getType(blockStack.getMeta()) == EnumAltarComponent.BLOODRUNE))) +// return true; + + return false; + } + + private static boolean checkSpecials(AltarComponent altarComponent, BlockStack blockStack) { +// if (altarComponent.getBlockStack().getBlock() == ModBlocks.bloodStone) +// if (blockStack.getBlock() instanceof BlockBloodStone || (blockStack.getBlock() instanceof IAltarComponent && (((IAltarComponent) blockStack.getBlock()).getType(blockStack.getMeta()) == EnumAltarComponent.BLOODSTONE))) +// return true; + +// if (altarComponent.getBlockStack().getBlock() == ModBlocks.crystal) +// if (blockStack.getBlock() instanceof BlockCrystal || (blockStack.getBlock() instanceof IAltarComponent && (((IAltarComponent) blockStack.getBlock()).getType(blockStack.getMeta()) == EnumAltarComponent.CRYSTAL))) +// return true; + + if (altarComponent.getBlockStack().getBlock() == Blocks.glowstone) + if (blockStack.getBlock() instanceof BlockGlowstone || (blockStack.getBlock() instanceof IAltarComponent && (((IAltarComponent) blockStack.getBlock()).getType(blockStack.getMeta()) == EnumAltarComponent.GLOWSTONE))) + return true; + + if (altarComponent.getBlockStack().getBlock() == Blocks.beacon) + if (blockStack.getBlock() instanceof BlockBeacon || (blockStack.getBlock() instanceof IAltarComponent && (((IAltarComponent) blockStack.getBlock()).getType(blockStack.getMeta()) == EnumAltarComponent.BEACON))) + return true; + + return false; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/AlchemicalWizardryAPI.java b/src/main/java/WayofTime/alchemicalWizardry/api/AlchemicalWizardryAPI.java new file mode 100644 index 00000000..755de60c --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/AlchemicalWizardryAPI.java @@ -0,0 +1,26 @@ +package WayofTime.alchemicalWizardry.api; + +import WayofTime.alchemicalWizardry.api.util.helper.LogHelper; +import lombok.Getter; +import lombok.Setter; +import net.minecraft.item.Item; +import net.minecraft.util.DamageSource; +import net.minecraftforge.fluids.Fluid; + +public class AlchemicalWizardryAPI { + + @Getter @Setter + private static boolean loggingEnabled; + + @Getter + private static LogHelper logger = new LogHelper("AlchemicalWizardry|API"); + + @Getter + private static DamageSource damageSource = new DamageSourceBloodMagic(); + + @Getter @Setter + private static Item orbItem; + + @Getter @Setter + private static Fluid lifeEssence; +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/BlockStack.java b/src/main/java/WayofTime/alchemicalWizardry/api/BlockStack.java new file mode 100644 index 00000000..e1acd817 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/BlockStack.java @@ -0,0 +1,28 @@ +package WayofTime.alchemicalWizardry.api; + +import lombok.EqualsAndHashCode; +import lombok.Getter; +import net.minecraft.block.Block; +import net.minecraftforge.fml.common.registry.GameData; + +@Getter +@EqualsAndHashCode +public class BlockStack { + + private final Block block; + private final int meta; + + public BlockStack(Block block, int meta) { + this.block = block; + this.meta = meta; + } + + public BlockStack(Block block) { + this(block, 0); + } + + @Override + public String toString() { + return GameData.getBlockRegistry().getNameForObject(block) + ":" + meta; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/ColourAndCoords.java b/src/main/java/WayofTime/alchemicalWizardry/api/ColourAndCoords.java deleted file mode 100644 index d34dd413..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/ColourAndCoords.java +++ /dev/null @@ -1,45 +0,0 @@ -package WayofTime.alchemicalWizardry.api; - -import net.minecraft.nbt.NBTTagCompound; - -public class ColourAndCoords -{ - public int colourRed; - public int colourGreen; - public int colourBlue; - public int colourIntensity; - - public int xCoord; - public int yCoord; - public int zCoord; - - public ColourAndCoords(int red, int green, int blue, int intensity, int x, int y, int z) - { - this.colourRed = red; - this.colourGreen = green; - this.colourBlue = blue; - this.colourIntensity = intensity; - - this.xCoord = x; - this.yCoord = y; - this.zCoord = z; - } - - public static ColourAndCoords readFromNBT(NBTTagCompound tag) - { - return new ColourAndCoords(tag.getInteger("colourRed"), tag.getInteger("colourGreen"), tag.getInteger("colourBlue"), tag.getInteger("colourIntensity"), tag.getInteger("xCoord"), tag.getInteger("yCoord"), tag.getInteger("zCoord")); - } - - public NBTTagCompound writeToNBT(NBTTagCompound tag) - { - tag.setInteger("colourRed", colourRed); - tag.setInteger("colourGreen", colourGreen); - tag.setInteger("colourBlue", colourBlue); - tag.setInteger("colourIntensity", colourIntensity); - tag.setInteger("xCoord", xCoord); - tag.setInteger("yCoord", yCoord); - tag.setInteger("zCoord", zCoord); - - return tag; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/DamageSourceBloodMagic.java b/src/main/java/WayofTime/alchemicalWizardry/api/DamageSourceBloodMagic.java new file mode 100644 index 00000000..a755b33e --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/DamageSourceBloodMagic.java @@ -0,0 +1,12 @@ +package WayofTime.alchemicalWizardry.api; + +import net.minecraft.util.DamageSource; + +public class DamageSourceBloodMagic extends DamageSource { + + public DamageSourceBloodMagic() { + super("bloodMagic"); + + setDamageBypassesArmor(); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/ILimitingLogic.java b/src/main/java/WayofTime/alchemicalWizardry/api/ILimitingLogic.java deleted file mode 100644 index 2d7a4912..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/ILimitingLogic.java +++ /dev/null @@ -1,6 +0,0 @@ -package WayofTime.alchemicalWizardry.api; - -public interface ILimitingLogic -{ - int getRoutingLimit(); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/Int3.java b/src/main/java/WayofTime/alchemicalWizardry/api/Int3.java deleted file mode 100644 index 7c8fa226..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/Int3.java +++ /dev/null @@ -1,49 +0,0 @@ -package WayofTime.alchemicalWizardry.api; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; - -public class Int3 -{ - public int xCoord; - public int yCoord; - public int zCoord; - - public Int3(BlockPos pos) - { - this(pos.getX(), pos.getY(), pos.getZ()); - } - - public Int3(int xCoord, int yCoord, int zCoord) - { - this.xCoord = xCoord; - this.yCoord = yCoord; - this.zCoord = zCoord; - } - - public static Int3 readFromNBT(NBTTagCompound tag) - { - return new Int3(tag.getInteger("xCoord"), tag.getInteger("yCoord"), tag.getInteger("zCoord")); - } - - public NBTTagCompound writeToNBT(NBTTagCompound tag) - { - tag.setInteger("xCoord", xCoord); - tag.setInteger("yCoord", yCoord); - tag.setInteger("zCoord", zCoord); - - return tag; - } - - @Override - public boolean equals(Object o) - { - return o instanceof Int3 ? ((Int3) o).xCoord == this.xCoord && ((Int3) o).yCoord == this.yCoord && ((Int3) o).zCoord == this.zCoord : false; - } - - @Override - public int hashCode() - { - return this.xCoord + this.yCoord << 8 + this.zCoord << 16; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/NBTHolder.java b/src/main/java/WayofTime/alchemicalWizardry/api/NBTHolder.java new file mode 100644 index 00000000..f95d6efc --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/NBTHolder.java @@ -0,0 +1,24 @@ +package WayofTime.alchemicalWizardry.api; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class NBTHolder { + + public static final String NBT_OWNER = "ownerName"; + public static final String NBT_USES = "uses"; + public static final String NBT_SACRIFICE = "sacrifice"; + public static final String NBT_DIMID = "dimensionId"; + public static final String NBT_COORDX = "xCoord"; + public static final String NBT_COORDY = "yCoord"; + public static final String NBT_COORDZ = "zCoord"; + public static final String NBT_MAXORB = "maxOrb"; + public static final String NBT_CURRENTESSENCE = "currentEssence"; + + public static ItemStack checkNBT(ItemStack stack) { + if (stack.getTagCompound() == null) + stack.setTagCompound(new NBTTagCompound()); + + return stack; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusLogic.java b/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusLogic.java deleted file mode 100644 index a3f0a3e1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusLogic.java +++ /dev/null @@ -1,16 +0,0 @@ -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) : false); - } - - public boolean doesItemMatch(boolean previous, ItemStack keyStack, ItemStack checkedStack) - { - return previous || this.getDefaultMatch(keyStack, checkedStack); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusParadigm.java deleted file mode 100644 index d77a2e1a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusParadigm.java +++ /dev/null @@ -1,64 +0,0 @@ -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(); - - public int maximumAmount = 0; - - public void addRoutingFocusPosAndFacing(RoutingFocusPosAndFacing facing) - { - locationList.add(facing); - } - - public void addLogic(RoutingFocusLogic logic) - { - if(logic instanceof ILimitingLogic) - { - maximumAmount += ((ILimitingLogic)logic).getRoutingLimit(); - } - logicList.add(logic); - } - - public boolean doesItemMatch(ItemStack keyStack, ItemStack checkedStack) - { - boolean isGood = false; - boolean isFirst = true; - for(RoutingFocusLogic logic : logicList) - { - if(isFirst) - { - isGood = logic.getDefaultMatch(keyStack, checkedStack); - isFirst = false; - continue; - } - isGood = logic.doesItemMatch(isGood, keyStack, checkedStack); - } - - return isGood; - } - - public void clear() - { - logicList.clear(); - locationList.clear(); - maximumAmount = 0; - } - - public void setMaximumAmount(int amt) - { - this.maximumAmount = amt; - } - - public int getMaximumAmount() - { - return this.maximumAmount; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusPosAndFacing.java b/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusPosAndFacing.java deleted file mode 100644 index a49ffee1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusPosAndFacing.java +++ /dev/null @@ -1,21 +0,0 @@ -package WayofTime.alchemicalWizardry.api; - -import net.minecraft.util.EnumFacing; - -public class RoutingFocusPosAndFacing -{ - public Int3 location; - public EnumFacing facing; - - public RoutingFocusPosAndFacing(Int3 location, EnumFacing facing) - { - this.location = location; - this.facing = facing; - } - - @Override - public boolean equals(Object obj) - { - return obj instanceof RoutingFocusPosAndFacing ? facing.equals(((RoutingFocusPosAndFacing)obj).facing) && location.equals(((RoutingFocusPosAndFacing)obj).location) : false; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/Vector3.java b/src/main/java/WayofTime/alchemicalWizardry/api/Vector3.java deleted file mode 100644 index 645d97e6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/Vector3.java +++ /dev/null @@ -1,45 +0,0 @@ -package WayofTime.alchemicalWizardry.api; - -/* - * 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) - { - this.x = x; - this.y = y; - this.z = z; - } - - public Vector3 add(Vector3 vec1) - { - return new Vector3(this.x + vec1.x, this.y + vec1.y, this.z + vec1.z); - } - - @Override - public String toString() - { - return "V3(" + x + "}, " + y + "}," + z + "})"; - } - - private boolean canEqual(Object object) - { - return object instanceof 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; - } - - @Override - public int hashCode() - { - return 48131 * x - 95021 * y + z; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemicalPotionCreationHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemicalPotionCreationHandler.java deleted file mode 100644 index a6ca090d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemicalPotionCreationHandler.java +++ /dev/null @@ -1,79 +0,0 @@ -package WayofTime.alchemicalWizardry.api.alchemy; - -import net.minecraft.item.ItemStack; - -import java.util.ArrayList; - -public class AlchemicalPotionCreationHandler -{ - public static ArrayList registeredPotionEffects = new ArrayList(); - - public static void addPotion(ItemStack itemStack, int potionID, int tickDuration) - { - registeredPotionEffects.add(new AlchemyPotionHandlerComponent(itemStack, potionID, tickDuration)); - } - - public static int getPotionIDForStack(ItemStack itemStack) - { - for (AlchemyPotionHandlerComponent aphc : registeredPotionEffects) - { - if (aphc.compareItemStack(itemStack)) - { - return aphc.getPotionID(); - } - } - - return -1; - } - - public static int getPotionTickDurationForStack(ItemStack itemStack) - { - { - for (AlchemyPotionHandlerComponent aphc : registeredPotionEffects) - { - if (aphc.compareItemStack(itemStack)) - { - return aphc.getTickDuration(); - } - } - - return -1; - } - } - - public static boolean containsRegisteredPotionIngredient(ItemStack[] stackList) - { - for (ItemStack is : stackList) - { - for (AlchemyPotionHandlerComponent aphc : registeredPotionEffects) - { - if (aphc.compareItemStack(is)) - { - return true; - } - } - } - - return false; - } - - public static int getRegisteredPotionIngredientPosition(ItemStack[] stackList) - { - int i = 0; - - for (ItemStack is : stackList) - { - for (AlchemyPotionHandlerComponent aphc : registeredPotionEffects) - { - if (aphc.compareItemStack(is)) - { - return i; - } - } - - i++; - } - - return -1; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyPotionHandlerComponent.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyPotionHandlerComponent.java deleted file mode 100644 index 6f0d461d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyPotionHandlerComponent.java +++ /dev/null @@ -1,52 +0,0 @@ -package WayofTime.alchemicalWizardry.api.alchemy; - -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -public class AlchemyPotionHandlerComponent -{ - private ItemStack itemStack; - private int potionID; - private int tickDuration; - - public AlchemyPotionHandlerComponent(ItemStack itemStack, int potionID, int tickDuration) - { - this.itemStack = itemStack; - this.potionID = potionID; - this.tickDuration = tickDuration; - } - - public boolean compareItemStack(ItemStack comparedStack) - { - if (comparedStack != null && itemStack != null) - { - if (comparedStack.getItem() instanceof ItemBlock) - { - if (itemStack.getItem() instanceof ItemBlock) - { - return comparedStack.getItem().equals(itemStack.getItem()) && comparedStack.getItemDamage() == itemStack.getItemDamage(); - } - } else if (!(itemStack.getItem() instanceof ItemBlock)) - { - return comparedStack.getItem().equals(itemStack.getItem()) && comparedStack.getItemDamage() == itemStack.getItemDamage(); - } - } - - return false; - } - - public ItemStack getItemStack() - { - return itemStack; - } - - public int getPotionID() - { - return this.potionID; - } - - public int getTickDuration() - { - return this.tickDuration; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyPotionHelper.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyPotionHelper.java deleted file mode 100644 index d3462552..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyPotionHelper.java +++ /dev/null @@ -1,76 +0,0 @@ -package WayofTime.alchemicalWizardry.api.alchemy; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; - -public class AlchemyPotionHelper -{ - private int potionID; - private int tickDuration; - private int concentration; - private int durationFactor; - - public AlchemyPotionHelper(int potionID, int tickDuration, int concentration, int durationFactor) - { - this.potionID = potionID; - this.tickDuration = tickDuration; - this.concentration = concentration; - this.durationFactor = durationFactor; - } - - public void setConcentration(int concentration) - { - this.concentration = concentration; - } - - public void setDurationFactor(int durationFactor) - { - this.durationFactor = durationFactor; - } - - public int getPotionID() - { - return this.potionID; - } - - public int getTickDuration() - { - return this.tickDuration; - } - - public int getConcentration() - { - return this.concentration; - } - - public int getdurationFactor() - { - return this.durationFactor; - } - - public PotionEffect getPotionEffect() - { - if (potionID == Potion.heal.id || potionID == Potion.harm.id) - { - return (new PotionEffect(potionID, 1, concentration)); - } - - return (new PotionEffect(potionID, (int) (tickDuration * Math.pow(0.5f, concentration) * Math.pow(8.0f / 3.0f, durationFactor)), concentration)); - } - - public static AlchemyPotionHelper readEffectFromNBT(NBTTagCompound tagCompound) - { - return new AlchemyPotionHelper(tagCompound.getInteger("potionID"), tagCompound.getInteger("tickDuration"), tagCompound.getInteger("concentration"), tagCompound.getInteger("durationFactor")); - } - - public static NBTTagCompound setEffectToNBT(AlchemyPotionHelper aph) - { - NBTTagCompound tagCompound = new NBTTagCompound(); - tagCompound.setInteger("potionID", aph.getPotionID()); - tagCompound.setInteger("tickDuration", aph.getTickDuration()); - tagCompound.setInteger("concentration", aph.getConcentration()); - tagCompound.setInteger("durationFactor", aph.getdurationFactor()); - return tagCompound; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipe.java deleted file mode 100644 index 17465b72..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipe.java +++ /dev/null @@ -1,143 +0,0 @@ -package WayofTime.alchemicalWizardry.api.alchemy; - -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -public class AlchemyRecipe -{ - private ItemStack output; - private ItemStack[] recipe; - private int bloodOrbLevel; - private int amountNeeded; - - public AlchemyRecipe(ItemStack output, int amountNeeded, ItemStack[] recipe, int bloodOrbLevel) - { - this.output = output; - this.recipe = recipe; - this.amountNeeded = amountNeeded; - this.bloodOrbLevel = bloodOrbLevel; - } - - public boolean doesRecipeMatch(ItemStack[] items, int slottedBloodOrbLevel) - { - if (slottedBloodOrbLevel < bloodOrbLevel) - { - return false; - } - - ItemStack[] recipe; - - if (items.length < 5) - { - return false; - } - - if (this.recipe.length != 5) - { - ItemStack[] newRecipe = new ItemStack[5]; - - for (int i = 0; i < 5; i++) - { - if (i + 1 > this.recipe.length) - { - newRecipe[i] = null; - } else - { - newRecipe[i] = this.recipe[i]; - } - } - - recipe = newRecipe; - } else - { - recipe = this.recipe; - } - - boolean[] checkList = new boolean[5]; - - for (int i = 0; i < 5; i++) - { - checkList[i] = false; - } - - for (int i = 0; i < 5; i++) - { - ItemStack recipeItemStack = recipe[i]; - - if (recipeItemStack == null) - { - continue; - } - - boolean test = false; - - for (int j = 0; j < 5; j++) - { - if (checkList[j]) - { - continue; - } - - ItemStack checkedItemStack = items[j]; - - if (checkedItemStack == null) - { - continue; - } - - boolean quickTest = false; - - if (recipeItemStack.getItem() instanceof ItemBlock) - { - if (checkedItemStack.getItem() instanceof ItemBlock) - { - quickTest = true; - } - } else if (!(checkedItemStack.getItem() instanceof ItemBlock)) - { - quickTest = true; - } - - if (!quickTest) - { - continue; - } - - if ((checkedItemStack.getItemDamage() == recipeItemStack.getItemDamage() || OreDictionary.WILDCARD_VALUE == recipeItemStack.getItemDamage()) && checkedItemStack.getItem() == recipeItemStack.getItem()) - { - test = true; - checkList[j] = true; - break; - } - } - - if (!test) - { - return false; - } - } - - return true; - } - - public ItemStack getResult() - { - return output.copy(); - } - - public int getAmountNeeded() - { - return this.amountNeeded; - } - - public ItemStack[] getRecipe() - { - return this.recipe; - } - - public int getOrbLevel() - { - return this.bloodOrbLevel; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipeRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipeRegistry.java deleted file mode 100644 index 99ad2868..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipeRegistry.java +++ /dev/null @@ -1,85 +0,0 @@ -package WayofTime.alchemicalWizardry.api.alchemy; - -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import net.minecraft.item.ItemStack; - -import java.util.ArrayList; -import java.util.List; - -public class AlchemyRecipeRegistry -{ - public static List recipes = new ArrayList(); - - public static void registerRecipe(ItemStack output, int amountNeeded, ItemStack[] recipe, int bloodOrbLevel) - { - recipes.add(new AlchemyRecipe(output, amountNeeded, recipe, bloodOrbLevel)); - } - - public static ItemStack getResult(ItemStack[] recipe, ItemStack bloodOrb) - { - if (bloodOrb == null) - { - return null; - } - - if (!(bloodOrb.getItem() instanceof IBloodOrb)) - { - return null; - } - - int bloodOrbLevel = ((IBloodOrb) bloodOrb.getItem()).getOrbLevel(); - - for (AlchemyRecipe ar : recipes) - { - if (ar.doesRecipeMatch(recipe, bloodOrbLevel)) - { - return (ar.getResult()); - } - } - - return null; - } - - public static int getAmountNeeded(ItemStack[] recipe, ItemStack bloodOrb) - { - if (bloodOrb == null) - { - return 0; - } - - if (!(bloodOrb.getItem() instanceof IBloodOrb)) - { - return 0; - } - - int bloodOrbLevel = ((IBloodOrb) bloodOrb.getItem()).getOrbLevel(); - - for (AlchemyRecipe ar : recipes) - { - if (ar.doesRecipeMatch(recipe, bloodOrbLevel)) - { - return (ar.getAmountNeeded()); - } - } - - return 0; - } - - public static ItemStack[] getRecipeForItemStack(ItemStack itemStack) - { - for (AlchemyRecipe ar : recipes) - { - ItemStack result = ar.getResult(); - - if (result != null) - { - if (result.isItemEqual(itemStack)) - { - return ar.getRecipe(); - } - } - } - - return null; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IAlchemyGoggles.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IAlchemyGoggles.java deleted file mode 100644 index 3d6ca980..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IAlchemyGoggles.java +++ /dev/null @@ -1,10 +0,0 @@ -package WayofTime.alchemicalWizardry.api.alchemy.energy; - -import net.minecraft.entity.player.EntityPlayer; -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 deleted file mode 100644 index e4d4d9dc..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentContainer.java +++ /dev/null @@ -1,16 +0,0 @@ -package WayofTime.alchemicalWizardry.api.alchemy.energy; - -public interface IReagentContainer -{ - ReagentStack getReagent(); - - int getReagentStackAmount(); - - int getCapacity(); - - int fill(ReagentStack resource, boolean doFill); - - ReagentStack drain(int maxDrain, boolean doDrain); - - ReagentContainerInfo getInfo(); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentHandler.java deleted file mode 100644 index cf1a3fdf..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentHandler.java +++ /dev/null @@ -1,18 +0,0 @@ -package WayofTime.alchemicalWizardry.api.alchemy.energy; - -import net.minecraft.util.EnumFacing; - -public interface IReagentHandler -{ - int fill(EnumFacing from, ReagentStack resource, boolean doFill); - - ReagentStack drain(EnumFacing from, ReagentStack resource, boolean doDrain); - - ReagentStack drain(EnumFacing from, int maxDrain, boolean doDrain); - - boolean canFill(EnumFacing from, Reagent reagent); - - boolean canDrain(EnumFacing from, Reagent reagent); - - ReagentContainerInfo[] getContainerInfo(EnumFacing from); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ISegmentedReagentHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ISegmentedReagentHandler.java deleted file mode 100644 index 52be7b9f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ISegmentedReagentHandler.java +++ /dev/null @@ -1,14 +0,0 @@ -package WayofTime.alchemicalWizardry.api.alchemy.energy; - -import java.util.Map; - -public interface ISegmentedReagentHandler extends IReagentHandler -{ - int getNumberOfTanks(); - - int getTanksTunedToReagent(Reagent reagent); - - void setTanksTunedToReagent(Reagent reagent, int total); - - Map getAttunedTankMap(); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/Reagent.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/Reagent.java deleted file mode 100644 index 4cc88bcb..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/Reagent.java +++ /dev/null @@ -1,52 +0,0 @@ -package WayofTime.alchemicalWizardry.api.alchemy.energy; - -public class Reagent -{ - public final String name; - - public static final int REAGENT_SIZE = 1000; - - private int colourRed = 0; - private int colourGreen = 0; - private int colourBlue = 0; - private int colourIntensity = 255; - - public Reagent(String name) - { - this.name = name; - } - - public void setColour(int red, int green, int blue, int intensity) - { - this.colourRed = red; - this.colourGreen = green; - this.colourBlue = blue; - this.colourIntensity = intensity; - } - - public int getColourRed() - { - return colourRed; - } - - public int getColourGreen() - { - return colourGreen; - } - - public int getColourBlue() - { - return colourBlue; - } - - public int getColourIntensity() - { - return colourIntensity; - } - - @Override - public boolean equals(Object o) - { - return o instanceof Reagent && this == o && name.equals(((Reagent) o).name); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentContainer.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentContainer.java deleted file mode 100644 index c1352746..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentContainer.java +++ /dev/null @@ -1,153 +0,0 @@ -package WayofTime.alchemicalWizardry.api.alchemy.energy; - -import net.minecraft.nbt.NBTTagCompound; - -public class ReagentContainer implements IReagentContainer -{ - protected ReagentStack reagentStack; - protected int capacity; - - public ReagentContainer(int capacity) - { - this(null, capacity); - } - - public ReagentContainer(ReagentStack stack, int capacity) - { - this.reagentStack = stack; - this.capacity = capacity; - } - - public ReagentContainer(Reagent reagent, int amount, int capacity) - { - this(new ReagentStack(reagent, amount), capacity); - } - - public static ReagentContainer readFromNBT(NBTTagCompound nbt) - { - ReagentStack reagent = ReagentStack.loadReagentStackFromNBT(nbt); - int capacity = nbt.getInteger("capacity"); - - if (reagent != null) - { - return new ReagentContainer(reagent, capacity); - } else - { - return new ReagentContainer(null, capacity); - } - } - - public NBTTagCompound writeToNBT(NBTTagCompound nbt) - { - if (reagentStack != null) - { - reagentStack.writeToNBT(nbt); - } - - nbt.setInteger("capacity", capacity); - - return nbt; - } - - @Override - public ReagentStack getReagent() - { - return reagentStack; - } - - @Override - public int getReagentStackAmount() - { - if (reagentStack == null) - { - return 0; - } - return reagentStack.amount; - } - - @Override - public int getCapacity() - { - return capacity; - } - - @Override - public int fill(ReagentStack resource, boolean doFill) - { - if (resource == null) - { - return 0; - } - - if (!doFill) - { - if (reagentStack == null) - { - return Math.min(capacity, resource.amount); - } - - if (!reagentStack.isReagentEqual(resource)) - { - return 0; - } - - return Math.min(capacity - reagentStack.amount, resource.amount); - } - - if (reagentStack == null) - { - reagentStack = new ReagentStack(resource, Math.min(capacity, resource.amount)); - - return reagentStack.amount; - } - - if (!reagentStack.isReagentEqual(resource)) - { - return 0; - } - int filled = capacity - reagentStack.amount; - - if (resource.amount < filled) - { - reagentStack.amount += resource.amount; - filled = resource.amount; - } else - { - reagentStack.amount = capacity; - } - - return filled; - } - - @Override - public ReagentStack drain(int maxDrain, boolean doDrain) - { - if (reagentStack == null) - { - return null; - } - - int drained = maxDrain; - if (reagentStack.amount < drained) - { - drained = reagentStack.amount; - } - - ReagentStack stack = new ReagentStack(reagentStack, drained); - if (doDrain) - { - reagentStack.amount -= drained; - if (reagentStack.amount <= 0) - { - reagentStack = null; - } - } - return stack; - } - - @Override - public ReagentContainerInfo getInfo() - { - return new ReagentContainerInfo(this); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentContainerInfo.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentContainerInfo.java deleted file mode 100644 index 99521dce..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentContainerInfo.java +++ /dev/null @@ -1,19 +0,0 @@ -package WayofTime.alchemicalWizardry.api.alchemy.energy; - -public final class ReagentContainerInfo -{ - public final ReagentStack reagent; - public final int capacity; - - public ReagentContainerInfo(ReagentStack reagent, int capacity) - { - this.reagent = reagent; - this.capacity = capacity; - } - - public ReagentContainerInfo(IReagentContainer tank) - { - this.reagent = tank.getReagent(); - this.capacity = tank.getCapacity(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentRegistry.java deleted file mode 100644 index 429587a1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentRegistry.java +++ /dev/null @@ -1,174 +0,0 @@ -package WayofTime.alchemicalWizardry.api.alchemy.energy; - -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(); - - public static Reagent sanctusReagent; - public static Reagent incendiumReagent; - public static Reagent aquasalusReagent; - public static Reagent magicalesReagent; - public static Reagent aetherReagent; - public static Reagent crepitousReagent; - public static Reagent crystallosReagent; - public static Reagent terraeReagent; - public static Reagent tenebraeReagent; - - public static Reagent offensaReagent; - public static Reagent praesidiumReagent; - public static Reagent orbisTerraeReagent; - public static Reagent virtusReagent; - public static Reagent reductusReagent; - public static Reagent potentiaReagent; - - public static void initReagents() - { - sanctusReagent = new Reagent("sanctus"); - incendiumReagent = new Reagent("incendium"); - aquasalusReagent = new Reagent("aquasalus"); - magicalesReagent = new Reagent("magicales"); - aetherReagent = new Reagent("aether"); - crepitousReagent = new Reagent("crepitous"); - crystallosReagent = new Reagent("crystallos"); - terraeReagent = new Reagent("terrae"); - tenebraeReagent = new Reagent("tenebrae"); - offensaReagent = new Reagent("offensa"); - praesidiumReagent = new Reagent("praesidium"); - orbisTerraeReagent = new Reagent("orbisTerrae"); - virtusReagent = new Reagent("virtus"); - reductusReagent = new Reagent("reductus"); - potentiaReagent = new Reagent("potentia"); - - sanctusReagent.setColour(255, 255, 0, 255); - incendiumReagent.setColour(255, 0, 0, 255); - aquasalusReagent.setColour(0, 0, 255, 255); - magicalesReagent.setColour(150, 0, 146, 255); - aetherReagent.setColour(105, 223, 86, 255); - crepitousReagent.setColour(145, 145, 145, 255); - crystallosReagent.setColour(135, 255, 231, 255); - terraeReagent.setColour(147, 48, 13, 255); - tenebraeReagent.setColour(86, 86, 86, 255); - offensaReagent.setColour(126, 0, 0, 255); - praesidiumReagent.setColour(135, 135, 135, 255); - orbisTerraeReagent.setColour(32, 94, 14, 255); - virtusReagent.setColour(180, 0, 0, 255); - reductusReagent.setColour(20, 93, 2, 255); - potentiaReagent.setColour(64, 81, 208, 255); - - registerReagent("sanctus", sanctusReagent); - registerReagent("incendium", incendiumReagent); - registerReagent("aquasalus", aquasalusReagent); - registerReagent("magicales", magicalesReagent); - registerReagent("aether", aetherReagent); - registerReagent("crepitous", crepitousReagent); - registerReagent("crystallos", crystallosReagent); - registerReagent("terrae", terraeReagent); - registerReagent("tenebrae", tenebraeReagent); - registerReagent("offensa", offensaReagent); - registerReagent("praesidium", praesidiumReagent); - registerReagent("orbisTerrae", orbisTerraeReagent); - registerReagent("virtus", virtusReagent); - registerReagent("reductus", reductusReagent); - registerReagent("potentia", potentiaReagent); - } - - public static boolean registerReagent(String key, Reagent reagent) - { - if (reagentList.containsKey(key) || reagent == null) - { - return false; - } - - reagentList.put(key, reagent); - - return true; - } - - public static Reagent getReagentForKey(String key) - { - if (reagentList.containsKey(key)) - { - return reagentList.get(key); - } - - return null; - } - - public static String getKeyForReagent(Reagent reagent) - { - if (reagentList.containsValue(reagent)) - { - Set> set = reagentList.entrySet(); - for (Entry entry : set) - { - if (entry.getValue().equals(reagent)) - { - return entry.getKey(); - } - } - } - - return ""; - } - - public static void registerItemAndReagent(ItemStack stack, ReagentStack reagentStack) - { - itemToReagentMap.put(stack, reagentStack); - } - - public static ReagentStack getReagentStackForItem(ItemStack stack) - { - if (stack == null) - { - return null; - } - - for (Entry entry : itemToReagentMap.entrySet()) - { - if (entry.getKey() != null && entry.getKey().isItemEqual(stack)) - { - if (entry.getValue() == null) - { - return null; - } else - { - return entry.getValue().copy(); - } - } - } - - return null; - } - - public static ItemStack getItemForReagent(Reagent reagent) - { - if (reagent == null) - { - return null; - } - - for (Entry entry : itemToReagentMap.entrySet()) - { - if (entry.getValue() != null && entry.getValue().reagent == reagent) - { - if (entry.getKey() == null) - { - return null; - } else - { - return entry.getKey().copy(); - } - } - } - - return null; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentStack.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentStack.java deleted file mode 100644 index 8923f3d3..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentStack.java +++ /dev/null @@ -1,62 +0,0 @@ -package WayofTime.alchemicalWizardry.api.alchemy.energy; - -import net.minecraft.nbt.NBTTagCompound; - -public class ReagentStack -{ - public Reagent reagent; - public int amount; - - public ReagentStack(Reagent reagent, int amount) - { - this.reagent = reagent; - this.amount = amount; - } - - public ReagentStack(ReagentStack reagentStack, int amount) - { - this(reagentStack.reagent, amount); - } - - public static ReagentStack loadReagentStackFromNBT(NBTTagCompound tag) - { - Reagent reagent = ReagentRegistry.getReagentForKey(tag.getString("Reagent")); - - if (reagent == null) - { - return null; - } - - int amount = tag.getInteger("amount"); - - return new ReagentStack(reagent, amount); - } - - public NBTTagCompound writeToNBT(NBTTagCompound tag) - { - tag.setString("Reagent", ReagentRegistry.getKeyForReagent(this.reagent)); - tag.setInteger("amount", this.amount); - - return tag; - } - - public ReagentStack splitStack(int amount) - { - ReagentStack copyStack = this.copy(); - int splitAmount = Math.min(amount, this.amount); - copyStack.amount = splitAmount; - this.amount -= splitAmount; - - return copyStack; - } - - public ReagentStack copy() - { - return new ReagentStack(this.reagent, this.amount); - } - - public boolean isReagentEqual(ReagentStack other) - { - return other != null && this.reagent == other.reagent; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileReagentHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileReagentHandler.java deleted file mode 100644 index 5a841651..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileReagentHandler.java +++ /dev/null @@ -1,66 +0,0 @@ - -package WayofTime.alchemicalWizardry.api.alchemy.energy; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; - -public class TileReagentHandler extends TileEntity implements IReagentHandler -{ - protected ReagentContainer tank = new ReagentContainer(4000); - - @Override - public void readFromNBT(NBTTagCompound tag) - { - super.readFromNBT(tag); - tank.readFromNBT(tag); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - super.writeToNBT(tag); - tank.writeToNBT(tag); - } - - /* IReagentHandler */ - @Override - public int fill(EnumFacing from, ReagentStack resource, boolean doFill) - { - return tank.fill(resource, doFill); - } - - @Override - public ReagentStack drain(EnumFacing from, ReagentStack resource, boolean doDrain) - { - if (resource == null || !resource.isReagentEqual(tank.getReagent())) - { - return null; - } - return tank.drain(resource.amount, doDrain); - } - - @Override - public ReagentStack drain(EnumFacing from, int maxDrain, boolean doDrain) - { - return tank.drain(maxDrain, doDrain); - } - - @Override - public boolean canFill(EnumFacing from, Reagent reagent) - { - return true; - } - - @Override - public boolean canDrain(EnumFacing from, Reagent reagent) - { - return true; - } - - @Override - public ReagentContainerInfo[] getContainerInfo(EnumFacing from) - { - return new ReagentContainerInfo[]{tank.getInfo()}; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java deleted file mode 100644 index f965ab7a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java +++ /dev/null @@ -1,283 +0,0 @@ - -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; -import net.minecraft.util.EnumFacing; -import net.minecraftforge.common.util.Constants; - -public class TileSegmentedReagentHandler extends TileEntity implements ISegmentedReagentHandler -{ - protected ReagentContainer[] tanks; - protected Map attunedTankMap; - - public TileSegmentedReagentHandler() - { - this(1); - } - - public TileSegmentedReagentHandler(int numberOfTanks) - { - this(numberOfTanks, 1000); - } - - public TileSegmentedReagentHandler(int numberOfTanks, int tankSize) - { - super(); - - this.attunedTankMap = new HashMap(); - this.tanks = new ReagentContainer[numberOfTanks]; - for (int i = 0; i < numberOfTanks; i++) - { - this.tanks[i] = new ReagentContainer(tankSize); - } - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - super.readFromNBT(tag); - - NBTTagList tagList = tag.getTagList("reagentTanks", Constants.NBT.TAG_COMPOUND); - - int size = tagList.tagCount(); - this.tanks = new ReagentContainer[size]; - - for (int i = 0; i < size; i++) - { - NBTTagCompound savedTag = tagList.getCompoundTagAt(i); - this.tanks[i] = ReagentContainer.readFromNBT(savedTag); - } - - NBTTagList attunedTagList = tag.getTagList("attunedTankMap", Constants.NBT.TAG_COMPOUND); - - for (int i = 0; i < attunedTagList.tagCount(); i++) - { - NBTTagCompound savedTag = attunedTagList.getCompoundTagAt(i); - Reagent reagent = ReagentRegistry.getReagentForKey(savedTag.getString("reagent")); - this.attunedTankMap.put(reagent, savedTag.getInteger("amount")); - } - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - super.writeToNBT(tag); - - NBTTagList tagList = new NBTTagList(); - - for (int i = 0; i < this.tanks.length; i++) - { - NBTTagCompound savedTag = new NBTTagCompound(); - if (this.tanks[i] != null) - { - this.tanks[i].writeToNBT(savedTag); - } - tagList.appendTag(savedTag); - } - - tag.setTag("reagentTanks", tagList); - - NBTTagList attunedTagList = new NBTTagList(); - - for (Entry entry : this.attunedTankMap.entrySet()) - { - NBTTagCompound savedTag = new NBTTagCompound(); - savedTag.setString("reagent", ReagentRegistry.getKeyForReagent(entry.getKey())); - savedTag.setInteger("amount", entry.getValue()); - attunedTagList.appendTag(savedTag); - } - - tag.setTag("attunedTankMap", attunedTagList); - } - - /* ISegmentedReagentHandler */ - @Override - public int fill(EnumFacing from, ReagentStack resource, boolean doFill) - { - int totalFill = 0; - - boolean useTankLimit = !this.attunedTankMap.isEmpty(); - - if (resource != null) - { - int totalTanksFillable = useTankLimit ? this.getTanksTunedToReagent(resource.reagent) : this.tanks.length; - int tanksFilled = 0; - - int maxFill = resource.amount; - - for (int i = this.tanks.length - 1; i >= 0; i--) - { - ReagentStack remainingStack = resource.copy(); - remainingStack.amount = maxFill - totalFill; - - boolean doesReagentMatch = tanks[i].getReagent() != null && tanks[i].getReagent().isReagentEqual(remainingStack); - - if (doesReagentMatch) - { - totalFill += tanks[i].fill(remainingStack, doFill); - tanksFilled++; - } else - { - continue; - } - - if (totalFill >= maxFill || tanksFilled >= totalTanksFillable) - { - return totalFill; - } - } - - if (tanksFilled >= totalTanksFillable) - { - return totalFill; - } - - for (int i = this.tanks.length - 1; i >= 0; i--) - { - ReagentStack remainingStack = resource.copy(); - remainingStack.amount = maxFill - totalFill; - - boolean isTankEmpty = tanks[i].getReagent() == null; - - if (isTankEmpty) - { - totalFill += tanks[i].fill(remainingStack, doFill); - tanksFilled++; - } else - { - continue; - } - - if (totalFill >= maxFill || tanksFilled >= totalTanksFillable) - { - return totalFill; - } - } - } - return totalFill; - } - - @Override - public ReagentStack drain(EnumFacing from, ReagentStack resource, boolean doDrain) - { - if (resource == null) - { - return null; - } - - int maxDrain = resource.amount; - Reagent reagent = resource.reagent; - int drained = 0; - - for (int i = 0; i < tanks.length; i++) - { - if (drained >= maxDrain) - { - break; - } - - if (resource.isReagentEqual(tanks[i].getReagent())) - { - ReagentStack drainStack = tanks[i].drain(maxDrain - drained, doDrain); - if (drainStack != null) - { - drained += drainStack.amount; - } - } - } - - return new ReagentStack(reagent, drained); - } - - /* Only returns the amount from the first available tank */ - @Override - public ReagentStack drain(EnumFacing from, int maxDrain, boolean doDrain) - { - for (int i = 0; i < tanks.length; i++) - { - ReagentStack stack = tanks[i].drain(maxDrain, doDrain); - if (stack != null) - { - return stack; - } - } - - return null; - } - - @Override - public boolean canFill(EnumFacing from, Reagent reagent) - { - return true; - } - - @Override - public boolean canDrain(EnumFacing from, Reagent reagent) - { - return true; - } - - @Override - public ReagentContainerInfo[] getContainerInfo(EnumFacing from) - { - ReagentContainerInfo[] info = new ReagentContainerInfo[this.getNumberOfTanks()]; - for (int i = 0; i < this.getNumberOfTanks(); i++) - { - info[i] = tanks[i].getInfo(); - } - return info; - } - - @Override - public int getNumberOfTanks() - { - return tanks.length; - } - - @Override - public int getTanksTunedToReagent(Reagent reagent) - { - if (this.attunedTankMap.containsKey(reagent) && this.attunedTankMap.get(reagent) != null) - { - return this.attunedTankMap.get(reagent); - } - return 0; - } - - @Override - public void setTanksTunedToReagent(Reagent reagent, int total) - { - if (total == 0 && this.attunedTankMap.containsKey(reagent)) - { - this.attunedTankMap.remove(reagent); - return; - } - - this.attunedTankMap.put(reagent, total); - } - - @Override - public Map getAttunedTankMap() - { - return this.attunedTankMap; - } - - public boolean areTanksEmpty() - { - for (int i = 0; i < this.tanks.length; i++) - { - if (tanks[i] != null && tanks[i].reagentStack != null) - { - return false; - } - } - - return true; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/altar/AltarComponent.java b/src/main/java/WayofTime/alchemicalWizardry/api/altar/AltarComponent.java new file mode 100644 index 00000000..97018dee --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/altar/AltarComponent.java @@ -0,0 +1,64 @@ +package WayofTime.alchemicalWizardry.api.altar; + +import WayofTime.alchemicalWizardry.api.BlockStack; +import lombok.Getter; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.util.BlockPos; + +/** + * Used for building the altar structure. + */ +@Getter +public class AltarComponent { + + private BlockPos offset; + private BlockStack blockStack; + private boolean bloodRune; + private boolean upgradeSlot; + + /** + * @param offset - The position in the world relative to the MasterRitualStone + * @param blockStack - The block and meta combination expected + */ + public AltarComponent(BlockPos offset, BlockStack blockStack) { + this.offset = offset; + this.blockStack = blockStack; + } + + /** + * Non-meta based variant for ease of use. + */ + public AltarComponent(BlockPos offset, Block block) { + this(offset, new BlockStack(block)); + } + + /** + * Use for setting a location at which there must be a block, but the type + * of block does not matter. + */ + public AltarComponent(BlockPos offset) { + this(offset, new BlockStack(Blocks.air)); + } + + /** + * Sets the location to a Blood Rune. This does not mean that the location + * can be used as an upgrade. + * + * @return the current instance for further use. + */ + public AltarComponent setBloodRune() { + this.bloodRune = true; + return this; + } + + /** + * Sets the location to an upgrade slot. + * + * @return the current instance for further use. + */ + public AltarComponent setUpgradeSlot() { + this.upgradeSlot = true; + return this; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/altar/AltarRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/altar/AltarRecipe.java new file mode 100644 index 00000000..95daf828 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/altar/AltarRecipe.java @@ -0,0 +1,44 @@ +package WayofTime.alchemicalWizardry.api.altar; + +import lombok.Getter; +import net.minecraft.item.ItemStack; + +import javax.annotation.Nullable; + +@Getter +public class AltarRecipe { + + public final int minTier, syphon, consumeRate, drainRate; + public final boolean useTag; + public final ItemStack input, output; + + /** + * Allows creation of a recipe for the {@link WayofTime.alchemicalWizardry.block.BlockAltar} / {@link WayofTime.alchemicalWizardry.tile.TileAltar}. + * The output ItemStack is allowed to be null as some recipes do not contain an output. (Blood Orbs) + * + * @param input - The input ItemStack + * @param output - The ItemStack obtained from the recipe + * @param minTier - The minimum tier of Altar required + * @param syphon - The amount of LP to syphon from the Altar + * @param consumeRate - The rate at which LP is consumed during crafting + * @param drainRate - The rate at which LP is drained during crafting + * @param useTag - + */ + public AltarRecipe(ItemStack input, @Nullable ItemStack output, int minTier, int syphon, int consumeRate, int drainRate, boolean useTag) { + this.input = input; + this.output = output; + this.minTier = minTier; + this.syphon = syphon; + this.consumeRate = consumeRate; + this.drainRate = drainRate; + this.useTag = useTag; + } + + public AltarRecipe(ItemStack input, ItemStack output, int minTier, int syphon, int consumeRate, int drainRate) { + this(input, output, minTier, syphon, consumeRate, drainRate, false); + } + + public AltarRecipe (ItemStack input, int minTier, int consumeRate, int drainRate) { + this(input, null, minTier, 0, consumeRate, drainRate); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/altar/AltarUpgrade.java b/src/main/java/WayofTime/alchemicalWizardry/api/altar/AltarUpgrade.java new file mode 100644 index 00000000..f85a6eca --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/altar/AltarUpgrade.java @@ -0,0 +1,20 @@ +package WayofTime.alchemicalWizardry.api.altar; + +import lombok.Getter; + +@Getter +public class AltarUpgrade { + + private int speedCount; + + public AltarUpgrade() { + + } + + // Adders + + public AltarUpgrade addSpeed() { + speedCount++; + return this; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipe.java deleted file mode 100644 index bb581251..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipe.java +++ /dev/null @@ -1,136 +0,0 @@ -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 - public int consumptionRate; - public int drainRate; - public ItemStack requiredItem; - public ItemStack result; - public boolean useTag; - public ArrayList input = new ArrayList(); - - 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) - { - this.result = result; - this.requiredItem = requiredItem; - this.minTier = minTier; - this.liquidRequired = liquidRequired; - this.consumptionRate = consumptionRate; - this.drainRate = drainRate; - this.canBeFilled = canBeFilled; - this.useTag = useTag; - } - - public ItemStack getResult() - { - return this.result; - } - - public ItemStack getRequiredItem() - { - return this.requiredItem; - } - - public boolean doesRequiredItemMatch(ItemStack comparedStack, int tierCheck) - { - if (comparedStack == null || this.requiredItem == null) - { - return false; - } - - return tierCheck >= minTier && this.requiredItem.isItemEqual(comparedStack) && (this.useTag ? this.areRequiredTagsEqual(comparedStack) : true); - } - - public boolean areRequiredTagsEqual(ItemStack comparedStack) - { - if(requiredItem.hasTagCompound()) - { - NBTTagCompound tag = requiredItem.getTagCompound(); - if(!comparedStack.hasTagCompound()) - { - return false; - } - - NBTTagCompound comparedTag = comparedStack.getTagCompound(); - - return this.areTagsEqual(tag, comparedTag); - } - - return true; - } - - protected boolean areTagsEqual(NBTTagCompound tag, NBTTagCompound comparedTag) - { - Set set = tag.getKeySet(); - - for(Object obj : set) - { - if(obj instanceof String) - { - String str = (String)obj; - - NBTBase baseTag = comparedTag.getTag(str); - - if(baseTag instanceof NBTTagCompound) - { - NBTBase comparedBaseTag = comparedTag.getTag(str); - if(comparedBaseTag instanceof NBTTagCompound) - { - if(!this.areTagsEqual(tag, comparedTag)) - { - return false; - } - } - }else - { - if(baseTag != null && !baseTag.equals(comparedTag.getTag(str))) - { - return false; - } - } - } - } - - return true; - } - - public int getMinTier() - { - return this.minTier; - } - - public int getLiquidRequired() - { - return this.liquidRequired; - } - - public int getConsumptionRate() - { - return this.consumptionRate; - } - - public int getDrainRate() - { - return this.drainRate; - } - - public boolean getCanBeFilled() - { - return this.canBeFilled; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipeRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipeRegistry.java deleted file mode 100644 index 566fbfe9..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipeRegistry.java +++ /dev/null @@ -1,77 +0,0 @@ -package WayofTime.alchemicalWizardry.api.altarRecipeRegistry; - -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 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) - { - if(!orbMap.containsKey(minTier)) - { - orbMap.put(minTier, orbStack); - } - registerAltarRecipe(null, orbStack, minTier, 0, consumptionRate, 0, true); - } - - public static boolean isRequiredItemValid(ItemStack testItem, int currentTierAltar) - { - if(testItem == null) - { - return false; - } - - for (AltarRecipe recipe : altarRecipes) - { - if (recipe.doesRequiredItemMatch(testItem, currentTierAltar)) - { - return true; - } - } - - return false; - } - - public static ItemStack getItemForItemAndTier(ItemStack testItem, int currentTierAltar) - { - for (AltarRecipe recipe : altarRecipes) - { - if (recipe.doesRequiredItemMatch(testItem, currentTierAltar)) - { - return ItemStack.copyItemStack(recipe.getResult()); - } - } - - return null; - } - - public static AltarRecipe getAltarRecipeForItemAndTier(ItemStack testItem, int currentTierAltar) - { - for (AltarRecipe recipe : altarRecipes) - { - if (recipe.doesRequiredItemMatch(testItem, currentTierAltar)) - { - return recipe; - } - } - - return null; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/IFadedRune.java b/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/IFadedRune.java deleted file mode 100644 index 39d71675..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/IFadedRune.java +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index 8d2da96d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRecipe.java +++ /dev/null @@ -1,30 +0,0 @@ -package WayofTime.alchemicalWizardry.api.bindingRegistry; - -import net.minecraft.item.ItemStack; - -public class BindingRecipe -{ - public ItemStack requiredItem; - public ItemStack outputItem; - - public BindingRecipe(ItemStack outputItem, ItemStack requiredItem) - { - this.requiredItem = requiredItem; - this.outputItem = outputItem; - } - - public boolean doesRequiredItemMatch(ItemStack testStack) - { - return !(testStack == null || this.requiredItem == null) && this.requiredItem.isItemEqual(testStack); - } - - public ItemStack getResult(ItemStack inputItem) - { - return this.getResult(); - } - - public ItemStack getResult() - { - return this.outputItem; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRegistry.java deleted file mode 100644 index 407f74ff..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRegistry.java +++ /dev/null @@ -1,67 +0,0 @@ -package WayofTime.alchemicalWizardry.api.bindingRegistry; - -import net.minecraft.item.ItemStack; - -import java.util.LinkedList; -import java.util.List; - -public class BindingRegistry -{ - public static List bindingRecipes = new LinkedList(); - - public static void registerRecipe(ItemStack output, ItemStack input) - { - bindingRecipes.add(new BindingRecipe(output, input)); - } - - public static boolean isRequiredItemValid(ItemStack testItem) - { - for (BindingRecipe recipe : bindingRecipes) - { - if (recipe.doesRequiredItemMatch(testItem)) - { - return true; - } - } - - return false; - } - - public static ItemStack getItemForItemAndTier(ItemStack testItem) - { - for (BindingRecipe recipe : bindingRecipes) - { - if (recipe.doesRequiredItemMatch(testItem)) - { - return recipe.getResult(testItem).copy(); - } - } - - return null; - } - - public static int getIndexForItem(ItemStack testItem) - { - int i = 0; - for (BindingRecipe recipe : bindingRecipes) - { - if (recipe.doesRequiredItemMatch(testItem)) - { - return i; - } - i++; - } - - return -1; - } - - public static ItemStack getOutputForIndex(int index) - { - if (bindingRecipes.size() <= index) - { - return null; - } - - return bindingRecipes.get(index).getResult(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRecipe.java deleted file mode 100644 index c2ce032a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRecipe.java +++ /dev/null @@ -1,30 +0,0 @@ -package WayofTime.alchemicalWizardry.api.bindingRegistry; - -import net.minecraft.item.ItemStack; - -public class UnbindingRecipe -{ - public ItemStack requiredItem; - public ItemStack outputItem; - - public UnbindingRecipe(ItemStack outputItem, ItemStack requiredItem) - { - this.requiredItem = requiredItem; - this.outputItem = outputItem; - } - - public boolean doesRequiredItemMatch(ItemStack testStack) - { - return !(testStack == null || this.requiredItem == null) && this.requiredItem.isItemEqual(testStack); - } - - public ItemStack getResult(ItemStack inputItem) - { - return this.getResult(); - } - - public ItemStack getResult() - { - return this.outputItem; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRegistry.java deleted file mode 100644 index d031edd3..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRegistry.java +++ /dev/null @@ -1,62 +0,0 @@ -package WayofTime.alchemicalWizardry.api.bindingRegistry; - -import net.minecraft.item.ItemStack; - -import java.util.LinkedList; -import java.util.List; - -public class UnbindingRegistry -{ - public static List unbindingRecipes = new LinkedList(); - - public static void addAllUnbindingRecipesFromBinding() - { - for (BindingRecipe bindingRecipe : BindingRegistry.bindingRecipes) - { - unbindingRecipes.add(new UnbindingRecipe(bindingRecipe.requiredItem, bindingRecipe.outputItem)); - } - } - - public static void registerRecipe(ItemStack output, ItemStack input) - { - unbindingRecipes.add(new UnbindingRecipe(output, input)); - } - - public static boolean isRequiredItemValid(ItemStack testItem) - { - for (UnbindingRecipe recipe : unbindingRecipes) - { - if (recipe.doesRequiredItemMatch(testItem)) - { - return true; - } - } - - return false; - } - - public static int getIndexForItem(ItemStack testItem) - { - int i = 0; - for (UnbindingRecipe recipe : unbindingRecipes) - { - if (recipe.doesRequiredItemMatch(testItem)) - { - return i; - } - i++; - } - - return -1; - } - - public static ItemStack getOutputForIndex(int index) - { - if (unbindingRecipes.size() <= index) - { - return null; - } - - return unbindingRecipes.get(index).getResult(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionHandler.java deleted file mode 100644 index a05c7003..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionHandler.java +++ /dev/null @@ -1,14 +0,0 @@ -package WayofTime.alchemicalWizardry.api.compress; - -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 - */ - 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 deleted file mode 100644 index 342b9b7d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionRegistry.java +++ /dev/null @@ -1,67 +0,0 @@ -package WayofTime.alchemicalWizardry.api.compress; - -import java.util.ArrayList; -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; - -/** - * A registry aimed to help compress items in an inventory into its compressible form. - * - */ -public class CompressionRegistry -{ - public static List compressionRegistry = new ArrayList(); - public static Map thresholdMap = new HashMap(); - - public static void registerHandler(CompressionHandler handler) - { - compressionRegistry.add(handler); - } - - /** - * Registers an item so that it only compresses while above this threshold - * @param stack - * @param threshold - */ - public static void registerItemThreshold(ItemStack stack, int threshold) - { - thresholdMap.put(stack, threshold); - } - - public static ItemStack compressInventory(ItemStack[] inv, World world) - { - for(CompressionHandler handler : compressionRegistry) - { - ItemStack stack = handler.compressInventory(inv, world); - if(stack != null) - { - return stack; - } - } - - return null; - } - - public static int getItemThreshold(ItemStack stack) - { - for(Entry entry : thresholdMap.entrySet()) - { - if(areItemStacksEqual(entry.getKey(), stack)) - { - return entry.getValue(); - } - } - - return 0; - } - - public static boolean areItemStacksEqual(ItemStack stack, ItemStack compressedStack) - { - return stack.isItemEqual(compressedStack) && (stack.getTagCompound() == null ? compressedStack.getTagCompound() == null : stack.getTagCompound().equals(compressedStack.getTagCompound())); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/enumeration/EnumAltarComponent.java b/src/main/java/WayofTime/alchemicalWizardry/api/enumeration/EnumAltarComponent.java new file mode 100644 index 00000000..d0569e10 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/enumeration/EnumAltarComponent.java @@ -0,0 +1,10 @@ +package WayofTime.alchemicalWizardry.api.enumeration; + +public enum EnumAltarComponent { + + GLOWSTONE, + BLOODSTONE, + BEACON, + BLOODRUNE, + CRYSTAL +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/enumeration/EnumAltarTier.java b/src/main/java/WayofTime/alchemicalWizardry/api/enumeration/EnumAltarTier.java new file mode 100644 index 00000000..f6d9bdf0 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/enumeration/EnumAltarTier.java @@ -0,0 +1,136 @@ +package WayofTime.alchemicalWizardry.api.enumeration; + +import WayofTime.alchemicalWizardry.api.BlockStack; +import WayofTime.alchemicalWizardry.api.altar.AltarComponent; +import WayofTime.alchemicalWizardry.registry.ModBlocks; +import lombok.Getter; +import net.minecraft.init.Blocks; +import net.minecraft.util.BlockPos; + +import java.util.ArrayList; + +@Getter +public enum EnumAltarTier { + ONE(), + TWO() { + @Override + public void buildComponents() { + altarComponents.add(new AltarComponent(new BlockPos(-1, -1, -1), ModBlocks.rune).setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(0, -1, -1), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(1, -1, -1), ModBlocks.rune).setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(-1, -1, 0), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(1, -1, 0), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(-1, -1, 1), ModBlocks.rune).setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(0, -1, 1), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(1, -1, 1), ModBlocks.rune).setBloodRune()); + } + }, + THREE() { + @Override + public void buildComponents() { + altarComponents.addAll(TWO.getAltarComponents()); + altarComponents.add(new AltarComponent(new BlockPos(-1, -1, -1), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(0, -1, -1), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(1, -1, -1), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(-1, -1, 0), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(1, -1, 0), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(-1, -1, 1), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(0, -1, 1), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(1, -1, 1), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(-3, -1, -3))); + altarComponents.add(new AltarComponent(new BlockPos(-3, 0, -3))); + altarComponents.add(new AltarComponent(new BlockPos(3, -1, -3))); + altarComponents.add(new AltarComponent(new BlockPos(3, 0, -3))); + altarComponents.add(new AltarComponent(new BlockPos(-3, -1, 3))); + altarComponents.add(new AltarComponent(new BlockPos(-3, 0, 3))); + altarComponents.add(new AltarComponent(new BlockPos(3, -1, 3))); + altarComponents.add(new AltarComponent(new BlockPos(3, 0, 3))); + altarComponents.add(new AltarComponent(new BlockPos(-3, 1, -3), Blocks.glowstone)); + altarComponents.add(new AltarComponent(new BlockPos(3, 1, -3), Blocks.glowstone)); + altarComponents.add(new AltarComponent(new BlockPos(-3, 1, 3), Blocks.glowstone)); + altarComponents.add(new AltarComponent(new BlockPos(3, 1, 3), Blocks.glowstone)); + + for (int i = -2; i <= 2; i++) { + altarComponents.add(new AltarComponent(new BlockPos(3, -2, i), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(-3, -2, i), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(i, -2, 3), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(i, -2, -3), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + } + } + }, + FOUR() { + @Override + public void buildComponents() { + altarComponents.addAll(THREE.getAltarComponents()); + + for (int i = -3; i <= 3; i++) { + altarComponents.add(new AltarComponent(new BlockPos(5, -3, i), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(-5, -3, i), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(i, -3, 5), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(i, -3, -5), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + } + + for (int i = -2; i <= 1; i++) { + altarComponents.add(new AltarComponent(new BlockPos(5, i, 5))); + altarComponents.add(new AltarComponent(new BlockPos(5, i, -5))); + altarComponents.add(new AltarComponent(new BlockPos(-5, i, -5))); + altarComponents.add(new AltarComponent(new BlockPos(-5, i, 5))); + } + + altarComponents.add(new AltarComponent(new BlockPos(5, 2, 5), new BlockStack(ModBlocks.bloodStone, 1))); + altarComponents.add(new AltarComponent(new BlockPos(5, 2, -5), new BlockStack(ModBlocks.bloodStone, 1))); + altarComponents.add(new AltarComponent(new BlockPos(-5, 2, -5), new BlockStack(ModBlocks.bloodStone, 1))); + altarComponents.add(new AltarComponent(new BlockPos(-5, 2, 5), new BlockStack(ModBlocks.bloodStone, 1))); + } + }, + FIVE() { + @Override + public void buildComponents() { + altarComponents.addAll(FOUR.getAltarComponents()); + altarComponents.add(new AltarComponent(new BlockPos(-8, -3, 8), Blocks.beacon)); + altarComponents.add(new AltarComponent(new BlockPos(-8, -3, -8), Blocks.beacon)); + altarComponents.add(new AltarComponent(new BlockPos(8, -3, -8), Blocks.beacon)); + altarComponents.add(new AltarComponent(new BlockPos(8, -3, 8), Blocks.beacon)); + + for (int i = -6; i <= 6; i++) { + altarComponents.add(new AltarComponent(new BlockPos(8, -4, i), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(-8, -4, i), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(i, -4, 8), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(i, -4, -8), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + } + } + }, + SIX() { + @Override + public void buildComponents() { + altarComponents.addAll(FIVE.getAltarComponents()); + + for(int i = -4; i <= 2; i++) { + altarComponents.add(new AltarComponent(new BlockPos(11, i, 11))); + altarComponents.add(new AltarComponent(new BlockPos(-11, i, -11))); + altarComponents.add(new AltarComponent(new BlockPos(11, i, -11))); + altarComponents.add(new AltarComponent(new BlockPos(-11, i, 11))); + } + + altarComponents.add(new AltarComponent(new BlockPos(11, 3, 11), ModBlocks.crystal)); + altarComponents.add(new AltarComponent(new BlockPos(-11, 3, -11), ModBlocks.crystal)); + altarComponents.add(new AltarComponent(new BlockPos(11, 3, -11), ModBlocks.crystal)); + altarComponents.add(new AltarComponent(new BlockPos(-11, 3, 11), ModBlocks.crystal)); + + for (int i = -9; i <= 9; i++) { + altarComponents.add(new AltarComponent(new BlockPos(11, -5, i), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(-11, -5, i), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(i, -5, 11), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + altarComponents.add(new AltarComponent(new BlockPos(i, -5, -11), ModBlocks.rune).setUpgradeSlot().setBloodRune()); + } + } + }; + + public static final int MAXTIERS = values().length; + + ArrayList altarComponents = new ArrayList(); + + public void buildComponents() { + + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/enumeration/EnumStoneType.java b/src/main/java/WayofTime/alchemicalWizardry/api/enumeration/EnumStoneType.java new file mode 100644 index 00000000..5aa4bf2e --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/enumeration/EnumStoneType.java @@ -0,0 +1,33 @@ +package WayofTime.alchemicalWizardry.api.enumeration; + +import net.minecraft.util.IStringSerializable; + +import java.util.Locale; + +public enum EnumStoneType implements IStringSerializable { + + BLANK, + WATER, + FIRE, + EARTH, + AIR, + DUSK, + DAWN; + + @Override + public String toString() { + return name().toLowerCase(Locale.ENGLISH); + } + + @Override + public String getName() { + return this.toString(); + } + + public static EnumStoneType byMetadata(int meta) { + if (meta < 0 || meta >= values().length) + meta = 0; + + return values()[meta]; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java index 448f4712..da9158aa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java @@ -1,38 +1,24 @@ package WayofTime.alchemicalWizardry.api.event; -import net.minecraftforge.fml.common.eventhandler.Cancelable; import net.minecraftforge.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. - * - * @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(); - this.ownerNetwork = ownerNetwork; - this.addedAmount = addedAmount; - this.maximum = maximum; - } - - public String getOwnerNetwork() - { - return this.ownerNetwork; - } - - public int getAddedAmount() - { - return this.addedAmount; - } +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. + * + * @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) { + this.ownerNetwork = ownerNetwork; + this.addedAmount = addedAmount; + this.maximum = maximum; + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemBindEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemBindEvent.java index 5d78bcd0..b8a056f6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemBindEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemBindEvent.java @@ -6,17 +6,16 @@ import net.minecraftforge.fml.common.eventhandler.Cancelable; import net.minecraftforge.fml.common.eventhandler.Event; @Cancelable -public class ItemBindEvent extends Event -{ - public final EntityPlayer player; - public String key; - public ItemStack itemStack; - - public ItemBindEvent(EntityPlayer player, String key, ItemStack itemStack) - { - super(); - this.player = player; - this.key = key; - this.itemStack = itemStack; - } +public class ItemBindEvent extends Event { + + public final EntityPlayer player; + public String key; + public ItemStack itemStack; + + public ItemBindEvent(EntityPlayer player, String key, ItemStack itemStack) { + super(); + this.player = player; + this.key = key; + this.itemStack = itemStack; + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainInContainerEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainInContainerEvent.java deleted file mode 100644 index 0cd29c51..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainInContainerEvent.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.alchemicalWizardry.api.event; - -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.eventhandler.Cancelable; - -@Cancelable -public class ItemDrainInContainerEvent extends SoulNetworkEvent -{ - public ItemStack stack; - public ItemDrainInContainerEvent(ItemStack stack, String ownerNetwork, int drainAmount) - { - super(ownerNetwork, drainAmount); - this.stack = stack; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainNetworkEvent.java deleted file mode 100644 index aa9c32d2..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainNetworkEvent.java +++ /dev/null @@ -1,29 +0,0 @@ -package WayofTime.alchemicalWizardry.api.event; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.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 - - /** - * 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 - */ - public ItemDrainNetworkEvent(EntityPlayer player, String ownerNetwork, ItemStack itemStack, int drainAmount) - { - super(player, ownerNetwork, drainAmount); - this.itemStack = itemStack; - this.shouldDamage = false; - this.damageAmount = (float)(drainAmount) / 100.0f; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerAddToNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerAddToNetworkEvent.java deleted file mode 100644 index c4a3820c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerAddToNetworkEvent.java +++ /dev/null @@ -1,18 +0,0 @@ -package WayofTime.alchemicalWizardry.api.event; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.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) - { - 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 deleted file mode 100644 index d70c3267..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerDrainNetworkEvent.java +++ /dev/null @@ -1,20 +0,0 @@ -package WayofTime.alchemicalWizardry.api.event; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.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) - { - super(ownerNetwork, drainAmount); - this.player = player; - } - - public EntityPlayer getPlayer() - { - return player; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualActivatedEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualActivatedEvent.java deleted file mode 100644 index 5bcc7eeb..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualActivatedEvent.java +++ /dev/null @@ -1,23 +0,0 @@ -package WayofTime.alchemicalWizardry.api.event; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.eventhandler.Cancelable; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; - -@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) - { - super(mrs, ownerKey, ritualKey); - - this.player = player; - this.crystalStack = activationCrystal; - this.crystalTier = crystalTier; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualEvent.java deleted file mode 100644 index 36ee929c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualEvent.java +++ /dev/null @@ -1,18 +0,0 @@ -package WayofTime.alchemicalWizardry.api.event; - -import net.minecraftforge.fml.common.eventhandler.Event; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; - -public class RitualEvent extends Event -{ - public final IMasterRitualStone mrs; - public String ownerKey; - public final String ritualKey; - - public RitualEvent(IMasterRitualStone mrs, String ownerKey, String ritualKey) - { - this.mrs = mrs; - this.ownerKey = ownerKey; - this.ritualKey = ritualKey; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualRunEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualRunEvent.java deleted file mode 100644 index 4b5134b7..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualRunEvent.java +++ /dev/null @@ -1,13 +0,0 @@ -package WayofTime.alchemicalWizardry.api.event; - -import net.minecraftforge.fml.common.eventhandler.Cancelable; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; - -@Cancelable -public class RitualRunEvent extends RitualEvent -{ - public RitualRunEvent(IMasterRitualStone mrs, String ownerKey, String ritualKey) - { - super(mrs, ownerKey, ritualKey); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualStopEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualStopEvent.java deleted file mode 100644 index 4fc998f0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualStopEvent.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.alchemicalWizardry.api.event; - -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) - { - super(mrs, ownerKey, ritualKey); - - this.method = method; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/SacrificeKnifeUsedEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/SacrificeKnifeUsedEvent.java deleted file mode 100644 index 1849c6c9..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/SacrificeKnifeUsedEvent.java +++ /dev/null @@ -1,22 +0,0 @@ -package WayofTime.alchemicalWizardry.api.event; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.fml.common.eventhandler.Cancelable; -import net.minecraftforge.fml.common.eventhandler.Event; - -@Cancelable -public class SacrificeKnifeUsedEvent extends Event -{ - public final EntityPlayer player; - public boolean shouldDrainHealth; - public boolean shouldFillAltar; - public final int healthDrained; - - public SacrificeKnifeUsedEvent(EntityPlayer player, boolean shouldDrainHealth, boolean shouldFillAltar, int hp) - { - this.player = player; - this.shouldDrainHealth = shouldDrainHealth; - this.shouldFillAltar = shouldFillAltar; - this.healthDrained = hp; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/SoulNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/SoulNetworkEvent.java index 3d60650a..fb6af3c5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/SoulNetworkEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/SoulNetworkEvent.java @@ -1,27 +1,62 @@ package WayofTime.alchemicalWizardry.api.event; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.common.eventhandler.Cancelable; import net.minecraftforge.fml.common.eventhandler.Event; +public class SoulNetworkEvent extends Event { -public class SoulNetworkEvent extends Event -{ - public String ownerNetwork; - public int drainAmount; - - public SoulNetworkEvent(String ownerNetwork, int drainAmount) - { - super(); - this.ownerNetwork = ownerNetwork; - this.drainAmount = drainAmount; - } - - public String getOwnerNetwork() - { - return this.ownerNetwork; - } - - public int getDrainAmount() - { - return this.drainAmount; - } + public String ownerName; + public int syphon; + + public SoulNetworkEvent(String ownerName, int syphon) { + this.ownerName = ownerName; + this.syphon = syphon; + } + + @Cancelable + public static class ItemDrainInContainerEvent extends SoulNetworkEvent { + + public ItemStack stack; + + public ItemDrainInContainerEvent(ItemStack stack, String ownerName, int syphon) { + super(ownerName, syphon); + this.stack = stack; + } + } + + @Cancelable + public static class PlayerDrainNetworkEvent extends SoulNetworkEvent { + + public final EntityPlayer player; + + public PlayerDrainNetworkEvent(EntityPlayer player, String ownerNetwork, int drainAmount) { + super(ownerNetwork, drainAmount); + this.player = player; + } + } + + @Cancelable + public static 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 + + /** + * 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 + */ + public ItemDrainNetworkEvent(EntityPlayer player, String ownerNetwork, ItemStack itemStack, int drainAmount) { + super(player, ownerNetwork, drainAmount); + this.itemStack = itemStack; + this.shouldDamage = false; + this.damageAmount = (float)(drainAmount) / 100.0f; + } + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java deleted file mode 100644 index 4fc7310f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java +++ /dev/null @@ -1,50 +0,0 @@ -package WayofTime.alchemicalWizardry.api.event; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.common.eventhandler.Cancelable; -import net.minecraftforge.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 -{ - public final World initialWorld; - public final BlockPos initialPos; - - public final Block initialBlock; - public final IBlockState initialState; - - public final World finalWorld; - public final BlockPos finalPos; - - public final Block finalBlock; - public final IBlockState finalState; - - public TeleposeEvent(World wi, BlockPos posi, IBlockState statei, World wf, BlockPos posf, IBlockState statef) - { - initialWorld = wi; - initialPos = posi; - - initialState = statei; - initialBlock = initialState.getBlock(); - - finalWorld = wf; - finalPos = posf; - - finalState = statef; - finalBlock = finalState.getBlock(); - } - - public TileEntity getInitialTile() { - return initialWorld.getTileEntity(initialPos); - } - - public TileEntity getFinalTile() { - return finalWorld.getTileEntity(finalPos); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/guide/OrbRecipeRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/api/guide/OrbRecipeRenderer.java deleted file mode 100644 index 2de81c65..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/guide/OrbRecipeRenderer.java +++ /dev/null @@ -1,135 +0,0 @@ -//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; -//import amerifrance.guideapi.ModInformation; -//import amerifrance.guideapi.api.abstraction.CategoryAbstract; -//import amerifrance.guideapi.api.abstraction.EntryAbstract; -//import amerifrance.guideapi.api.abstraction.IRecipeRenderer; -//import amerifrance.guideapi.api.base.Book; -//import amerifrance.guideapi.api.util.GuiHelper; -//import amerifrance.guideapi.gui.GuiBase; -//import cpw.mods.fml.relauncher.ReflectionHelper; -// -//public class OrbRecipeRenderer implements IRecipeRenderer -//{ -// public IRecipe recipe; -// -// public OrbRecipeRenderer(IRecipe recipe) -// { -// this.recipe = recipe; -// } -// -// @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().bindTexture(new ResourceLocation(ModInformation.GUITEXLOC + "recipe_elements.png")); -// guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 0, 105, 65); -// -// guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.recipe.shapedOrb"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0); -// if(recipe instanceof ShapelessBloodOrbRecipe) -// { -// ShapelessBloodOrbRecipe shapelessBloodOrbRecipe = (ShapelessBloodOrbRecipe) recipe; -// List list = shapelessBloodOrbRecipe.getInput(); -// -// int width = 3; -// int height = 3; -// for (int y = 0; y < height; y++) { -// for (int x = 0; x < width; x++) { -// if(list.size() - 1 < y * width + x) -// { -// continue; -// } -// -// int stackX = (x + 1) * 18 + (guiLeft + guiBase.xSize / 7); -// int stackY = (y + 1) * 18 + (guiTop + guiBase.ySize / 5); -// -// Object component = list.get(y * width + x); -// if (component != null) { -// if (component instanceof ItemStack) { -// GuiHelper.drawItemStack((ItemStack) component, stackX, stackY); -// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { -// guiBase.renderToolTip((ItemStack) component, stackX, stackY); -// } -// } else if (component instanceof Integer) { -// 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); -// } -// } else { -// if (((ArrayList) component).isEmpty()) return; -// GuiHelper.drawItemStack(((ArrayList) component).get(0), stackX, stackY); -// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { -// guiBase.renderToolTip(((ArrayList) component).get(0), stackX, stackY); -// } -// } -// } -// } -// } -// int outputX = (5 * 18) + (guiLeft + guiBase.xSize / 7); -// int outputY = (2 * 18) + (guiTop + guiBase.xSize / 5); -// GuiHelper.drawItemStack(shapelessBloodOrbRecipe.getRecipeOutput(), outputX, outputY); -// if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) { -// guiBase.renderToolTip(shapelessBloodOrbRecipe.getRecipeOutput(), outputX, outputY); -// } -// }else -// { -// ShapedBloodOrbRecipe shapedBloodOrbRecipe = (ShapedBloodOrbRecipe) recipe; -// int width = ReflectionHelper.getPrivateValue(ShapedBloodOrbRecipe.class, shapedBloodOrbRecipe, 4); -// int height = ReflectionHelper.getPrivateValue(ShapedBloodOrbRecipe.class, shapedBloodOrbRecipe, 5); -// for (int y = 0; y < height; y++) { -// for (int x = 0; x < width; x++) { -// int stackX = (x + 1) * 18 + (guiLeft + guiBase.xSize / 7); -// int stackY = (y + 1) * 18 + (guiTop + guiBase.ySize / 5); -// Object component = shapedBloodOrbRecipe.getInput()[y * width + x]; -// if (component != null) { -// if (component instanceof ItemStack) { -// GuiHelper.drawItemStack((ItemStack) component, stackX, stackY); -// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { -// guiBase.renderToolTip((ItemStack) component, stackX, stackY); -// } -// } else if (component instanceof Integer) { -// 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); -// } -// } else { -// if (((ArrayList) component).isEmpty()) return; -// GuiHelper.drawItemStack(((ArrayList) component).get(0), stackX, stackY); -// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { -// guiBase.renderToolTip(((ArrayList) component).get(0), stackX, stackY); -// } -// } -// } -// } -// } -// int outputX = (5 * 18) + (guiLeft + guiBase.xSize / 7); -// int outputY = (2 * 18) + (guiTop + guiBase.xSize / 5); -// GuiHelper.drawItemStack(shapedBloodOrbRecipe.getRecipeOutput(), outputX, outputY); -// if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) { -// guiBase.renderToolTip(shapedBloodOrbRecipe.getRecipeOutput(), outputX, outputY); -// } -// } -// -// } -// -// @Override -// 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 deleted file mode 100644 index 7e61a8e5..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageAltarRecipe.java +++ /dev/null @@ -1,69 +0,0 @@ -//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; -//import amerifrance.guideapi.api.base.Book; -//import amerifrance.guideapi.api.base.PageBase; -//import amerifrance.guideapi.api.util.GuiHelper; -//import amerifrance.guideapi.gui.GuiBase; -//import cpw.mods.fml.relauncher.Side; -//import cpw.mods.fml.relauncher.SideOnly; -// -//public class PageAltarRecipe extends PageBase { -// -// public ItemStack input; -// public ItemStack output; -// public int tier; -// public int bloodRequired; -// -// public PageAltarRecipe(AltarRecipe recipe) { -// this.input = recipe.getRequiredItem(); -// this.output = recipe.getResult(); -// this.tier = recipe.getMinTier(); -// this.bloodRequired = recipe.getLiquidRequired(); -// } -// -// @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) { -// -// Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("alchemicalwizardry" + ":textures/gui/guide/altar.png")); -// guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 87, 146, 104); -// -// guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.recipe.altar"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0); -// -// int inputX = (1 + 1) * 20 + (guiLeft + guiBase.xSize / 7); -// int inputY = (20) + (guiTop + guiBase.ySize / 5); //1 * 20 -// GuiHelper.drawItemStack(input, inputX, inputY); -// if (GuiHelper.isMouseBetween(mouseX, mouseY, inputX, inputY, 15, 15)) { -// guiBase.renderToolTip(input, mouseX, mouseY); -// } -// -// if (output == null) { -// output = new ItemStack(Blocks.fire); -// } -// int outputX = (5 * 20) + (guiLeft + guiBase.xSize / 7); -// int outputY = (20) + (guiTop + guiBase.xSize / 5); // 1 * 20 -// GuiHelper.drawItemStack(output, outputX, outputY); -// if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) { -// guiBase.renderToolTip(output, outputX, outputY); -// } -// -// if (output.getItem() == Item.getItemFromBlock(Blocks.fire)) { -// guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.furnace.error"), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0xED073D); -// guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("bm.string.tier") + ": " + String.valueOf(tier), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0); -// guiBase.drawCenteredString(fontRenderer, "LP: " + String.valueOf(bloodRequired), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 30, 0); -// } -// guiBase.drawCenteredString(fontRenderer, String.format(StatCollector.translateToLocal("text.recipe.altar.tier"), String.valueOf(tier)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0); -// guiBase.drawCenteredString(fontRenderer, String.format(StatCollector.translateToLocal("text.recipe.altar.bloodRequired"), String.valueOf(bloodRequired)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0); -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageMultiBlock.java b/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageMultiBlock.java deleted file mode 100644 index 0a0678f6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageMultiBlock.java +++ /dev/null @@ -1,145 +0,0 @@ -//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; -//import amerifrance.guideapi.api.base.PageBase; -//import amerifrance.guideapi.gui.GuiBase; -//import cpw.mods.fml.relauncher.Side; -//import cpw.mods.fml.relauncher.SideOnly; -// -//public class PageMultiBlock extends PageBase -//{ -// ItemStack[][][] structure; -// boolean canTick = false; -// int tick = 0; -// int showLayer = -1; -// float scaleFactor = 1; -// -// boolean renderMouseOver = true; -// -// public PageMultiBlock(ItemStack[][][] structure) -// { -// this.structure = structure; -// initPage(structure); -// } -// -// int blockCount=0; -// int[] countPerLevel; -// int structureHeight = 0; -// int structureLength = 0; -// int structureWidth = 0; -// -// public void initPage(ItemStack[][][] structure) -// { -// structureHeight = structure.length; -// structureWidth=0; -// structureLength=0; -// countPerLevel = new int[structureHeight]; -// blockCount=0; -// for(int h=0; hstructureLength) -// structureLength = structure[h].length-1; -// int perLvl=0; -// for(int l=0; lstructureWidth) -// structureWidth = structure[h][l].length-1; -// for(ItemStack ss : structure[h][l]) -// if(ss!=null) -// perLvl++; -// } -// countPerLevel[h] = perLvl; -// 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)); -// } -// -// @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) -// Minecraft mc = Minecraft.getMinecraft(); -// -// int x = guiLeft + 32; -// int y = guiTop + 30; -// { -// if(canTick) -// tick++; -// -// int prevLayers = 0; -// if(showLayer!=-1) -// for(int ll=0; ll=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.fontRendererObj, mc.renderEngine, row[w], x+xx, y+yy); -// if(mouseX>=x+xx&&mouseX=y+yy&&mouseY ritualComponents) -// { -// int minX = 0; -// int minY = 0; -// int minZ = 0; -// -// int maxX = 0; -// int maxY = 0; -// int maxZ = 0; -// -// for(RitualComponent comp : ritualComponents) -// { -// minX = Math.min(comp.getX(), minX); -// minY = Math.min(comp.getY(), minY); -// minZ = Math.min(comp.getZ(), minZ); -// -// maxX = Math.max(comp.getX(), maxX); -// maxY = Math.max(comp.getY(), maxY); -// maxZ = Math.max(comp.getZ(), maxZ); -// } -// -// 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 -// -// for(RitualComponent comp : ritualComponents) -// { -// tempStructure[comp.getY() - minY][comp.getX() - minX][comp.getZ() - minZ] = getStackForRitualStone(comp.getStoneType()); -// } -// -// tempStructure[-minY][-minX][-minZ] = new ItemStack(ModBlocks.blockMasterStone); -// -// return new PageRitualMultiBlock(tempStructure); -// } -// -// private static ItemStack getStackForRitualStone(int type) -// { -// switch(type) -// { -// case RitualComponent.BLANK: -// return blankStone; -// case RitualComponent.WATER: -// return waterStone; -// case RitualComponent.FIRE: -// return fireStone; -// case RitualComponent.EARTH: -// return earthStone; -// case RitualComponent.AIR: -// return airStone; -// case RitualComponent.DUSK: -// return duskStone; -// case RitualComponent.DAWN: -// return dawnStone; -// } -// return blankStone; -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java deleted file mode 100644 index 2d5e884b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java +++ /dev/null @@ -1,35 +0,0 @@ -package WayofTime.alchemicalWizardry.api.harvest; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; - -public class HarvestRegistry -{ - public static List handlerList = new ArrayList(); - - public static void registerHarvestHandler(IHarvestHandler handler) - { - handlerList.add(handler); - } - - public static boolean harvestBlock(World world, BlockPos pos) - { - IBlockState state = world.getBlockState(pos); - Block block = state.getBlock(); - - for (IHarvestHandler handler : handlerList) - { - if (handler.harvestAndPlant(world, pos, block, state)) - { - return true; - } - } - - return false; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/harvest/IHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/harvest/IHarvestHandler.java deleted file mode 100644 index d7dc78a8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/harvest/IHarvestHandler.java +++ /dev/null @@ -1,18 +0,0 @@ -package WayofTime.alchemicalWizardry.api.harvest; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; - -public interface IHarvestHandler -{ - /** - * A handler that is used to harvest and replant the block at the specified location - * - * @param world - * @param block block at this given location - * @return true if successfully harvested, false if not - */ - boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/iface/IAltarComponent.java b/src/main/java/WayofTime/alchemicalWizardry/api/iface/IAltarComponent.java new file mode 100644 index 00000000..ebd14390 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/iface/IAltarComponent.java @@ -0,0 +1,8 @@ +package WayofTime.alchemicalWizardry.api.iface; + +import WayofTime.alchemicalWizardry.api.enumeration.EnumAltarComponent; + +public interface IAltarComponent { + + EnumAltarComponent getType(int meta); +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/iface/IBindable.java b/src/main/java/WayofTime/alchemicalWizardry/api/iface/IBindable.java new file mode 100644 index 00000000..97dfcac7 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/iface/IBindable.java @@ -0,0 +1,17 @@ +package WayofTime.alchemicalWizardry.api.iface; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + +/** + * Implement this interface on any Item that can be bound to a player. + */ +public interface IBindable { + + /** + * Called when the player attempts to bind the item. + * + * If false, binding fails. + */ + boolean onBind(EntityPlayer player, ItemStack stack); +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/iface/IBloodAltar.java b/src/main/java/WayofTime/alchemicalWizardry/api/iface/IBloodAltar.java new file mode 100644 index 00000000..f34fe9e7 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/iface/IBloodAltar.java @@ -0,0 +1,40 @@ +package WayofTime.alchemicalWizardry.api.iface; + +public interface IBloodAltar { + + int getCapacity(); + + int getCurrentBlood(); + + int getTier(); + + int getProgress(); + + float getSacrificeMultiplier(); + + float getSelfSacrificeMultiplier(); + + float getOrbMultiplier(); + + float getDislocationMultiplier(); + + int getBufferCapacity(); + + void sacrificialDaggerCall(int amount, boolean b); + + 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. + * + * @param cooldown - How long the cooldown should last + */ + void requestPauseAfterCrafting(int cooldown); + + void addToDemonBloodDuration(int dur); + + boolean hasDemonBlood(); + + void decrementDemonBlood(); +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/IAltarManipulator.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/IAltarManipulator.java deleted file mode 100644 index b84f95cc..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/IAltarManipulator.java +++ /dev/null @@ -1,6 +0,0 @@ -package WayofTime.alchemicalWizardry.api.items; - -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 deleted file mode 100644 index 40773cb5..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java +++ /dev/null @@ -1,803 +0,0 @@ -package WayofTime.alchemicalWizardry.api.items; - -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.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.BlockPos; -import net.minecraft.util.DamageSource; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.common.util.Constants; -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"; - private Random rand = new Random(); - - public ItemSpellMultiTool() - { - super(); - this.setMaxDamage(0); - this.setMaxStackSize(1); - this.setFull3D(); - } - - @Override - public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) - { - float damage = this.getCustomItemAttack(par1ItemStack); - - float f = (float)par3EntityLivingBase.getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue(); - - SpellParadigmTool parad = this.loadParadigmFromStack(par1ItemStack); - - if (parad != null) - { - parad.onLeftClickEntity(par1ItemStack, par2EntityLivingBase, par3EntityLivingBase); - } - - damage += parad.getAddedDamageForEntity(par2EntityLivingBase); - - if (rand.nextFloat() < this.getCritChance(par1ItemStack)) - { - damage *= 1.75f; - } - - damage *= f; - - if (par3EntityLivingBase instanceof EntityPlayer) - { - par2EntityLivingBase.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) par3EntityLivingBase), damage); - } else - { - par2EntityLivingBase.attackEntityFrom(DamageSource.causeMobDamage(par3EntityLivingBase), damage); - } - - return true; - } - - @Override - public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) - { - SpellParadigmTool parad = this.loadParadigmFromStack(stack); - - if (parad != null && entity instanceof EntityLivingBase) - { - parad.onLeftClickEntity(stack, (EntityLivingBase) entity, player); - } - - return false; - } - - @Override - public boolean onBlockStartBreak(ItemStack stack, BlockPos pos, EntityPlayer player) - { - if (player.worldObj.isRemote) - { - return false; - } - - if (!stack.hasTagCompound()) - return false; - - World world = player.worldObj; - IBlockState state = world.getBlockState(pos); - Block block = state.getBlock(); - if (block == null || block == Blocks.air) - return false; - int hlvl = -1; - float blockHardness = block.getBlockHardness(world, pos); - - MovingObjectPosition mop = APISpellHelper.raytraceFromEntity(world, player, true, 5.0D); - - IBlockState localState = world.getBlockState(pos); - Block localBlock = state.getBlock(); - String toolClass = block.getHarvestTool(state); - if (toolClass != null && this.getHarvestLevel(stack, toolClass) != -1) - hlvl = block.getHarvestLevel(state); - int toolLevel = this.getHarvestLevel(stack, toolClass); - - float localHardness = localBlock == null ? Float.MAX_VALUE : localBlock.getBlockHardness(world, pos); - - if (hlvl <= toolLevel && localHardness - 1.5 <= blockHardness) - { - boolean cancelHarvest = false; - - if (!cancelHarvest) - { - if (localBlock != null && !(localHardness < 0)) - { - boolean isEffective = false; - - String localToolClass = this.getToolClassForMaterial(localBlock.getMaterial()); - - if (localToolClass != null && this.getHarvestLevel(stack, toolClass) >= localBlock.getHarvestLevel(localState)) - { - isEffective = true; - } - - - if (localBlock.getMaterial().isToolNotRequired()) - { - isEffective = true; - } - - if (!player.capabilities.isCreativeMode) - { - if (isEffective) - { - if (localBlock.removedByPlayer(world, pos, player, true)) - { - localBlock.onBlockDestroyedByPlayer(world, pos, localState); - } - localBlock.onBlockHarvested(world, pos, localState, player); - if (blockHardness > 0f) - onBlockDestroyed(stack, world, localBlock, pos, player); - - List items = APISpellHelper.getItemsFromBlock(world, pos, localBlock, localState, this.getSilkTouch(stack), this.getFortuneLevel(stack)); - - SpellParadigmTool parad = this.loadParadigmFromStack(stack); - List newItems = parad.handleItemList(stack, items); - - if (!world.isRemote) - { - APISpellHelper.spawnItemListInWorld(newItems, world, pos.getX() + 0.5f, pos.getY() + 0.5f, pos.getZ() + 0.5f); - } - - world.markBlockForUpdate(pos); - - int cost = 0; - - cost += parad.digSurroundingArea(stack, world, player, mop, localToolClass, localHardness, toolLevel, this); - - cost += parad.onBreakBlock(stack, world, player, localBlock, localState, pos, mop.field_178784_b); - - if (cost > 0) - { - SoulNetworkHandler.syphonAndDamageFromNetwork(stack, player, cost); - } - } else - { - world.setBlockToAir(pos); - world.markBlockForUpdate(pos); - } - - } else - { - world.setBlockToAir(pos); - world.markBlockForUpdate(pos); - } - } - } - } - -// 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}; - } else if ("shovel".equals(toolClass)) - { - 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[0]; - } - - public String getToolClassForMaterial(Material mat) - { - String testString = "pickaxe"; - - Material[] matList = this.getMaterialsForToolclass(testString); - for (int i = 0; i < matList.length; i++) - { - if (matList[i] == mat) - { - return testString; - } - } - - testString = "shovel"; - matList = this.getMaterialsForToolclass(testString); - for (int i = 0; i < matList.length; i++) - { - if (matList[i] == mat) - { - return testString; - } - } - - testString = "axe"; - matList = this.getMaterialsForToolclass(testString); - for (int i = 0; i < matList.length; i++) - { - if (matList[i] == mat) - { - return testString; - } - } - - return null; - } - - public Set getToolClasses(ItemStack stack) - { - Set set = new HashSet(); - - if (this.getHarvestLevel(stack, "pickaxe") > -1) - { - set.add("pickaxe"); - } - - if (this.getHarvestLevel(stack, "axe") > -1) - { - set.add("axe"); - } - - if (this.getHarvestLevel(stack, "shovel") > -1) - { - set.add("shovel"); - } - - return set; - } - - @Override - public float getDigSpeed(ItemStack stack, IBlockState state) - { - Block block = state.getBlock(); - String toolClass = block.getHarvestTool(state); - - if (toolClass == null || toolClass.equals("")) - { - return 1.0f; - } - { - if (stack.hasTagCompound()) - { - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(tagName); - - return tag.getFloat(digLevelSuffix + toolClass); - } else - { - stack.setTagCompound(new NBTTagCompound()); - } - } - - return 1.0f; - } - - @Override - public int getHarvestLevel(ItemStack stack, String toolClass) - { - if (stack.hasTagCompound()) - { - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(tagName); - - if (tag.hasKey(harvestLevelSuffix + toolClass)) - { - return tag.getInteger(harvestLevelSuffix + toolClass); - } else - { - return -1; - } - } else - { - stack.setTagCompound(new NBTTagCompound()); - } - - return -1; - } - - @Override - public boolean canHarvestBlock(Block par1Block, ItemStack itemStack) - { - - return true; - } - - @Override - public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) - { - return false; - } - - @Override - public void onUpdate(ItemStack toolStack, World world, Entity par3Entity, int par4, boolean par5) - { - if (world.isRemote) - { - return; - } - - SpellParadigmTool parad = this.loadParadigmFromStack(toolStack); - int cost = parad.onUpdate(toolStack, world, par3Entity, par4, par5); - - if (par3Entity instanceof EntityPlayer && cost > 0) - SoulNetworkHandler.syphonAndDamageFromNetwork(toolStack, (EntityPlayer) par3Entity, cost); - - int duration = Math.max(this.getDuration(toolStack, world), 0); - - if (duration <= 0 && par3Entity instanceof EntityPlayer) - { - int banishCost = parad.onBanishTool(toolStack, world, par3Entity, par4, par5); - SoulNetworkHandler.syphonAndDamageFromNetwork(toolStack, (EntityPlayer) par3Entity, banishCost); - ((EntityPlayer) par3Entity).inventory.mainInventory[par4] = this.getContainedCrystal(toolStack); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (par3EntityPlayer.isSneaking()) - { - par3EntityPlayer.setCurrentItemOrArmor(0, this.getContainedCrystal(par1ItemStack)); - return par1ItemStack; - } - - SpellParadigmTool parad = this.loadParadigmFromStack(par1ItemStack); - - MovingObjectPosition mop = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, false); - - int cost; - - if (mop != null && mop.typeOfHit.equals(MovingObjectPosition.MovingObjectType.BLOCK)) - { - cost = parad.onRightClickBlock(par1ItemStack, par3EntityPlayer, par2World, mop); - } else - { - cost = parad.onRightClickAir(par1ItemStack, par2World, par3EntityPlayer); - } - - if (cost > 0) - { - SoulNetworkHandler.syphonAndDamageFromNetwork(par1ItemStack, par3EntityPlayer, cost); - } - - return par1ItemStack; - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add("A mace filled with ancient alchemy"); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) - { - par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName")); - } - - for (String str : this.getToolListString(par1ItemStack)) - { - par3List.add(str); - } - - par3List.add(""); - float damage = this.getCustomItemAttack(par1ItemStack); - par3List.add("\u00A79+" + ((int) (damage * 10)) / 10.0f + " " + "Attack Damage"); - float critChance = ((int) (this.getCritChance(par1ItemStack) * 1000)) / 10.0f; - par3List.add("\u00A79+" + critChance + "% " + "Crit Chance"); - } - } - - //--------------Custom methods--------------// - - public void setHarvestLevel(ItemStack stack, String toolClass, int harvestLevel) - { - if (stack.hasTagCompound()) - { - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(tagName); - - tag.setInteger(harvestLevelSuffix + toolClass, Math.max(-1, harvestLevel)); - - stack.getTagCompound().setTag(tagName, tag); - } else - { - stack.setTagCompound(new NBTTagCompound()); - - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(tagName); - - tag.setInteger(harvestLevelSuffix + toolClass, Math.max(-1, harvestLevel)); - - stack.getTagCompound().setTag(tagName, tag); - } - } - - public void setDigSpeed(ItemStack stack, String toolClass, float digSpeed) - { - if (stack.hasTagCompound()) - { - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(tagName); - - tag.setFloat(digLevelSuffix + toolClass, digSpeed); - - stack.getTagCompound().setTag(tagName, tag); - } else - { - stack.setTagCompound(new NBTTagCompound()); - - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(tagName); - - tag.setFloat(digLevelSuffix + toolClass, digSpeed); - - stack.getTagCompound().setTag(tagName, tag); - } - } - - public float getDigSpeed(ItemStack stack, String toolClass) - { - if (stack.hasTagCompound()) - { - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(tagName); - - return tag.getFloat(digLevelSuffix + toolClass); - } else - { - stack.setTagCompound(new NBTTagCompound()); - - return 0.0f; - } - } - - public void setItemAttack(ItemStack stack, float damage) - { - if (stack.hasTagCompound()) - { - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(tagName); - - tag.setFloat("itemAttack", Math.max(damage, 0.0f)); - - stack.getTagCompound().setTag(tagName, tag); - } else - { - stack.setTagCompound(new NBTTagCompound()); - - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(tagName); - - tag.setFloat("itemAttack", Math.max(damage, 0.0f)); - - stack.getTagCompound().setTag(tagName, tag); - } - } - - public float getCustomItemAttack(ItemStack stack) - { - if (stack.hasTagCompound()) - { - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(tagName); - - return tag.getFloat("itemAttack"); - } else - { - stack.setTagCompound(new NBTTagCompound()); - - return 0.0f; - } - } - - public ItemStack getContainedCrystal(ItemStack container) - { - if (container.hasTagCompound()) - { - NBTTagCompound tag = container.getTagCompound().getCompoundTag(tagName).getCompoundTag("heldItem"); - - return ItemStack.loadItemStackFromNBT(tag); - } else - { - container.setTagCompound(new NBTTagCompound()); - - return null; - } - } - - public void setContainedCrystal(ItemStack container, ItemStack crystal) - { - if (container.hasTagCompound()) - { - NBTTagCompound compTag = container.getTagCompound().getCompoundTag(tagName); - NBTTagCompound tag = compTag.getCompoundTag("heldItem"); - - crystal.writeToNBT(tag); - - compTag.setTag("heldItem", tag); - container.getTagCompound().setTag(tagName, compTag); - } else - { - container.setTagCompound(new NBTTagCompound()); - - NBTTagCompound compTag = container.getTagCompound().getCompoundTag(tagName); - NBTTagCompound tag = compTag.getCompoundTag("heldItem"); - - crystal.writeToNBT(tag); - - compTag.setTag("heldItem", tag); - container.getTagCompound().setTag(tagName, compTag); - } - } - - public void setDuration(ItemStack container, World world, int duration) - { - if (!world.isRemote) - { - World overWorld = DimensionManager.getWorld(0); - long worldtime = overWorld.getTotalWorldTime(); - - if (container.hasTagCompound()) - { - NBTTagCompound tag = container.getTagCompound().getCompoundTag(tagName); - - tag.setLong("duration", Math.max(duration + worldtime, worldtime)); - - container.getTagCompound().setTag(tagName, tag); - } else - { - container.setTagCompound(new NBTTagCompound()); - - NBTTagCompound tag = container.getTagCompound().getCompoundTag(tagName); - - tag.setLong("duration", Math.max(duration + worldtime, worldtime)); - - container.getTagCompound().setTag(tagName, tag); - } - } - } - - public int getDuration(ItemStack container, World world) - { - if (world.isRemote) - { - return 0; - } else - { - World overWorld = DimensionManager.getWorld(0); - long worldtime = overWorld.getTotalWorldTime(); - - if (container.hasTagCompound()) - { - NBTTagCompound tag = container.getTagCompound().getCompoundTag(tagName); - - return (int) (tag.getLong("duration") - worldtime); - } else - { - container.setTagCompound(new NBTTagCompound()); - - return 0; - } - } - } - - public void loadParadigmIntoStack(ItemStack container, List list) - { - if (!container.hasTagCompound()) - { - container.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tagiest = container.getTagCompound().getCompoundTag(tagName); - - NBTTagList effectList = new NBTTagList(); - - for (SpellEffect eff : list) - { - effectList.appendTag(eff.getTag()); - } - - tagiest.setTag("Effects", effectList); - - container.getTagCompound().setTag(tagName, tagiest); - } - - public SpellParadigmTool loadParadigmFromStack(ItemStack container) - { - if (!container.hasTagCompound()) - { - container.setTagCompound(new NBTTagCompound()); - } - NBTTagCompound tagiest = container.getTagCompound().getCompoundTag(tagName); - - NBTTagList tagList = tagiest.getTagList("Effects", Constants.NBT.TAG_COMPOUND); - - List spellEffectList = new LinkedList(); - for (int i = 0; i < tagList.tagCount(); i++) - { - NBTTagCompound tag = tagList.getCompoundTagAt(i); - - SpellEffect eff = SpellEffect.getEffectFromTag(tag); - if (eff != null) - { - spellEffectList.add(eff); - } - } - - return SpellParadigmTool.getParadigmForEffectArray(spellEffectList); - } - - public void setSilkTouch(ItemStack stack, boolean silkTouch) - { - if (stack.hasTagCompound()) - { - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(tagName); - - tag.setBoolean("silkTouch", silkTouch); - - stack.getTagCompound().setTag(tagName, tag); - } else - { - stack.setTagCompound(new NBTTagCompound()); - - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(tagName); - - tag.setBoolean("silkTouch", silkTouch); - - stack.getTagCompound().setTag(tagName, tag); - } - } - - public boolean getSilkTouch(ItemStack stack) - { - if (stack.hasTagCompound()) - { - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(tagName); - - return tag.getBoolean("silkTouch"); - } else - { - stack.setTagCompound(new NBTTagCompound()); - - return false; - } - } - - public void setFortuneLevel(ItemStack stack, int fortune) - { - if (stack.hasTagCompound()) - { - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(tagName); - - tag.setInteger("fortuneLevel", Math.max(fortune, 0)); - - stack.getTagCompound().setTag(tagName, tag); - } else - { - stack.setTagCompound(new NBTTagCompound()); - - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(tagName); - - tag.setInteger("fortuneLevel", Math.max(fortune, 0)); - - stack.getTagCompound().setTag(tagName, tag); - } - } - - public int getFortuneLevel(ItemStack stack) - { - if (stack.hasTagCompound()) - { - NBTTagCompound tag = stack.getTagCompound().getCompoundTag(tagName); - - return tag.getInteger("fortuneLevel"); - } else - { - stack.setTagCompound(new NBTTagCompound()); - - return 0; - } - } - - public List getToolListString(ItemStack container) - { - if (!container.hasTagCompound()) - { - container.setTagCompound(new NBTTagCompound()); - } - NBTTagCompound tagiest = container.getTagCompound().getCompoundTag(tagName); - - NBTTagList tagList = tagiest.getTagList("ToolTips", Constants.NBT.TAG_COMPOUND); - - List toolTipList = new LinkedList(); - for (int i = 0; i < tagList.tagCount(); i++) - { - NBTTagCompound tag = tagList.getCompoundTagAt(i); - - String str = tag.getString("tip"); - if (str != null) - { - toolTipList.add(str); - } - } - - return toolTipList; - } - - public void setToolListString(ItemStack container, List toolTipString) - { - if (!container.hasTagCompound()) - { - container.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tagiest = container.getTagCompound().getCompoundTag(tagName); - - NBTTagList stringList = new NBTTagList(); - - for (String str : toolTipString) - { - NBTTagCompound tag = new NBTTagCompound(); - tag.setString("tip", str); - - stringList.appendTag(tag); - } - - tagiest.setTag("ToolTips", stringList); - - container.getTagCompound().setTag(tagName, tagiest); - } - - public void setCritChance(ItemStack container, float chance) - { - if (container.hasTagCompound()) - { - NBTTagCompound tag = container.getTagCompound().getCompoundTag(tagName); - - tag.setFloat("critChance", Math.max(chance, 0)); - - container.getTagCompound().setTag(tagName, tag); - } else - { - container.setTagCompound(new NBTTagCompound()); - - NBTTagCompound tag = container.getTagCompound().getCompoundTag(tagName); - - tag.setFloat("critChance", Math.max(chance, 0)); - - container.getTagCompound().setTag(tagName, tag); - } - } - - public float getCritChance(ItemStack container) - { - if (container.hasTagCompound()) - { - NBTTagCompound tag = container.getTagCompound().getCompoundTag(tagName); - - return tag.getFloat("critChance"); - } else - { - container.setTagCompound(new NBTTagCompound()); - - return 0; - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapedBloodOrbRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapedBloodOrbRecipe.java deleted file mode 100644 index ca2122bd..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapedBloodOrbRecipe.java +++ /dev/null @@ -1,287 +0,0 @@ -package WayofTime.alchemicalWizardry.api.items; - -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; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -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; - - private ItemStack output = null; - private Object[] input = null; - public int width = 0; - public int height = 0; - private boolean mirrored = true; - - public ShapedBloodOrbRecipe(Block result, Object... recipe) - { - this(new ItemStack(result), recipe); - } - - public ShapedBloodOrbRecipe(Item result, Object... recipe) - { - this(new ItemStack(result), recipe); - } - - public ShapedBloodOrbRecipe(ItemStack result, Object... recipe) - { - output = result.copy(); - - String shape = ""; - int idx = 0; - - if (recipe[idx] instanceof Boolean) - { - mirrored = (Boolean) recipe[idx]; - if (recipe[idx + 1] instanceof Object[]) - { - recipe = (Object[]) recipe[idx + 1]; - } else - { - idx = 1; - } - } - - if (recipe[idx] instanceof String[]) - { - String[] parts = ((String[]) recipe[idx++]); - - for (String s : parts) - { - width = s.length(); - shape += s; - } - - height = parts.length; - } else - { - while (recipe[idx] instanceof String) - { - String s = (String) recipe[idx++]; - shape += s; - width = s.length(); - height++; - } - } - - if (width * height != shape.length()) - { - String ret = "Invalid shaped ore recipe: "; - for (Object tmp : recipe) - { - ret += tmp + ", "; - } - ret += output; - throw new RuntimeException(ret); - } - - HashMap itemMap = new HashMap(); - - for (; idx < recipe.length; idx += 2) - { - Character chr = (Character) recipe[idx]; - 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 orb - if (in instanceof ItemStack) - itemMap.put(chr, ((IBloodOrb) ((ItemStack) in).getItem()).getOrbLevel()); - else itemMap.put(chr, ((IBloodOrb) in).getOrbLevel()); - } else if (in instanceof ItemStack) - { - itemMap.put(chr, ((ItemStack) in).copy()); - } else if (in instanceof Item) - { - itemMap.put(chr, new ItemStack((Item) in)); - } else if (in instanceof Block) - { - itemMap.put(chr, new ItemStack((Block) in, 1, OreDictionary.WILDCARD_VALUE)); - } else if (in instanceof String) - { - itemMap.put(chr, OreDictionary.getOres((String) in)); - } else - { - String ret = "Invalid shaped ore recipe: "; - for (Object tmp : recipe) - { - ret += tmp + ", "; - } - ret += output; - throw new RuntimeException(ret); - } - } - - input = new Object[width * height]; - int x = 0; - for (char chr : shape.toCharArray()) - { - input[x++] = itemMap.get(chr); - } - } - - ShapedBloodOrbRecipe(ShapedRecipes recipe, Map replacements) - { - output = recipe.getRecipeOutput(); - width = recipe.recipeWidth; - height = recipe.recipeHeight; - - input = new Object[recipe.recipeItems.length]; - - for (int i = 0; i < input.length; i++) - { - ItemStack ingred = recipe.recipeItems[i]; - - if (ingred == null) - continue; - - input[i] = recipe.recipeItems[i]; - - for (Entry replace : replacements.entrySet()) - { - if (OreDictionary.itemMatches(replace.getKey(), ingred, true)) - { - input[i] = OreDictionary.getOres(replace.getValue()); - break; - } - } - } - } - - @Override - public ItemStack getCraftingResult(InventoryCrafting var1) - { - return output.copy(); - } - - @Override - public int getRecipeSize() - { - return input.length; - } - - @Override - public ItemStack getRecipeOutput() - { - return output; - } - - @Override - public boolean matches(InventoryCrafting inv, World world) - { - for (int x = 0; x <= MAX_CRAFT_GRID_WIDTH - width; x++) - { - for (int y = 0; y <= MAX_CRAFT_GRID_HEIGHT - height; ++y) - { - if (checkMatch(inv, x, y, false)) - { - return true; - } - - if (mirrored && checkMatch(inv, x, y, true)) - { - return true; - } - } - } - - return false; - } - - @SuppressWarnings("unchecked") - private boolean checkMatch(InventoryCrafting inv, int startX, int startY, boolean mirror) - { - for (int x = 0; x < MAX_CRAFT_GRID_WIDTH; x++) - { - for (int y = 0; y < MAX_CRAFT_GRID_HEIGHT; y++) - { - int subX = x - startX; - int subY = y - startY; - Object target = null; - - if (subX >= 0 && subY >= 0 && subX < width && subY < height) - { - if (mirror) - { - target = input[width - subX - 1 + subY * width]; - } else - { - target = input[subX + subY * width]; - } - } - - ItemStack slot = inv.getStackInRowAndColumn(x, y); - //If target is integer, then we should be check the blood orb value of the item instead - if (target instanceof Integer) - { - if (slot != null && slot.getItem() instanceof IBloodOrb) - { - IBloodOrb orb = (IBloodOrb) slot.getItem(); - if (orb.getOrbLevel() < (Integer) target) - { - return false; - } - } else return false; - } else if (target instanceof ItemStack) - { - if (!OreDictionary.itemMatches((ItemStack) target, slot, false)) - { - return false; - } - } else if (target instanceof ArrayList) - { - boolean matched = false; - - Iterator itr = ((ArrayList) target).iterator(); - while (itr.hasNext() && !matched) - { - matched = OreDictionary.itemMatches(itr.next(), slot, false); - } - - if (!matched) - { - return false; - } - } else if (target == null && slot != null) - { - return false; - } - } - } - - return true; - } - - public ShapedBloodOrbRecipe setMirrored(boolean mirror) - { - mirrored = mirror; - return this; - } - - public Object[] getInput() - { - return this.input; - } - - @Override - public ItemStack[] func_179532_b(InventoryCrafting inventory) - { - return new ItemStack[1]; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java deleted file mode 100644 index 0040f745..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java +++ /dev/null @@ -1,186 +0,0 @@ -package WayofTime.alchemicalWizardry.api.items; - -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import net.minecraft.block.Block; -import net.minecraft.inventory.InventoryCrafting; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.ShapelessRecipes; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -/** - * Shapeless Blood Orb Recipe Handler by joshie * - */ -public class ShapelessBloodOrbRecipe implements IRecipe -{ - private ItemStack output = null; - private ArrayList input = new ArrayList(); - - public ShapelessBloodOrbRecipe(Block result, Object... recipe) - { - this(new ItemStack(result), recipe); - } - - public ShapelessBloodOrbRecipe(Item result, Object... recipe) - { - this(new ItemStack(result), recipe); - } - - public ShapelessBloodOrbRecipe(ItemStack result, Object... recipe) - { - output = result.copy(); - for (Object in : recipe) - { - if (in instanceof IBloodOrb) - { //If the item is an instanceof IBloodOrb then save the level of the orb - input.add(((IBloodOrb) in).getOrbLevel()); - } - else if (in instanceof ItemStack) - { - if (((ItemStack)in).getItem() instanceof IBloodOrb) - { - input.add(((IBloodOrb) ((ItemStack)in).getItem()).getOrbLevel()); - } - else input.add(((ItemStack) in).copy()); - } else if (in instanceof Item) - { - input.add(new ItemStack((Item) in)); - } else if (in instanceof Block) - { - input.add(new ItemStack((Block) in)); - } else if (in instanceof String) - { - input.add(OreDictionary.getOres((String) in)); - } else - { - String ret = "Invalid shapeless ore recipe: "; - for (Object tmp : recipe) - { - ret += tmp + ", "; - } - ret += output; - throw new RuntimeException(ret); - } - } - } - - @SuppressWarnings("unchecked") - ShapelessBloodOrbRecipe(ShapelessRecipes recipe, Map replacements) - { - output = recipe.getRecipeOutput(); - - for (ItemStack ingred : ((List) recipe.recipeItems)) - { - Object finalObj = ingred; - for (Entry replace : replacements.entrySet()) - { - if (OreDictionary.itemMatches(replace.getKey(), ingred, false)) - { - finalObj = OreDictionary.getOres(replace.getValue()); - break; - } - } - input.add(finalObj); - } - } - - @Override - public int getRecipeSize() - { - return input.size(); - } - - @Override - public ItemStack getRecipeOutput() - { - return output; - } - - @Override - public ItemStack getCraftingResult(InventoryCrafting var1) - { - return output.copy(); - } - - @SuppressWarnings("unchecked") - @Override - public boolean matches(InventoryCrafting var1, World world) - { - ArrayList required = new ArrayList(input); - - for (int x = 0; x < var1.getSizeInventory(); x++) - { - ItemStack slot = var1.getStackInSlot(x); - - if (slot != null) - { - boolean inRecipe = false; - Iterator req = required.iterator(); - - while (req.hasNext()) - { - boolean match = false; - - Object next = req.next(); - - //If target is integer, then we should be check the blood orb value of the item instead - if (next instanceof Integer) - { - if (slot.getItem() instanceof IBloodOrb) - { - IBloodOrb orb = (IBloodOrb) slot.getItem(); - if (orb.getOrbLevel() < (Integer) next) - { - return false; - } - } else return false; - match = true; - } else if (next instanceof ItemStack) - { - match = OreDictionary.itemMatches((ItemStack) next, slot, false); - } else if (next instanceof ArrayList) - { - Iterator itr = ((ArrayList) next).iterator(); - while (itr.hasNext() && !match) - { - match = OreDictionary.itemMatches(itr.next(), slot, false); - } - } - - if (match) - { - inRecipe = true; - required.remove(next); - break; - } - } - - if (!inRecipe) - { - return false; - } - } - } - - return required.isEmpty(); - } - - public ArrayList getInput() - { - return this.input; - } - - @Override - public ItemStack[] func_179532_b(InventoryCrafting inventory) - { - return new ItemStack[1]; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ArmourUpgrade.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ArmourUpgrade.java deleted file mode 100644 index ff4cec00..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ArmourUpgrade.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.alchemicalWizardry.api.items.interfaces; - -import net.minecraft.entity.player.EntityPlayer; -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); - - boolean isUpgrade(); - - int getEnergyForTenSeconds(); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IBindable.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IBindable.java deleted file mode 100644 index 46a79939..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IBindable.java +++ /dev/null @@ -1,5 +0,0 @@ -package WayofTime.alchemicalWizardry.api.items.interfaces; - -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 deleted file mode 100644 index c38ea2f1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IBloodOrb.java +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 4150abe2..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IHolding.java +++ /dev/null @@ -1,6 +0,0 @@ -package WayofTime.alchemicalWizardry.api.items.interfaces; - -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 deleted file mode 100644 index b75815ca..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ILPGauge.java +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 23ac7809..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IReagentManipulator.java +++ /dev/null @@ -1,9 +0,0 @@ -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 -{ - -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IRitualDiviner.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IRitualDiviner.java deleted file mode 100644 index 2189a6ed..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IRitualDiviner.java +++ /dev/null @@ -1,22 +0,0 @@ -package WayofTime.alchemicalWizardry.api.items.interfaces; - -import net.minecraft.item.ItemStack; - -public interface IRitualDiviner -{ - int cycleDirection(ItemStack stack); - - String getCurrentRitual(ItemStack stack); - - int getDirection(ItemStack stack); - - int getMaxRuneDisplacement(ItemStack stack); - - String getNameForDirection(int direction); - - void setCurrentRitual(ItemStack stack, String ritualID); - - void setDirection(ItemStack stack, int direction); - - void setMaxRuneDisplacement(ItemStack stack, int displacement); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ISigil.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ISigil.java deleted file mode 100644 index d610c211..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/ISigil.java +++ /dev/null @@ -1,4 +0,0 @@ -package WayofTime.alchemicalWizardry.api.items.interfaces; - -public interface ISigil { -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/network/SoulNetwork.java b/src/main/java/WayofTime/alchemicalWizardry/api/network/SoulNetwork.java new file mode 100644 index 00000000..2641e18c --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/network/SoulNetwork.java @@ -0,0 +1,34 @@ +package WayofTime.alchemicalWizardry.api.network; + +import WayofTime.alchemicalWizardry.api.NBTHolder; +import lombok.Getter; +import lombok.Setter; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.WorldSavedData; + +@Getter +@Setter +public class SoulNetwork extends WorldSavedData { + + private int currentEssence; + private int maxOrb; + + public SoulNetwork(String name) { + super(name); + + currentEssence = 0; + maxOrb = 0; + } + + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) { + currentEssence = nbttagcompound.getInteger(NBTHolder.NBT_CURRENTESSENCE); + maxOrb = nbttagcompound.getInteger(NBTHolder.NBT_MAXORB); + } + + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + nbttagcompound.setInteger(NBTHolder.NBT_CURRENTESSENCE, currentEssence); + nbttagcompound.setInteger(NBTHolder.NBT_MAXORB, maxOrb); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/orb/BloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/api/orb/BloodOrb.java new file mode 100644 index 00000000..a7130ad2 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/orb/BloodOrb.java @@ -0,0 +1,69 @@ +package WayofTime.alchemicalWizardry.api.orb; + +import WayofTime.alchemicalWizardry.api.registry.OrbRegistry; + +/** + * Base object for all Blood Orbs. Makes Orb creation quite a bit easier. + * + * Just create a new BloodOrb instance then register it with {@link OrbRegistry#registerOrb(BloodOrb)} + * This will allow the use of just one item ID for all orbs. If an addon dev needs more control over the intricacies + * of their orb (custom right clicking, renderers, etc), they can just create their own item as normal. + * + */ +public class BloodOrb { + + private String name; + private int tier; + private int capacity; + private String owner = "AlchemicalWizardry"; + + /** + * A base object for BloodOrbs. A bit cleaner than the + * old way through EnergyItems. + * + * @param name - A name for the Orb. Gets put into an unlocalized name. + * @param tier - The tier of the Orb. + * @param capacity - The max amount of LP the Orb can store. + */ + public BloodOrb(String name, int tier, int capacity) { + this.name = name; + this.tier = tier; + this.capacity = capacity; + } + + public String getName() { + return name; + } + + public int getTier() { + return tier; + } + + public int getCapacity() { + return capacity; + } + + public String getOwner() { + return owner; + } + + /** + * For setting the MODID of the mod that creates the Orb. Not required, but preferred. + * + * @return - The BloodOrb object for further use. + */ + public BloodOrb setOwner(String owner) { + this.owner = owner; + return this; + } + + @Override + public String toString() { + return "BloodOrb{" + + "name='" + name + '\'' + + ", tier=" + tier + + ", capacity=" + capacity + + ", owner=" + owner + + '}'; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/orb/IBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/api/orb/IBloodOrb.java new file mode 100644 index 00000000..99ad4745 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/orb/IBloodOrb.java @@ -0,0 +1,10 @@ +package WayofTime.alchemicalWizardry.api.orb; + +public interface IBloodOrb { + + BloodOrb getOrb(int meta); + + int getMaxEssence(int meta); + + int getOrbLevel(int meta); +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/package-info.java b/src/main/java/WayofTime/alchemicalWizardry/api/package-info.java new file mode 100644 index 00000000..4f7a37e4 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/package-info.java @@ -0,0 +1,4 @@ +@API(owner = "AlchemicalWizardry", provides = "AlchemicalWizardry|API", apiVersion = "@VERSION@") +package WayofTime.alchemicalWizardry.api; + +import net.minecraftforge.fml.common.API; \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/registry/AltarRecipeRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/registry/AltarRecipeRegistry.java new file mode 100644 index 00000000..9950c680 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/registry/AltarRecipeRegistry.java @@ -0,0 +1,25 @@ +package WayofTime.alchemicalWizardry.api.registry; + +import WayofTime.alchemicalWizardry.api.AlchemicalWizardryAPI; +import WayofTime.alchemicalWizardry.api.altar.AltarRecipe; +import com.google.common.collect.BiMap; +import com.google.common.collect.HashBiMap; +import lombok.Getter; +import net.minecraft.item.ItemStack; + +public class AltarRecipeRegistry { + + @Getter + private static BiMap recipes = HashBiMap.create(); + + public static void registerRecipe(AltarRecipe recipe) { + if (!recipes.containsValue(recipe)) + recipes.put(recipe.input, recipe); + else + AlchemicalWizardryAPI.getLogger().error("Error adding recipe for " + recipe.input.getDisplayName() + (recipe.output == null ? "" : " -> " + recipe.output.getDisplayName()) + ". Recipe already exists."); + } + + public static AltarRecipe getRecipeForInput(ItemStack input) { + return recipes.get(input); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/registry/OrbRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/registry/OrbRegistry.java new file mode 100644 index 00000000..f78f97aa --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/registry/OrbRegistry.java @@ -0,0 +1,62 @@ +package WayofTime.alchemicalWizardry.api.registry; + +import WayofTime.alchemicalWizardry.api.AlchemicalWizardryAPI; +import WayofTime.alchemicalWizardry.api.orb.BloodOrb; +import lombok.Getter; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.client.resources.model.ModelBakery; +import net.minecraft.client.resources.model.ModelResourceLocation; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +import java.util.ArrayList; +import java.util.List; + +/** + * This is only for those who wish to add a basic {@link BloodOrb}. If you need custom handling, + * you will need your own item class. + */ +public class OrbRegistry { + + @Getter + private static List orbs = new ArrayList(); + + public static void registerOrb(BloodOrb orb) { + if (!orbs.contains(orb)) + orbs.add(orb); + else + AlchemicalWizardryAPI.getLogger().error("Error adding orb: " + orb.toString() + ". Orb already exists!"); + } + + @SideOnly(Side.CLIENT) + public static void registerOrbTexture(BloodOrb orb, String resourceLocation) { + int meta = getIndexOf(orb); + + RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); + + ModelBakery.addVariantName(AlchemicalWizardryAPI.getOrbItem(), resourceLocation); + renderItem.getItemModelMesher().register(AlchemicalWizardryAPI.getOrbItem(), meta, new ModelResourceLocation(resourceLocation, "inventory")); + } + + public static BloodOrb getOrb(int index) { + return orbs.get(index); + } + + public static int getIndexOf(BloodOrb orb) { + return orbs.indexOf(orb); + } + + public static boolean isEmpty() { + return orbs.isEmpty(); + } + + public static int getSize() { + return orbs.size(); + } + + public static ItemStack getOrbStack(BloodOrb orb) { + return new ItemStack(AlchemicalWizardryAPI.getOrbItem(), 1, getIndexOf(orb)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/renderer/MRSRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/api/renderer/MRSRenderer.java deleted file mode 100644 index 8200f4e2..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/renderer/MRSRenderer.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.alchemicalWizardry.api.renderer; - -import net.minecraft.client.Minecraft; -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 location) - { - Minecraft.getMinecraft().getTextureManager().bindTexture(location); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IMasterRitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IMasterRitualStone.java deleted file mode 100644 index 8b38ecac..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IMasterRitualStone.java +++ /dev/null @@ -1,41 +0,0 @@ -package WayofTime.alchemicalWizardry.api.rituals; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ISegmentedReagentHandler; - -public interface IMasterRitualStone extends ISegmentedReagentHandler -{ - void performRitual(World world, BlockPos pos, String ritualID); - - String getOwner(); - - void setCooldown(int newCooldown); - - int getCooldown(); - - void setVar1(int newVar1); - - int getVar1(); - - void setActive(boolean active); - - int getDirection(); - - World getWorldObj(); - - BlockPos getPosition(); - - NBTTagCompound getCustomRitualTag(); - - void setCustomRitualTag(NBTTagCompound tag); - - boolean areTanksEmpty(); - - int getRunningTime(); - - LocalRitualStorage getLocalStorage(); - - void setLocalStorage(LocalRitualStorage storage); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IRitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IRitualStone.java deleted file mode 100644 index 74d1e9a8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IRitualStone.java +++ /dev/null @@ -1,18 +0,0 @@ -package WayofTime.alchemicalWizardry.api.rituals; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; - -public interface IRitualStone -{ - /** - * x, y, and z give the position of the Ritual Stone - * @param world - * @param pos - * @param state - * @param runeType - * @return - */ - boolean isRuneType(World world, BlockPos pos, IBlockState state, int runeType); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/ITileRitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/ITileRitualStone.java deleted file mode 100644 index 68a0a24e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/ITileRitualStone.java +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index d9d7cdfc..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/LocalRitualStorage.java +++ /dev/null @@ -1,36 +0,0 @@ -package WayofTime.alchemicalWizardry.api.rituals; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; - -/** - * 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 BlockPos coords; - - public void writeToNBT(NBTTagCompound tag) - { - tag.setInteger("xCoord", coords.getX()); - tag.setInteger("yCoord", coords.getY()); - tag.setInteger("zCoord", coords.getZ()); - } - - public void readFromNBT(NBTTagCompound tag) - { - this.coords = new BlockPos(tag.getInteger("xCoord"), tag.getInteger("yCoord"), tag.getInteger("zCoord")); - } - - public BlockPos getLocation() - { - return coords; - } - - public void setLocation(BlockPos location) - { - this.coords = location; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualBreakMethod.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualBreakMethod.java deleted file mode 100644 index a705056a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualBreakMethod.java +++ /dev/null @@ -1,11 +0,0 @@ -package WayofTime.alchemicalWizardry.api.rituals; - -public enum RitualBreakMethod -{ - REDSTONE, - BREAK_MRS, - BREAK_STONE, - ACTIVATE, //When an activation crystal activates the MRS, overwriting the current ritual - DEACTIVATE, - EXPLOSION, //When the MRS is destroyed by an explosion -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualComponent.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualComponent.java deleted file mode 100644 index 1efc368f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualComponent.java +++ /dev/null @@ -1,72 +0,0 @@ -package WayofTime.alchemicalWizardry.api.rituals; - -public class RitualComponent -{ - private int x; - private int y; - private int z; - private int stoneType; - public static final int BLANK = 0; - public static final int WATER = 1; - public static final int FIRE = 2; - public static final int EARTH = 3; - public static final int AIR = 4; - public static final int DUSK = 5; - public static final int DAWN = 6; - - public RitualComponent(int x, int y, int z, int stoneType) - { - this.x = x; - this.y = y; - this.z = z; - this.stoneType = stoneType; - } - - public int getX() - { - return this.x; - } - - public int getY() - { - return this.y; - } - - public int getZ() - { - return this.z; - } - - public int getX(int direction) - { - switch(direction) - { - case 2: - return -this.getZ(); - case 3: - return -this.getX(); - case 4: - return this.getZ(); - default: return this.getX(); - } - } - - public int getZ(int direction) - { - switch(direction) - { - case 2: - return this.getX(); - case 3: - return -this.getZ(); - case 4: - return -this.getX(); - default: return this.getZ(); - } - } - - public int getStoneType() - { - return this.stoneType; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java deleted file mode 100644 index 8bbe8397..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java +++ /dev/null @@ -1,87 +0,0 @@ -package WayofTime.alchemicalWizardry.api.rituals; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.EnumFacing; -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) - { - return true; - } - - public void onRitualBroken(IMasterRitualStone ritualStone, RitualBreakMethod method) {} - - public abstract int getCostPerRefresh(); - - public int getInitialCooldown() - { - return 0; - } - - public abstract List getRitualComponentList(); - - public boolean canDrainReagent(IMasterRitualStone ritualStone, Reagent reagent, int amount, boolean doDrain) - { - if (ritualStone == null || reagent == null || amount == 0) - { - return false; - } - - ReagentStack reagentStack = new ReagentStack(reagent, amount); - - ReagentStack stack = ritualStone.drain(EnumFacing.UP, reagentStack, false); - - if (stack != null && stack.amount >= amount) - { - if (doDrain) - { - ritualStone.drain(EnumFacing.UP, reagentStack, true); - } - - return true; - } - - return false; - } - - public LocalRitualStorage getNewLocalStorage() - { - return new LocalRitualStorage(); - } - - public void addOffsetRunes(ArrayList ritualList, int off1, int off2, int y, int rune) - { - ritualList.add(new RitualComponent(off1, y, off2, rune)); - ritualList.add(new RitualComponent(off2, y, off1, rune)); - ritualList.add(new RitualComponent(off1, y, -off2, rune)); - ritualList.add(new RitualComponent(-off2, y, off1, rune)); - ritualList.add(new RitualComponent(-off1, y, off2, rune)); - ritualList.add(new RitualComponent(off2, y, -off1, rune)); - ritualList.add(new RitualComponent(-off1, y, -off2, rune)); - ritualList.add(new RitualComponent(-off2, y, -off1, rune)); - } - - public void addCornerRunes(ArrayList ritualList, int off1, int y, int rune) - { - ritualList.add(new RitualComponent(off1, y, off1, rune)); - ritualList.add(new RitualComponent(off1, y, -off1, rune)); - ritualList.add(new RitualComponent(-off1, y, -off1, rune)); - ritualList.add(new RitualComponent(-off1, y, off1, rune)); - } - - public void addParallelRunes(ArrayList ritualList, int off1, int y, int rune) - { - ritualList.add(new RitualComponent(off1, y, 0, rune)); - ritualList.add(new RitualComponent(-off1, y, 0, rune)); - ritualList.add(new RitualComponent(0, y, -off1, rune)); - ritualList.add(new RitualComponent(0, y, off1, rune)); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java deleted file mode 100644 index a45f0fd1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java +++ /dev/null @@ -1,390 +0,0 @@ -package WayofTime.alchemicalWizardry.api.rituals; - -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.common.eventhandler.Event; -import WayofTime.alchemicalWizardry.api.event.RitualRunEvent; -import WayofTime.alchemicalWizardry.api.event.RitualStopEvent; -import WayofTime.alchemicalWizardry.api.renderer.MRSRenderer; - -public class Rituals -{ - public final int crystalLevel; - public final int actCost; - public final RitualEffect effect; - public final String name; - - public final MRSRenderer customRenderer; - - public static Map ritualMap = new HashMap(); - public static List keyList = new LinkedList(); - - public Rituals(int crystalLevel, int actCost, RitualEffect effect, String name, MRSRenderer renderer) - { - this.crystalLevel = crystalLevel; - this.actCost = actCost; - this.effect = effect; - this.name = name; - keyList.add(name); - ritualMap.put(name, this); - this.customRenderer = renderer; - } - - public Rituals(int crystalLevel, int actCost, RitualEffect effect, String name) - { - this(crystalLevel, actCost, effect, name, null); - } - - /** - * Static method to register a ritual to the Ritual Registry - * - * @param key Unique identification key - must be different from all others to properly register - * @param crystalLevel Crystal level required to activate - * @param actCost LP amount required to activate - * @param effect The effect that will be ticked - * @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) - { - if (ritualMap.containsKey(key)) - { - return false; - } else - { - Rituals ritual = new Rituals(crystalLevel, actCost, effect, name, renderer); - ritual.removeRitualFromList(); - ritualMap.put(key, ritual); - keyList.add(key); - return true; - } - } - - public static boolean registerRitual(String key, int crystalLevel, int actCost, RitualEffect effect, String name) - { - if (ritualMap.containsKey(key)) - { - return false; - } else - { - Rituals ritual = new Rituals(crystalLevel, actCost, effect, name); - ritual.removeRitualFromList(); - ritualMap.put(key, ritual); - keyList.add(key); - return true; - } - } - - public void removeRitualFromList() - { - if (ritualMap.containsValue(this)) - { - ritualMap.remove(ritualMap.remove(this.name)); - } - if (keyList.contains(this.name)) - { - keyList.remove(this.name); - } - } - - public static String checkValidRitual(World world, BlockPos pos) - { - for (String key : ritualMap.keySet()) - { - if (checkRitualIsValid(world, pos, key)) - { - return key; - } - } - - return ""; - } - - public static boolean canCrystalActivate(String ritualID, int crystalLevel) - { - if (ritualMap.containsKey(ritualID)) - { - Rituals ritual = ritualMap.get(ritualID); - if (ritual != null) - { - return ritual.getCrystalLevel() <= crystalLevel; - } - } - - return false; - } - - public static boolean checkRitualIsValid(World world, BlockPos pos, String ritualID) - { - int direction = Rituals.getDirectionOfRitual(world, pos, ritualID); - - return direction != -1; - } - - /** - * 1 - NORTH - * 2 - EAST - * 3 - SOUTH - * 4 - WEST - */ - public static boolean checkDirectionOfRitualValid(World world, BlockPos pos, String ritualID, int direction) - { - List ritual = Rituals.getRitualList(ritualID); - - if (ritual == null) - { - return false; - } - - IBlockState testState; - Block test; - TileEntity te; - - for (RitualComponent rc : ritual) - { - BlockPos newPos = pos.add(rc.getX(direction), rc.getY(), rc.getZ(direction)); - testState = world.getBlockState(newPos); - test = testState.getBlock(); - te = world.getTileEntity(newPos); - - if (!(test instanceof IRitualStone && ((IRitualStone)test).isRuneType(world, newPos, testState, rc.getStoneType())) - && !(te instanceof ITileRitualStone && ((ITileRitualStone)te).isRuneType(rc.getStoneType()))) - { - return false; - } - } - - return true; - } - - public static int getDirectionOfRitual(World world, BlockPos pos, String ritualID) - { - for (int i = 1; i <= 4; i++) - { - if (Rituals.checkDirectionOfRitualValid(world, pos, ritualID, i)) - { - return i; - } - } - - return -1; - } - - public static int getCostForActivation(String ritualID) - { - if (ritualMap.containsKey(ritualID)) - { - Rituals ritual = ritualMap.get(ritualID); - if (ritual != null) - { - return ritual.actCost; - } - } - - return 0; - } - - public static int getInitialCooldown(String ritualID) - { - if (ritualMap.containsKey(ritualID)) - { - Rituals ritual = ritualMap.get(ritualID); - if (ritual != null && ritual.effect != null) - { - return ritual.effect.getInitialCooldown(); - } - } - - return 0; - } - - public static List getRitualList(String ritualID) - { - if (ritualMap.containsKey(ritualID)) - { - Rituals ritual = ritualMap.get(ritualID); - if (ritual != null) - { - return ritual.obtainComponents(); - } else - { - return null; - } - } else - { - return null; - } - } - - private List obtainComponents() - { - return this.effect.getRitualComponentList(); - } - - private int getCrystalLevel() - { - return this.crystalLevel; - } - - private MRSRenderer getRenderer() - { - return this.customRenderer; - } - - public static void performEffect(IMasterRitualStone ritualStone, String ritualID) - { - String ownerName = ritualStone.getOwner(); - - RitualRunEvent event = new RitualRunEvent(ritualStone, ownerName, ritualID); - - if(MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Event.Result.DENY) - { - return; - } - - if (ritualMap.containsKey(event.ritualKey)) - { - Rituals ritual = ritualMap.get(event.ritualKey); - if (ritual != null && ritual.effect != null) - { - ritual.effect.performEffect(ritualStone); - } - } - } - - public static boolean startRitual(IMasterRitualStone ritualStone, String ritualID, EntityPlayer player) - { - if (ritualMap.containsKey(ritualID)) - { - Rituals ritual = ritualMap.get(ritualID); - if (ritual != null && ritual.effect != null) - { - return ritual.effect.startRitual(ritualStone, player); - } - } - - return false; - } - - public static void onRitualBroken(IMasterRitualStone ritualStone, String ritualID, RitualBreakMethod method) - { - String ownerName = ritualStone.getOwner(); - RitualStopEvent event = new RitualStopEvent(ritualStone, ownerName, ritualID, method); - MinecraftForge.EVENT_BUS.post(event); - - if (ritualMap.containsKey(ritualID)) - { - Rituals ritual = ritualMap.get(ritualID); - if (ritual != null && ritual.effect != null) - { - ritual.effect.onRitualBroken(ritualStone, method); - } - } - } - - public String getRitualName() - { - return this.name; - } - - public static String getNameOfRitual(String id) - { - if (ritualMap.containsKey(id)) - { - Rituals ritual = ritualMap.get(id); - if (ritual != null) - { - return ritual.getRitualName(); - } - } - - return ""; - } - - public static String getNextRitualKey(String key) - { - boolean hasSpotted = false; - String firstKey = ""; - - for (String str : keyList) - { - if (firstKey.equals("")) - { - firstKey = str; - } - if (hasSpotted) - { - return str; - } - if (str.equals(key)) - { - hasSpotted = true; - } - } - - return firstKey; - } - - public static String getPreviousRitualKey(String key) - { - boolean hasSpotted = false; - String lastKey = keyList.get(keyList.size() - 1); - - for (String str : keyList) - { - if (str.equals(key)) - { - hasSpotted = true; - } - if (hasSpotted) - { - return lastKey; - } - lastKey = str; - } - - return lastKey; - } - - public static MRSRenderer getRendererForKey(String ritualID) - { - if (ritualMap.containsKey(ritualID)) - { - Rituals ritual = ritualMap.get(ritualID); - if (ritual != null) - { - return ritual.getRenderer(); - } - } - - return null; - } - - public static LocalRitualStorage getLocalStorage(String ritualID) - { - if (ritualMap.containsKey(ritualID)) - { - Rituals ritual = ritualMap.get(ritualID); - if (ritual != null) - { - RitualEffect eff = ritual.effect; - if(eff != null) - { - return eff.getNewLocalStorage(); - } - } - } - - return null; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/IIncense.java b/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/IIncense.java deleted file mode 100644 index 46b04a00..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/IIncense.java +++ /dev/null @@ -1,21 +0,0 @@ -package WayofTime.alchemicalWizardry.api.sacrifice; - -import net.minecraft.item.ItemStack; - -public interface IIncense -{ - int getMinLevel(ItemStack stack); - - int getMaxLevel(ItemStack stack); - - int getIncenseDuration(ItemStack stack); - - /** - * @param stack - * @return a float from 0 to 1 - */ - float getRedColour(ItemStack stack); - float getGreenColour(ItemStack stack); - float getBlueColour(ItemStack stack); - float getTickRate(ItemStack stack); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/PlayerSacrificeHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/PlayerSacrificeHandler.java deleted file mode 100644 index af286e12..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/PlayerSacrificeHandler.java +++ /dev/null @@ -1,116 +0,0 @@ -package WayofTime.alchemicalWizardry.api.sacrifice; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -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 float getPlayerIncense(EntityPlayer player) - { - return APISpellHelper.getCurrentIncense(player); - } - - public static void setPlayerIncense(EntityPlayer player, float amount) - { - APISpellHelper.setCurrentIncense(player, amount); - } - - public static boolean incrementIncense(EntityPlayer player, float min, float max, float increment) - { - float amount = getPlayerIncense(player); - if(amount < min || amount >= max) - { - return false; - } - - amount = amount + Math.min(increment, max - amount); - setPlayerIncense(player, amount); - -// System.out.println("Amount of incense: " + amount + ", Increment: " + increment); - - return true; - } - - public static boolean sacrificePlayerHealth(EntityPlayer player) - { - if(player.isPotionActive(AlchemicalWizardry.customPotionSoulFray)) - { - return false; - } - - float amount = getPlayerIncense(player); - - if(amount >= 0) - { - float health = player.getHealth(); - float maxHealth = player.getMaxHealth(); - - if(health > maxHealth/10.0) - { - float sacrificedHealth = health - maxHealth/10.0f; - - if(findAndFillAltar(player.getEntityWorld(), player, (int)(sacrificedHealth * 100f * getModifier(amount)))) - { - player.setHealth(maxHealth/10.0f); - setPlayerIncense(player, 0); - player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionSoulFray.id, soulFrayDuration)); - - return true; - } - } - } - - return false; - } - - public static float getModifier(float amount) - { - return 1 + amount*scalingOfSacrifice; - } - - public static boolean findAndFillAltar(World world, EntityPlayer player, int amount) - { - IBloodAltar altarEntity = getAltar(world, player.getPosition()); - - if (altarEntity == null) - { - return false; - } - - altarEntity.sacrificialDaggerCall(amount, false); - altarEntity.startCycle(); - - return true; - } - - public static IBloodAltar getAltar(World world, BlockPos pos) - { - TileEntity tileEntity; - - for (int i = -2; i <= 2; i++) - { - for (int j = -2; j <= 2; j++) - { - for (int k = -2; k <= 1; k++) - { - tileEntity = world.getTileEntity(pos.add(i, j, k)); - - if(tileEntity instanceof IBloodAltar) - { - return (IBloodAltar)tileEntity; - } - } - } - } - - return null; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java deleted file mode 100644 index 0718624a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java +++ /dev/null @@ -1,93 +0,0 @@ -package WayofTime.alchemicalWizardry.api.soulNetwork; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.io.Writer; -import java.util.HashMap; -import java.util.Map.Entry; -import java.util.UUID; - -import net.minecraft.entity.player.EntityPlayer; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - - -/** - * 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(); - public static UUID getUUIDFromPlayer(EntityPlayer player) - { - return player.getPersistentID(); - } - - public static String getKeyForPlayer(EntityPlayer player) - { - return ""; - } - - public static String assignKeyToPlayer(EntityPlayer player) - { - return ""; - } - - public static void save() - { - keyMap.put(new UUID(0, 0), "test"); - - Gson gson = new GsonBuilder().setPrettyPrinting().create(); - String json = gson.toJson(keyMap); - Writer writer; - try - { - writer = new FileWriter(fileName + ".json"); - writer.write(json); - writer.close(); - } catch (IOException e) - { - e.printStackTrace(); - } - } - - public static void load() - { - File save = new File(fileName + ".json"); - - if(save.canRead()) - { - Gson gson = new GsonBuilder().setPrettyPrinting().create(); - - BufferedReader br; - - try - { - br = new BufferedReader(new FileReader(save)); - - keyMap = gson.fromJson(br, keyMap.getClass()); - - if(keyMap != null) - { - for(Entry entry : keyMap.entrySet()) - { - System.out.println("" + entry.getValue() + " gave: "+ entry.getKey()); - } - } - } catch (FileNotFoundException e) - { - e.printStackTrace(); - } - } - else - { - keyMap = null; - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/LifeEssenceNetwork.java b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/LifeEssenceNetwork.java deleted file mode 100644 index 91bcdafa..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/LifeEssenceNetwork.java +++ /dev/null @@ -1,30 +0,0 @@ -package WayofTime.alchemicalWizardry.api.soulNetwork; - -import net.minecraft.nbt.NBTTagCompound; - -public class LifeEssenceNetwork extends net.minecraft.world.WorldSavedData -{ - public int currentEssence; - public int maxOrb; - - public LifeEssenceNetwork(String par1Str) - { - super(par1Str); - currentEssence = 0; - maxOrb = 0; - } - - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) - { - currentEssence = nbttagcompound.getInteger("currentEssence"); - maxOrb = nbttagcompound.getInteger("maxOrb"); - } - - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) - { - nbttagcompound.setInteger("currentEssence", currentEssence); - nbttagcompound.setInteger("maxOrb", maxOrb); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java deleted file mode 100644 index ea051a0d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java +++ /dev/null @@ -1,468 +0,0 @@ -package WayofTime.alchemicalWizardry.api.soulNetwork; - -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.server.MinecraftServer; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.common.eventhandler.Event; -import net.minecraftforge.fml.common.eventhandler.Event.Result; -import WayofTime.alchemicalWizardry.api.event.AddToNetworkEvent; -import WayofTime.alchemicalWizardry.api.event.ItemBindEvent; -import WayofTime.alchemicalWizardry.api.event.ItemDrainInContainerEvent; -import WayofTime.alchemicalWizardry.api.event.ItemDrainNetworkEvent; - - -public class SoulNetworkHandler -{ - public static boolean canSyphonInContainer(ItemStack ist, int damageToBeDone) - { - if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) - { - String ownerName = ist.getTagCompound().getString("ownerName"); - - if (MinecraftServer.getServer() == null) - { - return false; - } - - World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); - - if (data == null) - { - data = new LifeEssenceNetwork(ownerName); - world.setItemData(ownerName, data); - } - - return data.currentEssence >= damageToBeDone; - } - - return false; - } - - public static boolean syphonFromNetworkWhileInContainer(ItemStack ist, int damageToBeDone) - { - String ownerName = ""; - if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) - { - ownerName = ist.getTagCompound().getString("ownerName"); - } - - ItemDrainInContainerEvent event = new ItemDrainInContainerEvent(ist, ownerName, damageToBeDone); - - if(MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Result.DENY) - { - return false; - } - - return syphonFromNetwork(event.ownerNetwork, event.drainAmount) >= damageToBeDone; - } - - public static int getCurrentMaxOrb(String ownerName) - { - if (MinecraftServer.getServer() == null) - { - return 0; - } - - World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); - - if (data == null) - { - data = new LifeEssenceNetwork(ownerName); - world.setItemData(ownerName, data); - } - - return data.maxOrb; - } - - public static void setMaxOrbToMax(String ownerName, int maxOrb) - { - if (MinecraftServer.getServer() == null) - { - return; - } - - World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); - - if (data == null) - { - data = new LifeEssenceNetwork(ownerName); - world.setItemData(ownerName, data); - } - - data.maxOrb = Math.max(maxOrb, data.maxOrb); - data.markDirty(); - } - - public static int getMaximumForOrbTier(int maxOrb) - { - switch(maxOrb) - { - case 1: - return 5000; - case 2: - return 25000; - case 3: - return 150000; - case 4: - return 1000000; - case 5: - return 10000000; - case 6: - return 30000000; - default: - return 1; - } - } - - public static int syphonFromNetwork(ItemStack ist, int damageToBeDone) - { - if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) - { - String ownerName = ist.getTagCompound().getString("ownerName"); - - return syphonFromNetwork(ownerName, damageToBeDone); - } - return 0; - } - - public static int syphonFromNetwork(String ownerName, int damageToBeDone) - { - if (MinecraftServer.getServer() == null) - { - return 0; - } - - World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); - - if (data == null) - { - data = new LifeEssenceNetwork(ownerName); - world.setItemData(ownerName, data); - } - - if (data.currentEssence >= damageToBeDone) - { - data.currentEssence -= damageToBeDone; - data.markDirty(); - return damageToBeDone; - } - - return 0; - } - - /** - * 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 drain - * @return True if the action should be executed and false if it should not. Always returns false if client-sided. - */ - public static boolean syphonAndDamageFromNetwork(ItemStack ist, EntityPlayer player, int drain) - { - if (player.worldObj.isRemote) - { - return false; - } - - if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) - { - String ownerName = ist.getTagCompound().getString("ownerName"); - - ItemDrainNetworkEvent event = new ItemDrainNetworkEvent(player, ownerName, ist, drain); - - if(MinecraftForge.EVENT_BUS.post(event)) - { - return false; - } - - int drainAmount = syphonFromNetwork(event.ownerNetwork, event.drainAmount); - if(drainAmount == 0 || event.shouldDamage) - { - hurtPlayer(player, event.damageAmount); - } - - return (event.getResult() != Event.Result.DENY); //The event has been told to prevent the action but allow all repercussions of using the item. - } - - int amount = SoulNetworkHandler.syphonFromNetwork(ist, drain); - - hurtPlayer(player, drain - amount); - - return true; - } - - public static boolean syphonAndDamageFromNetwork(String ownerName, EntityPlayer player, int damageToBeDone) - { - if (player.worldObj.isRemote) - { - return false; - } - - World world = player.worldObj; - if (world != null) - { - world.playSoundEffect((double) ((float) player.posX + 0.5F), (double) ((float) player.posY + 0.5F), (double) ((float) player.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - } - - int amount = SoulNetworkHandler.syphonFromNetwork(ownerName, damageToBeDone); - - hurtPlayer(player, damageToBeDone - amount); - - return true; - } - - public static boolean canSyphonFromOnlyNetwork(ItemStack ist, int damageToBeDone) - { - if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) - { - String ownerName = ist.getTagCompound().getString("ownerName"); - - return canSyphonFromOnlyNetwork(ownerName, damageToBeDone); - } - - return false; - } - - public static boolean canSyphonFromOnlyNetwork(String ownerName, int damageToBeDone) - { - if (MinecraftServer.getServer() == null) - { - return false; - } - - World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); - - if (data == null) - { - data = new LifeEssenceNetwork(ownerName); - world.setItemData(ownerName, data); - } - - return data.currentEssence >= damageToBeDone; - } - - public static int getCurrentEssence(String ownerName) - { - if (MinecraftServer.getServer() == null) - { - return 0; - } - - World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); - - if (data == null) - { - data = new LifeEssenceNetwork(ownerName); - world.setItemData(ownerName, data); - } - - return data.currentEssence; - } - - public static void setCurrentEssence(String ownerName, int essence) - { - if (MinecraftServer.getServer() == null) - { - return; - } - - World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); - - if (data == null) - { - data = new LifeEssenceNetwork(ownerName); - world.setItemData(ownerName, data); - } - - data.currentEssence = essence; - data.markDirty(); - } - - /** - * A method to add to an owner's network up to a maximum value. - * - * @param ownerName - * @param addedEssence - * @param maximum - * @return amount added to the network - */ - public static int addCurrentEssenceToMaximum(String ownerName, int addedEssence, int maximum) - { - AddToNetworkEvent event = new AddToNetworkEvent(ownerName, addedEssence, maximum); - - if(MinecraftForge.EVENT_BUS.post(event)) - { - return 0; - } - - if (MinecraftServer.getServer() == null) - { - return 0; - } - - World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, event.ownerNetwork); - - if (data == null) - { - data = new LifeEssenceNetwork(event.ownerNetwork); - world.setItemData(event.ownerNetwork, data); - } - - int currEss = data.currentEssence; - - if (currEss >= event.maximum) - { - return 0; - } - - int newEss = Math.min(event.maximum, currEss + event.addedAmount); - if(event.getResult() != Event.Result.DENY) - { - data.currentEssence = newEss; - } - - return newEss - currEss; - } - - public static void hurtPlayer(EntityPlayer user, int energySyphoned) - { - if (energySyphoned < 100 && energySyphoned > 0) - { - if (!user.capabilities.isCreativeMode) - { - user.setHealth((user.getHealth() - 1)); - - if (user.getHealth() <= 0.0005f) - { - user.onDeath(DamageSource.generic); - } - } - } else if (energySyphoned >= 100) - { - if (!user.capabilities.isCreativeMode) - { - for (int i = 0; i < ((energySyphoned + 99) / 100); i++) - { - user.setHealth((user.getHealth() - 1)); - - if (user.getHealth() <= 0.0005f) - { - user.onDeath(DamageSource.generic); - break; - } - } - } - } - } - - public static void hurtPlayer(EntityPlayer user, float damage) - { - if (!user.capabilities.isCreativeMode) - { - user.setHealth((user.getHealth() - damage)); - - if (user.getHealth() <= 0.0005f) - { - user.onDeath(DamageSource.generic); - } - } - } - - public static void checkAndSetItemOwner(ItemStack item, EntityPlayer player) - { - checkAndSetItemPlayer(item, player); - } - - public static boolean checkAndSetItemPlayer(ItemStack item, EntityPlayer player) - { - if (item.hasTagCompound() && !item.getTagCompound().getString("ownerName").equals("")) return true; - - ItemBindEvent event = new ItemBindEvent(player, SoulNetworkHandler.getUsername(player), item); - - if(!MinecraftForge.EVENT_BUS.post(event)) - { - if (!item.hasTagCompound()) - { - item.setTagCompound(new NBTTagCompound()); - } - item.getTagCompound().setString("ownerName", event.key); - return true; - } - return false; - } - - public static void checkAndSetItemOwner(ItemStack item, String ownerName) - { - if (item.getTagCompound() == null) - { - item.setTagCompound(new NBTTagCompound()); - } - - if (item.getTagCompound().getString("ownerName").equals("")) - { - item.getTagCompound().setString("ownerName", ownerName); - } - } - - public static String getUsername(EntityPlayer player) - { - return player.getName(); - } - - public static EntityPlayer getPlayerForUsername(String str) - { - if (MinecraftServer.getServer() == null) - { - return null; - } - return MinecraftServer.getServer().getConfigurationManager().getPlayerByUsername(str); - } - - public static void causeNauseaToPlayer(ItemStack stack) - { - if (stack.getTagCompound() != null && !(stack.getTagCompound().getString("ownerName").equals(""))) - { - String ownerName = stack.getTagCompound().getString("ownerName"); - - SoulNetworkHandler.causeNauseaToPlayer(ownerName); - } - } - - public static void causeNauseaToPlayer(String ownerName) - { - EntityPlayer entityOwner = SoulNetworkHandler.getPlayerForUsername(ownerName); - - if (entityOwner == null) - { - return; - } - - entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - - public static String getOwnerName(ItemStack item) - { - if (item.getTagCompound() == null) - { - item.setTagCompound(new NBTTagCompound()); - } - - return item.getTagCompound().getString("ownerName"); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java deleted file mode 100644 index 452085ec..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java +++ /dev/null @@ -1,377 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -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.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; -import net.minecraftforge.fml.common.registry.GameRegistry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; - -public class APISpellHelper -{ - /** - * Thanks Kihira! <3 - * @param player - * @return persistent data tag - */ - private static NBTTagCompound getPersistentDataTag(EntityPlayer player) - { - NBTTagCompound forgeData = player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG); - NBTTagCompound beaconData = forgeData.getCompoundTag("BloodMagic"); - - //Creates/sets the tags if they don't exist - if (!forgeData.hasKey("BloodMagic")) forgeData.setTag("BloodMagic", beaconData); - if (!player.getEntityData().hasKey(EntityPlayer.PERSISTED_NBT_TAG)) player.getEntityData().setTag(EntityPlayer.PERSISTED_NBT_TAG, forgeData); - - return beaconData; - } - - public static float getCurrentIncense(EntityPlayer player) - { - NBTTagCompound data = player.getEntityData(); - if(data.hasKey("BM:CurrentIncense")) - { - return data.getFloat("BM:CurrentIncense"); - } - - return 0; - } - - public static void setCurrentIncense(EntityPlayer player, float amount) - { - NBTTagCompound data = player.getEntityData(); - data.setFloat("BM:CurrentIncense", amount); - } - - public static int getPlayerLPTag(EntityPlayer player) - { - NBTTagCompound data = APISpellHelper.getPersistentDataTag(player); - if(data.hasKey("BM:StoredLP")) - { - return data.getInteger("BM:StoredLP"); - } - - return 0; - } - - public static void setPlayerLPTag(EntityPlayer player, int amount) - { - NBTTagCompound data = APISpellHelper.getPersistentDataTag(player); - data.setInteger("BM:StoredLP", amount); - } - - public static int getPlayerMaxLPTag(EntityPlayer player) - { - NBTTagCompound data = APISpellHelper.getPersistentDataTag(player); - if(data.hasKey("BM:MaxStoredLP")) - { - return data.getInteger("BM:MaxStoredLP"); - } - - return 0; - } - - public static void setPlayerMaxLPTag(EntityPlayer player, int amount) - { - NBTTagCompound data = APISpellHelper.getPersistentDataTag(player); - data.setInteger("BM:MaxStoredLP", amount); - } - - public static float getPlayerCurrentReagentAmount(EntityPlayer player) - { - NBTTagCompound data = APISpellHelper.getPersistentDataTag(player); - if(data.hasKey("BM:StoredReagentAmount")) - { - return data.getFloat("BM:StoredReagentAmount"); - } - - return 0; - } - - public static void setPlayerCurrentReagentAmount(EntityPlayer player, float amount) - { - NBTTagCompound data = APISpellHelper.getPersistentDataTag(player); - data.setFloat("BM:StoredReagentAmount", amount); - } - - public static float getPlayerMaxReagentAmount(EntityPlayer player) - { - NBTTagCompound data = APISpellHelper.getPersistentDataTag(player); - if(data.hasKey("BM:MaxReagentAmount")) - { - return data.getFloat("BM:MaxReagentAmount"); - } - - return 0; - } - - public static void setPlayerMaxReagentAmount(EntityPlayer player, float amount) - { - NBTTagCompound data = APISpellHelper.getPersistentDataTag(player); - data.setFloat("BM:MaxReagentAmount", amount); - } - - public static Reagent getPlayerReagentType(EntityPlayer player) - { - NBTTagCompound data = APISpellHelper.getPersistentDataTag(player); - if(data.hasKey("BM:ReagentType")) - { - return ReagentRegistry.getReagentForKey(data.getString("BM:ReagentType")); - } - - return null; - } - - public static void setPlayerReagentType(EntityPlayer player, String str) - { - NBTTagCompound data = APISpellHelper.getPersistentDataTag(player); - data.setString("BM:ReagentType", str); - } - - public static void setPlayerReagentType(EntityPlayer player, Reagent reagent) - { - setPlayerReagentType(player, ReagentRegistry.getKeyForReagent(reagent)); - } - - public static float getCurrentAdditionalHP(EntityPlayer player) - { - NBTTagCompound data = player.getEntityData(); - if(data.hasKey("BM:CurrentAddedHP")) - { - return data.getFloat("BM:CurrentAddedHP"); - } - - return 0; - } - - public static void setCurrentAdditionalHP(EntityPlayer player, float amount) - { - NBTTagCompound data = player.getEntityData(); - data.setFloat("BM:CurrentAddedHP", amount); - } - - public static float getCurrentAdditionalMaxHP(EntityPlayer player) - { - NBTTagCompound data = player.getEntityData(); - if(data.hasKey("BM:MaxAddedHP")) - { - return data.getFloat("BM:MaxAddedHP"); - } - - return 0; - } - - public static void setCurrentAdditionalMaxHP(EntityPlayer player, float maxHP) - { - NBTTagCompound data = player.getEntityData(); - data.setFloat("BM:MaxAddedHP", maxHP); - } - - public static int getPlayerReagentRegenCooldownTag(EntityPlayer player) - { - NBTTagCompound data = APISpellHelper.getPersistentDataTag(player); - if(data.hasKey("BM:ReagentRegenCooldown")) - { - return data.getInteger("BM:ReagentRegenCooldown"); - } - - return 0; - } - - public static void setPlayerReagentRegenCooldownTag(EntityPlayer player, int amount) - { - NBTTagCompound data = APISpellHelper.getPersistentDataTag(player); - data.setInteger("BM:ReagentRegenCooldown", amount); - } - - public static ItemStack getOrbForLevel(int level) - { - switch(level) - { - case 1: - return new ItemStack(ModItems.weakBloodOrb); - case 2: - return new ItemStack(ModItems.apprenticeBloodOrb); - case 3: - return new ItemStack(ModItems.magicianBloodOrb); - case 4: - return new ItemStack(ModItems.masterBloodOrb); - case 5: - return new ItemStack(ModItems.archmageBloodOrb); - case 6: - return new ItemStack(ModItems.transcendentBloodOrb); - default: - return new ItemStack(Blocks.fire); - } - } - - public static MovingObjectPosition raytraceFromEntity(World world, Entity player, boolean par3, double range) - { - float f = 1.0F; - float f1 = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * f; - float f2 = player.prevRotationYaw + (player.rotationYaw - player.prevRotationYaw) * f; - double d0 = player.prevPosX + (player.posX - player.prevPosX) * (double) f; - double d1 = player.prevPosY + (player.posY - player.prevPosY) * (double) f; - if (!world.isRemote && player instanceof EntityPlayer) - d1 += 1.62D; - double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f; - Vec3 vec3 = new Vec3(d0, d1, d2); - float f3 = MathHelper.cos(-f2 * 0.017453292F - (float) Math.PI); - float f4 = MathHelper.sin(-f2 * 0.017453292F - (float) Math.PI); - float f5 = -MathHelper.cos(-f1 * 0.017453292F); - float f6 = MathHelper.sin(-f1 * 0.017453292F); - float f7 = f4 * f5; - float f8 = f3 * f5; -// if (player instanceof EntityPlayerMP) - { -// d3 = ((EntityPlayerMP) player).theItemInWorldManager.getBlockReachDistance(); - } - Vec3 vec31 = vec3.addVector((double) f7 * range, (double) f6 * range, (double) f8 * range); - return world.rayTraceBlocks(vec3, vec31, par3, !par3, par3); - } - - public static List getItemsFromBlock(World world, BlockPos pos, Block block, IBlockState state, boolean silkTouch, int fortune) - { - boolean canSilk = block.canSilkHarvest(world, pos, state, null); //Null player - - if (canSilk && silkTouch) - { - ArrayList items = new ArrayList(); - ItemStack item = new ItemStack(block, 1, block.getMetaFromState(state)); - - items.add(item); - - return items; - } else - { - return block.getDrops(world, pos, state, fortune); - } - } - - public static void spawnItemListInWorld(List items, World world, float x, float y, float z) - { - for (ItemStack stack : items) - { - EntityItem itemEntity = new EntityItem(world, x, y, z, stack); - itemEntity.setDefaultPickupDelay(); - world.spawnEntityInWorld(itemEntity); - } - } - - public static String getNumeralForInt(int num) - { - switch (num) - { - case 1: - return "I"; - case 2: - return "II"; - case 3: - return "III"; - case 4: - return "IV"; - case 5: - return "V"; - case 6: - return "VI"; - case 7: - return "VII"; - case 8: - return "VIII"; - case 9: - return "IX"; - case 10: - return "X"; - default: - return ""; - } - } - - public static Block getBlockForString(String str) - { - String[] parts = str.split(":"); - String modId = parts[0]; - String name = parts[1]; - return GameRegistry.findBlock(modId, name); - } - - public static Item getItemForString(String str) - { - String[] parts = str.split(":"); - String modId = parts[0]; - String name = parts[1]; - return GameRegistry.findItem(modId, name); - } - - public static ItemStack getItemStackForString(String str) - { - String[] parts = str.split(":"); - int meta = 0; - if(parts.length >= 3) - { - meta = Integer.decode(parts[2]); - }else if(parts.length < 2) - { - return null; - } - String modId = parts[0]; - String name = parts[1]; - - String itemString = modId + ":" + name; - Item item = APISpellHelper.getItemForString(itemString); - if(item != null) - { - return new ItemStack(item, 1, meta); - } - - Block block = APISpellHelper.getBlockForString(itemString); - if(block != null) - { - return new ItemStack(block, 1, meta); - } - - return null; - } - - 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! - } - List craftingList = CraftingManager.getInstance().getRecipeList(); - for(Object posRecipe : craftingList) - { - 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)) - { - return (IRecipe)posRecipe; - } - } - } - } - - return null; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellEffect.java deleted file mode 100644 index 26bcfc25..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellEffect.java +++ /dev/null @@ -1,92 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - - -public abstract class ComplexSpellEffect -{ - public final ComplexSpellType type; - public final ComplexSpellModifier modifier; - - protected int powerEnhancement; - protected int costEnhancement; - protected int potencyEnhancement; - - public ComplexSpellEffect(ComplexSpellType type, ComplexSpellModifier modifier) - { - this.type = type; - this.modifier = modifier; - } - - public ComplexSpellEffect(ComplexSpellType type, ComplexSpellModifier modifier, int power, int cost, int potency) - { - this(type, modifier); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - public abstract void modifyParadigm(SpellParadigm parad); - - public ComplexSpellType getType() - { - return this.type; - } - - public ComplexSpellModifier getModifier() - { - return this.modifier; - } - - public abstract ComplexSpellEffect copy(int power, int cost, int potency); - - public abstract int getCostOfEffect(); - -// 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; -// } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellModifier.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellModifier.java deleted file mode 100644 index 537a5e2b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellModifier.java +++ /dev/null @@ -1,9 +0,0 @@ -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(); - public static ComplexSpellModifier ENVIRONMENTAL = new ComplexSpellModifier(); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellType.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellType.java deleted file mode 100644 index 1c308a81..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ComplexSpellType.java +++ /dev/null @@ -1,9 +0,0 @@ -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(); - public static ComplexSpellType WIND = new ComplexSpellType(); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java deleted file mode 100644 index c4afda4e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java +++ /dev/null @@ -1,620 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.IProjectile; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; -import net.minecraftforge.common.util.Constants; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -public class EntitySpellProjectile extends Entity implements IProjectile -{ - private int xTile = -1; - private int yTile = -1; - private int zTile = -1; - private int inTile = 0; - private int inData = 0; - private boolean inGround = false; - /** - * The owner of this arrow. - */ - public EntityPlayer shootingEntity; - private int ticksInAir = 0; - private int ricochetCounter = 0; - private boolean scheduledForDeath = false; - private boolean isSilkTouch = false; - - //Custom variables - private int maxRicochet = 0; - private float damage = 1; - public List impactList = new ArrayList(); - private boolean penetration = false; - public List updateEffectList = new ArrayList(); - public List spellEffectList = new LinkedList(); - private int blocksBroken = 0; - - public EntitySpellProjectile(World par1World) - { - super(par1World); - this.setSize(0.5F, 0.5F); - } - - public EntitySpellProjectile(World par1World, double par2, double par4, double par6) - { - super(par1World); - this.setSize(0.5F, 0.5F); - this.setPosition(par2, par4, par6); - } - - public EntitySpellProjectile(World par1World, EntityPlayer par2EntityPlayer) - { - super(par1World); - shootingEntity = par2EntityPlayer; - float par3 = 0.8F; - this.setSize(0.1F, 0.1F); - this.setLocationAndAngles(par2EntityPlayer.posX, par2EntityPlayer.posY + par2EntityPlayer.getEyeHeight(), par2EntityPlayer.posZ, par2EntityPlayer.rotationYaw, par2EntityPlayer.rotationPitch); - posX -= MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; - posY -= 0.2D; - posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; - this.setPosition(posX, posY, posZ); - motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); - motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); - motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); - this.setThrowableHeading(motionX, motionY, motionZ, par3 * 1.5F, 1.0F); - - } - - @Override - protected void entityInit() - { - dataWatcher.addObject(16, 0); - } - - /** - * 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) - { - float var9 = MathHelper.sqrt_double(var1 * var1 + var3 * var3 + var5 * var5); - var1 /= var9; - var3 /= var9; - var5 /= var9; - var1 += rand.nextGaussian() * 0.007499999832361937D * var8; - var3 += rand.nextGaussian() * 0.007499999832361937D * var8; - var5 += rand.nextGaussian() * 0.007499999832361937D * var8; - var1 *= var7; - var3 *= var7; - var5 *= var7; - motionX = var1; - motionY = var3; - motionZ = var5; - float var10 = MathHelper.sqrt_double(var1 * var1 + var5 * var5); - prevRotationYaw = rotationYaw = (float) (Math.atan2(var1, var5) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch = (float) (Math.atan2(var3, var10) * 180.0D / Math.PI); - } - - @Override - @SideOnly(Side.CLIENT) - /** - * Sets the velocity to the args. Args: x, y, z - */ - public void setVelocity(double par1, double par3, double par5) - { - motionX = par1; - motionY = par3; - motionZ = par5; - if (prevRotationPitch == 0.0F && prevRotationYaw == 0.0F) - { - float var7 = MathHelper.sqrt_double(par1 * par1 + par5 * par5); - prevRotationYaw = rotationYaw = (float) (Math.atan2(par1, par5) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch = (float) (Math.atan2(par3, var7) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch; - prevRotationYaw = rotationYaw; - this.setLocationAndAngles(posX, posY, posZ, rotationYaw, rotationPitch); - } - } - - /** - * Called to update the entity's position/logic. - */ - @Override - public void onUpdate() - { - super.onUpdate(); - this.performUpdateEffects(); - if (ticksInAir > 600) - { - this.setDead(); - } - if (shootingEntity == null) - { - List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(posX - 1, posY - 1, posZ - 1, posX + 1, posY + 1, posZ + 1)); - Iterator i = players.iterator(); - double closestDistance = Double.MAX_VALUE; - EntityPlayer closestPlayer = null; - while (i.hasNext()) - { - EntityPlayer e = (EntityPlayer) i.next(); - double distance = e.getDistanceToEntity(this); - if (distance < closestDistance) - { - closestPlayer = e; - } - } - if (closestPlayer != null) - { - shootingEntity = closestPlayer; - } - } - if (prevRotationPitch == 0.0F && prevRotationYaw == 0.0F) - { - float var1 = MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ); - prevRotationYaw = rotationYaw = (float) (Math.atan2(motionX, motionZ) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch = (float) (Math.atan2(motionY, var1) * 180.0D / Math.PI); - } - IBlockState state = worldObj.getBlockState(new BlockPos(xTile, yTile, zTile)); - Block var16 = state.getBlock(); - - if (var16 != null) - { - var16.setBlockBoundsBasedOnState(worldObj, new BlockPos(xTile, yTile, zTile)); - AxisAlignedBB var2 = var16.getCollisionBoundingBox(worldObj, new BlockPos(xTile, yTile, zTile), state); - - if (var2 != null && var2.isVecInside(new Vec3(posX, posY, posZ))) - { - inGround = true; - } - } - - if (inGround) - { - - } else - { - ++ticksInAir; - - if (ticksInAir > 1 && ticksInAir < 3) - { - //worldObj.spawnParticle("flame", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0D, 0D, 0D); - for (int particles = 0; particles < 3; particles++) - { - this.doFiringParticles(); - } - } - - Vec3 var17 = new Vec3(posX, posY, posZ); - Vec3 var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ); - MovingObjectPosition var4 = worldObj.rayTraceBlocks(var17, var3, true, false, false); - var17 = new Vec3(posX, posY, posZ); - var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ); - - if (var4 != null) - { - var3 = new Vec3(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord); - } - - Entity var5 = null; - List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(this, getBoundingBox().addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); - double var7 = 0.0D; - Iterator var9 = var6.iterator(); - float var11; - - while (var9.hasNext()) - { - Entity var10 = (Entity) var9.next(); - - if (var10.canBeCollidedWith() && (var10 != shootingEntity || ticksInAir >= 5)) - { - var11 = 0.3F; - AxisAlignedBB var12 = var10.getBoundingBox().expand(var11, var11, var11); - MovingObjectPosition var13 = var12.calculateIntercept(var17, var3); - - if (var13 != null) - { - double var14 = var17.distanceTo(var13.hitVec); - - if (var14 < var7 || var7 == 0.0D) - { - var5 = var10; - var7 = var14; - } - } - } - } - - if (var5 != null) - { - var4 = new MovingObjectPosition(var5); - } - - if (var4 != null) - { - this.onImpact(var4); - - if (scheduledForDeath) - { - this.setDead(); - } - } - - posX += motionX; - posY += motionY; - posZ += motionZ; - MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ); - this.setPosition(posX, posY, posZ); - //this.doBlockCollisions(); - } - } - - private void doFlightParticles() - { - if (ticksInAir % 3 == 0) - { - double gauss = gaussian(1.0F); - worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB, posX, posY, posZ, gauss, gauss, 0.0F); - } - } - - private void doFiringParticles() - { - worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - worldObj.spawnParticle(EnumParticleTypes.FLAME, posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - @Override - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - par1NBTTagCompound.setShort("xTile", (short) xTile); - par1NBTTagCompound.setShort("yTile", (short) yTile); - par1NBTTagCompound.setShort("zTile", (short) zTile); - par1NBTTagCompound.setByte("inTile", (byte) inTile); - par1NBTTagCompound.setByte("inData", (byte) inData); - par1NBTTagCompound.setByte("inGround", (byte) (inGround ? 1 : 0)); - - NBTTagList effectList = new NBTTagList(); - - for (SpellEffect eff : spellEffectList) - { - effectList.appendTag(eff.getTag()); - } - - par1NBTTagCompound.setTag("Effects", effectList); - par1NBTTagCompound.setInteger("blocksBroken", blocksBroken); - par1NBTTagCompound.setBoolean("isSilkTouch", isSilkTouch); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - @Override - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - xTile = par1NBTTagCompound.getShort("xTile"); - yTile = par1NBTTagCompound.getShort("yTile"); - zTile = par1NBTTagCompound.getShort("zTile"); - inTile = par1NBTTagCompound.getByte("inTile") & 255; - inData = par1NBTTagCompound.getByte("inData") & 255; - inGround = par1NBTTagCompound.getByte("inGround") == 1; - blocksBroken = par1NBTTagCompound.getInteger("blocksBroken"); - isSilkTouch = par1NBTTagCompound.getBoolean("isSilkTouch"); - - NBTTagList tagList = par1NBTTagCompound.getTagList("Effects", Constants.NBT.TAG_COMPOUND); - - List spellEffectList = new LinkedList(); - for (int i = 0; i < tagList.tagCount(); i++) - { - NBTTagCompound tag = tagList.getCompoundTagAt(i); - - SpellEffect eff = SpellEffect.getEffectFromTag(tag); - if (eff != null) - { - spellEffectList.add(eff); - } - } - this.spellEffectList = spellEffectList; - - -// this.effectList = new LinkedList(); -// for (int i = 0; i < tagList.tagCount(); i++) -// { -// NBTTagCompound tag = (NBTTagCompound) tagList.tagAt(i); -// -// this.effectList.add(tag.getString("Class")); -// } - - //SpellParadigmProjectile parad = SpellParadigmProjectile.getParadigmForStringArray(effectList); - SpellParadigmProjectile parad = SpellParadigmProjectile.getParadigmForEffectArray(spellEffectList); - parad.applyAllSpellEffects(); - parad.prepareProjectile(this); - } - - /** - * 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() - { - return false; - } - - /** - * Sets the amount of knockback the arrow applies when it hits a mob. - */ - public void setKnockbackStrength(int par1) - { - } - - /** - * If returns false, the item will not inflict any damage against entities. - */ - @Override - public boolean canAttackWithItem() - { - return false; - } - - /** - * Whether the arrow has a stream of critical hit particles flying behind - * it. - */ - public void setIsCritical(boolean par1) - { - byte var2 = dataWatcher.getWatchableObjectByte(16); - if (par1) - { - dataWatcher.updateObject(16, var2 | 1); - } else - { - dataWatcher.updateObject(16, var2 & -2); - } - } - - /** - * Whether the arrow has a stream of critical hit particles flying behind - * it. - */ - public boolean getIsCritical() - { - byte var1 = dataWatcher.getWatchableObjectByte(16); - return (var1 & 1) != 0; - } - - private void onImpact(MovingObjectPosition mop) - { - if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) - { - if (mop.entityHit == shootingEntity) return; - this.onImpact(mop.entityHit); - this.performEntityImpactEffects(mop.entityHit); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - if (!this.penetration) - { - this.groundImpact(mop.field_178784_b); - this.performTileImpactEffects(mop); - } - } - } - - private void onImpact(Entity mop) //TODO - { - if (mop == shootingEntity && ticksInAir > 3) - { - shootingEntity.attackEntityFrom(DamageSource.causePlayerDamage(shootingEntity), 1); - this.setDead(); - } else - { - doDamage(this.damage, mop); - } - spawnHitParticles("exorcism", 8); - this.setDead(); - } - - - private void spawnHitParticles(String string, int i) - { - for (int particles = 0; particles < i; particles++) - { - worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), posGauss(1.0F), posGauss(1.0F), 0.0F); - } - } - - private void doDamage(float f, Entity mop) - { - mop.attackEntityFrom(this.getDamageSource(), f); - } - - private DamageSource getDamageSource() - { - return DamageSource.causePlayerDamage(shootingEntity); - } - - private void groundImpact(EnumFacing sideHit) - { - this.ricochet(sideHit); - } - - private double smallGauss(double d) - { - return (worldObj.rand.nextFloat() - 0.5D) * d; - } - - private double posGauss(double d) - { - return rand.nextFloat() * 0.5D * d; - } - - private double gaussian(double d) - { - return d + d * ((rand.nextFloat() - 0.5D) / 4); - } - - private void ricochet(EnumFacing sideHit) - { - switch (sideHit) - { - case UP: - case DOWN: - // topHit, bottomHit, reflect Y - motionY = motionY * -1; - break; - case WEST: - case EAST: - // westHit, eastHit, reflect Z - motionZ = motionZ * -1; - break; - case SOUTH: - case NORTH: - // southHit, northHit, reflect X - motionX = motionX * -1; - break; - } - ricochetCounter++; - if (ricochetCounter > this.getRicochetMax()) - { - scheduledForDeath = true; - for (int particles = 0; particles < 4; particles++) - { - switch (sideHit) - { - case UP: - worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), -gaussian(0.1D), gaussian(0.1D)); - break; - case DOWN: - worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); - break; - case NORTH: - worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), -gaussian(0.1D)); - break; - case SOUTH: - worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); - break; - case WEST: - worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, -gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); - break; - case EAST: - worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); - break; - } - } - } - } - - //Custom stuff - public int getRicochetMax() - { - return this.maxRicochet; - } - - public void setRicochetMax(int ricochet) - { - this.maxRicochet = ricochet; - } - - public void setImpactList(List list) - { - this.impactList = list; - } - - public void setUpdateEffectList(List list) - { - this.updateEffectList = list; - } - - private void performEntityImpactEffects(Entity mop) - { - if (impactList != null) - { - for (IProjectileImpactEffect impactEffect : impactList) - { - impactEffect.onEntityImpact(mop, this); - } - } - } - - private void performTileImpactEffects(MovingObjectPosition mop) - { - if (impactList != null) - { - for (IProjectileImpactEffect impactEffect : impactList) - { - impactEffect.onTileImpact(worldObj, mop); - } - } - } - - private void performUpdateEffects() - { - if (updateEffectList != null) - { - for (IProjectileUpdateEffect updateEffect : updateEffectList) - { - updateEffect.onUpdateEffect(this); - } - } - } - - public void setPenetration(boolean penetration) - { - this.penetration = penetration; - } - - public float getDamage() - { - return this.damage; - } - - public void setDamage(float damage) - { - this.damage = damage; - } - - public void setSpellEffectList(List list) - { - this.spellEffectList = list; - } - - public int getBlocksBroken() - { - return this.blocksBroken; - } - - public void setBlocksBroken(int blocksBroken) - { - this.blocksBroken = blocksBroken; - } - - public boolean getIsSilkTouch() - { - return this.isSilkTouch; - } - - public void setIsSilkTouch(boolean bool) - { - this.isSilkTouch = bool; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ExtrapolatedMeleeEntityEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ExtrapolatedMeleeEntityEffect.java deleted file mode 100644 index b5c58751..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ExtrapolatedMeleeEntityEffect.java +++ /dev/null @@ -1,72 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; - -import java.util.List; - -public abstract class ExtrapolatedMeleeEntityEffect implements IMeleeSpellEntityEffect -{ - protected float range; - protected float radius; - protected int powerUpgrades; - protected int potencyUpgrades; - protected int costUpgrades; - protected int maxHit; - - public ExtrapolatedMeleeEntityEffect(int power, int potency, int cost) - { - this.powerUpgrades = power; - this.potencyUpgrades = potency; - this.costUpgrades = cost; - this.range = 0; - this.radius = 0; - this.maxHit = 1; - } - - @Override - public void onEntityImpact(World world, EntityPlayer entityPlayer) - { - Vec3 lookVec = entityPlayer.getLook(range); - double x = entityPlayer.posX + lookVec.xCoord; - double y = entityPlayer.posY + entityPlayer.getEyeHeight() + lookVec.yCoord; - double z = entityPlayer.posZ + lookVec.zCoord; - - List entities = world.getEntitiesWithinAABB(Entity.class, new AxisAlignedBB(x - 0.5f, y - 0.5f, z - 0.5f, x + 0.5f, y + 0.5f, z + 0.5f).expand(radius, radius, radius)); - int hit = 0; - - if (entities != null) - { - for (Entity entity : entities) - { - if (hit < maxHit && !entity.equals(entityPlayer)) - { - if (this.entityEffect(world, entity, entityPlayer)) - { - hit++; - } - } - } - } - } - - protected abstract boolean entityEffect(World world, Entity entity, EntityPlayer player); - - public void setRange(float range) - { - this.range = range; - } - - public void setRadius(float radius) - { - this.radius = radius; - } - - public void setMaxNumberHit(int maxHit) - { - this.maxHit = maxHit; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IDigAreaEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IDigAreaEffect.java deleted file mode 100644 index 07939312..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IDigAreaEffect.java +++ /dev/null @@ -1,12 +0,0 @@ -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; - -public interface IDigAreaEffect -{ - 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 deleted file mode 100644 index eb9b766b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IItemManipulator.java +++ /dev/null @@ -1,10 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -import net.minecraft.item.ItemStack; - -import java.util.List; - -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 deleted file mode 100644 index 5683998b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ILeftClickEffect.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -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 deleted file mode 100644 index 4e1608cc..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IMeleeSpellEntityEffect.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -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 deleted file mode 100644 index 9be8966b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IMeleeSpellWorldEffect.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -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 deleted file mode 100644 index d69396ba..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBanishTool.java +++ /dev/null @@ -1,10 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -import net.minecraft.entity.Entity; -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 deleted file mode 100644 index 6c8fbaa7..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBreakBlock.java +++ /dev/null @@ -1,14 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; - -public interface IOnBreakBlock -{ - int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, IBlockState state, BlockPos pos, EnumFacing sideBroken); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnSummonTool.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnSummonTool.java deleted file mode 100644 index e1a599a7..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnSummonTool.java +++ /dev/null @@ -1,10 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -import net.minecraft.entity.Entity; -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 deleted file mode 100644 index 93215506..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IProjectileImpactEffect.java +++ /dev/null @@ -1,12 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -import net.minecraft.entity.Entity; -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 deleted file mode 100644 index 958a83e7..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IProjectileUpdateEffect.java +++ /dev/null @@ -1,8 +0,0 @@ -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/IRightClickEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IRightClickEffect.java deleted file mode 100644 index b779b110..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IRightClickEffect.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -public interface IRightClickEffect -{ - //public abstract int onRightClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder); - - int onRightClickBlock(ItemStack stack, EntityLivingBase weilder, World world, MovingObjectPosition mop); - - int onRightClickAir(ItemStack stack, EntityLivingBase weilder); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ISelfSpellEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ISelfSpellEffect.java deleted file mode 100644 index 5bb25de3..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ISelfSpellEffect.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -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 deleted file mode 100644 index f60024b2..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ISpecialDamageEffect.java +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 92b7745a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IToolUpdateEffect.java +++ /dev/null @@ -1,10 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -import net.minecraft.entity.Entity; -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 deleted file mode 100644 index bccfe653..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellCenteredWorldEffect.java +++ /dev/null @@ -1,36 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; -import net.minecraft.util.MathHelper; -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) - { - super(power, potency, cost); - } - - @Override - public void onWorldEffect(World world, EntityPlayer entityPlayer) - { - Vec3 lookVec = entityPlayer.getLook(range).normalize(); - - int x = MathHelper.floor_double(entityPlayer.posX + lookVec.xCoord * range); - int y = MathHelper.floor_double(entityPlayer.posY + entityPlayer.getEyeHeight() + lookVec.yCoord * range); - int z = MathHelper.floor_double(entityPlayer.posZ + lookVec.zCoord * range); - - this.onCenteredWorldEffect(entityPlayer, world, new BlockPos(x, y, z)); - } - - public void setRange(float range) - { - this.range = range; - } - - public abstract void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellWorldEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellWorldEffect.java deleted file mode 100644 index 844b5400..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellWorldEffect.java +++ /dev/null @@ -1,21 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -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; - - public MeleeSpellWorldEffect(int power, int potency, int cost) - { - this.powerUpgrades = power; - this.potencyUpgrades = potency; - this.costUpgrades = cost; - } - - @Override - public abstract void onWorldEffect(World world, EntityPlayer entityPlayer); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ProjectileImpactEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ProjectileImpactEffect.java deleted file mode 100644 index 22ef5db8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ProjectileImpactEffect.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -public abstract class ProjectileImpactEffect implements IProjectileImpactEffect -{ - protected int powerUpgrades; - protected int potencyUpgrades; - protected int costUpgrades; - - public ProjectileImpactEffect(int power, int potency, int cost) - { - this.powerUpgrades = power; - this.potencyUpgrades = potency; - this.costUpgrades = cost; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ProjectileUpdateEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ProjectileUpdateEffect.java deleted file mode 100644 index 500e7cfb..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ProjectileUpdateEffect.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -public abstract class ProjectileUpdateEffect implements IProjectileUpdateEffect -{ - protected int powerUpgrades; - protected int potencyUpgrades; - protected int costUpgrades; - - public ProjectileUpdateEffect(int power, int potency, int cost) - { - this.powerUpgrades = power; - this.potencyUpgrades = potency; - this.costUpgrades = cost; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SelfSpellEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SelfSpellEffect.java deleted file mode 100644 index 5e9e356d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SelfSpellEffect.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -public abstract class SelfSpellEffect implements ISelfSpellEffect -{ - protected int powerUpgrades; - protected int potencyUpgrades; - protected int costUpgrades; - - public SelfSpellEffect(int power, int potency, int cost) - { - this.powerUpgrades = power; - this.potencyUpgrades = potency; - this.costUpgrades = cost; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffect.java deleted file mode 100644 index 1ae52ba6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffect.java +++ /dev/null @@ -1,500 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -import net.minecraft.nbt.NBTTagCompound; - -/** - * New wrapper class to enclose the ComplexSpellEffect - */ -public class SpellEffect -{ - public ComplexSpellType type; - public ComplexSpellModifier modifier; - - protected int powerEnhancement; - protected int costEnhancement; - protected int potencyEnhancement; - - public SpellEffect() - { - this(ComplexSpellType.FIRE); - } - - public SpellEffect(ComplexSpellType type) - { - this(type, ComplexSpellModifier.DEFAULT); - } - - public SpellEffect(ComplexSpellType type, ComplexSpellModifier modifier) - { - this.type = type; - this.modifier = modifier; - - this.powerEnhancement = 0; - this.potencyEnhancement = 0; - this.costEnhancement = 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(ComplexSpellModifier mod) - { - if(mod != null) - { - this.modifier = mod; - } - } - - 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); - - if(effect != null) - { - effect.modifyParadigm(parad); - } - } - - public int getCostOfEffect(SpellParadigm parad) - { - if(parad == null) - { - return 0; - } - - Class paraClass = parad.getClass(); - - ComplexSpellEffect effect = SpellEffectRegistry.getSpellEffect(paraClass, type, modifier, powerEnhancement, potencyEnhancement, costEnhancement); - - if(effect == null) - { - return 0; - } - - return effect.getCostOfEffect(); - } - - public NBTTagCompound getTag() - { - NBTTagCompound tag = new NBTTagCompound(); - - tag.setString("Class", this.getClass().getName()); - tag.setString("type", SpellEffectRegistry.getKeyForType(type)); - tag.setString("modifier", SpellEffectRegistry.getKeyForModifier(modifier)); - 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.type = SpellEffectRegistry.getTypeForKey(tag.getString("type")); - eff.modifier = SpellEffectRegistry.getModifierForKey(tag.getString("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 int getPowerEnhancements() - { - return this.powerEnhancement; - } - - public int getPotencyEnhancements() - { - return this.potencyEnhancement; - } - - public int getCostEnhancements() - { - return this.costEnhancement; - } -} - -//package WayofTime.alchemicalWizardry.common.spell.complex.effect; -// -//import WayofTime.alchemicalWizardry.common.spell.complex.*; -//import WayofTime.alchemicalWizardry.common.spell.complex.enhancement.SpellEnhancement; -//import net.minecraft.nbt.NBTTagCompound; -// -//public abstract class SpellEffect -//{ -// 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; -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffectRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffectRegistry.java deleted file mode 100644 index fcdd82f5..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffectRegistry.java +++ /dev/null @@ -1,157 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -public class SpellEffectRegistry -{ - public static Map, List> effectRegistry = new HashMap, List>(); - public static Map typeRegistry = new HashMap(); - public static Map modifierRegistry = new HashMap(); - - public static void registerSpellEffect(Class paraClass, ComplexSpellEffect effect) - { - if(paraClass == null || effect == null) - { - return; - } - - if(effectRegistry.containsKey(paraClass)) - { - List effectList = effectRegistry.get(paraClass); - ComplexSpellType type = effect.getType(); - ComplexSpellModifier modifier = effect.getModifier(); - - if(type == null || modifier == null) - { - return; - } - - for(ComplexSpellEffect eff : effectList) - { - if(type.equals(eff.getType()) && modifier.equals(eff.getModifier())) - { - effectList.remove(eff); - effectList.add(effect); - return; - } - } - - effectList.add(effect); - }else - { - List effectList = new LinkedList(); - effectList.add(effect); - effectRegistry.put(paraClass, effectList); - } - } - - /** - * - * @param paraClass - * @param type - * @param mod - * @return A copy of the spell effect - */ - 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) - { - if(paraClass == null || type == null || mod == null) - { - return null; - } - - List list = effectRegistry.get(paraClass); - - if(list == null || list.isEmpty()) - { - return null; - } - - for(ComplexSpellEffect effect : list) - { - if(effect != null && type.equals(effect.type) && mod.equals(effect.modifier)) - { - return effect.copy(power, cost, potency); - } - } - - return null; - } - - public static void registerSpellType(String key, ComplexSpellType type) - { - typeRegistry.put(key, type); - } - - public static void registerSpellModifier(String key, ComplexSpellModifier modifier) - { - modifierRegistry.put(key, modifier); - } - - public static ComplexSpellType getTypeForKey(String key) - { - return typeRegistry.get(key); - } - - public static String getKeyForType(ComplexSpellType type) - { - if(type == null) - { - return ""; - } - - for(Entry entry : typeRegistry.entrySet()) - { - if(type.equals(entry.getValue())) - { - return entry.getKey(); - } - } - - return ""; - } - - public static ComplexSpellModifier getModifierForKey(String key) - { - return modifierRegistry.get(key); - } - - public static String getKeyForModifier(ComplexSpellModifier modifier) - { - if(modifier == null) - { - return ""; - } - - for(Entry entry : modifierRegistry.entrySet()) - { - if(modifier.equals(entry.getValue())) - { - return entry.getKey(); - } - } - - return ""; - } - - public static void initiateRegistry() - { - SpellEffectRegistry.registerSpellType("FIRE", ComplexSpellType.FIRE); - SpellEffectRegistry.registerSpellType("ICE", ComplexSpellType.ICE); - SpellEffectRegistry.registerSpellType("EARTH", ComplexSpellType.EARTH); - SpellEffectRegistry.registerSpellType("WIND", ComplexSpellType.WIND); - - SpellEffectRegistry.registerSpellModifier("DEFAULT", ComplexSpellModifier.DEFAULT); - SpellEffectRegistry.registerSpellModifier("OFFENSIVE", ComplexSpellModifier.OFFENSIVE); - SpellEffectRegistry.registerSpellModifier("DEFENSIVE", ComplexSpellModifier.DEFENSIVE); - SpellEffectRegistry.registerSpellModifier("ENVIRONMENTAL", ComplexSpellModifier.ENVIRONMENTAL); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancement.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancement.java deleted file mode 100644 index a7cb6b40..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancement.java +++ /dev/null @@ -1,20 +0,0 @@ -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; - - private int state = POWER; - - protected SpellEnhancement(int state) - { - this.state = state; - } - - public int getState() - { - return this.state; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementCost.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementCost.java deleted file mode 100644 index a5ea252d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementCost.java +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index 00ffc98f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementPotency.java +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index d6e27d20..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEnhancementPower.java +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index 4f72d4ff..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigm.java +++ /dev/null @@ -1,131 +0,0 @@ -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) - { - if (effect != null) - { - this.bufferedEffectList.add(effect); - } - } - - public void modifyBufferedEffect(ComplexSpellModifier modifier) - { - SpellEffect effect = this.getBufferedEffect(); - if (effect != null) - { - effect.modifyEffect(modifier); - } - } - - public void applyEnhancement(SpellEnhancement enh) - { - if (enh != null) - { - if (bufferedEffectList.isEmpty()) - { - this.enhanceParadigm(enh); - } else - { - SpellEffect effect = this.getBufferedEffect(); - if (effect != null) - { - effect.enhanceEffect(enh); - } - } - } - - } - - public abstract void enhanceParadigm(SpellEnhancement enh); - - public abstract void castSpell(World world, EntityPlayer entityPlayer, ItemStack itemStack); - - public void applySpellEffect(SpellEffect effect) - { - effect.modifyParadigm(this); - } - - public void applyAllSpellEffects() - { - for (SpellEffect effect : bufferedEffectList) - { - this.applySpellEffect(effect); - } - } - - public SpellEffect getBufferedEffect() - { - if (bufferedEffectList.isEmpty()) - { - return null; - } else - { - return bufferedEffectList.get(bufferedEffectList.size() - 1); - } - } - - public int getTotalCost() - { - int cost = 0; - if (this.bufferedEffectList != null && !this.bufferedEffectList.isEmpty()) - { - for(SpellEffect effect : bufferedEffectList) - { - cost += effect.getCostOfEffect(this); - } - - return (int) (cost * Math.sqrt(this.bufferedEffectList.size())); - } - - return getDefaultCost(); - } - - public abstract int getDefaultCost(); - - public int getBufferedEffectPower() - { - SpellEffect eff = this.getBufferedEffect(); - - if (eff != null) - { - return eff.getPowerEnhancements(); - } - - return 0; - } - - public int getBufferedEffectCost() - { - SpellEffect eff = this.getBufferedEffect(); - - if (eff != null) - { - return eff.getCostEnhancements(); - } - - return 0; - } - - public int getBufferedEffectPotency() - { - SpellEffect eff = this.getBufferedEffect(); - - if (eff != null) - { - return eff.getPotencyEnhancements(); - } - - return 0; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmMelee.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmMelee.java deleted file mode 100644 index 12023f7a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmMelee.java +++ /dev/null @@ -1,67 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -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; - - public SpellParadigmMelee() - { - this.entityEffectList = new ArrayList(); - this.worldEffectList = new ArrayList(); - } - - @Override - public void enhanceParadigm(SpellEnhancement enh) {} - - @Override - public void castSpell(World world, EntityPlayer entityPlayer, ItemStack itemStack) - { - int cost = this.getTotalCost(); - - if(!SoulNetworkHandler.syphonAndDamageFromNetwork(itemStack, entityPlayer, cost)) - { - return; - } - - for (IMeleeSpellEntityEffect effect : entityEffectList) - { - effect.onEntityImpact(world, entityPlayer); - } - - for (IMeleeSpellWorldEffect effect : worldEffectList) - { - effect.onWorldEffect(world, entityPlayer); - } - } - - public void addEntityEffect(IMeleeSpellEntityEffect eff) - { - if (eff != null) - { - this.entityEffectList.add(eff); - } - } - - public void addWorldEffect(IMeleeSpellWorldEffect eff) - { - if (eff != null) - { - this.worldEffectList.add(eff); - } - } - - @Override - public int getDefaultCost() - { - return 0; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmProjectile.java deleted file mode 100644 index f1a33800..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmProjectile.java +++ /dev/null @@ -1,101 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -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; - public List impactList; - public List updateEffectList; - public boolean penetration; - public int ricochetMax; - public boolean isSilkTouch; - - public SpellParadigmProjectile() - { - this.damageSource = DamageSource.generic; - this.damage = 1; - this.cost = 0; - this.impactList = new ArrayList(); - this.updateEffectList = new ArrayList(); - this.penetration = false; - this.ricochetMax = 0; - this.isSilkTouch = false; - } - - @Override - public void enhanceParadigm(SpellEnhancement enh) - { - - } - - @Override - public void castSpell(World world, EntityPlayer entityPlayer, ItemStack itemStack) - { - int cost = this.getTotalCost(); - - if(!SoulNetworkHandler.syphonAndDamageFromNetwork(itemStack, entityPlayer, cost)) - { - return; - } - - EntitySpellProjectile proj = new EntitySpellProjectile(world, entityPlayer); - this.prepareProjectile(proj); - world.spawnEntityInWorld(proj); - } - - public static SpellParadigmProjectile getParadigmForEffectArray(List effectList) - { - SpellParadigmProjectile parad = new SpellParadigmProjectile(); - - for (SpellEffect eff : effectList) - { - parad.addBufferedEffect(eff); - } - - return parad; - } - - public void prepareProjectile(EntitySpellProjectile proj) - { - proj.setDamage(damage); - proj.setImpactList(impactList); - proj.setUpdateEffectList(updateEffectList); - proj.setPenetration(penetration); - proj.setRicochetMax(ricochetMax); - proj.setIsSilkTouch(isSilkTouch); - proj.setSpellEffectList(bufferedEffectList); - } - - public void addImpactEffect(IProjectileImpactEffect eff) - { - if (eff != null) - { - this.impactList.add(eff); - } - } - - public void addUpdateEffect(IProjectileUpdateEffect eff) - { - if (eff != null) - { - this.updateEffectList.add(eff); - } - } - - @Override - public int getDefaultCost() - { - return 50; - } - -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmSelf.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmSelf.java deleted file mode 100644 index 91c6ab1d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmSelf.java +++ /dev/null @@ -1,55 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -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() - { - selfSpellEffectList = new ArrayList(); - } - - @Override - public void enhanceParadigm(SpellEnhancement enh) {} - - @Override - public void castSpell(World world, EntityPlayer entityPlayer, ItemStack itemStack) - { - this.applyAllSpellEffects(); - - int cost = this.getTotalCost(); - - if(!SoulNetworkHandler.syphonAndDamageFromNetwork(itemStack, entityPlayer, cost)) - { - return; - } - - for (ISelfSpellEffect eff : selfSpellEffectList) - { - eff.onSelfUse(world, entityPlayer); - } - } - - public void addSelfSpellEffect(ISelfSpellEffect eff) - { - if (eff != null) - { - this.selfSpellEffectList.add(eff); - } - } - - @Override - public int getDefaultCost() - { - return 100; - } - -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java deleted file mode 100644 index e61795b9..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java +++ /dev/null @@ -1,483 +0,0 @@ -package WayofTime.alchemicalWizardry.api.spell; - -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.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; -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; - private List toolSummonEffectList; - private List toolBanishEffectList; - private List breakBlockEffectList; - private List itemManipulatorEffectList; - private List digAreaEffectList; - private List specialDamageEffectList; - - private HashMap harvestLevel; - private HashMap digSpeed; - private HashMap maxDamageHash; - private HashMap critChanceHash; - private HashMap durationHash; - - private HashMap toolInfoString; - - private int fortuneLevel; - private boolean silkTouch; - - private int duration; - - public static Item customTool; - - public SpellParadigmTool() - { - this.leftClickEffectList = new LinkedList(); - this.rightClickEffectList = new LinkedList(); - this.toolUpdateEffectList = new LinkedList(); - this.toolSummonEffectList = new LinkedList(); - this.toolBanishEffectList = new LinkedList(); - this.breakBlockEffectList = new LinkedList(); - this.itemManipulatorEffectList = new LinkedList(); - this.digAreaEffectList = new LinkedList(); - this.specialDamageEffectList = new LinkedList(); - this.durationHash = new HashMap(); - - this.toolInfoString = new HashMap(); - this.critChanceHash = new HashMap(); - - this.harvestLevel = new HashMap(); - this.harvestLevel.put("pickaxe", -1); - this.harvestLevel.put("shovel", -1); - this.harvestLevel.put("axe", -1); - - this.digSpeed = new HashMap(); - this.digSpeed.put("pickaxe", 1.0f); - this.digSpeed.put("shovel", 1.0f); - this.digSpeed.put("axe", 1.0f); - - this.maxDamageHash = new HashMap(); - this.maxDamageHash.put("default", 5.0f); - - this.fortuneLevel = 0; - this.silkTouch = false; - this.duration = 0; - this.durationHash.put("default", 2400); - } - - @Override - public void enhanceParadigm(SpellEnhancement enh) - { - - } - - @Override - public void castSpell(World world, EntityPlayer entityPlayer, ItemStack crystal) - { - if (entityPlayer.worldObj.isRemote) - { - return; - } - - int cost = this.getTotalCost(); - - if(!SoulNetworkHandler.syphonAndDamageFromNetwork(crystal, entityPlayer, cost)) - { - return; - } - - ItemStack toolStack = this.prepareTool(crystal, world); - - entityPlayer.setCurrentItemOrArmor(0, toolStack); - - this.onSummonTool(toolStack, world, entityPlayer); - } - - /** - * @param crystalStack - * @return stack containing the new multitool - */ - public ItemStack prepareTool(ItemStack crystalStack, World world) - { - ItemStack toolStack = new ItemStack(customTool, 1); - - ItemSpellMultiTool itemTool = (ItemSpellMultiTool) customTool; - - itemTool.setItemAttack(toolStack, this.composeMaxDamageFromHash()); - - Set> harvestLevelSet = this.harvestLevel.entrySet(); - - for (Entry testMap : harvestLevelSet) - { - String tool = testMap.getKey(); - int level = testMap.getValue(); - - itemTool.setHarvestLevel(toolStack, tool, level); - } - - Set> digSpeedSet = this.digSpeed.entrySet(); - - for (Entry testMap : digSpeedSet) - { - String tool = testMap.getKey(); - float speed = testMap.getValue(); - - itemTool.setDigSpeed(toolStack, tool, speed); - } - - itemTool.setFortuneLevel(toolStack, getFortuneLevel()); - itemTool.setSilkTouch(toolStack, this.getSilkTouch()); - - if (this.getSilkTouch()) - { - this.addToolString("SilkTouch", "Silk Touch" + " " + APISpellHelper.getNumeralForInt(1)); - } - - if (this.getFortuneLevel() > 0) - { - this.addToolString("Fortune", "Fortune" + " " + APISpellHelper.getNumeralForInt(this.getFortuneLevel())); - } - - itemTool.setCritChance(toolStack, this.getCritChance() / 100f); - - List toolStringList = new LinkedList(); - - for (String str : this.toolInfoString.values()) - { - toolStringList.add(str); - } - - itemTool.setToolListString(toolStack, toolStringList); - - for (Integer integ : this.durationHash.values()) - { - this.duration += integ; - } - - itemTool.setDuration(toolStack, world, this.duration); - itemTool.loadParadigmIntoStack(toolStack, this.bufferedEffectList); - - SoulNetworkHandler.checkAndSetItemOwner(toolStack, SoulNetworkHandler.getOwnerName(crystalStack)); - - itemTool.setContainedCrystal(toolStack, crystalStack); - - return toolStack; - } - - @Override - public int getDefaultCost() - { - return 100; - } - - public static SpellParadigmTool getParadigmForEffectArray(List effectList) - { - SpellParadigmTool parad = new SpellParadigmTool(); - - for (SpellEffect eff : effectList) - { - parad.addBufferedEffect(eff); - } - - parad.applyAllSpellEffects(); - - return parad; - } - - public void addLeftClickEffect(ILeftClickEffect eff) - { - if (eff != null) - { - this.leftClickEffectList.add(eff); - } - } - - public void addRightClickEffect(IRightClickEffect eff) - { - if (eff != null) - { - this.rightClickEffectList.add(eff); - } - } - - public void addUpdateEffect(IToolUpdateEffect eff) - { - if (eff != null) - { - this.toolUpdateEffectList.add(eff); - } - } - - public void addToolSummonEffect(IOnSummonTool eff) - { - if (eff != null) - { - this.toolSummonEffectList.add(eff); - } - } - - public void addToolBanishEffect(IOnBanishTool eff) - { - if (eff != null) - { - this.toolBanishEffectList.add(eff); - } - } - - public void addBlockBreakEffect(IOnBreakBlock eff) - { - if (eff != null) - { - this.breakBlockEffectList.add(eff); - } - } - - public void addItemManipulatorEffect(IItemManipulator eff) - { - if (eff != null) - { - this.itemManipulatorEffectList.add(eff); - } - } - - public void addDigAreaEffect(IDigAreaEffect eff) - { - if (eff != null) - { - this.digAreaEffectList.add(eff); - } - } - - public void addSpecialDamageEffect(ISpecialDamageEffect eff) - { - if (eff != null) - { - this.specialDamageEffectList.add(eff); - } - } - - public int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder) - { - int total = 0; - for (ILeftClickEffect effect : this.leftClickEffectList) - { - total += effect.onLeftClickEntity(stack, attacked, weilder); - } - - return total; - } - - public int onRightClickBlock(ItemStack toolStack, EntityLivingBase weilder, World world, MovingObjectPosition mop) - { - int total = 0; - for (IRightClickEffect effect : this.rightClickEffectList) - { - total += effect.onRightClickBlock(toolStack, weilder, world, mop); - } - - return total; - } - - public int onRightClickAir(ItemStack toolStack, World world, EntityPlayer player) - { - int total = 0; - for (IRightClickEffect effect : this.rightClickEffectList) - { - total += effect.onRightClickAir(toolStack, player); - } - - return total; - } - - public int onUpdate(ItemStack toolStack, World world, Entity par3Entity, int invSlot, boolean inHand) - { - int total = 0; - for (IToolUpdateEffect effect : this.toolUpdateEffectList) - { - total += effect.onUpdate(toolStack, world, par3Entity, invSlot, inHand); - } - - return total; - } - - public int onSummonTool(ItemStack toolStack, World world, Entity entity) - { - int total = 0; - for (IOnSummonTool effect : this.toolSummonEffectList) - { - total += effect.onSummonTool(toolStack, world, entity); - } - - return total; - } - - public int onBanishTool(ItemStack toolStack, World world, Entity entity, int invSlot, boolean inHand) - { - int total = 0; - for (IOnBanishTool effect : this.toolBanishEffectList) - { - total += effect.onBanishTool(toolStack, world, entity, invSlot, inHand); - } - - return total; - } - - public int onBreakBlock(ItemStack container, World world, EntityPlayer player, Block block, IBlockState state, BlockPos pos, EnumFacing sideBroken) - { - int total = 0; - for (IOnBreakBlock effect : this.breakBlockEffectList) - { - total += effect.onBlockBroken(container, world, player, block, state, pos, sideBroken); - } - - return total; - } - - public List handleItemList(ItemStack toolStack, List items) - { - List heldList = items; - - for (IItemManipulator eff : this.itemManipulatorEffectList) - { - heldList = eff.handleItemsOnBlockBroken(toolStack, heldList); - } - - return heldList; - } - - 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); - } - - return cost; - } - - public int getFortuneLevel() - { - return this.fortuneLevel; - } - - public void setFortuneLevel(int fortuneLevel) - { - this.fortuneLevel = fortuneLevel; - } - - public boolean getSilkTouch() - { - return this.silkTouch; - } - - public void setSilkTouch(boolean silkTouch) - { - this.silkTouch = silkTouch; - } - - public int getDuration() - { - return this.duration; - } - - public void setDuration(int duration) - { - this.duration = duration; - } - - public void setDigSpeed(String toolClass, float digSpeed) - { - this.digSpeed.put(toolClass, digSpeed); - } - - public void setHarvestLevel(String toolClass, int hlvl) - { - this.harvestLevel.put(toolClass, hlvl); - } - - public float composeMaxDamageFromHash() - { - float damage = 0.0f; - - for (float f : this.maxDamageHash.values()) - { - damage += f; - } - - return damage; - } - - public void addDamageToHash(String key, float dmg) - { - this.maxDamageHash.put(key, dmg); - } - - public void addToolString(String key, String str) - { - if (str != null && key != null) - { - this.toolInfoString.put(key, str); - } - } - - public void addCritChance(String key, float chance) - { - //Chance is in percentage chance i.e. chance = 1.0 means 1.0% - this.critChanceHash.put(key, chance); - } - - public void addDuration(String key, int dur) - { - this.durationHash.put(key, dur); - } - - public float getCritChance() - { - float chance = 0.0f; - - for (float fl : this.critChanceHash.values()) - { - chance += fl; - } - - return chance; - } - - public float getAddedDamageForEntity(Entity entity) - { - HashMap hash = new HashMap(); - - for (ISpecialDamageEffect effect : this.specialDamageEffectList) - { - hash.put(effect.getKey(), effect.getDamageForEntity(entity)); - } - - float addedDmg = 0.0f; - - for (float fl : hash.values()) - { - addedDmg += fl; - } - - return addedDmg; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningHelper.java b/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningHelper.java deleted file mode 100644 index 84c4d3a7..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningHelper.java +++ /dev/null @@ -1,21 +0,0 @@ -package WayofTime.alchemicalWizardry.api.summoningRegistry; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.world.World; - -public abstract class SummoningHelper -{ - protected String id; - - public SummoningHelper(String id) - { - this.id = id; - } - - public abstract EntityLivingBase getEntity(World worldObj); - - public String getSummoningHelperID() - { - return id; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistry.java deleted file mode 100644 index 01c065f8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistry.java +++ /dev/null @@ -1,70 +0,0 @@ -package WayofTime.alchemicalWizardry.api.summoningRegistry; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; - -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) - { - 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) && src.compareRing(2, test2) && src.compareRing(3, test3)) - { - return true; - } - } - - return false; - } - - public static SummoningRegistryComponent getRegistryComponent(int bloodOrbLevel, ItemStack[] test1, ItemStack[] test2, ItemStack[] test3) - { - for (SummoningRegistryComponent src : summoningList) - { - if (src.getBloodOrbLevel() <= bloodOrbLevel && src.compareRing(1, test1) && src.compareRing(2, test2) && src.compareRing(3, test3)) - { - return src; - } - } - - return null; - } - - 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) && src.compareRing(2, test2) && src.compareRing(3, test3)) - { - return src.getEntity(worldObj); - } - } - - return null; - } - - public static EntityLivingBase getEntityWithID(World worldObj, String id) - { - for (SummoningRegistryComponent src : summoningList) - { - if (src.getSummoningHelperID().equals(id)) - { - return src.getEntity(worldObj); - } - } - - return null; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistryComponent.java b/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistryComponent.java deleted file mode 100644 index 72dbd838..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistryComponent.java +++ /dev/null @@ -1,231 +0,0 @@ -package WayofTime.alchemicalWizardry.api.summoningRegistry; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -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]; - public SummoningHelper summoningHelper; - public int summoningCost; - public 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; - this.ring3 = newRing3; - this.summoningCost = amount; - this.bloodOrbLevel = bloodOrbLevel; - - if (this.ring1.length != 6) - { - ItemStack[] newRecipe = new ItemStack[6]; - - for (int i = 0; i < 6; i++) - { - if (i + 1 > this.ring1.length) - { - newRecipe[i] = null; - } else - { - newRecipe[i] = this.ring1[i]; - } - } - - this.ring1 = newRecipe; - } - - if (this.ring2.length != 6) - { - ItemStack[] newRecipe = new ItemStack[6]; - - for (int i = 0; i < 6; i++) - { - if (i + 1 > this.ring2.length) - { - newRecipe[i] = null; - } else - { - newRecipe[i] = this.ring2[i]; - } - } - - this.ring2 = newRecipe; - } - - if (this.ring3.length != 6) - { - ItemStack[] newRecipe = new ItemStack[6]; - - for (int i = 0; i < 6; i++) - { - if (i + 1 > this.ring3.length) - { - newRecipe[i] = null; - } else - { - newRecipe[i] = this.ring3[i]; - } - } - - this.ring3 = newRecipe; - } - } - - public boolean compareRing(int ring, ItemStack[] checkedRingRecipe) - { - ItemStack[] recipe; - - if (checkedRingRecipe.length < 6) - { - return false; - } - - switch (ring) - { - case 1: - recipe = ring1; - break; - - case 2: - recipe = ring2; - break; - - case 3: - recipe = ring3; - break; - - default: - recipe = ring1; - } - - if (recipe.length != 6) - { - ItemStack[] newRecipe = new ItemStack[6]; - - for (int i = 0; i < 6; i++) - { - if (i + 1 > recipe.length) - { - newRecipe[i] = null; - } else - { - newRecipe[i] = recipe[i]; - } - } - - recipe = newRecipe; - } - - boolean[] checkList = new boolean[6]; - - for (int i = 0; i < 6; i++) - { - checkList[i] = false; - } - - for (int i = 0; i < 6; i++) - { - ItemStack recipeItemStack = recipe[i]; - - if (recipeItemStack == null) - { - continue; - } - - boolean test = false; - - for (int j = 0; j < 6; j++) - { - if (checkList[j]) - { - continue; - } - - ItemStack checkedItemStack = checkedRingRecipe[j]; - - if (checkedItemStack == null) - { - continue; - } - - boolean quickTest = false; - - if (recipeItemStack.getItem() instanceof ItemBlock) - { - if (checkedItemStack.getItem() instanceof ItemBlock) - { - quickTest = true; - } - } else if (!(checkedItemStack.getItem() instanceof ItemBlock)) - { - quickTest = true; - } - - if (!quickTest) - { - continue; - } - - if ((checkedItemStack.getItemDamage() == recipeItemStack.getItemDamage() || OreDictionary.WILDCARD_VALUE == recipeItemStack.getItemDamage()) && checkedItemStack.getItem() == recipeItemStack.getItem()) - { - test = true; - checkList[j] = true; - break; - } - } - - if (!test) - { - return false; - } - } - - return true; - } - - public int getSummoningCost() - { - return summoningCost; - } - - public EntityLivingBase getEntity(World world) - { - return this.summoningHelper.getEntity(world); - } - - public int getBloodOrbLevel() - { - return this.bloodOrbLevel; - } - - public ItemStack[] getRingRecipeForRing(int ring) - { - switch (ring) - { - case 1: - return ring1; - - case 2: - return ring2; - - case 3: - return ring3; - - default: - return null; - } - } - - public String getSummoningHelperID() - { - return this.summoningHelper.getSummoningHelperID(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/tile/IBloodAltar.java b/src/main/java/WayofTime/alchemicalWizardry/api/tile/IBloodAltar.java deleted file mode 100644 index eaee5700..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/tile/IBloodAltar.java +++ /dev/null @@ -1,42 +0,0 @@ -package WayofTime.alchemicalWizardry.api.tile; - -/** - * Created by Pokefenn. - */ -public interface IBloodAltar -{ - int getCapacity(); - - int getCurrentBlood(); - - int getTier(); - - int getProgress(); - - float getSacrificeMultiplier(); - - float getSelfSacrificeMultiplier(); - - float getOrbMultiplier(); - - float getDislocationMultiplier(); - - int getBufferCapacity(); - - void sacrificialDaggerCall(int amount, boolean b); - - 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. - * @param amount - */ - void requestPauseAfterCrafting(int amount); - - void addToDemonBloodDuration(int dur); - - boolean hasDemonBlood(); - - void decrementDemonBlood(); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellParadigmTile.java b/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellParadigmTile.java deleted file mode 100644 index 97af71d2..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellParadigmTile.java +++ /dev/null @@ -1,10 +0,0 @@ -package WayofTime.alchemicalWizardry.api.tile; - -import net.minecraft.entity.player.EntityPlayer; -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 deleted file mode 100644 index ac47e535..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellTile.java +++ /dev/null @@ -1,11 +0,0 @@ -package WayofTime.alchemicalWizardry.api.tile; - -import net.minecraft.util.EnumFacing; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; - -public interface ISpellTile -{ - void modifySpellParadigm(SpellParadigm parad); - - boolean canInputRecieveOutput(EnumFacing output); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/util/helper/BindableHelper.java b/src/main/java/WayofTime/alchemicalWizardry/api/util/helper/BindableHelper.java new file mode 100644 index 00000000..08b89671 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/util/helper/BindableHelper.java @@ -0,0 +1,76 @@ +package WayofTime.alchemicalWizardry.api.util.helper; + +import WayofTime.alchemicalWizardry.api.NBTHolder; +import WayofTime.alchemicalWizardry.api.event.ItemBindEvent; +import WayofTime.alchemicalWizardry.api.iface.IBindable; +import com.google.common.base.Strings; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.MinecraftForge; + +public class BindableHelper { + + /** + * Bind an item to a player. Handles checking if the player was an instanceof + * {@link net.minecraftforge.common.util.FakePlayer} or other type of Fake Player. + * + * @param stack - The ItemStack to bind + * @param player - The Player to bind the ItemStack to + * @return - Whether binding was successful + */ + public static boolean checkAndSetItemOwner(ItemStack stack, EntityPlayer player) { + return !PlayerHelper.isFakePlayer(player) && checkAndSetItemOwner(stack, player.getGameProfile().getName()); + } + + /** + * Bind an item to a username. + * + * Requires the Item contained in the ItemStack to be an instanceof {@link IBindable} + * + * Fires {@link ItemBindEvent}. + * + * @param stack - The ItemStack to bind + * @param ownerName - The username to bind the ItemStack to + * @return - Whether the binding was successful + */ + public static boolean checkAndSetItemOwner(ItemStack stack, String ownerName) { + stack = NBTHolder.checkNBT(stack); + + if (!(stack.getItem() instanceof IBindable)) + return false; + + if (Strings.isNullOrEmpty(stack.getTagCompound().getString(NBTHolder.NBT_OWNER))) { + MinecraftForge.EVENT_BUS.post(new ItemBindEvent(PlayerHelper.getPlayerFromUsername(ownerName), ownerName, stack)); + ((IBindable) stack.getItem()).onBind(PlayerHelper.getPlayerFromUsername(ownerName), stack); + stack.getTagCompound().setString(NBTHolder.NBT_OWNER, ownerName); + return true; + } + + return false; + } + + /** + * Sets the Owner of the item without checking if it is already bound. + * Also bypasses {@link ItemBindEvent}. + * + * @param stack - The ItemStack to bind + * @param ownerName - The username to bind the ItemStack to + */ + public static void setItemOwner(ItemStack stack, String ownerName) { + stack = NBTHolder.checkNBT(stack); + + stack.getTagCompound().setString(NBTHolder.NBT_OWNER, ownerName); + } + + /** + * Used to safely obtain the username of the ItemStack's owner + * + * @param stack - The ItemStack to check the owner of + * @return - The username of the ItemStack's owner + */ + public static String getOwnerName(ItemStack stack) { + stack = NBTHolder.checkNBT(stack); + + return stack.getTagCompound().getString(NBTHolder.NBT_OWNER); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/util/helper/LogHelper.java b/src/main/java/WayofTime/alchemicalWizardry/api/util/helper/LogHelper.java new file mode 100644 index 00000000..e7bd7bbf --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/util/helper/LogHelper.java @@ -0,0 +1,37 @@ +package WayofTime.alchemicalWizardry.api.util.helper; + +import WayofTime.alchemicalWizardry.api.AlchemicalWizardryAPI; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +public class LogHelper { + + private Logger logger; + + public LogHelper(String logger) { + this.logger = LogManager.getLogger(logger); + } + + public void info(Object info) { + if (AlchemicalWizardryAPI.isLoggingEnabled()) + logger.info(info); + } + + public void error(Object error) { + if (AlchemicalWizardryAPI.isLoggingEnabled()) + logger.info(error); + } + + public void debug(Object debug) { + if (AlchemicalWizardryAPI.isLoggingEnabled()) + logger.info(debug); + } + + public void fatal(Object fatal) { + logger.fatal(fatal); + } + + public Logger getLogger() { + return logger; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/util/helper/NetworkHelper.java b/src/main/java/WayofTime/alchemicalWizardry/api/util/helper/NetworkHelper.java new file mode 100644 index 00000000..ce01908f --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/util/helper/NetworkHelper.java @@ -0,0 +1,202 @@ +package WayofTime.alchemicalWizardry.api.util.helper; + +import WayofTime.alchemicalWizardry.api.AlchemicalWizardryAPI; +import WayofTime.alchemicalWizardry.api.NBTHolder; +import WayofTime.alchemicalWizardry.api.event.AddToNetworkEvent; +import WayofTime.alchemicalWizardry.api.event.SoulNetworkEvent; +import WayofTime.alchemicalWizardry.api.network.SoulNetwork; +import com.google.common.base.Strings; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.server.MinecraftServer; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.fml.common.eventhandler.Event; + +public class NetworkHelper { + + // Syphon + + /** + * 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 stack Owned itemStack + * @param player Player using the item + * @param syphon + * @return True if the action should be executed and false if it should not. Always returns false if client-sided. + */ + public static boolean syphonAndDamageFromNetwork(ItemStack stack, EntityPlayer player, int syphon) { + if (player.worldObj.isRemote) + return false; + + stack = NBTHolder.checkNBT(stack); + String ownerName = stack.getTagCompound().getString(NBTHolder.NBT_OWNER); + + if (!Strings.isNullOrEmpty(ownerName)) { + SoulNetworkEvent.ItemDrainNetworkEvent event = new SoulNetworkEvent.ItemDrainNetworkEvent(player, ownerName, stack, syphon); + + if(MinecraftForge.EVENT_BUS.post(event)) + return false; + + int drainAmount = syphonFromNetwork(event.ownerName, event.syphon); + + if(drainAmount == 0 || event.shouldDamage) + hurtPlayer(player, event.syphon); + + //The event has been told to prevent the action but allow all repercussions of using the item. + return event.getResult() != Event.Result.DENY; + } + + int amount = NetworkHelper.syphonFromNetwork(stack, syphon); + + hurtPlayer(player, syphon - amount); + + return true; + } + + public static boolean syphonFromNetworkWhileInContainer(ItemStack stack, int syphon) { + stack = NBTHolder.checkNBT(stack); + String ownerName = stack.getTagCompound().getString(NBTHolder.NBT_OWNER); + + if (Strings.isNullOrEmpty(ownerName)) + return false; + + SoulNetworkEvent.ItemDrainInContainerEvent event = new SoulNetworkEvent.ItemDrainInContainerEvent(stack, ownerName, syphon); + + if(MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Event.Result.DENY) + return false; + + return syphonFromNetwork(event.ownerName, event.syphon) >= syphon; + } + + public static int syphonFromNetwork(ItemStack stack, int syphon) { + stack = NBTHolder.checkNBT(stack); + String ownerName = stack.getTagCompound().getString(NBTHolder.NBT_OWNER); + if (!Strings.isNullOrEmpty(ownerName)) + return syphonFromNetwork(ownerName, syphon); + + return 0; + } + + public static int syphonFromNetwork(String ownerName, int syphon) { + if (MinecraftServer.getServer() == null) + return 0; + + World world = MinecraftServer.getServer().worldServers[0]; + SoulNetwork network = (SoulNetwork) world.loadItemData(SoulNetwork.class, ownerName); + + if (network == null) { + network = new SoulNetwork(ownerName); + world.setItemData(ownerName, network); + } + + if (network.getCurrentEssence() >= syphon) { + network.setCurrentEssence(network.getCurrentEssence() - syphon); + network.markDirty(); + return syphon; + } + + return 0; + } + + // Add + + /** + * A method to add to an owner's network up to a maximum value. + * + * @return amount added to the network + */ + public static int addCurrentEssenceToMaximum(String ownerName, int addedEssence, int maximum) { + AddToNetworkEvent event = new AddToNetworkEvent(ownerName, addedEssence, maximum); + + if(MinecraftForge.EVENT_BUS.post(event)) + return 0; + + if (MinecraftServer.getServer() == null) + return 0; + + World world = MinecraftServer.getServer().worldServers[0]; + SoulNetwork data = (SoulNetwork) world.loadItemData(SoulNetwork.class, event.ownerNetwork); + + if (data == null) { + data = new SoulNetwork(event.ownerNetwork); + world.setItemData(event.ownerNetwork, data); + } + + int currEss = data.getCurrentEssence(); + + if (currEss >= event.maximum) + return 0; + + int newEss = Math.min(event.maximum, currEss + event.addedAmount); + if(event.getResult() != Event.Result.DENY) + data.setCurrentEssence(newEss); + + return newEss - currEss; + } + + // Do damage + + public static void hurtPlayer(EntityPlayer user, int energySyphoned) { + if (energySyphoned < 100 && energySyphoned > 0) { + if (!user.capabilities.isCreativeMode) { + user.setHealth((user.getHealth() - 1)); + + if (user.getHealth() <= 0.0005f) + user.onDeath(AlchemicalWizardryAPI.getDamageSource()); + } + } else if (energySyphoned >= 100) { + if (!user.capabilities.isCreativeMode) { + for (int i = 0; i < ((energySyphoned + 99) / 100); i++) { + user.setHealth((user.getHealth() - 1)); + + if (user.getHealth() <= 0.0005f) { + user.onDeath(AlchemicalWizardryAPI.getDamageSource()); + break; + } + } + } + } + } + + public static void hurtPlayer(EntityPlayer user, float damage) { + if (!user.capabilities.isCreativeMode) { + user.setHealth((user.getHealth() - damage)); + + if (user.getHealth() <= 0.0005f) + user.onDeath(AlchemicalWizardryAPI.getDamageSource()); + } + } + + public static void setMaxOrbToMax(String ownerName, int maxOrb) { + if (MinecraftServer.getServer() == null) + return; + + World world = MinecraftServer.getServer().worldServers[0]; + SoulNetwork network = (SoulNetwork) world.loadItemData(SoulNetwork.class, ownerName); + + if (network == null) { + network = new SoulNetwork(ownerName); + world.setItemData(ownerName, network); + } + + network.setMaxOrb(Math.max(maxOrb, network.getMaxOrb())); + network.markDirty(); + } + + public static int getCurrentMaxOrb(String ownerName) { + if (MinecraftServer.getServer() == null) + return 0; + + World world = MinecraftServer.getServer().worldServers[0]; + SoulNetwork network = (SoulNetwork) world.loadItemData(SoulNetwork.class, ownerName); + + if (network == null) { + network = new SoulNetwork(ownerName); + world.setItemData(ownerName, network); + } + + return network.getMaxOrb(); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/util/helper/PlayerHelper.java b/src/main/java/WayofTime/alchemicalWizardry/api/util/helper/PlayerHelper.java new file mode 100644 index 00000000..d1f624b9 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/util/helper/PlayerHelper.java @@ -0,0 +1,53 @@ +package WayofTime.alchemicalWizardry.api.util.helper; + +import WayofTime.alchemicalWizardry.api.NBTHolder; +import com.google.common.base.Strings; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.server.MinecraftServer; +import net.minecraftforge.common.util.FakePlayer; + +import java.util.UUID; +import java.util.regex.Pattern; + +public class PlayerHelper { + + private static final Pattern FAKE_PLAYER_PATTERN = Pattern.compile("^(?:\\[.*\\])|(?:ComputerCraft)$"); + + public static String getUsernameFromPlayer(EntityPlayer player) { + return player.getGameProfile().getName(); + } + + public static EntityPlayer getPlayerFromUsername(String username) { + if (MinecraftServer.getServer() == null) + return null; + + return MinecraftServer.getServer().getConfigurationManager().getPlayerByUsername(username); + } + + public static UUID getUUIDFromPlayer(EntityPlayer player) { + return player.getGameProfile().getId(); + } + + public static boolean isFakePlayer(EntityPlayer player) { + return player instanceof FakePlayer || FAKE_PLAYER_PATTERN.matcher(getUsernameFromPlayer(player)).matches(); + } + + public static void causeNauseaToPlayer(ItemStack stack) { + stack = NBTHolder.checkNBT(stack); + + if (!Strings.isNullOrEmpty(stack.getTagCompound().getString(NBTHolder.NBT_OWNER))) + causeNauseaToPlayer(stack.getTagCompound().getString(NBTHolder.NBT_OWNER)); + } + + public static void causeNauseaToPlayer(String ownerName) { + EntityPlayer player = getPlayerFromUsername(ownerName); + + if (player == null) + return; + + player.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/util/helper/TextHelper.java b/src/main/java/WayofTime/alchemicalWizardry/api/util/helper/TextHelper.java new file mode 100644 index 00000000..8a7e5623 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/api/util/helper/TextHelper.java @@ -0,0 +1,7 @@ +package WayofTime.alchemicalWizardry.api.util.helper; + +public class TextHelper { + public static String getFormattedText(String string) { + return string.replaceAll("&", "\u00A7"); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/block/BlockAltar.java b/src/main/java/WayofTime/alchemicalWizardry/block/BlockAltar.java new file mode 100644 index 00000000..958a3c27 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/block/BlockAltar.java @@ -0,0 +1,24 @@ +package WayofTime.alchemicalWizardry.block; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.tile.TileAltar; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class BlockAltar extends BlockContainer { + + public BlockAltar() { + super(Material.rock); + + setUnlocalizedName(AlchemicalWizardry.MODID + ".altar"); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } + + @Override + public TileEntity createNewTileEntity(World world, int meta) { +// return new TileAltar(); + return null; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/block/BlockLifeEssence.java b/src/main/java/WayofTime/alchemicalWizardry/block/BlockLifeEssence.java new file mode 100644 index 00000000..cd4a23a5 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/block/BlockLifeEssence.java @@ -0,0 +1,57 @@ +package WayofTime.alchemicalWizardry.block; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.AlchemicalWizardryAPI; +import lombok.AccessLevel; +import lombok.Getter; +import net.minecraft.block.material.Material; +import net.minecraft.util.BlockPos; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.fluids.BlockFluidClassic; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; + +public class BlockLifeEssence extends BlockFluidClassic { + + @Getter(AccessLevel.PUBLIC) + private static Fluid lifeEssence = new FluidLifeEssence("lifeEssence"); + + public BlockLifeEssence() { + super(lifeEssence, Material.water); + + lifeEssence.setBlock(this); + AlchemicalWizardryAPI.setLifeEssence(lifeEssence); + } + + @Override + public boolean canDisplace(IBlockAccess world, BlockPos blockPos) { + return !world.getBlockState(blockPos).getBlock().getMaterial().isLiquid() && super.canDisplace(world, blockPos); + } + + @Override + public boolean displaceIfPossible(World world, BlockPos blockPos) { + return !world.getBlockState(blockPos).getBlock().getMaterial().isLiquid() && super.displaceIfPossible(world, blockPos); + } + + public static class FluidLifeEssence extends Fluid { + + public FluidLifeEssence(String fluidName) { + super(fluidName, new ResourceLocation(AlchemicalWizardry.DOMAIN + "lifeEssenceStill"), new ResourceLocation(AlchemicalWizardry.DOMAIN + "lifeEssenceFlowing")); + + setDensity(2000); + setViscosity(2000); + } + + @Override + public int getColor() { + return 0xEEEEEE; + } + + @Override + public String getLocalizedName(FluidStack fluidStack) { + return "Life Essence"; + } + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java deleted file mode 100644 index 9fc4b342..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java +++ /dev/null @@ -1,36 +0,0 @@ -package WayofTime.alchemicalWizardry.client; - -import WayofTime.alchemicalWizardry.ModBlocks; -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.client.resources.model.ModelResourceLocation; -import net.minecraft.item.Item; - -public class BlockRenderer -{ - public static void registerBlockRenders() - { - registerBlock(ModBlocks.armourForge); - registerBlock(ModBlocks.speedRune); - registerBlock(ModBlocks.efficiencyRune); - registerBlock(ModBlocks.bloodSocket); - registerBlock(ModBlocks.emptySocket); - registerBlock(ModBlocks.blockEnchantmentGlyph); - registerBlock(ModBlocks.blockStabilityGlyph); - registerBlock(ModBlocks.runeOfSelfSacrifice); - registerBlock(ModBlocks.runeOfSacrifice); - registerBlock(ModBlocks.bloodStoneBrick); - registerBlock(ModBlocks.largeBloodStoneBrick); - registerBlock(ModBlocks.blockMasterStone); - registerBlock(ModBlocks.ritualStone); - registerBlock(ModBlocks.blockTeleposer); - registerBlock(ModBlocks.blockSpellTable); - registerBlock(ModBlocks.imperfectRitualStone); - registerBlock(ModBlocks.spectralBlock); - } - - public static void registerBlock(Block block) - { - Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation("alchemicalwizardry:" + block.getUnlocalizedName().substring(5), "inventory")); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/ClientEventHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/ClientEventHandler.java deleted file mode 100644 index ee938546..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/ClientEventHandler.java +++ /dev/null @@ -1,86 +0,0 @@ -package WayofTime.alchemicalWizardry.client; - -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.client.event.RenderBlockOverlayEvent; -import net.minecraftforge.client.event.sound.SoundEvent; -import net.minecraftforge.fml.client.FMLClientHandler; -import net.minecraftforge.fml.common.eventhandler.Event.Result; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.InputEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent.Phase; -import net.minecraftforge.fml.common.gameevent.TickEvent.RenderTickEvent; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModBlocks; - - -public class ClientEventHandler -{ - private Minecraft mcClient = FMLClientHandler.instance().getClient(); - - @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 MessageKeyPressed(MessageKeyPressed.Key.OMEGA_ACTIVE)); -// } - } - - @SubscribeEvent - public void onPlayerSoundEvent(SoundEvent event) - { - if (Minecraft.getMinecraft() != null) - { - EntityPlayer player = Minecraft.getMinecraft().thePlayer; - - if (player != null && player.isPotionActive(AlchemicalWizardry.customPotionDeaf)) - { - event.setResult(Result.DENY); - if(event.isCancelable()) - event.setCanceled(true); - } - } - } - - @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.setCanceled(true); - } - - if(event.blockForOverlay == ModBlocks.blockMimic && event.isCancelable()) - { - event.setCanceled(true); - } - } - - @SubscribeEvent - public void onTick(RenderTickEvent event) - { - if (event.phase.equals(Phase.START)) - return; - -// if (!RenderHelper.onTickInGame(mcClient)) - { - - } - } - -// @SubscribeEvent -// public void onRenderLivingPlayerPre(RenderPlayerEvent.Pre event) -// { -// GL11.glDisable(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 deleted file mode 100644 index a63e6810..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java +++ /dev/null @@ -1,198 +0,0 @@ -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 net.minecraftforge.fml.client.FMLClientHandler; -import net.minecraftforge.fml.client.registry.ClientRegistry; -import net.minecraftforge.fml.client.registry.RenderingRegistry; -import net.minecraftforge.fml.common.FMLCommonHandler; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; -import WayofTime.alchemicalWizardry.client.renderer.RitualDivinerRender; -import WayofTime.alchemicalWizardry.common.CommonProxy; -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.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 WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntIce; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntWind; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityAirElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBileDemon; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBoulderFist; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityEarthElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFireElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityHolyElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityShade; -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 WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaMainProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityMeteor; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityParticleBeam; -import WayofTime.alchemicalWizardry.common.items.sigil.holding.ScrollHelper; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderAlchemicalCalcinator; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderAltar; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderChemistrySet; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderConduit; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderCrystalBelljar; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderMasterStone; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderPedestal; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderPlinth; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderReagentConduit; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellEffectBlock; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellEnhancementBlock; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellModifierBlock; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellParadigmBlock; -import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEAlchemicalCalcinatorItemRenderer; -import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEAltarItemRenderer; -import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEBellJarItemRenderer; -import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEConduitItemRenderer; -import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TESpellEffectBlockItemRenderer; -import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TESpellEnhancementBlockItemRenderer; -import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TESpellModifierBlockItemRenderer; -import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TESpellParadigmBlockItemRenderer; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderBileDemon; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderBoulderFist; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderElemental; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderFallenAngel; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderIceDemon; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderLowerGuardian; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderMinorDemonGrunt; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderMinorDemonGruntGuardian; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderShade; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderSmallEarthGolem; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderWingedFireDemon; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelBileDemon; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelBoulderFist; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelElemental; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelFallenAngel; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelIceDemon; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelLowerGuardian; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelMinorDemonGrunt; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelMinorDemonGruntGuardian; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelShade; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelSmallEarthGolem; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelWingedFireDemon; -import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBazookaMainProjectile; -import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBlastProjectile; -import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderMeteor; -import WayofTime.alchemicalWizardry.common.thread.GAPIChecker; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; -import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; -import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; - -public class ClientProxy extends CommonProxy -{ - @Override - public void registerPostSideObjects() - { -// BUEntries entries = new BUEntries(); -// entries.postInit(); - } - - @Override - public void registerRenderers() - { - RenderingRegistry.registerEntityRenderingHandler(EnergyBlastProjectile.class, new RenderEnergyBlastProjectile()); - RenderingRegistry.registerEntityRenderingHandler(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)); - RenderingRegistry.registerEntityRenderingHandler(EntityLowerGuardian.class, new RenderLowerGuardian(new ModelLowerGuardian(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityBileDemon.class, new RenderBileDemon(new ModelBileDemon(), 1.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityWingedFireDemon.class, new RenderWingedFireDemon(new ModelWingedFireDemon(), 1.0F)); - 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)); - RenderingRegistry.registerEntityRenderingHandler(EntityShade.class, new RenderShade(new ModelShade(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityAirElemental.class, new RenderElemental(new ModelElemental(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityWaterElemental.class, new RenderElemental(new ModelElemental(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityEarthElemental.class, new RenderElemental(new ModelElemental(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityFireElemental.class, new RenderElemental(new ModelElemental(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityShadeElemental.class, new RenderElemental(new ModelElemental(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityHolyElemental.class, new RenderElemental(new ModelElemental(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityMinorDemonGrunt.class, new RenderMinorDemonGrunt(new ModelMinorDemonGrunt(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityMinorDemonGruntFire.class, new RenderMinorDemonGrunt(new ModelMinorDemonGrunt(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityMinorDemonGruntIce.class, new RenderMinorDemonGrunt(new ModelMinorDemonGrunt(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityMinorDemonGruntWind.class, new RenderMinorDemonGrunt(new ModelMinorDemonGrunt(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityMinorDemonGruntEarth.class, new RenderMinorDemonGrunt(new ModelMinorDemonGrunt(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityMinorDemonGruntGuardian.class, new RenderMinorDemonGruntGuardian(new ModelMinorDemonGruntGuardian(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityMinorDemonGruntGuardianFire.class, new RenderMinorDemonGruntGuardian(new ModelMinorDemonGruntGuardian(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityMinorDemonGruntGuardianIce.class, new RenderMinorDemonGruntGuardian(new ModelMinorDemonGruntGuardian(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityMinorDemonGruntGuardianEarth.class, new RenderMinorDemonGruntGuardian(new ModelMinorDemonGruntGuardian(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityMinorDemonGruntGuardianWind.class, new RenderMinorDemonGruntGuardian(new ModelMinorDemonGruntGuardian(), 0.5F)); - - MinecraftForge.EVENT_BUS.register(new RitualDivinerRender()); - - ClientRegistry.bindTileEntitySpecialRenderer(TEAltar.class, new RenderAltar()); - ClientRegistry.bindTileEntitySpecialRenderer(TEPedestal.class, new RenderPedestal()); - ClientRegistry.bindTileEntitySpecialRenderer(TEPlinth.class, new RenderPlinth()); - ClientRegistry.bindTileEntitySpecialRenderer(TEChemistrySet.class, new RenderChemistrySet()); - ClientRegistry.bindTileEntitySpecialRenderer(TEConduit.class, new RenderConduit()); - ClientRegistry.bindTileEntitySpecialRenderer(TESpellEffectBlock.class, new RenderSpellEffectBlock()); - ClientRegistry.bindTileEntitySpecialRenderer(TESpellEnhancementBlock.class, new RenderSpellEnhancementBlock()); - ClientRegistry.bindTileEntitySpecialRenderer(TESpellParadigmBlock.class, new RenderSpellParadigmBlock()); - ClientRegistry.bindTileEntitySpecialRenderer(TESpellModifierBlock.class, new RenderSpellModifierBlock()); - ClientRegistry.bindTileEntitySpecialRenderer(TEReagentConduit.class, new RenderReagentConduit()); - ClientRegistry.bindTileEntitySpecialRenderer(TEMasterStone.class, new RenderMasterStone()); - ClientRegistry.bindTileEntitySpecialRenderer(TEAlchemicalCalcinator.class, new RenderAlchemicalCalcinator()); - ClientRegistry.bindTileEntitySpecialRenderer(TEBelljar.class, new RenderCrystalBelljar()); - - //Item Renderer stuff - MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockConduit), new TEConduitItemRenderer()); - MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellEffect), new TESpellEffectBlockItemRenderer()); - MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellEnhancement), new TESpellEnhancementBlockItemRenderer()); - MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellParadigm), new TESpellParadigmBlockItemRenderer()); - MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellModifier), new TESpellModifierBlockItemRenderer()); - MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockAlchemicalCalcinator), new TEAlchemicalCalcinatorItemRenderer()); - MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockCrystalBelljar), new TEBellJarItemRenderer()); - - BlockRenderer.registerBlockRenders(); - InventoryRenderHelper.registerItems(); - } - - @Override - public World getClientWorld() - { - return FMLClientHandler.instance().getClient().theWorld; - } - - @Override - public void initRendering() - { - MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockAltar), new TEAltarItemRenderer()); - } - - @Override - public void registerEvents() - { - Object ob = new ClientEventHandler(); - FMLCommonHandler.instance().bus().register(ob); - MinecraftForge.EVENT_BUS.register(ob); - KeyBindings.init(); - MinecraftForge.EVENT_BUS.register(new ScrollHelper()); - new GAPIChecker().init(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/InventoryRenderHelper.java b/src/main/java/WayofTime/alchemicalWizardry/client/InventoryRenderHelper.java deleted file mode 100644 index 6f39d62d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/InventoryRenderHelper.java +++ /dev/null @@ -1,248 +0,0 @@ -package WayofTime.alchemicalWizardry.client; - -import WayofTime.alchemicalWizardry.common.block.BlockBloodRune; -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.ItemMeshDefinition; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.resources.model.ModelBakery; -import net.minecraft.client.resources.model.ModelResourceLocation; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.items.ItemAlchemyBase; -import WayofTime.alchemicalWizardry.common.items.ItemComponents; -import WayofTime.alchemicalWizardry.common.items.ItemIncense; - -public class InventoryRenderHelper { - - private static final String resourceBase = "alchemicalwizardry:"; - - /** - * Registers a Model for the given Item and meta. - * - * @param item - Item to register Model for - * @param meta - Meta of Item - * @param name - Name of the model JSON - */ - public static void itemRender(Item item, int meta, String name) { - if (item instanceof ItemBlock && name.startsWith("ItemBlock")) - name = name.replace("Item", ""); - - RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); - String resName = resourceBase + name; - - ModelBakery.addVariantName(item, resName); - renderItem.getItemModelMesher().register(item, meta, new ModelResourceLocation(resName, "inventory")); - } - - public static void registerItems() - { - registerSimpleItem(ModItems.weakBloodOrb); - registerSimpleItem(ModItems.apprenticeBloodOrb); - registerSimpleItem(ModItems.magicianBloodOrb); - registerSimpleItem(ModItems.masterBloodOrb); - registerSimpleItem(ModItems.archmageBloodOrb); - registerSimpleItem(ModItems.transcendentBloodOrb); - registerToggleItem(ModItems.energyBlaster); - registerToggleItem(ModItems.energySword); - registerSimpleItem(ModItems.lavaCrystal); - registerSimpleItem(ModItems.waterSigil); - registerSimpleItem(ModItems.lavaSigil); - registerSimpleItem(ModItems.voidSigil); - registerSimpleItem(ModItems.blankSlate); - registerSimpleItem(ModItems.reinforcedSlate); - registerSimpleItem(ModItems.sacrificialDagger); - registerSimpleItem(ModItems.daggerOfSacrifice); - registerSimpleItem(ModItems.airSigil); - registerToggleItem(ModItems.sigilOfTheFastMiner); - registerToggleItem(ModItems.sigilOfElementalAffinity); - registerToggleItem(ModItems.sigilOfHaste); - registerToggleItem(ModItems.boundPickaxe); - registerToggleItem(ModItems.boundAxe); - registerToggleItem(ModItems.boundShovel); - registerToggleItem(ModItems.growthSigil); - registerToggleItem(ModItems.sigilOfWind); - registerToggleItem(ModItems.sigilOfTheBridge); - registerToggleItem(ModItems.sigilOfMagnetism); - registerToggleItem(ModItems.energyBazooka); - registerToggleItem(ModItems.itemHarvestSigil); - registerToggleItem(ModItems.itemCompressionSigil); - registerSimpleItem(ModItems.divinationSigil); - registerSimpleItem(ModItems.waterScribeTool); - registerSimpleItem(ModItems.fireScribeTool); - registerSimpleItem(ModItems.earthScribeTool); - registerSimpleItem(ModItems.airScribeTool); - registerSimpleItem(ModItems.activationCrystal); //TODO - registerSimpleItem(ModItems.boundHelmet); - registerSimpleItem(ModItems.boundChestplate); - registerSimpleItem(ModItems.boundLeggings); - registerSimpleItem(ModItems.boundBoots); - registerSimpleItem(ModItems.weakBloodShard); - registerSimpleItem(ModItems.blankSpell); - registerSimpleItem(ModItems.alchemyFlask); - registerSimpleItem(ModItems.standardBindingAgent); - registerSimpleItem(ModItems.mundanePowerCatalyst); - registerSimpleItem(ModItems.averagePowerCatalyst); - registerSimpleItem(ModItems.greaterPowerCatalyst); - registerSimpleItem(ModItems.mundaneLengtheningCatalyst); - registerSimpleItem(ModItems.averageLengtheningCatalyst); - registerSimpleItem(ModItems.greaterLengtheningCatalyst); - registerSimpleItem(ModItems.incendium); - registerSimpleItem(ModItems.magicales); - registerSimpleItem(ModItems.sanctus); - registerSimpleItem(ModItems.aether); - registerSimpleItem(ModItems.simpleCatalyst); - registerSimpleItem(ModItems.crepitous); - registerSimpleItem(ModItems.crystallos); - registerSimpleItem(ModItems.terrae); - registerSimpleItem(ModItems.aquasalus); - registerSimpleItem(ModItems.tennebrae); - registerSimpleItem(ModItems.demonBloodShard); - registerSimpleItem(ModItems.telepositionFocus); - registerSimpleItem(ModItems.enhancedTelepositionFocus); - registerSimpleItem(ModItems.reinforcedTelepositionFocus); - registerSimpleItem(ModItems.demonicTelepositionFocus); - registerSimpleItem(ModItems.imbuedSlate); - registerSimpleItem(ModItems.demonicSlate); - registerSimpleItem(ModItems.duskScribeTool); - registerToggleItem(ModItems.armourInhibitor); - registerSimpleItem(ModItems.creativeFiller); - registerSimpleItem(ModItems.demonPlacer); - registerSimpleItem(ModItems.creativeDagger); - registerSimpleItem(ModItems.weakFillingAgent); - registerSimpleItem(ModItems.standardFillingAgent); - registerSimpleItem(ModItems.enhancedFillingAgent); - registerSimpleItem(ModItems.weakBindingAgent); - registerSimpleItem(ModItems.itemRitualDiviner); //TODO Make it work for all 3 metas - registerSimpleItem(ModItems.itemKeyOfDiablo); - registerSimpleItem(ModItems.itemBloodLightSigil); - registerSimpleItem(ModItems.itemComplexSpellCrystal); - registerSimpleItem(ModItems.bucketLife); - registerToggleItem(ModItems.itemSigilOfEnderSeverance); - registerSimpleItem(ModItems.itemSeerSigil); - registerSimpleItem(ModItems.customTool); - - int i = 0; - for(String name : ItemComponents.ITEM_NAMES) - { - String funName = ModItems.baseItems.getUnlocalizedName().substring(5) + "_" + name; - itemRender(ModItems.baseItems, i, funName); -// try { -// PrintWriter writer = new PrintWriter(funName + ".json"); -// writer.println("{"); -// writer.println(" " + '"' + "parent" + '"' + ":" + '"' + "alchemicalwizardry:item/standard_item" + '"' + ","); -// writer.println(" "+ '"' + "textures" + '"' + ": {"); -// writer.println(" " + '"' + "layer0" + '"' + ":" + '"' + "alchemicalwizardry:items/" + "baseItem" + "_" + name + '"'); -// writer.println(" }"); -// writer.println("}"); -// writer.close(); -// } catch (FileNotFoundException e1) { -// // TODO Auto-generated catch block -// e1.printStackTrace(); -// } - i++; - } - - i = 0; - for(String name : ItemAlchemyBase.ITEM_NAMES) - { - String funName = ModItems.baseAlchemyItems.getUnlocalizedName().substring(5) + "_" + name; - itemRender(ModItems.baseAlchemyItems, i, funName); - - i++; - } - - i = 0; - for(String name : ItemIncense.ITEM_NAMES) - { - String funName = ModItems.itemIncense.getUnlocalizedName().substring(5) + "_" + name; - itemRender(ModItems.itemIncense, i, funName); - - i++; - } - - registerSimpleItem(ModItems.itemCombinationalCatalyst); - registerSimpleItem(ModItems.itemAttunedCrystal); - registerSimpleItem(ModItems.itemTankSegmenter); - registerSimpleItem(ModItems.itemDestinationClearer); - registerSimpleItem(ModItems.dawnScribeTool); - registerSimpleItem(ModItems.itemBloodPack); - registerSimpleItem(ModItems.boundHelmetWater); - registerSimpleItem(ModItems.boundChestplateWater); - registerSimpleItem(ModItems.boundLeggingsWater); - registerSimpleItem(ModItems.boundBootsWater); - registerSimpleItem(ModItems.boundHelmetEarth); - registerSimpleItem(ModItems.boundChestplateEarth); - registerSimpleItem(ModItems.boundLeggingsEarth); - registerSimpleItem(ModItems.boundBootsEarth); - registerSimpleItem(ModItems.boundHelmetWind); - registerSimpleItem(ModItems.boundChestplateWind); - registerSimpleItem(ModItems.boundLeggingsWind); - registerSimpleItem(ModItems.boundBootsWind); - registerSimpleItem(ModItems.boundHelmetFire); - registerSimpleItem(ModItems.boundChestplateFire); - registerSimpleItem(ModItems.boundLeggingsFire); - registerSimpleItem(ModItems.boundBootsFire); - registerSimpleItem(ModItems.inputRoutingFocus); - registerSimpleItem(ModItems.outputRoutingFocus); - registerSimpleItem(ModItems.ritualDismantler); - } - - public static void registerSimpleItem(Item item) - { - itemRender(item, 0, item.getUnlocalizedName().substring(5)); - } - - public static void registerToggleItem(Item item) - { - itemRender(item, 0, item.getUnlocalizedName().substring(5) + "_deactivated"); - itemRender(item, 1, item.getUnlocalizedName().substring(5) + "_activated"); - } - - /** - * Shorthand of {@code itemRender(Item, int, String)} - * - * @param item - Item to register Model for - * @param meta - Meta of Item - */ - public static void itemRender(Item item, int meta) { - itemRender(item, meta, item.getClass().getSimpleName() + meta); - } - - /** - * Shorthand of {@code itemRender(Item, int)} - * - * @param item - Item to register Model for - */ - public static void itemRender(Item item) { - itemRender(item, 0, item.getClass().getSimpleName()); - } - - /** - * Registers a model for the item across all Meta's that get used for the item - * - * @param item - Item to register Model for - */ - public static void itemRenderAll(Item item) { - RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); - final Item toRender = item; - - renderItem.getItemModelMesher().register(item, new ItemMeshDefinition() { - @Override - public ModelResourceLocation getModelLocation(ItemStack stack) { - return new ModelResourceLocation(resourceBase + toRender.getClass().getSimpleName(), "inventory"); - } - }); - } - - /** - * - * @param block - Block to get Item of - * @return - The ItemBlock that corresponds to the Block. - */ - public static Item getItemFromBlock(Block block) { - return Item.getItemFromBlock(block); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/KeyBindings.java b/src/main/java/WayofTime/alchemicalWizardry/client/KeyBindings.java deleted file mode 100644 index b381ed70..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/KeyBindings.java +++ /dev/null @@ -1,14 +0,0 @@ -package WayofTime.alchemicalWizardry.client; - - -public class KeyBindings -{ -// public static KeyBinding omegaTest; - - public static void init() - { -// omegaTest = new KeyBinding("key.ping", Keyboard.KEY_O, "key.categories.alchemicalwizardry"); -// -// ClientRegistry.registerKeyBinding(omegaTest); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java index 0030115d..6d6952ab 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java @@ -1,38 +1,31 @@ package WayofTime.alchemicalWizardry.client.gui; - -import static WayofTime.alchemicalWizardry.BloodMagicConfiguration.config; - -import java.util.ArrayList; -import java.util.List; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ConfigHandler; import net.minecraft.client.gui.GuiScreen; import net.minecraftforge.common.config.ConfigElement; import net.minecraftforge.fml.client.config.GuiConfig; import net.minecraftforge.fml.client.config.IConfigElement; +import java.util.ArrayList; +import java.util.List; + public class ConfigGui extends GuiConfig { - public ConfigGui(GuiScreen parentScreen) { - super(parentScreen, getConfigElements(parentScreen), "AWWayofTime", false, false, "Blood Magic Configuration"); - } + public ConfigGui(GuiScreen parentScreen) { + super(parentScreen, getConfigElements(parentScreen), AlchemicalWizardry.MODID, false, false, "BloodMagic Configuration"); + } - @SuppressWarnings("rawtypes") - private static List getConfigElements(GuiScreen parent) { - List list = new ArrayList(); + @SuppressWarnings("rawtypes") + private static List getConfigElements(GuiScreen parent) { + List list = new ArrayList(); - // adds sections declared in ConfigHandler. toLowerCase() is used because the configuration class automatically does this, so must we. - list.add(new ConfigElement(config.getCategory("clientsettings".toLowerCase()))); - list.add(new ConfigElement(config.getCategory("dungeon loot chances".toLowerCase()))); - list.add(new ConfigElement(config.getCategory("meteor".toLowerCase()))); - list.add(new ConfigElement(config.getCategory("orecrushing".toLowerCase()))); - list.add(new ConfigElement(config.getCategory("potion id".toLowerCase()))); - list.add(new ConfigElement(config.getCategory("wellofsufferingblacklist".toLowerCase()))); - list.add(new ConfigElement(config.getCategory("wimpysettings".toLowerCase()))); - list.add(new ConfigElement(config.getCategory("ritual blacklist".toLowerCase()))); - list.add(new ConfigElement(config.getCategory("teleposer blacklist".toLowerCase()))); - list.add(new ConfigElement(config.getCategory("demon configs".toLowerCase()))); + // adds sections declared in ConfigHandler. toLowerCase() is used because the configuration class automatically does this, so must we. + list.add(new ConfigElement(ConfigHandler.config.getCategory("Potions".toLowerCase()))); + list.add(new ConfigElement(ConfigHandler.config.getCategory("Teleposer Blacklist".toLowerCase()))); + list.add(new ConfigElement(ConfigHandler.config.getCategory("Item/Block Blacklisting".toLowerCase()))); + list.add(new ConfigElement(ConfigHandler.config.getCategory("General".toLowerCase()))); - return list; - } + return list; + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java index 6413230c..1f081710 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java @@ -1,28 +1,30 @@ package WayofTime.alchemicalWizardry.client.gui; -import java.util.Set; - import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; import net.minecraftforge.fml.client.IModGuiFactory; +import java.util.Set; + public class ConfigGuiFactory implements IModGuiFactory { - @Override - public void initialize(Minecraft minecraftInstance) {} + @Override + public void initialize(Minecraft minecraftInstance) { - @Override - public Class mainConfigGuiClass() { - return ConfigGui.class; - } + } - @Override - public Set runtimeGuiCategories() { - return null; - } + @Override + public Class mainConfigGuiClass() { + return ConfigGui.class; + } - @Override - public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) { - return null; - } + @Override + public Set runtimeGuiCategories() { + return null; + } + + @Override + public RuntimeOptionGuiHandler getHandlerFor(IModGuiFactory.RuntimeOptionCategoryElement element) { + return null; + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java deleted file mode 100644 index 031488ac..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java +++ /dev/null @@ -1,178 +0,0 @@ -//package WayofTime.alchemicalWizardry.client.nei; -// -//import static WayofTime.alchemicalWizardry.client.nei.NEIConfig.bloodOrbs; -// -//import java.awt.Rectangle; -//import java.util.ArrayList; -//import java.util.List; -// -//import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiChemistrySet; -//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; -//import codechicken.nei.ItemList; -//import codechicken.nei.NEIServerUtils; -//import codechicken.nei.PositionedStack; -//import codechicken.nei.recipe.TemplateRecipeHandler; -// -///** -// * 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) { -// this.stack = new PositionedStack(orb, 136, 47, false); -// } -// } -// -// ArrayList orbs; -// PositionedStack output; -// List inputs; -// int lp; -// -// public CachedAlchemyRecipe(AlchemyRecipe recipe, ItemStack orb) { -// this(recipe); -// this.orbs = new ArrayList(); -// orbs.add(new BloodOrbs(orb)); -// } -// -// public CachedAlchemyRecipe(AlchemyRecipe recipe) { -// List inputs = new ArrayList(); -// ItemStack[] stacks = recipe.getRecipe(); -// if (stacks.length > 0) inputs.add(new PositionedStack(stacks[0], 76, 3)); -// if (stacks.length > 1) inputs.add(new PositionedStack(stacks[1], 51, 19)); -// if (stacks.length > 2) inputs.add(new PositionedStack(stacks[2], 101, 19)); -// if (stacks.length > 3) inputs.add(new PositionedStack(stacks[3], 64, 47)); -// if (stacks.length > 4) inputs.add(new PositionedStack(stacks[4], 88, 47)); -// this.inputs = inputs; -// this.output = new PositionedStack(recipe.getResult(), 76, 25); -// this.lp = recipe.getAmountNeeded() * 100; -// this.orbs = new ArrayList(); -// for (Item orb : bloodOrbs) { -// if (((IBloodOrb) orb).getOrbLevel() >= recipe.getOrbLevel()) { -// orbs.add(new BloodOrbs(new ItemStack(orb))); -// } -// } -// } -// -// @Override -// public List getIngredients() { -// return inputs; -// } -// -// @Override -// public PositionedStack getResult() { -// return output; -// } -// -// @Override -// public PositionedStack getOtherStack() { -// if (orbs == null || orbs.size() <= 0) return null; -// return orbs.get((cycleticks / 48) % orbs.size()).stack; -// } -// } -// -// @Override -// public TemplateRecipeHandler newInstance() { -// for (ItemStack item : ItemList.items) { -// if (item != null && item.getItem() instanceof IBloodOrb) { -// bloodOrbs.add(item.getItem()); -// } -// } -// -// return super.newInstance(); -// } -// -// @Override -// public String getOverlayIdentifier() { -// return "alchemicalwizardry.alchemy"; -// } -// -// @Override -// public void loadTransferRects() { -// transferRects.add(new RecipeTransferRect(new Rectangle(134, 22, 16, 24), "alchemicalwizardry.alchemy")); -// } -// -// @Override -// public Class getGuiClass() { -// return GuiChemistrySet.class; -// } -// -// @Override -// public void loadCraftingRecipes(String outputId, Object... results) { -// if (outputId.equals("alchemicalwizardry.alchemy") && getClass() == NEIAlchemyRecipeHandler.class) { -// for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { -// if (recipe.getResult() != null) arecipes.add(new CachedAlchemyRecipe(recipe)); -// } -// } else { -// super.loadCraftingRecipes(outputId, results); -// } -// } -// -// @Override -// public void loadCraftingRecipes(ItemStack result) { -// for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { -// if (recipe == null) continue; -// if (NEIServerUtils.areStacksSameTypeCrafting(result, recipe.getResult())) { -// arecipes.add(new CachedAlchemyRecipe(recipe)); -// } -// } -// } -// -// @Override -// public void loadUsageRecipes(ItemStack ingredient) { -// if (ingredient.getItem() instanceof IBloodOrb) { -// for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { -// if (recipe == null) continue; -// if (((IBloodOrb) ingredient.getItem()).getOrbLevel() >= recipe.getOrbLevel()) { -// arecipes.add(new CachedAlchemyRecipe(recipe, ingredient)); -// } -// } -// } else { -// for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { -// if (recipe == null) continue; -// ItemStack[] stacks = recipe.getRecipe(); -// for (ItemStack stack : stacks) { -// if (NEIServerUtils.areStacksSameTypeCrafting(stack, ingredient)) { -// arecipes.add(new CachedAlchemyRecipe(recipe)); -// break; -// } -// } -// } -// } -// } -// -// @Override -// public void drawExtras(int id) { -// CachedAlchemyRecipe cache = (CachedAlchemyRecipe) arecipes.get(id); -// Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + cache.lp + "LP", getLPX(cache.lp), 34, 0); -// } -// -// public int getLPX(int lp) { -// if (lp < 10) return 122; -// else if (lp < 100) return 122; -// else if (lp < 1000) return 130; -// else if (lp < 10000) return 127; -// else if (lp < 100000) return 124; -// return 122; -// } -// -// @Override -// public String getRecipeName() { -// return StatCollector.translateToLocal("tile.blockWritingTable.name"); -// } -// -// @Override -// public String getGuiTexture() { -// return new ResourceLocation("alchemicalwizardry", "gui/nei/alchemy.png").toString(); -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java deleted file mode 100644 index 28c58e6b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java +++ /dev/null @@ -1,187 +0,0 @@ -//package WayofTime.alchemicalWizardry.client.nei; -// -//import java.awt.Dimension; -//import java.awt.Point; -//import java.awt.Rectangle; -//import java.lang.reflect.Field; -//import java.util.List; -// -//import net.minecraft.client.Minecraft; -//import net.minecraft.client.gui.ScaledResolution; -//import net.minecraft.item.ItemStack; -//import net.minecraft.util.ResourceLocation; -//import net.minecraft.util.StatCollector; -// -//import org.lwjgl.input.Mouse; -// -//import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; -//import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; -//import codechicken.nei.NEIServerUtils; -//import codechicken.nei.PositionedStack; -//import codechicken.nei.recipe.GuiRecipe; -//import codechicken.nei.recipe.TemplateRecipeHandler; -// -///** -// * NEI Altar Recipe Handler by joshie * -// */ -//public class NEIAltarRecipeHandler extends TemplateRecipeHandler { -// public class CachedAltarRecipe extends CachedRecipe { -// PositionedStack input; -//// PositionedStack inputItems; -// PositionedStack output; -// int tier, lp_amount, consumption, drain; -// -// public CachedAltarRecipe(AltarRecipe recipe) { -//// 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; -// lp_amount = recipe.liquidRequired; -// consumption = recipe.consumptionRate; -// drain = recipe.drainRate; -// } -// -// @Override -// public PositionedStack getIngredient() { -// return input; -// } -// -// @Override -// public PositionedStack getResult() { -// return output; -// } -// } -// -// @Override -// public void loadCraftingRecipes(String outputId, Object... results) { -// if (outputId.equals("alchemicalwizardry.altar") && getClass() == NEIAltarRecipeHandler.class) { -// for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) { -// if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe)); -// } -// } else { -// super.loadCraftingRecipes(outputId, results); -// } -// } -// -// @Override -// public void loadCraftingRecipes(ItemStack result) { -// for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) { -// if(NEIServerUtils.areStacksSameTypeCrafting(recipe.result, result)) { -// if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe)); -// } -// } -// } -// -// @Override -// public void loadUsageRecipes(ItemStack ingredient) { -// for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) { -// if(NEIServerUtils.areStacksSameTypeCrafting(recipe.requiredItem, ingredient)) { -// if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe)); -// } -// } -// } -// -// //Mouse Position helper -// public Point getMouse(int width, int height) { -// Point mousepos = getMousePosition(); -// int guiLeft = (width - 176) / 2; -// int guiTop = (height - 166) / 2; -// Point relMouse = new Point(mousepos.x - guiLeft, mousepos.y - guiTop); -// return relMouse; -// } -// -// //width helper, getting width normal way hates me on compile -// public int getGuiWidth(GuiRecipe gui) { -// try { -// Field f = gui.getClass().getField("width"); -// return (Integer) f.get(gui); -// } catch (NoSuchFieldException e) { -// try { -// Field f = gui.getClass().getField("field_146294_l"); -// return (Integer) f.get(gui); -// } catch (Exception e2) { -// return 0; -// } -// } catch (Exception e) { -// e.printStackTrace(); -// return 0; -// } -// } -// -// //height helper, getting height normal way hates me on compile -// public int getGuiHeight(GuiRecipe gui) { -// try { -// Field f = gui.getClass().getField("height"); -// return (Integer) f.get(gui); -// } catch (NoSuchFieldException e) { -// try { -// Field f = gui.getClass().getField("field_146295_m"); -// return (Integer) f.get(gui); -// } catch (Exception e2) { -// return 0; -// } -// } catch (Exception e) { -// e.printStackTrace(); -// return 0; -// } -// } -// -// @Override -// public void drawExtras(int id) { -// CachedAltarRecipe recipe = (CachedAltarRecipe) arecipes.get(id); -// Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + StatCollector.translateToLocal("bm.string.tier") + ": " + recipe.tier, 78, 5, 0); -// Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + "LP: " + recipe.lp_amount, 78, 15, 0); -// } -// -// @Override -// public List handleTooltip(GuiRecipe gui, List currenttip, int id) { -// currenttip = super.handleTooltip(gui, currenttip, id); -// Point mouse = getMouse(getGuiWidth(gui), getGuiHeight(gui)); -// CachedAltarRecipe recipe = (CachedAltarRecipe) arecipes.get(id); -// int yLow = id % 2 == 0 ? 38 : 102; -// int yHigh = id % 2 == 0 ? 72 : 136; -// if(mouse.x >= 19 && mouse.x <= 80 && mouse.y >= yLow && mouse.y <= yHigh) { -// currenttip.add(StatCollector.translateToLocal("bm.string.consume") + ": " + recipe.consumption + "LP/t"); -// currenttip.add(StatCollector.translateToLocal("bm.string.drain") + ": " + recipe.drain + "LP/t"); -// } -// -// return currenttip; -// } -// -// @Override -// public String getOverlayIdentifier() { -// return "altarrecipes"; -// } -// -// @Override -// public void loadTransferRects() { -// transferRects.add(new RecipeTransferRect(new Rectangle(90, 32, 22, 16), "alchemicalwizardry.altar")); -// } -// -// @Override -// public String getRecipeName() { -// return " " + StatCollector.translateToLocal("tile.bloodAltar.name"); -// } -// -// @Override -// public String getGuiTexture() { -// return new ResourceLocation("alchemicalwizardry", "gui/nei/altar.png").toString(); -// } -// -// public static Point getMousePosition() { -// Dimension size = displaySize(); -// Dimension res = displayRes(); -// return new Point(Mouse.getX() * size.width / res.width, size.height - Mouse.getY() * size.height / res.height - 1); -// } -// -// public static Dimension displaySize() { -// Minecraft mc = Minecraft.getMinecraft(); -// ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); -// return new Dimension(res.getScaledWidth(), res.getScaledHeight()); -// } -// -// public static Dimension displayRes() { -// Minecraft mc = Minecraft.getMinecraft(); -// return new Dimension(mc.displayWidth, mc.displayHeight); -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBindingRitualHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBindingRitualHandler.java deleted file mode 100644 index 58e9196d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBindingRitualHandler.java +++ /dev/null @@ -1,136 +0,0 @@ -//package WayofTime.alchemicalWizardry.client.nei; -// -//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 net.minecraft.client.Minecraft; -//import net.minecraft.client.gui.ScaledResolution; -//import net.minecraft.item.ItemStack; -//import net.minecraft.util.ResourceLocation; -//import org.lwjgl.input.Mouse; -// -//import java.awt.*; -// -///** -// * Binding Ritual Handler by Arcaratus -// */ -//public class NEIBindingRitualHandler extends TemplateRecipeHandler -//{ -// public class CachedBindingRecipe extends CachedRecipe -// { -// PositionedStack input, output; -// -// public CachedBindingRecipe(BindingRecipe recipe) -// { -// input = new PositionedStack(recipe.requiredItem, 37, 21, false); -// output = new PositionedStack(recipe.outputItem, 110, 21, false); -// } -// -// @Override -// public PositionedStack getIngredient() -// { -// return input; -// } -// -// @Override -// public PositionedStack getResult() -// { -// return output; -// } -// } -// -// @Override -// public void loadCraftingRecipes(String outputId, Object... results) -// { -// if (outputId.equals("alchemicalwizardry.bindingritual") && getClass() == NEIBindingRitualHandler.class) -// { -// for (BindingRecipe recipe : BindingRegistry.bindingRecipes) -// { -// if (recipe != null && recipe.outputItem != null) -// { -// arecipes.add(new CachedBindingRecipe(recipe)); -// } -// } -// } -// else -// { -// super.loadCraftingRecipes(outputId, results); -// } -// } -// -// @Override -// public void loadCraftingRecipes(ItemStack result) -// { -// for (BindingRecipe recipe: BindingRegistry.bindingRecipes) -// { -// if (NEIServerUtils.areStacksSameTypeCrafting(recipe.outputItem, result)) -// { -// if (recipe != null && recipe.outputItem != null) -// { -// arecipes.add(new CachedBindingRecipe(recipe)); -// } -// } -// } -// } -// -// @Override -// public void loadUsageRecipes(ItemStack ingredient) -// { -// for (BindingRecipe recipe: BindingRegistry.bindingRecipes) -// { -// if (NEIServerUtils.areStacksSameTypeCrafting(recipe.requiredItem, ingredient)) -// { -// if (recipe != null && recipe.outputItem != null) -// { -// arecipes.add(new CachedBindingRecipe(recipe)); -// } -// } -// } -// } -// -// @Override -// public String getOverlayIdentifier() -// { -// return "alchemicalwizardry.bindingritual"; -// } -// -// @Override -// public void loadTransferRects() -// { -// transferRects.add(new RecipeTransferRect(new Rectangle(68, 20, 22, 16), "alchemicalwizardry.bindingritual")); -// } -// -// @Override -// public String getRecipeName() -// { -// return "Binding Ritual"; -// } -// -// @Override -// public String getGuiTexture() -// { -// return new ResourceLocation("alchemicalwizardry", "gui/nei/bindingRitual.png").toString(); -// } -// -// public static Point getMousePosition() -// { -// Dimension size = displaySize(); -// Dimension res = displayRes(); -// return new Point(Mouse.getX() * size.width / res.width, size.height - Mouse.getY() * size.height / res.height - 1); -// } -// -// public static Dimension displaySize() -// { -// Minecraft mc = Minecraft.getMinecraft(); -// ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); -// return new Dimension(res.getScaledWidth(), res.getScaledHeight()); -// } -// -// public static Dimension displayRes() -// { -// Minecraft mc = Minecraft.getMinecraft(); -// return new Dimension(mc.displayWidth, mc.displayHeight); -// } -//} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java deleted file mode 100644 index 6701572d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java +++ /dev/null @@ -1,142 +0,0 @@ -//package WayofTime.alchemicalWizardry.client.nei; -// -//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); -// } -// -// @Override -// public void setIngredients(int width, int height, Object[] items) { -// for (int x = 0; x < width; x++) { -// for (int y = 0; y < height; y++) { -// if (items[y * width + x] == null) -// continue; -// -// 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); -// stack.setMaxSize(1); -// ingredients.add(stack); -// } else if (o instanceof Integer) { -// ArrayList orbs = new ArrayList(); -// for (Item item : NEIConfig.bloodOrbs) { -// if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) { -// orbs.add(new ItemStack(item)); -// } -// } -// -// PositionedStack stack = new PositionedStack(orbs, 25 + x * 18, 6 + y * 18, false); -// stack.setMaxSize(1); -// ingredients.add(stack); -// }else if(o instanceof List) -// { -// PositionedStack stack = new PositionedStack(o, 25 + x * 18, 6 + y * 18, false); -// stack.setMaxSize(1); -// ingredients.add(stack); -// } -// } -// } -// } -// } -// -// @Override -// public void loadCraftingRecipes(String outputId, Object... results) { -// if (outputId.equals("crafting") && getClass() == NEIBloodOrbShapedHandler.class) { -// for (IRecipe irecipe : (List) CraftingManager.getInstance().getRecipeList()) { -// if (irecipe instanceof ShapedBloodOrbRecipe) { -// CachedBloodOrbRecipe recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe); -// if (recipe == null) -// continue; -// -// recipe.computeVisuals(); -// arecipes.add(recipe); -// } -// } -// } else { -// super.loadCraftingRecipes(outputId, results); -// } -// } -// -// @Override -// public void loadCraftingRecipes(ItemStack result) { -// for (IRecipe irecipe : (List) CraftingManager.getInstance().getRecipeList()) { -// if (irecipe instanceof ShapedBloodOrbRecipe) { -// CachedBloodOrbRecipe recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe); -// if (recipe == null || !NEIServerUtils.areStacksSameTypeCrafting(recipe.result.item, result)) -// continue; -// -// recipe.computeVisuals(); -// arecipes.add(recipe); -// } -// } -// } -// -// @Override -// public void loadUsageRecipes(ItemStack ingredient) { -// for (IRecipe irecipe : (List) CraftingManager.getInstance().getRecipeList()) { -// CachedShapedRecipe recipe = null; -// if (irecipe instanceof ShapedBloodOrbRecipe) -// recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe); -// -// if (recipe == null || !recipe.contains(recipe.ingredients, ingredient.getItem())) -// continue; -// -// recipe.computeVisuals(); -// if (recipe.contains(recipe.ingredients, ingredient)) { -// recipe.setIngredientPermutation(recipe.ingredients, ingredient); -// arecipes.add(recipe); -// } -// } -// } -// -// private CachedBloodOrbRecipe forgeShapedRecipe(ShapedBloodOrbRecipe recipe) { -// int width; -// int height; -// try { -// width = recipe.width; -// height = recipe.height; -// } catch (Exception e) { -// e.printStackTrace(); -// return null; -// } -// -// Object[] items = recipe.getInput(); -// 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()); -// } -// -// @Override -// public void loadTransferRects() { -// transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting")); -// } -// -// -// @Override -// public String getRecipeName() { -// return StatCollector.translateToLocal("bm.string.crafting.orb.shaped"); -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java deleted file mode 100644 index bd05a2d7..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java +++ /dev/null @@ -1,135 +0,0 @@ -//package WayofTime.alchemicalWizardry.client.nei; -// -//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); -// } -// -// @Override -// public void setIngredients(List items) { -// ingredients.clear(); -// for (int ingred = 0; ingred < items.size(); ingred++) { -// 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); -// stack.setMaxSize(1); -// ingredients.add(stack); -// } else if (o instanceof Integer) { -// ArrayList orbs = new ArrayList(); -// for (Item item : NEIConfig.bloodOrbs) { -// if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) { -// orbs.add(new ItemStack(item)); -// } -// } -// -// 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); -// stack.setMaxSize(1); -// ingredients.add(stack); -// } -// } -// } -// } -// -// @Override -// public void loadCraftingRecipes(String outputId, Object... results) { -// if (outputId.equals("crafting") && getClass() == NEIBloodOrbShapelessHandler.class) { -// List allrecipes = CraftingManager.getInstance().getRecipeList(); -// for (IRecipe irecipe : allrecipes) { -// CachedBloodOrbRecipe recipe = null; -// if (irecipe instanceof ShapelessBloodOrbRecipe) -// recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe); -// -// if (recipe == null) -// continue; -// -// arecipes.add(recipe); -// } -// } else { -// super.loadCraftingRecipes(outputId, results); -// } -// } -// -// @Override -// public void loadCraftingRecipes(ItemStack result) { -// List allrecipes = CraftingManager.getInstance().getRecipeList(); -// for (IRecipe irecipe : allrecipes) { -// if (NEIServerUtils.areStacksSameTypeCrafting(irecipe.getRecipeOutput(), result)) { -// CachedBloodOrbRecipe recipe = null; -// if (irecipe instanceof ShapelessBloodOrbRecipe) -// recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe); -// -// if (recipe == null) -// continue; -// -// arecipes.add(recipe); -// } -// } -// } -// -// @Override -// public void loadUsageRecipes(ItemStack ingredient) { -// List allrecipes = CraftingManager.getInstance().getRecipeList(); -// for (IRecipe irecipe : allrecipes) { -// CachedBloodOrbRecipe recipe = null; -// if (irecipe instanceof ShapelessBloodOrbRecipe) -// recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe); -// -// if (recipe == null) -// continue; -// -// if (recipe.contains(recipe.ingredients, ingredient)) { -// recipe.setIngredientPermutation(recipe.ingredients, ingredient); -// arecipes.add(recipe); -// } -// } -// } -// -// public CachedBloodOrbRecipe forgeShapelessRecipe(ShapelessBloodOrbRecipe recipe) { -// ArrayList items = recipe.getInput(); -// -// for (Object item : items) -// if (item instanceof List && ((List) item).isEmpty())//ore handler, no ores -// return null; -// -// return new CachedBloodOrbRecipe(items, recipe.getRecipeOutput()); -// } -// -// @Override -// public void loadTransferRects() { -// transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting")); -// } -// -// @Override -// public String getOverlayIdentifier() { -// return "crafting"; -// } -// -// @Override -// public String getRecipeName() { -// return StatCollector.translateToLocal("bm.string.crafting.orb.shapeless"); -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java deleted file mode 100644 index bedb5213..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java +++ /dev/null @@ -1,36 +0,0 @@ -//package WayofTime.alchemicalWizardry.client.nei; -// -// -//import java.util.ArrayList; -// -//import net.minecraft.item.Item; -//import codechicken.nei.api.API; -//import codechicken.nei.api.IConfigureNEI; -// -//public class NEIConfig implements IConfigureNEI { -// public static ArrayList bloodOrbs = new ArrayList(); -// -// @Override -// public void loadConfig() { -// API.registerRecipeHandler(new NEIAlchemyRecipeHandler()); -// API.registerUsageHandler(new NEIAlchemyRecipeHandler()); -// API.registerRecipeHandler(new NEIAltarRecipeHandler()); -// API.registerUsageHandler(new NEIAltarRecipeHandler()); -// API.registerRecipeHandler(new NEIBloodOrbShapedHandler()); -// API.registerUsageHandler(new NEIBloodOrbShapedHandler()); -// API.registerRecipeHandler(new NEIBloodOrbShapelessHandler()); -// API.registerUsageHandler(new NEIBloodOrbShapelessHandler()); -// API.registerRecipeHandler(new NEIBindingRitualHandler()); -// API.registerUsageHandler(new NEIBindingRitualHandler()); -// } -// -// @Override -// public String getName() { -// return "Blood Magic NEI"; -// } -// -// @Override -// public String getVersion() { -// return "1.3"; -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/ColourThreshold.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/ColourThreshold.java deleted file mode 100644 index 1719b4f6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/ColourThreshold.java +++ /dev/null @@ -1,50 +0,0 @@ -package WayofTime.alchemicalWizardry.client.renderer; - -import java.util.List; - -/** - * This class is a utility class that was created by bspkrs. - * 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; - - public ColourThreshold(int t, String c) - { - threshold = t; - colorCode = c; - } - - @Override - public String toString() - { - return String.valueOf(threshold) + ", " + colorCode; - } - - @Override - public int compareTo(ColourThreshold o) - { - if (this.threshold > o.threshold) - return 1; - else if (this.threshold < o.threshold) - return -1; - else - return 0; - } - - /** - * 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; - - return "f"; - } -} - diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDElement.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDElement.java deleted file mode 100644 index da724a81..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDElement.java +++ /dev/null @@ -1,142 +0,0 @@ -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; - -public class HUDElement -{ - public final ItemStack itemStack; - public final int iconW; - public final int iconH; - public final int padW; - public final int value; - private int elementW; - private int elementH; - private String itemName = ""; - private int itemNameW; - private String itemDamage = ""; - private int itemDamageW; - private Minecraft mc = Minecraft.getMinecraft(); - - private static final int offset = 5; - - public boolean enableItemName = false; - public boolean showValue = true; - public boolean showDamageOverlay = false; - public boolean showItemCount = false; - - static RenderItem itemRenderer = Minecraft.getMinecraft().getRenderItem(); - - public HUDElement(ItemStack itemStack, int iconW, int iconH, int padW, int value) - { - this.itemStack = itemStack; - this.iconW = iconW; - this.iconH = iconH; - this.padW = padW; - this.value = value; - - initSize(); - } - - public int width() - { - return elementW; - } - - public int height() - { - return elementH; - } - - private void initSize() - { - elementH = enableItemName ? Math.max(Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT * 2, iconH) : - Math.max(mc.fontRendererObj.FONT_HEIGHT, iconH); - - if (itemStack != null) - { - int damage; - int maxDamage; - - if (showValue) - { - maxDamage = itemStack.getMaxDamage() + 1; - damage = maxDamage - itemStack.getItemDamage(); - - boolean showSpecialValue = true; - boolean showValue = false; - boolean showPercent = false; - - boolean showMaxDamage = true; - 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) + "%"; - } - - itemDamageW = mc.fontRendererObj.getStringWidth(HUDUtils.stripCtrl(itemDamage)); - elementW = padW + iconW + padW + itemDamageW + offset; - - if (enableItemName) - { - itemName = itemStack.getDisplayName(); - elementW = padW + iconW + padW + - Math.max(mc.fontRendererObj.getStringWidth(HUDUtils.stripCtrl(itemName)), itemDamageW); - } - - itemNameW = mc.fontRendererObj.getStringWidth(HUDUtils.stripCtrl(itemName)); - } - } - - public void renderToHud(int x, int y) - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - GL11.glEnable(32826 /* GL_RESCALE_NORMAL_EXT */); - RenderHelper.enableStandardItemLighting(); - RenderHelper.enableGUIStandardItemLighting(); - itemRenderer.zLevel = 200.0F; - - //if (ArmorStatusHUD.alignMode.toLowerCase().contains("right")) - boolean toRight = true; - if (toRight) - { - itemRenderer.func_180450_b(itemStack, x - (iconW + padW), y); - HUDUtils.renderItemOverlayIntoGUI(mc.fontRendererObj, itemStack, x - (iconW + padW), y, showDamageOverlay, showItemCount); - - RenderHelper.disableStandardItemLighting(); - GL11.glDisable(32826 /* GL_RESCALE_NORMAL_EXT */); - GL11.glDisable(GL11.GL_BLEND); - - mc.fontRendererObj.drawString(itemName + "\247r", x - (padW + iconW + padW) - itemNameW, y, 0xffffff); - mc.fontRendererObj.drawString(itemDamage + "\247r", x - (padW + iconW + padW) - itemDamageW, - y + (enableItemName ? elementH / 2 : elementH / 4), 0xffffff); - } else - { - itemRenderer.func_180450_b(itemStack, x, y); - HUDUtils.renderItemOverlayIntoGUI(mc.fontRendererObj, itemStack, x, y, showDamageOverlay, showItemCount); - - RenderHelper.disableStandardItemLighting(); - GL11.glDisable(32826 /* GL_RESCALE_NORMAL_EXT */); - GL11.glDisable(GL11.GL_BLEND); - - mc.fontRendererObj.drawString(itemName + "\247r", x + iconW + padW, y, 0xffffff); - mc.fontRendererObj.drawString(itemDamage + "\247r", x + iconW + padW, - y + (enableItemName ? elementH / 2 : elementH / 4), 0xffffff); - } - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDUtils.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDUtils.java deleted file mode 100644 index 957067e6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDUtils.java +++ /dev/null @@ -1,275 +0,0 @@ -package WayofTime.alchemicalWizardry.client.renderer; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.renderer.OpenGlHelper; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; -import net.minecraft.entity.player.EntityPlayer; -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; - -/** - * This class is a utility class that was created by bspkrs. - * 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}; - - 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). - * - * @param x x axis offset - * @param y y axis offset - * @param u bound resource location image x offset - * @param v bound resource location image y offset - * @param width the desired box width - * @param height the desired box height - * @param textureWidth the width of the box texture in the resource location image - * @param textureHeight the height of the box texture in the resource location image - * @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) - { - drawContinuousTexturedBox(x, y, u, v, width, height, textureWidth, textureHeight, borderSize, borderSize, borderSize, borderSize, zLevel); - } - - /** - * 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 - * @param x x axis offset - * @param y y axis offset - * @param u bound resource location image x offset - * @param v bound resource location image y offset - * @param width the desired box width - * @param height the desired box height - * @param textureWidth the width of the box texture in the resource location image - * @param textureHeight the height of the box texture in the resource location image - * @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) - { - drawContinuousTexturedBox(res, x, y, u, v, width, height, textureWidth, textureHeight, borderSize, borderSize, borderSize, borderSize, zLevel); - } - - /** - * 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 - * @param x x axis offset - * @param y y axis offset - * @param u bound resource location image x offset - * @param v bound resource location image y offset - * @param width the desired box width - * @param height the desired box height - * @param textureWidth the width of the box texture in the resource location image - * @param textureHeight the height of the box texture in the resource location image - * @param topBorder the size of the box's top border - * @param bottomBorder the size of the box's bottom border - * @param leftBorder the size of the box's left border - * @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) - { - Minecraft.getMinecraft().getTextureManager().bindTexture(res); - drawContinuousTexturedBox(x, y, u, v, width, height, textureWidth, textureHeight, topBorder, bottomBorder, leftBorder, rightBorder, zLevel); - } - - /** - * 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 - * @param u bound resource location image x offset - * @param v bound resource location image y offset - * @param width the desired box width - * @param height the desired box height - * @param textureWidth the width of the box texture in the resource location image - * @param textureHeight the height of the box texture in the resource location image - * @param topBorder the size of the box's top border - * @param bottomBorder the size of the box's bottom border - * @param leftBorder the size of the box's left border - * @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) - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - GL11.glEnable(GL11.GL_BLEND); - OpenGlHelper.glBlendFunc(770, 771, 1, 0); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - - int fillerWidth = textureWidth - leftBorder - rightBorder; - int fillerHeight = textureHeight - topBorder - bottomBorder; - int canvasWidth = width - leftBorder - rightBorder; - int canvasHeight = height - topBorder - bottomBorder; - int xPasses = canvasWidth / fillerWidth; - int remainderWidth = canvasWidth % fillerWidth; - int yPasses = canvasHeight / fillerHeight; - int remainderHeight = canvasHeight % fillerHeight; - - // Draw Border - // Top Left - drawTexturedModalRect(x, y, u, v, leftBorder, topBorder, zLevel); - // Top Right - drawTexturedModalRect(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); - // Bottom Right - drawTexturedModalRect(x + leftBorder + canvasWidth, y + topBorder + canvasHeight, u + leftBorder + fillerWidth, v + topBorder + fillerHeight, rightBorder, bottomBorder, zLevel); - - for (int i = 0; i < xPasses + (remainderWidth > 0 ? 1 : 0); i++) - { - // Top Border - drawTexturedModalRect(x + leftBorder + (i * fillerWidth), y, u + leftBorder, v, (i == xPasses ? remainderWidth : fillerWidth), topBorder, zLevel); - // Bottom Border - drawTexturedModalRect(x + leftBorder + (i * fillerWidth), y + topBorder + canvasHeight, u + leftBorder, v + topBorder + fillerHeight, (i == xPasses ? remainderWidth : fillerWidth), bottomBorder, 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); - } - - // Side Borders - for (int j = 0; j < yPasses + (remainderHeight > 0 ? 1 : 0); j++) - { - // Left Border - drawTexturedModalRect(x, y + topBorder + (j * fillerHeight), u, v + topBorder, leftBorder, (j == yPasses ? remainderHeight : fillerHeight), zLevel); - // Right Border - drawTexturedModalRect(x + leftBorder + canvasWidth, y + topBorder + (j * fillerHeight), u + leftBorder + fillerWidth, v + topBorder, rightBorder, (j == yPasses ? remainderHeight : fillerHeight), zLevel); - } - } - - public static void drawTexturedModalRect(int x, int y, int u, int v, int width, int height, float zLevel) - { - float var7 = 0.00390625F; - float var8 = 0.00390625F; - Tessellator tessellator = Tessellator.getInstance(); - WorldRenderer wr = tessellator.getWorldRenderer(); - wr.startDrawingQuads(); - wr.addVertexWithUV((x + 0), (y + height), zLevel, ((u + 0) * var7), ((v + height) * var8)); - wr.addVertexWithUV((x + width), (y + height), zLevel, ((u + width) * var7), ((v + height) * var8)); - wr.addVertexWithUV((x + width), (y + 0), zLevel, ((u + width) * var7), ((v + 0) * var8)); - wr.addVertexWithUV((x + 0), (y + 0), zLevel, ((u + 0) * var7), ((v + 0) * var8)); - tessellator.draw(); - } - - /** - * 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. - */ - 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.getItemDamage() * 13.0D / itemStack.getMaxDamage()); - int var7 = (int) Math.round(255.0D - itemStack.getItemDamage() * 255.0D / itemStack.getMaxDamage()); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_DEPTH_TEST); - GL11.glDisable(GL11.GL_TEXTURE_2D); - Tessellator var8 = Tessellator.getInstance(); - int var9 = 255 - var7 << 16 | var7 << 8; - int var10 = (255 - var7) / 4 << 16 | 16128; - renderQuad(var8, x + 2, y + 13, 13, 2, 0); - renderQuad(var8, x + 2, y + 13, 12, 1, var10); - renderQuad(var8, x + 2, y + 13, var11, 1, var9); - GL11.glEnable(GL11.GL_TEXTURE_2D); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_DEPTH_TEST); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - } - - if (showCount) - { - int count = 0; - - 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); - - if (count > 1) - { - String var6 = "" + count; - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_DEPTH_TEST); - fontRenderer.drawString(var6, x + 19 - 2 - fontRenderer.getStringWidth(var6), y + 6 + 3, 16777215); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_DEPTH_TEST); - } - } - } - } - - /** - * 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) - { - WorldRenderer wr = tessellator.getWorldRenderer(); - wr.startDrawingQuads(); -// wr.setColorOpaque_I(color); - wr.addVertex((x + 0), (y + 0), 0.0D); - wr.addVertex((x + 0), (y + height), 0.0D); - wr.addVertex((x + width), (y + height), 0.0D); - wr.addVertex((x + width), (y + 0), 0.0D); - tessellator.draw(); - } - - public static int countInInventory(EntityPlayer player, Item item) - { - return countInInventory(player, item, -1); - } - - 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()) && (md == -1 || player.inventory.mainInventory[i].getItemDamage() == md)) - count += player.inventory.mainInventory[i].stackSize; - return count; - } - - public static String stripCtrl(String s) - { - return s.replaceAll("(?i)\247[0-9a-fklmnor]", ""); - } -} - diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderFakeBlocks.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderFakeBlocks.java deleted file mode 100644 index 954edba0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderFakeBlocks.java +++ /dev/null @@ -1,103 +0,0 @@ -package WayofTime.alchemicalWizardry.client.renderer; - -import net.minecraft.block.Block; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; -import net.minecraft.world.World; - -/* - * 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) - { - double maxX = minX + 1; - double maxY = minY + 1; - double maxZ = minZ + 1; - Tessellator tessellator = Tessellator.getInstance(); - WorldRenderer wr = tessellator.getWorldRenderer(); - - wr.startDrawingQuads(); -// wr.setColorRGBA(255, 255, 255, 200); - - float texMinU, texMaxU, texMinV, texMaxV; - - texMinU = getMinU(block, meta, 0); - texMaxU = getMaxU(block, meta, 0); - texMinV = getMinV(block, meta, 0); - texMaxV = getMaxV(block, meta, 0); - wr.addVertexWithUV(minX, minY, minZ, texMinU, texMinV); - wr.addVertexWithUV(maxX, minY, minZ, texMaxU, texMinV); - wr.addVertexWithUV(maxX, minY, maxZ, texMaxU, texMaxV); - wr.addVertexWithUV(minX, minY, maxZ, texMinU, texMaxV); - - texMinU = getMinU(block, meta, 1); - texMaxU = getMaxU(block, meta, 1); - texMinV = getMinV(block, meta, 1); - texMaxV = getMaxV(block, meta, 1); - wr.addVertexWithUV(minX, maxY, maxZ, texMinU, texMaxV); - wr.addVertexWithUV(maxX, maxY, maxZ, texMaxU, texMaxV); - wr.addVertexWithUV(maxX, maxY, minZ, texMaxU, texMinV); - wr.addVertexWithUV(minX, maxY, minZ, texMinU, texMinV); - - texMinU = getMinU(block, meta, 2); - texMaxU = getMaxU(block, meta, 2); - texMinV = getMinV(block, meta, 2); - texMaxV = getMaxV(block, meta, 2); - wr.addVertexWithUV(maxX, minY, minZ, texMinU, texMaxV); - wr.addVertexWithUV(minX, minY, minZ, texMaxU, texMaxV); - wr.addVertexWithUV(minX, maxY, minZ, texMaxU, texMinV); - wr.addVertexWithUV(maxX, maxY, minZ, texMinU, texMinV); - - texMinU = getMinU(block, meta, 3); - texMaxU = getMaxU(block, meta, 3); - texMinV = getMinV(block, meta, 3); - texMaxV = getMaxV(block, meta, 3); - wr.addVertexWithUV(minX, minY, maxZ, texMinU, texMaxV); - wr.addVertexWithUV(maxX, minY, maxZ, texMaxU, texMaxV); - wr.addVertexWithUV(maxX, maxY, maxZ, texMaxU, texMinV); - wr.addVertexWithUV(minX, maxY, maxZ, texMinU, texMinV); - - texMinU = getMinU(block, meta, 4); - texMaxU = getMaxU(block, meta, 4); - texMinV = getMinV(block, meta, 4); - texMaxV = getMaxV(block, meta, 4); - wr.addVertexWithUV(minX, minY, minZ, texMinU, texMaxV); - wr.addVertexWithUV(minX, minY, maxZ, texMaxU, texMaxV); - wr.addVertexWithUV(minX, maxY, maxZ, texMaxU, texMinV); - wr.addVertexWithUV(minX, maxY, minZ, texMinU, texMinV); - - texMinU = getMinU(block, meta, 5); - texMaxU = getMaxU(block, meta, 5); - texMinV = getMinV(block, meta, 5); - texMaxV = getMaxV(block, meta, 5); - wr.addVertexWithUV(maxX, minY, maxZ, texMinU, texMaxV); - wr.addVertexWithUV(maxX, minY, minZ, texMaxU, texMaxV); - wr.addVertexWithUV(maxX, maxY, minZ, texMaxU, texMinV); - wr.addVertexWithUV(maxX, maxY, maxZ, texMinU, texMinV); - - tessellator.draw(); - } - - private static float getMinU(Block block, int meta, int side) - { - return 0; - } - - private static float getMaxU(Block block, int meta, int side) - { - return 256; - } - - private static float getMinV(Block block, int meta, int side) - { - return 0; - } - - private static float getMaxV(Block block, int meta, int side) - { - return 256; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java deleted file mode 100644 index 7c551e80..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java +++ /dev/null @@ -1,326 +0,0 @@ -package WayofTime.alchemicalWizardry.client.renderer; - -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; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; - -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; - - public static int lpBarX = 12; - public static int lpBarY = 75; - - public static int zLevel = 0; - - private static int xOffsetDefault = +50; - public static int xOffset = xOffsetDefault; - private static int yOffsetDefault = 2; - public static int yOffset = yOffsetDefault; - private static int yOffsetBottomCenterDefault = 41; - public static int yOffsetBottomCenter = yOffsetBottomCenterDefault; - private static boolean applyXOffsetToCenterDefault = true; - public static boolean applyXOffsetToCenter = applyXOffsetToCenterDefault; - private static boolean applyYOffsetToMiddleDefault = false; - public static boolean applyYOffsetToMiddle = applyYOffsetToMiddleDefault; - - public static String listMode = "horizontal"; - public static String alignMode = "bottomcenter"; - - private static ScaledResolution scaledResolution; - - public static boolean onTickInGame(Minecraft mc) - { - if (enabled && (mc.inGameHasFocus || mc.currentScreen == null || (mc.currentScreen instanceof GuiChat && showInChat)) - && !mc.gameSettings.showDebugInfo) - { - EntityPlayer player = mc.thePlayer; - player.getEntityData(); - if (SpellHelper.canPlayerSeeAlchemy(player)) - { - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - scaledResolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); - displayArmorStatus(mc); - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - } - - ItemStack stack = player.inventory.armorItemInSlot(2); - if(stack != null && stack.getItem() instanceof OmegaArmour) - { - int maxAmount = (int) APISpellHelper.getPlayerMaxReagentAmount(player); - - if(maxAmount > 0) - { - float val = APISpellHelper.getPlayerCurrentReagentAmount(player); - ReagentStack reagentStack = new ReagentStack(APISpellHelper.getPlayerReagentType(player), (int) val); - - if(reagentStack != null && reagentStack.amount > 0) - { - renderTestHUD(mc, reagentStack, maxAmount); - } - } - } - - if(SpellHelper.canPlayerSeeLPBar(player)) - { - int max = APISpellHelper.getPlayerMaxLPTag(player); - - if(max > 1) - { - renderLPHUD(mc, APISpellHelper.getPlayerLPTag(player), max); - } - } - - float maxHP = APISpellHelper.getCurrentAdditionalMaxHP(player); -// System.out.println("MaxHP: " + maxHP); - if(maxHP > 0) - { - renderHPHUD(mc, APISpellHelper.getCurrentAdditionalHP(player), maxHP); - } - } - - return true; - } - - private static void renderLPHUD(Minecraft mc, int lpAmount, int maxAmount) - { - GL11.glPushMatrix(); - int xSize = 32; - int ySize = 32; - - int amount = Math.max((int) (256 * ((double)(maxAmount - lpAmount) / maxAmount)), 0); - - int x = (lpBarX - xSize / 2) * 8; - int y = (lpBarY - ySize / 2) * 8; - - ResourceLocation test2 = new ResourceLocation("alchemicalwizardry", "textures/gui/container1.png"); - GL11.glColor4f(1, 0, 0, 1.0F); - mc.getTextureManager().bindTexture(test2); - - GL11.glScalef(1f/8f, 1f/8f, 1f/8f); - - drawTexturedModalRect(x, y + amount, 0, amount, 256, 256 - amount); - - ResourceLocation test = new ResourceLocation("alchemicalwizardry", "textures/gui/lpVial.png"); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - mc.getTextureManager().bindTexture(test); - - - drawTexturedModalRect(x, y, 0, 0, 256, 256); - - GL11.glPopMatrix(); - } - - private static void renderHPHUD(Minecraft mc, float hpAmount, float maxAmount) - { - GL11.glPushMatrix(); - int xSize = 32; - int ySize = 32; - - int amount = Math.max((int) (256 * ((double)(hpAmount) / maxAmount)), 0); - - int x = (lpBarX + 8 - xSize / 2) * 8; - int y = (lpBarY + 32 - ySize / 2) * 8; - - ResourceLocation test2 = new ResourceLocation("alchemicalwizardry", "textures/gui/HPBar2.png"); - GL11.glColor4f(1, 0, 0, 1.0F); - mc.getTextureManager().bindTexture(test2); - - GL11.glScalef(1f/8f, 1f/8f, 1f/8f); - - drawTexturedModalRect(x, y, amount, 0, amount, 256); - - ResourceLocation test = new ResourceLocation("alchemicalwizardry", "textures/gui/HPBar1.png"); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - mc.getTextureManager().bindTexture(test); - - - drawTexturedModalRect(x, y, 0, 0, 256, 256); - - GL11.glPopMatrix(); - } - - private static List getHUDElements(Minecraft mc) - { - List elements = new ArrayList(); - - MovingObjectPosition movingobjectposition = mc.objectMouseOver; - World world = mc.theWorld; - - if (movingobjectposition == null) - { - return elements; - } else - { - if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - BlockPos pos = movingobjectposition.func_178782_a(); - - TileEntity tile = world.getTileEntity(pos); - - if (!(tile instanceof IReagentHandler)) - { - return elements; - } - - IReagentHandler relay = (IReagentHandler) tile; - - ReagentContainerInfo[] infos = relay.getContainerInfo(movingobjectposition.field_178784_b); - - if (infos != null) - { - for (ReagentContainerInfo info : infos) - { - if (info == null || info.reagent == null || info.reagent.reagent == null) - { - continue; - } - - ItemStack itemStack = ReagentRegistry.getItemForReagent(info.reagent.reagent); - - if (itemStack != null) - elements.add(new HUDElement(itemStack, 16, 16, 2, info.reagent.amount)); - } - } - } - } - - return elements; - } - - private static int getX(int width) - { - if (alignMode.toLowerCase().contains("center")) - return scaledResolution.getScaledWidth() / 2 - width / 2 + (applyXOffsetToCenter ? xOffset : 0); - else if (alignMode.toLowerCase().contains("right")) - return scaledResolution.getScaledWidth() - width - xOffset; - else - return xOffset; - } - - private static int getY(int rowCount, int height) - { - if (alignMode.toLowerCase().contains("middle")) - return (scaledResolution.getScaledHeight() / 2) - ((rowCount * height) / 2) + (applyYOffsetToMiddle ? yOffset : 0); - else if (alignMode.equalsIgnoreCase("bottomleft") || alignMode.equalsIgnoreCase("bottomright")) - return scaledResolution.getScaledHeight() - (rowCount * height) - yOffset; - else if (alignMode.equalsIgnoreCase("bottomcenter")) - return scaledResolution.getScaledHeight() - (rowCount * height) - yOffsetBottomCenter; - else - return yOffset; - } - - private static int getElementsWidth(List elements) - { - int r = 0; - for (HUDElement he : elements) - r += he.width(); - - 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_) - { - float f = 0.00390625F; - float f1 = 0.00390625F; - Tessellator tessellator = Tessellator.getInstance(); - WorldRenderer wr = tessellator.getWorldRenderer(); - wr.startDrawingQuads(); - wr.addVertexWithUV((double)p_73729_1_, p_73729_2_ + p_73729_6_, (double)zLevel, (p_73729_3_ * f), (p_73729_4_ + p_73729_6_) * f1); - wr.addVertexWithUV(p_73729_1_ + p_73729_5_, p_73729_2_ + p_73729_6_, (double)zLevel, (p_73729_3_ + p_73729_5_) * f, (p_73729_4_ + p_73729_6_) * f1); - wr.addVertexWithUV(p_73729_1_ + p_73729_5_, (double)p_73729_2_, (double)zLevel, (p_73729_3_ + p_73729_5_) * f, p_73729_4_ * f1); - wr.addVertexWithUV((double)p_73729_1_, (double)p_73729_2_, (double)zLevel, (double)(p_73729_3_ * f), p_73729_4_ * f1); - tessellator.draw(); - } - - private static void renderTestHUD(Minecraft mc, ReagentStack reagentStack, int maxAmount) - { - GL11.glPushMatrix(); - Reagent reagent = reagentStack.reagent; - int xSize = 32; - int ySize = 32; - - int amount = Math.max((int) (256 * ((double)(maxAmount - reagentStack.amount) / maxAmount)), 0); - - int x = (lpBarX + 16 - xSize / 2) * 8; - int y = (lpBarY - ySize / 2) * 8; - - GL11.glScalef(1f/8f, 1f/8f, 1f/8f); - - ResourceLocation test2 = new ResourceLocation("alchemicalwizardry", "textures/gui/container1.png"); - GL11.glColor4f(reagent.getColourRed() / 255f, reagent.getColourGreen() / 255f, reagent.getColourBlue() / 255f, 1.0F); - mc.getTextureManager().bindTexture(test2); - - drawTexturedModalRect(x, y + amount, 0, amount, 256, 256 - amount); - - ResourceLocation test = new ResourceLocation("alchemicalwizardry", "textures/gui/container.png"); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - mc.getTextureManager().bindTexture(test); - - - drawTexturedModalRect(x, y, 0, 0, 256, 256); - - GL11.glPopMatrix(); - } - - private static void displayArmorStatus(Minecraft mc) - { - List elements = getHUDElements(mc); - - if (elements.size() > 0) - { - int yOffset = enableItemName ? 18 : 16; - - if (listMode.equalsIgnoreCase("vertical")) - { - int yBase = getY(elements.size(), yOffset); - - for (HUDElement e : elements) - { - e.renderToHud((alignMode.toLowerCase().contains("right") ? getX(0) : getX(e.width())), yBase); - yBase += yOffset; - } - } else if (listMode.equalsIgnoreCase("horizontal")) - { - int totalWidth = getElementsWidth(elements); - int yBase = getY(1, yOffset); - int xBase = getX(totalWidth); - int prevX = 0; - - for (HUDElement e : elements) - { - e.renderToHud(xBase + prevX + (alignMode.toLowerCase().contains("right") ? e.width() : 0), yBase); - prevX += (e.width()); - } - } //else if (listMode.equalsIgnoreCase("compound")) - { - //TODO - } - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java deleted file mode 100644 index 9b877d3f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java +++ /dev/null @@ -1,96 +0,0 @@ -package WayofTime.alchemicalWizardry.client.renderer; - -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; -import net.minecraftforge.client.event.RenderWorldLastEvent; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.Vector3; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.rituals.Rituals; -import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; - -/** - * 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(); - EntityPlayer player = minecraft.thePlayer; - World world = player.worldObj; - - if (minecraft.objectMouseOver == null || minecraft.objectMouseOver.typeOfHit != MovingObjectPosition.MovingObjectType.BLOCK) - { - return; - } - - BlockPos pos = minecraft.objectMouseOver.func_178782_a(); - - TileEntity tileEntity = world.getTileEntity(pos); - - if (!(tileEntity instanceof IMasterRitualStone)) - { - return; - } - - Vector3 vec3 = new Vector3(pos.getX(), pos.getY(), pos.getZ()); - 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(); - int direction = ritualDiviner.getDirection(player.inventory.getCurrentItem()); - RitualEffect ritualEffect = getEffectFromString(ritualDiviner.getCurrentRitual(player.inventory.getCurrentItem())); - - if (ritualEffect == null) - { - return; - } - - GL11.glPushMatrix(); - 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))); - double minX = vX.x - posX; - double minY = vX.y - posY; - double minZ = vX.z - posZ; - - if (!world.getBlockState(new BlockPos(vX.x, vX.y, vX.z)).getBlock().isOpaqueCube()) - { - RenderFakeBlocks.drawFakeBlock(vX, ModBlocks.ritualStone, ritualComponent.getStoneType(), minX, minY, minZ, world); - } - } - GL11.glPopMatrix(); - } - } - - public static RitualEffect getEffectFromString(String name) - { - Rituals ritual = Rituals.ritualMap.get(name); - - if (ritual == null) - return null; - - return ritual.effect; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java deleted file mode 100644 index beb46388..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java +++ /dev/null @@ -1,825 +0,0 @@ -package WayofTime.alchemicalWizardry.common; - -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.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IProjectile; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityMob; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.entity.projectile.EntityThrowable; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; -import net.minecraftforge.common.ISpecialArmor.ArmorProperties; -import net.minecraftforge.event.AnvilUpdateEvent; -import net.minecraftforge.event.entity.living.EnderTeleportEvent; -import net.minecraftforge.event.entity.living.LivingAttackEvent; -import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; -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 net.minecraftforge.fml.client.event.ConfigChangedEvent; -import net.minecraftforge.fml.common.Optional; -import net.minecraftforge.fml.common.eventhandler.Event.Result; -import net.minecraftforge.fml.common.eventhandler.EventPriority; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; -import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.oredict.OreDictionary; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.BloodMagicConfiguration; -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.entity.projectile.EnergyBlastProjectile; -import WayofTime.alchemicalWizardry.common.items.BoundBlade; -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; - -public class AlchemicalWizardryEventHooks -{ - public static Map playerFlightBuff = new HashMap(); - public static List playersWith1Step = new ArrayList(); - - public static Map> respawnMap = new HashMap>(); - public static Map> forceSpawnMap = new HashMap>(); - - public static Random rand = new Random(); - - @SubscribeEvent - public void onEntityInteractEvent(EntityInteractEvent event) - { - EntityPlayer player = event.entityPlayer; - OmegaParadigm parad = OmegaRegistry.getOmegaParadigmOfWeilder(player); - if(parad == null) - { - return; - } - ItemStack heldItem = player.getHeldItem(); - if(heldItem == null) - { - parad.onEmptyHandEntityInteract(player, event.target); - }else - { - if(heldItem.getItem() instanceof BoundBlade) - { - parad.onBoundSwordInteractWithEntity(player, event.target); - } - } - } - - @SubscribeEvent - public void onAnvilUpdateEvent(AnvilUpdateEvent event) - { - if(event.isCancelable() && event.left != null && event.right != null && (event.left.getItem() instanceof BoundArmour || event.right.getItem() instanceof BoundArmour)) - { - event.setCanceled(true); - } - } - - @SubscribeEvent(priority=EventPriority.HIGHEST) - public void onLivingHurtEvent(LivingHurtEvent event) - { - if(!event.isCanceled() && event.entityLiving instanceof EntityPlayer && !event.entityLiving.worldObj.isRemote) - { - EntityPlayer player = (EntityPlayer)event.entityLiving; - - if(APISpellHelper.getCurrentAdditionalMaxHP(player) > 0) - { - APISpellHelper.setPlayerReagentRegenCooldownTag(player, 20 * 20); - } - - float prevHp = APISpellHelper.getCurrentAdditionalHP((EntityPlayer)event.entityLiving); - if(prevHp > 0) - { - 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 - - float ratio = recalculatedAmount / event.ammount; - - float f1 = recalculatedAmount; - recalculatedAmount = Math.max(recalculatedAmount - player.getAbsorptionAmount(), 0.0F); - player.setAbsorptionAmount(player.getAbsorptionAmount() - (f1 - recalculatedAmount)); - - if(prevHp > recalculatedAmount) - { - float hp = (prevHp - recalculatedAmount); //New HP - this is obviously > 0... - -// event.setCanceled(true); - event.ammount = 0; - Reagent reagent = APISpellHelper.getPlayerReagentType(player); - OmegaParadigm paradigm = OmegaRegistry.getParadigmForReagent(reagent); - if(paradigm != null) - { - ItemStack chestStack = player.inventory.armorInventory[2]; - - if(chestStack != null && chestStack.getItem() instanceof OmegaArmour) - { - if(((OmegaArmour)chestStack.getItem()).paradigm == paradigm) - { - paradigm.onHPBarDepleted(player, chestStack); - } - } - } - - APISpellHelper.setCurrentAdditionalHP(player, hp); - NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getAddedHPPacket(hp, APISpellHelper.getCurrentAdditionalMaxHP(player)), (EntityPlayerMP)player); - -// if(event.ammount <= 0.3) -// { -// event.ammount++; -// } - }else - { - APISpellHelper.setCurrentAdditionalHP(player, 0); - NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getAddedHPPacket(0, APISpellHelper.getCurrentAdditionalMaxHP(player)), (EntityPlayerMP)player); - - event.ammount -= prevHp / ratio; - if(event.ammount < 0) - { - event.ammount = 0; - } - } - } - } - } - - @SubscribeEvent - public void omegaUpdateReagentAndHpEvent(LivingUpdateEvent event) - { - if(event.entityLiving instanceof EntityPlayer && !event.entityLiving.worldObj.isRemote) - { - EntityPlayer player = (EntityPlayer)event.entityLiving; - Reagent reagent = APISpellHelper.getPlayerReagentType(player); - float reagentAmount = APISpellHelper.getPlayerCurrentReagentAmount(player); - - boolean hasReagentChanged = false; - - if(reagentAmount > 0 && OmegaRegistry.hasParadigm(reagent)) - { - int cooldown = APISpellHelper.getPlayerReagentRegenCooldownTag(player); - boolean canHealHPBar = true; - if(cooldown > 0) - { - float extra = 0; - if(player.isPotionActive(AlchemicalWizardry.customPotionSoulHarden)) - { - extra += 0.25f * (1 + player.getActivePotionEffect(AlchemicalWizardry.customPotionSoulHarden).getAmplifier()); - } - - if(player.isPotionActive(AlchemicalWizardry.customPotionSoulFray)) - { - 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)); - - APISpellHelper.setPlayerReagentRegenCooldownTag(player, Math.max(cooldown + deduction, 0)); - canHealHPBar = false; - } - - OmegaParadigm parad = OmegaRegistry.getParadigmForReagent(reagent); - ReagentRegenConfiguration config = parad.getRegenConfig(player); - - if(parad.isPlayerWearingFullSet(player)) - { - if(canHealHPBar) - { - int tickRate = config.tickRate; - - if(player.isPotionActive(Potion.regeneration)) - { - int i = player.getActivePotionEffect(Potion.regeneration).getAmplifier(); - double factor = Math.pow(1.5, i+1); - tickRate = Math.max((int)(tickRate / factor), 1); - } - - if(event.entityLiving.worldObj.getWorldTime() % tickRate == 0) - { - boolean hasHealthChanged = false; - int maxHealth = parad.getMaxAdditionalHealth(); - - float health = APISpellHelper.getCurrentAdditionalHP(player); - - if(health > maxHealth) - { - health = maxHealth; - hasHealthChanged = true; - }else if(health < maxHealth) - { - float addedAmount = Math.min(Math.min((reagentAmount / config.costPerPoint), config.healPerTick), maxHealth - health); - float drain = addedAmount * config.costPerPoint; - - reagentAmount -= drain; - hasReagentChanged = true; - - health += addedAmount; - - hasHealthChanged = true; - } - - if(player instanceof EntityPlayerMP) - { - if(hasHealthChanged) - { - APISpellHelper.setCurrentAdditionalHP(player, health); - NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getAddedHPPacket(health, maxHealth), (EntityPlayerMP)player); - } - } - } - } - - }else - { - reagentAmount = 0; - APISpellHelper.setPlayerMaxReagentAmount(player, 0); - NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getReagentBarPacket(null, 0, 0), (EntityPlayerMP)player); - APISpellHelper.setCurrentAdditionalHP(player, 0); - NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getAddedHPPacket(0, 0), (EntityPlayerMP)player); - } - //Consumes the amount - float costPerTick = parad.getCostPerTickOfUse(player); - if(parad.doDrainReagent(player)) - { - if(reagentAmount > costPerTick) - { - hasReagentChanged = true; - reagentAmount = Math.max(0, reagentAmount - costPerTick); - }else - { - hasReagentChanged = true; - reagentAmount = 0; - } - } - - - hasReagentChanged = true; - } - - if(reagentAmount <= 0) - { - boolean hasRevertedArmour = false; - ItemStack[] armourInventory = player.inventory.armorInventory; - for(ItemStack stack : armourInventory) - { - if(stack != null && stack.getItem() instanceof OmegaArmour) - { - ((OmegaArmour)stack.getItem()).revertArmour(player, stack); - hasRevertedArmour = true; - } - } - - if(hasRevertedArmour) - { - APISpellHelper.setCurrentAdditionalHP(player, 0); - NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getAddedHPPacket(0, 0), (EntityPlayerMP)player); - } - } - - if(player instanceof EntityPlayerMP) - { - if(hasReagentChanged) - { - APISpellHelper.setPlayerCurrentReagentAmount(player, reagentAmount); - NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getReagentBarPacket(reagent, reagentAmount, APISpellHelper.getPlayerMaxReagentAmount(player)), (EntityPlayerMP)player); - } - } - } - } - - @SubscribeEvent(priority=EventPriority.HIGHEST) - public void onPlayerDamageEvent(LivingAttackEvent event) - { - if (event.source.isProjectile()) - { - if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionProjProt) && event.isCancelable()) - { - event.setCanceled(true); - } - } - } - - @SubscribeEvent - public void onLivingSpawnEvent(CheckSpawn event) - { - if (!(event.entityLiving instanceof EntityMob)) - { - return; - } - - String respawnRitual = "AW028SpawnWard"; - - int dimension = event.world.provider.getDimensionId(); - if (respawnMap.containsKey(dimension)) - { - List list = respawnMap.get(dimension); - - if (list != null) - { - for (CoordAndRange coords : list) - { - TileEntity tile = event.world.getTileEntity(coords.getPos()); - - 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 && event.z > coords.zCoord - coords.horizRadius && event.z < coords.zCoord + coords.horizRadius && event.y > coords.yCoord - coords.vertRadius && event.y < coords.yCoord + coords.vertRadius) - { - switch (event.getResult()) - { - case ALLOW: - event.setResult(Result.DEFAULT); - break; - case DEFAULT: - event.setResult(Result.DENY); - break; - case DENY: - break; - default: - break; - } - break; - } - } else - { - list.remove(coords); - } - } - } - } - - if (event.entityLiving instanceof EntityCreeper) - { - return; - } - - String forceSpawnRitual = "AW029VeilOfEvil"; - - if (forceSpawnMap.containsKey(dimension)) - { - List list = forceSpawnMap.get(dimension); - - if (list != null) - { - for (CoordAndRange coords : list) - { - TileEntity tile = event.world.getTileEntity(coords.getPos()); - - 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 && event.z > coords.zCoord - coords.horizRadius && event.z < coords.zCoord + coords.horizRadius && event.y > coords.yCoord - coords.vertRadius && event.y < coords.yCoord + coords.vertRadius) - { - switch (event.getResult()) - { - case ALLOW: - break; - case DEFAULT: - event.setResult(Result.ALLOW); - break; - case DENY: - event.setResult(Result.DEFAULT); - break; - default: - break; - } - break; - } - } else - { - list.remove(coords); - } - } - } - } - } - - @SubscribeEvent - public void onPlayerRespawnEvent(PlayerRespawnEvent event) - { - if (AlchemicalWizardry.respawnWithDebuff && event.player != null) - { - event.player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionSoulFray.id, 20 * 60 * 5, 0)); - } - } - - @SubscribeEvent - public void onLivingJumpEvent(LivingJumpEvent event) - { -// 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(); - event.entityLiving.motionY += (0.1f) * (2 + i); - } - - if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionHeavyHeart)) - { - event.entityLiving.motionY = 0; - } - } - - @SubscribeEvent - public void onEndermanTeleportEvent(EnderTeleportEvent event) - { - if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionPlanarBinding) && event.isCancelable()) - { - event.setCanceled(true); - } - } - - @SubscribeEvent - public void onEntityDamaged(LivingAttackEvent event) - { - EntityLivingBase entityAttacked = event.entityLiving; - - if (entityAttacked.isPotionActive(AlchemicalWizardry.customPotionReciprocation)) - { - Entity entityAttacking = event.source.getSourceOfDamage(); - - if (entityAttacking != null && entityAttacking instanceof EntityLivingBase) - { - int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionReciprocation).getAmplifier(); - float damageRecieve = event.ammount / 2 * (i + 1); - entityAttacking.attackEntityFrom(DamageSource.generic, damageRecieve); - } - } - - if (entityAttacked.isPotionActive(AlchemicalWizardry.customPotionFlameCloak)) - { - int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFlameCloak).getAmplifier(); - - Entity entityAttacking = event.source.getSourceOfDamage(); - - if (entityAttacking != null && entityAttacking instanceof EntityLivingBase && !entityAttacking.isImmuneToFire() && !((EntityLivingBase) entityAttacking).isPotionActive(Potion.fireResistance)) - { - entityAttacking.attackEntityFrom(DamageSource.inFire, 2 * i + 2); - entityAttacking.setFire(3); - } - } - } - - -// @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) - { - EntityLivingBase entityLiving = event.entityLiving; - double x = entityLiving.posX; - double y = entityLiving.posY; - double z = entityLiving.posZ; - - BlockPos blockVector = entityLiving.getPosition(); - int xPos = blockVector.getX(); - int yPos = blockVector.getY(); - int zPos = blockVector.getZ(); - - if (entityLiving instanceof EntityPlayer) - { - if(!entityLiving.worldObj.isRemote && entityLiving.worldObj.getTotalWorldTime() % 20 == 0) - { - if(entityLiving instanceof EntityPlayerMP) - { - String ownerName = SoulNetworkHandler.getUsername((EntityPlayer)entityLiving); - NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getLPPacket(SoulNetworkHandler.getCurrentEssence(ownerName), SoulNetworkHandler.getMaximumForOrbTier(SoulNetworkHandler.getCurrentMaxOrb(ownerName))), (EntityPlayerMP)entityLiving); - } - } -// ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, ((EntityPlayer) event.entityLiving).capabilities, 0.1F, "walkSpeed", "g", "field_75097_g"); - } - - if (entityLiving instanceof EntityPlayer && entityLiving.worldObj.isRemote) - { - EntityPlayer entityPlayer = (EntityPlayer) entityLiving; - boolean highStepListed = playersWith1Step.contains(entityPlayer.getDisplayName()); - boolean hasHighStep = entityPlayer.isPotionActive(AlchemicalWizardry.customPotionBoost); - - if (hasHighStep && !highStepListed) - { - playersWith1Step.add(SpellHelper.getUsername(entityPlayer)); - } - - if (!hasHighStep && highStepListed) - { - playersWith1Step.remove(SpellHelper.getUsername(entityPlayer)); - entityPlayer.stepHeight = 0.5F; - } - } - - if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionFeatherFall)) - { - event.entityLiving.fallDistance = 0; - } - - if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionDrowning) && ! event.entityLiving.isPotionActive(Potion.waterBreathing)) - { - int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionDrowning).getAmplifier(); - - if (event.entityLiving.worldObj.getWorldTime() % (20 / (i + 1)) == 0) - { - event.entityLiving.attackEntityFrom(DamageSource.drown, 2); - event.entityLiving.hurtResistantTime = Math.min(event.entityLiving.hurtResistantTime, 20 / (i + 1)); - } - } - -// event.entityLiving.getEntityAttribute(SharedMonsterAttributes.movementSpeed).removeAllModifiers(); - - if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionBoost)) - { - 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", percentIncrease, 0); -// -// event.entityLiving.getEntityAttribute(SharedMonsterAttributes.movementSpeed).applyModifier(speedModifier); - - if (event.entityLiving instanceof EntityPlayer) - { - EntityPlayer entityPlayer = (EntityPlayer) event.entityLiving; - entityPlayer.stepHeight = 1.0f; - - if ((entityPlayer.onGround || entityPlayer.capabilities.isFlying) && entityPlayer.moveForward > 0F) - entityPlayer.moveFlying(0F, 1F, entityPlayer.capabilities.isFlying ? (percentIncrease / 2.0f) : percentIncrease); - } - } - } - - if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionProjProt)) - { - 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 = new AxisAlignedBB(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(); - - while (iterator.hasNext()) - { - Entity projectile = (Entity) iterator.next(); - - if (projectile == null) - { - continue; - } - - if (!(projectile instanceof IProjectile) || (AlchemicalWizardry.isBotaniaLoaded && isManaBurst(projectile))) - { - continue; - } - - Entity throwingEntity = null; - - if (projectile instanceof EntityArrow) - { - throwingEntity = ((EntityArrow) projectile).shootingEntity; - } else if (projectile instanceof EnergyBlastProjectile) - { - throwingEntity = ((EnergyBlastProjectile) projectile).shootingEntity; - } else if (projectile instanceof EntityThrowable) - { - throwingEntity = ((EntityThrowable) projectile).getThrower(); - } - - if (throwingEntity != null && throwingEntity.equals(entity)) - { - continue; - } - - double delX = projectile.posX - entity.posX; - double delY = projectile.posY - entity.posY; - 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 + projectile.motionZ*projectile.motionZ)); - angle = Math.acos(angle); - if (angle < 3*(Math.PI/4)) { - //angle is < 135 degrees - continue; - } - - if (throwingEntity != null) - { - delX = -projectile.posX + throwingEntity.posX; - delY = -projectile.posY + (throwingEntity.posY + throwingEntity.getEyeHeight()); - delZ = -projectile.posZ + throwingEntity.posZ; - } - - double curVel = Math.sqrt(delX * delX + delY * delY + delZ * delZ); - - delX /= curVel; - delY /= curVel; - delZ /= curVel; - 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; - //TODO make this not affect player's projectiles - } - } - - if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionFlight)) - { - if (event.entityLiving instanceof EntityPlayer) - { - EntityPlayer entityPlayer = (EntityPlayer) event.entityLiving; - String ownerName = SpellHelper.getUsername(entityPlayer); - playerFlightBuff.put(ownerName, true); - entityPlayer.capabilities.allowFlying = true; - } - } else - { - if (event.entityLiving instanceof EntityPlayer) - { - EntityPlayer entityPlayer = (EntityPlayer) event.entityLiving; - String ownerName = SpellHelper.getUsername(entityPlayer); - - if (!playerFlightBuff.containsKey(ownerName)) - { - playerFlightBuff.put(ownerName, false); - } - - if (playerFlightBuff.get(ownerName)) - { - playerFlightBuff.put(ownerName, false); - - if (!entityPlayer.capabilities.isCreativeMode) - { - entityPlayer.capabilities.allowFlying = false; - entityPlayer.capabilities.isFlying = false; - entityPlayer.sendPlayerAbilities(); - } - } - } - } - - if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionFlameCloak)) - { - entityLiving.worldObj.spawnParticle(EnumParticleTypes.FLAME, x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0); - - 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() && !(entity instanceof EntityLivingBase && ((EntityLivingBase) entity).isPotionActive(Potion.fireResistance))) - { - entity.setFire(3); - } - } - } - } - - if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionIceCloak)) - { - if (entityLiving.worldObj.getWorldTime() % 2 == 0) - entityLiving.worldObj.spawnParticle(EnumParticleTypes.REDSTONE, 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 horizRange = r + 1; - int vertRange = 1; - - if (!entityLiving.worldObj.isRemote) - { - for (int i = -horizRange; i <= horizRange; i++) - { - for (int k = -horizRange; k <= horizRange; k++) - { - for (int j = -vertRange - 1; j <= vertRange - 1; j++) - { - SpellHelper.freezeWaterBlock(entityLiving.worldObj, new BlockPos(xPos + i, yPos + j, zPos + k)); - } - } - } - } - } - - if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionHeavyHeart)) - { - entityLiving.worldObj.spawnParticle(EnumParticleTypes.FLAME, x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0); - - int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionHeavyHeart).getAmplifier(); - double decrease = 0.025 * (i + 1); - - if (entityLiving.motionY > -0.9) - { - entityLiving.motionY -= decrease; - } - - if(entityLiving instanceof EntityPlayer) - { - SpellHelper.setPlayerSpeedFromServer((EntityPlayer)entityLiving, entityLiving.motionX, entityLiving.motionY - decrease, entityLiving.motionZ); - } - } - - if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionFireFuse)) - { - entityLiving.worldObj.spawnParticle(EnumParticleTypes.FLAME, x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0); - - int r = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFireFuse).getAmplifier(); - int radius = r + 1; - - 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) { - 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) { - - 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 (blockData[2].matches("-?\\d+")) - meta = Integer.parseInt(blockData[2]); - else if (blockData[2].equals("*")) - meta = OreDictionary.WILDCARD_VALUE; - else - meta = 0; - - if (block != null) - if ((block == event.initialBlock || block == event.finalBlock) && (meta == event.initialBlock.getMetaFromState(event.initialState) || meta == event.finalBlock.getMetaFromState(event.finalState) || meta == OreDictionary.WILDCARD_VALUE)) - event.setCanceled(true); - - // If the block uses shorthand syntax: modid:blockname - } else if (blockData.length == 2) { - - Block block = GameRegistry.findBlock(blockData[0], blockData[1]); - int meta = 0; - - if (block != null) - if (( block == event.initialBlock || block == event.finalBlock) && (meta == event.initialBlock.getMetaFromState(event.initialState) || meta == event.finalBlock.getMetaFromState(event.finalState) || meta == OreDictionary.WILDCARD_VALUE)) - event.setCanceled(true); - } - } - } - - @SubscribeEvent - public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) { - if (event.modID.equals("AWWayofTime")) { - BloodMagicConfiguration.syncConfig(); - AlchemicalWizardry.logger.info("Refreshing configuration file."); - } - } - - @Optional.Method(modid = "Botania") - private boolean isManaBurst(Entity entity) - { -// if(entity instanceof IManaBurst) { -// ItemStack lens = ((IManaBurst)entity).getSourceLens(); -// return !(lens.getItemDamage()!=8 && lens.getItemDamage()!=11); -// } -// else - return false; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java deleted file mode 100644 index 730ac5cd..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java +++ /dev/null @@ -1,67 +0,0 @@ -package WayofTime.alchemicalWizardry.common; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.server.MinecraftServer; -import net.minecraftforge.fml.common.IFuelHandler; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.items.LavaCrystal; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -public class AlchemicalWizardryFuelHandler implements IFuelHandler -{ - @Override - public int getBurnTime(ItemStack fuel) - { - if (fuel == null) - { - return 0; - } - - Item fuelItem = fuel.getItem(); - - if (fuelItem.equals(ModItems.lavaCrystal)) - { - LavaCrystal item = (LavaCrystal) fuel.getItem(); - - if (item.hasEnoughEssence(fuel)) - { - return 200; - } else - { - NBTTagCompound tag = fuel.getTagCompound(); - - if (tag == null) - { - return 0; - } - - if (MinecraftServer.getServer() == null) - { - return 0; - } - - if (MinecraftServer.getServer().getConfigurationManager() == null) - { - return 0; - } - - EntityPlayer owner = SpellHelper.getPlayerForUsername(tag.getString("ownerName")); - - if (owner == null) - { - return 0; - } - - owner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - return 0; - } - } - - return 0; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/ArmourComponent.java b/src/main/java/WayofTime/alchemicalWizardry/common/ArmourComponent.java deleted file mode 100644 index fb4f155b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/ArmourComponent.java +++ /dev/null @@ -1,23 +0,0 @@ -package WayofTime.alchemicalWizardry.common; - -public class ArmourComponent -{ - private int xOff; - private int zOff; - - public ArmourComponent(int xOff, int zOff) - { - this.xOff = xOff; - this.zOff = zOff; - } - - public int getXOff() - { - return xOff; - } - - public int getZOff() - { - return zOff; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/ClientToServerPacketHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/ClientToServerPacketHandler.java deleted file mode 100644 index 7a5f2fed..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/ClientToServerPacketHandler.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.alchemicalWizardry.common; - -import net.minecraftforge.fml.common.network.NetworkRegistry; -import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; -import net.minecraftforge.fml.relauncher.Side; - -public class ClientToServerPacketHandler -{ - public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel("alchemicalwizardry"); - - public static void init() - { - INSTANCE.registerMessage(MessageKeyPressed.class, MessageKeyPressed.class, 0, Side.SERVER); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java b/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java deleted file mode 100644 index 1e9201a8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java +++ /dev/null @@ -1,67 +0,0 @@ -package WayofTime.alchemicalWizardry.common; - -import net.minecraft.world.World; -import net.minecraftforge.fml.common.registry.EntityRegistry; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; -import WayofTime.alchemicalWizardry.common.entity.mob.BookEntityItem; -import WayofTime.alchemicalWizardry.common.entity.mob.MailOrderEntityItem; -import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityBloodLightProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaMainProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaSecondaryProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityMeteor; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityParticleBeam; -import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.LightningBoltProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.TeleportProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; - -public class CommonProxy -{ - // Client stuff - public void registerRenderers() - { - // Nothing here as the server doesn't render graphics! - } - - public void registerPostSideObjects() {} - - public void registerEntities() {} - - public World getClientWorld() - { - return null; - } - - public void registerEvents() {} - - public void registerEntityTrackers() - { - EntityRegistry.registerModEntity(EnergyBlastProjectile.class, "energyBlastProjectile", 0, AlchemicalWizardry.instance, 128, 5, true); - EntityRegistry.registerModEntity(FireProjectile.class, "fireProjectile", 1, AlchemicalWizardry.instance, 128, 5, true); - EntityRegistry.registerModEntity(IceProjectile.class, "iceProjectile", 2, AlchemicalWizardry.instance, 128, 5, true); - EntityRegistry.registerModEntity(ExplosionProjectile.class, "explosionProjectile", 3, AlchemicalWizardry.instance, 128, 5, true); - EntityRegistry.registerModEntity(HolyProjectile.class, "holyProjectile", 4, AlchemicalWizardry.instance, 128, 5, true); - EntityRegistry.registerModEntity(WindGustProjectile.class, "windGustProjectile", 5, AlchemicalWizardry.instance, 128, 5, true); - EntityRegistry.registerModEntity(LightningBoltProjectile.class, "lightningBoltProjectile", 6, 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); - EntityRegistry.registerModEntity(EntityEnergyBazookaMainProjectile.class, "energyBazookaMain", 10, AlchemicalWizardry.instance, 128, 3, true); - EntityRegistry.registerModEntity(EntityEnergyBazookaSecondaryProjectile.class, "energyBazookaSecondary", 11, AlchemicalWizardry.instance, 128, 3, true); - EntityRegistry.registerModEntity(EntityBloodLightProjectile.class, "bloodLightProjectile", 12, AlchemicalWizardry.instance, 128, 3, true); - EntityRegistry.registerModEntity(EntityMeteor.class, "meteor", 13, AlchemicalWizardry.instance, 120, 3, true); - EntityRegistry.registerModEntity(EntitySpellProjectile.class, "spellProjectile", 14, AlchemicalWizardry.instance, 128, 3, true); - EntityRegistry.registerModEntity(EntityParticleBeam.class, "particleBeam", 15, AlchemicalWizardry.instance, 120, 3, true); - EntityRegistry.registerModEntity(MailOrderEntityItem.class, "catalogueEntityItem", 16, AlchemicalWizardry.instance, 120, 3, true); - EntityRegistry.registerModEntity(BookEntityItem.class, "bookEntityItem", 17, AlchemicalWizardry.instance, 120, 3, true); - } - - public void initRendering() {} -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/CoordAndRange.java b/src/main/java/WayofTime/alchemicalWizardry/common/CoordAndRange.java deleted file mode 100644 index a388a048..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/CoordAndRange.java +++ /dev/null @@ -1,37 +0,0 @@ -package WayofTime.alchemicalWizardry.common; - -import net.minecraft.util.BlockPos; - -public class CoordAndRange -{ - public int xCoord; - public int yCoord; - public int zCoord; - public int horizRadius; - public int vertRadius; - - public CoordAndRange(BlockPos pos, int horiz, int vert) - { - this(pos.getX(), pos.getY(), pos.getZ(), horiz, vert); - } - - public CoordAndRange(int x, int y, int z, int horiz, int vert) - { - this.xCoord = x; - this.yCoord = y; - this.zCoord = z; - this.horizRadius = horiz; - this.vertRadius = vert; - } - - public BlockPos getPos() - { - return new BlockPos(xCoord, yCoord, zCoord); - } - - @Override - public boolean equals(Object o) - { - return o instanceof CoordAndRange ? ((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 : false; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java b/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java deleted file mode 100644 index 1396e5ae..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java +++ /dev/null @@ -1,24 +0,0 @@ -package WayofTime.alchemicalWizardry.common; - -import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; -import net.minecraft.entity.ai.EntityAINearestAttackableTarget; - -public class EntityAITargetAggro extends EntityAINearestAttackableTarget -{ - private EntityDemon theCreature; - - public EntityAITargetAggro(EntityDemon par1EntityDemon, Class par2Class, int par3, boolean par4) - { - super(par1EntityDemon, par2Class, par4); - this.theCreature = par1EntityDemon; - } - - /** - * Returns whether the EntityAIBase should begin execution. - */ - @Override - public boolean shouldExecute() - { - return theCreature.isAggro() && super.shouldExecute(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggroCloaking.java b/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggroCloaking.java deleted file mode 100644 index 53de1ddd..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggroCloaking.java +++ /dev/null @@ -1,29 +0,0 @@ -package WayofTime.alchemicalWizardry.common; - -import net.minecraft.entity.EntityLivingBase; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; - -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) - { - super(par1EntityDemon, par2Class, par3, par4); - this.cloakLevel = cloak; - } - - @Override - public boolean shouldExecute() - { - EntityLivingBase target = this.taskOwner.getAITarget(); - boolean cloakActive = false; - - if(target != null && target.isPotionActive(AlchemicalWizardry.customPotionBoost.id)) - { - cloakActive = target.getActivePotionEffect(AlchemicalWizardry.customPotionBoost).getAmplifier() >= cloakLevel; - } - - return !cloakActive && super.shouldExecute(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/IBindingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/IBindingAgent.java deleted file mode 100644 index f2dcdc7d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/IBindingAgent.java +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index c3677580..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/ICatalyst.java +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index e1d9cfdd..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/IDemon.java +++ /dev/null @@ -1,14 +0,0 @@ -package WayofTime.alchemicalWizardry.common; - -public interface IDemon -{ - void setSummonedConditions(); - - boolean isAggro(); - - void setAggro(boolean aggro); - - boolean getDoesDropCrystal(); - - void setDropCrystal(boolean crystal); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/IFillingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/IFillingAgent.java deleted file mode 100644 index df415cbf..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/IFillingAgent.java +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index 9ec2079b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/ItemType.java +++ /dev/null @@ -1,93 +0,0 @@ -package WayofTime.alchemicalWizardry.common; - -import java.util.Objects; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -/** - * Represents an item together with metadata and NBT tag. - * - * @author ljfa-ag - */ -public class ItemType -{ - public final Item item; - public final int meta; - public final NBTTagCompound nbtTag; - - public ItemType(Item item, int meta, NBTTagCompound nbtTag) - { - this.item = Objects.requireNonNull(item); - this.meta = meta; - this.nbtTag = nbtTag; - } - - public ItemType(Item item, int meta) - { - this(item, meta, null); - } - - public ItemType(Item item) - { - this(item, 0, null); - } - - public ItemType(Block block, int meta, NBTTagCompound nbtTag) - { - this(Item.getItemFromBlock(block), meta, nbtTag); - } - - public ItemType(Block block, int meta) - { - this(block, meta, null); - } - - public ItemType(Block block) - { - this(block, 0, null); - } - - public ItemStack createStack(int count) - { - ItemStack result = new ItemStack(item, count, meta); - result.setTagCompound(nbtTag); - return result; - } - - @Override - public boolean equals(Object obj) - { - if (this == obj) - return true; - if (obj == null || getClass() != obj.getClass()) - return false; - ItemType other = (ItemType) obj; - return item == other.item && meta == other.meta && Objects.equals(nbtTag, other.nbtTag); - } - - @Override - public int hashCode() - { - final int prime = 31; - int result = 1; - result = prime * result + item.hashCode(); - result = prime * result + meta; - result = prime * result + ((nbtTag == null) ? 0 : nbtTag.hashCode()); - return result; - } - - @Override - public String toString() - { - return item.getUnlocalizedName() + "@" + meta; - } - - public static ItemType fromStack(ItemStack stack) - { - return new ItemType(stack.getItem(), stack.getItemDamage(), stack.getTagCompound()); - } - -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java deleted file mode 100644 index fada6f98..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java +++ /dev/null @@ -1,44 +0,0 @@ -package WayofTime.alchemicalWizardry.common; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.item.ItemStack; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; -import net.minecraftforge.event.entity.player.FillBucketEvent; -import net.minecraftforge.fml.common.eventhandler.Event.Result; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.ModItems; - -public class LifeBucketHandler -{ - @SubscribeEvent - public void onBucketFill(FillBucketEvent event) - { - ItemStack result = fillCustomBucket(event.world, event.target); - - if (result == null) - { - return; - } - - event.result = result; - event.setResult(Result.ALLOW); - } - - public ItemStack fillCustomBucket(World world, MovingObjectPosition pos) - { - IBlockState state = world.getBlockState(pos.func_178782_a()); - Block block = state.getBlock(); - - if (block != null && (block.equals(ModBlocks.blockLifeEssence)) && block.getMetaFromState(state) == 0) - { - world.setBlockToAir(pos.func_178782_a()); - return new ItemStack(ModItems.bucketLife); - } else - { - return null; - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/LifeEssence.java b/src/main/java/WayofTime/alchemicalWizardry/common/LifeEssence.java deleted file mode 100644 index fdc69542..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/LifeEssence.java +++ /dev/null @@ -1,25 +0,0 @@ -package WayofTime.alchemicalWizardry.common; - -import net.minecraftforge.fluids.Fluid; - -public class LifeEssence extends Fluid -{ - public LifeEssence(String fluidName) - { - super(fluidName); - this.setDensity(2000); - this.setViscosity(2000); - } - - @Override - public int getColor() - { - return 0xEEEEEE; - } - - @Override - public String getLocalizedName() - { - return "Life Essence"; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/MessageKeyPressed.java b/src/main/java/WayofTime/alchemicalWizardry/common/MessageKeyPressed.java deleted file mode 100644 index 055f91ff..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/MessageKeyPressed.java +++ /dev/null @@ -1,67 +0,0 @@ -package WayofTime.alchemicalWizardry.common; - -import io.netty.buffer.ByteBuf; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.network.simpleimpl.IMessage; -import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; -import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; - -public class MessageKeyPressed implements IMessage, IMessageHandler -{ - private byte keyPressed; - - public MessageKeyPressed() - { - } - - public MessageKeyPressed(Key key) - { - if (key == Key.OMEGA_ACTIVE) - { - this.keyPressed = (byte) Key.OMEGA_ACTIVE.ordinal(); - } - } - - @Override - public void fromBytes(ByteBuf buf) - { - this.keyPressed = buf.readByte(); - } - - @Override - public void toBytes(ByteBuf buf) - { - buf.writeByte(keyPressed); - } - - @Override - public IMessage onMessage(MessageKeyPressed message, MessageContext ctx) - { - EntityPlayer entityPlayer = ctx.getServerHandler().playerEntity; - - if(message.keyPressed == Key.OMEGA_ACTIVE.ordinal()) - { - if(entityPlayer != null) - { - ItemStack[] armourInventory = entityPlayer.inventory.armorInventory; - if(armourInventory[2] != null) - { - ItemStack chestStack = armourInventory[2]; - if(chestStack.getItem() instanceof OmegaArmour) - { - ((OmegaArmour)chestStack.getItem()).onOmegaKeyPressed(entityPlayer, chestStack); - } - } - } - } - - return null; - } - - public enum Key - { - OMEGA_ACTIVE - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java b/src/main/java/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java deleted file mode 100644 index 185c1584..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java +++ /dev/null @@ -1,36 +0,0 @@ -package WayofTime.alchemicalWizardry.common; - -import net.minecraft.entity.passive.EntityAnimal; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraftforge.event.entity.living.LivingDropsEvent; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import WayofTime.alchemicalWizardry.ModItems; - -public class ModLivingDropsEvent -{ - public static double rand; - - @SubscribeEvent - public void onEntityDrop(LivingDropsEvent event) - { - if (event.source.getDamageType().equals("player")) - { - rand = Math.random(); - - if (!(event.entityLiving instanceof EntityAnimal)) - { - PotionEffect effect = event.entityLiving.getActivePotionEffect(Potion.weakness); - - if (effect != null) - { - if (effect.getAmplifier() >= 2) - if (rand < 0.50d) - { - event.entityLiving.dropItem(ModItems.weakBloodShard, 1); - } - } - } - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java deleted file mode 100644 index f11a4853..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java +++ /dev/null @@ -1,1100 +0,0 @@ -package WayofTime.alchemicalWizardry.common; - -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.network.PacketBuffer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.world.World; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.common.network.FMLEmbeddedChannel; -import net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec; -import net.minecraftforge.fml.common.network.FMLOutboundHandler; -import net.minecraftforge.fml.common.network.NetworkRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.ColourAndCoords; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import WayofTime.alchemicalWizardry.common.tileEntity.TEOrientable; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; -import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; -import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; -import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; - -public enum NewPacketHandler -{ - INSTANCE; - - private EnumMap channels; - - NewPacketHandler() - { - this.channels = NetworkRegistry.INSTANCE.newChannel("BloodMagic", new TEAltarCodec()); - if (FMLCommonHandler.instance().getSide() == Side.CLIENT) - { - addClientHandler(); - } - if(FMLCommonHandler.instance().getSide() == Side.SERVER) - { - System.out.println("Server sided~"); - addServerHandler(); - } - } - - @SideOnly(Side.CLIENT) - private void addClientHandler() - { - FMLEmbeddedChannel clientChannel = this.channels.get(Side.CLIENT); - - String tileAltarCodec = clientChannel.findChannelHandlerNameForType(TEAltarCodec.class); - clientChannel.pipeline().addAfter(tileAltarCodec, "TEAltarHandler", new TEAltarMessageHandler()); - clientChannel.pipeline().addAfter(tileAltarCodec, "TEOrientableHandler", new TEOrientableMessageHandler()); - clientChannel.pipeline().addAfter(tileAltarCodec, "TEPedestalHandler", new TEPedestalMessageHandler()); - clientChannel.pipeline().addAfter(tileAltarCodec, "TEPlinthHandler", new TEPlinthMessageHandler()); - clientChannel.pipeline().addAfter(tileAltarCodec, "TESocketHandler", new TESocketMessageHandler()); - clientChannel.pipeline().addAfter(tileAltarCodec, "TETeleposerHandler", new TETeleposerMessageHandler()); - clientChannel.pipeline().addAfter(tileAltarCodec, "TEWritingTableHandler", new TEWritingTableMessageHandler()); - clientChannel.pipeline().addAfter(tileAltarCodec, "ParticleHandler", new ParticleMessageHandler()); - clientChannel.pipeline().addAfter(tileAltarCodec, "VelocityHandler", new VelocityMessageHandler()); - clientChannel.pipeline().addAfter(tileAltarCodec, "TEMasterStoneHandler", new TEMasterStoneMessageHandler()); - clientChannel.pipeline().addAfter(tileAltarCodec, "TEReagentConduitHandler", new TEReagentConduitMessageHandler()); - clientChannel.pipeline().addAfter(tileAltarCodec, "CurrentLPMessageHandler", new CurrentLPMessageHandler()); - clientChannel.pipeline().addAfter(tileAltarCodec, "CurrentReagentBarMessageHandler", new CurrentReagentBarMessageHandler()); - clientChannel.pipeline().addAfter(tileAltarCodec, "CurrentAddedHPMessageHandler", new CurrentAddedHPMessageHandler()); - } - - @SideOnly(Side.SERVER) - private void addServerHandler() - { - FMLEmbeddedChannel serverChannel = this.channels.get(Side.SERVER); - - String messageCodec = serverChannel.findChannelHandlerNameForType(TEAltarCodec.class); - serverChannel.pipeline().addAfter(messageCodec, "KeyboardMessageHandler", new KeyboardMessageHandler()); - } - - private static class TEAltarMessageHandler extends SimpleChannelInboundHandler - { - @Override - protected void channelRead0(ChannelHandlerContext ctx, TEAltarMessage msg) throws Exception - { - World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.pos); - if (te instanceof TEAltar) - { - TEAltar altar = (TEAltar) te; - - altar.handlePacketData(msg.items, msg.fluids, msg.capacity); - } - } - } - - private static class TEOrientableMessageHandler extends SimpleChannelInboundHandler - { - @Override - protected void channelRead0(ChannelHandlerContext ctx, TEOrientableMessage msg) throws Exception - { - World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.pos); - if (te instanceof TEOrientable) - { - ((TEOrientable) te).setInputDirection(EnumFacing.getFront(msg.input)); - ((TEOrientable) te).setOutputDirection(EnumFacing.getFront(msg.output)); - } - } - } - - private static class TEPedestalMessageHandler extends SimpleChannelInboundHandler - { - @Override - protected void channelRead0(ChannelHandlerContext ctx, TEPedestalMessage msg) throws Exception - { - World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.pos); - if (te instanceof TEPedestal) - { - TEPedestal pedestal = (TEPedestal) te; - - pedestal.handlePacketData(msg.items); - } - } - } - - private static class TEPlinthMessageHandler extends SimpleChannelInboundHandler - { - @Override - protected void channelRead0(ChannelHandlerContext ctx, TEPlinthMessage msg) throws Exception - { - World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.pos); - if (te instanceof TEPlinth) - { - TEPlinth Plinth = (TEPlinth) te; - - Plinth.handlePacketData(msg.items); - } - } - } - - private static class TESocketMessageHandler extends SimpleChannelInboundHandler - { - @Override - protected void channelRead0(ChannelHandlerContext ctx, TESocketMessage msg) throws Exception - { - World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.pos); - if (te instanceof TESocket) - { - TESocket Socket = (TESocket) te; - - Socket.handlePacketData(msg.items); - } - } - } - - private static class TETeleposerMessageHandler extends SimpleChannelInboundHandler - { - @Override - protected void channelRead0(ChannelHandlerContext ctx, TETeleposerMessage msg) throws Exception - { - World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.pos); - if (te instanceof TETeleposer) - { - TETeleposer Teleposer = (TETeleposer) te; - - Teleposer.handlePacketData(msg.items); - } - } - } - - private static class TEWritingTableMessageHandler extends SimpleChannelInboundHandler - { - @Override - protected void channelRead0(ChannelHandlerContext ctx, TEWritingTableMessage msg) throws Exception - { - World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.pos); - if (te instanceof TEChemistrySet) - { - TEChemistrySet WritingTable = (TEChemistrySet) te; - - WritingTable.handlePacketData(msg.items); - } - } - } - - private static class ParticleMessageHandler extends SimpleChannelInboundHandler - { - @Override - protected void channelRead0(ChannelHandlerContext ctx, ParticleMessage msg) throws Exception - { - World world = AlchemicalWizardry.proxy.getClientWorld(); - - world.spawnParticle(EnumParticleTypes.func_179342_a(msg.particle), msg.xCoord, msg.yCoord, msg.zCoord, msg.xVel, msg.yVel, msg.zVel); - } - } - - private static class VelocityMessageHandler extends SimpleChannelInboundHandler - { - @Override - protected void channelRead0(ChannelHandlerContext ctx, VelocityMessage msg) throws Exception - { - EntityPlayer player = Minecraft.getMinecraft().thePlayer; - - if (player != null) - { - player.motionX = msg.xVel; - player.motionY = msg.yVel; - player.motionZ = msg.zVel; - } - } - } - - private static class TEMasterStoneMessageHandler extends SimpleChannelInboundHandler - { - @Override - protected void channelRead0(ChannelHandlerContext ctx, TEMasterStoneMessage msg) throws Exception - { - World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.pos); - if (te instanceof TEMasterStone) - { - TEMasterStone masterStone = (TEMasterStone) te; - - masterStone.setCurrentRitual(msg.ritual); - masterStone.isRunning = msg.isRunning; - } - } - } - - private static class TEReagentConduitMessageHandler extends SimpleChannelInboundHandler - { - @Override - protected void channelRead0(ChannelHandlerContext ctx, TEReagentConduitMessage msg) throws Exception - { - World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.pos); - if (te instanceof TEReagentConduit) - { - TEReagentConduit reagentConduit = (TEReagentConduit) te; - - reagentConduit.destinationList = msg.destinationList; - } - } - } - - private static class CurrentLPMessageHandler extends SimpleChannelInboundHandler - { - @Override - protected void channelRead0(ChannelHandlerContext ctx, CurrentLPMessage msg) throws Exception - { - EntityPlayer player = Minecraft.getMinecraft().thePlayer; - - APISpellHelper.setPlayerLPTag(player, msg.currentLP); - APISpellHelper.setPlayerMaxLPTag(player, msg.maxLP); - } - } - - private static class CurrentReagentBarMessageHandler extends SimpleChannelInboundHandler - { - @Override - protected void channelRead0(ChannelHandlerContext ctx, CurrentReagentBarMessage msg) throws Exception - { - EntityPlayer player = Minecraft.getMinecraft().thePlayer; - - APISpellHelper.setPlayerReagentType(player, msg.reagent); - APISpellHelper.setPlayerCurrentReagentAmount(player, msg.currentAR); - APISpellHelper.setPlayerMaxReagentAmount(player, msg.maxAR); - } - } - - private static class CurrentAddedHPMessageHandler extends SimpleChannelInboundHandler - { - @Override - protected void channelRead0(ChannelHandlerContext ctx, CurrentAddedHPMessage msg) throws Exception - { - EntityPlayer player = Minecraft.getMinecraft().thePlayer; - - APISpellHelper.setCurrentAdditionalHP(player, msg.currentHP); - APISpellHelper.setCurrentAdditionalMaxHP(player, msg.maxHP); - } - } - - private static class KeyboardMessageHandler extends SimpleChannelInboundHandler - { - public KeyboardMessageHandler() - { - System.out.println("I am being created"); - } - @Override - protected void channelRead0(ChannelHandlerContext ctx, KeyboardMessage msg) throws Exception - { - System.out.println("Hmmm"); - - } - } - - public static class BMMessage - { - int index; - } - - public static class TEAltarMessage extends BMMessage - { - BlockPos pos; - - int[] items; - int[] fluids; - int capacity; - } - - public static class TEOrientableMessage extends BMMessage - { - BlockPos pos; - - int input; - int output; - } - - public static class TEPedestalMessage extends BMMessage - { - BlockPos pos; - - int[] items; - } - - public static class TEPlinthMessage extends BMMessage - { - BlockPos pos; - - int[] items; - } - - public static class TESocketMessage extends BMMessage - { - BlockPos pos; - - int[] items; - } - - public static class TETeleposerMessage extends BMMessage - { - BlockPos pos; - - int[] items; - } - - public static class TEWritingTableMessage extends BMMessage - { - BlockPos pos; - - int[] items; - } - - public static class ParticleMessage extends BMMessage - { - int particle; - - double xCoord; - double yCoord; - double zCoord; - - double xVel; - double yVel; - double zVel; - } - - public static class VelocityMessage extends BMMessage - { - double xVel; - double yVel; - double zVel; - } - - public static class TEMasterStoneMessage extends BMMessage - { - BlockPos pos; - - String ritual; - boolean isRunning; - } - - public static class TEReagentConduitMessage extends BMMessage - { - BlockPos pos; - - List destinationList; - } - - 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) - { - - } - } - - @Override - public void decodeInto(ChannelHandlerContext ctx, ByteBuf source, BMMessage msg) - { - int index = source.readInt(); - - System.out.println("Packet is recieved and being decoded"); - -// switch(index) - { - - } - } - } - - private class TEAltarCodec extends FMLIndexedMessageToMessageCodec - { - public TEAltarCodec() - { - addDiscriminator(0, TEAltarMessage.class); - addDiscriminator(1, TEOrientableMessage.class); - addDiscriminator(2, TEPedestalMessage.class); - addDiscriminator(3, TEPlinthMessage.class); - addDiscriminator(4, TESocketMessage.class); - addDiscriminator(5, TETeleposerMessage.class); - addDiscriminator(6, TEWritingTableMessage.class); - addDiscriminator(7, ParticleMessage.class); - addDiscriminator(8, VelocityMessage.class); - addDiscriminator(9, TEMasterStoneMessage.class); - addDiscriminator(10, TEReagentConduitMessage.class); - addDiscriminator(11, CurrentLPMessage.class); - addDiscriminator(12, CurrentReagentBarMessage.class); - addDiscriminator(13, CurrentAddedHPMessage.class); - addDiscriminator(14, KeyboardMessage.class); - } - - @Override - public void encodeInto(ChannelHandlerContext ctx, BMMessage msg, ByteBuf target) throws Exception - { - PacketBuffer newBuffer = new PacketBuffer(target); - newBuffer.writeInt(msg.index); - - switch (msg.index) - { - case 0: - newBuffer.writeBlockPos(((TEAltarMessage) msg).pos); - - newBuffer.writeBoolean(((TEAltarMessage) msg).items != null); - if (((TEAltarMessage) msg).items != null) - { - int[] items = ((TEAltarMessage) msg).items; - for (int j = 0; j < items.length; j++) - { - int i = items[j]; - newBuffer.writeInt(i); - } - } - - newBuffer.writeBoolean(((TEAltarMessage) msg).fluids != null); - if (((TEAltarMessage) msg).fluids != null) - { - int[] fluids = ((TEAltarMessage) msg).fluids; - for (int j = 0; j < fluids.length; j++) - { - int i = fluids[j]; - newBuffer.writeInt(i); - } - } - - newBuffer.writeInt(((TEAltarMessage) msg).capacity); - - break; - - case 1: - newBuffer.writeBlockPos(((TEOrientableMessage) msg).pos); - - newBuffer.writeInt(((TEOrientableMessage) msg).input); - newBuffer.writeInt(((TEOrientableMessage) msg).output); - - break; - - case 2: - newBuffer.writeBlockPos(((TEPedestalMessage) msg).pos); - - newBuffer.writeBoolean(((TEPedestalMessage) msg).items != null); - if (((TEPedestalMessage) msg).items != null) - { - int[] items = ((TEPedestalMessage) msg).items; - for (int j = 0; j < items.length; j++) - { - int i = items[j]; - newBuffer.writeInt(i); - } - } - - break; - - case 3: - newBuffer.writeBlockPos(((TEPlinthMessage) msg).pos); - - newBuffer.writeBoolean(((TEPlinthMessage) msg).items != null); - if (((TEPlinthMessage) msg).items != null) - { - int[] items = ((TEPlinthMessage) msg).items; - for (int j = 0; j < items.length; j++) - { - int i = items[j]; - newBuffer.writeInt(i); - } - } - - break; - - case 4: - newBuffer.writeBlockPos(((TESocketMessage) msg).pos); - - newBuffer.writeBoolean(((TESocketMessage) msg).items != null); - if (((TESocketMessage) msg).items != null) - { - int[] items = ((TESocketMessage) msg).items; - for (int j = 0; j < items.length; j++) - { - int i = items[j]; - newBuffer.writeInt(i); - } - } - - break; - - case 5: - newBuffer.writeBlockPos(((TETeleposerMessage) msg).pos); - - newBuffer.writeBoolean(((TETeleposerMessage) msg).items != null); - if (((TETeleposerMessage) msg).items != null) - { - int[] items = ((TETeleposerMessage) msg).items; - for (int j = 0; j < items.length; j++) - { - int i = items[j]; - newBuffer.writeInt(i); - } - } - - break; - - case 6: - newBuffer.writeBlockPos(((TEWritingTableMessage) msg).pos); - - newBuffer.writeBoolean(((TEWritingTableMessage) msg).items != null); - if (((TEWritingTableMessage) msg).items != null) - { - int[] items = ((TEWritingTableMessage) msg).items; - for (int j = 0; j < items.length; j++) - { - int i = items[j]; - newBuffer.writeInt(i); - } - } - - break; - - case 7: - newBuffer.writeInt(((ParticleMessage) msg).particle); - - newBuffer.writeDouble(((ParticleMessage) msg).xCoord); - newBuffer.writeDouble(((ParticleMessage) msg).yCoord); - newBuffer.writeDouble(((ParticleMessage) msg).zCoord); - - newBuffer.writeDouble(((ParticleMessage) msg).xVel); - newBuffer.writeDouble(((ParticleMessage) msg).yVel); - newBuffer.writeDouble(((ParticleMessage) msg).zVel); - - break; - - case 8: - newBuffer.writeDouble(((VelocityMessage) msg).xVel); - newBuffer.writeDouble(((VelocityMessage) msg).yVel); - newBuffer.writeDouble(((VelocityMessage) msg).zVel); - - break; - - case 9: - newBuffer.writeBlockPos(((TEMasterStoneMessage) msg).pos); - - String ritual = ((TEMasterStoneMessage) msg).ritual; - newBuffer.writeInt(ritual.length()); - for (int i = 0; i < ritual.length(); i++) - { - newBuffer.writeChar(ritual.charAt(i)); - } - - newBuffer.writeBoolean(((TEMasterStoneMessage) msg).isRunning); - - break; - - case 10: - newBuffer.writeBlockPos(((TEReagentConduitMessage) msg).pos); - - List list = ((TEReagentConduitMessage) msg).destinationList; - newBuffer.writeInt(list.size()); - - for (ColourAndCoords colourSet : list) - { - newBuffer.writeInt(colourSet.colourRed); - newBuffer.writeInt(colourSet.colourGreen); - newBuffer.writeInt(colourSet.colourBlue); - newBuffer.writeInt(colourSet.colourIntensity); - newBuffer.writeInt(colourSet.xCoord); - newBuffer.writeInt(colourSet.yCoord); - newBuffer.writeInt(colourSet.zCoord); - } - - break; - - case 11: - newBuffer.writeInt(((CurrentLPMessage) msg).currentLP); - newBuffer.writeInt(((CurrentLPMessage) msg).maxLP); - - break; - - case 12: - char[] charSet = ((CurrentReagentBarMessage)msg).reagent.toCharArray(); - newBuffer.writeInt(charSet.length); - for(char cha : charSet) - { - newBuffer.writeChar(cha); - } - newBuffer.writeFloat(((CurrentReagentBarMessage)msg).currentAR); - newBuffer.writeFloat(((CurrentReagentBarMessage)msg).maxAR); - - break; - - case 13: - newBuffer.writeFloat(((CurrentAddedHPMessage) msg).currentHP); - newBuffer.writeFloat(((CurrentAddedHPMessage) msg).maxHP); - - break; - - case 14: - System.out.println("Packet is being encoded"); - - newBuffer.writeByte(((KeyboardMessage)msg).keyPressed); - break; - } - } - - - @Override - public void decodeInto(ChannelHandlerContext ctx, ByteBuf dat, BMMessage msg) - { - PacketBuffer newBuffer = new PacketBuffer(dat); - int index = newBuffer.readInt(); - - switch (index) - { - case 0: - ((TEAltarMessage) msg).pos = newBuffer.readBlockPos(); - boolean hasStacks = newBuffer.readBoolean(); - - ((TEAltarMessage) msg).items = new int[TEAltar.sizeInv * 3]; - if (hasStacks) - { - ((TEAltarMessage) msg).items = new int[TEAltar.sizeInv * 3]; - for (int i = 0; i < ((TEAltarMessage) msg).items.length; i++) - { - ((TEAltarMessage) msg).items[i] = newBuffer.readInt(); - } - } - - boolean hasFluids = newBuffer.readBoolean(); - ((TEAltarMessage) msg).fluids = new int[6]; - if (hasFluids) - for (int i = 0; i < ((TEAltarMessage) msg).fluids.length; i++) - { - ((TEAltarMessage) msg).fluids[i] = newBuffer.readInt(); - } - - ((TEAltarMessage) msg).capacity = newBuffer.readInt(); - - break; - - case 1: - ((TEOrientableMessage) msg).pos = newBuffer.readBlockPos(); - - ((TEOrientableMessage) msg).input = newBuffer.readInt(); - ((TEOrientableMessage) msg).output = newBuffer.readInt(); - - break; - - case 2: - ((TEPedestalMessage) msg).pos = newBuffer.readBlockPos(); - - boolean hasStacks1 = newBuffer.readBoolean(); - - ((TEPedestalMessage) msg).items = new int[TEPedestal.sizeInv * 3]; - if (hasStacks1) - { - ((TEPedestalMessage) msg).items = new int[TEPedestal.sizeInv * 3]; - for (int i = 0; i < ((TEPedestalMessage) msg).items.length; i++) - { - ((TEPedestalMessage) msg).items[i] = newBuffer.readInt(); - } - } - - break; - - case 3: - ((TEPlinthMessage) msg).pos = newBuffer.readBlockPos(); - - boolean hasStacks2 = newBuffer.readBoolean(); - - ((TEPlinthMessage) msg).items = new int[TEPlinth.sizeInv * 3]; - if (hasStacks2) - { - ((TEPlinthMessage) msg).items = new int[TEPlinth.sizeInv * 3]; - for (int i = 0; i < ((TEPlinthMessage) msg).items.length; i++) - { - ((TEPlinthMessage) msg).items[i] = newBuffer.readInt(); - } - } - - break; - - case 4: - ((TESocketMessage) msg).pos = newBuffer.readBlockPos(); - - boolean hasStacks3 = newBuffer.readBoolean(); - - ((TESocketMessage) msg).items = new int[TESocket.sizeInv * 3]; - if (hasStacks3) - { - ((TESocketMessage) msg).items = new int[TESocket.sizeInv * 3]; - for (int i = 0; i < ((TESocketMessage) msg).items.length; i++) - { - ((TESocketMessage) msg).items[i] = newBuffer.readInt(); - } - } - - break; - - case 5: - ((TETeleposerMessage) msg).pos = newBuffer.readBlockPos(); - - boolean hasStacks4 = newBuffer.readBoolean(); - - ((TETeleposerMessage) msg).items = new int[TETeleposer.sizeInv * 3]; - if (hasStacks4) - { - ((TETeleposerMessage) msg).items = new int[TETeleposer.sizeInv * 3]; - for (int i = 0; i < ((TETeleposerMessage) msg).items.length; i++) - { - ((TETeleposerMessage) msg).items[i] = newBuffer.readInt(); - } - } - - break; - - case 6: - ((TEWritingTableMessage) msg).pos = newBuffer.readBlockPos(); - - boolean hasStacks5 = newBuffer.readBoolean(); - - ((TEWritingTableMessage) msg).items = new int[TEChemistrySet.sizeInv * 3]; - if (hasStacks5) - { - ((TEWritingTableMessage) msg).items = new int[TEChemistrySet.sizeInv * 3]; - for (int i = 0; i < ((TEWritingTableMessage) msg).items.length; i++) - { - ((TEWritingTableMessage) msg).items[i] = newBuffer.readInt(); - } - } - - break; - - case 7: - ((ParticleMessage) msg).particle = newBuffer.readInt(); - - ((ParticleMessage) msg).xCoord = newBuffer.readDouble(); - ((ParticleMessage) msg).yCoord = newBuffer.readDouble(); - ((ParticleMessage) msg).zCoord = newBuffer.readDouble(); - - ((ParticleMessage) msg).xVel = newBuffer.readDouble(); - ((ParticleMessage) msg).yVel = newBuffer.readDouble(); - ((ParticleMessage) msg).zVel = newBuffer.readDouble(); - - break; - - case 8: - ((VelocityMessage) msg).xVel = newBuffer.readDouble(); - ((VelocityMessage) msg).yVel = newBuffer.readDouble(); - ((VelocityMessage) msg).zVel = newBuffer.readDouble(); - - break; - - case 9: - ((TEMasterStoneMessage) msg).pos = newBuffer.readBlockPos(); - - int ritualStrSize = newBuffer.readInt(); - String ritual = ""; - - for (int i = 0; i < ritualStrSize; i++) - { - ritual = ritual + newBuffer.readChar(); - } - - ((TEMasterStoneMessage) msg).ritual = ritual; - ((TEMasterStoneMessage) msg).isRunning = newBuffer.readBoolean(); - - break; - - case 10: - ((TEReagentConduitMessage) msg).pos = newBuffer.readBlockPos(); - - int listSize = newBuffer.readInt(); - - List list = new LinkedList(); - - for (int i = 0; i < listSize; i++) - { - list.add(new ColourAndCoords(newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt())); - } - - ((TEReagentConduitMessage) msg).destinationList = list; - - break; - - case 11: - ((CurrentLPMessage) msg).currentLP = newBuffer.readInt(); - ((CurrentLPMessage) msg).maxLP = newBuffer.readInt(); - - break; - - case 12: - int size1 = newBuffer.readInt(); - String str1 = ""; - for(int i=0; i achievements = new ArrayList(); - - public AchievementsMod(String name, int x, int y, ItemStack icon, Achievement parent) - { - super("achievement.alchemicalwizardry:" + name, "alchemicalwizardry:" + name, x, y, icon, parent); - achievements.add(this); - registerStat(); - } - - public AchievementsMod(String name, int x, int y, Item icon, Achievement parent) - { - this(name, x, y, new ItemStack(icon), parent); - } - - public AchievementsMod(String name, int x, int y, Block icon, Achievement parent) - { - this(name, x, y, new ItemStack(icon), parent); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java deleted file mode 100644 index cd5f27b5..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java +++ /dev/null @@ -1,49 +0,0 @@ -package WayofTime.alchemicalWizardry.common.achievements; - -import WayofTime.alchemicalWizardry.ModItems; -import net.minecraft.item.Item; -import net.minecraft.block.Block; -import net.minecraft.stats.Achievement; - -import java.util.ArrayList; -import java.util.List; - -public class AchievementsRegistry -{ - public final static List craftinglist = new ArrayList(); - public final static List pickupList = new ArrayList(); - - public static void init() - { - addItemsToCraftingList(); - addItemsToPickupList(); - } - - public static void addItemsToCraftingList() - { - craftinglist.add(ModItems.sacrificialDagger); - } - - public static void addItemsToPickupList() - { - pickupList.add(ModItems.weakBloodOrb); - } - - public static Achievement getAchievementForItem(Item item) - { - if (item == ModItems.sacrificialDagger) - { - return ModAchievements.firstPrick; - } - if (item == ModItems.weakBloodOrb) - { - return ModAchievements.weakOrb; - } - return null; - } - - public static Achievement getAchievementForBlock(Block block) - { - return null; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ICraftAchievement.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ICraftAchievement.java deleted file mode 100644 index 47006462..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ICraftAchievement.java +++ /dev/null @@ -1,11 +0,0 @@ -package WayofTime.alchemicalWizardry.common.achievements; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.stats.Achievement; - -public interface ICraftAchievement -{ - Achievement getAchievementOnCraft(ItemStack stack, EntityPlayer player, IInventory matrix); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/IPickupAchievement.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/IPickupAchievement.java deleted file mode 100644 index 3d2a7351..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/IPickupAchievement.java +++ /dev/null @@ -1,11 +0,0 @@ -package WayofTime.alchemicalWizardry.common.achievements; - -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.stats.Achievement; - -public interface IPickupAchievement -{ - Achievement getAchievementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java deleted file mode 100644 index ed4238ed..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java +++ /dev/null @@ -1,26 +0,0 @@ -package WayofTime.alchemicalWizardry.common.achievements; - -import net.minecraft.stats.Achievement; -import net.minecraft.util.StatCollector; -import net.minecraftforge.common.AchievementPage; -import net.minecraftforge.fml.common.FMLCommonHandler; -import WayofTime.alchemicalWizardry.ModItems; - -public class ModAchievements -{ - public static AchievementPage alchemicalWizardryPage; - - public static Achievement firstPrick; - public static Achievement weakOrb; - - public static void init() - { - firstPrick = new AchievementsMod(StatCollector.translateToLocal("firstPrick"), 0, 0, ModItems.sacrificialDagger, null); - weakOrb = new AchievementsMod(StatCollector.translateToLocal("weakOrb"), 3, 0, ModItems.weakBloodOrb, firstPrick); - - alchemicalWizardryPage = new AchievementPage("AlchemicalWizardry", AchievementsMod.achievements.toArray(new Achievement[AchievementsMod.achievements.size()])); - AchievementPage.registerAchievementPage(alchemicalWizardryPage); - AchievementsRegistry.init(); - FMLCommonHandler.instance().bus().register(new AchievementTrigger()); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionComponent.java b/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionComponent.java deleted file mode 100644 index 72c5d5c9..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionComponent.java +++ /dev/null @@ -1,27 +0,0 @@ -package WayofTime.alchemicalWizardry.common.alchemy; - -import net.minecraft.potion.Potion; - -public class CombinedPotionComponent -{ - public Potion result; - public Potion pot1; - public Potion pot2; - - public CombinedPotionComponent(Potion result, Potion pot1, Potion pot2) - { - this.result = result; - this.pot1 = pot1; - this.pot2 = pot2; - } - - public boolean isRecipeValid(Potion test1, Potion test2) - { - return (test1 == pot1 && test2 == pot2) || (test1 == pot2 && test2 == pot1); - } - - public boolean isRecipeValid(int test1, int test2) - { - return (test1 == pot1.id && test2 == pot2.id) || (test1 == pot2.id && test2 == pot1.id); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionRegistry.java deleted file mode 100644 index 0c0c4618..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionRegistry.java +++ /dev/null @@ -1,182 +0,0 @@ -package WayofTime.alchemicalWizardry.common.alchemy; - -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper; -import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; - -import java.util.ArrayList; -import java.util.List; - -public class CombinedPotionRegistry -{ - public static List potionList = new ArrayList(); - - public static void registerCombinedPotionRecipe(Potion result, Potion pot1, Potion pot2) - { - potionList.add(new CombinedPotionComponent(result, pot1, pot2)); - } - - public static boolean isRecipeValid(Potion pot1, Potion pot2) - { - for (CombinedPotionComponent recipe : potionList) - { - if (recipe.isRecipeValid(pot1, pot2)) - { - return true; - } - } - - return false; - } - - public static boolean isRecipeValid(int pot1, int pot2) - { - for (CombinedPotionComponent recipe : potionList) - { - if (recipe.isRecipeValid(pot1, pot2)) - { - return true; - } - } - - return false; - } - - public static Potion getPotion(Potion pot1, Potion pot2) - { - for (CombinedPotionComponent recipe : potionList) - { - if (recipe.isRecipeValid(pot1, pot2)) - { - return recipe.result; - } - } - - return null; - } - - public static Potion getPotion(int pot1, int pot2) - { - for (CombinedPotionComponent recipe : potionList) - { - if (recipe.isRecipeValid(pot1, pot2)) - { - return recipe.result; - } - } - - return null; - } - - public static ItemStack applyPotionEffect(ItemStack stack) - { - if (stack == null || !(stack.getItem() instanceof AlchemyFlask)) - { - return null; - } - - List list = AlchemyFlask.getEffects(stack); - if (list == null) - { - return stack; - } - - boolean isDone = false; - - for (AlchemyPotionHelper helper1 : list) - { - if (isDone) - { - continue; - } - - for (int i = 0; i < list.size(); i++) - { - if (isDone) - { - continue; - } - - AlchemyPotionHelper helper2 = list.get(i); - - PotionEffect potEffect = getResultantPotion(helper1, helper2); - - if (potEffect != null) - { - AlchemyPotionHelper potHelper = new AlchemyPotionHelper(potEffect.getPotionID(), potEffect.getDuration(), 0, potEffect.getAmplifier()); - - list.remove(helper1); - list.remove(helper2); - - list.add(potHelper); - - isDone = true; - } - } - } - - if (isDone) - { - AlchemyFlask.setEffects(stack, list); - - return stack; - } - - return null; - } - - public static boolean hasCombinablePotionEffect(ItemStack stack) - { - if (stack == null || !(stack.getItem() instanceof AlchemyFlask)) - { - return false; - } - - List list = AlchemyFlask.getEffects(stack); - if (list == null) - { - return false; - } - - for (AlchemyPotionHelper helper1 : list) - { - for (AlchemyPotionHelper helper2 : list) - { - int pot1 = helper1.getPotionID(); - int pot2 = helper2.getPotionID(); - - if (isRecipeValid(pot1, pot2)) - { - return true; - } - } - } - - return false; - } - - public static PotionEffect getResultantPotion(AlchemyPotionHelper potE1, AlchemyPotionHelper potE2) - { - if (potE1 == null || potE2 == null) - { - return null; - } - - int pot1 = potE1.getPotionID(); - int pot2 = potE2.getPotionID(); - - 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); - int amplifier = (potE1.getConcentration() + potE2.getConcentration()) / 2; - - Potion pot = getPotion(pot1, pot2); - - return new PotionEffect(pot.id, duration, amplifier); - } - - return null; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/ICombinationalCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/ICombinationalCatalyst.java deleted file mode 100644 index 22d02030..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/ICombinationalCatalyst.java +++ /dev/null @@ -1,5 +0,0 @@ -package WayofTime.alchemicalWizardry.common.alchemy; - -public interface ICombinationalCatalyst -{ -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicalCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicalCalcinator.java deleted file mode 100644 index ae0548f9..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicalCalcinator.java +++ /dev/null @@ -1,158 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; - -import java.util.Random; - -public class BlockAlchemicalCalcinator extends BlockContainer -{ - public BlockAlchemicalCalcinator() - { - super(Material.rock); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TEAlchemicalCalcinator(); - } - - @Override - public int getRenderType() - { - return -1; - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public boolean hasTileEntity(IBlockState blockState) - { - return true; - } - - @Override - public boolean canProvidePower() - { - return true; - } - - @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) - { - dropItems(world, blockPos); - super.breakBlock(world, blockPos, blockState); - } - - private void dropItems(World world, BlockPos blockPos) - { - Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(blockPos); - - if (!(tileEntity instanceof IInventory)) - { - return; - } - - IInventory inventory = (IInventory) tileEntity; - - for (int i = 0; i < inventory.getSizeInventory(); i++) - { - ItemStack item = inventory.getStackInSlot(i); - - if (item != null && item.stackSize > 0) - { - float rx = rand.nextFloat() * 0.8F + 0.1F; - float ry = rand.nextFloat() * 0.8F + 0.1F; - float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); - - if (item.hasTagCompound()) - { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); - } - - float factor = 0.05F; - entityItem.motionX = rand.nextGaussian() * factor; - entityItem.motionY = rand.nextGaussian() * factor + 0.2F; - entityItem.motionZ = rand.nextGaussian() * factor; - world.spawnEntityInWorld(entityItem); - item.stackSize = 0; - } - } - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - TEAlchemicalCalcinator tileEntity = (TEAlchemicalCalcinator) world.getTileEntity(blockPos); - - if (tileEntity == null || player.isSneaking()) - { - return false; - } - - ItemStack playerItem = player.getCurrentEquippedItem(); - - if (playerItem != null) - { - if (playerItem.getItem() instanceof IReagentManipulator) - { - return false; - } - - if (playerItem.getItem() instanceof IBloodOrb) - { - if (tileEntity.getStackInSlot(0) == null) - { - ItemStack newItem = playerItem.copy(); - newItem.stackSize = 1; - --playerItem.stackSize; - tileEntity.setInventorySlotContents(0, newItem); - } - } else if (tileEntity.getStackInSlot(1) == null) - { - ItemStack newItem = playerItem.copy(); - newItem.stackSize = 1; - --playerItem.stackSize; - tileEntity.setInventorySlotContents(1, newItem); - } - - } else - { - if (tileEntity.getStackInSlot(1) != null) - { - player.inventory.addItemStackToInventory(tileEntity.getStackInSlot(1)); - tileEntity.setInventorySlotContents(1, null); - } else if (tileEntity.getStackInSlot(0) != null) - { - player.inventory.addItemStackToInventory(tileEntity.getStackInSlot(0)); - tileEntity.setInventorySlotContents(0, null); - } - } - - tileEntity.getWorld().markBlockForUpdate(blockPos); - - return true; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java deleted file mode 100644 index 9397611b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java +++ /dev/null @@ -1,234 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import java.util.Random; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.items.IAltarManipulator; -import WayofTime.alchemicalWizardry.common.items.Orb; -import WayofTime.alchemicalWizardry.common.items.sigil.holding.SigilOfHolding; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -public class BlockAltar extends BlockContainer -{ - public BlockAltar() - { - super(Material.rock); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public boolean hasComparatorInputOverride() - { - return true; - } - - @Override - public int getComparatorInputOverride(World world, BlockPos blockPos) - { - TileEntity tile = world.getTileEntity(blockPos); - - if (tile instanceof TEAltar) - { - ItemStack stack = ((TEAltar) tile).getStackInSlot(0); - - if (stack != null && stack.getItem() instanceof Orb) - { - Orb bloodOrb = (Orb) stack.getItem(); - int maxEssence = bloodOrb.getMaxEssence(); - int currentEssence = bloodOrb.getCurrentEssence(stack); - int level = currentEssence * 15 / maxEssence; - return Math.min(15, level) % 16; - } - } - - return 0; - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - TEAltar tileEntity = (TEAltar) world.getTileEntity(blockPos); - - if (tileEntity == null || player.isSneaking()) - { - return false; - } - - ItemStack playerItem = player.getCurrentEquippedItem(); - - if (playerItem != null) - { - if (playerItem.getItem().equals(ModItems.divinationSigil)) - { - if (player.worldObj.isRemote) - { - world.markBlockForUpdate(blockPos); - } else - { - tileEntity.sendChatInfoToPlayer(player); - } - - return true; - } else if (playerItem.getItem().equals(ModItems.itemSeerSigil)) - { - if (player.worldObj.isRemote) - { - world.markBlockForUpdate(blockPos); - } else - { - tileEntity.sendMoreChatInfoToPlayer(player); - } - - return true; - }else if(playerItem.getItem() instanceof IAltarManipulator) - { - return false; - } - else if (playerItem.getItem().equals(ModItems.sigilOfHolding)) - { - ItemStack item = SigilOfHolding.getCurrentSigil(playerItem); - - if (item != null && item.getItem().equals(ModItems.divinationSigil)) - { - if (player.worldObj.isRemote) - { - world.markBlockForUpdate(blockPos); - } else - { - tileEntity.sendChatInfoToPlayer(player); - } - - return true; - } else if (item != null && item.getItem().equals(ModItems.itemSeerSigil)) - { - if (player.worldObj.isRemote) - { - world.markBlockForUpdate(blockPos); - } else - { - tileEntity.sendMoreChatInfoToPlayer(player); - } - - return true; - } - } - } - - if (tileEntity.getStackInSlot(0) == null && playerItem != null) - { - ItemStack newItem = playerItem.copy(); - newItem.stackSize = 1; - --playerItem.stackSize; - tileEntity.setInventorySlotContents(0, newItem); - tileEntity.startCycle(); - } else if (tileEntity.getStackInSlot(0) != null && playerItem == null) - { - player.inventory.addItemStackToInventory(tileEntity.getStackInSlot(0)); - tileEntity.setInventorySlotContents(0, null); - tileEntity.setActive(); - } - world.markBlockForUpdate(blockPos); - return true; - } - - @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) - { - dropItems(world, blockPos); - super.breakBlock(world, blockPos, blockState); - } - - private void dropItems(World world, BlockPos blockPos) - { - Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(blockPos); - - if (!(tileEntity instanceof IInventory)) - { - return; - } - - IInventory inventory = (IInventory) tileEntity; - - for (int i = 0; i < inventory.getSizeInventory(); i++) - { - ItemStack item = inventory.getStackInSlot(i); - - if (item != null && item.stackSize > 0) - { - float rx = rand.nextFloat() * 0.8F + 0.1F; - float ry = rand.nextFloat() * 0.8F + 0.1F; - float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); - - if (item.hasTagCompound()) - { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); - } - - float factor = 0.05F; - entityItem.motionX = rand.nextGaussian() * factor; - entityItem.motionY = rand.nextGaussian() * factor + 0.2F; - entityItem.motionZ = rand.nextGaussian() * factor; - world.spawnEntityInWorld(entityItem); - item.stackSize = 0; - } - } - } - - @Override - public int getRenderType() - { - return -1; - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public boolean hasTileEntity(IBlockState blockState) - { - return true; - } - - @Override - @SideOnly(Side.CLIENT) - public void randomDisplayTick(World world, BlockPos blockPos, IBlockState blockState, Random rand) - { - TEAltar tileEntity = (TEAltar) world.getTileEntity(blockPos); - - if (!tileEntity.isActive()) - { - return; - } - - if (rand.nextInt(3) != 0) - { - return; - } - } - - @Override - public TileEntity createNewTileEntity(World var1, int var2) - { - return new TEAltar(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockArmourForge.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockArmourForge.java deleted file mode 100644 index 3a806593..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockArmourForge.java +++ /dev/null @@ -1,322 +0,0 @@ -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 net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.item.EntityItem; -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.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; - -public class BlockArmourForge extends Block -{ - public static List helmetList = new ArrayList(); - public static List plateList = new ArrayList(); - public static List leggingsList = new ArrayList(); - public static List bootsList = new ArrayList(); - - public BlockArmourForge() - { - super(Material.iron); - setHardness(2.0F); - setResistance(5.0F); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (world.isRemote) - { - return false; - } - - int armourType = getArmourType(world, blockPos); - - if (armourType == -1) - { - return false; - } - - int direction = getDirectionForArmourType(world, blockPos, armourType); - - if (!isParadigmValid(armourType, direction, world, blockPos)) - { - return false; - } - - List list = null; - ItemStack armourPiece = null; - - switch (armourType) - { - case 0: - list = plateList; - armourPiece = new ItemStack(ModItems.boundChestplate, 1, 0); - break; - - case 1: - list = leggingsList; - armourPiece = new ItemStack(ModItems.boundLeggings, 1, 0); - break; - - case 2: - list = helmetList; - armourPiece = new ItemStack(ModItems.boundHelmet, 1, 0); - break; - - case 3: - list = bootsList; - armourPiece = new ItemStack(ModItems.boundBoots, 1, 0); - break; - } - - if (list == null) - { - return false; - } - - if (armourPiece == null) - { - return false; - } - - if (armourPiece.getTagCompound() == null) - { - armourPiece.setTagCompound(new NBTTagCompound()); - } - - for (ArmourComponent ac : list) - { - int xOff = ac.getXOff(); - int zOff = ac.getZOff(); - TileEntity tileEntity; - - switch (direction) - { - case 1: - tileEntity = world.getTileEntity(blockPos.add(xOff, 0, -zOff)); - break; - - case 2: - tileEntity = world.getTileEntity(blockPos.add(zOff, 0, xOff)); - break; - - case 3: - tileEntity = world.getTileEntity(blockPos.add(-xOff, 0, zOff)); - break; - - case 4: - tileEntity = world.getTileEntity(blockPos.add(-zOff, 0, -xOff)); - break; - - case 5: - tileEntity = world.getTileEntity(blockPos.add(xOff, zOff, 0)); - break; - - case 6: - tileEntity = world.getTileEntity(blockPos.add(0, zOff, xOff)); - break; - - default: - tileEntity = null; - } - - if (tileEntity instanceof TESocket) - { - ItemStack itemStack = ((TESocket) tileEntity).getStackInSlot(0); - BlockPos tilePos = tileEntity.getPos(); - ((TESocket) tileEntity).setInventorySlotContents(0, null); - world.setBlockToAir(tilePos); - - for (int i = 0; i < 8; i++) - { - SpellHelper.sendIndexedParticleToAllAround(world, tilePos, 20, world.provider.getDimensionId(), 1, tilePos); - } - - if (itemStack != null) - { - Item item = itemStack.getItem(); - - if (item instanceof ArmourUpgrade) - { - ((BoundArmour) armourPiece.getItem()).hasAddedToInventory(armourPiece, itemStack.copy()); - ((TESocket) tileEntity).setInventorySlotContents(0, null); - } - } - } - } - - if (armourPiece != null) - { - int xOff = (world.rand.nextInt(11) - 5); - int zOff = (int) (Math.sqrt(25 - xOff * xOff) * (world.rand.nextInt(2) - 0.5) * 2); - world.addWeatherEffect(new EntityLightningBolt(world, blockPos.getX() + xOff, blockPos.getY() + 5, blockPos.getZ() + zOff)); - world.spawnEntityInWorld(new EntityItem(world, blockPos.getX(), blockPos.getY() + 1, blockPos.getZ(), armourPiece)); - } - - return true; - } - - //0 for plate, 1 for leggings, 2 for helmet, 3 for boots - public int getArmourType(World world, BlockPos blockPos) - { - for (int i = 0; i <= 3; i++) - { - if (getDirectionForArmourType(world, blockPos, i) != -1) - { - return i; - } - } - - return -1; - } - - public int getDirectionForArmourType(World world, BlockPos blockPos, int armourType) - { - for (int i = 1; i <= 6; i++) - { - if (isParadigmValid(armourType, i, world, blockPos)) - { - return i; - } - } - - return -1; - } - - public boolean isParadigmValid(int armourType, int direction, World world, BlockPos blockPos) - { - List list = null; - - switch (armourType) - { - case 0: - list = plateList; - break; - - case 1: - list = leggingsList; - break; - - case 2: - list = helmetList; - break; - - case 3: - list = bootsList; - break; - } - - if (list == null) - { - return false; - } - - for (ArmourComponent ac : list) - { - int xOff = ac.getXOff(); - int zOff = ac.getZOff(); - - switch (direction) - { - case 1: - if (!(world.getTileEntity(blockPos.add(xOff, 0, -zOff)) instanceof TESocket)) - { - return false; - } - - break; - - case 2: - if (!(world.getTileEntity(blockPos.add(zOff, 0, xOff)) instanceof TESocket)) - { - return false; - } - - break; - - case 3: - if (!(world.getTileEntity(blockPos.add(-xOff, 0, zOff)) instanceof TESocket)) - { - return false; - } - - break; - - case 4: - if (!(world.getTileEntity(blockPos.add(-zOff, 0, -xOff)) instanceof TESocket)) - { - return false; - } - - break; - - case 5: - if (!(world.getTileEntity(blockPos.add(xOff, zOff, 0)) instanceof TESocket)) - { - return false; - } - - break; - - case 6: - if (!(world.getTileEntity(blockPos.add(0, zOff, xOff)) instanceof TESocket)) - { - return false; - } - - break; - - default: - return false; - } - } - - return true; - } - - public static void initializeRecipes() - { - helmetList.add(new ArmourComponent(-1, 1)); - helmetList.add(new ArmourComponent(0, 1)); - helmetList.add(new ArmourComponent(1, 1)); - helmetList.add(new ArmourComponent(-1, 0)); - helmetList.add(new ArmourComponent(1, 0)); - bootsList.add(new ArmourComponent(-1, 1)); - bootsList.add(new ArmourComponent(1, 1)); - bootsList.add(new ArmourComponent(-1, 0)); - bootsList.add(new ArmourComponent(1, 0)); - plateList.add(new ArmourComponent(-1, 0)); - plateList.add(new ArmourComponent(1, 0)); - plateList.add(new ArmourComponent(-1, -1)); - plateList.add(new ArmourComponent(0, -1)); - plateList.add(new ArmourComponent(1, -1)); - plateList.add(new ArmourComponent(-1, -2)); - plateList.add(new ArmourComponent(0, -2)); - plateList.add(new ArmourComponent(1, -2)); - leggingsList.add(new ArmourComponent(-1, 1)); - leggingsList.add(new ArmourComponent(0, 1)); - leggingsList.add(new ArmourComponent(1, 1)); - leggingsList.add(new ArmourComponent(-1, 0)); - leggingsList.add(new ArmourComponent(1, 0)); - leggingsList.add(new ArmourComponent(-1, -1)); - leggingsList.add(new ArmourComponent(1, -1)); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java deleted file mode 100644 index 6ed3c8c0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java +++ /dev/null @@ -1,157 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -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; - -public class BlockBelljar extends BlockContainer -{ - public BlockBelljar() - { - super(Material.glass); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) - { - if (this.equals(ModBlocks.blockCrystalBelljar)) - { - par3List.add(new ItemStack(par1, 1, 0)); - - for(Reagent reagent : ReagentRegistry.reagentList.values()) - { - ItemStack stack = new ItemStack(par1, 1, 0); - NBTTagCompound tag = new NBTTagCompound(); - - ReagentContainer[] tanks = new ReagentContainer[1]; - tanks[0] = new ReagentContainer(reagent, 16000, 16000); - - NBTTagList tagList = new NBTTagList(); - - NBTTagCompound savedTag = new NBTTagCompound(); - if (tanks[0] != null) - { - tanks[0].writeToNBT(savedTag); - } - tagList.appendTag(savedTag); - - - tag.setTag("reagentTanks", tagList); - - stack.setTagCompound(tag); - - par3List.add(stack); - } - } else - { - super.getSubBlocks(par1, par2CreativeTabs, par3List); - } - } - - @Override - public void onBlockPlacedBy(World world, BlockPos blockPos, IBlockState blockState, EntityLivingBase entityLiving, ItemStack stack) - { - TileEntity tile = world.getTileEntity(blockPos); - - if (tile instanceof TEBelljar) - { - NBTTagCompound tag = stack.getTagCompound(); - if (tag != null) - { - ((TEBelljar) tile).readTankNBTOnPlace(tag); - } - } - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TEBelljar(); - } - - @Override - public int getRenderType() - { - return -1; - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public boolean hasTileEntity(IBlockState blockState) - { - return true; - } - - @Override - public boolean hasComparatorInputOverride() - { - return true; - } - - @Override - public int getComparatorInputOverride(World world, BlockPos blockPos) - { - TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TEBelljar) - { - return ((TEBelljar) tile).getRSPowerOutput(); - } - return 15; - } - - @Override - public void onBlockHarvested(World world, BlockPos blockPos, IBlockState blockState, EntityPlayer player) - { - this.dropBlockAsItem(world, blockPos, blockState, 0); - super.onBlockHarvested(world, blockPos, blockState, player); - } - - @Override - public ArrayList getDrops(IBlockAccess world, BlockPos blockPos, IBlockState blockState, int fortune) - { - ArrayList list = new ArrayList(); - - TileEntity tile = world.getTileEntity(blockPos); - - if (tile instanceof TEBelljar) - { - ItemStack drop = new ItemStack(this); - NBTTagCompound tag = new NBTTagCompound(); - ((TEBelljar) tile).writeTankNBT(tag); - drop.setTagCompound(tag); - - list.add(drop); - } - - return list; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java deleted file mode 100644 index 827fd08e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java +++ /dev/null @@ -1,58 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import java.util.List; -import java.util.Random; - -public class BlockBloodLightSource extends Block -{ - public BlockBloodLightSource() - { - super(Material.cloth); - } - - @Override - public int getLightValue(IBlockAccess world, BlockPos blockPos) - { - return 15; - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public void randomDisplayTick(World world, BlockPos blockPos, IBlockState blockState, Random rand) - { - if (rand.nextInt(3) != 0) - { - float f = 1.0F; - float f1 = f * 0.6F + 0.4F; - float f2 = f * f * 0.7F - 0.5F; - float f3 = f * f * 0.6F - 0.7F; - world.spawnParticle(EnumParticleTypes.REDSTONE, blockPos.getX() + 0.5D + rand.nextGaussian() / 8, blockPos.getY() + 0.5D, blockPos.getZ() + 0.5D + rand.nextGaussian() / 8, f1, f2, f3); - } - } - - @Override - public void addCollisionBoxesToList(World par1World, BlockPos blockPos, IBlockState blockState, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity) - { - this.setBlockBounds(0.40F, 0.40F, 0.40F, 0.60F, 0.60F, 0.60F); - } - - public int quantityDropped(Random par1Random) - { - return 0; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodRune.java deleted file mode 100644 index 0c98f2bc..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodRune.java +++ /dev/null @@ -1,100 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.PropertyInteger; -import net.minecraft.block.state.BlockState; -import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.ModBlocks; - -public class BlockBloodRune extends Block -{ - public static final PropertyInteger INTEGER = PropertyInteger.create("rune", 0, 5); - - public BlockBloodRune() - { - super(Material.iron); - this.setDefaultState(this.blockState.getBaseState().withProperty(INTEGER, 0)); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - protected BlockState createBlockState() - { - return new BlockState(this, INTEGER); - } - - @Override - public IBlockState getStateFromMeta(int meta) - { - return this.getDefaultState().withProperty(INTEGER, meta); - } - - @Override - public int getMetaFromState(IBlockState state) - { - return ((Integer)state.getValue(INTEGER)).intValue(); - } - - public int getRuneEffect(int meta) - { - switch (meta) - { - case 0: - return 0; - - case 1: //Altar Capacity rune - return 5; - - case 2: //Filling/emptying rune - return 6; - - case 3: //Orb Capacity rune - return 7; - - case 4: //Better Capacity rune - return 8; - - case 5: //Acceleration rune - return 9; - } - - return 0; - } - - @Override - @SideOnly(Side.CLIENT) - - /** - * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) - */ - public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) - { - if (this.equals(ModBlocks.bloodRune)) - { - par3List.add(new ItemStack(par1, 1, 0)); - par3List.add(new ItemStack(par1, 1, 1)); - par3List.add(new ItemStack(par1, 1, 2)); - par3List.add(new ItemStack(par1, 1, 3)); - par3List.add(new ItemStack(par1, 1, 4)); - par3List.add(new ItemStack(par1, 1, 5)); - } else - { - super.getSubBlocks(par1, par2CreativeTabs, par3List); - } - } - - @Override - public int damageDropped(IBlockState blockState) - { - return blockState.getBlock().damageDropped(blockState); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodStoneBrick.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodStoneBrick.java deleted file mode 100644 index dea4dc65..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodStoneBrick.java +++ /dev/null @@ -1,14 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; - -public class BlockBloodStoneBrick extends Block -{ - public BlockBloodStoneBrick() - { - super(Material.iron); - setHardness(2.0F); - setResistance(5.0F); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java deleted file mode 100644 index 9830f182..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java +++ /dev/null @@ -1,130 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; - -import java.util.List; -import java.util.Random; - -public class BlockChemistrySet extends BlockContainer -{ - public BlockChemistrySet() - { - super(Material.wood); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - TileEntity tileEntity = world.getTileEntity(blockPos); - - if (tileEntity == null || player.isSneaking()) - { - return false; - } - - //code to open gui explained later - player.openGui(AlchemicalWizardry.instance, 0, world, blockPos.getX(), blockPos.getY(), blockPos.getZ()); - return true; - } - - @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) - { - dropItems(world, blockPos); - super.breakBlock(world, blockPos, blockState); - } - - private void dropItems(World world, BlockPos blockPos) - { - Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(blockPos); - - if (!(tileEntity instanceof IInventory)) - { - return; - } - - IInventory inventory = (IInventory) tileEntity; - - for (int i = 0; i < inventory.getSizeInventory(); i++) - { - ItemStack item = inventory.getStackInSlot(i); - - if (item != null && item.stackSize > 0) - { - float rx = rand.nextFloat() * 0.8F + 0.1F; - float ry = rand.nextFloat() * 0.8F + 0.1F; - float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); - - if (item.hasTagCompound()) - { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); - } - - float factor = 0.05F; - entityItem.motionX = rand.nextGaussian() * factor; - entityItem.motionY = rand.nextGaussian() * factor + 0.2F; - entityItem.motionZ = rand.nextGaussian() * factor; - world.spawnEntityInWorld(entityItem); - item.stackSize = 0; - } - } - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TEChemistrySet(); - } - - @Override - public int getRenderType() - { - return -1; - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public boolean hasTileEntity(IBlockState blockState) - { - return true; - } - - @Override - public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, List list, Entity collidingEntity) - { - this.setBlockBounds(0.4375F, 0.0F, 0.4375F, 0.5625F, 0.9375F, 0.5625F); - super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity); - this.setBlockBoundsForItemRender(); - super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity); - } - - @Override - public void setBlockBoundsForItemRender() - { - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockConduit.java deleted file mode 100644 index 0974291e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockConduit.java +++ /dev/null @@ -1,47 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; -import net.minecraft.block.state.IBlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; - -public class BlockConduit extends BlockOrientable -{ - public BlockConduit() - { - super(); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) - { - super.breakBlock(world, blockPos, blockState); - } - - @Override - public TileEntity createNewTileEntity(World world, int noClue) - { - return new TEConduit(); - } - - @Override - public int getRenderType() - { - return -1; - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public boolean hasTileEntity(IBlockState blockState) - { - return true; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrystal.java deleted file mode 100644 index 1c917c3c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrystal.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.ModBlocks; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.List; - -public class BlockCrystal extends Block -{ - public BlockCrystal() - { - super(Material.iron); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - @SideOnly(Side.CLIENT) - /** - * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) - */ - public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) - { - if (this.equals(ModBlocks.blockCrystal)) - { - par3List.add(new ItemStack(par1, 1, 0)); - par3List.add(new ItemStack(par1, 1, 1)); - } else - { - super.getSubBlocks(par1, par2CreativeTabs, par3List); - } - } - - @Override - public int damageDropped(IBlockState blockState) - { - return blockState.getBlock().damageDropped(blockState); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockDemonPortal.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockDemonPortal.java deleted file mode 100644 index 9dee123f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockDemonPortal.java +++ /dev/null @@ -1,54 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; - -public class BlockDemonPortal extends BlockContainer -{ - public BlockDemonPortal() - { - super(Material.rock); - setHardness(1000); - setResistance(10000); - } - - @Override - public void onBlockHarvested(World world, BlockPos blockPos, IBlockState blockState, EntityPlayer player) - { - TileEntity tile = world.getTileEntity(blockPos); - if(tile instanceof TEDemonPortal) - { - ((TEDemonPortal) tile).notifyPortalOfBreak(); - } - - super.onBlockHarvested(world, blockPos, blockState, player); - } - - @Override - public TileEntity createNewTileEntity(World var1, int var2) - { - return new TEDemonPortal(); - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (world.isRemote) - { - return false; - } - - TEDemonPortal tileEntity = (TEDemonPortal) world.getTileEntity(blockPos); - - tileEntity.rightClickBlock(player, side.getIndex()); - - return false; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEfficiencyRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEfficiencyRune.java deleted file mode 100644 index 2dbb1792..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEfficiencyRune.java +++ /dev/null @@ -1,17 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -public class BlockEfficiencyRune extends BlockBloodRune -{ - public BlockEfficiencyRune() - { - super(); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public int getRuneEffect(int metaData) - { - return 2; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEmptySocket.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEmptySocket.java deleted file mode 100644 index b51d876d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEmptySocket.java +++ /dev/null @@ -1,36 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.util.EnumWorldBlockLayer; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -public class BlockEmptySocket extends Block -{ - public BlockEmptySocket() - { - super(Material.iron); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - @SideOnly(Side.CLIENT) - public EnumWorldBlockLayer getBlockLayer() - { - return EnumWorldBlockLayer.CUTOUT; - } - - @Override - public boolean isFullCube() - { - return false; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java deleted file mode 100644 index 2eee791d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java +++ /dev/null @@ -1,79 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.common.omega.IEnchantmentGlyph; - -public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph -{ - public BlockEnchantmentGlyph() - { - super(Material.iron); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public int getAdditionalStabilityForFaceCount(World world, BlockPos pos, int meta, int faceCount) - { - switch(meta) - { - case 0: - return -faceCount * 10; - case 1: - return -faceCount * 20; - default: - return -faceCount * 20; - } - } - - @Override - public int getEnchantability(World world, BlockPos pos, int meta) - { - switch(meta) - { - case 0: - return 1; - default: - return 0; - } - } - - @Override - public int getEnchantmentLevel(World world, BlockPos pos, int meta) - { - switch(meta) - { - case 1: - return 1; - default: - return 0; - } - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) - { - for(int i=0; i<2; i++) - { - par3List.add(new ItemStack(par1, 1, i)); - } - } - - @Override - public int damageDropped(IBlockState blockState) - { - return blockState.getBlock().damageDropped(blockState); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockFilledSocket.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockFilledSocket.java deleted file mode 100644 index 4ea85129..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockFilledSocket.java +++ /dev/null @@ -1,123 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; - -import java.util.Random; - -public class BlockFilledSocket extends BlockContainer -{ - public BlockFilledSocket() - { - super(Material.rock); - setHardness(2.0F); - setResistance(5.0F); - //func_111022_d("AlchemicalWizardry:blocks"); - } - - @Override - public int getRenderType() - { - return 3; - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState blockState, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - TESocket tileEntity = (TESocket) world.getTileEntity(blockPos); - - if (tileEntity == null || player.isSneaking()) - { - return false; - } - - ItemStack playerItem = player.getCurrentEquippedItem(); - if (tileEntity.getStackInSlot(0) == null && playerItem != null) - { - if (playerItem.getItem() instanceof ArmourUpgrade) - { - ItemStack newItem = playerItem.copy(); - newItem.stackSize = 1; - --playerItem.stackSize; - tileEntity.setInventorySlotContents(0, newItem); - return true; - } - else - { - return false; - } - } - else if (tileEntity.getStackInSlot(0) != null && playerItem == null) - { - player.inventory.addItemStackToInventory(tileEntity.getStackInSlot(0)); - tileEntity.setInventorySlotContents(0, null); - tileEntity.setActive(); - return true; - } - world.markBlockForUpdate(blockPos); - return false; - } - - @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) - { - dropItems(world, blockPos); - super.breakBlock(world, blockPos, blockState); - } - - private void dropItems(World world, BlockPos blockPos) - { - Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(blockPos); - - if (!(tileEntity instanceof IInventory)) - { - return; - } - - IInventory inventory = (IInventory) tileEntity; - - for (int i = 0; i < inventory.getSizeInventory(); i++) - { - ItemStack item = inventory.getStackInSlot(i); - - if (item != null && item.stackSize > 0) - { - float rx = rand.nextFloat() * 0.8F + 0.1F; - float ry = rand.nextFloat() * 0.8F + 0.1F; - float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); - - if (item.hasTagCompound()) - { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); - } - - float factor = 0.05F; - entityItem.motionX = rand.nextGaussian() * factor; - entityItem.motionY = rand.nextGaussian() * factor + 0.2F; - entityItem.motionZ = rand.nextGaussian() * factor; - world.spawnEntityInWorld(entityItem); - item.stackSize = 0; - } - } - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TESocket(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockImperfectRitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockImperfectRitualStone.java deleted file mode 100644 index 6e409014..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockImperfectRitualStone.java +++ /dev/null @@ -1,109 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.monster.EntityZombie; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; - -public class BlockImperfectRitualStone extends Block -{ - public BlockImperfectRitualStone() - { - super(Material.iron); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - if(SpellHelper.isFakePlayer(player)) - { - return false; - } - { - Block block = world.getBlockState(blockPos.add(0, 1, 0)).getBlock(); - - if (block == Blocks.water) - { - if (!player.capabilities.isCreativeMode && !world.isRemote) - { - SoulNetworkHandler.hurtPlayer(player, 5000); - } - - if (!world.isRemote) - { - world.addWeatherEffect(new EntityLightningBolt(world, blockPos.getX(), blockPos.getY() + 2, blockPos.getZ())); - } - - world.getWorldInfo().setRaining(true); - - if (world.isRemote) - { - world.setRainStrength(1.0F); - world.setThunderStrength(1.0f); - } - - world.getWorldInfo().setThunderTime(0); - world.getWorldInfo().setThundering(true); - return true; - } else if (block == Blocks.coal_block) - { - if (!player.capabilities.isCreativeMode && !world.isRemote) - { - SoulNetworkHandler.hurtPlayer(player, 5000); - } - - EntityZombie zomb = new EntityZombie(world); - zomb.setPosition(blockPos.getX() + 0.5, blockPos.getY() + 2, blockPos.getZ() + 0.5); - zomb.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2000)); - zomb.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 20000, 7)); - zomb.addPotionEffect(new PotionEffect(Potion.resistance.id, 20000, 3)); - - if (!world.isRemote) - { - world.spawnEntityInWorld(zomb); - world.addWeatherEffect(new EntityLightningBolt(world, blockPos.getX(), blockPos.getY() + 2, blockPos.getZ())); - } - - return true; - } else if (block == Blocks.lapis_block) - { - if (!player.capabilities.isCreativeMode && !world.isRemote) - { - SoulNetworkHandler.hurtPlayer(player, 5000); - } - - if (!world.isRemote) - { - world.addWeatherEffect(new EntityLightningBolt(world, blockPos.getX(), blockPos.getY() + 2, blockPos.getZ())); - world.setWorldTime((world.getWorldTime() / 24000) * 24000 + 13800); - } - } else if (block == Blocks.bedrock) - { - if (!player.capabilities.isCreativeMode && !world.isRemote) - { - SoulNetworkHandler.hurtPlayer(player, 5000); - } - - if (!world.isRemote) - { - world.addWeatherEffect(new EntityLightningBolt(world, blockPos.getX(), blockPos.getY() + 2, blockPos.getZ())); - } - - player.addPotionEffect(new PotionEffect(Potion.resistance.id, 60 * 20, 1)); - } - } - return false; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockIncenseCrucible.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockIncenseCrucible.java deleted file mode 100644 index d12a848c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockIncenseCrucible.java +++ /dev/null @@ -1,153 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import java.util.Random; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.sacrifice.IIncense; -import WayofTime.alchemicalWizardry.common.tileEntity.TECrucible; - -public class BlockIncenseCrucible extends BlockContainer -{ - public BlockIncenseCrucible() - { - super(Material.anvil); - this.setHardness(2.0f); - this.setResistance(1.5f); - this.setBlockBounds(0.3125F, 0.0F, 0.3125F, 0.6875F, 0.625F, 0.6875F); - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - TECrucible tileEntity = (TECrucible) world.getTileEntity(blockPos); - - if (tileEntity == null || player.isSneaking()) - { - return false; - } - - ItemStack playerItem = player.getCurrentEquippedItem(); - - if (tileEntity.getStackInSlot(0) == null && playerItem != null && playerItem.getItem() instanceof IIncense) - { - ItemStack newItem = playerItem.copy(); - 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); - } - world.markBlockForUpdate(blockPos); - return true; - } - -// @Override -// public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) -// { -// return null; -// } - - @Override - public void setBlockBoundsBasedOnState(IBlockAccess world, BlockPos blockPos) - { - this.setBlockBounds(0.3125F, 0.0F, 0.3125F, 0.6875F, 0.625F, 0.6875F); - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TECrucible(); - } - - @Override - public void randomDisplayTick(World world, BlockPos blockPos, IBlockState blockState, Random rand) - { - if (rand.nextInt(3) != 0) - { - TECrucible tile = (TECrucible)world.getTileEntity(blockPos); - tile.spawnClientParticle(world, blockPos, rand); - } - } - - @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) - { - dropItems(world, blockPos); - super.breakBlock(world, blockPos, blockState); - } - - @Override - public boolean hasComparatorInputOverride() - { - return true; - } - - @Override - public int getComparatorInputOverride(World world, BlockPos blockPos) - { - TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TECrucible) - { - return ((TECrucible) tile).getRSPowerOutput(); - } - return 15; - } - - private void dropItems(World world, BlockPos blockPos) - { - Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(blockPos); - - if (!(tileEntity instanceof IInventory)) - { - return; - } - - IInventory inventory = (IInventory) tileEntity; - - for (int i = 0; i < inventory.getSizeInventory(); i++) - { - ItemStack item = inventory.getStackInSlot(i); - - if (item != null && item.stackSize > 0) - { - float rx = rand.nextFloat() * 0.8F + 0.1F; - float ry = rand.nextFloat() * 0.8F + 0.1F; - float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); - - if (item.hasTagCompound()) - { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); - } - - float factor = 0.05F; - entityItem.motionX = rand.nextGaussian() * factor; - entityItem.motionY = rand.nextGaussian() * factor + 0.2F; - entityItem.motionZ = rand.nextGaussian() * factor; - world.spawnEntityInWorld(entityItem); - item.stackSize = 0; - } - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLargeBloodStoneBrick.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLargeBloodStoneBrick.java deleted file mode 100644 index 1f12e28d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLargeBloodStoneBrick.java +++ /dev/null @@ -1,14 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; - -public class BlockLargeBloodStoneBrick extends Block -{ - public BlockLargeBloodStoneBrick() - { - super(Material.iron); - setHardness(2.0F); - setResistance(5.0F); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLifeEssence.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLifeEssence.java deleted file mode 100644 index 37276de0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLifeEssence.java +++ /dev/null @@ -1,29 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import net.minecraft.block.material.Material; -import net.minecraft.util.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.fluids.BlockFluidClassic; - -public class BlockLifeEssence extends BlockFluidClassic -{ - public BlockLifeEssence() - { - super(AlchemicalWizardry.lifeEssenceFluid, Material.water); - AlchemicalWizardry.lifeEssenceFluid.setBlock(this); - } - - @Override - public boolean canDisplace(IBlockAccess world, BlockPos blockPos) - { - return !world.getBlockState(blockPos).getBlock().getMaterial().isLiquid() && super.canDisplace(world, blockPos); - } - - @Override - public boolean displaceIfPossible(World world, BlockPos blockPos) - { - return !world.getBlockState(blockPos).getBlock().getMaterial().isLiquid() && super.displaceIfPossible(world, blockPos); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java deleted file mode 100644 index f39df1a5..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java +++ /dev/null @@ -1,91 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.common.items.ActivationCrystal; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; - -public class BlockMasterStone extends BlockContainer -{ - public BlockMasterStone() - { - super(Material.iron); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public int getRenderType() - { - return 3; - } - - @Override - public void onBlockHarvested(World world, BlockPos blockPos, IBlockState blockState, EntityPlayer player) - { - TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TEMasterStone) - { - ((TEMasterStone) tile).useOnRitualBroken(); - } - - super.onBlockHarvested(world, blockPos, blockState, player); - } - - @Override - public void onBlockDestroyedByExplosion(World world, BlockPos blockPos, Explosion explosion) - { - super.onBlockDestroyedByExplosion(world, blockPos, explosion); - TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TEMasterStone) - { - ((TEMasterStone) tile).useOnRitualBrokenExplosion(); - } - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - TEMasterStone tileEntity = (TEMasterStone) world.getTileEntity(blockPos); - - if (tileEntity == null || player.isSneaking()) - { - return false; - } - - ItemStack playerItem = player.getCurrentEquippedItem(); - - if (playerItem == null) - { - return false; - } - - Item item = playerItem.getItem(); - - if (!(item instanceof ActivationCrystal)) - { - return false; - } - - ActivationCrystal acItem = (ActivationCrystal) item; -// tileEntity.setOwner(acItem.getOwnerName(playerItem)); - tileEntity.activateRitual(world, acItem.getCrystalLevel(playerItem), playerItem, player, ActivationCrystal.getOwnerName(playerItem)); - world.markBlockForUpdate(blockPos); - return true; - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TEMasterStone(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMimic.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMimic.java deleted file mode 100644 index 7737d3ac..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMimic.java +++ /dev/null @@ -1,210 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.particle.EffectRenderer; -import net.minecraft.client.particle.EntityDiggingFX; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.*; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMimicBlock; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -public class BlockMimic extends BlockContainer -{ - public BlockMimic() - { - super(Material.water); - setHardness(2.0F); - setResistance(5.0F); -// this.setBlockBounds(0, 0, 0, 0, 0, 0); - } - - @Override - @SideOnly(Side.CLIENT) - public boolean shouldSideBeRendered(IBlockAccess world, BlockPos blockPos, EnumFacing side) - { - TileEntity TE = world.getTileEntity(blockPos); - if(!(TE instanceof TEMimicBlock)) - { - return true; - } - TEMimicBlock mimic = (TEMimicBlock)TE; - - Block block = mimic.getBlock(); - - return block == null || block.shouldSideBeRendered(world, blockPos, side); - } - - @Override - public boolean canCollideCheck(IBlockState blockState, boolean bool) - { - return blockState.getBlock().getMetaFromState(blockState) == 1; - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TEMimicBlock(); - } - - @Override - public boolean canSilkHarvest(World world, BlockPos pos, IBlockState state, EntityPlayer player) - { - return false; - } - - @Override - public int quantityDropped(Random random) - { - return 0; - } - - @Override - public boolean isBlockSolid(IBlockAccess world, BlockPos blockPos, EnumFacing side) - { - TileEntity tile = world.getTileEntity(blockPos); - if(tile instanceof TEMimicBlock) - { - Block block = ((TEMimicBlock) tile).getBlock(); - int mimicMeta = ((TEMimicBlock) tile).getMetaOfMimic(); - - if(block != null) - { - return block.isBlockSolid(world, blockPos, side); //side was mimicM - } - } - return super.isBlockSolid(world, blockPos, side); - } - - @Override - public boolean addHitEffects(World world, MovingObjectPosition target, EffectRenderer effectRenderer) - { - TileEntity tile = world.getTileEntity(target.func_178782_a()); - - TEMimicBlock TE = (TEMimicBlock)tile; - - if (TE != null) - { - Block block = TE.getBlock(); - - double xOffset = target.func_178782_a().getX() + world.rand.nextDouble() * (block.getBlockBoundsMaxX() - block.getBlockBoundsMinX() - 0.1F * 2.0F) + 0.1F + block.getBlockBoundsMinX(); - double yOffset = target.func_178782_a().getY() + world.rand.nextDouble() * (block.getBlockBoundsMaxY() - block.getBlockBoundsMinY() - 0.1F * 2.0F) + 0.1F + block.getBlockBoundsMinY(); - double zOffset = target.func_178782_a().getZ() + world.rand.nextDouble() * (block.getBlockBoundsMaxZ() - block.getBlockBoundsMinZ() - 0.1F * 2.0F) + 0.1F + block.getBlockBoundsMinZ(); - - switch (target.subHit) - { - case 0: - yOffset = target.func_178782_a().getY() + block.getBlockBoundsMinY() - 0.1D; - break; - case 1: - yOffset = target.func_178782_a().getY() + block.getBlockBoundsMaxY() + 0.1D; - break; - case 2: - zOffset = target.func_178782_a().getZ() + block.getBlockBoundsMinZ() - 0.1D; - break; - case 3: - zOffset = target.func_178782_a().getZ() + block.getBlockBoundsMaxZ() + 0.1D; - break; - case 4: - xOffset = target.func_178782_a().getX() + block.getBlockBoundsMinX() - 0.1D; - break; - case 5: - xOffset = target.func_178782_a().getX() + block.getBlockBoundsMaxX() + 0.1D; - break; - } - -// BlockMimic.addHitEffect(TE, target, xOffset, yOffset, zOffset, null, effectRenderer); - - return true; - - } - - return super.addHitEffects(world, target, effectRenderer); - } - - @Override - public AxisAlignedBB getCollisionBoundingBox(World world, BlockPos blockPos, IBlockState blockState) - { - TEMimicBlock tile = (TEMimicBlock)world.getTileEntity(blockPos); - Block block = tile.getBlock(); - - return block != null ? block.getCollisionBoundingBox(world, blockPos, blockState) : super.getCollisionBoundingBox(world, blockPos, blockState); - } - - @Override - @SideOnly(Side.CLIENT) - public int colorMultiplier(IBlockAccess blockAccess, BlockPos blockPos, int renderPass) - { - TEMimicBlock TE = (TEMimicBlock)blockAccess.getTileEntity(blockPos); - if (TE != null) - { - Block block = TE.getBlock(); - if(block != null) - { - return block.colorMultiplier(blockAccess, blockPos); - } - } - - return super.colorMultiplier(blockAccess, blockPos); - } - -/* @Override - public void velocityToAddToEntity(World world, BlockPos, Entity entity, Vec3 vec) - { - TEMimicBlock TE = (TEMimicBlock)world.getTileEntity(x, y, z); - if (TE != null) - { - Block block = TE.getBlock(); - if(block != null) - { - block.velocityToAddToEntity(world, x, y, z, entity, vec); - } - } - } - No longer in 1.8 apparently - - public static void addHitEffect(TEMimicBlock TE, MovingObjectPosition target, double x, double y, double z, ItemStack itemStack, EffectRenderer effectRenderer) - { - EntityDiggingFX particle = new EntityDiggingFX(TE.getWorld(), x, y, z, 0.0D, 0.0D, 0.0D, TE.getBlock(), TE.getMetaOfMimic()); - effectRenderer.addEffect(particle.func_174846_a(target.func_178782_a()).multiplyVelocity(0.2F).multipleParticleScaleBy(0.6F)); - } -*/ - @Override - public void onEntityCollidedWithBlock(World world, BlockPos blockPos, Entity entity) - { - TEMimicBlock TE = (TEMimicBlock)world.getTileEntity(blockPos); - if (TE != null) - { - if(TE.getBlockEffectWhileInside(entity, blockPos)) - { - return; - }else - { - Block block = TE.getBlock(); - if(block != null) - { - block.onEntityCollidedWithBlock(world, blockPos, entity); - return; - } - } - } - - super.onEntityCollidedWithBlock(world, blockPos, entity); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockOrientable.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockOrientable.java deleted file mode 100644 index 0e919d8e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockOrientable.java +++ /dev/null @@ -1,90 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.common.tileEntity.TEOrientable; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; - -public class BlockOrientable extends BlockContainer -{ - public BlockOrientable() - { - super(Material.rock); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public TileEntity createNewTileEntity(World world, int dunno) - { - return new TEOrientable(); - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - //Right-click orients the output face. Shift-right-click orients the input face. - if (world.isRemote) - { - return false; - } - - TileEntity tile = world.getTileEntity(blockPos); - - if (tile instanceof TEOrientable) - { - TEOrientable newTile = (TEOrientable) tile; - if (player.isSneaking()) - { - int nextSide = TEOrientable.getIntForEnumFacing(newTile.getInputDirection()) + 1; - - if (nextSide > 5) - { - nextSide = 0; - } - if (EnumFacing.getFront(nextSide) == newTile.getOutputDirection()) - { - nextSide++; - if (nextSide > 5) - { - nextSide = 0; - } - } - - newTile.setInputDirection(EnumFacing.getFront(nextSide)); - } else - { - int nextSide = TEOrientable.getIntForEnumFacing(newTile.getOutputDirection()) + 1; - - if (nextSide > 5) - { - nextSide = 0; - } - if (EnumFacing.getFront(nextSide) == newTile.getInputDirection()) - { - nextSide++; - if (nextSide > 5) - { - nextSide = 0; - } - } - - newTile.setOutputDirection(EnumFacing.getFront(nextSide)); - } - } - - world.markBlockForUpdate(blockPos); - return true; - } - - @Override - public int damageDropped(IBlockState blockState) - { - return blockState.getBlock().damageDropped(blockState); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java deleted file mode 100644 index 0a7ce6f4..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java +++ /dev/null @@ -1,127 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import java.util.Random; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; - -public class BlockPedestal extends BlockContainer -{ - public BlockPedestal() - { - super(Material.rock); - setHardness(2.0F); - setResistance(5.0F); - float f = 0.3125F; - this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.6F, 0.5F + f); - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - TEPedestal tileEntity = (TEPedestal) world.getTileEntity(blockPos); - - if (tileEntity == null || player.isSneaking()) - { - return false; - } - - ItemStack playerItem = player.getCurrentEquippedItem(); - - if (tileEntity.getStackInSlot(0) == null && playerItem != null) - { - ItemStack newItem = playerItem.copy(); - newItem.stackSize = 1; - --playerItem.stackSize; - tileEntity.setInventorySlotContents(0, newItem); - } else if (tileEntity.getStackInSlot(0) != null && playerItem == null) - { - player.inventory.addItemStackToInventory(tileEntity.getStackInSlot(0)); - tileEntity.setInventorySlotContents(0, null); - tileEntity.setActive(); - } - world.markBlockForUpdate(blockPos); - return true; - } - - @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) - { - dropItems(world, blockPos); - super.breakBlock(world, blockPos, blockState); - } - - private void dropItems(World world, BlockPos blockPos) - { - Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(blockPos); - - if (!(tileEntity instanceof IInventory)) - { - return; - } - - IInventory inventory = (IInventory) tileEntity; - - for (int i = 0; i < inventory.getSizeInventory(); i++) - { - ItemStack item = inventory.getStackInSlot(i); - - if (item != null && item.stackSize > 0) - { - float rx = rand.nextFloat() * 0.8F + 0.1F; - float ry = rand.nextFloat() * 0.8F + 0.1F; - float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); - - if (item.hasTagCompound()) - { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); - } - - float factor = 0.05F; - entityItem.motionX = rand.nextGaussian() * factor; - entityItem.motionY = rand.nextGaussian() * factor + 0.2F; - entityItem.motionZ = rand.nextGaussian() * factor; - world.spawnEntityInWorld(entityItem); - item.stackSize = 0; - } - } - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TEPedestal(); - } - - @Override - public int getRenderType() - { - return -1; - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public boolean hasTileEntity(IBlockState blockState) - { - return true; - } - -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java deleted file mode 100644 index 6d4b79e7..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java +++ /dev/null @@ -1,127 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import java.util.Random; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; - -public class BlockPlinth extends BlockContainer -{ - public BlockPlinth() - { - super(Material.rock); - setHardness(2.0F); - setResistance(5.0F); - float f = 0.0625F; - this.setBlockBounds(f, 0.0F, f, 1.0f - f, 0.875f, 1.0f - f); - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - TEPlinth tileEntity = (TEPlinth) world.getTileEntity(blockPos); - - if (tileEntity == null || player.isSneaking()) - { - return false; - } - - ItemStack playerItem = player.getCurrentEquippedItem(); - - if (tileEntity.getStackInSlot(0) == null && playerItem != null) - { - ItemStack newItem = playerItem.copy(); - newItem.stackSize = 1; - --playerItem.stackSize; - tileEntity.setInventorySlotContents(0, newItem); - } else if (tileEntity.getStackInSlot(0) != null && playerItem == null) - { - player.inventory.addItemStackToInventory(tileEntity.getStackInSlot(0)); - tileEntity.setInventorySlotContents(0, null); - tileEntity.setActive(); - } - world.markBlockForUpdate(blockPos); - return true; - } - - @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) - { - dropItems(world, blockPos); - super.breakBlock(world, blockPos, blockState); - } - - private void dropItems(World world, BlockPos blockPos) - { - Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(blockPos); - - if (!(tileEntity instanceof IInventory)) - { - return; - } - - IInventory inventory = (IInventory) tileEntity; - - for (int i = 0; i < inventory.getSizeInventory(); i++) - { - ItemStack item = inventory.getStackInSlot(i); - - if (item != null && item.stackSize > 0) - { - float rx = rand.nextFloat() * 0.8F + 0.1F; - float ry = rand.nextFloat() * 0.8F + 0.1F; - float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); - - if (item.hasTagCompound()) - { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); - } - - float factor = 0.05F; - entityItem.motionX = rand.nextGaussian() * factor; - entityItem.motionY = rand.nextGaussian() * factor + 0.2F; - entityItem.motionZ = rand.nextGaussian() * factor; - world.spawnEntityInWorld(entityItem); - item.stackSize = 0; - } - } - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TEPlinth(); - } - - @Override - public int getRenderType() - { - return -1; - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public boolean hasTileEntity(IBlockState blockState) - { - return true; - } - -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockReagentConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockReagentConduit.java deleted file mode 100644 index f6cb50a5..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockReagentConduit.java +++ /dev/null @@ -1,57 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; - -public class BlockReagentConduit extends BlockContainer -{ - public BlockReagentConduit() - { - super(Material.cloth); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TEReagentConduit(); - } - - @Override - public boolean canProvidePower() - { - return true; - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - return super.onBlockActivated(world, blockPos, state, player, side, hitX, hitY, hitZ); - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public int getRenderType() - { - return -1; - } - -// @Override -// public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) -// { -// return null; -// } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRitualStone.java deleted file mode 100644 index 6a5ed2db..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRitualStone.java +++ /dev/null @@ -1,69 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.api.rituals.IRitualStone; -import WayofTime.alchemicalWizardry.common.items.ScribeTool; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; - -public class BlockRitualStone extends Block implements IRitualStone -{ - public BlockRitualStone() - { - super(Material.iron); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public int damageDropped(IBlockState blockState) - { - return 0; - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - ItemStack playerItem = player.getCurrentEquippedItem(); - - if (playerItem == null) - { - return false; - } - - Item item = playerItem.getItem(); - - if (!(item instanceof ScribeTool)) - { - return false; - } - - if (playerItem.getMaxDamage() <= playerItem.getItemDamage() && !(playerItem.getMaxDamage() == 0)) - { - return false; - } - - ScribeTool scribeTool = (ScribeTool) item; - - if (!player.capabilities.isCreativeMode) - { - playerItem.setItemDamage(playerItem.getItemDamage() + 1); - } - - world.setBlockState(blockPos, state.getBlock().getStateFromMeta(scribeTool.getType()), 3); - world.markBlockForUpdate(blockPos); - return true; - } - - @Override - public boolean isRuneType(World world, BlockPos blockPos, IBlockState blockState, int runeType) - { - return blockState.getBlock().getMetaFromState(blockState) == runeType; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSacrifice.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSacrifice.java deleted file mode 100644 index a5786b30..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSacrifice.java +++ /dev/null @@ -1,17 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -public class BlockRuneOfSacrifice extends BlockBloodRune -{ - public BlockRuneOfSacrifice() - { - super(); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public int getRuneEffect(int metaData) - { - return 3; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSelfSacrifice.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSelfSacrifice.java deleted file mode 100644 index c7b729a0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSelfSacrifice.java +++ /dev/null @@ -1,17 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -public class BlockRuneOfSelfSacrifice extends BlockBloodRune -{ - public BlockRuneOfSelfSacrifice() - { - super(); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public int getRuneEffect(int metaData) - { - return 4; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java deleted file mode 100644 index 7d7ab440..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java +++ /dev/null @@ -1,42 +0,0 @@ -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.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; - -public class BlockSchematicSaver extends BlockContainer -{ - public BlockSchematicSaver() - { - super(Material.rock); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public TileEntity createNewTileEntity(World var1, int var2) - { - return new TESchematicSaver(); - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (world.isRemote) - { - return false; - } - - TESchematicSaver tileEntity = (TESchematicSaver) world.getTileEntity(blockPos); - - tileEntity.rightClickBlock(); - - return false; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectral.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectral.java deleted file mode 100644 index 4b34cddd..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectral.java +++ /dev/null @@ -1,115 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock; -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumWorldBlockLayer; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.Random; - -public class BlockSpectral extends BlockContainer -{ - public BlockSpectral() - { - super(Material.rock); - } - - @Override - public int getRenderType() - { - return 3; - } - - @Override - @SideOnly(Side.CLIENT) - public EnumWorldBlockLayer getBlockLayer() - { - return EnumWorldBlockLayer.TRANSLUCENT; - } - - @Override - public boolean isFullCube() - { - return false; - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public int quantityDropped(Random par1Random) - { - return 0; - } - - @Override - @SideOnly(Side.CLIENT) - public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, BlockPos blockPos, EnumFacing side) - { - Block block = p_149646_1_.getBlockState(blockPos).getBlock(); - - if (p_149646_1_.getBlockState(blockPos) != p_149646_1_.getBlockState(blockPos.add(-side.getFrontOffsetX(), -side.getFrontOffsetY(), -side.getFrontOffsetZ()))) - { - return true; - } - - if (block == this) - { - return false; - } - - return block != this && super.shouldSideBeRendered(p_149646_1_, blockPos, side); - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (player.isSneaking()) - { - return false; - } - - ItemStack playerItem = player.getCurrentEquippedItem(); - - if (playerItem != null) - { - if (playerItem.getItem() instanceof ItemBlock) - { - world.addBlockEvent(blockPos, ((ItemBlock) playerItem.getItem()).getBlock(), playerItem.getItemDamage(), 3); - - if (!player.capabilities.isCreativeMode) - { - playerItem.stackSize--; - } - - return true; - } else - { - return false; - } - } - - return true; - } - - @Override - public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) - { - return new TESpectralBlock(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectralContainer.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectralContainer.java deleted file mode 100644 index 9b024b1b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectralContainer.java +++ /dev/null @@ -1,57 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import java.util.List; -import java.util.Random; - -public class BlockSpectralContainer extends BlockContainer -{ - public BlockSpectralContainer() - { - super(Material.cloth); - this.setBlockBounds(0, 0, 0, 0, 0, 0); - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, List list, Entity collidingEntity) {} - - @Override - public int quantityDropped(Random par1Random) - { - return 0; - } - - @Override - public boolean isReplaceable(World world, BlockPos blockPos) - { - return true; - } - - @Override - public boolean isAir(IBlockAccess world, BlockPos blockPos) - { - return true; - } - - @Override - public TileEntity createNewTileEntity(World var1, int var2) - { - return new TESpectralContainer(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpeedRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpeedRune.java deleted file mode 100644 index 4db82016..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpeedRune.java +++ /dev/null @@ -1,17 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -public class BlockSpeedRune extends BlockBloodRune -{ - public BlockSpeedRune() - { - super(); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public int getRuneEffect(int metaData) - { - return 1; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEffect.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEffect.java deleted file mode 100644 index c7f31294..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEffect.java +++ /dev/null @@ -1,55 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock; -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 net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.List; - -public class BlockSpellEffect extends BlockOrientable -{ - public BlockSpellEffect() - { - super(); - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TESpellEffectBlock(); - } - - @Override - public int getRenderType() - { - return -1; - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) - { - if (this.equals(ModBlocks.blockSpellEffect)) - { - for (int i = 0; i < 4; i++) - { - par3List.add(new ItemStack(par1, 1, i)); - } - } else - { - super.getSubBlocks(par1, par2CreativeTabs, par3List); - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEnhancement.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEnhancement.java deleted file mode 100644 index 1a0f3ddf..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEnhancement.java +++ /dev/null @@ -1,55 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; -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 net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.List; - -public class BlockSpellEnhancement extends BlockOrientable -{ - public BlockSpellEnhancement() - { - super(); - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TESpellEnhancementBlock(); - } - - @Override - public int getRenderType() - { - return -1; - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) - { - if (this.equals(ModBlocks.blockSpellEnhancement)) - { - for (int i = 0; i < 15; i++) - { - par3List.add(new ItemStack(par1, 1, i)); - } - } else - { - super.getSubBlocks(par1, par2CreativeTabs, par3List); - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellModifier.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellModifier.java deleted file mode 100644 index 241f9fd8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellModifier.java +++ /dev/null @@ -1,55 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; -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 net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.List; - -public class BlockSpellModifier extends BlockOrientable -{ - public BlockSpellModifier() - { - super(); - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TESpellModifierBlock(); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) - { - if (this.equals(ModBlocks.blockSpellModifier)) - { - for (int i = 0; i < 4; i++) - { - par3List.add(new ItemStack(par1, 1, i)); - } - } else - { - super.getSubBlocks(par1, par2CreativeTabs, par3List); - } - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public int getRenderType() - { - return -1; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java deleted file mode 100644 index 6c8d15b9..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java +++ /dev/null @@ -1,87 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.common.items.ItemComplexSpellCrystal; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; -import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.List; - -public class BlockSpellParadigm extends BlockOrientable -{ - public BlockSpellParadigm() - { - super(); - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TESpellParadigmBlock(); - } - - @Override - @SideOnly(Side.CLIENT) - /** - * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) - */ - public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) - { - if (this.equals(ModBlocks.blockSpellParadigm)) - { - par3List.add(new ItemStack(par1, 1, 0)); - par3List.add(new ItemStack(par1, 1, 1)); - par3List.add(new ItemStack(par1, 1, 2)); - par3List.add(new ItemStack(par1, 1, 3)); - } else - { - super.getSubBlocks(par1, par2CreativeTabs, par3List); - } - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - ItemStack stack = player.getCurrentEquippedItem(); - - if (stack != null && stack.getItem() instanceof ItemComplexSpellCrystal) - { - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound itemTag = stack.getTagCompound(); - itemTag.setInteger("xCoord", blockPos.getX()); - itemTag.setInteger("yCoord", blockPos.getY()); - itemTag.setInteger("zCoord", blockPos.getZ()); - itemTag.setInteger("dimensionId", world.provider.getDimensionId()); - return true; - } - - return super.onBlockActivated(world, blockPos, state, player, side, hitX, hitY, hitZ); - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public int getRenderType() - { - return -1; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java deleted file mode 100644 index 295647dd..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java +++ /dev/null @@ -1,69 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.common.items.BlankSpell; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellTable; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; - -public class BlockSpellTable extends BlockContainer -{ - public BlockSpellTable() - { - super(Material.rock); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public int getRenderType() - { - return 3; - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - TESpellTable tileEntity = (TESpellTable) world.getTileEntity(blockPos); - - if (tileEntity == null || player.isSneaking()) - { - return false; - } - - ItemStack playerItem = player.getCurrentEquippedItem(); - - if (playerItem != null) - { - if (playerItem.getItem() instanceof BlankSpell) - { - if (playerItem.getTagCompound() == null) - { - playerItem.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound itemTag = playerItem.getTagCompound(); - itemTag.setInteger("xCoord", blockPos.getX()); - itemTag.setInteger("yCoord", blockPos.getY()); - itemTag.setInteger("zCoord", blockPos.getZ()); - itemTag.setInteger("dimensionId", world.provider.getDimensionId()); - return true; - } - } - - return false; - } - - @Override - public TileEntity createNewTileEntity(World world, int metaMaybe) - { - return new TESpellTable(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java deleted file mode 100644 index 55be5fde..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.common.omega.IStabilityGlyph; - -public class BlockStabilityGlyph extends Block implements IStabilityGlyph -{ - public BlockStabilityGlyph() - { - super(Material.iron); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public int getAdditionalStabilityForFaceCount(World world, BlockPos pos, int meta, int faceCount) - { - switch(meta) - { - case 0: - return faceCount * 2; - default: - return faceCount; - } - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) - { - for(int i=0; i<1; i++) - { - par3List.add(new ItemStack(par1, 1, i)); - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java deleted file mode 100644 index 4214646f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java +++ /dev/null @@ -1,259 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.BlockMobSpawner; -import net.minecraft.block.BlockPortal; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -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.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -//import net.minecraftforge.fml.common.Optional; -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; - -public class BlockTeleposer extends BlockContainer -{ - public BlockTeleposer() - { - super(Material.rock); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public int getRenderType() - { - return 3; - } - - @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - ItemStack playerItem = player.getCurrentEquippedItem(); - - if (playerItem != null) - { - if (playerItem.getItem() instanceof TelepositionFocus) - { - SoulNetworkHandler.checkAndSetItemPlayer(playerItem, player); - - if (playerItem.getTagCompound() == null) - { - playerItem.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound itemTag = playerItem.getTagCompound(); - itemTag.setInteger("xCoord", pos.getX()); - itemTag.setInteger("yCoord", pos.getY()); - itemTag.setInteger("zCoord", pos.getZ()); - itemTag.setInteger("dimensionId", world.provider.getDimensionId()); - return true; - } - } - player.openGui(AlchemicalWizardry.instance, 1, world, pos.getX(), pos.getY(), pos.getZ()); - return true; - } - - @Override - public void breakBlock(World world, BlockPos pos, IBlockState state) - { - dropItems(world, pos); - super.breakBlock(world, pos, state); - } - - private void dropItems(World world, BlockPos pos) - { - Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(pos); - - if (!(tileEntity instanceof IInventory)) - { - return; - } - - IInventory inventory = (IInventory) tileEntity; - - for (int i = 0; i < inventory.getSizeInventory(); i++) - { - ItemStack item = inventory.getStackInSlot(i); - - if (item != null && item.stackSize > 0) - { - float rx = rand.nextFloat() * 0.8F + 0.1F; - float ry = rand.nextFloat() * 0.8F + 0.1F; - float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, pos.getX() + rx, pos.getY() + ry, pos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); - - if (item.hasTagCompound()) - { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); - } - - float factor = 0.05F; - entityItem.motionX = rand.nextGaussian() * factor; - entityItem.motionY = rand.nextGaussian() * factor + 0.2F; - entityItem.motionZ = rand.nextGaussian() * factor; - world.spawnEntityInWorld(entityItem); - item.stackSize = 0; - } - } - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TETeleposer(); - } - - public static boolean swapBlocks(Object caller, World worldI, World worldF, BlockPos posi, BlockPos posf) - { - return swapBlocks(caller, worldI, worldF, posi, posf, true, 3); - } - - public static boolean swapBlocksWithoutSound(Object caller, World worldI, World worldF, BlockPos posi, BlockPos posf) - { - return swapBlocks(caller, worldI, worldF, posi, posf, false, 3); - } - - public static boolean swapBlocks(Object caller, World worldI, World worldF, BlockPos posi, BlockPos posf, boolean doSound, int flag) - { - TileEntity tileEntityI = worldI.getTileEntity(posi); - TileEntity tileEntityF = worldF.getTileEntity(posf); - - NBTTagCompound nbttag1 = new NBTTagCompound(); - NBTTagCompound nbttag2 = new NBTTagCompound(); - - if (tileEntityI != null) - { - tileEntityI.writeToNBT(nbttag1); - } - - if (tileEntityF != null) - { - tileEntityF.writeToNBT(nbttag2); - } - - IBlockState stateI = worldI.getBlockState(posi); - Block blockI = stateI.getBlock(); - IBlockState stateF = worldF.getBlockState(posf); - Block blockF = stateF.getBlock(); - - - if (blockI.equals(Blocks.air) && blockF.equals(Blocks.air)) - { - return false; - } - - if (blockI instanceof BlockMobSpawner || blockF instanceof BlockMobSpawner || caller instanceof TEDemonPortal ? false : blockI instanceof BlockPortal || blockF instanceof BlockPortal) - { - return false; - } - - TeleposeEvent evt = new TeleposeEvent(worldI, posi, stateI, worldF, posf, stateF); - if (MinecraftForge.EVENT_BUS.post(evt)) - return false; - - if(doSound) - { - worldI.playSoundEffect(posi.getX(), posi.getY(), posi.getZ(), "mob.endermen.portal", 1.0F, 1.0F); - worldF.playSoundEffect(posf.getX(), posf.getY(), posf.getZ(), "mob.endermen.portal", 1.0F, 1.0F); - } - - //CLEAR TILES - Block finalBlock = blockF; - - if (finalBlock != null) - { - TileEntity tileToSet = finalBlock.createTileEntity(worldF, stateF); - - worldF.setTileEntity(posf, tileToSet); - } - - if (blockI != null) - { - TileEntity tileToSet = blockI.createTileEntity(worldI, stateI); - - worldI.setTileEntity(posi, tileToSet); - } - - //TILES CLEARED - worldF.setBlockState(posf, stateI, flag); - - if (tileEntityI != null) - { - TileEntity newTileEntityI = TileEntity.createAndLoadEntity(nbttag1); - -// if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityI)) - { -// newTileEntityI = createMultipartFromNBT(worldF, nbttag1); - } - - worldF.setTileEntity(posf, newTileEntityI); - - newTileEntityI.setPos(posf); -// if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityI)) - { -// sendDescriptorOfTile(worldF, newTileEntityI); - } - } - - worldI.setBlockState(posi, stateF, flag); - - if (tileEntityF != null) - { - TileEntity newTileEntityF = TileEntity.createAndLoadEntity(nbttag2); -// if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityF)) - { -// newTileEntityF = createMultipartFromNBT(worldI, nbttag2); - } - - worldI.setTileEntity(posi, newTileEntityF); - - newTileEntityF.setPos(posi); - -// if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityF)) - { -// sendDescriptorOfTile(worldI, newTileEntityF); - } - } - - return true; - } - -/* @Optional.Method(modid = "ForgeMultipart") - public static boolean isMultipart(TileEntity tile) - { - return tile instanceof TileMultipart; - } - - @Optional.Method(modid = "ForgeMultipart") - public static TileEntity createMultipartFromNBT(World world, NBTTagCompound tag) - { - return MultipartHelper.createTileFromNBT(world, tag); - } - - @Optional.Method(modid = "ForgeMultipart") - public static void sendDescriptorOfTile(World world, TileEntity tile) - { - MultipartHelper.sendDescPacket(world, tile); - } - */ -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/IOrientable.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/IOrientable.java deleted file mode 100644 index f270aa72..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/IOrientable.java +++ /dev/null @@ -1,14 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import net.minecraft.util.EnumFacing; - -public interface IOrientable -{ - EnumFacing getInputDirection(); - - EnumFacing getOutputDirection(); - - void setInputDirection(EnumFacing direction); - - void setOutputDirection(EnumFacing direction); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarComponent.java b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarComponent.java deleted file mode 100644 index 06e1a3e6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarComponent.java +++ /dev/null @@ -1,66 +0,0 @@ -package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; - -public class AltarComponent -{ - private int x; - private int y; - private int z; - private Block block; - private int metadata; - private boolean isBloodRune; - private boolean isUpgradeSlot; - - public AltarComponent(int x, int y, int z, Block block, int metadata, boolean isBloodRune, boolean isUpgradeSlot) - { - this.x = x; - this.y = y; - this.z = z; - this.block = block; - this.metadata = metadata; - this.isBloodRune = isBloodRune; - this.isUpgradeSlot = isUpgradeSlot; - } - - public int getX() - { - return x; - } - - public int getY() - { - return y; - } - - public int getZ() - { - return z; - } - - public Block getBlock() - { - return block; - } - - public int getMetadata() - { - return metadata; - } - - public IBlockState getBlockState() - { - return block.getStateFromMeta(getMetadata()); - } - - public boolean isBloodRune() - { - return isBloodRune; - } - - public boolean isUpgradeSlot() - { - return isUpgradeSlot; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarUpgradeComponent.java b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarUpgradeComponent.java deleted file mode 100644 index 9bf8496f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarUpgradeComponent.java +++ /dev/null @@ -1,117 +0,0 @@ -package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade; - -public class AltarUpgradeComponent -{ - private int speedUpgrades; - private int efficiencyUpgrades; - private int sacrificeUpgrades; - private int selfSacrificeUpgrades; - private int displacementUpgrades; - private int altarCapacitiveUpgrades; - private int orbCapacitiveUpgrades; - private int betterCapacitiveUpgrades; - private int accelerationUpgrades; - - public AltarUpgradeComponent() - { - speedUpgrades = 0; - efficiencyUpgrades = 0; - sacrificeUpgrades = 0; - selfSacrificeUpgrades = 0; - displacementUpgrades = 0; - altarCapacitiveUpgrades = 0; - orbCapacitiveUpgrades = 0; - betterCapacitiveUpgrades = 0; - accelerationUpgrades = 0; - } - - public void addSpeedUpgrade() - { - speedUpgrades++; - } - - public void addEfficiencyUpgrade() - { - efficiencyUpgrades++; - } - - public void addSacrificeUpgrade() - { - sacrificeUpgrades++; - } - - public void addSelfSacrificeUpgrade() - { - selfSacrificeUpgrades++; - } - - public void addDisplacementUpgrade() - { - displacementUpgrades++; - } - - public void addaltarCapacitiveUpgrade() - { - altarCapacitiveUpgrades++; - } - - public void addorbCapacitiveUpgrade() - { - orbCapacitiveUpgrades++; - } - - public void addBetterCapacitiveUpgrade() - { - betterCapacitiveUpgrades++; - } - - public void addAccelerationUpgrade() - { - accelerationUpgrades++; - } - - public int getSpeedUpgrades() - { - return speedUpgrades; - } - - public int getEfficiencyUpgrades() - { - return efficiencyUpgrades; - } - - public int getSacrificeUpgrades() - { - return sacrificeUpgrades; - } - - public int getSelfSacrificeUpgrades() - { - return selfSacrificeUpgrades; - } - - public int getDisplacementUpgrades() - { - return displacementUpgrades; - } - - public int getAltarCapacitiveUpgrades() - { - return this.altarCapacitiveUpgrades; - } - - public int getOrbCapacitiveUpgrades() - { - return this.orbCapacitiveUpgrades; - } - - public int getBetterCapacitiveUpgrades() - { - return this.betterCapacitiveUpgrades; - } - - public int getAccelerationUpgrades() - { - return this.accelerationUpgrades; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java deleted file mode 100644 index 013b550b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java +++ /dev/null @@ -1,261 +0,0 @@ -package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.IFadedRune; -import WayofTime.alchemicalWizardry.common.block.BlockBloodRune; - -public class UpgradedAltars -{ - public static List secondTierAltar = new ArrayList(); - public static List thirdTierAltar = new ArrayList(); - public static List fourthTierAltar = new ArrayList(); - public static List fifthTierAltar = new ArrayList(); - public static List sixthTierAltar = new ArrayList(); - public static int highestAltar = 6; - - public static int isAltarValid(World world, BlockPos pos) - { - for (int i = highestAltar; i >= 2; i--) - { - if (checkAltarIsValid(world, pos, i)) - { - return i; - } - } - - return 1; - } - - public static boolean checkAltarIsValid(World world, BlockPos pos, int altarTier) - { - List list = UpgradedAltars.getAltarUpgradeListForTier(altarTier); - - for (AltarComponent ac : list) - { - BlockPos newPos = pos.add(ac.getX(), ac.getY(), ac.getZ()); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - - if (ac.isBloodRune()) - { - if (!(block instanceof BlockBloodRune)) - { - return false; - } - } else - { - int metadata = block.getMetaFromState(state); - - if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(newPos))) - { - return false; - } - } - } - - return true; - } - - public static AltarUpgradeComponent getUpgrades(World world, BlockPos pos, int altarTier) - { - if(world.isRemote) - { - return null; - } - AltarUpgradeComponent upgrades = new AltarUpgradeComponent(); - List list = UpgradedAltars.getAltarUpgradeListForTier(altarTier); - - for (AltarComponent ac : list) - { - BlockPos newPos = pos.add(ac.getX(), ac.getY(), ac.getZ()); - - if (ac.isUpgradeSlot()) - { - //Currently checks the getRuneEffect. - //TODO Change so that it uses the metadata instead, with the BlockID. - IBlockState state = world.getBlockState(newPos); - Block testBlock = state.getBlock(); - int meta = testBlock.getMetaFromState(state); - - if (testBlock instanceof BlockBloodRune) - { - if (testBlock instanceof IFadedRune && altarTier > ((IFadedRune)testBlock).getAltarTierLimit(meta)) - { - return UpgradedAltars.getUpgrades(world, pos, ((IFadedRune)testBlock).getAltarTierLimit(meta)); - } - - switch (((BlockBloodRune) testBlock).getRuneEffect(meta)) - { - case 1: - upgrades.addSpeedUpgrade(); - break; - - case 2: - upgrades.addEfficiencyUpgrade(); - break; - - case 3: - upgrades.addSacrificeUpgrade(); - break; - - case 4: - upgrades.addSelfSacrificeUpgrade(); - break; - - case 5: - upgrades.addaltarCapacitiveUpgrade(); - break; - - case 6: - upgrades.addDisplacementUpgrade(); - break; - - case 7: - upgrades.addorbCapacitiveUpgrade(); - break; - - case 8: - upgrades.addBetterCapacitiveUpgrade(); - break; - - case 9: - upgrades.addAccelerationUpgrade(); - break; - } - } - } - } - - return upgrades; - } - - public static void loadAltars() - { - secondTierAltar.add(new AltarComponent(-1, -1, -1, ModBlocks.bloodRune, 0, true, false)); - secondTierAltar.add(new AltarComponent(0, -1, -1, ModBlocks.bloodRune, 0, true, true)); - secondTierAltar.add(new AltarComponent(1, -1, -1, ModBlocks.bloodRune, 0, true, false)); - secondTierAltar.add(new AltarComponent(-1, -1, 0, ModBlocks.bloodRune, 0, true, true)); - secondTierAltar.add(new AltarComponent(1, -1, 0, ModBlocks.bloodRune, 0, true, true)); - secondTierAltar.add(new AltarComponent(-1, -1, 1, ModBlocks.bloodRune, 0, true, false)); - secondTierAltar.add(new AltarComponent(0, -1, 1, ModBlocks.bloodRune, 0, true, true)); - secondTierAltar.add(new AltarComponent(1, -1, 1, ModBlocks.bloodRune, 0, true, false)); - thirdTierAltar.add(new AltarComponent(-1, -1, -1, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(0, -1, -1, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(1, -1, -1, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(-1, -1, 0, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(1, -1, 0, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(-1, -1, 1, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(0, -1, 1, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(1, -1, 1, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(-3, -1, -3, Blocks.stonebrick, 0, false, false)); - thirdTierAltar.add(new AltarComponent(-3, 0, -3, Blocks.stonebrick, 0, false, false)); - thirdTierAltar.add(new AltarComponent(3, -1, -3, Blocks.stonebrick, 0, false, false)); - thirdTierAltar.add(new AltarComponent(3, 0, -3, Blocks.stonebrick, 0, false, false)); - thirdTierAltar.add(new AltarComponent(-3, -1, 3, Blocks.stonebrick, 0, false, false)); - thirdTierAltar.add(new AltarComponent(-3, 0, 3, Blocks.stonebrick, 0, false, false)); - thirdTierAltar.add(new AltarComponent(3, -1, 3, Blocks.stonebrick, 0, false, false)); - thirdTierAltar.add(new AltarComponent(3, 0, 3, Blocks.stonebrick, 0, false, false)); - thirdTierAltar.add(new AltarComponent(-3, 1, -3, Blocks.glowstone, 0, false, false)); - thirdTierAltar.add(new AltarComponent(3, 1, -3, Blocks.glowstone, 0, false, false)); - thirdTierAltar.add(new AltarComponent(-3, 1, 3, Blocks.glowstone, 0, false, false)); - thirdTierAltar.add(new AltarComponent(3, 1, 3, Blocks.glowstone, 0, false, false)); - - for (int i = -2; i <= 2; i++) - { - thirdTierAltar.add(new AltarComponent(3, -2, i, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(-3, -2, i, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(i, -2, 3, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(i, -2, -3, ModBlocks.bloodRune, 0, true, true)); - } - - fourthTierAltar.addAll(thirdTierAltar); - - for (int i = -3; i <= 3; i++) - { - fourthTierAltar.add(new AltarComponent(5, -3, i, ModBlocks.bloodRune, 0, true, true)); - fourthTierAltar.add(new AltarComponent(-5, -3, i, ModBlocks.bloodRune, 0, true, true)); - fourthTierAltar.add(new AltarComponent(i, -3, 5, ModBlocks.bloodRune, 0, true, true)); - fourthTierAltar.add(new AltarComponent(i, -3, -5, ModBlocks.bloodRune, 0, true, true)); - } - - for (int i = -2; i <= 1; i++) - { - fourthTierAltar.add(new AltarComponent(5, i, 5, Blocks.stonebrick, 0, false, false)); - fourthTierAltar.add(new AltarComponent(5, i, -5, Blocks.stonebrick, 0, false, false)); - fourthTierAltar.add(new AltarComponent(-5, i, -5, Blocks.stonebrick, 0, false, false)); - fourthTierAltar.add(new AltarComponent(-5, i, 5, Blocks.stonebrick, 0, false, false)); - } - - fourthTierAltar.add(new AltarComponent(5, 2, 5, ModBlocks.largeBloodStoneBrick, 0, false, false)); - fourthTierAltar.add(new AltarComponent(5, 2, -5, ModBlocks.largeBloodStoneBrick, 0, false, false)); - fourthTierAltar.add(new AltarComponent(-5, 2, -5, ModBlocks.largeBloodStoneBrick, 0, false, false)); - fourthTierAltar.add(new AltarComponent(-5, 2, 5, ModBlocks.largeBloodStoneBrick, 0, false, false)); - fifthTierAltar.addAll(fourthTierAltar); - fifthTierAltar.add(new AltarComponent(-8, -3, 8, Blocks.beacon, 0, false, false)); - fifthTierAltar.add(new AltarComponent(-8, -3, -8, Blocks.beacon, 0, false, false)); - fifthTierAltar.add(new AltarComponent(8, -3, -8, Blocks.beacon, 0, false, false)); - fifthTierAltar.add(new AltarComponent(8, -3, 8, Blocks.beacon, 0, false, false)); - - for (int i = -6; i <= 6; i++) - { - fifthTierAltar.add(new AltarComponent(8, -4, i, ModBlocks.bloodRune, 0, true, true)); - fifthTierAltar.add(new AltarComponent(-8, -4, i, ModBlocks.bloodRune, 0, true, true)); - fifthTierAltar.add(new AltarComponent(i, -4, 8, ModBlocks.bloodRune, 0, true, true)); - fifthTierAltar.add(new AltarComponent(i, -4, -8, ModBlocks.bloodRune, 0, true, true)); - } - - sixthTierAltar.addAll(fifthTierAltar); - - for(int i = -4; i <= 2; i++) - { - sixthTierAltar.add(new AltarComponent(11, i, 11, Blocks.stonebrick, 0, false, false)); - sixthTierAltar.add(new AltarComponent(-11, i, -11, Blocks.stonebrick, 0, false, false)); - sixthTierAltar.add(new AltarComponent(11, i, -11, Blocks.stonebrick, 0, false, false)); - sixthTierAltar.add(new AltarComponent(-11, i, 11, Blocks.stonebrick, 0, false, false)); - } - - sixthTierAltar.add(new AltarComponent(11, 3, 11, ModBlocks.blockCrystal, 0, false, false)); - sixthTierAltar.add(new AltarComponent(-11, 3, -11, ModBlocks.blockCrystal, 0, false, false)); - sixthTierAltar.add(new AltarComponent(11, 3, -11, ModBlocks.blockCrystal, 0, false, false)); - sixthTierAltar.add(new AltarComponent(-11, 3, 11, ModBlocks.blockCrystal, 0, false, false)); - - for (int i = -9; i <= 9; i++) - { - sixthTierAltar.add(new AltarComponent(11, -5, i, ModBlocks.bloodRune, 0, true, true)); - sixthTierAltar.add(new AltarComponent(-11, -5, i, ModBlocks.bloodRune, 0, true, true)); - sixthTierAltar.add(new AltarComponent(i, -5, 11, ModBlocks.bloodRune, 0, true, true)); - sixthTierAltar.add(new AltarComponent(i, -5, -11, ModBlocks.bloodRune, 0, true, true)); - } - } - - public static List getAltarUpgradeListForTier(int tier) - { - switch (tier) - { - case 2: - return secondTierAltar; - - case 3: - return thirdTierAltar; - - case 4: - return fourthTierAltar; - - case 5: - return fifthTierAltar; - - case 6: - return sixthTierAltar; - } - - return null; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/book/BloodMagicGuide.java b/src/main/java/WayofTime/alchemicalWizardry/common/book/BloodMagicGuide.java deleted file mode 100644 index 071bfd5a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/book/BloodMagicGuide.java +++ /dev/null @@ -1,836 +0,0 @@ -//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; -//import WayofTime.alchemicalWizardry.api.guide.OrbRecipeRenderer; -//import WayofTime.alchemicalWizardry.api.guide.PageAltarRecipe; -//import WayofTime.alchemicalWizardry.common.guide.RecipeHolder; -//import amerifrance.guideapi.api.GuideRegistry; -//import amerifrance.guideapi.api.abstraction.CategoryAbstract; -//import amerifrance.guideapi.api.abstraction.EntryAbstract; -//import amerifrance.guideapi.api.abstraction.IPage; -//import amerifrance.guideapi.api.base.Book; -//import amerifrance.guideapi.api.util.BookBuilder; -//import amerifrance.guideapi.api.util.PageHelper; -//import amerifrance.guideapi.categories.CategoryItemStack; -//import amerifrance.guideapi.entries.EntryUniText; -//import amerifrance.guideapi.pages.PageIRecipe; -//import amerifrance.guideapi.pages.PageUnlocImage; -// -//public class BloodMagicGuide -//{ -// public static Book bloodMagicGuide; -// public static List categories = new ArrayList(); -// -// public static void registerGuide() -// { -// registerArchitectBook(); -// registerRitualBook(); -// registerDemonBook(); -// registerSpellBook(); -// registerAlchemyBook(); -// -// BookBuilder bmBookBuilder = new BookBuilder(); -// bmBookBuilder.setCategories(categories).setUnlocBookTitle("guide.BloodMagic.book.title").setUnlocWelcomeMessage("guide.BloodMagic.welcomeMessage").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", "guide.BloodMagic.book.name", new Color(190, 10, 0)); -// bloodMagicGuide = bmBookBuilder.build(); -// GuideRegistry.registerBook(bloodMagicGuide); -// } -// -// public static PageIRecipe getOrbPageForRecipe(IRecipe recipe) -// { -// return new PageIRecipe(recipe, new OrbRecipeRenderer(recipe)); -// } -// -// public static void registerArchitectBook() -// { -// List entries = new ArrayList(); -// -// ArrayList introPages = new ArrayList(); -// introPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.intro"))); -// entries.add(new EntryUniText(introPages, "guide.BloodMagic.entryName.architect.intro")); -// -// ArrayList bloodAltarPages = new ArrayList(); -// bloodAltarPages.add(new PageIRecipe(RecipeHolder.bloodAltarRecipe)); -// bloodAltarPages.add(new PageIRecipe(RecipeHolder.knifeRecipe)); -// bloodAltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodAltar.1"))); -// bloodAltarPages.add(new PageAltarRecipe(RecipeHolder.weakBloodOrbRecipe)); -// bloodAltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodAltar.2"))); -// entries.add(new EntryUniText(bloodAltarPages, "guide.BloodMagic.entryName.architect.bloodAltar")); -// -// ArrayList soulNetworkPages = new ArrayList(); -// soulNetworkPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulNetwork"))); -// entries.add(new EntryUniText(soulNetworkPages, "guide.BloodMagic.entryName.architect.soulNetwork")); -// -// ArrayList blankSlatePages = new ArrayList(); -// blankSlatePages.add(new PageAltarRecipe(RecipeHolder.blankSlateRecipe)); -// 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"))); -// entries.add(new EntryUniText(divinationSigilPages, "guide.BloodMagic.entryName.architect.divination")); -// -// ArrayList waterSigilPages = new ArrayList(); -// waterSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.waterSigil.1"))); -// waterSigilPages.add(getOrbPageForRecipe(RecipeHolder.waterSigilRecipe)); -// waterSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.waterSigil.2"))); -// entries.add(new EntryUniText(waterSigilPages, "guide.BloodMagic.entryName.architect.waterSigil")); -// -// ArrayList lavaCrystalPages = new ArrayList(); -// lavaCrystalPages.add(getOrbPageForRecipe(RecipeHolder.lavaCrystalRecipe)); -// lavaCrystalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.lavaCrystal"))); -// entries.add(new EntryUniText(lavaCrystalPages, "guide.BloodMagic.entryName.architect.lavaCrystal")); -// -// ArrayList hellHarvestPages = new ArrayList(); -// hellHarvestPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.hellHarvest"))); -// entries.add(new EntryUniText(hellHarvestPages, "guide.BloodMagic.entryName.architect.hellHarvest")); -// -// ArrayList lavaSigilPages = new ArrayList(); -// lavaSigilPages.add(new PageIRecipe(RecipeHolder.lavaSigilRecipe)); -// 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.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"))); -// entries.add(new EntryUniText(speedRunePages, "guide.BloodMagic.entryName.architect.speedRunes")); -// -// ArrayList apprenticeOrbPages = new ArrayList(); -// apprenticeOrbPages.add(new PageAltarRecipe(RecipeHolder.apprenticeBloodOrbRecipe)); -// apprenticeOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.apprenticeOrb"))); -// entries.add(new EntryUniText(apprenticeOrbPages, "guide.BloodMagic.entryName.architect.apprenticeOrb")); -// -// ArrayList voidSigilPages = new ArrayList(); -// voidSigilPages.add(getOrbPageForRecipe(RecipeHolder.voidSigilRecipe)); -// 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"))); -// 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"))); -// entries.add(new EntryUniText(sightSigilPages, "guide.BloodMagic.entryName.architect.sightSigil")); -// -// ArrayList advancedAltarPages = new ArrayList(); -// advancedAltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.advancedAltar"))); -// entries.add(new EntryUniText(advancedAltarPages, "guide.BloodMagic.entryName.architect.advancedAltar")); -// -// ArrayList fastMinerPages = new ArrayList(); -// fastMinerPages.add(getOrbPageForRecipe(RecipeHolder.fastMinerRecipe)); -// 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"))); -// 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"))); -// entries.add(new EntryUniText(greenGrovePages, "guide.BloodMagic.entryName.architect.greenGrove")); -// -// ArrayList daggerPages = new ArrayList(); -// daggerPages.add(new PageAltarRecipe(RecipeHolder.daggerRecipe)); -// daggerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.dagger"))); -// entries.add(new EntryUniText(daggerPages, "guide.BloodMagic.entryName.architect.dagger")); -// -// ArrayList sacrificePages = new ArrayList(); -// sacrificePages.add(getOrbPageForRecipe(RecipeHolder.selfSacrificeRuneRecipe)); -// sacrificePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sacrifice.1"))); -// sacrificePages.add(getOrbPageForRecipe(RecipeHolder.sacrificeRuneRecipe)); -// sacrificePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sacrifice.2"))); -// entries.add(new EntryUniText(sacrificePages, "guide.BloodMagic.entryName.architect.sacrifice")); -// -// ArrayList bloodPackPages = new ArrayList(); -// bloodPackPages.add(new PageIRecipe(RecipeHolder.bloodPackRecipe)); -// 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"))); -// 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.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier3"))); -// entries.add(new EntryUniText(tier3Pages, "guide.BloodMagic.entryName.architect.tier3")); -// -// ArrayList magicianOrbPages = new ArrayList(); -// magicianOrbPages.add(new PageAltarRecipe(RecipeHolder.magicianBloodOrbRecipe)); -// magicianOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.magicianOrb"))); -// entries.add(new EntryUniText(magicianOrbPages, "guide.BloodMagic.entryName.architect.magicianOrb")); -// -// ArrayList newRunePages = new ArrayList(); -// newRunePages.add(getOrbPageForRecipe(RecipeHolder.capacityRuneRecipe)); -// 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"))); -// 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"))); -// entries.add(new EntryUniText(magnetismPages, "guide.BloodMagic.entryName.architect.magnetism")); -// -// ArrayList phantomBridgePages = new ArrayList(); -// phantomBridgePages.add(getOrbPageForRecipe(RecipeHolder.phantomBridgeRecipe)); -// phantomBridgePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.phantomBridge"))); -// entries.add(new EntryUniText(phantomBridgePages, "guide.BloodMagic.entryName.architect.phantomBridge")); -// -// ArrayList holdingPages = new ArrayList(); -// holdingPages.add(getOrbPageForRecipe(RecipeHolder.holdingSigilRecipe)); -// holdingPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.holding"))); -// entries.add(new EntryUniText(holdingPages, "guide.BloodMagic.entryName.architect.holding")); -// -// ArrayList elementalAffinityPages = new ArrayList(); -// elementalAffinityPages.add(getOrbPageForRecipe(RecipeHolder.affinitySigilRecipe)); -// elementalAffinityPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.elementalAffinity"))); -// entries.add(new EntryUniText(elementalAffinityPages, "guide.BloodMagic.entryName.architect.elementalAffinity")); -// -// ArrayList ritualStonesPages = new ArrayList(); -// ritualStonesPages.add(getOrbPageForRecipe(RecipeHolder.ritualStoneRecipe)); -// ritualStonesPages.add(getOrbPageForRecipe(RecipeHolder.masterStoneRecipe)); -// ritualStonesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.ritualStones"))); -// entries.add(new EntryUniText(ritualStonesPages, "guide.BloodMagic.entryName.architect.ritualStones")); -// -// ArrayList bloodLampPages = new ArrayList(); -// bloodLampPages.add(getOrbPageForRecipe(RecipeHolder.bloodLampRecipe)); -// bloodLampPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodLamp"))); -// entries.add(new EntryUniText(bloodLampPages, "guide.BloodMagic.entryName.architect.bloodLamp")); -// -// ArrayList boundArmourPages = new ArrayList(); -// boundArmourPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.boundArmour.1"))); -// boundArmourPages.add(new PageIRecipe(RecipeHolder.emptySocketRecipe)); -// boundArmourPages.add(new PageAltarRecipe(RecipeHolder.filledSocketRecipe)); -// boundArmourPages.add(getOrbPageForRecipe(RecipeHolder.soulForgeRecipe)); -// boundArmourPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.boundArmour.2"))); -// entries.add(new EntryUniText(boundArmourPages, "guide.BloodMagic.entryName.architect.boundArmour")); -// -// if(AlchemicalWizardry.isThaumcraftLoaded) -// { -// ArrayList sanguineArmourPages = new ArrayList(); -// sanguineArmourPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sanguineArmour"), new ItemStack(ModItems.sanguineRobe))); -// entries.add(new EntryUniText(sanguineArmourPages, "guide.BloodMagic.entryName.architect.sanguineArmour")); -// } -// -// ArrayList soulSuppressPages = new ArrayList(); -// soulSuppressPages.add(new PageIRecipe(RecipeHolder.inhibitorRecipe)); -// soulSuppressPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulSuppress"))); -// entries.add(new EntryUniText(soulSuppressPages, "guide.BloodMagic.entryName.architect.soulSuppress")); -// -// ArrayList ritualDivinerPages = new ArrayList(); -// ritualDivinerPages.add(new PageIRecipe(RecipeHolder.ritualDiviner1Recipe)); -// ritualDivinerPages.add(new PageIRecipe(RecipeHolder.ritualDiviner2Recipe)); -// ritualDivinerPages.add(new PageIRecipe(RecipeHolder.ritualDiviner3Recipe)); -// ritualDivinerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.ritualDiviner"))); -// 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))); -// 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.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"))); -// 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"))); -// entries.add(new EntryUniText(whirlwindPages, "guide.BloodMagic.entryName.architect.whirlwind")); -// -// ArrayList compressionPages = new ArrayList(); -// compressionPages.add(getOrbPageForRecipe(RecipeHolder.compressionSigilRecipe)); -// compressionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.compression"))); -// entries.add(new EntryUniText(compressionPages, "guide.BloodMagic.entryName.architect.compression")); -// -// ArrayList severancePages = new ArrayList(); -// severancePages.add(getOrbPageForRecipe(RecipeHolder.enderSeveranceSigilRecipe)); -// 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"))); -// entries.add(new EntryUniText(teleposerPages, "guide.BloodMagic.entryName.architect.teleposer")); -// -// ArrayList suppressionPages = new ArrayList(); -// suppressionPages.add(getOrbPageForRecipe(RecipeHolder.suppressionSigilRecipe)); -// suppressionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.suppression"))); -// entries.add(new EntryUniText(suppressionPages, "guide.BloodMagic.entryName.architect.suppression")); -// -// ArrayList superiorCapacityPages = new ArrayList(); -// superiorCapacityPages.add(getOrbPageForRecipe(RecipeHolder.superiorCapacityRecipe)); -// superiorCapacityPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.superiorCapacity"))); -// entries.add(new EntryUniText(superiorCapacityPages, "guide.BloodMagic.entryName.architect.superiorCapacity")); -// -// ArrayList orbRunePages = new ArrayList(); -// orbRunePages.add(getOrbPageForRecipe(RecipeHolder.orbRuneRecipe)); -// 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"))); -// 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"))); -// 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"))); -// entries.add(new EntryUniText(tier5AltarPages, "guide.BloodMagic.entryName.architect.tier5Altar")); -// -// ArrayList priceOfPowerPages = new ArrayList(); -// priceOfPowerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.priceOfPower"))); -// entries.add(new EntryUniText(priceOfPowerPages, "guide.BloodMagic.entryName.architect.priceOfPower")); -// -// ArrayList demonicOrbPages = new ArrayList(); -// demonicOrbPages.add(new PageAltarRecipe(RecipeHolder.archmageBloodOrbRecipe)); -// demonicOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.demonicOrb"))); -// entries.add(new EntryUniText(demonicOrbPages, "guide.BloodMagic.entryName.architect.demonicOrb")); -// -// ArrayList energyBazookaPages = new ArrayList(); -// demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.energyBazookaRecipe)); -// energyBazookaPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.energyBazooka"))); -// entries.add(new EntryUniText(energyBazookaPages, "guide.BloodMagic.entryName.architect.energyBazooka")); -// -// ArrayList accelerationRunePages = new ArrayList(); -// demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.accelerationRuneRecipe)); -// accelerationRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.accelerationRune"))); -// entries.add(new EntryUniText(accelerationRunePages, "guide.BloodMagic.entryName.architect.accelerationRune")); -// -// ArrayList harvestPages = new ArrayList(); -// demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.harvestSigilRecipe)); -// harvestPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.harvest"))); -// entries.add(new EntryUniText(harvestPages, "guide.BloodMagic.entryName.architect.harvest")); -// -// ArrayList demonProblemPages = new ArrayList(); -// demonProblemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.demonProblem"))); -// 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 PageIRecipe(RecipeHolder.crystalCluserRecipe)); -// tier6AltarPages.add(new PageAltarRecipe(RecipeHolder.transcendentBloodOrbRecipe)); -// entries.add(new EntryUniText(tier6AltarPages, "guide.BloodMagic.entryName.architect.tier6Altar")); -// -// ArrayList moreThanHumanPages = new ArrayList(); -// moreThanHumanPages.addAll(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))); -// } -// -// 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 introPages = new ArrayList(); -// introPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.intro"))); -// entries.add(new EntryUniText(introPages, "guide.BloodMagic.entryName.rituals.intro")); -// -// ArrayList weakRitualPages = new ArrayList(); -// weakRitualPages.add(getOrbPageForRecipe(RecipeHolder.weakRitualStoneRecipe)); -// weakRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.weakRitual"))); -// entries.add(new EntryUniText(weakRitualPages, "guide.BloodMagic.entryName.rituals.weakRitual")); -// -// ArrayList ritualsPages = new ArrayList(); -// ritualsPages.add(getOrbPageForRecipe(RecipeHolder.ritualStoneRecipe)); -// ritualsPages.add(getOrbPageForRecipe(RecipeHolder.masterStoneRecipe)); -// ritualsPages.add(new PageAltarRecipe(RecipeHolder.waterScribeTool)); -// ritualsPages.add(new PageAltarRecipe(RecipeHolder.fireScribeTool)); -// ritualsPages.add(new PageAltarRecipe(RecipeHolder.earthScribeTool)); -// ritualsPages.add(new PageAltarRecipe(RecipeHolder.airScribeTool)); -// ritualsPages.add(new PageIRecipe(RecipeHolder.ritualDiviner1Recipe)); -// ritualsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.rituals"))); -// ritualsPages.add(new PageAltarRecipe(RecipeHolder.weakActivationRecipe)); -// 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"))); -// 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"))); -// 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"))); -// 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.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.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.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"))); -// 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.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"))); -// entries.add(new EntryUniText(jumpRitualPages, "guide.BloodMagic.entryName.rituals.jumpRitual")); -// -// ArrayList duskInkPages = new ArrayList(); -// duskInkPages.add(new PageAltarRecipe(RecipeHolder.duskRecipe)); -// duskInkPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.duskInk"))); -// 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.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.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"))); -// 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.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"))); -// 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")); -// -// ArrayList regenerationRitualPages = new ArrayList(); -// 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")); -// -// ArrayList harvestFestivalPages = new ArrayList(); -// harvestFestivalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.harvestFestival"))); -// entries.add(new EntryUniText(harvestFestivalPages, "guide.BloodMagic.entryName.rituals.harvestFestival")); -// -// ArrayList thenThereWereFivePages = new ArrayList(); -// thenThereWereFivePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.thenThereWereFive"))); -// 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.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"))); -// entries.add(new EntryUniText(domeRitualPages, "guide.BloodMagic.entryName.rituals.domeRitual")); -// -// ArrayList awakenedCrystalPages = new ArrayList(); -// awakenedCrystalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.awakenedCrystal"))); -// 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.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"))); -// 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"))); -// 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"))); -// 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.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.expulsionRitual"))); -// entries.add(new EntryUniText(expulsionRitualPages, "guide.BloodMagic.entryName.rituals.expulsionRitual")); -// -// ArrayList costOfProgressPages = new ArrayList(); -// costOfProgressPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.costOfProgress.1"))); -// costOfProgressPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.costOfProgress.2"))); -// 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"))); -// 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.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.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.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.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.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"))); -// 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.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))); -// } -// entries.add(new EntryUniText(reagentEffectsRitualPages, "guide.BloodMagic.entryName.rituals.reagentEffects")); -// -// ArrayList conclaveOfMagesPages = new ArrayList(); -// conclaveOfMagesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.conclaveOfMages"))); -// entries.add(new EntryUniText(conclaveOfMagesPages, "guide.BloodMagic.entryName.rituals.conclaveOfMages")); -// -// ArrayList forbiddenParadisePages = new ArrayList(); -// forbiddenParadisePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.forbiddenParadise"))); -// 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.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"))); -// 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.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"))); -// entries.add(new EntryUniText(anvilRitualPages, "guide.BloodMagic.entryName.rituals.anvilRitual")); -// -// ArrayList dawnInkPages = new ArrayList(); -// dawnInkPages.add(new PageAltarRecipe(RecipeHolder.dawnRecipe)); -// dawnInkPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.dawnInk"))); -// 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.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.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.stallingRitual"))); -// entries.add(new EntryUniText(stallingRitualPages, "guide.BloodMagic.entryName.rituals.stallingRitual")); -// -// ArrayList newMoonRitualPages = new ArrayList(); -// newMoonRitualPages.addAll(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))); -// } -// -// public static void registerDemonBook() -// { -// List entries = new ArrayList(); -// -// ArrayList ashesPages = new ArrayList(); -// ashesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.ashes"))); -// entries.add(new EntryUniText(ashesPages, "guide.BloodMagic.entryName.demons.ashes")); -// -// ArrayList tamedDemonPages = new ArrayList(); -// tamedDemonPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.tamedDemon"))); -// entries.add(new EntryUniText(tamedDemonPages, "guide.BloodMagic.entryName.demons.tamedDemon")); -// -// ArrayList futurePages = new ArrayList(); -// futurePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.future"))); -// entries.add(new EntryUniText(futurePages, "guide.BloodMagic.entryName.demons.future")); -// -// ArrayList knightPages = new ArrayList(); -// knightPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.knight"))); -// 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))); -// 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.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.demonSummoning"))); -// entries.add(new EntryUniText(demonSummoningPages, "guide.BloodMagic.entryName.demons.demonSummoning")); -// -// ArrayList keysGatePages = new ArrayList(); -// for(int i=1; i<=10; i++) -// { -// keysGatePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.keysGate." + i))); -// } -// entries.add(new EntryUniText(keysGatePages, "guide.BloodMagic.entryName.demons.keysGate")); -// -// ArrayList futurePlansPages = new ArrayList(); -// 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"))); -// entries.add(new EntryUniText(demonInvasionPages, "guide.BloodMagic.entryName.demons.demonInvasion")); -// -// ArrayList observationsPages = new ArrayList(); -// 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))); -// } -// -// public static void registerSpellBook() -// { -// List entries = new ArrayList(); -// -// ArrayList demonGirlPages = new ArrayList(); -// 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"))); -// 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))); -// } -// entries.add(new EntryUniText(simpleEffectsPages, "guide.BloodMagic.entryName.spells.simpleEffects")); -// -// ArrayList tableAndSkullsPages = new ArrayList(); -// tableAndSkullsPages.add(new PageAltarRecipe(RecipeHolder.blankSpellRecipe)); -// tableAndSkullsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.tableAndSkulls.1"))); -// tableAndSkullsPages.add(getOrbPageForRecipe(RecipeHolder.spellTableRecipe)); -// tableAndSkullsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.tableAndSkulls.2"))); -// entries.add(new EntryUniText(tableAndSkullsPages, "guide.BloodMagic.entryName.spells.tableAndSkulls")); -// -// ArrayList timePassesPages = new ArrayList(); -// 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)); -// -// 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.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics.7"))); -// 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))); -// -// 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))); -// -// 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))); -// entries.add(new EntryUniText(complexSpellEffectsPages, "guide.BloodMagic.entryName.spells.complexSpellEffects")); -// -// ArrayList offTopicPages = new ArrayList(); -// offTopicPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.offTopic"))); -// entries.add(new EntryUniText(offTopicPages, "guide.BloodMagic.entryName.spells.offTopic")); -// -// ArrayList demonicPowerPages = new ArrayList(); -// 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))); -// } -// -// public static void registerAlchemyBook() -// { -// List entries = new ArrayList(); -// -// ArrayList fatedMeetingPages = new ArrayList(); -// 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"))); -// 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))); -// 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.add(new PageIRecipe(RecipeHolder.crucibleRecipe)); -// incensePages.add(new PageIRecipe(RecipeHolder.woodAshRecipe)); -// 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"))); -// entries.add(new EntryUniText(incensePages, "guide.BloodMagic.entryName.alchemy.incense")); -// -// ArrayList potionsPages = new ArrayList(); -// potionsPages.add(new PageAltarRecipe(RecipeHolder.flaskRecipe)); -// potionsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.potions"))); -// 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))); -// entries.add(new EntryUniText(reagentRevolutionPages, "guide.BloodMagic.entryName.alchemy.reagentRevolution")); -// -// ArrayList newPotionsPages = new ArrayList(); -// 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"))); -// entries.add(new EntryUniText(soulSandPages, "guide.BloodMagic.entryName.alchemy.soulSand")); -// -// ArrayList timeGoesByPages = new ArrayList(); -// 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"))); -// entries.add(new EntryUniText(catalystsPages, "guide.BloodMagic.entryName.alchemy.catalysts")); -// -// ArrayList activationCrystalPages = new ArrayList(); -// activationCrystalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.activationCrystal"))); -// entries.add(new EntryUniText(activationCrystalPages, "guide.BloodMagic.entryName.alchemy.activationCrystal")); -// -// ArrayList reagentSystemPages = new ArrayList(); -// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.1"))); -// reagentSystemPages.add(new PageIRecipe(RecipeHolder.calcinatorRecipe)); -// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.2"))); -// reagentSystemPages.add(new PageIRecipe(RecipeHolder.belljarRecipe)); -// reagentSystemPages.add(new PageIRecipe(RecipeHolder.relayRecipe)); -// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.3"))); -// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.4"))); -// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.5"))); -// reagentSystemPages.add(new PageIRecipe(RecipeHolder.routerRecipe)); -// reagentSystemPages.add(new PageIRecipe(RecipeHolder.segmenterRecipe)); -// reagentSystemPages.add(new PageIRecipe(RecipeHolder.cleanserRecipe)); -// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.6"))); -// -// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.7"))); -// -// entries.add(new EntryUniText(reagentSystemPages, "guide.BloodMagic.entryName.alchemy.reagentSystem")); -// -// ArrayList magusSecretPages = new ArrayList(); -// magusSecretPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.magusSecret"))); -// entries.add(new EntryUniText(magusSecretPages, "guide.BloodMagic.entryName.alchemy.magusSecret")); -// -// ArrayList simpleCreationsPages = new ArrayList(); -// simpleCreationsPages.addAll(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))); -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/compress/AdvancedCompressionHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/compress/AdvancedCompressionHandler.java deleted file mode 100644 index 42061aa6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/compress/AdvancedCompressionHandler.java +++ /dev/null @@ -1,178 +0,0 @@ -package WayofTime.alchemicalWizardry.common.compress; - -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); - } - - public ItemStack test(ItemStack[] inv, boolean doDrain, World world) - { - for(ItemStack invStack : inv) - { - if(invStack == null) - { - continue; - } - - for(int i=2; i<=3; i++) - { - ItemStack stacky = getRecipe(invStack, world, i); - if(stacky!=null) - { - int threshold = CompressionRegistry.getItemThreshold(invStack); - - int needed = i*i; - int neededLeft = iterateThroughInventory(invStack, threshold + invStack.getMaxStackSize() - needed, inv, needed, false); - if(neededLeft <= 0) - { - iterateThroughInventory(invStack, 0, inv, needed, true); - return stacky; - } - } - } - } - - return null; - } - - public int iterateThroughInventory(ItemStack required, int kept, ItemStack[] inv, int needed, boolean doDrain) - { - int i = -1; - - for(ItemStack invStack : inv) - { - i++; - - if(invStack == null) - { - continue; - } - - 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) - { - int remainingFromStack = Math.max(stackSize - kept, 0); - used += stackSize - remainingFromStack; - } - - kept -= used; - - if(kept <= 0 && needed > 0) - { - int remainingFromStack = Math.max(stackSize - used - needed, 0); - if(doDrain) - { - invStack.stackSize = remainingFromStack + used; - if(invStack.stackSize <= 0) - { - inv[i] = null; - } - } - - needed -= (stackSize - used - remainingFromStack); - } - - if(needed <= 0) - { - return 0; - } - } - } - - return needed; - } - - public static boolean isResultStackReversible(ItemStack stack, int gridSize, World world) - { - if(stack == null) - { - return false; - } - InventoryCrafting inventory = new InventoryCrafting(new Container() - { - public boolean canInteractWith(EntityPlayer player) - { - return false; - } - }, 2, 2); - - inventory.setInventorySlotContents(0, stack); - - ItemStack returnStack = StorageBlockCraftingManager.getInstance().findMatchingRecipe(inventory, world); - if(returnStack == null) - { - return false; - } - - ItemStack compressedStack = null; - switch(gridSize) - { - case 2: - compressedStack = get22Recipe(returnStack, world); - break; - case 3: - compressedStack = get33Recipe(returnStack, world); - break; - } - - if(compressedStack == null) - { - return false; - }else - { - return SpellHelper.areItemStacksEqual(stack, compressedStack); - } - } - - 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); - for(int i=0; i 0) - { - int remainingFromStack = Math.max(stackSize - kept, 0); - used += stackSize - remainingFromStack; - } - - kept -= used; - - if(kept <= 0 && needed > 0) - { - int remainingFromStack = Math.max(stackSize - used - needed, 0); - if(doDrain) - { - invStack.stackSize = remainingFromStack + used; - if(invStack.stackSize <= 0) - { - inv[i] = null; - } - } - - needed -= (stackSize - used - remainingFromStack); - } - - if(needed <= 0) - { - return 0; - } - } - } - - return needed; - } - - public int getLeftover() - { - return this.leftover; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingManager.java b/src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingManager.java deleted file mode 100644 index b8ce890d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingManager.java +++ /dev/null @@ -1,261 +0,0 @@ -package WayofTime.alchemicalWizardry.common.compress; - -import java.util.LinkedList; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.InventoryCrafting; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -public class StorageBlockCraftingManager -{ - private static final StorageBlockCraftingManager instance = new StorageBlockCraftingManager(); - private List recipes = new LinkedList(); - - public static StorageBlockCraftingManager getInstance() - { - return instance; - } - - public void addStorageBlockRecipes() - { - this.recipes = new StorageBlockCraftingRecipeAssimilator().getPackingRecipes(); - - System.out.println("Total number of compression recipes: " + this.recipes.size()); -// List tempRecipeList = new LinkedList(); -// -// 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; -// } -// -// 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.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)) || ((outputStack.stackSize == 9 || outputStack.stackSize == 4) && recipe.getRecipeSize() == 1)) -// { -// tempRecipeList.add(recipe); -// continue; -// } -// } -// } -// -// 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; -// } -// -// 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 handler."); -// } -// } -// } -// -// 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); - - inventory.setInventorySlotContents(0, stack); - - ItemStack returnStack = StorageBlockCraftingManager.getInstance().findMatchingRecipe(inventory, world, list); - if(returnStack == null || returnStack.getItem() == null) - { - return false; - } - - ItemStack compressedStack = null; - switch(gridSize) - { - case 2: - compressedStack = get22Recipe(returnStack, world, list); - break; - case 3: - compressedStack = get33Recipe(returnStack, world, list); - break; - } - - if(compressedStack == null) - { - return false; - }else - { - return SpellHelper.areItemStacksEqual(stack, compressedStack); - } - } - - 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); - for(int i=0; i getPackingRecipes() { - // grab all recipes potentially suitable for packing or unpacking - - List packingRecipes = new LinkedList(); - List unpackingRecipes = new ArrayList(); - - for (IRecipe recipe : getCraftingRecipes()) { - ItemStack output = recipe.getRecipeOutput(); - if (output == null || output.getItem() == null) continue; - - if (output.stackSize == 1) { - PackingRecipe packingRecipe = getPackingRecipe(recipe); - - if (packingRecipe != null) { - packingRecipes.add(packingRecipe); - } - } else if ((output.stackSize == 4 || output.stackSize == 9) && recipe.getRecipeSize() == 1) { - unpackingRecipes.add(recipe); - } - } - - // grab all packing recipes which accept the output of any of the unpacking recipes - - Container container = makeDummyContainer(); - InventoryCrafting inventoryUnpack = new InventoryCrafting(container, 2, 2); - InventoryCrafting inventory2x2 = new InventoryCrafting(container, 2, 2); - InventoryCrafting inventory3x3 = new InventoryCrafting(container, 3, 3); - World world = null; // TODO: use a proper dummy world? - - List ret = new ArrayList(); - - for (IRecipe recipeUnpack : unpackingRecipes) { - ItemStack unpacked = recipeUnpack.getRecipeOutput(); - InventoryCrafting inventory = null; - - 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 - // verify recipe size - - if (recipePack.inputCount != unpacked.stackSize) continue; - - // check if any of the input options matches the unpacked item stack - - for (ItemStack stack : recipePack.possibleInputs) { - if (areInputsIdentical(unpacked, stack)) { - matched = true; - break; - } - } - } else { // unknown IRecipe, check through the recipe conventionally - // verify recipe size for 3x3 to skip anything smaller quickly - - if (unpacked.stackSize == 9 && recipePack.recipe.getRecipeSize() < 9) continue; - - // initialize inventory late, but only once per unpack recipe - - if (inventory == null) { - if (unpacked.stackSize == 4) { - inventory = inventory2x2; - } else { - inventory = inventory3x3; - } - - for (int i = 0; i < unpacked.stackSize; i++) { - inventory.setInventorySlotContents(i, unpacked.copy()); - } - } - - // check if the packing recipe accepts the unpacked item stack - - matched = recipePack.recipe.matches(inventory, world); - } - - if (matched) { - // check if the unpacking recipe accepts the packing recipe's output - - ItemStack packOutput = recipePack.recipe.getRecipeOutput(); - inventoryUnpack.setInventorySlotContents(0, packOutput.copy()); - - if (recipeUnpack.matches(inventoryUnpack, world)) { - ret.add(recipePack.recipe); - AlchemicalWizardry.logger.info("Adding the following recipe to the Compression Handler: " + packOutput); - it.remove(); - } - } - } - } - - return ret; - } - - @SuppressWarnings("unchecked") - private List getCraftingRecipes() { - return CraftingManager.getInstance().getRecipeList(); - } - - private Container makeDummyContainer() { - return new Container() { - @Override - public boolean canInteractWith(EntityPlayer p_75145_1_) { - return true; - } - }; - } - - private PackingRecipe getPackingRecipe(IRecipe recipe) { - if (recipe.getRecipeSize() < 4) return null; - - List inputs; - - if (recipe instanceof ShapedRecipes) { - inputs = Arrays.asList(((ShapedRecipes) recipe).recipeItems); - } else if (recipe instanceof ShapelessRecipes) { - inputs = ((ShapelessRecipes) recipe).recipeItems; - } else if (recipe instanceof ShapedOreRecipe) { - inputs = Arrays.asList(((ShapedOreRecipe) recipe).getInput()); - } else if (recipe instanceof ShapelessOreRecipe) { - inputs = ((ShapelessOreRecipe) recipe).getInput(); - } else { - return new PackingRecipe(recipe, null, -1); - } - - // check if the recipe inputs are size 4 or 9 - - int count = 0; - - for (Object o : inputs) { - if (o != null) count++; - } - - if (count != 4 && count != 9) return null; - - // grab identical inputs - - List identicalInputs = getIdenticalInputs(inputs); - if (identicalInputs == null) return null; - - return new PackingRecipe(recipe, identicalInputs, count); - } - - /** - * Determine the item stacks from the provided inputs which are suitable for every input element. - * - * @param inputs List of all inputs, null elements are being ignored. - * @return List List of all options. - */ - @SuppressWarnings("unchecked") - private List getIdenticalInputs(List inputs) { - List options = null; - - for (Object input : inputs) { - if (input == null) continue; - - List offers; - - if (input instanceof ItemStack) { - offers = Arrays.asList((ItemStack) input); - } else if (input instanceof List) { - offers = (List) input; - - if (offers.isEmpty()) return null; - } else { - throw new RuntimeException("invalid input: "+input.getClass()); - } - - if (options == null) { - options = new ArrayList(offers); - continue; - } - - for (Iterator it = options.iterator(); it.hasNext(); ) { - ItemStack stackReq = it.next(); - boolean found = false; - - for (ItemStack stackCmp : offers) { - if (areInputsIdentical(stackReq, stackCmp)) { - found = true; - break; - } - } - - if (!found) { - it.remove(); - - if (options.isEmpty()) return null; - } - } - } - - return options; - } - - private boolean areInputsIdentical(ItemStack a, ItemStack b) { - if (a.getItem() != b.getItem()) return false; - - int dmgA = a.getItemDamage(); - int dmgB = b.getItemDamage(); - - return dmgA == dmgB || dmgA == OreDictionary.WILDCARD_VALUE || dmgB == OreDictionary.WILDCARD_VALUE; - } - - private static class PackingRecipe { - PackingRecipe(IRecipe recipe, List possibleInputs, int inputCount) { - this.recipe = recipe; - this.possibleInputs = possibleInputs; - this.inputCount = inputCount; - } - - final IRecipe recipe; - final List possibleInputs; - final int inputCount; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java deleted file mode 100644 index 6186b6c9..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java +++ /dev/null @@ -1,375 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockDoor; -import net.minecraft.block.BlockLadder; -import net.minecraft.block.BlockRedstoneComparator; -import net.minecraft.block.BlockRedstoneRepeater; -import net.minecraft.block.BlockStairs; -import net.minecraft.block.BlockTorch; -import net.minecraft.block.BlockTrapDoor; -import net.minecraft.init.Blocks; -import net.minecraft.inventory.IInventory; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.common.registry.GameRegistry.UniqueIdentifier; -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; - -public class BlockSet -{ - protected String blockid; - protected int[] metadata; - protected List positions; - - public BlockSet() - { - this(Blocks.stone); - } - - public BlockSet(String blockid) - { - this.blockid = blockid; - this.metadata = new int[4]; - positions = new ArrayList(); - } - - public BlockSet(Block block) - { - this(BlockSet.getPairedIdForBlock(block)); - } - - public BlockSet(Block block, int meta) - { - this(block); - for (int i = 0; i < metadata.length; i++) - { - 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}; - - switch (meta) - { - case 0: - metadata = westSet; - break; - case 1: - metadata = eastSet; - break; - case 2: - metadata = northSet; - break; - case 3: - metadata = southSet; - break; - case 4: - metadata = westUpSet; - break; - case 5: - metadata = eastUpSet; - break; - case 6: - metadata = northUpSet; - break; - case 7: - metadata = southUpSet; - 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}; - - switch (meta) - { - case 3: - metadata = northSet; - break; - case 4: - metadata = eastSet; - break; - case 2: - metadata = southSet; - break; - case 5: - metadata = westSet; - break; - } - }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 + - - switch (mod) - { - case 0: - metadata = southSet; - break; - case 1: - metadata = northSet; - break; - case 2: - metadata = eastSet; - break; - case 3: - metadata = westSet; - 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}; - - - switch (meta) - { - case 1: - metadata = westSet; - break; - case 2: - metadata = eastSet; - break; - case 3: - metadata = northSet; - break; - case 4: - metadata = southSet; - 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}; - - - switch (meta) - { - case 0: - metadata = eastSet; - break; - case 1: - metadata = southSet; - break; - case 2: - metadata = westSet; - break; - case 3: - metadata = northSet; - break; - } - }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 + - - switch (mod) - { - case 0: - metadata = northSet; - break; - case 1: - metadata = eastSet; - break; - case 2: - metadata = southSet; - break; - case 3: - metadata = westSet; - break; - } - }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 + - - - - switch (mod) - { - case 0: - metadata = northSet; - break; - case 1: - metadata = eastSet; - break; - case 2: - metadata = southSet; - break; - case 3: - metadata = westSet; - break; - } - } - - - } - - public List getPositions() - { - return positions; - } - - public void addPositionToBlock(int xOffset, int yOffset, int zOffset) - { - positions.add(new Int3(xOffset, yOffset, zOffset)); - } - - public Block getBlock() - { - return getBlockForString(blockid); - } - - public static String getPairedIdForBlock(Block block) - { - UniqueIdentifier un = GameRegistry.findUniqueIdentifierFor(block); - String name = ""; - - if (un != null) - { - name = un.modId + ":" + un.name; - } - - return name; - } - - public static Block getBlockForString(String str) - { - String[] parts = str.split(":"); - String modId = parts[0]; - String name = parts[1]; - return GameRegistry.findBlock(modId, name); - } - - public int getMetaForDirection(EnumFacing dir) - { - if (metadata.length < 4) - { - return 0; - } - - switch (dir) - { - case NORTH: - return metadata[0]; - case SOUTH: - return metadata[1]; - case WEST: - return metadata[2]; - case EAST: - return metadata[3]; - default: - return 0; - } - } - - public void buildAtIndex(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, EnumFacing dir, int index, boolean populateInventories, int tier) - { - Block block = this.getBlock(); - if (index >= positions.size() || block == null) - { - return; - } - - Int3 position = positions.get(index); - int xOff = position.xCoord; - int yOff = position.yCoord; - int zOff = position.zCoord; - int meta = this.getMetaForDirection(dir); - - switch (dir) - { - case NORTH: - break; - case SOUTH: - xOff *= -1; - zOff *= -1; - break; - case WEST: - int temp = zOff; - zOff = xOff * -1; - xOff = temp; - break; - case EAST: - int temp2 = zOff * -1; - zOff = xOff; - xOff = temp2; - break; - default: - } - - BlockPos newPos = new BlockPos(xCoord + xOff, yCoord + yOff, zCoord + zOff); - world.setBlockState(newPos, block.getStateFromMeta(meta), 3); - if(populateInventories) - { - this.populateIfIInventory(world, newPos, tier); - } - if(block instanceof IBlockPortalNode) - { - TileEntity tile = world.getTileEntity(newPos); - if(tile instanceof ITilePortalNode) - { - ((ITilePortalNode) tile).setPortalLocation(teDemonPortal); - } - } - } - - public void populateIfIInventory(World world, BlockPos pos, int tier) - { - TileEntity tile = world.getTileEntity(pos); - if(tile instanceof IInventory) - { - DemonVillageLootRegistry.populateChest((IInventory)tile, tier); - } - } - - public void buildAll(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, EnumFacing dir, boolean populateInventories, int tier) - { - for (int i = 0; i < positions.size(); i++) - { - this.buildAtIndex(teDemonPortal, world, xCoord, yCoord, zCoord, dir, i, populateInventories, tier); - } - } - - public boolean isContained(Block block, int defaultMeta) - { - Block thisBlock = this.getBlock(); - return thisBlock != null && thisBlock.equals(block) && this.metadata[0] == defaultMeta; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java deleted file mode 100644 index 6c62e88a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java +++ /dev/null @@ -1,190 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -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; - public int doorY; - public int buildingTier; - public int buildingType; - public List blockList; - - public BuildingSchematic() - { - this(""); - } - - public BuildingSchematic(String name) - { - this.name = name; - blockList = new ArrayList(); - this.doorX = 0; - this.doorZ = 0; - this.doorY = 0; - this.buildingTier = 0; - this.buildingType = DemonBuilding.BUILDING_HOUSE; - } - - public void addBlockWithMeta(Block block, int meta, int xOffset, int yOffset, int zOffset) - { - for (BlockSet set : blockList) - { - if (set.isContained(block, meta)) - { - set.addPositionToBlock(xOffset, yOffset, zOffset); - return; - } - } - - BlockSet set = new BlockSet(block, meta); - set.addPositionToBlock(xOffset, yOffset, zOffset); - blockList.add(set); - } - - public void buildAll(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, EnumFacing dir, boolean populateInventories) - { - for (BlockSet set : blockList) - { - set.buildAll(teDemonPortal, world, xCoord, yCoord, zCoord, dir, populateInventories, this.buildingTier); - } - } - - public GridSpaceHolder createGSH() - { - GridSpaceHolder holder = new GridSpaceHolder(); - - for (BlockSet set : blockList) - { - for (Int3 coords : set.getPositions()) - { - int gridX = (int) ((coords.xCoord + 2 * Math.signum(coords.xCoord)) / 5); - int gridZ = (int) ((coords.zCoord + 2 * Math.signum(coords.zCoord)) / 5); - - holder.setGridSpace(gridX, gridZ, new GridSpace(GridSpace.HOUSE, 0)); - } - } - - return holder; - } - - public Int3 getGridSpotOfDoor() - { - int gridX = (int) ((doorX + 2 * Math.signum(doorX)) / 5); - int gridZ = (int) ((doorZ + 2 * Math.signum(doorZ)) / 5); - - return new Int3(gridX, doorY, gridZ); - } - - public List getGriddedPositions(EnumFacing dir) - { - List positionList = new ArrayList(); - - for (BlockSet blockSet : blockList) - { - for (Int3 pos : blockSet.getPositions()) - { - int xOff = pos.xCoord; - int zOff = pos.zCoord; - - switch (dir) - { - case SOUTH: - xOff *= -1; - zOff *= -1; - break; - case WEST: - int temp = zOff; - zOff = xOff * -1; - xOff = temp; - break; - case EAST: - int temp2 = zOff * -1; - zOff = xOff; - xOff = temp2; - break; - default: - } - - Int3 nextPos = new Int3(xOff, 0, zOff); - if (!positionList.contains(nextPos)) - { - positionList.add(nextPos); - } - } - } - - return positionList; - } - - public void destroyAllInField(World world, int xCoord, int yCoord, int zCoord, EnumFacing dir) - { -// GridSpaceHolder grid = this.createGSH(); //GridSpaceHolder is not aware of the buildings - need to use the schematic - - List positionList = getGriddedPositions(dir); - - for (int i = this.getMinY(); i <= this.getMaxY(); i++) - { - for (Int3 pos : positionList) - { - BlockPos newPos = new BlockPos(xCoord + pos.xCoord, yCoord + i, zCoord + pos.zCoord); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - if (block != ModBlocks.blockDemonPortal) - { - world.setBlockToAir(newPos); - } - } - } - } - - public int getMinY() - { - int min = 0; - for (BlockSet set : blockList) - { - for (Int3 pos : set.getPositions()) - { - if (pos.yCoord < min) - { - min = pos.yCoord; - } - } - } - - return min; - } - - public int getMaxY() - { - int max = 0; - for (BlockSet set : blockList) - { - for (Int3 pos : set.getPositions()) - { - if (pos.yCoord > max) - { - max = pos.yCoord; - } - } - } - return max; - } - - public String getName() - { - return this.name; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonBuilding.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonBuilding.java deleted file mode 100644 index fa6450d7..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonBuilding.java +++ /dev/null @@ -1,121 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage; - -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -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; - - public BuildingSchematic schematic; - public GridSpaceHolder area; - public int buildingTier; - public int buildingType; - public Int3 doorGridSpace; - - public DemonBuilding(BuildingSchematic schematic) - { - this.schematic = schematic; - this.buildingType = schematic.buildingType; - this.buildingTier = schematic.buildingTier; - this.area = this.createGSHForSchematic(schematic); - this.doorGridSpace = schematic.getGridSpotOfDoor(); - } - - public String getName() - { - return schematic.getName(); - } - - public boolean isValid(GridSpaceHolder master, int gridX, int gridZ, EnumFacing dir) - { - return area.doesContainAll(master, gridX, gridZ, dir); - } - - public void buildAll(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, EnumFacing dir, boolean populateInventories) - { - schematic.buildAll(teDemonPortal, world, xCoord, yCoord, zCoord, dir, populateInventories); - } - - public void setAllGridSpaces(int xInit, int zInit, int yLevel, EnumFacing dir, int type, GridSpaceHolder master) - { - area.setAllGridSpaces(xInit, zInit, yLevel, dir, type, master); - } - - public GridSpaceHolder createGSHForSchematic(BuildingSchematic scheme) - { - switch (this.buildingType) - { - case DemonBuilding.BUILDING_HOUSE: - return scheme.createGSH(); - case DemonBuilding.BUILDING_PORTAL: - - } - return scheme.createGSH(); - } - - public Int3 getDoorSpace(EnumFacing dir) - { - int x; - int z; - switch (dir) - { - case SOUTH: - x = -doorGridSpace.xCoord; - z = -doorGridSpace.zCoord; - break; - case WEST: - x = doorGridSpace.zCoord; - z = -doorGridSpace.xCoord; - break; - case EAST: - x = -doorGridSpace.zCoord; - z = doorGridSpace.xCoord; - break; - default: - x = doorGridSpace.xCoord; - z = doorGridSpace.zCoord; - break; - } - - return new Int3(x, doorGridSpace.yCoord, z); - } - - public Int3 getGridOffsetFromRoad(EnumFacing sideOfRoad, int yLevel) - { - Int3 doorSpace = this.getDoorSpace(sideOfRoad); - int x = doorSpace.xCoord; - int z = doorSpace.zCoord; - - switch (sideOfRoad) - { - case SOUTH: - z++; - break; - case EAST: - x++; - break; - case WEST: - x--; - break; - default: - z--; - break; - } - - return new Int3(x, yLevel, z); - } - - public void destroyAllInField(World world, int xCoord, int yCoord, int zCoord, EnumFacing dir) - { - schematic.destroyAllInField(world, xCoord, yCoord, zCoord, dir); - } - - public int getNumberOfGridSpaces() - { - return area.getNumberOfGridSpaces(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonCrosspath.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonCrosspath.java deleted file mode 100644 index 6badd634..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonCrosspath.java +++ /dev/null @@ -1,22 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage; - -import net.minecraft.world.World; - -public class DemonCrosspath -{ - private int xCoord; - private int yLevel; - private int zCoord; - - public DemonCrosspath(int xCoord, int yLevel, int zCoord) - { - this.xCoord = xCoord; - this.yLevel = yLevel; - this.zCoord = zCoord; - } - - public void createCrosspath(World world) - { - - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonVillagePath.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonVillagePath.java deleted file mode 100644 index eeb4da3c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonVillagePath.java +++ /dev/null @@ -1,263 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockFlower; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -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; - public EnumFacing dir; - public int length; - - public static boolean canGoDown = true; - public static boolean tunnelIfObstructed = false; - public static boolean createBridgeInAirIfObstructed = false; - - public DemonVillagePath(int xi, int yi, int zi, EnumFacing dir2, int length) - { - this.xPos = xi; - this.yPos = yi; - this.zPos = zi; - this.dir = dir2; - this.length = length; - } - - public Int3AndBool constructFullPath(TEDemonPortal portal, World world, int clearance) - { - int xi = this.xPos; - int yi = this.yPos; - int zi = this.zPos; - int rad = this.getRoadRadius(); - int value = 0; - - int finalYPos = this.constructPartialPath(portal, world, clearance, xi - rad * dir.getFrontOffsetX(), yi, zi - rad * dir.getFrontOffsetZ(), dir, length + rad, false); - - for (int i = -rad; i <= rad; i++) - { - value = Math.max(this.constructPartialPath(portal, world, clearance, xi - rad * dir.getFrontOffsetX() + i * dir.getFrontOffsetZ(), yi, zi - rad * dir.getFrontOffsetZ() + i * dir.getFrontOffsetX(), dir, length + 2 * rad, true), value); - if(TEDemonPortal.printDebug) - System.out.println("" + (length + 2 * rad) + ", " + value + ""); - } - - Int3 position = new Int3(xi, finalYPos, zi); - - boolean bool = value >= length + 2 * rad; - - return new Int3AndBool(position, bool); - } - - public class Int3AndBool - { - public Int3 coords; - public boolean bool; - public Int3AndBool(Int3 int3, boolean bool) - { - this.coords = int3; - this.bool = bool; - } - } - - /** - * - * @param portal - * @param world - * @param clearance - * @param xi - * @param yi - * @param zi - * @param dir - * @param length - * @param doConstruct - * @return length if doConstruct, yi if !doConstruct - */ - public int constructPartialPath(TEDemonPortal portal, World world, int clearance, int xi, int yi, int zi, EnumFacing dir, int length, boolean doConstruct) - { - for (int i = 0; i < length; i++) - { - int xOffset = i * dir.getFrontOffsetX(); - int zOffset = i * dir.getFrontOffsetZ(); - - boolean completed = false; - - for (int yOffset = 0; yOffset <= clearance; yOffset++) - { - int sign = 1; - - BlockPos pos1 = new BlockPos(xi + xOffset, yi + sign * yOffset, zi + zOffset); - BlockPos highPos1 = pos1.offsetUp(); - - IBlockState state1 = world.getBlockState(pos1); - IBlockState highState1 = world.getBlockState(highPos1); - Block block1 = state1.getBlock(); - Block highBlock1 = highState1.getBlock(); - - if ((this.forceReplaceBlock(block1))||(!block1.isReplaceable(world, pos1) && this.isBlockReplaceable(block1) ) && (this.forceCanTunnelUnder(highBlock1) || highBlock1.isReplaceable(world, highPos1))) - { - if(doConstruct) - { - world.setBlockState(pos1, portal.getRoadState(), 3); - } - yi += sign * yOffset; - completed = true; - break; - } else if(canGoDown) - { - sign = -1; - pos1 = new BlockPos(xi + xOffset, yi + sign * yOffset, zi + zOffset); - highPos1 = pos1.offsetUp(); - - state1 = world.getBlockState(pos1); - highState1 = world.getBlockState(highPos1); - block1 = state1.getBlock(); - highBlock1 = highState1.getBlock(); - - if ((this.forceReplaceBlock(block1))||(!block1.isReplaceable(world, pos1) && this.isBlockReplaceable(block1) ) && (this.forceCanTunnelUnder(highBlock1) || highBlock1.isReplaceable(world, highPos1))) - { - if(doConstruct) - { - world.setBlockState(pos1, portal.getRoadState(), 3); - } - yi += sign * yOffset; - completed = true; - break; - } - } - } - - if(!completed) - { - boolean returnAmount = true; - if(createBridgeInAirIfObstructed) - { - BlockPos pos1 = new BlockPos(xi + xOffset, yi, zi + zOffset); - IBlockState state1 = world.getBlockState(pos1); - Block block1 = state1.getBlock(); - - if (block1.isReplaceable(world, pos1) || !this.isBlockReplaceable(block1) || !this.forceReplaceBlock(block1)) - { - returnAmount = false; - - if(doConstruct) - { - world.setBlockState(pos1, portal.getRoadState(), 3); - } - }else - { - returnAmount = true; - } - - }else if(tunnelIfObstructed) - { - BlockPos pos1 = new BlockPos(xi + xOffset, yi, zi + zOffset); - IBlockState state1 = world.getBlockState(pos1); - Block block1 = state1.getBlock(); - - if (!block1.isReplaceable(world, pos1) || this.isBlockReplaceable(block1) || !this.forceReplaceBlock(block1)) - { - returnAmount = false; - - if(doConstruct) - { - world.setBlockState(pos1, portal.getRoadState(), 3); - world.setBlockToAir(pos1.offsetUp(1)); - world.setBlockToAir(pos1.offsetUp(2)); - world.setBlockToAir(pos1.offsetUp(3)); - } - }else - { - returnAmount = true; - } - } - - if(returnAmount) - { - return doConstruct ? i : yi; - } - } - } - - return doConstruct ? length : yi; - } - - public Int3 getFinalLocation(World world, int clearance) - { - int xi = xPos; - int yi = yPos; - int zi = zPos; - - for (int i = 0; i < length; i++) - { - int xOffset = i * dir.getFrontOffsetX(); - int zOffset = i * dir.getFrontOffsetZ(); - - for (int yOffset = 0; yOffset <= clearance; yOffset++) - { - int sign = 1; - - BlockPos pos1 = new BlockPos(xi + xOffset, yi + sign * yOffset, zi + zOffset); - BlockPos highPos1 = pos1.offsetUp(); - - IBlockState state1 = world.getBlockState(pos1); - IBlockState highState1 = world.getBlockState(highPos1); - Block block1 = state1.getBlock(); - Block highBlock1 = highState1.getBlock(); - - if ((this.forceReplaceBlock(block1))||(!block1.isReplaceable(world, pos1) && this.isBlockReplaceable(block1) ) && (this.forceCanTunnelUnder(highBlock1) || highBlock1.isReplaceable(world, highPos1))) - { - yi += sign * yOffset; - break; - } else - { - sign = -1; - BlockPos pos2 = new BlockPos(xi + xOffset, yi + sign * yOffset, zi + zOffset); - BlockPos highPos2 = pos2.offsetUp(); - - IBlockState state2 = world.getBlockState(pos2); - IBlockState highState2 = world.getBlockState(highPos2); - Block block2 = state2.getBlock(); - Block highBlock2 = highState2.getBlock(); - - if ((this.forceReplaceBlock(block2))||(!block2.isReplaceable(world, pos2) && this.isBlockReplaceable(block2) ) && (this.forceCanTunnelUnder(highBlock2) || highBlock2.isReplaceable(world, highPos2))) - { - yi += sign * yOffset; - break; - } - } - } - } - - return new Int3(xi, yi, zi); - } - - public int getRoadRadius() - { - return 1; - } - - public boolean isBlockReplaceable(Block block) - { - return !(block.getMaterial() == Material.leaves || block.getMaterial() == Material.vine || block instanceof IRoadWard) &&!block.equals(ModBlocks.blockDemonPortal); - } - - public boolean forceReplaceBlock(Block block) - { - return block.getMaterial().isLiquid(); - } - - public boolean forceCanTunnelUnder(Block block) - { - return block instanceof BlockFlower || block == Blocks.double_plant; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpace.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpace.java deleted file mode 100644 index b21a30f4..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpace.java +++ /dev/null @@ -1,77 +0,0 @@ -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; - public static final int ROAD = 3; - public static final int CROSSROAD = 4; - public static final int HOUSE = 5; - - private int yLevel; - private int type; - - public GridSpace() - { - this(EMPTY, -1); - } - - public GridSpace(int type, int yLevel) - { - this.type = type; - this.yLevel = yLevel; - } - - public int getGridType() - { - return this.type; - } - - public void setGridType(int type) - { - this.type = type; - } - - public int getYLevel() - { - return this.yLevel; - } - - public void setYLevel(int yLevel) - { - this.yLevel = yLevel; - } - - public boolean isEmpty() - { - return type == EMPTY; - } - - public static GridSpace getGridFromTag(NBTTagCompound tag) - { - return new GridSpace(tag.getInteger("type"), tag.getInteger("yLevel")); - } - - public NBTTagCompound getTag() - { - NBTTagCompound tag = new NBTTagCompound(); - - tag.setInteger("type", type); - tag.setInteger("yLevel", yLevel); - - return tag; - } - - public boolean isRoadSegment() - { - return type == ROAD || type == CROSSROAD; - } - - public boolean isBuilding() - { - return type == HOUSE; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpaceHolder.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpaceHolder.java deleted file mode 100644 index bbb3c04f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpaceHolder.java +++ /dev/null @@ -1,313 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -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 - public int negZRadius; - public int posZRadius; - - public GridSpaceHolder() - { - area = new GridSpace[1][1]; - area[0][0] = new GridSpace(); - } - - public void expandAreaInNegX() - { - GridSpace[][] newGrid = new GridSpace[negXRadius + posXRadius + 2][negZRadius + posZRadius + 1]; - for (int i = 0; i <= negZRadius + posZRadius; i++) - { - newGrid[0][i] = new GridSpace(); - } - - for (int i = 0; i <= negXRadius + posXRadius; i++) - { - for (int j = 0; j <= negZRadius + posZRadius; j++) - { - newGrid[i + 1][j] = area[i][j]; - } - } - - area = newGrid; - negXRadius += 1; - } - - public void expandAreaInPosX() - { - GridSpace[][] newGrid = new GridSpace[negXRadius + posXRadius + 2][negZRadius + posZRadius + 1]; - - for (int i = 0; i <= negZRadius + posZRadius; i++) - { - newGrid[negXRadius + posXRadius + 1][i] = new GridSpace(); - } - - for (int i = 0; i <= negXRadius + posXRadius; i++) - { - for (int j = 0; j <= negZRadius + posZRadius; j++) - { - newGrid[i][j] = area[i][j]; - } - } - - area = newGrid; - posXRadius += 1; - } - - public void expandAreaInNegZ() - { - GridSpace[][] newGrid = new GridSpace[negXRadius + posXRadius + 1][negZRadius + posZRadius + 2]; - - for (int i = 0; i <= negXRadius + posXRadius; i++) - { - newGrid[i][0] = new GridSpace(); - } - - for (int i = 0; i <= negXRadius + posXRadius; i++) - { - for (int j = 0; j <= negZRadius + posZRadius; j++) - { - newGrid[i][j + 1] = area[i][j]; - } - } - - area = newGrid; - negZRadius += 1; - } - - public void expandAreaInPosZ() - { - GridSpace[][] newGrid = new GridSpace[negXRadius + posXRadius + 1][negZRadius + posZRadius + 2]; - - for (int i = 0; i <= negXRadius + posXRadius; i++) - { - newGrid[i][negZRadius + posZRadius + 1] = new GridSpace(); - } - - for (int i = 0; i <= negXRadius + posXRadius; i++) - { - for (int j = 0; j <= negZRadius + posZRadius; j++) - { - newGrid[i][j] = area[i][j]; - } - } - - area = newGrid; - posZRadius += 1; - } - - public GridSpace getGridSpace(int x, int z) - { - if (x > posXRadius || x < -negXRadius || z > posZRadius || z < -negZRadius) - { - return new GridSpace(); - } else - { - return (area[x + negXRadius][z + negZRadius]); - } - } - - public void setGridSpace(int x, int z, GridSpace space) - { - if (x > posXRadius) - { - this.expandAreaInPosX(); - this.setGridSpace(x, z, space); - } else if (x < -negXRadius) - { - this.expandAreaInNegX(); - this.setGridSpace(x, z, space); - } else if (z > posZRadius) - { - this.expandAreaInPosZ(); - this.setGridSpace(x, z, space); - } else if (z < -negZRadius) - { - this.expandAreaInNegZ(); - this.setGridSpace(x, z, space); - } else - { - area[x + negXRadius][z + negZRadius] = space; - } - } - - public boolean doesContainAll(GridSpaceHolder master, int xInit, int zInit, EnumFacing dir) - { - if (master != null) - { - 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); - if (thisSpace.isEmpty()) - { - continue; - } - - if(TEDemonPortal.printDebug) - AlchemicalWizardry.logger.info("x: " + i + " z: " + j); - - int xOff; - int zOff; - - switch (dir) - { - case SOUTH: - xOff = -i; - zOff = -j; - break; - case WEST: - xOff = j; - zOff = -i; - break; - case EAST: - xOff = -j; - zOff = i; - break; - default: - xOff = i; - zOff = j; - break; - } - if (!master.getGridSpace(xInit + xOff, zInit + zOff).isEmpty()) - { - return false; - } - } - } - return true; - } - return false; - } - - public void setAllGridSpaces(int xInit, int zInit, int yLevel, EnumFacing dir, int type, GridSpaceHolder master) - { - if(TEDemonPortal.printDebug) - AlchemicalWizardry.logger.info("Grid space selected: (" + xInit + "," + zInit + ")"); - if (master != null) - { - for (int i = -negXRadius; i <= posXRadius; i++) - { - for (int j = -negZRadius; j <= posZRadius; j++) - { - GridSpace thisSpace = this.getGridSpace(i, j); - if (thisSpace.isEmpty()) - { - continue; - } - - int xOff; - int zOff; - - switch (dir) - { - case SOUTH: - xOff = -i; - zOff = -j; - break; - case WEST: - xOff = j; - zOff = -i; - break; - case EAST: - xOff = -j; - zOff = i; - break; - default: - xOff = i; - zOff = j; - break; - } - - if(TEDemonPortal.printDebug) - AlchemicalWizardry.logger.info("Grid space (" + (xInit + xOff) + "," + (zInit + zOff) + ")"); - - master.setGridSpace(xInit + xOff, zInit + zOff, new GridSpace(type, yLevel)); - } - } - } - } - - public void destroyAllInGridSpaces(World world, int xCoord, int yCoord, int zCoord, EnumFacing dir) - { - for (int i = -negXRadius; i <= posXRadius; i++) - { - for (int j = -negZRadius; j <= posZRadius; j++) - { - GridSpace thisSpace = this.getGridSpace(i, j); - if (thisSpace.isEmpty()) - { - continue; - } - - int xOff; - int zOff; - - switch (dir) - { - case SOUTH: - xOff = -i; - zOff = -j; - break; - case WEST: - xOff = j; - zOff = -i; - break; - case EAST: - xOff = -j; - zOff = i; - break; - default: - xOff = i; - zOff = j; - break; - } - - for (int l = -2; l <= 2; l++) - { - for (int m = -2; m <= 2; m++) - { - BlockPos newPos = new BlockPos(xCoord + xOff * 5 + l, yCoord, zCoord + zOff * 5 + m); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - if (block == ModBlocks.blockDemonPortal) - { - continue; - } - world.setBlockToAir(newPos); - } - } - } - } - } - - public int getNumberOfGridSpaces() - { - int num = 0; - for (int i = -this.negXRadius; i <= this.posXRadius; i++) - { - for (int j = -this.negZRadius; j <= this.posZRadius; j++) - { - if (!this.getGridSpace(i, j).isEmpty()) - { - num++; - } - } - } - - return num; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityAIOccasionalRangedAttack.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityAIOccasionalRangedAttack.java deleted file mode 100644 index 9d7ea89f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityAIOccasionalRangedAttack.java +++ /dev/null @@ -1,165 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.ai; - -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.EntityLivingBase; -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. */ - private final IOccasionalRangedAttackMob rangedAttackEntityHost; - private EntityLivingBase attackTarget; - /** - * A decrementing tick that spawns a ranged attack once this value reaches 0. It is then set back to the - * maxRangedAttackTime. - */ - private int rangedAttackTime; - private double entityMoveSpeed; - private int field_75318_f; - private int field_96561_g; - /** The maximum time the AI has to wait before peforming another ranged attack. */ - private int maxRangedAttackTime; - private float field_96562_i; - private float field_82642_h; - private 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) - { - this.rangedAttackTime = -1; - - if (!(p_i1650_1_ instanceof EntityLivingBase)) - { - throw new IllegalArgumentException("ArrowAttackGoal requires Mob implements RangedAttackMob"); - } - else - { - this.rangedAttackEntityHost = p_i1650_1_; - this.entityHost = (EntityLiving)p_i1650_1_; - this.entityMoveSpeed = p_i1650_2_; - this.field_96561_g = p_i1650_4_; - this.maxRangedAttackTime = p_i1650_5_; - this.field_96562_i = p_i1650_6_; - this.field_82642_h = p_i1650_6_ * p_i1650_6_; - this.setMutexBits(3); - this.range = range; - } - } - - /** - * Returns whether the EntityAIBase should begin execution. - */ - public boolean shouldExecute() - { - EntityLivingBase entitylivingbase = this.entityHost.getAttackTarget(); - - if (entitylivingbase == null) - { - return false; - } - else if(this.rangedAttackEntityHost.shouldUseRangedAttack() && this.isInRange(entitylivingbase)) - { - this.attackTarget = entitylivingbase; - return true; - }else - { - return false; - } - } - - /** - * Returns whether an in-progress EntityAIBase should continue executing - */ - public boolean continueExecuting() - { - return this.shouldExecute() || !this.entityHost.getNavigator().noPath() && this.rangedAttackEntityHost.shouldUseRangedAttack(); - } - - public boolean isInRange(EntityLivingBase target) - { - double xf = target.posX; - double yf = target.posY; - double zf = target.posZ; - - double xi = this.entityHost.posX; - double yi = this.entityHost.posY; - double zi = this.entityHost.posZ; - return (xi-xf)*(xi-xf) + (yi-yf)*(yi-yf) + (zi-zf)*(zi-zf) >= range*range; - } - - /** - * Resets the task - */ - public void resetTask() - { - this.attackTarget = null; - this.field_75318_f = 0; - this.rangedAttackTime = -1; - } - - /** - * Updates the task - */ - public void updateTask() - { - double d0 = this.entityHost.getDistanceSq(this.attackTarget.posX, this.attackTarget.getBoundingBox().minY, this.attackTarget.posZ); - boolean flag = this.entityHost.getEntitySenses().canSee(this.attackTarget); - - if (flag) - { - ++this.field_75318_f; - } - else - { - this.field_75318_f = 0; - } - - if (d0 <= (double)this.field_82642_h && this.field_75318_f >= 20) - { - this.entityHost.getNavigator().clearPathEntity(); - } - else - { - this.entityHost.getNavigator().tryMoveToEntityLiving(this.attackTarget, this.entityMoveSpeed); - } - - this.entityHost.getLookHelper().setLookPositionWithEntity(this.attackTarget, 30.0F, 30.0F); - float f; - - if (--this.rangedAttackTime == 0) - { - if (d0 > (double)this.field_82642_h || !flag) - { - return; - } - - f = MathHelper.sqrt_double(d0) / this.field_96562_i; - float f1 = f; - - if (f < 0.1F) - { - f1 = 0.1F; - } - - if (f1 > 1.0F) - { - f1 = 1.0F; - } - - this.rangedAttackEntityHost.attackEntityWithRangedAttack(this.attackTarget, f1); - this.rangedAttackTime = MathHelper.floor_float(f * (float)(this.maxRangedAttackTime - this.field_96561_g) + (float)this.field_96561_g); - } - else if (this.rangedAttackTime < 0) - { - f = MathHelper.sqrt_double(d0) / this.field_96562_i; - this.rangedAttackTime = MathHelper.floor_float(f * (float)(this.maxRangedAttackTime - this.field_96561_g) + (float)this.field_96561_g); - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java deleted file mode 100644 index 303ab7a2..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java +++ /dev/null @@ -1,64 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.ai; - -import net.minecraft.entity.EntityCreature; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -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) - { - super(demon, callsForHelp); - this.entityCallsForHelp = callsForHelp; - } - - @Override - public void startExecuting() - { - BlockPos portalPosition = ((IHoardDemon)this.taskOwner).getPortalLocation(); - if(portalPosition == null) - { - super.startExecuting(); - return; - } - - TileEntity portal = this.taskOwner.worldObj.getTileEntity(portalPosition); - - if((this.taskOwner.getAITarget() instanceof IHoardDemon && portalPosition.equals(((IHoardDemon)this.taskOwner.getAITarget()).getPortalLocation()))) - { - return; - } - - this.taskOwner.setAttackTarget(this.taskOwner.getAITarget()); - - if (this.entityCallsForHelp) - { - - if(portal instanceof TEDemonPortal) - { - ((TEDemonPortal) portal).notifyDemons(taskOwner, this.taskOwner.getAITarget(), 25); - } - -// double d0 = this.getTargetDistance(); -// List list = this.taskOwner.worldObj.getEntitiesWithinAABB(this.taskOwner.getClass(), new AxisAlignedBB(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(); -// -// while (iterator.hasNext()) -// { -// EntityCreature entitycreature = (EntityCreature)iterator.next(); -// -// if (this.taskOwner != entitycreature && entitycreature.getAttackTarget() == null && !entitycreature.isOnSameTeam(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 deleted file mode 100644 index 958575d6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/IOccasionalRangedAttackMob.java +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 8d0274ad..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonHoardPacket.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard; - -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; -import net.minecraft.world.World; - -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 boolean canFitType(DemonType type); - - public abstract float getRelativeChance(DemonType type, int tier, boolean spawnGuardian); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketMinorGrunt.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketMinorGrunt.java deleted file mode 100644 index cfd0ade8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketMinorGrunt.java +++ /dev/null @@ -1,98 +0,0 @@ -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; -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 WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntIce; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntWind; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; - -public class DemonPacketMinorGrunt extends DemonHoardPacket -{ - @Override - public boolean canFitType(DemonType type) - { - return true; - } - - @Override - public float getRelativeChance(DemonType type, int tier, boolean spawnGuardian) - { - return 1.0f; - } - - @Override - public int summonDemons(TEDemonPortal teDemonPortal, World world, int x, int y, int z, DemonType type, int tier, boolean spawnGuardian) - { - EntityMinorDemonGrunt entity; - - { - switch(type) - { - case FIRE: - if(spawnGuardian) - { - entity = new EntityMinorDemonGruntGuardianFire(world); - }else - { - entity = new EntityMinorDemonGruntFire(world); - } - break; - case ICE: - if(spawnGuardian) - { - entity = new EntityMinorDemonGruntGuardianIce(world); - }else - { - entity = new EntityMinorDemonGruntIce(world); - } - break; - case EARTH: - if(spawnGuardian) - { - entity = new EntityMinorDemonGruntGuardianEarth(world); - }else - { - entity = new EntityMinorDemonGruntEarth(world); - } - break; - case WIND: - if(spawnGuardian) - { - entity = new EntityMinorDemonGruntGuardianWind(world); - }else - { - entity = new EntityMinorDemonGruntWind(world); - } - break; - case NORMAL: - default: - if(spawnGuardian) - { - entity = new EntityMinorDemonGruntGuardian(world); - }else - { - entity = new EntityMinorDemonGrunt(world); - } - break; - - } - } - - entity.setPosition(x, y, z); - - world.spawnEntityInWorld(entity); - - teDemonPortal.enthrallDemon(entity); - entity.setAggro(true); - entity.setDropCrystal(false); - - return spawnGuardian ? 3 : 1; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketRegistry.java deleted file mode 100644 index 2d30d788..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketRegistry.java +++ /dev/null @@ -1,81 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard; - -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; - -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; -import net.minecraft.world.World; - -public class DemonPacketRegistry -{ - public static Map packetMap = new HashMap(); - - public static boolean registerDemonPacket(String string, DemonHoardPacket packet) - { - if(!packetMap.containsValue(string) && packet != null) - { - packetMap.put(string, packet); - - return true; - } - - return false; - } - - public static String getDemonPacketName(DemonType type, int tier, boolean spawnGuardian) - { - float totalChance = 0; - - for(Entry entry : packetMap.entrySet()) - { - DemonHoardPacket packet = entry.getValue(); - - if(packet == null) - { - continue; - } - - totalChance += packet.getRelativeChance(type, tier, spawnGuardian); - } - - for(Entry entry : packetMap.entrySet()) - { - DemonHoardPacket packet = entry.getValue(); - - if(packet == null) - { - continue; - } - - float relativeChance = packet.getRelativeChance(type, tier, spawnGuardian); - - if(relativeChance >= totalChance) - { - return entry.getKey(); - }else - { - totalChance -= relativeChance; - } - } - - return ""; - } - - public static int spawnDemons(TEDemonPortal teDemonPortal, World world, int x, int y, int z, DemonType type, int tier, boolean spawnGuardian) - { - return spawnDemons(teDemonPortal, world, x, y, z, getDemonPacketName(type, tier, spawnGuardian), type, tier, 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) - { - return packet.summonDemons(teDemonPortal, world, x, y, z, type, tier, spawnGuardian); - } - - return 0; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonType.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonType.java deleted file mode 100644 index 75c5aed4..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonType.java +++ /dev/null @@ -1,10 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard; - -public enum DemonType -{ - NORMAL, - FIRE, - EARTH, - ICE, - WIND -} 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 deleted file mode 100644 index f257f01b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGrunt.java +++ /dev/null @@ -1,518 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.passive.EntityAnimal; -import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -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.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 boolean isAngry = true; - private BlockPos demonPortal; - - private static float maxTamedHealth = 200.0F; - private static float maxUntamedHealth = 200.0F; - - private boolean enthralled = false; - - public EntityMinorDemonGrunt(World par1World) - { - super(par1World, AlchemicalWizardry.entityMinorDemonGruntID); - this.setSize(0.7F, 1.8F); -// this.getNavigator().setAvoidsWater(true); - this.tasks.addTask(1, new EntityAISwimming(this)); - this.tasks.addTask(2, this.aiSit); - this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); - this.tasks.addTask(4, new EntityAIWander(this, 1.0D)); - this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); - this.tasks.addTask(6, new EntityAILookIdle(this)); - this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this)); - this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this)); - this.targetTasks.addTask(3, new EntityDemonAIHurtByTarget(this, true)); - this.targetTasks.addTask(4, new EntityAITargetAggroCloaking(this, EntityPlayer.class, 0, false, 0)); - this.setAggro(false); - this.setTamed(false); - - demonPortal = new BlockPos(0,0,0); - - if (par1World != null && !par1World.isRemote) - { - this.setCombatTask(); - } - - //this.isImmuneToFire = true; - } - - public boolean isTameable() - { - return false; - } - - @Override - protected void applyEntityAttributes() - { - super.applyEntityAttributes(); - //This line affects the speed of the monster - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D); - - if (this.isTamed()) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - - @Override - protected void dropFewItems(boolean par1, int par2) - { - if(!this.getDoesDropCrystal()) - { - ItemStack lifeShardStack = new ItemStack(ModItems.baseItems, 1, 28); - ItemStack soulShardStack = new ItemStack(ModItems.baseItems, 1, 29); - - int dropAmount = 0; - - for(int i=0; i<=par2; i++) - { - dropAmount += this.worldObj.rand.nextFloat() < 0.6f ? 1 : 0; - } - - ItemStack drop = this.worldObj.rand.nextBoolean() ? lifeShardStack : soulShardStack; - drop.stackSize = dropAmount; - - if(dropAmount > 0) - { - this.entityDropItem(drop, 0.0f); - } - }else - { - super.dropFewItems(par1, par2); - } - } - - @Override - public void setPortalLocation(BlockPos position) - { - this.demonPortal = position; - } - - @Override - public BlockPos getPortalLocation() - { - return this.demonPortal; - } - - /** - * Returns true if the newer Entity AI code should be run - */ - public boolean isAIEnabled() - { - return true; - } - - /** - * Sets the active target the Task system uses for tracking - */ - public void setAttackTarget(EntityLivingBase par1EntityLivingBase) - { - super.setAttackTarget(par1EntityLivingBase); - - if (par1EntityLivingBase == null) - { - this.setAngry(false); - } else if (!this.isTamed()) - { - this.setAngry(true); - } - } - - /** - * main AI tick function, replaces updateEntityActionState - */ -// @Override -// protected void updateAITick() -// { -// this.dataWatcher.updateObject(18, Float.valueOf(this.getHealth())); -// } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - @Override - public void writeEntityToNBT(NBTTagCompound tag) - { - super.writeEntityToNBT(tag); - tag.setBoolean("Angry", this.isAngry()); - - tag.setInteger("xCoord", this.demonPortal.getX()); - tag.setInteger("yCoord", this.demonPortal.getY()); - tag.setInteger("zCoord", this.demonPortal.getZ()); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - @Override - public void readEntityFromNBT(NBTTagCompound tag) - { - super.readEntityFromNBT(tag); - this.setAngry(tag.getBoolean("Angry")); - this.demonPortal = new BlockPos(tag.getInteger("xCoord"), tag.getInteger("yCoord"), tag.getInteger("zCoord")); - - this.setCombatTask(); - } - - /** - * Returns the sound this mob makes while it's alive. - */ - @Override - protected String getLivingSound() - { - //TODO change sounds - return "none"; - } - - /** - * Returns the sound this mob makes when it is hurt. - */ - @Override - protected String getHurtSound() - { - return "none"; - } - - /** - * Returns the sound this mob makes on death. - */ - @Override - protected String getDeathSound() - { - return "mob.wolf.death"; - } - - /** - * Returns the volume for the sounds this mob makes. - */ - @Override - protected float getSoundVolume() - { - return 0.4F; - } - - /** - * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons - * use this to react to sunlight and start to burn. - */ - @Override - public void onLivingUpdate() - { - super.onLivingUpdate(); - } - - /** - * Called to update the entity's position/logic. - */ - @Override - public void onUpdate() - { - if(!this.enthralled) - { - TileEntity tile = this.worldObj.getTileEntity(this.demonPortal); - if(tile instanceof TEDemonPortal) - { - ((TEDemonPortal) tile).enthrallDemon(this); - this.enthralled = true; - }else if(tile instanceof IMasterRitualStone) - { - IMasterRitualStone stone = (IMasterRitualStone)tile; - LocalRitualStorage stor = stone.getLocalStorage(); -// if(stor instanceof LocalStorageAlphaPact) -// { -// LocalStorageAlphaPact storage = (LocalStorageAlphaPact)stor; -// -// storage.thrallDemon(this); -// } - } - } - super.onUpdate(); - } - - @Override - public float getEyeHeight() - { - return this.height * 0.8F; - } - - /** - * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently - * use in wolves. - */ - @Override - public int getVerticalFaceSpeed() - { - return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); - } - - @Override - public void setTamed(boolean par1) - { - super.setTamed(par1); - - if (par1) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - - /** - * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. - */ - @Override - public boolean interact(EntityPlayer par1EntityPlayer) - { - ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); - - if (this.isTamed()) - { - if (itemstack != null) - { - if (itemstack.getItem() instanceof ItemFood) - { - ItemFood itemfood = (ItemFood) itemstack.getItem(); - - if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - this.heal((float) itemfood.getHealAmount(itemstack)); - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); - } - - return true; - } - } - } - - if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) - { - if (!this.worldObj.isRemote) - { - this.aiSit.setSitting(!this.isSitting()); - this.isJumping = false; -// this.setPathToEntity(null); -// this.setTarget(null); - this.setAttackTarget(null); - } - - this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); - } - } else if (this.isTameable() && itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - 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); - } - } - - return true; - } - - return super.interact(par1EntityPlayer); - } - - - public boolean isBreedingItem(ItemStack par1ItemStack) - { - return false; - } - - /** - * Determines whether this wolf is angry or not. - */ - public boolean isAngry() - { - return this.isAngry; - } - - /** - * Sets whether this wolf is angry or not. - */ - public void setAngry(boolean angry) - { - this.isAngry = angry; - } - - - /** - * Returns true if the mob is currently able to mate with the specified mob. - */ - @Override - public boolean canMateWith(EntityAnimal par1EntityAnimal) - { - return false; - } - - - /** - * Determines if an entity can be despawned, used on idle far away entities - */ - @Override - protected boolean canDespawn() - { - //return !this.isTamed() && this.ticksExisted > 2400; - return false; - } - - /** - * A call to determine if this entity should attack the other entity - */ - @Override - public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) - { - if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) - { - if (par1EntityLivingBase instanceof EntityDemon) - { - EntityDemon entitywolf = (EntityDemon) par1EntityLivingBase; - - if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) - { - return false; - } - } - - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); - } else - { - return false; - } - } - - @Override - public boolean attackEntityAsMob(Entity par1Entity) - { - int i = this.isTamed() ? 20 : 20; - - if(par1Entity instanceof IHoardDemon && ((IHoardDemon) par1Entity).isSamePortal(this)) - { - return false; - } - - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); - } - - /** - * Attack the specified entity using a ranged attack. - */ - @Override - public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) - { - if(par1EntityLivingBase instanceof IHoardDemon && ((IHoardDemon) par1EntityLivingBase).isSamePortal(this)) - { - return; - } - HolyProjectile hol = new HolyProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 15, 600); - this.worldObj.spawnEntityInWorld(hol); - } - - /** - * sets this entity's combat AI. - */ - public void setCombatTask() - { - this.tasks.removeTask(this.aiAttackOnCollide); - this.tasks.removeTask(this.aiArrowAttack); - this.tasks.addTask(4, this.aiArrowAttack); - this.tasks.addTask(5, this.aiAttackOnCollide); - } - - @Override - public boolean shouldUseRangedAttack() - { - return true; - } - - @Override - public boolean thrallDemon(BlockPos location) - { - this.setPortalLocation(location); - return true; - } - - @Override - public boolean isSamePortal(IHoardDemon demon) - { - BlockPos position = demon.getPortalLocation(); - TileEntity portal = worldObj.getTileEntity(this.demonPortal); - - return portal instanceof TEDemonPortal && portal == worldObj.getTileEntity(position); - } -} 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 deleted file mode 100644 index cf33c1f1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntEarth.java +++ /dev/null @@ -1,47 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.potion.Potion; -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); - } - - @Override - public boolean attackEntityAsMob(Entity par1Entity) - { - int i = this.isTamed() ? 20 : 20; - if(par1Entity instanceof IHoardDemon && ((IHoardDemon) par1Entity).isSamePortal(this)) - { - return false; - } - - if(par1Entity instanceof EntityLivingBase) - { - ((EntityLivingBase) par1Entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, 2)); - } - - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); - } - - @Override - public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) - { - if(par1EntityLivingBase instanceof IHoardDemon && ((IHoardDemon) par1EntityLivingBase).isSamePortal(this)) - { - return; - } - 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 deleted file mode 100644 index b7b58e5a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntFire.java +++ /dev/null @@ -1,43 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; - -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); - this.isImmuneToFire = true; - } - - @Override - public boolean attackEntityAsMob(Entity par1Entity) - { - int i = this.isTamed() ? 20 : 20; - if(par1Entity instanceof IHoardDemon && ((IHoardDemon) par1Entity).isSamePortal(this)) - { - return false; - } - - par1Entity.setFire(10); - - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); - } - - @Override - public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) - { - if(par1EntityLivingBase instanceof IHoardDemon && ((IHoardDemon) par1EntityLivingBase).isSamePortal(this)) - { - return; - } - FireProjectile hol = new FireProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 15, 600); - this.worldObj.spawnEntityInWorld(hol); - } -} 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 deleted file mode 100644 index ac38f3c5..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardian.java +++ /dev/null @@ -1,44 +0,0 @@ -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; - -public class EntityMinorDemonGruntGuardian extends EntityMinorDemonGrunt -{ - public EntityMinorDemonGruntGuardian(World par1World) - { - super(par1World); - this.setDemonID(AlchemicalWizardry.entityMinorDemonGruntGuardianID); - } - - @Override - public boolean attackEntityAsMob(Entity par1Entity) - { - int i = this.isTamed() ? 25 : 25; - - if(par1Entity instanceof IHoardDemon && ((IHoardDemon) par1Entity).isSamePortal(this)) - { - return false; - } - - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); - } - - /** - * Attack the specified entity using a ranged attack. - */ - @Override - public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) - { - if(par1EntityLivingBase instanceof IHoardDemon && ((IHoardDemon) par1EntityLivingBase).isSamePortal(this)) - { - return; - } - HolyProjectile hol = new HolyProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 20, 600); - this.worldObj.spawnEntityInWorld(hol); - } -} 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 deleted file mode 100644 index a055ebb1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianEarth.java +++ /dev/null @@ -1,51 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.potion.Potion; -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); - } - - @Override - public boolean attackEntityAsMob(Entity par1Entity) - { - int i = this.isTamed() ? 25 : 25; - - if(par1Entity instanceof IHoardDemon && ((IHoardDemon) par1Entity).isSamePortal(this)) - { - return false; - } - - if(par1Entity instanceof EntityLivingBase) - { - ((EntityLivingBase) par1Entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, 4)); - } - - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); - } - - /** - * Attack the specified entity using a ranged attack. - */ - @Override - public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) - { - if(par1EntityLivingBase instanceof IHoardDemon && ((IHoardDemon) par1EntityLivingBase).isSamePortal(this)) - { - return; - } - 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 deleted file mode 100644 index 8e502f5f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianFire.java +++ /dev/null @@ -1,47 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; - -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); - this.isImmuneToFire = true; - } - - @Override - public boolean attackEntityAsMob(Entity par1Entity) - { - int i = this.isTamed() ? 25 : 25; - - if(par1Entity instanceof IHoardDemon && ((IHoardDemon) par1Entity).isSamePortal(this)) - { - return false; - } - - par1Entity.setFire(15); - - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); - } - - /** - * Attack the specified entity using a ranged attack. - */ - @Override - public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) - { - if(par1EntityLivingBase instanceof IHoardDemon && ((IHoardDemon) par1EntityLivingBase).isSamePortal(this)) - { - return; - } - FireProjectile hol = new FireProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 20, 600); - this.worldObj.spawnEntityInWorld(hol); - } -} 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 deleted file mode 100644 index ea35c250..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianIce.java +++ /dev/null @@ -1,44 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; - -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); - } - - @Override - public boolean attackEntityAsMob(Entity par1Entity) - { - int i = this.isTamed() ? 25 : 25; - - if(par1Entity instanceof IHoardDemon && ((IHoardDemon) par1Entity).isSamePortal(this)) - { - return false; - } - - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); - } - - /** - * Attack the specified entity using a ranged attack. - */ - @Override - public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) - { - if(par1EntityLivingBase instanceof IHoardDemon && ((IHoardDemon) par1EntityLivingBase).isSamePortal(this)) - { - return; - } - IceProjectile hol = new IceProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 20, 600); - this.worldObj.spawnEntityInWorld(hol); - } -} 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 deleted file mode 100644 index 86cd67d3..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntGuardianWind.java +++ /dev/null @@ -1,61 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; - -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); - } - - @Override - public boolean attackEntityAsMob(Entity par1Entity) - { - int i = this.isTamed() ? 25 : 25; - - if(par1Entity instanceof IHoardDemon && ((IHoardDemon) par1Entity).isSamePortal(this)) - { - return false; - } - - if (par1Entity instanceof EntityPlayer) - { - SpellHelper.setPlayerSpeedFromServer((EntityPlayer) par1Entity, par1Entity.motionX, par1Entity.motionY + 4, par1Entity.motionZ); - } else if (par1Entity instanceof EntityLivingBase) - { - ((EntityLivingBase) par1Entity).motionY += 4.0D; - } - - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); - } - - @Override - public void onLivingUpdate() - { - super.onLivingUpdate(); - this.fallDistance = 0; - } - - /** - * Attack the specified entity using a ranged attack. - */ - @Override - public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) - { - if(par1EntityLivingBase instanceof IHoardDemon && ((IHoardDemon) par1EntityLivingBase).isSamePortal(this)) - { - return; - } - WindGustProjectile hol = new WindGustProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 20, 600); - this.worldObj.spawnEntityInWorld(hol); - } -} 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 deleted file mode 100644 index cff401ed..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntIce.java +++ /dev/null @@ -1,40 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; - -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); - } - - @Override - public boolean attackEntityAsMob(Entity par1Entity) - { - int i = this.isTamed() ? 20 : 20; - if(par1Entity instanceof IHoardDemon && ((IHoardDemon) par1Entity).isSamePortal(this)) - { - return false; - } - - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); - } - - @Override - public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) - { - if(par1EntityLivingBase instanceof IHoardDemon && ((IHoardDemon) par1EntityLivingBase).isSamePortal(this)) - { - return; - } - IceProjectile hol = new IceProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 15, 600); - this.worldObj.spawnEntityInWorld(hol); - } -} 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 deleted file mode 100644 index 488ae144..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGruntWind.java +++ /dev/null @@ -1,57 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; - -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); - } - - @Override - public boolean attackEntityAsMob(Entity par1Entity) - { - int i = this.isTamed() ? 20 : 20; - if(par1Entity instanceof IHoardDemon && ((IHoardDemon) par1Entity).isSamePortal(this)) - { - return false; - } - - if (par1Entity instanceof EntityPlayer) - { - SpellHelper.setPlayerSpeedFromServer((EntityPlayer) par1Entity, par1Entity.motionX, par1Entity.motionY + 3, par1Entity.motionZ); - } else if (par1Entity instanceof EntityLivingBase) - { - ((EntityLivingBase) par1Entity).motionY += 3.0D; - } - - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); - } - - @Override - public void onLivingUpdate() - { - super.onLivingUpdate(); - this.fallDistance = 0; - } - - @Override - public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) - { - if(par1EntityLivingBase instanceof IHoardDemon && ((IHoardDemon) par1EntityLivingBase).isSamePortal(this)) - { - return; - } - WindGustProjectile hol = new WindGustProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 15, 600); - this.worldObj.spawnEntityInWorld(hol); - } -} 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 deleted file mode 100644 index aee48836..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/IHoardDemon.java +++ /dev/null @@ -1,14 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; - -import net.minecraft.util.BlockPos; - -public interface IHoardDemon -{ - void setPortalLocation(BlockPos position); - - BlockPos getPortalLocation(); - - boolean thrallDemon(BlockPos location); - - boolean isSamePortal(IHoardDemon demon); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java deleted file mode 100644 index b5e4d0d1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java +++ /dev/null @@ -1,39 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.loot; - -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}; - for(String str : tier1Strings) - { - List contents = ChestGenHooks.getItems(str, new Random()); - if(contents != null) - { - for(WeightedRandomChestContent content : contents) - { - list1.add(content); - } - } - } - - list1.add(new WeightedRandomChestContent(ModItems.baseItems, 28, 1, 2, 5)); - list1.add(new WeightedRandomChestContent(ModItems.baseItems, 29, 1, 2, 5)); - } - - public static void populateChest(IInventory tile, int tier) - { - WeightedRandomChestContent.generateChestContents(new Random(), list1, tile, tile.getSizeInventory() / 3); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/BlockDemonChest.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/BlockDemonChest.java deleted file mode 100644 index f880b4e1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/BlockDemonChest.java +++ /dev/null @@ -1,41 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.tileEntity; - -import net.minecraft.block.BlockChest; -import net.minecraft.block.state.IBlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -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).setUnlocalizedName("demonChest"); - this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); - } - - @Override - public TileEntity createNewTileEntity(World var1, int var2) - { - return new TEDemonChest(); - } - - @Override - public void breakBlock(World world, BlockPos pos, IBlockState state) - { - TileEntity tile = world.getTileEntity(pos); - if(tile instanceof TEDemonChest) - { - ((TEDemonChest) tile).notifyPortalOfInteraction(); - } - super.breakBlock(world, pos, state); - } - - @Override - public boolean canPlaceBlockAt(World world, BlockPos pos) - { - return true; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/IBlockPortalNode.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/IBlockPortalNode.java deleted file mode 100644 index 8b1595dc..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/IBlockPortalNode.java +++ /dev/null @@ -1,6 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.tileEntity; - -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 deleted file mode 100644 index 09ce6e85..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/IRoadWard.java +++ /dev/null @@ -1,6 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.tileEntity; - -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 deleted file mode 100644 index 2771254d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/ITilePortalNode.java +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index 528d6142..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonChest.java +++ /dev/null @@ -1,77 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage.tileEntity; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityChest; -import net.minecraft.util.BlockPos; - -public class TEDemonChest extends TileEntityChest implements ITilePortalNode -{ - public BlockPos portalLocation = BlockPos.ORIGIN; - - @Override - public String getName() - { - return "Demon's Chest"; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - super.readFromNBT(tag); - NBTTagCompound portalTag = tag.getCompoundTag("portalLocation"); - portalLocation = new BlockPos(portalTag.getInteger("xCoord"), portalTag.getInteger("yCoord"), portalTag.getInteger("zCoord")); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - super.writeToNBT(tag); - NBTTagCompound portalTag = new NBTTagCompound(); - portalTag.setInteger("xCoord", portalLocation.getX()); - portalTag.setInteger("yCoord", portalLocation.getY()); - portalTag.setInteger("zCoord", portalLocation.getZ()); - tag.setTag("portalLocation", portalTag); - } - - @Override - public void openInventory(EntityPlayer player) - { - super.openInventory(player); - this.notifyPortalOfInteraction(); - } - - @Override - public void checkForAdjacentChests() {} - - @Override - public void setPortalLocation(TEDemonPortal teDemonPortal) - { - if(teDemonPortal != null) - { - portalLocation = teDemonPortal.getPos(); - } - } - - public TEDemonPortal getDemonPortal() - { - TileEntity tile = worldObj.getTileEntity(portalLocation); - if(tile instanceof TEDemonPortal) - { - return (TEDemonPortal)tile; - } - return null; - } - - public void notifyPortalOfInteraction() - { - TEDemonPortal portal = this.getDemonPortal(); - if(portal == null) - { - return; - } - - portal.notifyDemons(pos.getX(), pos.getY(), pos.getZ(), 50); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java deleted file mode 100644 index d5a1fee6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java +++ /dev/null @@ -1,1567 +0,0 @@ -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.block.state.IBlockState; -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.server.gui.IUpdatePlayerListBox; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraftforge.common.util.Constants; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; -import WayofTime.alchemicalWizardry.common.demonVillage.BuildingSchematic; -import WayofTime.alchemicalWizardry.common.demonVillage.DemonBuilding; -import WayofTime.alchemicalWizardry.common.demonVillage.DemonCrosspath; -import WayofTime.alchemicalWizardry.common.demonVillage.DemonVillagePath; -import WayofTime.alchemicalWizardry.common.demonVillage.DemonVillagePath.Int3AndBool; -import WayofTime.alchemicalWizardry.common.demonVillage.GridSpace; -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; - -public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox -{ - public DemonType type = DemonType.FIRE; - - public static boolean printDebug = false; - - public static int limit = 100; - - public static int demonLimit = 100; - - public static int buildingGridDelay = 25; - public static int roadGridDelay = 10; - public static int demonHoardDelay = 40; - public static float demonRoadChance = 0.3f; - public static float demonHouseChance = 0.6f; - public static float demonPortalChance = 0.5f; - public static float demonHoardChance = 0.8f; - public static float portalTickRate = 1f; - - public static int[] tierCostList = new int[]{1500}; - - public Set hoardList = new HashSet(); - - public static List buildingList = new ArrayList(); - public Random rand = new Random(); - private GridSpace[][] area; - - private int negXRadius; //These variables indicate how much the grid has expanded from the 1x1 - private int posXRadius; //matrix in each direction - private int negZRadius; - private int posZRadius; - - private boolean isInitialized; - - public int houseCooldown; - public int roadCooldown; - public int tier; //Tier of the demon portal - Should select buildings 2 below to this - public int demonHouseCooldown; - public int demonHoardCooldown; - - public float pointPool; - - public String nextDemonPortalName = ""; - public EnumFacing nextDemonPortalDirection = EnumFacing.DOWN; - - public int buildingStage = -1; - - public int delayBeforeParty = 0; - - public int lockdownTimer; - - public TEDemonPortal() - { - super(); - - negXRadius = posXRadius = negZRadius = posZRadius = 1; - - area = new GridSpace[negXRadius + posXRadius + 1][negZRadius + posZRadius + 1]; - for (int xIndex = -negXRadius; xIndex <= posXRadius; xIndex++) - { - for (int zIndex = -negZRadius; zIndex <= posZRadius; zIndex++) - { - if (Math.abs(xIndex) == 1 || Math.abs(zIndex) == 1) - { - this.setGridSpace(xIndex, zIndex, new GridSpace(GridSpace.ROAD, 4)); - } else - { - this.setGridSpace(xIndex, zIndex, new GridSpace()); - } - } - } - - isInitialized = false; - - this.setGridSpace(0, 0, new GridSpace(GridSpace.MAIN_PORTAL, pos.getY())); - - this.houseCooldown = 0; - this.roadCooldown = 0; - this.tier = 0; - this.lockdownTimer = 0; - } - - public boolean isLockedDown() - { - return this.lockdownTimer > 0; - } - - public float getRoadChance() - { - if(isLockedDown()) - { - return 0; - } - return demonRoadChance; - } - - public float getHouseChance() - { - if(isLockedDown()) - { - return 0; - } - return demonHouseChance; - } - - public float getDemonPortalChance() - { - if(isLockedDown()) - { - return 0; - } - return demonPortalChance; - } - - public float getDemonHoardChance() - { - return demonHoardChance; - } - - public boolean decreaseRandomCooldown(int amount) - { - float totalChance = 0; - - Map map = new HashMap(); - map.put("roadChance", this.getRoadChance()); - map.put("houseChance", this.getHouseChance()); - map.put("demonPortalChance", this.getDemonPortalChance()); - map.put("demonHoardChance", this.getDemonHoardChance()); - - String action = ""; - - for(Entry entry : map.entrySet()) - { - totalChance += entry.getValue(); - } - - float pointer = rand.nextFloat() * totalChance; - - for(Entry entry : map.entrySet()) - { - float value = entry.getValue(); - if(pointer <= value) - { - action = entry.getKey(); - break; - }else - { - pointer -= value; - } - } - - if(action.equals("roadChance")) - { - if(roadCooldown > 0) - { - roadCooldown -= amount; - }else - { - return false; - } - }else if(action.equals("houseChance")) - { - if(houseCooldown > 0) - { - houseCooldown -= amount; - }else - { - return false; - } - }else if(action.equals("demonPortalChance")) - { - demonHouseCooldown += amount; - }else if(action.equals("demonHoardChance")) - { - if(demonHoardCooldown > 0) - { - demonHoardCooldown -= amount; - }else - { - return false; - } - } - - return true; - } - - 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 && !((EntityCreature) thrallDemon).isOnSameTeam(target)) - { - double xf = demon.posX; - double yf = demon.posY; - double zf = demon.posZ; - - double xi = ((EntityCreature) thrallDemon).posX; - double yi = ((EntityCreature) thrallDemon).posY; - double zi = ((EntityCreature) thrallDemon).posZ; - - if((xi-xf)*(xi-xf) + (yi-yf)*(yi-yf) + (zi-zf)*(zi-zf) <= radius*radius) - { - ((EntityCreature) thrallDemon).setAttackTarget(target); - }else - { - ((EntityCreature) thrallDemon).getNavigator().tryMoveToEntityLiving(target, 2); - } - } - } - } - } - - public void notifyDemons(int xf, int yf, int zf, double radius) - { - for(IHoardDemon thrallDemon : this.hoardList) - { - if(thrallDemon instanceof EntityCreature) - { - if(((EntityCreature) thrallDemon).getAttackTarget() == null) - { - double xi = ((EntityCreature) thrallDemon).posX; - double yi = ((EntityCreature) thrallDemon).posY; - double zi = ((EntityCreature) thrallDemon).posZ; - - if((xi-xf)*(xi-xf) + (yi-yf)*(yi-yf) + (zi-zf)*(zi-zf) <= radius*radius) - { - ((EntityCreature) thrallDemon).getNavigator().tryMoveToXYZ(xf, yf, zf, 1); - } - } - } - } - } - - public void enthrallDemon(EntityLivingBase demon) - { - if(demon instanceof IHoardDemon) - { - boolean enthrall = ((IHoardDemon) demon).thrallDemon(pos); - if(enthrall) - { - this.hoardList.add((IHoardDemon)demon); - } - } - } - - public void initialize() - { - if (isInitialized) - { - return; - } - - DemonType[] types = DemonType.values(); - this.type = types[rand.nextInt(types.length)]; - - for (int xIndex = -negXRadius; xIndex <= posXRadius; xIndex++) - { - for (int zIndex = -negZRadius; zIndex <= posZRadius; zIndex++) - { - if (Math.abs(xIndex) == 1 || Math.abs(zIndex) == 1) - { - this.setGridSpace(xIndex, zIndex, new GridSpace(GridSpace.ROAD, pos.getY())); - } else if (xIndex == 0 && zIndex == 0) - { - this.setGridSpace(0, 0, new GridSpace(GridSpace.MAIN_PORTAL, pos.getY())); - } else - { - this.setGridSpace(xIndex, zIndex, new GridSpace()); - } - } - } - - this.houseCooldown = TEDemonPortal.buildingGridDelay; - this.roadCooldown = TEDemonPortal.roadGridDelay; - this.demonHoardCooldown = TEDemonPortal.demonHoardDelay; - - this.createRandomRoad(); - - if (this.createRandomBuilding(DemonBuilding.BUILDING_PORTAL, tier) >= 1) - { - System.out.println("Portal building successfully found!"); - this.buildingStage = 0; - } - - isInitialized = true; - } - - public void createParty() - { - worldObj.createExplosion(null, pos.getX() + rand.nextInt(10) - rand.nextInt(10), pos.getY(), pos.getZ() + rand.nextInt(10) - rand.nextInt(10), 5*rand.nextFloat(), false); - } - - public void start() - { - this.delayBeforeParty = 200; - } - - /** - * 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 update() - { - if(worldObj.isRemote) - { - return; - } - - if(this.delayBeforeParty > 0) - { - this.delayBeforeParty--; - - if(rand.nextInt(20) == 0) - { - this.createParty(); - } - - if(delayBeforeParty <= 0) - { - worldObj.createExplosion(null, pos.getX(), pos.getY(), pos.getZ(), 15, false); - this.initialize(); - } - - return; - } - - if (!isInitialized) - { - return; - } - - lockdownTimer = Math.max(0, this.lockdownTimer - 1); - this.incrementPoints(); - this.assignPoints(); - - if(printDebug) - AlchemicalWizardry.logger.info("Roads: " + roadCooldown + " Buildings: " + houseCooldown + " Lockdown: " + lockdownTimer); - - if(buildingStage >= 0 && buildingStage <=2) - { - if(printDebug) - AlchemicalWizardry.logger.info("BuildingStage = " + buildingStage); - if(printDebug) - AlchemicalWizardry.logger.info("Tier = " + this.tier); - this.createPortalBuilding(buildingStage, nextDemonPortalName, tier); - buildingStage++; - return; - } - - if(this.roadCooldown <= 0) - { - int roadsMade = this.createRandomRoad(); - if (roadsMade > 0) - { - this.roadCooldown = TEDemonPortal.roadGridDelay * roadsMade; - //this.demonHouseCooldown += this.roadCooldown; - } - } - - if(this.houseCooldown <= 0) - { - int gridsUsed = this.createRandomBuilding(DemonBuilding.BUILDING_HOUSE, tier); - if (gridsUsed > 0) - { - this.houseCooldown = TEDemonPortal.buildingGridDelay * gridsUsed; - //this.demonHouseCooldown += this.houseCooldown; - } - } - - if(this.demonHoardCooldown <= 0) //TODO - { - if(this.hoardList.size() <= demonLimit) - { - int complexityCost = this.createRandomDemonHoard(this, tier, this.type, this.isLockedDown()); - if(complexityCost > 0) - { - this.demonHoardCooldown += TEDemonPortal.demonHoardDelay * complexityCost; - } - } - } - - if(this.tier < tierCostList.length && this.demonHouseCooldown > tierCostList[this.tier]) - { - this.tier++; - - if (this.createRandomBuilding(DemonBuilding.BUILDING_PORTAL, tier) >= 1) - { - this.buildingStage = 0; - } - } - - -// this.houseCooldown = Math.max(0, this.houseCooldown - 1); //Current dummy implementation of the increasing costs -// this.roadCooldown = Math.max(0, this.roadCooldown - 1); - } - - public void assignPoints() - { - if((int)this.pointPool > 0) - { - if(this.decreaseRandomCooldown((int)this.pointPool)) - { - this.pointPool -= (int)this.pointPool; - } - } - } - - public void incrementPoints() - { - this.pointPool += portalTickRate; - } - - @Override - public void readFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readFromNBT(par1NBTTagCompound); - this.negXRadius = par1NBTTagCompound.getInteger("negXRadius"); - this.negZRadius = par1NBTTagCompound.getInteger("negZRadius"); - this.posXRadius = par1NBTTagCompound.getInteger("posXRadius"); - this.posZRadius = par1NBTTagCompound.getInteger("posZRadius"); - this.houseCooldown = par1NBTTagCompound.getInteger("houseCooldown"); - this.roadCooldown = par1NBTTagCompound.getInteger("roadCooldown"); - this.demonHoardCooldown = par1NBTTagCompound.getInteger("demonHoardCooldown"); - - area = new GridSpace[negXRadius + posXRadius + 1][negZRadius + posZRadius + 1]; - - NBTTagList tagList = par1NBTTagCompound.getTagList("Grid", Constants.NBT.TAG_COMPOUND); - - for (int i = 0; i < tagList.tagCount(); i++) - { - int length = (negZRadius + posZRadius + 1); - - int x = i / length; - int z = i % length; - - NBTTagCompound tag = tagList.getCompoundTagAt(i); - GridSpace space = GridSpace.getGridFromTag(tag); - - area[x][z] = space; - } - - this.isInitialized = par1NBTTagCompound.getBoolean("init"); - - this.tier = par1NBTTagCompound.getInteger("tier"); - this.demonHouseCooldown = par1NBTTagCompound.getInteger("demonHouseCooldown"); - - this.nextDemonPortalName = par1NBTTagCompound.getString("nextDemonPortalName"); - this.buildingStage = par1NBTTagCompound.getInteger("buildingStage"); - this.nextDemonPortalDirection = EnumFacing.getFront(par1NBTTagCompound.getInteger("nextDemonPortalDirection")); - - this.pointPool = par1NBTTagCompound.getFloat("pointPool"); - this.lockdownTimer = par1NBTTagCompound.getInteger("lockdownTimer"); - this.delayBeforeParty = par1NBTTagCompound.getInteger("delayBeforeParty"); - this.type = DemonType.valueOf(par1NBTTagCompound.getString("demonType")); - } - - @Override - public void writeToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeToNBT(par1NBTTagCompound); - par1NBTTagCompound.setInteger("negXRadius", negXRadius); - par1NBTTagCompound.setInteger("negZRadius", negZRadius); - par1NBTTagCompound.setInteger("posXRadius", posXRadius); - par1NBTTagCompound.setInteger("posZRadius", posZRadius); - par1NBTTagCompound.setInteger("houseCooldown", houseCooldown); - par1NBTTagCompound.setInteger("roadCooldown", roadCooldown); - par1NBTTagCompound.setInteger("demonHoardCooldown", demonHoardCooldown); - - NBTTagList gridList = new NBTTagList(); - - for (int i = 0; i <= negXRadius + posXRadius; i++) - { - for (int j = 0; j <= negZRadius + posZRadius; j++) - { - GridSpace space = area[i][j]; - NBTTagCompound nextTag; - - if (space == null) - { - nextTag = new GridSpace().getTag(); - } else - { - nextTag = space.getTag(); - } - - gridList.appendTag(nextTag); - } - } - - par1NBTTagCompound.setTag("Grid", gridList); - - par1NBTTagCompound.setBoolean("init", this.isInitialized); - par1NBTTagCompound.setInteger("tier", this.tier); - par1NBTTagCompound.setInteger("demonHouseCooldown", this.demonHouseCooldown); - - par1NBTTagCompound.setString("nextDemonPortalName", nextDemonPortalName); - par1NBTTagCompound.setInteger("buildingStage", buildingStage); - - par1NBTTagCompound.setInteger("nextDemonPortalDirection", this.nextDemonPortalDirection.ordinal()); - par1NBTTagCompound.setFloat("pointPool", pointPool); - par1NBTTagCompound.setInteger("lockdownTimer", this.lockdownTimer); - par1NBTTagCompound.setInteger("delayBeforeParty", delayBeforeParty); - par1NBTTagCompound.setString("demonType", this.type.toString()); - } - - public int createRandomDemonHoard(TEDemonPortal teDemonPortal, int tier, DemonType type, boolean spawnGuardian) - { - int next = rand.nextInt(4); - EnumFacing dir; - - switch (next) - { - case 0: - dir = EnumFacing.NORTH; - break; - case 1: - dir = EnumFacing.SOUTH; - break; - case 2: - dir = EnumFacing.EAST; - break; - case 3: - dir = EnumFacing.WEST; - break; - default: - dir = EnumFacing.NORTH; - } - - Int3 road = findRoadSpaceFromDirection(dir, (rand.nextInt(negXRadius + negZRadius + posXRadius + posZRadius)) + 1); - if(road == null) - { - return 0; - } - - if(TEDemonPortal.printDebug) - System.out.println("Spawning Demons"); - - return DemonPacketRegistry.spawnDemons(teDemonPortal, worldObj, pos.getX() + road.xCoord * 5, road.yCoord + 1, pos.getZ() + road.zCoord * 5, type, tier, spawnGuardian); - } - - public int createRandomRoad() //Return the number of road spaces - { - int next = rand.nextInt(4); - EnumFacing dir; - - switch (next) - { - case 0: - dir = EnumFacing.NORTH; - break; - case 1: - dir = EnumFacing.SOUTH; - break; - case 2: - dir = EnumFacing.EAST; - break; - case 3: - dir = EnumFacing.WEST; - break; - default: - dir = EnumFacing.NORTH; - } - - Int3 road = findRoadSpaceFromDirection(dir, (rand.nextInt(negXRadius + negZRadius + posXRadius + posZRadius)) + 1); - - int x = road.xCoord; - int yLevel = road.yCoord; - int z = road.zCoord; - - if(printDebug) - AlchemicalWizardry.logger.info("X: " + x + " Z: " + z + " Direction: " + dir.toString()); - - List directions = this.findValidExtentionDirection(x, z); - - if (directions.size() <= 0) - { - return 0; - } - - int maxDistance = 5; - - int distance = 0; - EnumFacing dominantDirection = null; - - for (EnumFacing direction : directions) - { - int amt = this.getLength(direction, maxDistance, x, z); - if (amt > distance) - { - distance = amt; - dominantDirection = direction; - } else if (amt == distance && rand.nextBoolean()) - { - dominantDirection = direction; - } - } - - if (dominantDirection == null) - { - return 0; - } - if(printDebug) - AlchemicalWizardry.logger.info("I got here!"); - if(printDebug) - AlchemicalWizardry.logger.info("Distance: " + distance + " Direction: " + dominantDirection.toString() + " yLevel: " + yLevel); - - this.createGriddedRoad(x, yLevel, z, dominantDirection, distance + 1, true); - - return distance; - } - - public List findValidExtentionDirection(int x, int z) - { - List directions = new LinkedList(); - - if (this.getGridSpace(x, z) == null || !this.getGridSpace(x, z).isRoadSegment()) - { - return directions; - } - - GridSpace nextGrid = this.getGridSpace(x + 1, z); - if (nextGrid.isEmpty()) - { - directions.add(EnumFacing.EAST); - } - - nextGrid = this.getGridSpace(x - 1, z); - if (nextGrid.isEmpty()) - { - directions.add(EnumFacing.WEST); - } - - nextGrid = this.getGridSpace(x, z + 1); - if (nextGrid.isEmpty()) - { - directions.add(EnumFacing.SOUTH); - } - - nextGrid = this.getGridSpace(x, z - 1); - if (nextGrid.isEmpty()) - { - directions.add(EnumFacing.NORTH); - } - - return directions; - } - - public int getLength(EnumFacing 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.getFrontOffsetX(), z + i * dir.getFrontOffsetZ()); - if (space.isEmpty()) - { - for (int k = 1; k <= this.getRoadSpacer(); k++) - { - GridSpace space1 = this.getGridSpace(x + i * dir.getFrontOffsetX() + dir.getFrontOffsetZ() * k, z + i * dir.getFrontOffsetZ() + dir.getFrontOffsetX() * k); - GridSpace space2 = this.getGridSpace(x + i * dir.getFrontOffsetX() - dir.getFrontOffsetZ() * k, z + i * dir.getFrontOffsetZ() - dir.getFrontOffsetX() * k); - - if (space1.isRoadSegment() || space2.isRoadSegment()) - { - return i - 1; - } - } - - continue; - } - if (space.isRoadSegment()) - { - return i; - } else - { - return i - 1; - } - } - return maxLength; - } - - public Int3 findRoadSpaceFromDirection(EnumFacing dir, int amount) //TODO - { - int index = 0; - if (dir == EnumFacing.NORTH) - { - if(printDebug) - System.out.print("NORTH!"); - for (int i = Math.max(0, -limit + negZRadius); i <= negZRadius + Math.min(posZRadius, limit); i++) - { - for (int j = Math.max(0, -limit + negXRadius); j <= negXRadius + Math.min(posXRadius, limit); j++) - { - GridSpace space = area[j][i]; - if (space.isRoadSegment()) - { - index++; - if (index >= amount) - { - return new Int3(j - negXRadius, space.getYLevel(), i - negZRadius); - } - } - } - } - } else if (dir == EnumFacing.SOUTH) - { - for (int i = negZRadius + Math.min(posZRadius, limit); i >= Math.max(0, -limit + negZRadius); i--) - { - for (int j = Math.max(0, -limit + negXRadius); j <= negXRadius + Math.min(posXRadius, limit); j++) - { - GridSpace space = area[j][i]; - if (space.isRoadSegment()) - { - index++; - if (index >= amount) - { - return new Int3(j - negXRadius, space.getYLevel(), i - negZRadius); - } - } - } - } - } else if (dir == EnumFacing.EAST) - { - for (int i = negXRadius + Math.min(posXRadius, limit); i >= Math.max(0, -limit + negXRadius); i--) - { - for (int j = Math.max(0, -limit + negZRadius); j <= negZRadius + Math.min(posZRadius, limit); j++) - { - GridSpace space = area[i][j]; - if (space.isRoadSegment()) - { - index++; - if (index >= amount) - { - return new Int3(i - negXRadius, space.getYLevel(), j - negZRadius); - } - } - } - } - } else if (dir == EnumFacing.WEST) - { - for (int i = Math.max(0, -limit + negXRadius); i <= negXRadius + Math.min(posXRadius, limit); i++) - { - for (int j = Math.max(0, -limit + negZRadius); j <= negZRadius + Math.min(posZRadius, limit); j++) - { - GridSpace space = area[i][j]; - if (space.isRoadSegment()) - { - index++; - if (index >= amount) - { - return new Int3(i - negXRadius, space.getYLevel(), j - negZRadius); - } - } - } - } - } - - return new Int3(0, 0, 0); - } - - public Int3 findEmptySpaceNearRoad(EnumFacing dir, int amount, int closeness) - { - int index = 0; - if (dir == EnumFacing.NORTH) - { - if(printDebug) - System.out.print("NORTH!"); - for (int i = 0; i <= negZRadius + posZRadius; i++) - { - for (int j = 0; j <= negXRadius + posXRadius; j++) - { - GridSpace space = area[j][i]; - if (space.isEmpty()) - { - int yLevel = this.findNearestRoadYLevel(j - negXRadius, i - negZRadius, closeness); - if (yLevel == -1) - { - continue; - } - index++; - if (index >= amount) - { - return new Int3(j - negXRadius, yLevel, i - negZRadius); - } - } - } - } - } else if (dir == EnumFacing.SOUTH) - { - for (int i = negZRadius + posZRadius; i >= 0; i--) - { - for (int j = 0; j <= negXRadius + posXRadius; j++) - { - GridSpace space = area[j][i]; - int yLevel = this.findNearestRoadYLevel(j - negXRadius, i - negZRadius, closeness); - if (yLevel == -1) - { - continue; - } - if (space.isEmpty()) - { - index++; - if (index >= amount) - { - return new Int3(j - negXRadius, yLevel, i - negZRadius); - } - } - } - } - } else if (dir == EnumFacing.EAST) - { - for (int i = negXRadius + posXRadius; i >= 0; i--) - { - for (int j = 0; j <= negZRadius + posZRadius; j++) - { - GridSpace space = area[i][j]; - int yLevel = this.findNearestRoadYLevel(i - negXRadius, j - negZRadius, closeness); - if (yLevel == -1) - { - continue; - } - if (space.isEmpty()) - { - index++; - if (index >= amount) - { - return new Int3(i - negXRadius, yLevel, j - negZRadius); - } - } - } - } - } else if (dir == EnumFacing.WEST) - { - for (int i = 0; i <= negXRadius + posXRadius; i++) - { - for (int j = 0; j <= negZRadius + posZRadius; j++) - { - GridSpace space = area[i][j]; - int yLevel = this.findNearestRoadYLevel(i - negXRadius, j - negZRadius, closeness); - if (yLevel == -1) - { - continue; - } - if (space.isEmpty()) - { - index++; - if (index >= amount) - { - return new Int3(i - negXRadius, yLevel, j - negZRadius); - } - } - } - } - } - - return new Int3(0, 0, 0); - } - - public Int3 findEmptySpaceFromDirection(EnumFacing dir, int amount) - { - int index = 0; - if (dir == EnumFacing.NORTH) - { - if(printDebug) - System.out.print("NORTH!"); - for (int i = 0; i <= negZRadius + posZRadius; i++) - { - for (int j = 0; j <= negXRadius + posXRadius; j++) - { - GridSpace space = area[j][i]; - if (space.isEmpty()) - { - index++; - if (index >= amount) - { - return new Int3(j - negXRadius, space.getYLevel(), i - negZRadius); - } - } - } - } - } else if (dir == EnumFacing.SOUTH) - { - for (int i = negZRadius + posZRadius; i >= 0; i--) - { - for (int j = 0; j <= negXRadius + posXRadius; j++) - { - GridSpace space = area[j][i]; - if (space.isEmpty()) - { - index++; - if (index >= amount) - { - return new Int3(j - negXRadius, space.getYLevel(), i - negZRadius); - } - } - } - } - } else if (dir == EnumFacing.EAST) - { - for (int i = negXRadius + posXRadius; i >= 0; i--) - { - for (int j = 0; j <= negZRadius + posZRadius; j++) - { - GridSpace space = area[i][j]; - if (space.isEmpty()) - { - index++; - if (index >= amount) - { - return new Int3(i - negXRadius, space.getYLevel(), j - negZRadius); - } - } - } - } - } else if (dir == EnumFacing.WEST) - { - for (int i = 0; i <= negXRadius + posXRadius; i++) - { - for (int j = 0; j <= negZRadius + posZRadius; j++) - { - GridSpace space = area[i][j]; - if (space.isEmpty()) - { - index++; - if (index >= amount) - { - return new Int3(i - negXRadius, space.getYLevel(), j - negZRadius); - } - } - } - } - } - - return new Int3(0, 0, 0); - } - - public int createGriddedRoad(int gridXi, int yi, int gridZi, EnumFacing dir, int gridLength, boolean convertStarter) //Total grid length - { - if (gridLength == 0 || gridLength == 1) - { - return 0; - } - - int initGridX = gridXi; - int initGridZ = gridZi; - int initY = yi; - - if (convertStarter) - { - this.setGridSpace(initGridX, initGridZ, new GridSpace(GridSpace.CROSSROAD, initY)); - - DemonCrosspath crosspath = new DemonCrosspath(pos.getX() + initGridX * 5, initY, pos.getZ() + initGridZ * 5); - crosspath.createCrosspath(worldObj); - } - - for (int index = 0; index < gridLength - 1; index++) - { - DemonVillagePath path = new DemonVillagePath(pos.getX() + initGridX * 5, initY, pos.getZ() + initGridZ * 5, dir, 6); - - Int3AndBool temp = path.constructFullPath(this, worldObj, this.getRoadStepClearance()); - Int3 next = temp.coords; - - if (next != null) - { - initY = next.yCoord; - if(printDebug) - AlchemicalWizardry.logger.info("" + initY); - } - - if(!temp.bool) - { - return index; - } - - initGridX += dir.getFrontOffsetX(); - initGridZ += dir.getFrontOffsetZ(); - - if (!this.getGridSpace(initGridX, initGridZ).isRoadSegment()) - { - this.setGridSpace(initGridX, initGridZ, new GridSpace(GridSpace.ROAD, initY)); - } - } - - return gridLength - 1; - } - - public void expandAreaInNegX() - { - GridSpace[][] newGrid = new GridSpace[negXRadius + posXRadius + 2][negZRadius + posZRadius + 1]; - for (int i = 0; i <= negZRadius + posZRadius; i++) - { - newGrid[0][i] = new GridSpace(); - } - - for (int i = 0; i <= negXRadius + posXRadius; i++) - { - for (int j = 0; j <= negZRadius + posZRadius; j++) - { - newGrid[i + 1][j] = area[i][j]; - } - } - - area = newGrid; - negXRadius += 1; - } - - public void expandAreaInPosX() - { - GridSpace[][] newGrid = new GridSpace[negXRadius + posXRadius + 2][negZRadius + posZRadius + 1]; - - for (int i = 0; i <= negZRadius + posZRadius; i++) - { - newGrid[negXRadius + posXRadius + 1][i] = new GridSpace(); - } - - for (int i = 0; i <= negXRadius + posXRadius; i++) - { - for (int j = 0; j <= negZRadius + posZRadius; j++) - { - newGrid[i][j] = area[i][j]; - } - } - - area = newGrid; - posXRadius += 1; - } - - public void expandAreaInNegZ() - { - GridSpace[][] newGrid = new GridSpace[negXRadius + posXRadius + 1][negZRadius + posZRadius + 2]; - - if(printDebug) - AlchemicalWizardry.logger.info("x " + newGrid.length + "z " + newGrid[0].length); - - for (int i = 0; i <= negXRadius + posXRadius; i++) - { - newGrid[i][0] = new GridSpace(); - } - - for (int i = 0; i <= negXRadius + posXRadius; i++) - { - for (int j = 0; j <= negZRadius + posZRadius; j++) - { - newGrid[i][j + 1] = area[i][j]; - } - } - - area = newGrid; - negZRadius += 1; - } - - public void expandAreaInPosZ() - { - GridSpace[][] newGrid = new GridSpace[negXRadius + posXRadius + 1][negZRadius + posZRadius + 2]; - - for (int i = 0; i <= negXRadius + posXRadius; i++) - { - newGrid[i][negZRadius + posZRadius + 1] = new GridSpace(); - } - - for (int i = 0; i <= negXRadius + posXRadius; i++) - { - for (int j = 0; j <= negZRadius + posZRadius; j++) - { - newGrid[i][j] = area[i][j]; - } - } - - area = newGrid; - posZRadius += 1; - } - - public GridSpace getGridSpace(int x, int z) - { - if (x > posXRadius || x < -negXRadius || z > posZRadius || z < -negZRadius) - { - return new GridSpace(); - } else - { - return (area[x + negXRadius][z + negZRadius]); - } - } - - public void setGridSpace(int x, int z, GridSpace space) - { - if (x > posXRadius) - { - this.expandAreaInPosX(); - this.setGridSpace(x, z, space); - } else if (x < -negXRadius) - { - this.expandAreaInNegX(); - this.setGridSpace(x, z, space); - } else if (z > posZRadius) - { - this.expandAreaInPosZ(); - this.setGridSpace(x, z, space); - } else if (z < -negZRadius) - { - this.expandAreaInNegZ(); - this.setGridSpace(x, z, space); - } else - { - area[x + negXRadius][z + negZRadius] = space; - } - } - - public void rightClickBlock(EntityPlayer player, int side) - { -// if (worldObj.isRemote) -// { -// return; -// } -// -// this.initialize(); -// -// if (EnumFacing.getOrientation(side) == EnumFacing.UP) -// { -// this.createRandomBuilding(DemonBuilding.BUILDING_HOUSE, 0); -// } else if (EnumFacing.getOrientation(side) == EnumFacing.DOWN) -// { -// this.createRandomBuilding(DemonBuilding.BUILDING_PORTAL, 0); -// } else -// { -// this.createRandomRoad(); -// } - } - - public int createRandomBuilding(int type, int tier) - { - switch (type) - { - case DemonBuilding.BUILDING_HOUSE: - return this.createRandomHouse(tier); - case DemonBuilding.BUILDING_PORTAL: - return this.createPortalBuilding(tier); - } - - return 0; - } - - 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(); - -// GridSpaceHolder grid = this.createGSH(); - - List directions = new ArrayList(); - - for (int i = 2; i < 6; i++) - { - EnumFacing testDir = EnumFacing.getFront(i); - directions.add(testDir); - } - - if (directions.isEmpty()) - { - return 0; - } - - HashMap> schemMap = new HashMap>(); - - for (EnumFacing nextDir : directions) - { - for (DemonBuilding build : TEDemonPortal.buildingList) - { - if (build.buildingType != DemonBuilding.BUILDING_PORTAL || build.buildingTier != buildingTier) - { - continue; - } - System.out.println("This one matches!"); - if (schemMap.containsKey(nextDir)) - { - schemMap.get(nextDir).add(build); - } else - { - schemMap.put(nextDir, new ArrayList()); - schemMap.get(nextDir).add(build); - } - } - } - - if (schemMap.keySet().isEmpty()) - { - return 0; - } - - EnumFacing chosenDirection = (EnumFacing) 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); - - this.nextDemonPortalDirection = chosenDirection; - this.nextDemonPortalName = build.getName(); - -// 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); - - 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 - */ - public void createPortalBuilding(int stage, String name, int tier) - { - for(DemonBuilding build : TEDemonPortal.buildingList) - { - if(build.buildingType != DemonBuilding.BUILDING_PORTAL || build.buildingTier != tier) - { - continue; - } - - if(build.getName().equals(this.nextDemonPortalName)) - { - int x = 0; - int z = 0; - - GridSpace home = this.getGridSpace(x, z); - int yLevel = home.getYLevel(); - - GridSpaceHolder grid = this.createGSH(); - - EnumFacing chosenDirection = this.nextDemonPortalDirection; - Int3 portalSpace = build.getDoorSpace(chosenDirection); - int yOffset = portalSpace.yCoord; - - switch(stage) - { - case 0: - - break; - - case 1: - int yDestination = yLevel + yOffset; - if(pos.getY() != yDestination) - { - BlockTeleposer.swapBlocks(this, worldObj, worldObj, pos, new BlockPos(pos.getX(), yDestination, pos.getZ())); - }else - { - //Nuthin - just as a reminder that we can now increment properly - } - break; - - case 2: - build.destroyAllInField(worldObj, pos.getX() + (x) * 5, yLevel, pos.getZ() + (z) * 5, chosenDirection.getOpposite()); - - build.buildAll(this, worldObj, pos.getX() + (x) * 5, yLevel, pos.getZ() + (z) * 5, chosenDirection.getOpposite(), true); - build.setAllGridSpaces(x, z, yLevel, chosenDirection.getOpposite(), GridSpace.MAIN_PORTAL, grid); - this.loadGSH(grid); - break; - } - - return; - } - } - } - - public int createRandomHouse(int buildingTier) - { - int next = rand.nextInt(4); - EnumFacing dir; - - switch (next) - { - case 0: - dir = EnumFacing.NORTH; - break; - case 1: - dir = EnumFacing.SOUTH; - break; - case 2: - dir = EnumFacing.EAST; - break; - case 3: - dir = EnumFacing.WEST; - break; - default: - dir = EnumFacing.NORTH; - } - - Int3 space = this.findRoadSpaceFromDirection(dir, (rand.nextInt(negXRadius + negZRadius + posXRadius + posZRadius)) + 1); // Second: 1 * - - int x = space.xCoord; - int z = space.zCoord; - int yLevel = space.yCoord; - - if(printDebug) - AlchemicalWizardry.logger.info("Road space - x: " + x + " z: " + z); - - GridSpaceHolder grid = this.createGSH(); - - if (!this.getGridSpace(x, z).isRoadSegment()) - { - return 0; - } - - List directions = new ArrayList(); - - for (int i = 2; i < 6; i++) - { - EnumFacing testDir = EnumFacing.getFront(i); - if (this.getGridSpace(x + testDir.getFrontOffsetX(), z + testDir.getFrontOffsetZ()).isEmpty()) - { - directions.add(testDir); - } - } - - if (directions.isEmpty()) - { - return 0; - } - - HashMap> schemMap = new HashMap>(); - - for (EnumFacing nextDir : directions) - { - for (DemonBuilding build : TEDemonPortal.buildingList) - { - if (build.buildingTier != buildingTier || build.buildingType != DemonBuilding.BUILDING_HOUSE) - { - continue; - } - Int3 offsetSpace = build.getGridOffsetFromRoad(nextDir, yLevel); - int xOff = offsetSpace.xCoord; - int zOff = offsetSpace.zCoord; - - if (build.isValid(grid, x + xOff, z + zOff, nextDir.getOpposite())) - { - if (schemMap.containsKey(nextDir)) - { - schemMap.get(nextDir).add(build); - } else - { - schemMap.put(nextDir, new ArrayList()); - schemMap.get(nextDir).add(build); - } - } else - { - if(printDebug) - AlchemicalWizardry.logger.info("This ISN'T valid!"); - } - } - } - - if (schemMap.keySet().isEmpty()) - { - return 0; - } - - EnumFacing chosenDirection = (EnumFacing) schemMap.keySet().toArray()[new Random().nextInt(schemMap.keySet().size())]; - DemonBuilding build = schemMap.get(chosenDirection).get(new Random().nextInt(schemMap.get(chosenDirection).size())); - - Int3 offsetSpace = build.getGridOffsetFromRoad(chosenDirection, yLevel); - int xOff = offsetSpace.xCoord; - int zOff = offsetSpace.zCoord; - - build.destroyAllInField(worldObj, pos.getX() + (x + xOff) * 5, yLevel, pos.getZ() + (z + zOff) * 5, chosenDirection.getOpposite()); - build.buildAll(this, worldObj, pos.getX() + (x + xOff) * 5, yLevel, pos.getZ() + (z + zOff) * 5, chosenDirection.getOpposite(), true); - build.setAllGridSpaces(x + xOff, z + zOff, yLevel, chosenDirection.getOpposite(), GridSpace.HOUSE, grid); - this.loadGSH(grid); - - return build.getNumberOfGridSpaces(); - } - - public int findNearestRoadYLevel(int xCoord, int zCoord, int maxDistance) - { - for (int l = 1; l <= maxDistance; l++) - { - for (int i = -l; i <= l; i++) - { - for (int j = -l; j <= l; j++) - { - if (Math.abs(i) != l && Math.abs(j) != l) - { - continue; - } - - if (this.getGridSpace(xCoord + i, zCoord + j).isRoadSegment()) - { - return this.getGridSpace(xCoord + i, zCoord + j).getYLevel(); - } - } - } - } - - return -1; - } - - public void createRoad(int xi, int yi, int zi, EnumFacing dir, int length, boolean doesNotDrop) - { - if (dir.getFrontOffsetY() != 0) - { - return; - } - - DemonVillagePath path = new DemonVillagePath(xi, yi, zi, dir, length); - - path.constructFullPath(this, worldObj, this.getRoadStepClearance()); - } - - public int placeMaterialOnNextAvailable() - { - return 0; - } - - public int getRoadRadius() - { - return 1; - } - - public Block getRoadBlock() - { - switch(this.tier) - { - case 0: - return rand.nextFloat() < 0.6 ? Blocks.cobblestone : Blocks.mossy_cobblestone; - case 1: - return Blocks.stonebrick; - default: - return Blocks.nether_brick; - } - } - - public int getRoadMeta() - { - switch(this.tier) - { - case 1: - return rand.nextFloat() < 0.6 ? 1 : 0; - } - return 0; - } - - public IBlockState getRoadState() - { - return getRoadBlock().getStateFromMeta(getRoadMeta()); - } - - public int getRoadStepClearance() - { - return 10; - } - - public int getRoadSpacer() - { - return 1; - } - - public GridSpaceHolder createGSH() - { - GridSpaceHolder grid = new GridSpaceHolder(); - grid.area = this.area; - grid.negXRadius = this.negXRadius; - grid.negZRadius = this.negZRadius; - grid.posXRadius = this.posXRadius; - grid.posZRadius = this.posZRadius; - - return grid; - } - - public void loadGSH(GridSpaceHolder grid) - { - this.area = grid.area; - this.negXRadius = grid.negXRadius; - this.negZRadius = grid.negZRadius; - this.posXRadius = grid.posXRadius; - this.posZRadius = grid.posZRadius; - } - - public static void loadBuildingList() - { - String folder = "config/BloodMagic/schematics"; - Gson gson = new GsonBuilder().setPrettyPrinting().create(); - - File file = new File(folder); - File[] files = file.listFiles(); - BufferedReader br; - - try - { - for (File f : files) - { - br = new BufferedReader(new FileReader(f)); - BuildingSchematic schema = gson.fromJson(br, BuildingSchematic.class); - TEDemonPortal.buildingList.add(new DemonBuilding(schema)); - } - } catch (FileNotFoundException e) - { - e.printStackTrace(); - } - } - - public void addToPoints(int addition) - { - this.demonHouseCooldown += addition; - } - - public void notifyPortalOfBreak() - { - for(IHoardDemon demon : hoardList) - { - if(demon instanceof Entity) - { - ((Entity) demon).setDead(); - } - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/BookEntityItem.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/BookEntityItem.java deleted file mode 100644 index 00187b3d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/BookEntityItem.java +++ /dev/null @@ -1,56 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.mob; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -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; - this.lifespan = 72000; - } - - 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 : par8ItemStack.getItem().getEntityLifespan(par8ItemStack, par1World)); - this.isImmuneToFire = true; - } - - public BookEntityItem(World world, Entity original, ItemStack stack) - { - this(world, original.posX, original.posY, original.posZ); - this.setDefaultPickupDelay(); - this.motionX = original.motionX; - this.motionY = original.motionY; - this.motionZ = original.motionZ; - this.setEntityItemStack(stack); - this.isImmuneToFire = true; - } - - public BookEntityItem(World par1world) - { - super(par1world); - } - - @Override - public void onUpdate() - { - super.onUpdate(); - } - - @Override - public boolean attackEntityFrom (DamageSource par1DamageSource, float par2) - { - if (par1DamageSource.getDamageType().equals("outOfWorld")) - return true; - return false; - } - -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityAirElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityAirElemental.java deleted file mode 100644 index e1bad7e6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityAirElemental.java +++ /dev/null @@ -1,31 +0,0 @@ -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; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; - -public class EntityAirElemental extends EntityElemental implements IMob -{ - public EntityAirElemental(World world) - { - super(world, AlchemicalWizardry.entityAirElementalID); - } - - public void inflictEffectOnEntity(Entity target) - { - if (target instanceof EntityPlayer) - { - SpellHelper.setPlayerSpeedFromServer((EntityPlayer) target, target.motionX, target.motionY + 3, target.motionZ); - ((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); - } else if (target instanceof EntityLivingBase) - { - ((EntityLivingBase) target).motionY += 3.0D; - ((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java deleted file mode 100644 index 08dbb8bc..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java +++ /dev/null @@ -1,60 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.mob; - -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.pathfinding.PathNavigateGround; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; - -public class EntityBileDemon extends EntityDemon -{ - public EntityBileDemon(World par1World) - { - super(par1World, AlchemicalWizardry.entityBileDemonID); - maxTamedHealth = 100.0F; - maxUntamedHealth = 200.0F; - this.setSize(1.3F, 2.0F); - ((PathNavigateGround)this.getNavigator()).func_179690_a(true); - this.tasks.addTask(1, new EntityAISwimming(this)); - this.tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0D, true)); - this.tasks.addTask(3, this.aiSit); - this.tasks.addTask(4, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); - this.tasks.addTask(5, new EntityAIWander(this, 1.0D)); - this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); - this.tasks.addTask(7, new EntityAILookIdle(this)); - this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this)); - this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this)); - this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true)); - this.setTamed(false); - attackTimer = 0; - this.applyEntityAttributes(); - } - - @Override - protected void applyEntityAttributes() - { - super.applyEntityAttributes(); - //This line affects the speed of the monster - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.20000001192092896D); - - //My guess is that this will alter the max health - if (this.isTamed()) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - - //this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java deleted file mode 100644 index 7d431217..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java +++ /dev/null @@ -1,78 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.mob; - -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILeapAtTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.pathfinding.PathNavigateGround; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; - -public class EntityBoulderFist extends EntityDemon -{ - private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); - - public EntityBoulderFist(World par1World) - { - super(par1World, AlchemicalWizardry.entityBoulderFistID); - this.setSize(0.8F, 1.2F); - ((PathNavigateGround)this.getNavigator()).func_179690_a(true); - this.tasks.addTask(1, new EntityAISwimming(this)); - this.tasks.addTask(2, this.aiSit); - this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F)); - this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true)); - this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); - this.tasks.addTask(6, new EntityAIWander(this, 1.0D)); - this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); - this.tasks.addTask(8, new EntityAILookIdle(this)); - this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this)); - this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this)); - this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true)); - this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false)); - this.setAggro(false); - this.setTamed(false); - - if (par1World != null && !par1World.isRemote) - { - this.setCombatTask(); - } - } - - @Override - protected void applyEntityAttributes() - { - super.applyEntityAttributes(); - //This line affects the speed of the monster - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D); - float maxTamedHealth = 60.0F; - float maxUntamedHealth = 50.0F; - - //My guess is that this will alter the max health - if (this.isTamed()) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - - /** - * sets this entity's combat AI. - */ - public void setCombatTask() - { - this.tasks.removeTask(this.aiAttackOnCollide); - //this.tasks.removeTask(this.aiArrowAttack); - this.tasks.addTask(4, this.aiAttackOnCollide); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java deleted file mode 100644 index e87ee5a8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java +++ /dev/null @@ -1,523 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.mob; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityAgeable; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.passive.EntityAnimal; -import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.passive.EntityTameable; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ChatComponentTranslation; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.IDemon; -import WayofTime.alchemicalWizardry.common.items.DemonCrystal; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -public class EntityDemon extends EntityTameable implements IDemon -{ - protected boolean isAggro; - protected String demonID; - - protected float maxTamedHealth = 100.0F; - protected float maxUntamedHealth = 200.0F; - protected int attackTimer; - - protected boolean dropCrystal = true; - - public EntityDemon(World par1World, String demonID) - { - super(par1World); - this.demonID = demonID; - } - - @Override - public boolean getDoesDropCrystal() - { - return dropCrystal; - } - - @Override - public void setDropCrystal(boolean crystal) - { - this.dropCrystal = crystal; - } - - @Override - public void setSummonedConditions() - { - this.setAggro(true); - } - - @Override - public boolean isAggro() - { - return this.isAggro; - } - - @Override - public void setAggro(boolean aggro) - { - this.isAggro = aggro; - } - - @Override - public EntityAgeable createChild(EntityAgeable entityageable) - { - // TODO Auto-generated method stub - return null; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - super.writeToNBT(tag); - - tag.setBoolean("dropCrystal", this.getDoesDropCrystal()); - tag.setBoolean("isAggro", isAggro); - tag.setString("demonID", demonID); - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - super.readFromNBT(tag); - - this.setDropCrystal(tag.getBoolean("dropCrystal")); - isAggro = tag.getBoolean("isAggro"); - demonID = tag.getString("demonID"); - } - - @Override - protected void dropFewItems(boolean par1, int par2) - { - if(this.getDoesDropCrystal()) - { - ItemStack drop = new ItemStack(ModItems.demonPlacer); - - DemonCrystal.setDemonString(drop, this.getDemonID()); - - if ((this.getOwner() instanceof EntityPlayer)) - { - DemonCrystal.setOwnerName(drop, SpellHelper.getUsername((EntityPlayer) this.getOwner())); - } - - if (this.hasCustomName()) - { - drop.setStackDisplayName(this.getCustomNameTag()); - } - - this.entityDropItem(drop, 0.0f); - } - } - - public void onLivingUpdate() - { - super.onLivingUpdate(); - - if (!this.isAggro() && worldObj.getWorldTime() % 100 == 0) - { - this.heal(1); - } - } - - public void sendSittingMessageToPlayer(EntityPlayer owner, boolean isSitting) - { - if (owner != null && owner.worldObj.isRemote) - { - ChatComponentTranslation chatmessagecomponent; - - if (isSitting) - { - chatmessagecomponent = new ChatComponentTranslation("message.demon.willstay"); - } else - { - chatmessagecomponent = new ChatComponentTranslation("message.demon.shallfollow"); - } - - owner.addChatComponentMessage(chatmessagecomponent); - } - } - - public String getDemonID() - { - return this.demonID; - } - - protected void setDemonID(String id) - { - this.demonID = id; - } - - - /** - * Returns true if the newer Entity AI code should be run - */ - public boolean isAIEnabled() - { - return true; - } - - /** - * Sets the active target the Task system uses for tracking - */ - public void setAttackTarget(EntityLivingBase par1EntityLivingBase) - { - super.setAttackTarget(par1EntityLivingBase); - - if (par1EntityLivingBase == null) - { - this.setAngry(false); - } else if (!this.isTamed()) - { - this.setAngry(true); - } - } - - @Override - /** - * main AI tick function, replaces updateEntityActionState - */ - protected void updateAITick() - { - this.dataWatcher.updateObject(18, this.getHealth()); - } - - @Override - protected void entityInit() - { - super.entityInit(); - this.dataWatcher.addObject(18, this.getHealth()); - this.dataWatcher.addObject(19, 0); - //this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1))); - } - - /** - * Plays step sound at given x, y, z for the entity - */ - protected void playStepSound(int par1, int par2, int par3, int par4) - { - this.playSound("mob.zombie.step", 0.15F, 1.0F); - } - - @Override - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeEntityToNBT(par1NBTTagCompound); - par1NBTTagCompound.setBoolean("Angry", this.isAngry()); - par1NBTTagCompound.setByte("attackTimer", (byte) attackTimer); - } - - @Override - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readEntityFromNBT(par1NBTTagCompound); - this.setAngry(par1NBTTagCompound.getBoolean("Angry")); - - attackTimer = par1NBTTagCompound.getByte("attackTimer"); - } - - @Override - /** - * Returns the sound this mob makes while it's alive. - */ - protected String getLivingSound() - { - return "none"; - } - - @Override - /** - * Returns the sound this mob makes when it is hurt. - */ - protected String getHurtSound() - { - return "mob.irongolem.hit"; - } - - @Override - /** - * Returns the sound this mob makes on death. - */ - protected String getDeathSound() - { - return "mob.irongolem.death"; - } - - @Override - /** - * Returns the volume for the sounds this mob makes. - */ - protected float getSoundVolume() - { - return 1.0F; - } - - /** - * Returns the item ID for the item the mob drops on death. - */ - protected int getDropItemId() - { - return -1; - } - - public int getAttackTimer() - { - return attackTimer; - } - - @Override - /** - * Called to update the entity's position/logic. - */ - public void onUpdate() - { - super.onUpdate(); - } - - @Override - public float getEyeHeight() - { - return this.height * 0.8F; - } - - @Override - /** - * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently - * use in wolves. - */ - public int getVerticalFaceSpeed() - { - return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); - } - - @Override - /** - * Called when the entity is attacked. - */ - public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) - { -// if (this.isEntityInvulnerable()) -// { -// return false; -// } else - { - Entity entity = par1DamageSource.getEntity(); - this.aiSit.setSitting(false); - - if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) - { - par2 = (par2 + 1.0F) / 2.0F; - } - - return super.attackEntityFrom(par1DamageSource, par2); - } - } - - @Override - 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))); - - if (flag) - { - par1Entity.motionY += 0.4000000059604645D; - } - - this.playSound("mob.irongolem.throw", 1.0F, 1.0F); - return flag; - } - - @Override - public void setTamed(boolean par1) - { - super.setTamed(par1); - - if (par1) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - - /** - * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. - */ - @Override - public boolean interact(EntityPlayer par1EntityPlayer) - { - ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); - - if (this.isTamed()) - { - if (itemstack != null) - { - if (itemstack.getItem() instanceof ItemFood) - { - ItemFood itemfood = (ItemFood) itemstack.getItem(); - - if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - this.heal((float) itemfood.getHealAmount(itemstack)); - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); - } - - return true; - } - } - } - - if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) - { - if (!this.worldObj.isRemote) - { - this.aiSit.setSitting(!this.isSitting()); - this.isJumping = false; -// this.setPathToEntity(null); -// this.setTarget(null); - this.setAttackTarget(null); - } - - this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); - } - } else if (itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - 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); - } - } - - return true; - } - - return super.interact(par1EntityPlayer); - } - - /** - * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on - * the animal type) - */ - public boolean isBreedingItem(ItemStack par1ItemStack) - { - return false; - } - - /** - * Determines whether this wolf is angry or not. - */ - public boolean isAngry() - { - return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; - } - - /** - * Sets whether this wolf is angry or not. - */ - public void setAngry(boolean par1) - { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); - - if (par1) - { - this.dataWatcher.updateObject(16, b0 | 2); - } else - { - this.dataWatcher.updateObject(16, b0 & -3); - } - } - - @Override - /** - * Returns true if the mob is currently able to mate with the specified mob. - */ - public boolean canMateWith(EntityAnimal par1EntityAnimal) - { - return false; - } - - public boolean func_70922_bv() - { - return this.dataWatcher.getWatchableObjectByte(19) == 1; - } - - @Override - /** - * Determines if an entity can be despawned, used on idle far away entities - */ - protected boolean canDespawn() - { - return false; - } - - @Override - public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) - { - if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) - { - if (par1EntityLivingBase instanceof EntityBileDemon) - { - EntityBileDemon entitywolf = (EntityBileDemon) par1EntityLivingBase; - - if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) - { - return false; - } - } - - 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/EntityEarthElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityEarthElemental.java deleted file mode 100644 index e6915fb6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityEarthElemental.java +++ /dev/null @@ -1,28 +0,0 @@ -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.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; - -public class EntityEarthElemental extends EntityElemental implements IMob -{ - public EntityEarthElemental(World world) - { - super(world, AlchemicalWizardry.entityEarthElementalID); - } - - public void inflictEffectOnEntity(Entity target) - { - if (target instanceof EntityLivingBase) - { - target.attackEntityFrom(DamageSource.causeMobDamage(this), 10); - ((EntityLivingBase) target).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 4)); - ((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java deleted file mode 100644 index b37b4695..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java +++ /dev/null @@ -1,565 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.mob; - -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.passive.EntityAnimal; -import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.util.DamageSource; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -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 static float maxTamedHealth = 100.0F; - private static float maxUntamedHealth = 100.0F; - - public EntityElemental(World par1World, String entityAirElementalID) - { - super(par1World, entityAirElementalID); - this.setSize(0.5F, 1.0F); - this.setAggro(false); - this.setTamed(false); - - if (par1World != null && !par1World.isRemote) - { - this.setCombatTask(); - } - } - -// public int courseChangeCooldown; - public double waypointX; - public double waypointY; - public double waypointZ; -/* private Entity targetedEntity; - - /** - * Cooldown time between target loss and new target aquirement. - - private int aggroCooldown; - public int prevAttackCounter; - public int attackCounter; -*/ - @Override - /** - * The explosion radius of spawned fireballs. - */ - protected void dropFewItems(boolean par1, int par2) - { - if (worldObj.rand.nextFloat() < (1 - Math.pow(0.6f, par2 + 1))) - { - this.entityDropItem(new ItemStack(ModItems.demonBloodShard, 1, 0), 0.0f); - } - } - - @Override - /** - * Moves the entity based on the specified heading. Args: strafe, forward - */ - public void moveEntityWithHeading(float p_70612_1_, float p_70612_2_) - { - if (this.isInWater()) - { - this.moveFlying(p_70612_1_, p_70612_2_, 0.02F); - this.moveEntity(this.motionX, this.motionY, this.motionZ); - this.motionX *= 0.800000011920929D; - this.motionY *= 0.800000011920929D; - this.motionZ *= 0.800000011920929D; - } - else if (this.isInLava()) - { - this.moveFlying(p_70612_1_, p_70612_2_, 0.02F); - this.moveEntity(this.motionX, this.motionY, this.motionZ); - this.motionX *= 0.5D; - this.motionY *= 0.5D; - this.motionZ *= 0.5D; - } - else - { - float f2 = 0.91F; - - if (this.onGround) - { - f2 = this.worldObj.getBlockState(new BlockPos(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.getEntityBoundingBox().minY) - 1, MathHelper.floor_double(this.posZ))).getBlock().slipperiness * 0.91F; - } - - float f3 = 0.16277136F / (f2 * f2 * f2); - this.moveFlying(p_70612_1_, p_70612_2_, this.onGround ? 0.1F * f3 : 0.02F); - f2 = 0.91F; - - if (this.onGround) - { - f2 = this.worldObj.getBlockState(new BlockPos(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.getEntityBoundingBox().minY) - 1, MathHelper.floor_double(this.posZ))).getBlock().slipperiness * 0.91F; - } - - this.moveEntity(this.motionX, this.motionY, this.motionZ); - this.motionX *= (double)f2; - this.motionY *= (double)f2; - this.motionZ *= (double)f2; - } - - this.prevLimbSwingAmount = this.limbSwingAmount; - double d1 = this.posX - this.prevPosX; - double d0 = this.posZ - this.prevPosZ; - float f4 = MathHelper.sqrt_double(d1 * d1 + d0 * d0) * 4.0F; - - if (f4 > 1.0F) - { - f4 = 1.0F; - } - - this.limbSwingAmount += (f4 - this.limbSwingAmount) * 0.4F; - this.limbSwing += this.limbSwingAmount; - } - - @Override - /** - * returns true if this entity is by a ladder, false otherwise - */ - public boolean isOnLadder() - { - return false; - } - - @SideOnly(Side.CLIENT) - public boolean func_110182_bF() - { - return this.dataWatcher.getWatchableObjectByte(25) != 0; - } - - /** - * True if the ghast has an unobstructed line of travel to the waypoint. - */ - private boolean isCourseTraversable(double par1, double par3, double par5, double par7) - { - double d4 = (this.waypointX - this.posX) / par7; - double d5 = (this.waypointY - this.posY) / par7; - double d6 = (this.waypointZ - this.posZ) / par7; - AxisAlignedBB axisalignedbb = this.getBoundingBox(); - - for (int i = 1; (double) i < par7; ++i) - { - axisalignedbb.offset(d4, d5, d6); - - if (!this.worldObj.getCollidingBoundingBoxes(this, axisalignedbb).isEmpty()) - { - return false; - } - } - - return true; - } - - @Override - /** - * Will return how many at most can spawn in a chunk at once. - */ - public int getMaxSpawnedInChunk() - { - return 1; - } - - @Override - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeEntityToNBT(par1NBTTagCompound); - } - - @Override - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readEntityFromNBT(par1NBTTagCompound); - this.setAngry(par1NBTTagCompound.getBoolean("Angry")); - - this.setCombatTask(); - } - - @Override - protected void applyEntityAttributes() - { - super.applyEntityAttributes(); - //This line affects the speed of the monster - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D); - - //My guess is that this will alter the max health - if (this.isTamed()) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - - @Override - /** - * Returns true if the newer Entity AI code should be run - */ - public boolean isAIEnabled() - { - return false; - } - - @Override - /** - * Sets the active target the Task system uses for tracking - */ - public void setAttackTarget(EntityLivingBase par1EntityLivingBase) - { - super.setAttackTarget(par1EntityLivingBase); - - if (par1EntityLivingBase == null) - { - this.setAngry(false); - } else if (!this.isTamed()) - { - this.setAngry(true); - } - } - - @Override - /** - * main AI tick function, replaces updateEntityActionState - */ - protected void updateAITick() - { - this.dataWatcher.updateObject(18, this.getHealth()); - } - - @Override - protected void entityInit() - { - super.entityInit(); - this.dataWatcher.addObject(18, this.getHealth()); - this.dataWatcher.addObject(19, 0); - this.dataWatcher.addObject(25, 0); - } - - @Override - /** - * Plays step sound at given x, y, z for the entity - */ - protected void playStepSound(int par1, int par2, int par3, int par4) - { - this.playSound("mob.zombie.step", 0.15F, 1.0F); - } - - @Override - /** - * Returns the sound this mob makes while it's alive. - */ - protected String getLivingSound() - { - //TODO change sounds - return "none"; - } - - @Override - /** - * Returns the sound this mob makes when it is hurt. - */ - protected String getHurtSound() - { - return "none"; - } - - @Override - /** - * Returns the sound this mob makes on death. - */ - protected String getDeathSound() - { - return "none"; - } - - @Override - /** - * Returns the volume for the sounds this mob makes. - */ - protected float getSoundVolume() - { - return 0.4F; - } - - @Override - /** - * Returns the item ID for the item the mob drops on death. - */ - protected int getDropItemId() - { - return -1; - } - - @Override - /** - * Called to update the entity's position/logic. - */ - public void onUpdate() - { - super.onUpdate(); - - if (this.getHealth() <= this.getMaxHealth() / 2.0f && worldObj.rand.nextInt(200) == 0) - { - this.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionReciprocation.id, 100, 1)); - } - } - - @Override - public float getEyeHeight() - { - return this.height * 0.8F; - } - - @Override - /** - * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently - * use in wolves. - */ - public int getVerticalFaceSpeed() - { - return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); - } - - @Override - /** - * Called when the entity is attacked. - */ - public boolean attackEntityFrom(DamageSource source, float par2) - { - if (this.func_180431_b(source)) - { - return false; - } else - { - Entity entity = source.getEntity(); - this.aiSit.setSitting(false); - - if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) - { - par2 = (par2 + 1.0F) / 2.0F; - } - - return super.attackEntityFrom(source, par2); - } - } - - @Override - public boolean attackEntityAsMob(Entity par1Entity) - { - int i = this.isTamed() ? 6 : 7; - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); - } - - @Override - public void setTamed(boolean par1) - { - super.setTamed(par1); - - if (par1) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - - @Override - /** - * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on - * the animal type) - */ - public boolean isBreedingItem(ItemStack par1ItemStack) - { - return false; - } - - @Override - /** - * Determines whether this wolf is angry or not. - */ - public boolean isAngry() - { - return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; - } - - @Override - /** - * Sets whether this wolf is angry or not. - */ - public void setAngry(boolean par1) - { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); - - if (par1) - { - this.dataWatcher.updateObject(16, b0 | 2); - } else - { - this.dataWatcher.updateObject(16, b0 & -3); - } - } - - public void func_70918_i(boolean par1) - { - if (par1) - { - this.dataWatcher.updateObject(19, 1); - } else - { - this.dataWatcher.updateObject(19, 0); - } - } - - @Override - /** - * Returns true if the mob is currently able to mate with the specified mob. - */ - public boolean canMateWith(EntityAnimal par1EntityAnimal) - { - return false; - } - - @Override - public boolean func_70922_bv() - { - return this.dataWatcher.getWatchableObjectByte(19) == 1; - } - - @Override - /** - * Determines if an entity can be despawned, used on idle far away entities - */ - protected boolean canDespawn() - { - return false; - } - - @Override - public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) - { - if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) - { - if (par1EntityLivingBase instanceof EntityBoulderFist) - { - EntityBoulderFist entitywolf = (EntityBoulderFist) par1EntityLivingBase; - - if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) - { - return false; - } - } - - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); - } else - { - return false; - } - } - - - /** - * sets this entity's combat AI. - */ - public void setCombatTask() - { - this.tasks.removeTask(this.aiAttackOnCollide); - this.tasks.addTask(4, this.aiAttackOnCollide); - } - - public void inflictEffectOnEntity(Entity target) - { - if (target instanceof EntityLivingBase) - { - ((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 100, 0)); - } - } - - public static Entity getClosestVulnerableMonsterToEntity(Entity par1Entity, double par2) - { - double d4 = -1.0D; - double par1 = par1Entity.posX; - double par3 = par1Entity.posY; - double par5 = par1Entity.posZ; - - EntityLivingBase entityLiving = null; - World world = par1Entity.worldObj; - - double range = Math.sqrt(par2); - double verticalRange = Math.sqrt(par2); - List entities = world.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(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; - } - - for (int i = 0; i < entities.size(); ++i) - { - EntityLivingBase entityLiving1 = entities.get(i); - - if (!(entityLiving1 instanceof EntityPlayer && ((EntityPlayer) entityLiving1).capabilities.disableDamage) && entityLiving1.isEntityAlive()) - { - double d5 = entityLiving1.getDistanceSq(par1, par3, par5); - double d6 = par2; - - if (entityLiving1.isSneaking()) - { - d6 = par2 * 0.800000011920929D; - } - - if (entityLiving1.isInvisible()) - { - float f = entityLiving1 instanceof EntityPlayer ? ((EntityPlayer) entityLiving1).getArmorVisibility() : 1.0f; - - if (f < 0.1F) - { - f = 0.1F; - } - - d6 *= (double) (0.7F * f); - } - - if ((par2 < 0.0D || d5 < d6 * d6) && (d4 == -1.0D || d5 < d4)) - { - if (par1Entity != entityLiving1) - { - d4 = d5; - entityLiving = entityLiving1; - } - } - } - } - - return entityLiving; - } - - @Override - public int getTotalArmorValue() - { - return 10; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java deleted file mode 100644 index 8c654f08..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java +++ /dev/null @@ -1,91 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.mob; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IRangedAttackMob; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIArrowAttack; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.pathfinding.PathNavigateGround; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; -import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; - -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); - - public EntityFallenAngel(World par1World) - { - super(par1World, AlchemicalWizardry.entityFallenAngelID); - this.setSize(0.7F, 1.8F); - ((PathNavigateGround)this.getNavigator()).func_179690_a(true); - this.tasks.addTask(1, new EntityAISwimming(this)); - this.tasks.addTask(2, this.aiSit); - this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); - this.tasks.addTask(4, new EntityAIWander(this, 1.0D)); - this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); - this.tasks.addTask(6, new EntityAILookIdle(this)); - this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this)); - this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this)); - this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true)); - this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false)); - this.setAggro(false); - this.setTamed(false); - - if (par1World != null && !par1World.isRemote) - { - this.setCombatTask(); - } - - //this.isImmuneToFire = true; - } - - @Override - protected void applyEntityAttributes() - { - super.applyEntityAttributes(); - //This line affects the speed of the monster - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D); - float maxTamedHealth = 50.0F; - float maxUntamedHealth = 50.0F; - - //My guess is that this will alter the max health - if (this.isTamed()) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - - /** - * Attack the specified entity using a ranged attack. - */ - public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) - { - HolyProjectile hol = new HolyProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 5, 600); - this.worldObj.spawnEntityInWorld(hol); - } - - /** - * sets this entity's combat AI. - */ - public void setCombatTask() - { - this.tasks.removeTask(this.aiAttackOnCollide); - this.tasks.removeTask(this.aiArrowAttack); - this.tasks.addTask(4, this.aiArrowAttack); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java deleted file mode 100644 index c54d4588..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java +++ /dev/null @@ -1,27 +0,0 @@ -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; - -public class EntityFireElemental extends EntityElemental implements IMob -{ - public EntityFireElemental(World world) - { - super(world, AlchemicalWizardry.entityFireElementalID); - this.isImmuneToFire = true; - } - - @Override - public void inflictEffectOnEntity(Entity target) - { - if (target instanceof EntityLivingBase) - { - target.setFire(10); - ((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java deleted file mode 100644 index bbccf90e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java +++ /dev/null @@ -1,29 +0,0 @@ -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.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; - -public class EntityHolyElemental extends EntityElemental implements IMob -{ - public EntityHolyElemental(World world) - { - super(world, AlchemicalWizardry.entityHolyElementalID); - } - - @Override - public void inflictEffectOnEntity(Entity target) - { - if (target instanceof EntityLivingBase) - { - target.attackEntityFrom(DamageSource.causeMobDamage(this), 15); - ((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); - ((EntityLivingBase) target).addPotionEffect(new PotionEffect(Potion.poison.id, 100, 1)); - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java deleted file mode 100644 index 33f72245..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java +++ /dev/null @@ -1,88 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.mob; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IRangedAttackMob; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIArrowAttack; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; -import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; - -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); - - public EntityIceDemon(World par1World) - { - super(par1World, AlchemicalWizardry.entityIceDemonID); - this.setSize(0.5F, 2.0F); - this.tasks.addTask(1, new EntityAISwimming(this)); - this.tasks.addTask(2, this.aiSit); - this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); - this.tasks.addTask(4, new EntityAIWander(this, 1.0D)); - this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); - this.tasks.addTask(6, new EntityAILookIdle(this)); - this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this)); - this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this)); - this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true)); - this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false)); - this.setAggro(false); - this.setTamed(false); - - if (par1World != null && !par1World.isRemote) - { - this.setCombatTask(); - } - } - - @Override - protected void applyEntityAttributes() - { - super.applyEntityAttributes(); - //This line affects the speed of the monster - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.40000001192092896D); - float maxTamedHealth = 50.0F; - float maxUntamedHealth = 30.0F; - - //My guess is that this will alter the max health - if (this.isTamed()) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - - @Override - /** - * Attack the specified entity using a ranged attack. - */ - public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) - { - IceProjectile hol = new IceProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 3, 600); - this.worldObj.spawnEntityInWorld(hol); - } - - /** - * sets this entity's combat AI. - */ - public void setCombatTask() - { - this.tasks.removeTask(this.aiAttackOnCollide); - this.tasks.removeTask(this.aiArrowAttack); - this.tasks.addTask(4, this.aiArrowAttack); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java deleted file mode 100644 index 6429aa2c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java +++ /dev/null @@ -1,67 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.mob; - -import net.minecraft.entity.EntityAgeable; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.pathfinding.PathNavigateGround; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; - -public class EntityLowerGuardian extends EntityDemon -{ - public EntityLowerGuardian(World par1World) - { - super(par1World, AlchemicalWizardry.entityLowerGuardianID); - this.setSize(0.7F, 1.8F); - ((PathNavigateGround)this.getNavigator()).func_179690_a(true); - this.tasks.addTask(1, new EntityAISwimming(this)); - this.tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0D, true)); - this.tasks.addTask(3, this.aiSit); - this.tasks.addTask(4, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); - this.tasks.addTask(5, new EntityAIWander(this, 1.0D)); - this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); - this.tasks.addTask(7, new EntityAILookIdle(this)); - this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this)); - this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this)); - this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true)); - this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false)); - this.setAggro(false); - this.setTamed(false); - } - - @Override - protected void applyEntityAttributes() - { - super.applyEntityAttributes(); - //This line affects the speed of the monster - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D); - float maxTamedHealth = 50.0F; - float maxUntamedHealth = 30.0F; - - //My guess is that this will alter the max health - if (this.isTamed()) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - -/* public EntityAgeable createChild(EntityAgeable par1EntityAgeable) - { - return this.spawnBabyAnimal(par1EntityAgeable); - } - I don't know what this method changed to - */ -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java deleted file mode 100644 index 4f76dc33..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java +++ /dev/null @@ -1,84 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.mob; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.pathfinding.PathNavigateGround; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; -import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; - -public class EntityShade extends EntityDemon -{ - private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); - - public EntityShade(World par1World) - { - super(par1World, AlchemicalWizardry.entityShadeID); - this.setSize(0.8F, 2.0F); - ((PathNavigateGround)this.getNavigator()).func_179690_a(true); - this.tasks.addTask(1, new EntityAISwimming(this)); - this.tasks.addTask(2, this.aiSit); - this.tasks.addTask(3, new EntityAIAttackOnCollide(this, 1.0D, true)); - this.tasks.addTask(4, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); - this.tasks.addTask(5, new EntityAIWander(this, 1.0D)); - this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); - this.tasks.addTask(7, new EntityAILookIdle(this)); - this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this)); - this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this)); - this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true)); - this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false)); - this.setAggro(false); - this.setTamed(false); - - if (par1World != null && !par1World.isRemote) - { - this.setCombatTask(); - } - } - - @Override - protected void applyEntityAttributes() - { - super.applyEntityAttributes(); - //This line affects the speed of the monster - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D); - float maxTamedHealth = 50.0F; - float maxUntamedHealth = 100.0F; - - //My guess is that this will alter the max health - if (this.isTamed()) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - - public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) - { - HolyProjectile hol = new HolyProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 5, 600); - this.worldObj.spawnEntityInWorld(hol); - } - - /** - * sets this entity's combat AI. - */ - public void setCombatTask() - { - this.tasks.removeTask(this.aiAttackOnCollide); - //this.tasks.removeTask(this.aiArrowAttack); - this.tasks.addTask(4, this.aiAttackOnCollide); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java deleted file mode 100644 index 3e5ed0f3..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java +++ /dev/null @@ -1,28 +0,0 @@ -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.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; - -public class EntityShadeElemental extends EntityElemental implements IMob -{ - public EntityShadeElemental(World world) - { - super(world, AlchemicalWizardry.entityShadeElementalID); - } - - @Override - public void inflictEffectOnEntity(Entity target) - { - if (target instanceof EntityLivingBase) - { - ((EntityLivingBase) target).addPotionEffect(new PotionEffect(Potion.blindness.id, 100, 1)); - ((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); - ((EntityLivingBase) target).addPotionEffect(new PotionEffect(Potion.nightVision.id, 100, 0)); - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java deleted file mode 100644 index d8b5da90..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java +++ /dev/null @@ -1,90 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.mob; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IRangedAttackMob; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIArrowAttack; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.pathfinding.PathNavigateGround; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; -import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; - -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); - - public EntitySmallEarthGolem(World par1World) - { - super(par1World, AlchemicalWizardry.entitySmallEarthGolemID); - this.setSize(0.2F, 1.0F); - ((PathNavigateGround)this.getNavigator()).func_179690_a(true); - this.tasks.addTask(1, new EntityAISwimming(this)); - this.tasks.addTask(2, this.aiSit); - this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); - this.tasks.addTask(4, new EntityAIWander(this, 1.0D)); - this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); - this.tasks.addTask(5, new EntityAILookIdle(this)); - this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this)); - this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this)); - this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true)); - this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false)); - this.setAggro(false); - this.setTamed(false); - - if (par1World != null && !par1World.isRemote) - { - this.setCombatTask(); - } - } - - @Override - protected void applyEntityAttributes() - { - super.applyEntityAttributes(); - //This line affects the speed of the monster - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.40000001192092896D); - float maxTamedHealth = 20.0F; - float maxUntamedHealth = 10.0F; - - //My guess is that this will alter the max health - if (this.isTamed()) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - - @Override - /** - * Attack the specified entity using a ranged attack. - */ - public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) - { - MudProjectile hol = new MudProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 3, 600, false); - this.worldObj.spawnEntityInWorld(hol); - } - - /** - * sets this entity's combat AI. - */ - public void setCombatTask() - { - this.tasks.removeTask(this.aiAttackOnCollide); - this.tasks.removeTask(this.aiArrowAttack); - this.tasks.addTask(4, this.aiArrowAttack); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java deleted file mode 100644 index 449a1ea2..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java +++ /dev/null @@ -1,26 +0,0 @@ -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; - -public class EntityWaterElemental extends EntityElemental implements IMob -{ - public EntityWaterElemental(World world) - { - super(world, AlchemicalWizardry.entityWaterElementalID); - } - - @Override - public void inflictEffectOnEntity(Entity target) - { - if (target instanceof EntityLivingBase) - { - ((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 100, 2)); - ((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java deleted file mode 100644 index ef2de0c2..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java +++ /dev/null @@ -1,95 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.mob; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IRangedAttackMob; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIArrowAttack; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.pathfinding.PathNavigateGround; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; -import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; - -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); - - public EntityWingedFireDemon(World par1World) - { - super(par1World, AlchemicalWizardry.entityWingedFireDemonID); - this.setSize(0.7F, 1.8F); - ((PathNavigateGround)this.getNavigator()).func_179690_a(true); - this.tasks.addTask(1, new EntityAISwimming(this)); - this.tasks.addTask(2, this.aiSit); - this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); - this.tasks.addTask(4, new EntityAIWander(this, 1.0D)); - this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); - this.tasks.addTask(6, new EntityAILookIdle(this)); - this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this)); - this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this)); - this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true)); - this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false)); - this.setAggro(false); - this.setTamed(false); - - if (par1World != null && !par1World.isRemote) - { - this.setCombatTask(); - } - - this.isImmuneToFire = true; - } - - @Override - protected void applyEntityAttributes() - { - super.applyEntityAttributes(); - //This line affects the speed of the monster - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D); - float maxTamedHealth = 100.0F; - float maxUntamedHealth = 200.0F; - - //My guess is that this will alter the max health - if (this.isTamed()) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - - //this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D); - } - - @Override - /** - * Attack the specified entity using a ranged attack. - */ - public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) - { - this.worldObj.playAuxSFXAtEntity(null, 1009, this.getPosition(), 0); - FireProjectile hol = new FireProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 20, 600); - this.worldObj.spawnEntityInWorld(hol); - } - - /** - * sets this entity's combat AI. - */ - public void setCombatTask() - { - this.tasks.removeTask(this.aiAttackOnCollide); - this.tasks.removeTask(this.aiArrowAttack); - this.tasks.addTask(4, this.aiArrowAttack); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java deleted file mode 100644 index 26ddfa57..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java +++ /dev/null @@ -1,73 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.mob; - -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 net.minecraftforge.fml.common.Optional; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; - -public class MailOrderEntityItem extends EntityItem -{ - public MailOrderEntityItem(World par1World, double par2, double par4, double par6) - { - super(par1World, par2, par4, par6); - this.isImmuneToFire = true; - this.lifespan = 72000; - } - - public MailOrderEntityItem(World par1World, double par2, double par4, double par6, ItemStack par8ItemStack) - { - this(par1World, par2, par4, par6); - this.setEntityItemStack(par8ItemStack); - this.isImmuneToFire = true; - this.lifespan = (par8ItemStack.getItem() == null ? 6000 : par8ItemStack.getItem().getEntityLifespan(par8ItemStack, par1World)); - } - - public MailOrderEntityItem(World world, Entity original, ItemStack stack) - { - this(world, original.posX, original.posY, original.posZ); - this.setDefaultPickupDelay(); - this.motionX = original.motionX; - this.motionY = original.motionY; - this.motionZ = original.motionZ; - this.setEntityItemStack(stack); - this.isImmuneToFire = true; - } - - public MailOrderEntityItem(World par1world) - { - super(par1world); - } - - public void onUpdate() - { - super.onUpdate(); - - if(!worldObj.isRemote && this.ticksExisted > 100 && !this.isDead) - { - worldObj.addWeatherEffect(new EntityLightningBolt(worldObj, this.posX, this.posY, this.posZ)); - - if(AlchemicalWizardry.isPneumaticCraftLoaded) - { - this.deliverItemViaDrone(this.posX, this.posY, this.posZ); - }else - { -// EntityItem entity = new BookEntityItem(worldObj, this.posX, this.posY, this.posZ, GuideRegistry.getItemStackForBook(BloodMagicGuide.bloodMagicGuide)); -// entity.lifespan = 6000; -// entity.setDefaultPickupDelay(); -// entity.motionY = 1; -// worldObj.spawnEntityInWorld(entity); - } - - this.setDead(); - } - } - - @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)); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java deleted file mode 100644 index 57cde54c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java +++ /dev/null @@ -1,478 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.projectile; - -import java.util.Iterator; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IProjectile; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; -import net.minecraftforge.fml.common.registry.IThrowableEntity; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -//Shamelessly ripped off from x3n0ph0b3 //Shame! -public class EnergyBlastProjectile extends Entity implements IProjectile, IThrowableEntity -{ - protected int xTile = -1; - protected int yTile = -1; - protected int zTile = -1; - protected int inTile = 0; - protected int inData = 0; - protected boolean inGround = false; - /** - * The owner of this arrow. - */ - public EntityLivingBase shootingEntity; - protected int ticksInAir = 0; - protected int maxTicksInAir = 600; - protected int projectileDamage; - - public EnergyBlastProjectile(World par1World) - { - super(par1World); - this.setSize(0.5F, 0.5F); - this.maxTicksInAir = 600; - } - - public EnergyBlastProjectile(World par1World, double par2, double par4, double par6) - { - super(par1World); - this.setSize(0.5F, 0.5F); - this.setPosition(par2, par4, par6); - this.maxTicksInAir = 600; - } - - public EnergyBlastProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage) - { - super(par1World); - shootingEntity = par2EntityPlayer; - float par3 = 0.8F; - this.setSize(0.5F, 0.5F); - this.setLocationAndAngles(par2EntityPlayer.posX, par2EntityPlayer.posY + par2EntityPlayer.getEyeHeight(), par2EntityPlayer.posZ, par2EntityPlayer.rotationYaw, par2EntityPlayer.rotationPitch); - posX -= MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; - posY -= 0.2D; - posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; - this.setPosition(posX, posY, posZ); - motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); - motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); - motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); - this.setThrowableHeading(motionX, motionY, motionZ, par3 * 1.5F, 1.0F); - this.projectileDamage = damage; - this.maxTicksInAir = 600; - } - - 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; - this.setSize(0.5F, 0.5F); - this.setLocationAndAngles(posX, posY, posZ, rotationYaw, rotationPitch); - posX -= MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; - posY -= 0.2D; - posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; - this.setPosition(posX, posY, posZ); - motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); - motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); - motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); - this.setThrowableHeading(motionX, motionY, motionZ, par3 * 1.5F, 1.0F); - this.projectileDamage = damage; - this.maxTicksInAir = 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; - this.posY = par2EntityLivingBase.posY + (double) par2EntityLivingBase.getEyeHeight() - 0.10000000149011612D; - double d0 = par3EntityLivingBase.posX - par2EntityLivingBase.posX; - double d1 = par3EntityLivingBase.getBoundingBox().minY + (double) (par3EntityLivingBase.height / 1.5F) - this.posY; - double d2 = par3EntityLivingBase.posZ - par2EntityLivingBase.posZ; - double d3 = (double) MathHelper.sqrt_double(d0 * d0 + d2 * d2); - - if (d3 >= 1.0E-7D) - { - float f2 = (float) (Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; - float f3 = (float) (-(Math.atan2(d1, d3) * 180.0D / Math.PI)); - double d4 = d0 / d3; - double d5 = d2 / d3; - this.setLocationAndAngles(par2EntityLivingBase.posX + d4, this.posY, par2EntityLivingBase.posZ + d5, f2, f3); - this.setThrowableHeading(d0, d1, d2, par4, par5); - } - - this.projectileDamage = damage; - this.maxTicksInAir = maxTicksInAir; - } - - @Override - protected void entityInit() - { - dataWatcher.addObject(16, Byte.valueOf((byte) 0)); - } - - /** - * 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) - { - float var9 = MathHelper.sqrt_double(var1 * var1 + var3 * var3 + var5 * var5); - var1 /= var9; - var3 /= var9; - var5 /= var9; - var1 += rand.nextGaussian() * 0.007499999832361937D * var8; - var3 += rand.nextGaussian() * 0.007499999832361937D * var8; - var5 += rand.nextGaussian() * 0.007499999832361937D * var8; - var1 *= var7; - var3 *= var7; - var5 *= var7; - motionX = var1; - motionY = var3; - motionZ = var5; - float var10 = MathHelper.sqrt_double(var1 * var1 + var5 * var5); - prevRotationYaw = rotationYaw = (float) (Math.atan2(var1, var5) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch = (float) (Math.atan2(var3, var10) * 180.0D / Math.PI); - } - - @Override - @SideOnly(Side.CLIENT) - /** - * Sets the velocity to the args. Args: x, y, z - */ - public void setVelocity(double par1, double par3, double par5) - { - motionX = par1; - motionY = par3; - motionZ = par5; - - if (prevRotationPitch == 0.0F && prevRotationYaw == 0.0F) - { - float var7 = MathHelper.sqrt_double(par1 * par1 + par5 * par5); - prevRotationYaw = rotationYaw = (float) (Math.atan2(par1, par5) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch = (float) (Math.atan2(par3, var7) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch; - prevRotationYaw = rotationYaw; - this.setLocationAndAngles(posX, posY, posZ, rotationYaw, rotationPitch); - } - } - - /** - * Called to update the entity's position/logic. - */ - @Override - public void onUpdate() - { - super.onUpdate(); - - if (ticksInAir > maxTicksInAir) - { - this.setDead(); - } - - if (shootingEntity == null) - { - List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(posX - 1, posY - 1, posZ - 1, posX + 1, posY + 1, posZ + 1)); - Iterator i = players.iterator(); - double closestDistance = Double.MAX_VALUE; - EntityPlayer closestPlayer = null; - - while (i.hasNext()) - { - EntityPlayer e = (EntityPlayer) i.next(); - double distance = e.getDistanceToEntity(this); - - if (distance < closestDistance) - { - closestPlayer = e; - } - } - - if (closestPlayer != null) - { - shootingEntity = closestPlayer; - } - } - - if (prevRotationPitch == 0.0F && prevRotationYaw == 0.0F) - { - float var1 = MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ); - prevRotationYaw = rotationYaw = (float) (Math.atan2(motionX, motionZ) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch = (float) (Math.atan2(motionY, var1) * 180.0D / Math.PI); - } - - IBlockState state = worldObj.getBlockState(new BlockPos(xTile, yTile, zTile)); - Block var16 = state.getBlock(); - - if (var16 != null) - { - var16.setBlockBoundsBasedOnState(worldObj, new BlockPos(xTile, yTile, zTile)); - AxisAlignedBB var2 = var16.getCollisionBoundingBox(worldObj, new BlockPos(xTile, yTile, zTile), state); - - if (var2 != null && var2.isVecInside(new Vec3(posX, posY, posZ))) - { - inGround = true; - } - } - - if (!inGround) - { - ++ticksInAir; - - if (ticksInAir > 1 && ticksInAir < 3) - { - for (int particles = 0; particles < 3; particles++) - { - this.doFiringParticles(); - } - } - - Vec3 var17 = new Vec3(posX, posY, posZ); - Vec3 var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ); - MovingObjectPosition var4 = worldObj.rayTraceBlocks(var17, var3, true, false, false); - var17 = new Vec3(posX, posY, posZ); - var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ); - - if (var4 != null) - { - var3 = new Vec3(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord); - } - - Entity var5 = null; - List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(this, getBoundingBox().addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); - double var7 = 0.0D; - Iterator var9 = var6.iterator(); - float var11; - boolean scheduledForDeath = false; - - while (var9.hasNext()) - { - Entity var10 = (Entity) var9.next(); - - if (var10.canBeCollidedWith() && (var10 != shootingEntity || ticksInAir >= 5)) - { - var11 = 0.3F; - AxisAlignedBB var12 = var10.getBoundingBox().expand(var11, var11, var11); - MovingObjectPosition var13 = var12.calculateIntercept(var17, var3); - - if (var13 != null) - { - double var14 = var17.distanceTo(var13.hitVec); - - if (var14 < var7 || var7 == 0.0D) - { - var5 = var10; - var7 = var14; - } - } - } - } - - if (var5 != null) - { - var4 = new MovingObjectPosition(var5); - } - - if (var4 != null) - { - this.onImpact(var4); - - if (scheduledForDeath) - { - this.setDead(); - } - } - - posX += motionX; - posY += motionY; - posZ += motionZ; - MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ); - this.setPosition(posX, posY, posZ); - } - } - - public void doFiringParticles() - { - worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - worldObj.spawnParticle(EnumParticleTypes.FLAME, posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - @Override - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - par1NBTTagCompound.setShort("xTile", (short) xTile); - par1NBTTagCompound.setShort("yTile", (short) yTile); - par1NBTTagCompound.setShort("zTile", (short) zTile); - par1NBTTagCompound.setByte("inTile", (byte) inTile); - par1NBTTagCompound.setByte("inData", (byte) inData); - par1NBTTagCompound.setByte("inGround", (byte) (inGround ? 1 : 0)); - par1NBTTagCompound.setInteger("ticksInAir", ticksInAir); - par1NBTTagCompound.setInteger("maxTicksInAir", maxTicksInAir); - par1NBTTagCompound.setInteger("projectileDamage", this.projectileDamage); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - @Override - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - xTile = par1NBTTagCompound.getShort("xTile"); - yTile = par1NBTTagCompound.getShort("yTile"); - zTile = par1NBTTagCompound.getShort("zTile"); - inTile = par1NBTTagCompound.getByte("inTile") & 255; - inData = par1NBTTagCompound.getByte("inData") & 255; - inGround = par1NBTTagCompound.getByte("inGround") == 1; - ticksInAir = par1NBTTagCompound.getInteger("ticksInAir"); - maxTicksInAir = par1NBTTagCompound.getInteger("maxTicksInAir"); - projectileDamage = par1NBTTagCompound.getInteger("projectileDamage"); - } - - /** - * 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() - { - return false; - } - - /** - * If returns false, the item will not inflict any damage against entities. - */ - @Override - public boolean canAttackWithItem() - { - return false; - } - - /** - * Whether the arrow has a stream of critical hit particles flying behind - * it. - */ - public void setIsCritical(boolean par1) - { - byte var2 = dataWatcher.getWatchableObjectByte(16); - - if (par1) - { - dataWatcher.updateObject(16, Byte.valueOf((byte) (var2 | 1))); - } else - { - dataWatcher.updateObject(16, Byte.valueOf((byte) (var2 & -2))); - } - } - - /** - * Whether the arrow has a stream of critical hit particles flying behind - * it. - */ - public boolean getIsCritical() - { - byte var1 = dataWatcher.getWatchableObjectByte(16); - return (var1 & 1) != 0; - } - - public void onImpact(MovingObjectPosition mop) - { - if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) - { - if (mop.entityHit == shootingEntity) - { - return; - } - - this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - worldObj.createExplosion(shootingEntity, this.posX, this.posY, this.posZ, (float) (0.1), true); - this.setDead(); - } - } - - public void onImpact(Entity mop) - { - if (mop == shootingEntity && ticksInAir > 3) - { - shootingEntity.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); - this.setDead(); - } else - { - if (mop instanceof EntityLivingBase) - { - ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60, 2)); - } - doDamage(projectileDamage, mop); - worldObj.createExplosion(shootingEntity, this.posX, this.posY, this.posZ, (float) (0.1), true); - } - - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); - this.setDead(); - } - - protected void spawnHitParticles(EnumParticleTypes type, int i) - { - for (int particles = 0; particles < i; particles++) - { - worldObj.spawnParticle(type, posX, posY - (type == EnumParticleTypes.PORTAL ? 1 : 0), posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); - } - } - - protected void doDamage(int i, Entity mop) - { - mop.attackEntityFrom(this.getDamageSource(), i); - } - - public DamageSource getDamageSource() - { - return DamageSource.causeMobDamage(shootingEntity); - } - - public double smallGauss(double d) - { - return (worldObj.rand.nextFloat() - 0.5D) * d; - } - - public double gaussian(double d) - { - return d + d * ((rand.nextFloat() - 0.5D) / 4); - } - - private int getRicochetMax() - { - return 0; - } - - @Override - public Entity getThrower() - { - // TODO Auto-generated method stub - return this.shootingEntity; - } - - @Override - public void setThrower(Entity entity) - { - if (entity instanceof EntityLivingBase) - this.shootingEntity = (EntityLivingBase) entity; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java deleted file mode 100644 index 4b1665fb..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java +++ /dev/null @@ -1,97 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.projectile; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumParticleTypes; -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); - } - - public EntityBloodLightProjectile(World par1World, double par2, double par4, double par6) - { - super(par1World, par2, par4, par6); - } - - public EntityBloodLightProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage) - { - super(par1World, par2EntityPlayer, damage); - } - - 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) - { - super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); - } - - @Override - public DamageSource getDamageSource() - { - return DamageSource.causeMobDamage(shootingEntity); - } - - @Override - public void onImpact(MovingObjectPosition mop) - { - if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) - { - if (mop.entityHit == shootingEntity) - { - return; - } - - this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - EnumFacing facing = mop.field_178784_b; - BlockPos position = mop.func_178782_a().offset(facing); - - if(this.worldObj.isAirBlock(position)) - { - this.worldObj.setBlockState(position, ModBlocks.blockBloodLight.getDefaultState()); - } - } - - this.setDead(); - } - - @Override - public void onImpact(Entity mop) - { - if (mop == shootingEntity && ticksInAir > 3) - { - shootingEntity.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); - this.setDead(); - } else - { - if (mop instanceof EntityLivingBase) - { - ((EntityLivingBase) mop).setRevengeTarget(shootingEntity); - doDamage(1, mop); - } - } - - BlockPos pos = new BlockPos(this.posX, this.posY, this.posZ); - if (worldObj.isAirBlock(pos)) - { - worldObj.setBlockState(pos, Blocks.fire.getDefaultState()); - } - - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); - this.setDead(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java deleted file mode 100644 index 55f8b9f0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java +++ /dev/null @@ -1,100 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.projectile; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -public class EntityEnergyBazookaMainProjectile extends EnergyBlastProjectile -{ - public EntityEnergyBazookaMainProjectile(World par1World) - { - super(par1World); - } - - public EntityEnergyBazookaMainProjectile(World par1World, double par2, double par4, double par6) - { - super(par1World, par2, par4, par6); - } - - public EntityEnergyBazookaMainProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage) - { - super(par1World, par2EntityPlayer, damage); - } - - 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) - { - super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); - } - - @Override - public DamageSource getDamageSource() - { - return DamageSource.causeMobDamage(shootingEntity); - } - - @Override - public void onImpact(MovingObjectPosition mop) - { - if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) - { - if (mop.entityHit == shootingEntity) - { - return; - } - - this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - worldObj.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, 5.0f, false); - this.spawnSecondaryProjectiles(); - } - - this.setDead(); - } - - @Override - public void onImpact(Entity mop) - { - if (mop == shootingEntity && ticksInAir > 3) - { - shootingEntity.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); - this.setDead(); - } else - { - if (mop instanceof EntityLivingBase) - { - spawnSecondaryProjectiles(); - } - - worldObj.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, 5.0f, false); - } - - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); - this.setDead(); - } - - public void spawnSecondaryProjectiles() - { - for (int i = 0; i < 20; i++) - { - EntityEnergyBazookaSecondaryProjectile secProj = new EntityEnergyBazookaSecondaryProjectile(worldObj, this.posX, this.posY, this.posZ, 15); - secProj.shootingEntity = this.shootingEntity; - float xVel = rand.nextFloat() - rand.nextFloat(); - float yVel = rand.nextFloat() - rand.nextFloat(); - float zVel = rand.nextFloat() - rand.nextFloat(); - float wantedVel = 0.5f; - secProj.motionX = xVel * wantedVel; - secProj.motionY = yVel * wantedVel; - secProj.motionZ = zVel * wantedVel; - worldObj.spawnEntityInWorld(secProj); - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java deleted file mode 100644 index ad105632..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java +++ /dev/null @@ -1,481 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.projectile; - -import java.util.Iterator; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IProjectile; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectile implements IProjectile -{ - private int xTile = -1; - private int yTile = -1; - private int zTile = -1; - private int inTile = 0; - private int inData = 0; - private boolean inGround = false; - /** - * The owner of this arrow. - */ - public EntityLivingBase shootingEntity; - private int ticksInAir = 0; - private int ricochetCounter = 0; - private boolean scheduledForDeath = false; - public int damage; - - public EntityEnergyBazookaSecondaryProjectile(World par1World) - { - super(par1World); - this.setSize(0.5F, 0.5F); - damage = 5; - } - - public EntityEnergyBazookaSecondaryProjectile(World par1World, double par2, double par4, double par6, int damage) - { - super(par1World); - this.setSize(0.5F, 0.5F); - this.setPosition(par2, par4, par6); - this.damage = damage; - } - - public EntityEnergyBazookaSecondaryProjectile(World par1World, EntityPlayer par2EntityPlayer, int damage) - { - super(par1World); - shootingEntity = par2EntityPlayer; - float par3 = 0.8F; - this.setSize(0.1F, 0.1F); - this.setLocationAndAngles(par2EntityPlayer.posX, par2EntityPlayer.posY + par2EntityPlayer.getEyeHeight(), par2EntityPlayer.posZ, par2EntityPlayer.rotationYaw, par2EntityPlayer.rotationPitch); - posX -= MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; - posY -= 0.2D; - posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; - this.setPosition(posX, posY, posZ); - motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); - motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); - motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); - this.setThrowableHeading(motionX, motionY, motionZ, par3 * 1.5F, 1.0F); - this.damage = damage; - } - - @Override - protected void entityInit() - { - dataWatcher.addObject(16, Byte.valueOf((byte) 0)); - } - - /** - * 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) - { - float var9 = MathHelper.sqrt_double(var1 * var1 + var3 * var3 + var5 * var5); - var1 /= var9; - var3 /= var9; - var5 /= var9; - var1 += rand.nextGaussian() * 0.007499999832361937D * var8; - var3 += rand.nextGaussian() * 0.007499999832361937D * var8; - var5 += rand.nextGaussian() * 0.007499999832361937D * var8; - var1 *= var7; - var3 *= var7; - var5 *= var7; - motionX = var1; - motionY = var3; - motionZ = var5; - float var10 = MathHelper.sqrt_double(var1 * var1 + var5 * var5); - prevRotationYaw = rotationYaw = (float) (Math.atan2(var1, var5) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch = (float) (Math.atan2(var3, var10) * 180.0D / Math.PI); - } - - @Override - @SideOnly(Side.CLIENT) - /** - * Sets the velocity to the args. Args: x, y, z - */ - public void setVelocity(double par1, double par3, double par5) - { - motionX = par1; - motionY = par3; - motionZ = par5; - - if (prevRotationPitch == 0.0F && prevRotationYaw == 0.0F) - { - float var7 = MathHelper.sqrt_double(par1 * par1 + par5 * par5); - prevRotationYaw = rotationYaw = (float) (Math.atan2(par1, par5) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch = (float) (Math.atan2(par3, var7) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch; - prevRotationYaw = rotationYaw; - this.setLocationAndAngles(posX, posY, posZ, rotationYaw, rotationPitch); - } - } - - /** - * Called to update the entity's position/logic. - */ - @Override - public void onUpdate() - { - super.onUpdate(); - - if (ticksInAir > maxTicksInAir) - { - this.setDead(); - } - - if (shootingEntity == null) - { - List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(posX - 1, posY - 1, posZ - 1, posX + 1, posY + 1, posZ + 1)); - Iterator i = players.iterator(); - double closestDistance = Double.MAX_VALUE; - EntityPlayer closestPlayer = null; - - while (i.hasNext()) - { - EntityPlayer e = (EntityPlayer) i.next(); - double distance = e.getDistanceToEntity(this); - - if (distance < closestDistance) - { - closestPlayer = e; - } - } - - if (closestPlayer != null) - { - shootingEntity = closestPlayer; - } - } - - if (prevRotationPitch == 0.0F && prevRotationYaw == 0.0F) - { - float var1 = MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ); - prevRotationYaw = rotationYaw = (float) (Math.atan2(motionX, motionZ) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch = (float) (Math.atan2(motionY, var1) * 180.0D / Math.PI); - } - - IBlockState state = worldObj.getBlockState(new BlockPos(xTile, yTile, zTile)); - Block var16 = state.getBlock(); - - if (var16 != null) - { - var16.setBlockBoundsBasedOnState(worldObj, new BlockPos(xTile, yTile, zTile)); - AxisAlignedBB var2 = var16.getCollisionBoundingBox(worldObj, new BlockPos(xTile, yTile, zTile), state); - - if (var2 != null && var2.isVecInside(new Vec3(posX, posY, posZ))) - { - inGround = true; - } - } - - if (!inGround) - { - ++ticksInAir; - - if (ticksInAir > 1 && ticksInAir < 3) - { - for (int particles = 0; particles < 3; particles++) - { - this.doFiringParticles(); - } - } - - Vec3 var17 = new Vec3(posX, posY, posZ); - Vec3 var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ); - MovingObjectPosition var4 = worldObj.rayTraceBlocks(var17, var3, true, false, false); - var17 = new Vec3(posX, posY, posZ); - var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ); - - if (var4 != null) - { - var3 = new Vec3(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord); - } - - Entity var5 = null; - List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(this, getBoundingBox().addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); - double var7 = 0.0D; - Iterator var9 = var6.iterator(); - float var11; - - while (var9.hasNext()) - { - Entity var10 = (Entity) var9.next(); - - if (var10.canBeCollidedWith() && (var10 != shootingEntity || ticksInAir >= 5)) - { - var11 = 0.3F; - AxisAlignedBB var12 = var10.getBoundingBox().expand(var11, var11, var11); - MovingObjectPosition var13 = var12.calculateIntercept(var17, var3); - - if (var13 != null) - { - double var14 = var17.distanceTo(var13.hitVec); - - if (var14 < var7 || var7 == 0.0D) - { - var5 = var10; - var7 = var14; - } - } - } - } - - if (var5 != null) - { - var4 = new MovingObjectPosition(var5); - } - - if (var4 != null) - { - this.onImpact(var4); - - if (scheduledForDeath) - { - this.setDead(); - } - } - - posX += motionX; - posY += motionY; - posZ += motionZ; - MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ); - this.setPosition(posX, posY, posZ); - } - } - - public void doFiringParticles() - { - worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - worldObj.spawnParticle(EnumParticleTypes.FLAME, posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - @Override - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - par1NBTTagCompound.setShort("xTile", (short) xTile); - par1NBTTagCompound.setShort("yTile", (short) yTile); - par1NBTTagCompound.setShort("zTile", (short) zTile); - par1NBTTagCompound.setByte("inTile", (byte) inTile); - par1NBTTagCompound.setByte("inData", (byte) inData); - par1NBTTagCompound.setByte("inGround", (byte) (inGround ? 1 : 0)); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - @Override - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - xTile = par1NBTTagCompound.getShort("xTile"); - yTile = par1NBTTagCompound.getShort("yTile"); - zTile = par1NBTTagCompound.getShort("zTile"); - inTile = par1NBTTagCompound.getByte("inTile") & 255; - inData = par1NBTTagCompound.getByte("inData") & 255; - inGround = par1NBTTagCompound.getByte("inGround") == 1; - } - - /** - * 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() - { - return false; - } - - /** - * If returns false, the item will not inflict any damage against entities. - */ - @Override - public boolean canAttackWithItem() - { - return false; - } - - @Override - /** - * Whether the arrow has a stream of critical hit particles flying behind - * it. - */ - public void setIsCritical(boolean par1) - { - byte var2 = dataWatcher.getWatchableObjectByte(16); - - if (par1) - { - dataWatcher.updateObject(16, Byte.valueOf((byte) (var2 | 1))); - } else - { - dataWatcher.updateObject(16, Byte.valueOf((byte) (var2 & -2))); - } - } - - @Override - /** - * Whether the arrow has a stream of critical hit particles flying behind - * it. - */ - public boolean getIsCritical() - { - byte var1 = dataWatcher.getWatchableObjectByte(16); - return (var1 & 1) != 0; - } - - @Override - public void onImpact(MovingObjectPosition mop) - { - if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) - { - if (mop.entityHit == shootingEntity) - { - return; - } - - this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - this.groundImpact(mop.field_178784_b); - worldObj.createExplosion(shootingEntity, posX, posY, posZ, 2, false); - } - } - - @Override - public void onImpact(Entity mop) - { - if (mop == shootingEntity && ticksInAir > 3) - { - shootingEntity.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); - this.setDead(); - } else - { - doDamage(this.damage + d6(), mop); - worldObj.createExplosion(shootingEntity, posX, posY, posZ, 2, false); - } - - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); - this.setDead(); - } - - private int d6() - { - return rand.nextInt(6) + 1; - } - - @Override - protected void spawnHitParticles(EnumParticleTypes type, int i) - { - for (int particles = 0; particles < i; particles++) - { - worldObj.spawnParticle(type, posX, posY - (type == EnumParticleTypes.PORTAL ? 1 : 0), posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); - } - } - - @Override - public void doDamage(int i, Entity mop) - { - mop.attackEntityFrom(this.getDamageSource(), i); - } - - @Override - public DamageSource getDamageSource() - { - return DamageSource.causeMobDamage(shootingEntity); - } - - public void groundImpact(EnumFacing sideHit) - { - this.ricochet(sideHit); - } - - @Override - public double smallGauss(double d) - { - return (worldObj.rand.nextFloat() - 0.5D) * d; - } - - @Override - public double gaussian(double d) - { - return d + d * ((rand.nextFloat() - 0.5D) / 4); - } - - private void ricochet(EnumFacing sideHit) - { - if(sideHit.getFrontOffsetX() != 0) - { - motionX *= -1; - } - - if(sideHit.getFrontOffsetY() != 0) - { - motionY *= -1; - } - - if(sideHit.getFrontOffsetZ() != 0) - { - motionZ *= -1; - } - - ricochetCounter++; - - if (ricochetCounter > this.getRicochetMax()) - { - scheduledForDeath = true; - - for (int particles = 0; particles < 4; particles++) - { - worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); -// switch (sideHit) -// { -// case 0: -// worldObj.spawnParticle("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)); -// break; -// -// case 2: -// worldObj.spawnParticle("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)); -// break; -// -// case 4: -// worldObj.spawnParticle("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)); -// break; -// } - } - } - } - - private int getRicochetMax() - { - return 3; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java deleted file mode 100644 index 9b234851..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java +++ /dev/null @@ -1,90 +0,0 @@ -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; - -public class EntityMeteor extends EnergyBlastProjectile -{ - private int meteorID; - - public boolean hasTerrae; - public boolean hasOrbisTerrae; - public boolean hasCrystallos; - public boolean hasIncendium; - public boolean hasTennebrae; - - public EntityMeteor(World par1World) - { - super(par1World); - this.meteorID = 0; - } - - public EntityMeteor(World par1World, double par2, double par4, double par6, int meteorID) - { - super(par1World, par2, par4, par6); - this.meteorID = meteorID; - } - - @Override - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeEntityToNBT(par1NBTTagCompound); - - par1NBTTagCompound.setInteger("meteorID", meteorID); - par1NBTTagCompound.setBoolean("hasTerrae", hasTerrae); - par1NBTTagCompound.setBoolean("hasOrbisTerrae", hasOrbisTerrae); - par1NBTTagCompound.setBoolean("hasCrystallos", hasCrystallos); - par1NBTTagCompound.setBoolean("hasIncendium", hasIncendium); - par1NBTTagCompound.setBoolean("hasTennebrae", hasTennebrae); - } - - @Override - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readEntityFromNBT(par1NBTTagCompound); - - meteorID = par1NBTTagCompound.getInteger("meteorID"); - hasTerrae = par1NBTTagCompound.getBoolean("hasTerrae"); - hasOrbisTerrae = par1NBTTagCompound.getBoolean("hasOrbisTerrae"); - hasIncendium = par1NBTTagCompound.getBoolean("hasIncendium"); - hasCrystallos = par1NBTTagCompound.getBoolean("hasCrystallos"); - hasTennebrae = par1NBTTagCompound.getBoolean("hasTennebrae"); - } - - @Override - public DamageSource getDamageSource() - { - return DamageSource.fallingBlock; - } - - @Override - public void onImpact(MovingObjectPosition mop) - { - if (worldObj.isRemote) - { - return; - } - - if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) - { - this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - MeteorRegistry.createMeteorImpact(worldObj, mop.func_178782_a(), this.meteorID, new boolean[]{hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae}); - } - - this.setDead(); - } - - @Override - public void onImpact(Entity mop) - { - MeteorRegistry.createMeteorImpact(worldObj, this.getPosition(), 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 deleted file mode 100644 index 32ac5547..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityParticleBeam.java +++ /dev/null @@ -1,316 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.projectile; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IProjectile; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraftforge.fml.common.registry.IThrowableEntity; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -//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; - protected int inTile = 0; - protected int inData = 0; - protected float colourRed = 0f; - protected float colourGreen = 0f; - protected float colourBlue = 0f; - protected int xDest = 0; - protected int yDest = 0; - protected int zDest = 0; - protected boolean inGround = false; - /** - * The owner of this arrow. - */ - public EntityLivingBase shootingEntity; - protected int ticksInAir = 0; - protected int maxTicksInAir = 600; - private boolean scheduledForDeath = false; - protected int projectileDamage; - - public EntityParticleBeam(World par1World) - { - super(par1World); - this.setSize(0.5F, 0.5F); - this.maxTicksInAir = 600; - } - - public EntityParticleBeam(World par1World, double par2, double par4, double par6) - { - super(par1World); - this.setSize(0.5F, 0.5F); - this.setPosition(par2, par4, par6); - this.maxTicksInAir = 600; - } - - public EntityParticleBeam(World par1World, EntityLivingBase par2EntityPlayer, int damage) - { - super(par1World); - shootingEntity = par2EntityPlayer; - float par3 = 0.8F; - this.setSize(0.5F, 0.5F); - this.setLocationAndAngles(par2EntityPlayer.posX, par2EntityPlayer.posY + par2EntityPlayer.getEyeHeight(), par2EntityPlayer.posZ, par2EntityPlayer.rotationYaw, par2EntityPlayer.rotationPitch); - posX -= MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; - posY -= 0.2D; - posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; - this.setPosition(posX, posY, posZ); - motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); - motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); - motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); - this.setThrowableHeading(motionX, motionY, motionZ, par3 * 1.5F, 1.0F); - this.projectileDamage = damage; - this.maxTicksInAir = 600; - } - - 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; - this.setSize(0.5F, 0.5F); - this.setLocationAndAngles(posX, posY, posZ, rotationYaw, rotationPitch); - posX -= MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; - posY -= 0.2D; - posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; - this.setPosition(posX, posY, posZ); - motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); - motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); - motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); - this.setThrowableHeading(motionX, motionY, motionZ, par3 * 1.5F, 1.0F); - this.projectileDamage = damage; - this.maxTicksInAir = 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; - this.posY = par2EntityLivingBase.posY + (double) par2EntityLivingBase.getEyeHeight() - 0.10000000149011612D; - double d0 = par3EntityLivingBase.posX - par2EntityLivingBase.posX; - double d1 = par3EntityLivingBase.getBoundingBox().minY + (double) (par3EntityLivingBase.height / 1.5F) - this.posY; - double d2 = par3EntityLivingBase.posZ - par2EntityLivingBase.posZ; - double d3 = (double) MathHelper.sqrt_double(d0 * d0 + d2 * d2); - - if (d3 >= 1.0E-7D) - { - float f2 = (float) (Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; - float f3 = (float) (-(Math.atan2(d1, d3) * 180.0D / Math.PI)); - double d4 = d0 / d3; - double d5 = d2 / d3; - this.setLocationAndAngles(par2EntityLivingBase.posX + d4, this.posY, par2EntityLivingBase.posZ + d5, f2, f3); - this.setThrowableHeading(d0, d1, d2, par4, par5); - } - - this.projectileDamage = damage; - this.maxTicksInAir = maxTicksInAir; - } - - @Override - protected void entityInit() - { - dataWatcher.addObject(16, Byte.valueOf((byte) 0)); - } - - /** - * 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) - { - float var9 = MathHelper.sqrt_double(var1 * var1 + var3 * var3 + var5 * var5); - var1 /= var9; - var3 /= var9; - var5 /= var9; - var1 += rand.nextGaussian() * 0.007499999832361937D * var8; - var3 += rand.nextGaussian() * 0.007499999832361937D * var8; - var5 += rand.nextGaussian() * 0.007499999832361937D * var8; - var1 *= var7; - var3 *= var7; - var5 *= var7; - motionX = var1; - motionY = var3; - motionZ = var5; - float var10 = MathHelper.sqrt_double(var1 * var1 + var5 * var5); - prevRotationYaw = rotationYaw = (float) (Math.atan2(var1, var5) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch = (float) (Math.atan2(var3, var10) * 180.0D / Math.PI); - } - - @Override - @SideOnly(Side.CLIENT) - /** - * Sets the velocity to the args. Args: x, y, z - */ - public void setVelocity(double par1, double par3, double par5) - { - motionX = par1; - motionY = par3; - motionZ = par5; - - if (prevRotationPitch == 0.0F && prevRotationYaw == 0.0F) - { - float var7 = MathHelper.sqrt_double(par1 * par1 + par5 * par5); - prevRotationYaw = rotationYaw = (float) (Math.atan2(par1, par5) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch = (float) (Math.atan2(par3, var7) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch; - prevRotationYaw = rotationYaw; - this.setLocationAndAngles(posX, posY, posZ, rotationYaw, rotationPitch); - } - } - - /** - * Called to update the entity's position/logic. - */ - @Override - public void onUpdate() - { - super.onUpdate(); - - if (ticksInAir > maxTicksInAir) - { - this.setDead(); - } - - posX += motionX; - posY += motionY; - posZ += motionZ; - MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ); - this.setPosition(posX, posY, posZ); - - this.doFiringParticles(); - - if (Math.pow(posX - xDest, 2) + Math.pow(posY - yDest, 2) + Math.pow(posZ - zDest, 2) <= 1) - { - this.scheduledForDeath = true; - } - - if (this.scheduledForDeath) - { - this.setDead(); - } - } - - public void doFiringParticles() - { - if (!worldObj.isRemote) - { - return; - } - - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); -// EntityFX particle = new EntityCloudFX(worldObj, posX, posY, posZ, 0, 0, 0); -// particle.setRBGColorF(colourRed + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), colourGreen + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), colourBlue + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat())); -// FMLClientHandler.instance().getClient().effectRenderer.addEffect(particle); - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - @Override - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - par1NBTTagCompound.setShort("xTile", (short) xTile); - par1NBTTagCompound.setShort("yTile", (short) yTile); - par1NBTTagCompound.setShort("zTile", (short) zTile); - par1NBTTagCompound.setByte("inTile", (byte) inTile); - par1NBTTagCompound.setByte("inData", (byte) inData); - par1NBTTagCompound.setByte("inGround", (byte) (inGround ? 1 : 0)); - par1NBTTagCompound.setInteger("ticksInAir", ticksInAir); - par1NBTTagCompound.setInteger("maxTicksInAir", maxTicksInAir); - par1NBTTagCompound.setInteger("projectileDamage", this.projectileDamage); - par1NBTTagCompound.setFloat("colourRed", colourRed); - par1NBTTagCompound.setFloat("colourGreen", colourGreen); - par1NBTTagCompound.setFloat("colourBlue", colourBlue); - par1NBTTagCompound.setInteger("xDest", xDest); - par1NBTTagCompound.setInteger("yDest", yDest); - par1NBTTagCompound.setInteger("zDest", zDest); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - @Override - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - xTile = par1NBTTagCompound.getShort("xTile"); - yTile = par1NBTTagCompound.getShort("yTile"); - zTile = par1NBTTagCompound.getShort("zTile"); - inTile = par1NBTTagCompound.getByte("inTile") & 255; - inData = par1NBTTagCompound.getByte("inData") & 255; - inGround = par1NBTTagCompound.getByte("inGround") == 1; - ticksInAir = par1NBTTagCompound.getInteger("ticksInAir"); - maxTicksInAir = par1NBTTagCompound.getInteger("maxTicksInAir"); - projectileDamage = par1NBTTagCompound.getInteger("projectileDamage"); - colourRed = par1NBTTagCompound.getFloat("colourRed"); - colourGreen = par1NBTTagCompound.getFloat("colourGreen"); - colourBlue = par1NBTTagCompound.getFloat("colourBlue"); - xDest = par1NBTTagCompound.getInteger("xDest"); - yDest = par1NBTTagCompound.getInteger("yDest"); - zDest = par1NBTTagCompound.getInteger("zDest"); - } - - @Override - protected boolean canTriggerWalking() - { - return false; - } - - public DamageSource getDamageSource() - { - return DamageSource.causeMobDamage(shootingEntity); - } - - public double smallGauss(double d) - { - return (worldObj.rand.nextFloat() - 0.5D) * d; - } - - public double gaussian(double d) - { - return d + d * ((rand.nextFloat() - 0.5D) / 4); - } - - private int getRicochetMax() - { - return 0; - } - - @Override - public Entity getThrower() - { - // TODO Auto-generated method stub - return this.shootingEntity; - } - - @Override - public void setThrower(Entity entity) - { - if (entity instanceof EntityLivingBase) - this.shootingEntity = (EntityLivingBase) entity; - - } - - public void setColour(float red, float green, float blue) - { - this.colourRed = red; - this.colourGreen = green; - this.colourBlue = blue; - } - - public void setDestination(int xDest, int yDest, int zDest) - { - this.xDest = xDest; - this.yDest = yDest; - this.zDest = zDest; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java deleted file mode 100644 index 6ab68863..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java +++ /dev/null @@ -1,112 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.projectile; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -public class ExplosionProjectile extends EnergyBlastProjectile -{ - protected boolean causesEnvDamage; - - public ExplosionProjectile(World par1World) - { - super(par1World); - } - - public ExplosionProjectile(World par1World, double par2, double par4, double par6) - { - super(par1World, par2, par4, par6); - } - - public ExplosionProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage, boolean flag) - { - super(par1World, par2EntityPlayer, damage); - causesEnvDamage = 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, boolean flag) - { - super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); - causesEnvDamage = flag; - } - - @Override - public DamageSource getDamageSource() - { - return DamageSource.causeMobDamage(shootingEntity); - } - - @Override - public void onImpact(MovingObjectPosition mop) - { - if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) - { - if (mop.entityHit == shootingEntity) - { - return; - } - - this.onImpact(mop.entityHit); - - worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float) (2), causesEnvDamage); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float) (2), causesEnvDamage); - } - - this.setDead(); - } - - @Override - public void onImpact(Entity mop) - { - if (mop == shootingEntity && ticksInAir > 3) - { - shootingEntity.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); - this.setDead(); - } else - { - if (mop instanceof EntityLivingBase) - { - doDamage(projectileDamage, mop); - } - } - - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); - this.setDead(); - } - - @Override - public void doFiringParticles() - { - worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - worldObj.spawnParticle(EnumParticleTypes.EXPLOSION_LARGE, posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); - } - - @Override - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeEntityToNBT(par1NBTTagCompound); - par1NBTTagCompound.setBoolean("causesEnvDamage", causesEnvDamage); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - @Override - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readEntityFromNBT(par1NBTTagCompound); - causesEnvDamage = par1NBTTagCompound.getBoolean("causesEnvDamage"); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java deleted file mode 100644 index 19b1086a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java +++ /dev/null @@ -1,112 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.projectile; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.init.Blocks; -import net.minecraft.potion.Potion; -import net.minecraft.util.BlockPos; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -public class FireProjectile extends EnergyBlastProjectile -{ - public FireProjectile(World par1World) - { - super(par1World); - } - - public FireProjectile(World par1World, double par2, double par4, double par6) - { - super(par1World, par2, par4, par6); - } - - public FireProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage) - { - super(par1World, par2EntityPlayer, damage); - } - - 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) - { - super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); - } - - @Override - public DamageSource getDamageSource() - { - return DamageSource.causeMobDamage(shootingEntity); - } - - @Override - public void onImpact(MovingObjectPosition mop) - { - if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) - { - if (mop.entityHit == shootingEntity) - { - return; - } - - this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - for (int i = -1; i <= 1; i++) - { - for (int j = -1; j <= 1; j++) - { - for (int k = -1; k <= 1; k++) - { - BlockPos newPos = new BlockPos(this.posX + i, this.posY + j, this.posZ + k); - if (worldObj.isAirBlock(newPos)) - { - worldObj.setBlockState(newPos, Blocks.fire.getDefaultState()); - } - } - } - } - } - - this.setDead(); - } - - @Override - public void onImpact(Entity mop) - { - if (mop == shootingEntity && ticksInAir > 3) - { - shootingEntity.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); - this.setDead(); - } else - { - if (mop instanceof EntityLivingBase) - { - mop.setFire(10 * this.projectileDamage); - ((EntityLivingBase) mop).setRevengeTarget(shootingEntity); - - if (((EntityLivingBase) mop).isPotionActive(Potion.fireResistance) || mop.isImmuneToFire()) - { - mop.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); - } else - { - doDamage(projectileDamage, mop); - ((EntityLivingBase) mop).hurtResistantTime = 0; - } - } - } - - BlockPos newPos = new BlockPos(this.posX, this.posY, this.posZ); - if (worldObj.isAirBlock(newPos)) - { - worldObj.setBlockState(newPos, Blocks.fire.getDefaultState()); - } - - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); - this.setDead(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java deleted file mode 100644 index f662ab31..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java +++ /dev/null @@ -1,93 +0,0 @@ -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.EnumParticleTypes; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -public class HolyProjectile extends EnergyBlastProjectile -{ - public HolyProjectile(World par1World) - { - super(par1World); - } - - public HolyProjectile(World par1World, double par2, double par4, double par6) - { - super(par1World, par2, par4, par6); - } - - public HolyProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage) - { - super(par1World, par2EntityPlayer, damage); - } - - 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) - { - super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); - } - - @Override - public DamageSource getDamageSource() - { - return DamageSource.causeMobDamage(shootingEntity); - } - - @Override - public void onImpact(MovingObjectPosition mop) - { - if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) - { - if (mop.entityHit == shootingEntity) - { - return; - } - - this.onImpact(mop.entityHit); - } //else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - } - - this.setDead(); - } - - @Override - public void onImpact(Entity mop) - { - if (mop == shootingEntity && ticksInAir > 3) - { - shootingEntity.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); - this.setDead(); - } else - { - if (mop instanceof EntityLivingBase) - { - if (((EntityLivingBase) mop).isEntityUndead()) - { - doDamage(projectileDamage * 2, mop); - } else - { - doDamage(projectileDamage, mop); - } - } - } - - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); - this.setDead(); - } - - @Override - public void doFiringParticles() - { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, posX, posY, posZ, 1.0F, 1.0F, 1.0F); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java deleted file mode 100644 index 130f88f9..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java +++ /dev/null @@ -1,96 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.projectile; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; -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); - } - - public IceProjectile(World par1World, double par2, double par4, double par6) - { - super(par1World, par2, par4, par6); - } - - public IceProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage) - { - super(par1World, par2EntityPlayer, damage); - } - - 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) - { - super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); - } - - @Override - public DamageSource getDamageSource() - { - return DamageSource.causeMobDamage(shootingEntity); - } - - @Override - public void onImpact(MovingObjectPosition mop) - { - if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) - { - if (mop.entityHit == shootingEntity) - { - return; - } - - this.onImpact(mop.entityHit); - }// else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - } - this.setDead(); - } - - @Override - public void onImpact(Entity mop) - { - if (mop == shootingEntity && ticksInAir > 3) - { - shootingEntity.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); - this.setDead(); - } else - { - if (mop instanceof EntityLivingBase) - { - if (mop.isImmuneToFire()) - { - doDamage(projectileDamage * 2, mop); - ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, 2)); - } else - { - doDamage(projectileDamage, mop); - ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 1)); - } - } - } - - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); - this.setDead(); - } - - @Override - public void doFiringParticles() - { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.EXPLOSION_LARGE, posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java deleted file mode 100644 index f936106f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java +++ /dev/null @@ -1,111 +0,0 @@ -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; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -public class LightningBoltProjectile extends EnergyBlastProjectile -{ - private boolean causeLightning; - - public LightningBoltProjectile(World par1World) - { - super(par1World); - } - - public LightningBoltProjectile(World par1World, double par2, double par4, double par6) - { - super(par1World, par2, par4, par6); - } - - public LightningBoltProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage, boolean flag) - { - super(par1World, par2EntityPlayer, damage); - causeLightning = 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; - } - - @Override - public DamageSource getDamageSource() - { - return DamageSource.causeMobDamage(shootingEntity); - } - - @Override - public void onImpact(MovingObjectPosition mop) - { - if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) - { - if (mop.entityHit == shootingEntity) - { - return; - } - - this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - if (causeLightning) - { - this.worldObj.addWeatherEffect(new EntityLightningBolt(this.worldObj, this.posX, this.posY, this.posZ)); - } - } - - this.setDead(); - } - - @Override - public void onImpact(Entity mop) - { - if (mop == shootingEntity && ticksInAir > 3) - { - this.setDead(); - } else - { - if (mop instanceof EntityLivingBase) - { - if (causeLightning) - { - this.worldObj.addWeatherEffect(new EntityLightningBolt(this.worldObj, ((EntityLivingBase) mop).posX, ((EntityLivingBase) mop).posY, ((EntityLivingBase) mop).posZ)); - } else - { - doDamage(projectileDamage, mop); - } - } - } - - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); - this.setDead(); - } - - @Override - public void doFiringParticles() - { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, posX, posY, posZ, 1.0F, 1.0F, 1.0F); - } - - @Override - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeEntityToNBT(par1NBTTagCompound); - par1NBTTagCompound.setBoolean("causeLightning", causeLightning); - } - - @Override - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readEntityFromNBT(par1NBTTagCompound); - causeLightning = par1NBTTagCompound.getBoolean("causeLightning"); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java deleted file mode 100644 index 6995f529..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java +++ /dev/null @@ -1,115 +0,0 @@ -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; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -public class MudProjectile extends EnergyBlastProjectile -{ - private boolean doesBlindness; //True for when it applies blindness, false for slowness - - public MudProjectile(World par1World) - { - super(par1World); - } - - public MudProjectile(World par1World, double par2, double par4, double par6) - { - super(par1World, par2, par4, par6); - } - - public MudProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage, boolean flag) - { - super(par1World, par2EntityPlayer, damage); - doesBlindness = 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) - { - super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); - doesBlindness = flag; - } - - @Override - public DamageSource getDamageSource() - { - return DamageSource.causeMobDamage(shootingEntity); - } - - @Override - public void onImpact(MovingObjectPosition mop) - { - if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) - { - if (mop.entityHit == shootingEntity) - { - return; - } - - this.onImpact(mop.entityHit); - }// else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - } - - this.setDead(); - } - - @Override - public void onImpact(Entity mop) - { - if (mop == shootingEntity && ticksInAir > 3) - { - this.setDead(); - } else - { - if (mop instanceof EntityLivingBase) - { - if (doesBlindness) - { - ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.blindness.id, 100, 0)); - } else - { - ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 2)); - } - doDamage(projectileDamage, mop); - } - } - - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); - this.setDead(); - } - - @Override - public void doFiringParticles() - { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, posX, posY, posZ, 0.5F, 0.297F, 0.0664F); - } - - @Override - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeEntityToNBT(par1NBTTagCompound); - par1NBTTagCompound.setBoolean("doesBlindness", doesBlindness); - } - - @Override - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readEntityFromNBT(par1NBTTagCompound); - doesBlindness = par1NBTTagCompound.getBoolean("doesBlindness"); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java deleted file mode 100644 index 8b2308b7..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java +++ /dev/null @@ -1,159 +0,0 @@ -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; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.living.EnderTeleportEvent; - -public class TeleportProjectile extends EnergyBlastProjectile -{ - private boolean isEntityTeleport; - - public TeleportProjectile(World par1World) - { - super(par1World); - this.motionX *= 3; - this.motionY *= 3; - this.motionZ *= 3; - } - - public TeleportProjectile(World par1World, double par2, double par4, double par6) - { - super(par1World, par2, par4, par6); - this.motionX *= 3; - this.motionY *= 3; - this.motionZ *= 3; - } - - public TeleportProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage, boolean flag) - { - super(par1World, par2EntityPlayer, damage); - isEntityTeleport = flag; - this.motionX *= 3; - this.motionY *= 3; - 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) - { - super(par1World, par2EntityPlayer, damage, maxTicksInAir, posX, posY, posZ, rotationYaw, rotationPitch); - isEntityTeleport = flag; - this.motionX *= 3; - this.motionY *= 3; - this.motionZ *= 3; - } - - @Override - public DamageSource getDamageSource() - { - return DamageSource.causeMobDamage(shootingEntity); - } - - @Override - public void onImpact(MovingObjectPosition mop) - { - if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) - { - if (mop.entityHit == shootingEntity) - { - return; - } - - this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - if (isEntityTeleport) - { - 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); - - if (!MinecraftForge.EVENT_BUS.post(event)) - { - if (shootingEntity.isRiding()) - { - shootingEntity.mountEntity(null); - } - shootingEntity.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ); - } - } - } - } - } - - this.setDead(); - } - - @Override - public void onImpact(Entity mop) - { - if (mop == shootingEntity && ticksInAir > 3) - { - this.setDead(); - } else - { - if (mop instanceof EntityLivingBase) - { - if (isEntityTeleport) - { - 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); - if (!MinecraftForge.EVENT_BUS.post(event)) - { - if (shootingEntity.isRiding()) - { - shootingEntity.mountEntity(null); - } - - shootingEntity.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ); - } - } - } - } else - { - SpellTeleport.teleportRandomly((EntityLivingBase) mop, 64); - } - } - } - - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); - this.setDead(); - } - - @Override - public void doFiringParticles() - { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.PORTAL, posX, posY, posZ, -motionX, -motionY, -motionZ); - } - - @Override - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeEntityToNBT(par1NBTTagCompound); - par1NBTTagCompound.setBoolean("isEntityTeleport", isEntityTeleport); - } - - @Override - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readEntityFromNBT(par1NBTTagCompound); - isEntityTeleport = par1NBTTagCompound.getBoolean("isEntityTeleport"); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java deleted file mode 100644 index 556bddbe..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java +++ /dev/null @@ -1,91 +0,0 @@ -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; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -public class WaterProjectile extends EnergyBlastProjectile -{ - public WaterProjectile(World par1World) - { - super(par1World); - } - - public WaterProjectile(World par1World, double par2, double par4, double par6) - { - super(par1World, par2, par4, par6); - } - - public WaterProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage) - { - super(par1World, par2EntityPlayer, damage); - } - - 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); - } - - @Override - public DamageSource getDamageSource() - { - return DamageSource.causeMobDamage(shootingEntity); - } - - @Override - public void onImpact(MovingObjectPosition mop) - { - if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) - { - if (mop.entityHit == shootingEntity) - { - return; - } - - this.onImpact(mop.entityHit); - }// else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - } - - this.setDead(); - } - - @Override - public void onImpact(Entity mop) - { - if (mop == shootingEntity && ticksInAir > 3) - { - this.setDead(); - } else - { - if (mop instanceof EntityLivingBase) - { - if (mop.isImmuneToFire()) - { - doDamage(projectileDamage * 2, mop); - ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 80, 1)); - } else - { - doDamage(projectileDamage, mop); - ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 80, 0)); - } - } - } - - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); - this.setDead(); - } - - @Override - public void doFiringParticles() - { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.PORTAL, posX, posY, posZ, -motionX, -motionY, -motionZ); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java deleted file mode 100644 index 6af663b7..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java +++ /dev/null @@ -1,88 +0,0 @@ -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.EnumParticleTypes; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -public class WindGustProjectile extends EnergyBlastProjectile -{ - public WindGustProjectile(World par1World) - { - super(par1World); - } - - public WindGustProjectile(World par1World, double par2, double par4, double par6) - { - super(par1World, par2, par4, par6); - } - - public WindGustProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage) - { - super(par1World, par2EntityPlayer, damage); - } - - 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) - { - super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); - } - - @Override - public DamageSource getDamageSource() - { - return DamageSource.causeMobDamage(shootingEntity); - } - - @Override - public void onImpact(MovingObjectPosition mop) - { - if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) - { - if (mop.entityHit == shootingEntity) - { - return; - } - - this.onImpact(mop.entityHit); - }// else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - } - - this.setDead(); - } - - @Override - public void onImpact(Entity mop) - { - if (mop == shootingEntity && ticksInAir > 3) - { - this.setDead(); - } else - { - if (mop instanceof EntityLivingBase) - { - ((EntityLivingBase) mop).motionX = this.motionX * 0.25*this.projectileDamage; - ((EntityLivingBase) mop).motionY = 1.5; - ((EntityLivingBase) mop).motionZ = this.motionZ * 0.25*this.projectileDamage; - } - } - - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); - this.setDead(); - } - - @Override - public void doFiringParticles() - { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, posX, posY, posZ, 1.0F, 1.0F, 1.0F); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/guide/RecipeHolder.java b/src/main/java/WayofTime/alchemicalWizardry/common/guide/RecipeHolder.java deleted file mode 100644 index 10003173..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/guide/RecipeHolder.java +++ /dev/null @@ -1,227 +0,0 @@ -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; - -public class RecipeHolder -{ - private static List recipeList; - - public static IRecipe bloodAltarRecipe; - public static IRecipe knifeRecipe; - public static IRecipe divinationSigilRecipe; - public static IRecipe waterSigilRecipe; - public static IRecipe lavaCrystalRecipe; - public static IRecipe lavaSigilRecipe; - public static IRecipe blankRuneRecipe; - public static IRecipe speedRuneRecipe; - public static IRecipe voidSigilRecipe; - public static IRecipe airSigilRecipe; - public static IRecipe sightSigilRecipe; - public static IRecipe fastMinerRecipe; - public static IRecipe greenGroveRecipe; - public static IRecipe sacrificeRuneRecipe; - public static IRecipe selfSacrificeRuneRecipe; - public static IRecipe bloodPackRecipe; - public static IRecipe capacityRuneRecipe; - public static IRecipe dislocationRuneRecipe; - public static IRecipe magnetismSigilRecipe; - public static IRecipe phantomBridgeRecipe; - public static IRecipe holdingSigilRecipe; - public static IRecipe affinitySigilRecipe; - public static IRecipe weakRitualStoneRecipe; - public static IRecipe ritualStoneRecipe; - public static IRecipe masterStoneRecipe; - public static IRecipe bloodLampRecipe; - public static IRecipe emptySocketRecipe; - public static IRecipe soulForgeRecipe; - public static IRecipe inhibitorRecipe; - public static IRecipe ritualDiviner1Recipe; - public static IRecipe ritualDiviner2Recipe; - public static IRecipe ritualDiviner3Recipe; - public static IRecipe bloodStoneRecipe; - public static IRecipe whirlwindSigilRecipe; - public static IRecipe compressionSigilRecipe; - public static IRecipe enderSeveranceSigilRecipe; - public static IRecipe teleposerRecipe; - public static IRecipe suppressionSigilRecipe; - public static IRecipe superiorCapacityRecipe; - public static IRecipe orbRuneRecipe; - public static IRecipe keyOfBindingRecipe; - public static IRecipe energyBazookaRecipe; - public static IRecipe accelerationRuneRecipe; - public static IRecipe harvestSigilRecipe; - public static IRecipe crystalCluserRecipe; - public static IRecipe arcanePlinthRecipe; - public static IRecipe arcanePedestalRecipe; - public static IRecipe spellTableRecipe; - public static IRecipe alchemySetRecipe; - public static IRecipe crucibleRecipe; - - public static IRecipe woodAshRecipe; - public static IRecipe byrrusRecipe; - public static IRecipe livensRecipe; - public static IRecipe virRecipe; - public static IRecipe purpuraRecipe; - - public static IRecipe routerRecipe; - public static IRecipe segmenterRecipe; - public static IRecipe cleanserRecipe; - public static IRecipe calcinatorRecipe; - public static IRecipe belljarRecipe; - public static IRecipe relayRecipe; - - public static AltarRecipe weakBloodOrbRecipe; - public static AltarRecipe apprenticeBloodOrbRecipe; - public static AltarRecipe magicianBloodOrbRecipe; - public static AltarRecipe masterBloodOrbRecipe; - public static AltarRecipe archmageBloodOrbRecipe; - public static AltarRecipe transcendentBloodOrbRecipe; - - public static AltarRecipe blankSlateRecipe; - public static AltarRecipe reinforcedSlateRecipe; - public static AltarRecipe imbuedSlateRecipe; - public static AltarRecipe demonicSlateRecipe; - public static AltarRecipe etherealSlateRecipe; - public static AltarRecipe daggerRecipe; - public static AltarRecipe weakActivationRecipe; - public static AltarRecipe filledSocketRecipe; - public static AltarRecipe teleposerFocusRecipe1; - public static AltarRecipe blankSpellRecipe; - public static AltarRecipe waterScribeTool; - public static AltarRecipe fireScribeTool; - public static AltarRecipe earthScribeTool; - public static AltarRecipe airScribeTool; - public static AltarRecipe duskRecipe; - public static AltarRecipe dawnRecipe; - public static AltarRecipe flaskRecipe; - - public static void init() - { - recipeList = CraftingManager.getInstance().getRecipeList(); - bloodAltarRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockAltar)); - knifeRecipe = getRecipeForItemStack(new ItemStack(ModItems.sacrificialDagger)); - divinationSigilRecipe = getRecipeForItemStack(new ItemStack(ModItems.divinationSigil)); - waterSigilRecipe = getRecipeForItemStack(new ItemStack(ModItems.waterSigil)); - lavaCrystalRecipe = getRecipeForItemStack(new ItemStack(ModItems.lavaCrystal)); - lavaSigilRecipe = getRecipeForItemStack(new ItemStack(ModItems.lavaSigil)); - blankRuneRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.bloodRune)); - speedRuneRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.speedRune)); - - voidSigilRecipe = getRecipeForItemStack(new ItemStack(ModItems.voidSigil)); - airSigilRecipe = getRecipeForItemStack(new ItemStack(ModItems.airSigil)); - sightSigilRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemSeerSigil)); - fastMinerRecipe = getRecipeForItemStack(new ItemStack(ModItems.sigilOfTheFastMiner)); - greenGroveRecipe = getRecipeForItemStack(new ItemStack(ModItems.growthSigil)); - sacrificeRuneRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.runeOfSacrifice)); - selfSacrificeRuneRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.runeOfSelfSacrifice)); - bloodPackRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemBloodPack)); - capacityRuneRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.bloodRune, 1, 1)); - dislocationRuneRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.bloodRune, 1, 2)); - magnetismSigilRecipe = getRecipeForItemStack(new ItemStack(ModItems.sigilOfMagnetism)); - phantomBridgeRecipe = getRecipeForItemStack(new ItemStack(ModItems.sigilOfTheBridge)); - holdingSigilRecipe = getRecipeForItemStack(new ItemStack(ModItems.sigilOfHolding)); - affinitySigilRecipe = getRecipeForItemStack(new ItemStack(ModItems.sigilOfElementalAffinity)); - ritualStoneRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.ritualStone)); - masterStoneRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockMasterStone)); - bloodLampRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemBloodLightSigil)); - emptySocketRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.emptySocket)); - soulForgeRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.armourForge)); - inhibitorRecipe = getRecipeForItemStack(new ItemStack(ModItems.armourInhibitor)); - ritualDiviner1Recipe = getRecipeForItemStack(new ItemStack(ModItems.itemRitualDiviner)); - ritualDiviner2Recipe = getRecipeForItemStack(new ItemStack(ModItems.itemRitualDiviner, 1, 1)); - ritualDiviner3Recipe = getRecipeForItemStack(new ItemStack(ModItems.itemRitualDiviner, 1, 2)); - bloodStoneRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.largeBloodStoneBrick)); - whirlwindSigilRecipe = getRecipeForItemStack(new ItemStack(ModItems.sigilOfWind)); - compressionSigilRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemCompressionSigil)); - enderSeveranceSigilRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemSigilOfEnderSeverance)); - teleposerRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockTeleposer)); - suppressionSigilRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemSigilOfSupression)); - superiorCapacityRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.bloodRune, 1, 4)); - orbRuneRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.bloodRune, 1, 3)); - keyOfBindingRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemKeyOfDiablo)); - energyBazookaRecipe = getRecipeForItemStack(new ItemStack(ModItems.energyBazooka)); - accelerationRuneRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.bloodRune, 1, 5)); - harvestSigilRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemHarvestSigil)); - crystalCluserRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockCrystal)); - weakRitualStoneRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.imperfectRitualStone)); - - arcanePlinthRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockPlinth)); - arcanePedestalRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockPedestal)); - spellTableRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockSpellTable)); - - alchemySetRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockWritingTable)); - crucibleRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockCrucible)); - woodAshRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemIncense, 1, 0)); - byrrusRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemIncense, 1, 1)); - livensRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemIncense, 1, 2)); - virRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemIncense, 1, 3)); - purpuraRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemIncense, 1, 4)); - - routerRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemAttunedCrystal)); - segmenterRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemTankSegmenter)); - cleanserRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemDestinationClearer)); - calcinatorRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockAlchemicalCalcinator)); - belljarRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockCrystalBelljar)); - relayRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockReagentConduit)); - - weakBloodOrbRecipe = getAltarRecipeForItemStack(new ItemStack(ModItems.weakBloodOrb)); - apprenticeBloodOrbRecipe = getAltarRecipeForItemStack(new ItemStack(ModItems.apprenticeBloodOrb)); - magicianBloodOrbRecipe = getAltarRecipeForItemStack(new ItemStack(ModItems.magicianBloodOrb)); - masterBloodOrbRecipe = getAltarRecipeForItemStack(new ItemStack(ModItems.masterBloodOrb)); - archmageBloodOrbRecipe = getAltarRecipeForItemStack(new ItemStack(ModItems.archmageBloodOrb)); - transcendentBloodOrbRecipe = getAltarRecipeForItemStack(new ItemStack(ModItems.transcendentBloodOrb)); - - blankSlateRecipe = getAltarRecipeForItemStack(new ItemStack(ModItems.blankSlate)); - reinforcedSlateRecipe = getAltarRecipeForItemStack(new ItemStack(ModItems.reinforcedSlate)); - imbuedSlateRecipe = getAltarRecipeForItemStack(new ItemStack(ModItems.imbuedSlate)); - demonicSlateRecipe = getAltarRecipeForItemStack(new ItemStack(ModItems.demonicSlate)); - etherealSlateRecipe = getAltarRecipeForItemStack(new ItemStack(ModItems.baseItems, 1, 27)); - daggerRecipe = getAltarRecipeForItemStack(new ItemStack(ModItems.daggerOfSacrifice)); - weakActivationRecipe = getAltarRecipeForItemStack(new ItemStack(ModItems.activationCrystal, 1, 0)); - filledSocketRecipe = getAltarRecipeForItemStack(new ItemStack(ModBlocks.bloodSocket)); - teleposerFocusRecipe1 = getAltarRecipeForItemStack(new ItemStack(ModItems.telepositionFocus)); - blankSpellRecipe = getAltarRecipeForItemStack(new ItemStack(ModItems.blankSpell)); - waterScribeTool = getAltarRecipeForItemStack(new ItemStack(ModItems.waterScribeTool)); - fireScribeTool = getAltarRecipeForItemStack(new ItemStack(ModItems.fireScribeTool)); - earthScribeTool = getAltarRecipeForItemStack(new ItemStack(ModItems.earthScribeTool)); - airScribeTool = getAltarRecipeForItemStack(new ItemStack(ModItems.airScribeTool)); - duskRecipe = getAltarRecipeForItemStack(new ItemStack(ModItems.duskScribeTool)); - dawnRecipe = getAltarRecipeForItemStack(new ItemStack(ModItems.dawnScribeTool)); - flaskRecipe = getAltarRecipeForItemStack(new ItemStack(ModItems.alchemyFlask)); - } - - private static IRecipe getRecipeForItemStack(ItemStack stack) - { - for(Object obj : recipeList) - { - IRecipe recipe = (IRecipe)obj; - if(recipe.getRecipeOutput() != null && stack.isItemEqual(recipe.getRecipeOutput())) - { - return recipe; - } - } - - return null; - } - - private static AltarRecipe getAltarRecipeForItemStack(ItemStack stack) - { - for(AltarRecipe recipe : AltarRecipeRegistry.altarRecipes) - { - if(recipe.getResult() != null && stack.isItemEqual(recipe.getResult())) - { - return recipe; - } - } - - return null; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java deleted file mode 100644 index 4703ebaa..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java +++ /dev/null @@ -1,130 +0,0 @@ -package WayofTime.alchemicalWizardry.common.harvest; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -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 || block == Blocks.potatoes || block == Blocks.nether_wart; - } - - public int getHarvestMeta(Block block) - { - if (block == Blocks.wheat) - { - return 7; - } - if (block == Blocks.carrots) - { - return 7; - } - if (block == Blocks.potatoes) - { - return 7; - } - if (block == Blocks.nether_wart) - { - return 3; - } - return 7; - } - - @Override - public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) - { - if (!this.canHandleBlock(block) || block.getMetaFromState(state) != this.getHarvestMeta(block)) - { - return false; - } - - IPlantable seed = this.getSeedItem(block); - - if (seed == null) - { - return false; - } - - int fortune = 0; - - List list = block.getDrops(world, pos, state, fortune); - boolean foundAndRemovedSeed = false; - - for (ItemStack stack : list) - { - if (stack == null) - { - continue; - } - - Item item = stack.getItem(); - if (item == seed) - { - int itemSize = stack.stackSize; - if (itemSize > 1) - { - stack.stackSize--; - foundAndRemovedSeed = true; - break; - } else if (itemSize == 1) - { - list.remove(stack); - foundAndRemovedSeed = true; - break; - } - } - } - - if (foundAndRemovedSeed) - { - IBlockState plantState = seed.getPlant(world, pos); - - world.destroyBlock(pos, false); - - world.setBlockState(pos, plantState, 3); - - for (ItemStack stack : list) - { - EntityItem itemEnt = new EntityItem(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, stack); - - world.spawnEntityInWorld(itemEnt); - } - } - - return false; - } - - public IPlantable getSeedItem(Block block) - { - if (block == Blocks.wheat) - { - return (IPlantable) Items.wheat_seeds; - } - if (block == Blocks.carrots) - { - return (IPlantable) Items.carrot; - } - if (block == Blocks.potatoes) - { - return (IPlantable) Items.potato; - } - if (block == Blocks.nether_wart) - { - return (IPlantable) Items.nether_wart; - } - - return null; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java deleted file mode 100644 index f8c2d7ee..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java +++ /dev/null @@ -1,34 +0,0 @@ -package WayofTime.alchemicalWizardry.common.harvest; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -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; - } - - @Override - public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) - { - if (!this.canHandleBlock(block)) - { - return false; - } - - if (world.getBlockState(pos.offsetDown(1)).getBlock() != block || world.getBlockState(pos.offsetDown(2)).getBlock() != block) - { - return false; - } - - world.destroyBlock(pos, true); - - return true; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericItemStackHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericItemStackHarvestHandler.java deleted file mode 100644 index 77837d15..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericItemStackHarvestHandler.java +++ /dev/null @@ -1,111 +0,0 @@ -package WayofTime.alchemicalWizardry.common.harvest; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.IPlantable; -import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; - -public class GenericItemStackHarvestHandler implements IHarvestHandler -{ - public Block harvestBlock; - public int harvestMeta; - public ItemStack harvestItem; - public IPlantable harvestSeed; - - public GenericItemStackHarvestHandler(Block block, int meta, ItemStack seed) - { - harvestBlock = block; - harvestMeta = meta; - harvestItem = seed; - if (seed.getItem() instanceof IPlantable) harvestSeed = (IPlantable) seed.getItem(); - } - - public boolean canHandleBlock(Block block) - { - return block == harvestBlock; - } - - public int getHarvestMeta() - { - return harvestMeta; - } - - @Override - public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) - { - if (!this.canHandleBlock(block) || block.getMetaFromState(state) != this.getHarvestMeta()) - { - return false; - } - - IPlantable seed = this.getSeedItem(block); - - if (seed == null) - { - world.destroyBlock(pos, true); - - return true; - } else - { - int fortune = 0; - - List list = block.getDrops(world, pos, state, fortune); - boolean foundAndRemovedSeed = false; - - for (ItemStack stack : list) - { - if (stack == null) - { - continue; - } - if (harvestItem.isItemEqual(stack)) - { - int itemSize = stack.stackSize; - if (itemSize<1) - { - continue; - } - else if (itemSize==1) - { - list.remove(stack); - } - else - { - stack.stackSize--; - } - foundAndRemovedSeed = true; - break; - } - } - - if (foundAndRemovedSeed) - { - IBlockState plantState = seed.getPlant(world, pos); - - world.destroyBlock(pos, false); - - world.setBlockState(pos, plantState, 3); - - for (ItemStack stack : list) - { - EntityItem itemEnt = new EntityItem(world, pos.getX(), pos.getY(), pos.getZ(), stack); - - world.spawnEntityInWorld(itemEnt); - } - } - - return false; - } - } - - public IPlantable getSeedItem(Block block) - { - return harvestSeed; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java deleted file mode 100644 index 581c6ada..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java +++ /dev/null @@ -1,69 +0,0 @@ -//package WayofTime.alchemicalWizardry.common.harvest; -// -//import net.minecraft.block.Block; -//import net.minecraft.block.state.IBlockState; -//import net.minecraft.item.Item; -//import net.minecraft.util.BlockPos; -//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; -// -// public GenericPamSeedlessFruitHarvestHandler(String block, int harvestMeta, int resetMeta) -// { -// this.harvestBlock = getBlockForString(block); -// this.harvestMeta = harvestMeta; -// this.resetMeta = resetMeta; -// } -// -// public boolean isHarvesterValid() -// { -// return harvestBlock != null; -// } -// -// public static Block getBlockForString(String str) -// { -// String[] parts = str.split(":"); -// String modId = parts[0]; -// String name = parts[1]; -// return GameRegistry.findBlock(modId, name); -// } -// -// public static Item getItemForString(String str) -// { -// String[] parts = str.split(":"); -// String modId = parts[0]; -// String name = parts[1]; -// return GameRegistry.findItem(modId, name); -// } -// -// public boolean canHandleBlock(Block block) -// { -// return block == harvestBlock; -// } -// -// public int getHarvestMeta() -// { -// return harvestMeta; -// } -// -// @Override -// public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) -// { -// if (!this.canHandleBlock(block) || block.getMetaFromState(state) != this.getHarvestMeta()) -// { -// return false; -// } -// -// world.destroyBlock(pos, true); -// -// world.setBlockState(pos, harvestBlock.getStateFromMeta(resetMeta), 3); -// -// return true; -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java deleted file mode 100644 index ff07bdf0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java +++ /dev/null @@ -1,138 +0,0 @@ -//package WayofTime.alchemicalWizardry.common.harvest; -// -//import java.util.List; -// -//import net.minecraft.block.Block; -//import net.minecraft.block.state.IBlockState; -//import net.minecraft.entity.item.EntityItem; -//import net.minecraft.item.Item; -//import net.minecraft.item.ItemStack; -//import net.minecraft.util.BlockPos; -//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; -// -// public GenericSeededHarvestHandler(String block, int meta, String seed) -// { -// harvestBlock = getBlockForString(block); -// harvestMeta = meta; -// Item testSeed = getItemForString(seed); -// if (testSeed instanceof IPlantable) -// { -// harvestSeed = (IPlantable) testSeed; -// } else -// { -// harvestSeed = null; -// } -// } -// -// public boolean isHarvesterValid() -// { -// return harvestBlock != null && harvestSeed != null; -// } -// -// public static Block getBlockForString(String str) -// { -// String[] parts = str.split(":"); -// String modId = parts[0]; -// String name = parts[1]; -// return GameRegistry.findBlock(modId, name); -// } -// -// public static Item getItemForString(String str) -// { -// String[] parts = str.split(":"); -// String modId = parts[0]; -// String name = parts[1]; -// return GameRegistry.findItem(modId, name); -// } -// -// public boolean canHandleBlock(Block block) -// { -// return block == harvestBlock; -// } -// -// public int getHarvestMeta() -// { -// return harvestMeta; -// } -// -// @Override -// public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) -// { -// if (!this.canHandleBlock(block) || block.getMetaFromState(state) != this.getHarvestMeta()) -// { -// return false; -// } -// -// IPlantable seed = this.getSeedItem(block); -// -// if (seed == null) -// { -// world.destroyBlock(pos, true); -// -// return true; -// } else -// { -// int fortune = 0; -// -// List list = block.getDrops(world, pos, state, fortune); -// boolean foundAndRemovedSeed = false; -// -// for (ItemStack stack : list) -// { -// if (stack == null) -// { -// continue; -// } -// -// Item item = stack.getItem(); -// if (item == seed) -// { -// int itemSize = stack.stackSize; -// if (itemSize > 1) -// { -// stack.stackSize--; -// foundAndRemovedSeed = true; -// break; -// } else if (itemSize == 1) -// { -// list.remove(stack); -// foundAndRemovedSeed = true; -// break; -// } -// } -// } -// -// if (foundAndRemovedSeed) -// { -// IBlockState plantState = seed.getPlant(world, pos); -// -// world.destroyBlock(pos, false); -// -// world.setBlockState(pos, plantState, 3); -// -// for (ItemStack stack : list) -// { -// EntityItem itemEnt = new EntityItem(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, stack); -// -// world.spawnEntityInWorld(itemEnt); -// } -// } -// -// return false; -// } -// } -// -// public IPlantable getSeedItem(Block block) -// { -// return harvestSeed; -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java deleted file mode 100644 index 911968d0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java +++ /dev/null @@ -1,27 +0,0 @@ -package WayofTime.alchemicalWizardry.common.harvest; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -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; - } - - @Override - public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) - { - if (!this.canHandleBlock(block)) - { - return false; - } - world.destroyBlock(pos, true); - return true; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/PamHarvestCompatRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/PamHarvestCompatRegistry.java deleted file mode 100644 index d9b9244f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/PamHarvestCompatRegistry.java +++ /dev/null @@ -1,125 +0,0 @@ -//package WayofTime.alchemicalWizardry.common.harvest; -// -//import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; -// -//public class PamHarvestCompatRegistry -//{ -// public static void registerPamHandlers() -// { -// registerSeededHandler("blackberry", 7); -// registerSeededHandler("blueberry", 7); -// registerSeededHandler("candleberry", 7); -// registerSeededHandler("raspberry", 7); -// registerSeededHandler("strawberry", 7); -// registerSeededHandler("cactusfruit", 7); -// registerSeededHandler("asparagus", 7); -// registerSeededHandler("barley", 7); -// registerSeededHandler("oats", 7); -// registerSeededHandler("rye", 7); -// registerSeededHandler("corn", 7); -// registerSeededHandler("bambooshoot", 7); -// registerSeededHandler("cantaloupe", 7); -// registerSeededHandler("cucumber", 7); -// registerSeededHandler("windersquash", 7); -// registerSeededHandler("zucchini", 7); -// registerSeededHandler("beat", 7); -// registerSeededHandler("onion", 7); -// registerSeededHandler("parsnip", 7); -// registerSeededHandler("peanut", 7); -// registerSeededHandler("radish", 7); -// registerSeededHandler("rutabaga", 7); -// registerSeededHandler("sweetpotato", 7); -// registerSeededHandler("turnip", 7); -// registerSeededHandler("rhubarb", 7); -// registerSeededHandler("celery", 7); -// registerSeededHandler("garlic", 7); -// registerSeededHandler("ginger", 7); -// registerSeededHandler("spiceleaf", 7); -// registerSeededHandler("tealeaf", 7); -// registerSeededHandler("coffeebean", 7); -// registerSeededHandler("mustardseeds", 7); -// registerSeededHandler("brocolli", 7); -// registerSeededHandler("cauliflower", 7); -// registerSeededHandler("leek", 7); -// registerSeededHandler("lettuce", 7); -// registerSeededHandler("scallion", 7); -// registerSeededHandler("artichoke", 7); -// registerSeededHandler("brusselsprout", 7); -// registerSeededHandler("cabbage", 7); -// registerSeededHandler("whitemushroom", 7); -// registerSeededHandler("bean", 7); -// registerSeededHandler("soybean", 7); -// registerSeededHandler("bellpepper", 7); -// registerSeededHandler("chili", 7); -// registerSeededHandler("eggplant", 7); -// registerSeededHandler("pamokra", 7); -// registerSeededHandler("peas", 7); -// registerSeededHandler("tomato", 7); -// registerSeededHandler("cotton", 7); -// registerSeededHandler("pineapple", 7); -// registerSeededHandler("grape", 7); -// registerSeededHandler("kiwi", 7); -// registerSeededHandler("cranberry", 7); -// registerSeededHandler("rice", 7); -// registerSeededHandler("seaweed", 7); -// -// registerFruitHandler("apple", 7, 0); -// registerFruitHandler("Almond", 7, 0); -// registerFruitHandler("Apricot", 7, 0); -// registerFruitHandler("Avocado", 7, 0); -// registerFruitHandler("Banana", 7, 0); -// registerFruitHandler("Cashew", 7, 0); -// registerFruitHandler("Cherry", 7, 0); -// registerFruitHandler("Chestnut", 7, 0); -// registerFruitHandler("Cinnamon", 7, 0); -// registerFruitHandler("Coconut", 7, 0); -// registerFruitHandler("Date", 7, 0); -// registerFruitHandler("Dragonfruit", 7, 0); -// registerFruitHandler("Durian", 7, 0); -// registerFruitHandler("Fig", 7, 0); -// registerFruitHandler("Grapefruit", 7, 0); -// registerFruitHandler("Lemon", 7, 0); -// registerFruitHandler("Lime", 7, 0); -// registerFruitHandler("Maple", 7, 0); -// registerFruitHandler("Mango", 7, 0); -// registerFruitHandler("Nutmeg", 7, 0); -// registerFruitHandler("Olive", 7, 0); -// registerFruitHandler("Orange", 7, 0); -// registerFruitHandler("Papaya", 7, 0); -// registerFruitHandler("Paperbark", 7, 0); -// registerFruitHandler("Peach", 7, 0); -// registerFruitHandler("Pear", 7, 0); -// registerFruitHandler("Pecan", 7, 0); -// registerFruitHandler("Peppercorn", 7, 0); -// registerFruitHandler("Persimmon", 7, 0); -// registerFruitHandler("Pistachio", 7, 0); -// registerFruitHandler("Plum", 7, 0); -// registerFruitHandler("Pomegranate", 7, 0); -// registerFruitHandler("Starfruit", 7, 0); -// registerFruitHandler("Vanillabean", 7, 0); -// registerFruitHandler("Walnut", 7, 0); -// } -// -// public static void registerSeededHandler(String name, int meta) -// { -// String block = "harvestcraft:pam" + name + "Crop"; -// String seed = "harvestcraft:" + name + "Item"; -// -// GenericSeededHarvestHandler handler = new GenericSeededHarvestHandler(block, meta, seed); -// if (handler.isHarvesterValid()) -// { -// HarvestRegistry.registerHarvestHandler(handler); -// } -// } -// -// public static void registerFruitHandler(String name, int harvestMeta, int resetMeta) -// { -// String block = "harvestcraft:pam" + name; -// -// GenericPamSeedlessFruitHarvestHandler handler = new GenericPamSeedlessFruitHarvestHandler(block, harvestMeta, resetMeta); -// if (handler.isHarvesterValid()) -// { -// HarvestRegistry.registerHarvestHandler(handler); -// } -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java deleted file mode 100644 index f38bce26..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java +++ /dev/null @@ -1,114 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.creativetab.CreativeTabs; -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.MathHelper; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.lwjgl.input.Keyboard; - -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; - -public class ActivationCrystal extends BindableItems -{ - private final String[] ACTIVATION_CRYSTAL_NAMES = new String[]{"weak", "awakened", "creative"}; - - public ActivationCrystal() - { - super(); - this.maxStackSize = 1; - setEnergyUsed(100); - this.hasSubtypes = true; - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - switch (par1ItemStack.getItemDamage()) - { - case 0: - { - par3List.add(StatCollector.translateToLocal("tooltip.activationcrystal.lowlevelrituals")); - break; - } - - case 1: - { - par3List.add(StatCollector.translateToLocal("tooltip.activationcrystal.powerfulrituals")); - - if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) - { - ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack); - - if (recipe != null) - { - par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe")); - - for (ItemStack item : recipe) - { - if (item != null) - { - par3List.add("" + item.getDisplayName()); - } - } - } - } else - { - par3List.add("-" + StatCollector.translateToLocal("tooltip.alchemy.press") + " " + EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.shift") + EnumChatFormatting.GRAY + " " + StatCollector.translateToLocal("tooltip.alchemy.forrecipe") + "-"); - } - - break; - } - - case 2: - { - par3List.add(StatCollector.translateToLocal("tooltip.activationcrystal.creativeonly")); - - break; - } - } - - if (!(par1ItemStack.getTagCompound() == null)) - { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); - return par1ItemStack; - } - - public int getCrystalLevel(ItemStack itemStack) - { - return itemStack.getItemDamage() > 1 ? Integer.MAX_VALUE : itemStack.getItemDamage() + 1; - } - - @Override - public String getUnlocalizedName(ItemStack itemStack) - { - //This is what will do all the localisation things on the alchemy components so you dont have to set it :D - int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ACTIVATION_CRYSTAL_NAMES.length - 1); - return (getUnlocalizedName() + "_" + ACTIVATION_CRYSTAL_NAMES[meta]); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int meta = 0; meta < ACTIVATION_CRYSTAL_NAMES.length; ++meta) - { - list.add(new ItemStack(id, 1, meta)); - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java deleted file mode 100644 index 6934b94d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -public class AirScribeTool extends ScribeTool -{ - public AirScribeTool() - { - super(4); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java deleted file mode 100644 index bef0d188..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java +++ /dev/null @@ -1,10 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -public class ApprenticeBloodOrb extends Orb -{ - 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 deleted file mode 100644 index 01a53cd3..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java +++ /dev/null @@ -1,10 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -public class ArchmageBloodOrb extends Orb -{ - 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 deleted file mode 100644 index 5c9ffbd4..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java +++ /dev/null @@ -1,98 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; - -public class ArmourInhibitor extends BindableItems -{ - public ArmourInhibitor() - { - super(); - this.maxStackSize = 1; - setEnergyUsed(0); - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) - { - list.add(StatCollector.translateToLocal("tooltip.armorinhibitor.desc1")); - list.add(StatCollector.translateToLocal("tooltip.armorinhibitor.desc2")); - - if (!(stack.getTagCompound() == null)) - { - if (stack.getTagCompound().getBoolean("isActive")) - { - list.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); - } else - { - list.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); - } - - list.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + stack.getTagCompound().getString("ownerName")); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) - { - int tickDelay = 200; - - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) - { - return stack; - } - - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); - - if (tag.getBoolean("isActive")) - { - stack.setItemDamage(1); - tag.setInteger("worldTimeDelay", (int) (world.getWorldTime() - 1) % tickDelay); - } else - { - stack.setItemDamage(stack.getMaxDamage()); - } - - return stack; - } - - @Override - public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) - { - if (!(entity instanceof EntityPlayer)) - { - return; - } - - EntityPlayer player = (EntityPlayer) entity; - - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - if (stack.getTagCompound().getBoolean("isActive")) - { -// if (world.getWorldTime() % tickDelay == stack.getTagCompound().getInteger("worldTimeDelay")) - { - } - - //TODO Do stuff - player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 2, 0, true, false)); - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BaseItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BaseItems.java deleted file mode 100644 index 943734d1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BaseItems.java +++ /dev/null @@ -1,23 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; - -public class BaseItems extends Item -{ - public BaseItems() - { - super(); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.infusedstone.desc1")); - par3List.add(StatCollector.translateToLocal("tooltip.infusedstone.desc2")); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BindableItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BindableItems.java deleted file mode 100644 index c0d1bcb8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BindableItems.java +++ /dev/null @@ -1,293 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -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; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.world.World; - -public class BindableItems extends Item implements IBindable -{ - private int energyUsed; - - public BindableItems() - { - super(); - setMaxStackSize(1); - } - - protected void setEnergyUsed(int par1int) - { - this.energyUsed = par1int; - } - - protected int getEnergyUsed() - { - return this.energyUsed; - } - - protected void damagePlayer(World world, EntityPlayer player, int damage) - { - if (world != null) - { - double posX = player.posX; - double posY = player.posY; - double posZ = player.posZ; - world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - float f = 1.0F; - float f1 = f * 0.6F + 0.4F; - float f2 = f * f * 0.7F - 0.5F; - float f3 = f * f * 0.6F - 0.7F; - for (int l = 0; l < 8; ++l) - { - world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); - } - } - for (int i = 0; i < damage; i++) - { - player.setHealth((player.getHealth() - 1)); - - if (player.getHealth() <= 0.0005) - { - player.inventory.dropAllItems(); - break; - } - } - } - - public static boolean syphonBatteries(ItemStack ist, EntityPlayer player, int damageToBeDone) - { - if (!player.worldObj.isRemote) - { - return SoulNetworkHandler.syphonAndDamageFromNetwork(ist, player, damageToBeDone); - } else - { - World world = player.worldObj; - if (world != null) - { - double posX = player.posX; - double posY = player.posY; - double posZ = player.posZ; - - SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.getDimensionId(), 4, posX, posY, posZ); - world.playSoundEffect((double) ((float) player.posX + 0.5F), (double) ((float) player.posY + 0.5F), (double) ((float) player.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - } - } - return true; - } - - @Deprecated - public static boolean syphonWhileInContainer(ItemStack ist, int damageToBeDone) - { - if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) - { - String ownerName = ist.getTagCompound().getString("ownerName"); - - if (MinecraftServer.getServer() == null) - { - return false; - } - - World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); - - if (data == null) - { - data = new LifeEssenceNetwork(ownerName); - world.setItemData(ownerName, data); - } - - if (data.currentEssence >= damageToBeDone) - { - data.currentEssence -= damageToBeDone; - data.markDirty(); - return true; - } - } - - return false; - } - - @Deprecated - public static boolean canSyphonInContainer(ItemStack ist, int damageToBeDone) - { - if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) - { - String ownerName = ist.getTagCompound().getString("ownerName"); - - if (MinecraftServer.getServer() == null) - { - return false; - } - - World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); - - if (data == null) - { - data = new LifeEssenceNetwork(ownerName); - world.setItemData(ownerName, data); - } - - return data.currentEssence >= damageToBeDone; - } - - return false; - } - - public static void hurtPlayer(EntityPlayer user, int energySyphoned) - { - if (energySyphoned < 100 && energySyphoned > 0) - { - if (!user.capabilities.isCreativeMode) - { - user.setHealth((user.getHealth() - 1)); - - if (user.getHealth() <= 0.0005f) - { - user.onDeath(DamageSource.generic); - - } - } - } else if (energySyphoned >= 100) - { - if (!user.capabilities.isCreativeMode) - { - for (int i = 0; i < ((energySyphoned + 99) / 100); i++) - { - user.setHealth((user.getHealth() - 1)); - - if (user.getHealth() <= 0.0005f) - { - user.onDeath(DamageSource.generic); - break; - } - } - } - } - } - - @Deprecated - public static boolean syphonAndDamageWhileInContainer(ItemStack ist, EntityPlayer player, int damageToBeDone) - { - if (!syphonWhileInContainer(ist, damageToBeDone)) - { - hurtPlayer(player, damageToBeDone); - } - - return true; - } - - //Global static methods - public static boolean checkAndSetItemOwner(ItemStack item, EntityPlayer player) - { - return !SpellHelper.isFakePlayer(player) && SoulNetworkHandler.checkAndSetItemPlayer(item, player); - } - - public static void setItemOwner(ItemStack item, String ownerName) - { - if (item.getTagCompound() == null) - { - item.setTagCompound(new NBTTagCompound()); - } - - item.getTagCompound().setString("ownerName", ownerName); - } - - public static void checkAndSetItemOwner(ItemStack item, String ownerName) - { - if (item.getTagCompound() == null) - { - item.setTagCompound(new NBTTagCompound()); - } - - if (item.getTagCompound().getString("ownerName").equals("")) - { - item.getTagCompound().setString("ownerName", ownerName); - } - } - - public static String getOwnerName(ItemStack item) - { - if (item.getTagCompound() == null) - { - item.setTagCompound(new NBTTagCompound()); - } - - return item.getTagCompound().getString("ownerName"); - } - - @Deprecated - public static int getCurrentEssence(String ownerName) - { - if (MinecraftServer.getServer() == null) - { - return 0; - } - - World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); - - if (data == null) - { - data = new LifeEssenceNetwork(ownerName); - world.setItemData(ownerName, data); - } - - return data.currentEssence; - } - - @Deprecated - public static void setCurrentEssence(String ownerName, int amount) - { - if (MinecraftServer.getServer() == null) - { - return; - } - - World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); - - if (data == null) - { - data = new LifeEssenceNetwork(ownerName); - world.setItemData(ownerName, data); - } - - data.currentEssence = amount; - data.markDirty(); - } - - @Deprecated - public static void addEssenceToMaximum(String ownerName, int amount, int maximum) - { - if (MinecraftServer.getServer() == null) - { - return; - } - - World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); - - if (data == null) - { - data = new LifeEssenceNetwork(ownerName); - world.setItemData(ownerName, data); - } - - if (data.currentEssence >= maximum) - { - return; - } - - data.currentEssence = Math.min(maximum, data.currentEssence + amount); - data.markDirty(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java deleted file mode 100644 index c0cbf1e6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java +++ /dev/null @@ -1,98 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellTable; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.common.DimensionManager; - -public class BlankSpell extends BindableItems -{ - public BlankSpell() - { - super(); - this.setMaxStackSize(1); - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) - { - list.add(StatCollector.translateToLocal("tooltip.blankspell.desc")); - - if (!(stack.getTagCompound() == null)) - { - NBTTagCompound itemTag = stack.getTagCompound(); - - if (!stack.getTagCompound().getString("ownerName").equals("")) - { - list.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + stack.getTagCompound().getString("ownerName")); - } - - list.add(StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + itemTag.getInteger("xCoord") + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord")); - list.add(StatCollector.translateToLocal("tooltip.alchemy.dimension") + " " + getDimensionID(stack)); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) - { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) - { - return stack; - } - - if (!world.isRemote) - { - World newWorld = DimensionManager.getWorld(getDimensionID(stack)); - - if (newWorld != null) - { - NBTTagCompound itemTag = stack.getTagCompound(); - TileEntity tileEntity = newWorld.getTileEntity(new BlockPos(itemTag.getInteger("xCoord"), itemTag.getInteger("yCoord"), itemTag.getInteger("zCoord"))); - - if (tileEntity instanceof TESpellTable) - { - TESpellTable homHeart = (TESpellTable) tileEntity; - - if (homHeart.canCastSpell()) - { - if(BindableItems.syphonBatteries(stack, player, homHeart.getCostForSpell())) - { - BindableItems.syphonBatteries(stack, player, homHeart.castSpell(stack, world, player)); - } - } else - { - return stack; - } - } else - { - return stack; - } - } else - { - return stack; - } - } else - { - return stack; - } - world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - return stack; - } - - public int getDimensionID(ItemStack itemStack) - { - if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - return itemStack.getTagCompound().getInteger("dimensionId"); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java deleted file mode 100644 index 1c1adf9e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java +++ /dev/null @@ -1,44 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; - -public class BloodShard extends Item implements ArmourUpgrade -{ - public BloodShard() - { - super(); - } - - public int getBloodShardLevel() - { - if (this.equals(ModItems.weakBloodShard)) - { - return 1; - } else if (this.equals(ModItems.demonBloodShard)) - { - return 2; - } - - return 0; - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {} - - @Override - public boolean isUpgrade() - { - return false; - } - - @Override - public int getEnergyForTenSeconds() - { - return 0; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java deleted file mode 100644 index cbeefaef..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java +++ /dev/null @@ -1,274 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockLeavesBase; -import net.minecraft.block.state.IBlockState; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemAxe; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -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; - -public class BoundAxe extends ItemAxe implements IBindable -{ - public float efficiencyOnProperMaterial = 12.0F; - public float damageVsEntity; - private int energyUsed; - - public BoundAxe() - { - super(AlchemicalWizardry.bloodBoundToolMaterial); - setMaxStackSize(1); - this.efficiencyOnProperMaterial = 12.0F; - this.damageVsEntity = 5; - setEnergyUsed(5); - } - - public void setEnergyUsed(int i) - { - energyUsed = i; - } - - public int getEnergyUsed() - { - return this.energyUsed; - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.boundaxe.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (par1ItemStack.getTagCompound().getBoolean("isActive")) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); - } else - { - 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")); - } - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World world, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); - par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (world.getWorldTime() - 1) % 200); - return par1ItemStack; - } - - if (world.isRemote) - { - return par1ItemStack; - } - - if (!getActivated(par1ItemStack) || SpellHelper.isFakePlayer(world, par3EntityPlayer)) - { - return par1ItemStack; - } - - if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionInhibit)) - { - return par1ItemStack; - } - - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 10000)) - { - return par1ItemStack; - } - - BlockPos pos = par3EntityPlayer.getPosition(); - boolean silkTouch = EnchantmentHelper.getSilkTouchModifier(par3EntityPlayer); - int fortuneLvl = EnchantmentHelper.getFortuneModifier(par3EntityPlayer); - - HashMultiset dropMultiset = HashMultiset.create(); - - for (int i = -5; i <= 5; i++) - { - for (int j = 0; j <= 10; j++) - { - for (int k = -5; k <= 5; k++) - { - BlockPos newPos = pos.add(i, j, k); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - - if (block != null) - { - float str = getStrVsBlock(par1ItemStack, block); - - if (str > 1.1f || block instanceof BlockLeavesBase && world.canMineBlockBody(par3EntityPlayer, newPos)) - { - if (silkTouch && block.canSilkHarvest(world, newPos, state, par3EntityPlayer)) - { - dropMultiset.add(new ItemType(block, block.getMetaFromState(state))); - } else - { - List itemDropList = block.getDrops(world, newPos, state, fortuneLvl); - - if (itemDropList != null) - { - for (ItemStack stack : itemDropList) - dropMultiset.add(ItemType.fromStack(stack), stack.stackSize); - } - } - - world.setBlockToAir(newPos); - } - } - } - } - } - - BoundPickaxe.dropMultisetStacks(dropMultiset, world, pos.getX(), pos.getY() + par3EntityPlayer.getEyeHeight(), pos.getZ()); - - return par1ItemStack; - } - - @Override - public void onUpdate(ItemStack par1ItemStack, World world, Entity par3Entity, int par4, boolean par5) - { - if (!(par3Entity instanceof EntityPlayer)) - { - return; - } - - EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - if (world.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) - { - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 20)) - { - this.setActivated(par1ItemStack, false); - } - } - } - - par1ItemStack.setItemDamage(0); - } - - public void setActivated(ItemStack stack, boolean newActivated) - { - stack.setItemDamage(newActivated ? 1 : 0); - } - - public boolean getActivated(ItemStack stack) - { - return stack.getItemDamage() == 1; - } - - /** - * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if - * sword - */ - @Override - public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) - { - if (!getActivated(par1ItemStack)) - { - return 0.0F; - } - - return super.getStrVsBlock(par1ItemStack, par2Block); - } - - @Override - /** - * 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) - { - return getActivated(par1ItemStack); - } - - public boolean onBlockDestroyed(ItemStack par1ItemStack, World world, Block par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase) - { - return true; - } - - @Override - @SideOnly(Side.CLIENT) - /** - * Returns True is the item is renderer in full 3D when hold. - */ - public boolean isFull3D() - { - return true; - } - - /** - * Return the enchantability factor of the item, most of the time is based on material. - */ - @Override - public int getItemEnchantability() - { - return 30; - } - - /** - * FORGE: Overridden to allow custom tool effectiveness - */ - @Override - public float getDigSpeed(ItemStack stack, IBlockState state) - { - if (!getActivated(stack)) - { - return 0.0F; - } - - for (String type : getToolClasses(stack)) - { - if (state.getBlock().isToolEffective(type, state)) - return efficiencyOnProperMaterial; - } - return super.getDigSpeed(stack, state); - } - - @Override - public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) - { - return !getActivated(stack); - } - - @Override - public int getHarvestLevel(ItemStack stack, String toolClass) - { - if (getActivated(stack) && "axe".equals(toolClass)) - { - return 5; - } - - return 0; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundBlade.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundBlade.java deleted file mode 100644 index 90ab85e9..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundBlade.java +++ /dev/null @@ -1,187 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemSword; -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.common.omega.OmegaParadigm; -import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; - -public class BoundBlade extends ItemSword -{ - private int energyUsed; - - public BoundBlade() - { - super(AlchemicalWizardry.bloodBoundToolMaterial); - setMaxStackSize(1); - setEnergyUsed(50); - setFull3D(); - setMaxDamage(100); - } - - public void setEnergyUsed(int i) - { - energyUsed = i; - } - - public int getEnergyUsed() - { - return this.energyUsed; - } - - private OmegaParadigm getOmegaParadigmOfWeilder(EntityPlayer player) - { - return OmegaRegistry.getOmegaParadigmOfWeilder(player); - } - - @Override - public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) - { - boolean isActive = getActivated(stack); - if(isActive && !player.worldObj.isRemote) - { - OmegaParadigm parad = this.getOmegaParadigmOfWeilder(player); - - if(parad != null && parad.isPlayerWearingFullSet(player)) - { - if(!parad.onBoundSwordLeftClickEntity(stack, player, entity)) - { - return true; - } - } - } - return !isActive; - } - - @Override - public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) - { - if (par3EntityLivingBase instanceof EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, (EntityPlayer) par3EntityLivingBase) || !BindableItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3EntityLivingBase, this.getEnergyUsed())) - { - return false; - } - } - - par2EntityLivingBase.addPotionEffect(new PotionEffect(Potion.weakness.id, 60, 2)); - return true; - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); - par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100); - return par1ItemStack; - } - - if (!getActivated(par1ItemStack)) - { - return par1ItemStack; - } - - return par1ItemStack; - } - - @Override - public int getItemEnchantability() - { - return 30; - } - - @Override - public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) - { - if (!(par3Entity instanceof EntityPlayer)) - { - return; - } - - EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - if (par2World.getWorldTime() % 100 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) - { - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 50)) - { - this.setActivated(par1ItemStack, false); - } - } - } - - par1ItemStack.setItemDamage(0); - } - - public void setActivated(ItemStack stack, boolean newActivated) - { - stack.setItemDamage(newActivated ? 1 : 0); - } - - public boolean getActivated(ItemStack stack) - { - return stack.getItemDamage() == 1; - } - - public float func_82803_g() - { - return 4.0F; - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.caution.desc1")); - par3List.add(StatCollector.translateToLocal("tooltip.caution.desc2")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (par1ItemStack.getTagCompound().getBoolean("isActive")) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); - } else - { - 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")); - } - } - } - - @Override - public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) - { - if (par2Block == Blocks.web) - { - 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; - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java deleted file mode 100644 index 70d8bc36..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java +++ /dev/null @@ -1,292 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemPickaxe; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -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; - -public class BoundPickaxe extends ItemPickaxe implements IBindable -{ - public float efficiencyOnProperMaterial = 12.0F; - public float damageVsEntity; - - private int energyUsed; - - public BoundPickaxe() - { - super(AlchemicalWizardry.bloodBoundToolMaterial); - setMaxStackSize(1); - this.efficiencyOnProperMaterial = 12.0F; - this.damageVsEntity = 5; - this.setEnergyUsed(5); - } - - public void setEnergyUsed(int i) - { - energyUsed = i; - } - - public int getEnergyUsed() - { - return this.energyUsed; - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.boundpickaxe.desc1")); - par3List.add(StatCollector.translateToLocal("tooltip.boundpickaxe.desc2")); - - if (!(stack.getTagCompound() == null)) - { - if (stack.getTagCompound().getBoolean("isActive")) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); - } else - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); - } - - if (!stack.getTagCompound().getString("ownerName").equals("")) - { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + stack.getTagCompound().getString("ownerName")); - } - } - } - - @Override - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(stack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - this.setActivated(stack, !getActivated(stack)); - stack.getTagCompound().setInteger("worldTimeDelay", (int) (world.getWorldTime() - 1) % 200); - return stack; - } - - if (world.isRemote) - { - return stack; - } - - if (!getActivated(stack) || SpellHelper.isFakePlayer(world, par3EntityPlayer)) - { - return stack; - } - - if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionInhibit)) - { - return stack; - } - - if(!BindableItems.syphonBatteries(stack, par3EntityPlayer, 10000)) - { - return stack; - } - - BlockPos pos = par3EntityPlayer.getPosition(); - boolean silkTouch = EnchantmentHelper.getSilkTouchModifier(par3EntityPlayer); - int fortuneLvl = EnchantmentHelper.getFortuneModifier(par3EntityPlayer); - - HashMultiset dropMultiset = HashMultiset.create(); - - for (int i = -5; i <= 5; i++) - { - for (int j = 0; j <= 10; j++) - { - for (int k = -5; k <= 5; k++) - { - BlockPos newPos = pos.add(i, j, k); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - - if (block != null) - { - float str = getStrVsBlock(stack, block); - - if (str > 1.1f && world.canMineBlockBody(par3EntityPlayer, newPos)) - { - if (silkTouch && block.canSilkHarvest(world, newPos, state, par3EntityPlayer)) - { - dropMultiset.add(new ItemType(block, block.getMetaFromState(state))); - } else - { - List itemDropList = block.getDrops(world, newPos, state, fortuneLvl); - - if (itemDropList != null) - { - for (ItemStack stacky : itemDropList) - dropMultiset.add(ItemType.fromStack(stacky), stacky.stackSize); - } - } - - world.setBlockToAir(newPos); - } - } - } - } - } - - BoundPickaxe.dropMultisetStacks(dropMultiset, world, pos.getX(), pos.getY() + par3EntityPlayer.getEyeHeight(), pos.getZ()); - - return stack; - } - - public static void dropMultisetStacks(Multiset dropMultiset, World world, double x, double y, double z) - { - for (Multiset.Entry entry : dropMultiset.entrySet()) - { - int count = entry.getCount(); - ItemType type = entry.getElement(); - int maxStackSize = type.item.getItemStackLimit(type.createStack(1)); - - //Drop in groups of maximum size - while (count >= maxStackSize) - { - world.spawnEntityInWorld(new EntityItem(world, x, y, z, type.createStack(maxStackSize))); - count -= maxStackSize; - } - //Drop remainder - if (count > 0) - world.spawnEntityInWorld(new EntityItem(world, x, y, z, type.createStack(count))); - } - } - - @Override - public void onUpdate(ItemStack stack, World world, Entity par3Entity, int par4, boolean par5) - { - if (!(par3Entity instanceof EntityPlayer)) - { - return; - } - - EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; - - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - if (world.getWorldTime() % 200 == stack.getTagCompound().getInteger("worldTimeDelay") && stack.getTagCompound().getBoolean("isActive")) - { - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if(!BindableItems.syphonBatteries(stack, par3EntityPlayer, 20)) - { - this.setActivated(stack, false); - } - } - } - - stack.setItemDamage(0); - } - - public void setActivated(ItemStack stack, boolean newActivated) - { - stack.setItemDamage(newActivated ? 1 : 0); - } - - public boolean getActivated(ItemStack stack) - { - return stack.getItemDamage() == 1; - } - - /** - * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if - * sword - */ - @Override - public float getStrVsBlock(ItemStack stack, Block par2Block) //getStrVsBlock - { - if (!getActivated(stack)) - { - return 0.0F; - } - - return super.getStrVsBlock(stack, par2Block); - } - - /** - * 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 stack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) - { - return getActivated(stack); - } - - @SideOnly(Side.CLIENT) - - /** - * Returns True is the item is renderer in full 3D when hold. - */ - public boolean isFull3D() - { - return true; - } - - /** - * Return the enchantability factor of the item, most of the time is based on material. - */ - @Override - public int getItemEnchantability() - { - return 30; - } - - /** - * FORGE: Overridden to allow custom tool effectiveness - */ - @Override - public float getDigSpeed(ItemStack stack, IBlockState state) - { - if (!getActivated(stack)) - { - return 0.0F; - } - - for (String type : getToolClasses(stack)) - { - if (state.getBlock().isToolEffective(type, state)) - return efficiencyOnProperMaterial; - } - return super.getDigSpeed(stack, state); - } - - @Override - public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) - { - return !getActivated(stack); - } - - @Override - public int getHarvestLevel(ItemStack stack, String toolClass) - { - if (getActivated(stack) && "pickaxe".equals(toolClass)) - { - return 5; - } - - return 0; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java deleted file mode 100644 index aaa46ea5..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java +++ /dev/null @@ -1,272 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemSpade; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -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; - -public class BoundShovel extends ItemSpade implements IBindable -{ - public float efficiencyOnProperMaterial = 12.0F; - public float damageVsEntity; - - private int energyUsed; - - public BoundShovel() - { - super(AlchemicalWizardry.bloodBoundToolMaterial); - setMaxStackSize(1); - this.efficiencyOnProperMaterial = 12.0F; - this.damageVsEntity = 5; - setEnergyUsed(5); - } - - public void setEnergyUsed(int i) - { - energyUsed = i; - } - - public int getEnergyUsed() - { - return this.energyUsed; - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.boundshovel.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (par1ItemStack.getTagCompound().getBoolean("isActive")) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); - } else - { - 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")); - } - } - } - - @Override - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(stack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - this.setActivated(stack, !getActivated(stack)); - stack.getTagCompound().setInteger("worldTimeDelay", (int) (world.getWorldTime() - 1) % 200); - return stack; - } - - if (world.isRemote) - { - return stack; - } - - if (!getActivated(stack) || SpellHelper.isFakePlayer(world, par3EntityPlayer)) - { - return stack; - } - - if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionInhibit)) - { - return stack; - } - - if(!BindableItems.syphonBatteries(stack, par3EntityPlayer, 10000)) - { - return stack; - } - - BlockPos pos = par3EntityPlayer.getPosition(); - boolean silkTouch = EnchantmentHelper.getSilkTouchModifier(par3EntityPlayer); - int fortuneLvl = EnchantmentHelper.getFortuneModifier(par3EntityPlayer); - - HashMultiset dropMultiset = HashMultiset.create(); - - for (int i = -5; i <= 5; i++) - { - for (int j = 0; j <= 10; j++) - { - for (int k = -5; k <= 5; k++) - { - BlockPos newPos = pos.add(i, j, k); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - - if (block != null) - { - float str = getStrVsBlock(stack, block); - - if (str > 1.1f && world.canMineBlockBody(par3EntityPlayer, newPos)) - { - if (silkTouch && block.canSilkHarvest(world, newPos, state, par3EntityPlayer)) - { - dropMultiset.add(new ItemType(block, block.getMetaFromState(state))); - } else - { - List itemDropList = block.getDrops(world, newPos, state, fortuneLvl); - - if (itemDropList != null) - { - for (ItemStack stacky : itemDropList) - dropMultiset.add(ItemType.fromStack(stacky), stacky.stackSize); - } - } - - world.setBlockToAir(newPos); - } - } - } - } - } - - BoundPickaxe.dropMultisetStacks(dropMultiset, world, pos.getX(), pos.getY() + par3EntityPlayer.getEyeHeight(), pos.getZ()); - - return stack; - } - - @Override - public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) - { - if (!(par3Entity instanceof EntityPlayer)) - { - return; - } - - EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) - { - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 20)) - { - this.setActivated(par1ItemStack, false); - } - } - } - - par1ItemStack.setItemDamage(0); - } - - public void setActivated(ItemStack stack, boolean newActivated) - { - stack.setItemDamage(newActivated ? 1 : 0); - } - - public boolean getActivated(ItemStack stack) - { - return stack.getItemDamage() == 1; - } - - /** - * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if - * sword - */ - @Override - public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) - { - if (!getActivated(par1ItemStack)) - { - return 0.0F; - } - - return super.getStrVsBlock(par1ItemStack, par2Block); - } - - /** - * 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) - { - return getActivated(par1ItemStack); - } - - public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase) - { - return true; - } - - @SideOnly(Side.CLIENT) - - /** - * Returns True is the item is renderer in full 3D when hold. - */ - public boolean isFull3D() - { - return true; - } - - /** - * Return the enchantability factor of the item, most of the time is based on material. - */ - public int getItemEnchantability() - { - return 30; - } - - /** - * FORGE: Overridden to allow custom tool effectiveness - */ - @Override - public float getDigSpeed(ItemStack stack, IBlockState state) - { - if (!getActivated(stack)) - { - return 0.0F; - } - - for (String type : getToolClasses(stack)) - { - if (state.getBlock().isToolEffective(type, state)) - return efficiencyOnProperMaterial; - } - return super.getDigSpeed(stack, state); - } - - @Override - public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) - { - return !getActivated(stack); - } - - @Override - public int getHarvestLevel(ItemStack stack, String toolClass) - { - if (getActivated(stack) && "shovel".equals(toolClass)) - { - return 5; - } - - return 0; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java deleted file mode 100644 index f962d785..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java +++ /dev/null @@ -1,153 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import net.minecraft.entity.Entity; -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.BlockPos; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.FakePlayer; -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(); - setMaxStackSize(1); - setFull3D(); - } - - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) - { - if (this.canUseForSacrifice(stack)) - { - player.setItemInUse(stack, this.getMaxItemUseDuration(stack)); - return stack; - } - - if (!player.capabilities.isCreativeMode) - { - SacrificeKnifeUsedEvent evt = new SacrificeKnifeUsedEvent(player, true, true, 2); - if(MinecraftForge.EVENT_BUS.post(evt)) - { - return stack; - } - - if(evt.shouldDrainHealth) - { - player.setHealth(player.getHealth() - 2); - } - - if(!evt.shouldFillAltar) - { - return stack; - } - } - - if (player instanceof FakePlayer) - { - return stack; - } - - double posX = player.posX; - double posY = player.posY; - double posZ = player.posZ; - world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - float f = 1.0F; - float f1 = f * 0.6F + 0.4F; - float f2 = f * f * 0.7F - 0.5F; - float f3 = f * f * 0.6F - 0.7F; - - for (int l = 0; l < 8; ++l) - { - world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); - } - - if (!world.isRemote && SpellHelper.isFakePlayer(world, player)) - { - return stack; - } - - findAndFillAltar(world, player, Integer.MAX_VALUE); - return stack; - } - - public void findAndFillAltar(World world, EntityPlayer player, int amount) - { - BlockPos pos = player.getPosition(); - IBloodAltar altarEntity = getAltar(world, pos); - - if (altarEntity == null) - { - return; - } - - altarEntity.sacrificialDaggerCall(amount, false); - altarEntity.startCycle(); - } - - public IBloodAltar getAltar(World world, BlockPos pos) - { - TileEntity tileEntity; - - for (int i = -2; i <= 2; i++) - { - for (int j = -2; j <= 2; j++) - { - for (int k = -2; k <= 1; k++) - { - BlockPos newPos = pos.add(i, j, k); - tileEntity = world.getTileEntity(newPos); - - if(tileEntity instanceof IBloodAltar) - { - return (IBloodAltar)tileEntity; - } - } - } - } - - return null; - } - - @Override - public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) - { - if(!world.isRemote && entity instanceof EntityPlayer) - { - this.setUseForSacrifice(stack, this.isPlayerPreparedForSacrifice(world, (EntityPlayer)entity)); - } - } - - public boolean isPlayerPreparedForSacrifice(World world, EntityPlayer player) - { - return !world.isRemote && (PlayerSacrificeHandler.getPlayerIncense(player) > 0); - } - - public boolean canUseForSacrifice(ItemStack stack) - { - NBTTagCompound tag = stack.getTagCompound(); - - return tag != null && tag.getBoolean("sacrifice"); - } - - public void setUseForSacrifice(ItemStack stack, boolean sacrifice) - { - NBTTagCompound tag = stack.getTagCompound(); - if(tag == null) - { - tag = new NBTTagCompound(); - stack.setTagCompound(tag); - } - - tag.setBoolean("sacrifice", sacrifice); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeOrb.java deleted file mode 100644 index 9fa2cb2c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeOrb.java +++ /dev/null @@ -1,118 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -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.EnumParticleTypes; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.common.util.FakePlayer; -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 CreativeOrb extends Item implements IBindable -{ - public CreativeOrb() - { - super(); - setMaxStackSize(1); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.mode.creative")); - par3List.add(StatCollector.translateToLocal("tooltip.cheatyitem.desc1")); - par3List.add(StatCollector.translateToLocal("tooltip.cheatyitem.desc2")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - World world = par3EntityPlayer.worldObj; - - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer instanceof FakePlayer) - { - return par1ItemStack; - } - - if (world != null) - { - double posX = par3EntityPlayer.posX; - double posY = par3EntityPlayer.posY; - double posZ = par3EntityPlayer.posZ; - world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.getDimensionId(), 4, posX, posY, posZ); - } - - if (par3EntityPlayer.worldObj.isRemote) - { - return par1ItemStack; - } - - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null || itemTag.getString("ownerName").equals("")) - { - return par1ItemStack; - } - - if (par3EntityPlayer.isSneaking()) - { - SoulNetworkHandler.setCurrentEssence(itemTag.getString("ownerName"), 0); - } else - { - SoulNetworkHandler.addCurrentEssenceToMaximum(itemTag.getString("ownerName"), 1000000, Integer.MAX_VALUE); - } - return par1ItemStack; - } - - @Override - public ItemStack getContainerItem(ItemStack itemStack) - { - return itemStack; - } - - @Override - public boolean hasContainerItem(ItemStack itemStack) - { - return true; - } - - public int getCurrentEssence(ItemStack par1ItemStack) - { - if (par1ItemStack == null) - { - return 0; - } - - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null || itemTag.getString("ownerName").equals("")) - { - return 0; - } - - String owner = itemTag.getString("ownerName"); - World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); - - if (data == null) - { - data = new LifeEssenceNetwork(owner); - worldSave.setItemData(owner, data); - } - - return data.currentEssence; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java deleted file mode 100644 index 72140cd4..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java +++ /dev/null @@ -1,189 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; -import java.util.UUID; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.boss.IBossDisplayData; -import net.minecraft.entity.monster.EntityEnderman; -import net.minecraft.entity.monster.EntitySlime; -import net.minecraft.entity.passive.EntityAnimal; -import net.minecraft.entity.passive.EntityVillager; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.DamageSource; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -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; - -public class DaggerOfSacrifice extends BindableItems -{ - public DaggerOfSacrifice() - { - super(); - setMaxStackSize(1); - setEnergyUsed(100); - setFull3D(); - setMaxDamage(100); - } - - @Override - 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))) - { - return false; - } - - if(par2EntityLivingBase instanceof IHoardDemon) - { - return false; - } - - if (par2EntityLivingBase.isChild() || par2EntityLivingBase instanceof EntityPlayer || par2EntityLivingBase instanceof IBossDisplayData) - { - return false; - } - - World world = par2EntityLivingBase.worldObj; - - if (par2EntityLivingBase.isDead || par2EntityLivingBase.getHealth() < 0.5f) - { - return false; - } - - if(par2EntityLivingBase instanceof IDemon) - { - ((IDemon)par2EntityLivingBase).setDropCrystal(false); - this.findAndNotifyAltarOfDemon(world, par2EntityLivingBase); - } - - int lifeEssence = 500; - if (par2EntityLivingBase instanceof EntityVillager) lifeEssence = 2000; - else if (par2EntityLivingBase instanceof EntitySlime) lifeEssence = 150; - else if (par2EntityLivingBase instanceof EntityEnderman) lifeEssence = 200; - else if (par2EntityLivingBase instanceof EntityAnimal) lifeEssence = 250; - - if (findAndFillAltar(par2EntityLivingBase.worldObj, par2EntityLivingBase, lifeEssence)) - { - double posX = par2EntityLivingBase.posX; - double posY = par2EntityLivingBase.posY; - double posZ = par2EntityLivingBase.posZ; - - for (int i = 0; i < 8; i++) - { - SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.getDimensionId(), 1, posX, posY, posZ); - } - - par2EntityLivingBase.setHealth(-1); - par2EntityLivingBase.onDeath(DamageSource.generic); - } - - return false; - } - - public float func_82803_g() - { - return 4.0F; - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.caution.desc1")); - par3List.add(StatCollector.translateToLocal("tooltip.caution.desc2")); - } - - @Override - public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) - { - if (par2Block == Blocks.web) - { - 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; - } - } - - @Override - public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) - { - return false; - } - - @Override - public Multimap getAttributeModifiers(ItemStack itemStack) - { - Multimap multimap = super.getAttributeModifiers(itemStack); - multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(4186465, 46565), "Tool modifier", 1.0d, 0)); - return multimap; - } - - public boolean findAndNotifyAltarOfDemon(World world, EntityLivingBase sacrifice) - { - BlockPos pos = sacrifice.getPosition(); - IBloodAltar altarEntity = this.getAltar(world, pos); - - if (altarEntity == null) - { - return false; - } - - altarEntity.addToDemonBloodDuration(50); - - return true; - } - - public boolean findAndFillAltar(World world, EntityLivingBase sacrifice, int amount) - { - BlockPos pos = sacrifice.getPosition(); - IBloodAltar altarEntity = this.getAltar(world, pos); - - if (altarEntity == null) - { - return false; - } - - altarEntity.sacrificialDaggerCall(amount, true); - altarEntity.startCycle(); - return true; - } - - public IBloodAltar getAltar(World world, BlockPos pos) - { - TileEntity tileEntity; - - for (int i = -2; i <= 2; i++) - { - for (int j = -2; j <= 2; j++) - { - for (int k = -2; k <= 1; k++) - { - BlockPos newPos = pos.add(i, j, k); - tileEntity = world.getTileEntity(newPos); - - if ((tileEntity instanceof IBloodAltar)) - { - return (IBloodAltar) tileEntity; - } - } - } - } - - return null; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java deleted file mode 100644 index f54f5615..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -public class DawnScribeTool extends ScribeTool -{ - public DawnScribeTool() - { - super(6); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonCrystal.java deleted file mode 100644 index 504d7527..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonCrystal.java +++ /dev/null @@ -1,167 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.block.BlockFence; -import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MathHelper; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; - -public class DemonCrystal extends Item -{ - public DemonCrystal() - { - super(); - this.setHasSubtypes(true); - this.setCreativeTab(CreativeTabs.tabMisc); - setMaxStackSize(1); - } - - /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer - */ - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (world.isRemote) - { - return true; - } - else if (!playerIn.func_175151_a(pos.offset(side), side, stack)) - { - return false; - } - else - { - IBlockState iblockstate = world.getBlockState(pos); - - pos = pos.offset(side); - double d0 = 0.0D; - - if (side == EnumFacing.UP && iblockstate instanceof BlockFence) - { - d0 = 0.5D; - } - - String demonName = DemonCrystal.getDemonString(stack); - Entity entity = spawnCreature(world, demonName, (double)pos.getX() + 0.5D, (double)pos.getY() + d0, (double)pos.getZ() + 0.5D, stack); - - if (entity != null) - { - if (entity instanceof EntityLivingBase && stack.hasDisplayName()) - { - entity.setCustomNameTag(stack.getDisplayName()); - } - - if (!playerIn.capabilities.isCreativeMode) - { - --stack.stackSize; - } - } - - return true; - } - } - - /** - * 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) - { - Entity entity = null; - - for (int j = 0; j < 1; ++j) - { - entity = SummoningRegistry.getEntityWithID(par0World, par1); - - if (entity != null) - { - EntityLiving entityliving = (EntityLiving) entity; - entity.setLocationAndAngles(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) - { - ((EntityDemon) entityliving).func_152115_b(DemonCrystal.getOwnerName(itemStack)); - - if (!DemonCrystal.getOwnerName(itemStack).equals("")) - { - ((EntityDemon) entityliving).setTamed(true); - } - } - - par0World.spawnEntityInWorld(entity); - entityliving.playLivingSound(); - } - } - return entity; - } - - public static void setOwnerName(ItemStack par1ItemStack, String ownerName) - { - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - par1ItemStack.getTagCompound().setString("ownerName", ownerName); - } - - public static String getOwnerName(ItemStack par1ItemStack) - { - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - return par1ItemStack.getTagCompound().getString("ownerName"); - } - - public static void setDemonString(ItemStack itemStack, String demonName) - { - if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - itemStack.getTagCompound().setString("demonName", demonName); - } - - public static String getDemonString(ItemStack itemStack) - { - if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - return itemStack.getTagCompound().getString("demonName"); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.demonplacer.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) - { - 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 deleted file mode 100644 index c4508bc1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonicTelepositionFocus.java +++ /dev/null @@ -1,36 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.StatCollector; - -public class DemonicTelepositionFocus extends TelepositionFocus -{ - public DemonicTelepositionFocus() - { - super(4); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.demonictelepfocus.desc1")); - par3List.add(StatCollector.translateToLocal("tooltip.demonictelepfocus.desc2")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - 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.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 deleted file mode 100644 index 53db87f3..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -public class DuskScribeTool extends ScribeTool -{ - public DuskScribeTool() - { - super(5); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java deleted file mode 100644 index 9a33f1e8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -public class EarthScribeTool extends ScribeTool -{ - public EarthScribeTool() - { - super(3); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java deleted file mode 100644 index 13b03ab3..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java +++ /dev/null @@ -1,166 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.StatCollector; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaMainProjectile; - -public class EnergyBazooka extends BindableItems -{ - private int damage; - - public EnergyBazooka() - { - super(); - setMaxStackSize(1); - setFull3D(); - setMaxDamage(250); - this.setEnergyUsed(20000); - damage = 12; - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - final int maxDelay = 150; - - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); - par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100); - return par1ItemStack; - } - - if (!getActivated(par1ItemStack)) - { - return par1ItemStack; - } - - if (this.getDelay(par1ItemStack) > 0) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if(!syphonBatteries(par1ItemStack, par3EntityPlayer, this.getEnergyUsed())) - { - return par1ItemStack; - } - } - - par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - - if (!par2World.isRemote) - { - par2World.spawnEntityInWorld(new EntityEnergyBazookaMainProjectile(par2World, par3EntityPlayer, damage)); - this.setDelay(par1ItemStack, maxDelay); - } - - Vec3 vec = par3EntityPlayer.getLookVec(); - double wantedVelocity = 3.0f; - par3EntityPlayer.motionX = -vec.xCoord * wantedVelocity; - par3EntityPlayer.motionY = -vec.yCoord * wantedVelocity; - par3EntityPlayer.motionZ = -vec.zCoord * wantedVelocity; - par2World.playSoundEffect((double) ((float) par3EntityPlayer.posX + 0.5F), (double) ((float) par3EntityPlayer.posY + 0.5F), (double) ((float) par3EntityPlayer.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F); - par3EntityPlayer.fallDistance = 0; - return par1ItemStack; - } - - @Override - public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) - { - if (!(par3Entity instanceof EntityPlayer)) - { - return; - } - - EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - int delay = this.getDelay(par1ItemStack); - - if (!par2World.isRemote && delay > 0) - { - this.setDelay(par1ItemStack, delay - 1); - } - - if (par2World.getWorldTime() % 100 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) - { - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 50)) - { - this.setActivated(par1ItemStack, false); - } - } - } - - par1ItemStack.setItemDamage(0); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.energybazooka.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (par1ItemStack.getTagCompound().getBoolean("isActive")) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); - } else - { - 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")); - } - } - } - - public void setActivated(ItemStack stack, boolean newActivated) - { - stack.setItemDamage(newActivated ? 1 : 0); - } - - public boolean getActivated(ItemStack stack) - { - return stack.getItemDamage() == 1; - } - - public void setDelay(ItemStack par1ItemStack, int newDelay) - { - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - itemTag.setInteger("delay", newDelay); - } - - public int getDelay(ItemStack par1ItemStack) - { - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - return itemTag.getInteger("delay"); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlaster.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlaster.java deleted file mode 100644 index bc61c600..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlaster.java +++ /dev/null @@ -1,160 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; - -public class EnergyBlaster extends BindableItems -{ - private int damage; - - public EnergyBlaster() - { - super(); - setMaxStackSize(1); - setFull3D(); - setMaxDamage(250); - this.setEnergyUsed(150); - damage = 12; - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - final int maxDelay = 15; - - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - System.out.println("Toggle"); - this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); - par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100); - return par1ItemStack; - } - - if (!getActivated(par1ItemStack)) - { - return par1ItemStack; - } - - if (this.getDelay(par1ItemStack) > 0) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if(!syphonBatteries(par1ItemStack, par3EntityPlayer, this.getEnergyUsed())) - { - return par1ItemStack; - } - } - - par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - - if (!par2World.isRemote) - { - par2World.spawnEntityInWorld(new EnergyBlastProjectile(par2World, par3EntityPlayer, damage)); - this.setDelay(par1ItemStack, maxDelay); - } - - return par1ItemStack; - } - - @Override - public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) - { - if (!(par3Entity instanceof EntityPlayer)) - { - return; - } - EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - int delay = this.getDelay(par1ItemStack); - - if (!par2World.isRemote && delay > 0) - { - this.setDelay(par1ItemStack, delay - 1); - } - - if (par2World.getWorldTime() % 100 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) - { - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 50)) - { - this.setActivated(par1ItemStack, false); - } - } - } - - par1ItemStack.setItemDamage(0); - } - - @Override - 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")); - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.damage") + " " + damage); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (getActivated(par1ItemStack)) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); - } else - { - 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")); - } - } - } - - public void setActivated(ItemStack stack, boolean newActivated) - { - stack.setItemDamage(newActivated ? 1 : 0); - } - - public boolean getActivated(ItemStack stack) - { - return stack.getItemDamage() == 1; - } - - public void setDelay(ItemStack par1ItemStack, int newDelay) - { - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - itemTag.setInteger("delay", newDelay); - } - - public int getDelay(ItemStack par1ItemStack) - { - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - return itemTag.getInteger("delay"); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnhancedTelepositionFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnhancedTelepositionFocus.java deleted file mode 100644 index 2b4d1a42..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnhancedTelepositionFocus.java +++ /dev/null @@ -1,35 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.StatCollector; - -public class EnhancedTelepositionFocus extends TelepositionFocus -{ - public EnhancedTelepositionFocus() - { - super(2); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.enhancedtelepfocus.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - 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.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 deleted file mode 100644 index 204cb63e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/FireScribeTool.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -public class FireScribeTool extends ScribeTool -{ - public FireScribeTool() - { - super(2); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java deleted file mode 100644 index 173992f3..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java +++ /dev/null @@ -1,79 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.creativetab.CreativeTabs; -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.MathHelper; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.lwjgl.input.Keyboard; - -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; - -public class ItemAlchemyBase extends Item -{ - public static final String[] ITEM_NAMES = new String[]{"offensa", "praesidium", "orbis_terrae", "strengthened_catalyst", "concentrated_catalyst", "fractured_bone", "virtus", "reductus", "potentia"}; - - public ItemAlchemyBase() - { - super(); - this.hasSubtypes = true; - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.usedinalchemy")); - - if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) - { - ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack); - - if (recipe != null) - { - par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe")); - - for (ItemStack item : recipe) - { - if (item != null) - { - par3List.add("" + item.getDisplayName()); - } - } - } - } else - { - par3List.add("-" + StatCollector.translateToLocal("tooltip.alchemy.press") + " " + EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.shift") + EnumChatFormatting.GRAY + " " + StatCollector.translateToLocal("tooltip.alchemy.forrecipe") + "-"); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - return par1ItemStack; - } - - @Override - public String getUnlocalizedName(ItemStack itemStack) - { - int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ITEM_NAMES.length - 1); - return (getUnlocalizedName() + "." + ITEM_NAMES[meta]); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int meta = 0; meta < ITEM_NAMES.length; ++meta) - { - list.add(new ItemStack(id, 1, meta)); - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java deleted file mode 100644 index 790362e5..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java +++ /dev/null @@ -1,96 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.common.util.Constants; - -import java.util.List; - -public class ItemBlockCrystalBelljar extends ItemBlock -{ - public ItemBlockCrystalBelljar(Block par1) - { - super(par1); - this.setHasSubtypes(true); - this.setMaxDamage(0); - this.setMaxStackSize(16); - } - - @Override - public int getMetadata(int par1) - { - return par1; - } - - public ReagentContainer[] getReagentContainers(ItemStack stack) - { - if (stack != null && stack.hasTagCompound()) - { - NBTTagCompound tag = stack.getTagCompound(); - - NBTTagList tagList = tag.getTagList("reagentTanks", Constants.NBT.TAG_COMPOUND); - - int size = tagList.tagCount(); - ReagentContainer[] tanks = new ReagentContainer[size]; - - for (int i = 0; i < size; i++) - { - NBTTagCompound savedTag = tagList.getCompoundTagAt(i); - tanks[i] = ReagentContainer.readFromNBT(savedTag); - } - - return tanks; - } - return null; - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) - { - ReagentContainer[] tanks = this.getReagentContainers(stack); - - if (tanks == null) - { - list.add(StatCollector.translateToLocal("tooltip.crystalbelljar.empty")); - } else - { - list.add(StatCollector.translateToLocal("tooltip.crystalbelljar.contents")); - for (int i = 0; i < tanks.length; i++) - { - if (tanks[i] == null || tanks[i].getReagent() == null || tanks[i].getReagent().reagent == null) - { - list.add("- Empty"); - } else - { - ReagentStack reagentStack = tanks[i].getReagent(); - list.add("- " + reagentStack.reagent.name + ": " + reagentStack.amount + "/" + tanks[i].getCapacity() / 1000 + "k AR"); - } - } - } - } - - @Override - public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, IBlockState newState) - { - if (!world.setBlockState(pos, newState, 3)) return false; - - IBlockState state = world.getBlockState(pos); - if (state.getBlock() == this.block) - { - this.block.onBlockPlacedBy(world, pos, state, player, stack); - } - - return true; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java deleted file mode 100644 index fa709bfa..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java +++ /dev/null @@ -1,154 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -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; - -public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAltarManipulator -{ - public int conversionRate = 100; //LP / half heart - public float activationPoint = 0.5f; - public int tickRate = 20; - public int maxStored = 10000; - - public ItemBloodLetterPack() - { - super(ArmorMaterial.CHAIN, 0, 1); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.bloodletterpack.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - par3List.add(StatCollector.translateToLocal("tooltip.lp.storedlp") + " " + this.getStoredLP(par1ItemStack)); - } - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) - { - return "alchemicalwizardry:models/armor/bloodPack_layer_1.png"; - } - - @Override - public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) - { - if (world.isRemote) - { - return itemStack; - } - - MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, false); - - if (movingobjectposition == null) - { - return super.onItemRightClick(itemStack, world, player); - } else - { - if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - BlockPos pos = movingobjectposition.func_178782_a(); - - TileEntity tile = world.getTileEntity(pos); - - if (!(tile instanceof TEAltar)) - { - return super.onItemRightClick(itemStack, world, player); - } - - TEAltar altar = (TEAltar)tile; - - if(!altar.isActive()) - { - int amount = this.getStoredLP(itemStack); - if(amount > 0) - { - int filledAmount = altar.fillMainTank(amount); - amount -= filledAmount; - this.setStoredLP(itemStack, amount); - - world.markBlockForUpdate(pos); - } - } - } - } - - return itemStack; - } - - public void setStoredLP(ItemStack itemStack, int lp) - { - if(!itemStack.hasTagCompound()) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = itemStack.getTagCompound(); - - tag.setInteger("storedLP", lp); - } - - public int getStoredLP(ItemStack itemStack) - { - if(!itemStack.hasTagCompound()) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = itemStack.getTagCompound(); - - return tag.getInteger("storedLP"); - } - - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) - { - //This is where I need to do the updating - if(world.isRemote) - { - return; - } - - if(world.getWorldTime() % tickRate == 0) - { - boolean shouldExecute = player.getHealth() / player.getMaxHealth() > activationPoint && this.getStoredLP(itemStack) < maxStored; - - if(shouldExecute) - { - SoulNetworkHandler.hurtPlayer(player, 1.0f); - this.setStoredLP(itemStack, Math.min(this.getStoredLP(itemStack) + conversionRate, maxStored)); - } - } - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {} - - @Override - public boolean isUpgrade() - { - return true; - } - - @Override - public int getEnergyForTenSeconds() - { - return 0; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java deleted file mode 100644 index 00f46b90..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java +++ /dev/null @@ -1,59 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -public class ItemBloodRuneBlock extends ItemBlock -{ - public ItemBloodRuneBlock(Block block) - { - super(block); - setHasSubtypes(true); - } - - @Override - public String getUnlocalizedName(ItemStack itemstack) - { - String name; - - switch (itemstack.getItemDamage()) - { - case 0: - name = "blank"; - break; - - case 1: - name = "fill"; - break; - - case 2: - name = "empty"; - break; - - case 3: - name = "orb"; - break; - - case 4: - name = "betterCapacity"; - break; - - case 5: - name = "acceleration"; - break; - - default: - name = "broken"; - } - - return getUnlocalizedName() + "." + name; - } - - @Override - public int getMetadata(int par1) - - { - return par1; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java deleted file mode 100644 index 81550c21..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java +++ /dev/null @@ -1,89 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.common.DimensionManager; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; - -public class ItemComplexSpellCrystal extends BindableItems -{ - public ItemComplexSpellCrystal() - { - super(); - setMaxStackSize(1); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.complexspellcrystal.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - 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.alchemy.coords") + " " + itemTag.getInteger("xCoord") + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord")); - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.dimension") + " " + getDimensionID(par1ItemStack)); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par2World.isRemote) - { - World world = DimensionManager.getWorld(getDimensionID(par1ItemStack)); - - if (world != null) - { - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - TileEntity tileEntity = world.getTileEntity(new BlockPos(itemTag.getInteger("xCoord"), itemTag.getInteger("yCoord"), itemTag.getInteger("zCoord"))); - - if (tileEntity instanceof TESpellParadigmBlock) - { - TESpellParadigmBlock tileParad = (TESpellParadigmBlock) tileEntity; - - tileParad.castSpell(par2World, par3EntityPlayer, par1ItemStack); - } else - { - return par1ItemStack; - } - } else - { - return par1ItemStack; - } - } else - { - return par1ItemStack; - } - par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - return par1ItemStack; - } - - public int getDimensionID(ItemStack itemStack) - { - if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - return itemStack.getTagCompound().getInteger("dimensionId"); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java deleted file mode 100644 index 5f728a5f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java +++ /dev/null @@ -1,47 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -public class ItemComponents extends Item -{ - public static final String[] ITEM_NAMES = new String[]{"quartz_rod", "empty_core", "magicales_cable", "wood_brace", "stone_brace", "projectile_core", "self_core", "melee_core", "paradigm_back_plate", "output_cable", "flame_core", "icy_core", "gust_core", "earthen_core", "input_cable", "cracked_runic_plate", "runic_plate", "scribed_runic_plate", "default_core", "offensive_core", "defensive_core", "environmental_core", "power_core", "cost_core", "potency_core", "obsidian_brace", "tool_core", "ethereal_slate", "life_shard", "soul_shard", "soul_runic_plate", "life_brace", "ender_shard"}; - - public ItemComponents() - { - super(); - this.hasSubtypes = true; - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - return par1ItemStack; - } - - @Override - public String getUnlocalizedName(ItemStack itemStack) - { - //This is what will do all the localisation things on the alchemy components so you dont have to set it :D - int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ITEM_NAMES.length - 1); - return getUnlocalizedName() + "." + ITEM_NAMES[meta]; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int meta = 0; meta < ITEM_NAMES.length; ++meta) - { - list.add(new ItemStack(id, 1, meta)); - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemCrystalBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemCrystalBlock.java deleted file mode 100644 index 8b496da3..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemCrystalBlock.java +++ /dev/null @@ -1,43 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -public class ItemCrystalBlock extends ItemBlock -{ - public ItemCrystalBlock(Block par1) - { - super(par1); - setHasSubtypes(true); - } - - @Override - public String getUnlocalizedName(ItemStack itemstack) - { - String name; - - switch (itemstack.getItemDamage()) - { - case 0: - name = "fullCrystal"; - break; - - case 1: - name = "crystalBrick"; - break; - - default: - name = "broken"; - } - - return getUnlocalizedName() + "." + name; - } - - @Override - public int getMetadata(int par1) - - { - return par1; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemEnchantmentGlyphBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemEnchantmentGlyphBlock.java deleted file mode 100644 index 3b1063e1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemEnchantmentGlyphBlock.java +++ /dev/null @@ -1,42 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -public class ItemEnchantmentGlyphBlock extends ItemBlock -{ - public ItemEnchantmentGlyphBlock(Block block) - { - super(block); - setHasSubtypes(true); - } - - @Override - public String getUnlocalizedName(ItemStack itemstack) - { - String name; - - switch (itemstack.getItemDamage()) - { - case 0: - name = "enchantability"; - break; - - case 1: - name = "enchantmentLevel"; - break; - - default: - name = "broken"; - } - - return getUnlocalizedName() + "." + name; - } - - @Override - public int getMetadata(int par1) - { - return par1; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java deleted file mode 100644 index 7a96242a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java +++ /dev/null @@ -1,180 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.MathHelper; -import net.minecraft.util.StatCollector; -import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import net.minecraftforge.oredict.OreDictionary; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; -import WayofTime.alchemicalWizardry.api.sacrifice.IIncense; - -public class ItemIncense extends Item implements IIncense -{ - public static final String[] ITEM_NAMES = new String[]{"wood_ash", "byrrus", "livens", "viridis", "purpura"}; - - public ItemIncense() - { - super(); - this.hasSubtypes = true; - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) - { - list.add(StatCollector.translateToLocal("tooltip.alchemy.usedinincense")); - } - - @Override - public String getUnlocalizedName(ItemStack itemStack) - { - int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ITEM_NAMES.length - 1); - return (getUnlocalizedName() + "." + ITEM_NAMES[meta]); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int meta = 0; meta < ITEM_NAMES.length; ++meta) - { - list.add(new ItemStack(id, 1, meta)); - } - } - - @Override - @SideOnly(Side.CLIENT) - public int getColorFromItemStack(ItemStack stack, int pass) - { - if(!this.doesIncenseHaveUniqueTexture(stack.getItemDamage())) - { - EnumIncense inc = EnumIncense.getEnumForIndex(stack.getItemDamage()); - return (int)((255*inc.redColour * 256 * 256 + 255*inc.greenColour * 256 + 255*inc.blueColour)); - } - - return 256 * (256 * 255 + 255) + 255; - } - - @Override - public int getMinLevel(ItemStack stack) - { - return EnumIncense.getEnumForIndex(stack.getItemDamage()).minValue; - } - - @Override - public int getMaxLevel(ItemStack stack) - { - return EnumIncense.getEnumForIndex(stack.getItemDamage()).maxValue; - } - - @Override - public int getIncenseDuration(ItemStack stack) - { - return EnumIncense.getEnumForIndex(stack.getItemDamage()).incenseDuration; - } - - @Override - public float getTickRate(ItemStack stack) - { - return EnumIncense.getEnumForIndex(stack.getItemDamage()).tickRate; - } - - @Override - public float getRedColour(ItemStack stack) - { - return EnumIncense.getEnumForIndex(stack.getItemDamage()).redColour; - } - - @Override - public float getGreenColour(ItemStack stack) - { - return EnumIncense.getEnumForIndex(stack.getItemDamage()).greenColour; - } - - @Override - public float getBlueColour(ItemStack stack) - { - return EnumIncense.getEnumForIndex(stack.getItemDamage()).blueColour; - } - - public boolean doesIncenseHaveUniqueTexture(int meta) - { - return false; - } - - public static void registerIncenseRecipes() - { - int WILDCARD = OreDictionary.WILDCARD_VALUE; - ItemStack woodStack = new ItemStack(Blocks.log, 1, WILDCARD); - ItemStack charcoalStack = new ItemStack(Items.coal, 1, 1); - ItemStack leavesStack = new ItemStack(Blocks.leaves, 1, WILDCARD); - ItemStack goldNuggetStack = new ItemStack(Items.gold_nugget, 1, WILDCARD); - ItemStack stringStack = new ItemStack(Items.string, 1, WILDCARD); - ItemStack glowstoneStack = new ItemStack(Items.glowstone_dust, 1, WILDCARD); - ItemStack soulSandStack = new ItemStack(Blocks.soul_sand); - ItemStack gunpowderStack = new ItemStack(Items.gunpowder); - ItemStack fermentedEyeStack = new ItemStack(Items.fermented_spider_eye); - ItemStack quartzStack = new ItemStack(Items.quartz, 1, WILDCARD); - ItemStack blazePowderStack = new ItemStack(Items.blaze_powder); - ItemStack netherwartStack = new ItemStack(Items.nether_wart); - ItemStack fracturedBoneStack = new ItemStack(ModItems.baseAlchemyItems, 1, 5); - - 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))); - } - - 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), - GREEN(1200, 2000, 4.0f, 1000, 0, 1.0f, 0), - PURPLE(2000, 3000, 5.0f, 1000, 1.0f, 0, 1.0f); - - public final int minValue; - public final int maxValue; - public final float tickRate; - public final int incenseDuration; - - public final float redColour; - public final float greenColour; - public final float blueColour; - - EnumIncense(int minValue, int maxValue, float tickRate, int dur, float red, float green, float blue) - { - this.minValue = minValue; - this.maxValue = maxValue; - this.tickRate = tickRate; - this.incenseDuration = dur; - - this.redColour = red; - this.greenColour = green; - this.blueColour = blue; - } - - public static EnumIncense getEnumForIndex(int index) - { - if(index > EnumIncense.values().length || index < 0) - { - return WOODASH; - }else - { - return EnumIncense.values()[index]; - } - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java deleted file mode 100644 index e2916f15..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java +++ /dev/null @@ -1,28 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -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; - -public class ItemMailOrderCatalogue extends Item -{ - public ItemMailOrderCatalogue() - { - super(); - } - - @Override - public boolean hasCustomEntity(ItemStack stack) - { - return true; - } - - @Override - public Entity createEntity(World world, Entity location, ItemStack itemstack) - { - return new MailOrderEntityItem(world, location, itemstack); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java deleted file mode 100644 index a62bb184..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java +++ /dev/null @@ -1,93 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.Rituals; -import WayofTime.alchemicalWizardry.common.block.BlockRitualStone; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; - -public class ItemRitualDismantler extends BindableItems -{ - public ItemRitualDismantler() - { - super(); - setMaxStackSize(1); - } - - @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")); - } - - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) - { - return BindableItems.checkAndSetItemOwner(stack, player) && breakRitualStoneAtMasterStone(stack, player, world, pos); - } - - public boolean breakRitualStoneAtMasterStone(ItemStack stack, EntityPlayer player, World world, BlockPos pos) - { - ItemStack[] playerInventory = player.inventory.mainInventory; - TileEntity tileEntity = world.getTileEntity(pos); - - if (tileEntity instanceof TEMasterStone) - { - TEMasterStone masterStone = (TEMasterStone) tileEntity; - int direction = masterStone.getDirection(); - int freeSpace = -1; - - List ritualList = Rituals.getRitualList(masterStone.getCurrentRitual()); - if (ritualList == null) - { - return false; - } - - for (int i = 0; i < playerInventory.length; i++) - { - if (playerInventory[i] == null) - { - freeSpace = i; - break; - } - } - - for (RitualComponent rc : ritualList) - { - BlockPos newPos = pos.add(rc.getX(direction), rc.getY(), rc.getZ(direction)); - if (!world.isAirBlock(newPos) && world.getBlockState(newPos).getBlock() instanceof BlockRitualStone) - { - if (freeSpace >= 0) - { - if (BindableItems.syphonBatteries(stack, player, getEnergyUsed()) || player.capabilities.isCreativeMode) - { - world.setBlockToAir(newPos); - player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.ritualStone)); - if (world.isRemote) - { - world.playAuxSFX(2005, pos.offsetUp(), 0); - - return true; - } - } - - return true; - } - } - } - } - - return false; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java deleted file mode 100644 index f34e5283..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java +++ /dev/null @@ -1,527 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -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.BlockPos; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.IChatComponent; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.lwjgl.input.Keyboard; - -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; - -public class ItemRitualDiviner extends BindableItems implements IRitualDiviner -{ - private int maxMetaData; - - public ItemRitualDiviner() - { - super(); - setMaxStackSize(1); - setEnergyUsed(100); - setMaxDamage(4); - this.hasSubtypes = true; - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List par3List, boolean x) - { - par3List.add(StatCollector.translateToLocal("tooltip.ritualdiviner.desc")); - - if (this.getMaxRuneDisplacement(stack) == 1) - { - par3List.add(StatCollector.translateToLocal("tooltip.ritualdiviner.canplace")); - }else if (this.getMaxRuneDisplacement(stack) >= 2) - { - par3List.add(StatCollector.translateToLocal("tooltip.ritualdiviner.canplacedawn")); - - }else - { - par3List.add(StatCollector.translateToLocal("tooltip.ritualdiviner.cannotplace")); - } - - par3List.add(StatCollector.translateToLocal("tooltip.ritualdiviner.ritualtunedto") + " " + this.getNameForDirection(this.getDirection(stack))); - - boolean sneaking = Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT); - - if(sneaking) - { - 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.alchemy.ritualid") + " " + ritualID); - List ritualList = Rituals.getRitualList(this.getCurrentRitual(stack)); - if (ritualList == null) - { - return; - } - - int blankStones = 0; - int airStones = 0; - int waterStones = 0; - int fireStones = 0; - int earthStones = 0; - int duskStones = 0; - int dawnStones = 0; - - for (RitualComponent rc : ritualList) - { - switch (rc.getStoneType()) - { - case RitualComponent.BLANK: - blankStones++; - break; - - case RitualComponent.AIR: - airStones++; - break; - - case RitualComponent.WATER: - waterStones++; - break; - - case RitualComponent.FIRE: - fireStones++; - break; - - case RitualComponent.EARTH: - earthStones++; - break; - - case RitualComponent.DUSK: - duskStones++; - break; - - case RitualComponent.DAWN: - dawnStones++; - break; - } - } - - 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); - } - }else - { - par3List.add(EnumChatFormatting.AQUA + "-" + StatCollector.translateToLocal("tooltip.ritualdiviner.moreinfo") + "-"); - } - - } - - @Override - public String getItemStackDisplayName(ItemStack stack) - { - if (!(stack.getTagCompound() == null)) - { - String ritualID = this.getCurrentRitual(stack); - if (ritualID.equals("")) - { - return super.getItemStackDisplayName(stack); - } - return "Ritual: " + Rituals.getNameOfRitual(ritualID); - } else - { - return super.getItemStackDisplayName(stack); - } - } - - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (!BindableItems.checkAndSetItemOwner(stack, player)) return false; - - if(placeRitualStoneAtMasterStone(stack, player, world, pos)) - { - this.setStoredLocation(stack, new Int3(pos)); - return true; - }else if(!(world.getBlockState(pos).getBlock() instanceof IRitualStone || world.getBlockState(pos).getBlock() 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, BlockPos pos) - { - int direction = this.getDirection(stack); - - ItemStack[] playerInventory = player.inventory.mainInventory; - TileEntity tileEntity = world.getTileEntity(pos); - - if (tileEntity instanceof TEMasterStone) - { - List ritualList = Rituals.getRitualList(this.getCurrentRitual(stack)); - if (ritualList == null) - { - return false; - } - - int playerInvRitualStoneLocation = -1; - - for (int i = 0; i < playerInventory.length; i++) - { - if (playerInventory[i] == null) - { - continue; - } - - if (new ItemStack(ModBlocks.ritualStone).isItemEqual(playerInventory[i])) - { - playerInvRitualStoneLocation = i; - break; - } - } - - for (RitualComponent rc : ritualList) - { - BlockPos newPos = pos.add(rc.getX(direction), rc.getY(), rc.getZ(direction)); - - if (world.isAirBlock(newPos)) - { - if (playerInvRitualStoneLocation >= 0 || player.capabilities.isCreativeMode) - { - if (rc.getStoneType() > this.maxMetaData + this.getMaxRuneDisplacement(stack)) - { - world.playAuxSFX(200, newPos.offsetUp(), 0); - return true; - } - - if (!player.capabilities.isCreativeMode) - { - player.inventory.decrStackSize(playerInvRitualStoneLocation, 1); - } - - if(BindableItems.syphonBatteries(stack, player, getEnergyUsed())) - { - world.setBlockState(newPos, ModBlocks.ritualStone.getStateFromMeta(rc.getStoneType()), 3); - - if (world.isRemote) - { - world.playAuxSFX(2005, newPos.offsetUp(), 0); - - return true; - } - } - - return true; - } - } else - { - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - - if (block == ModBlocks.ritualStone) - { - int metadata = block.getMetaFromState(state); - if (metadata != rc.getStoneType()) - { - if(BindableItems.syphonBatteries(stack, player, getEnergyUsed())) - { - if (rc.getStoneType() > this.maxMetaData + this.getMaxRuneDisplacement(stack)) - { - world.playAuxSFX(200, newPos.offsetUp(), 0); - return true; - } - - world.setBlockState(newPos, ModBlocks.ritualStone.getStateFromMeta(rc.getStoneType()), 3); - return true; - } - } - } else - { - world.playAuxSFX(0, newPos.offsetUp(), 0); - return true; - } - } - } - } - - return false; - } - - @Override - public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) - { - if(entity instanceof EntityPlayer && hasStoredLocation(stack) && world.getWorldTime() % 5 == 0) - { - Int3 loc = getStoredLocation(stack); - - int x = loc.xCoord; - int y = loc.yCoord; - int z = loc.zCoord; - - if(!this.placeRitualStoneAtMasterStone(stack, (EntityPlayer)entity, world, new BlockPos(x, y, z))) - { - this.voidStoredLocation(stack); - } - } - } - - public void setStoredLocation(ItemStack stack, Int3 location) - { - NBTTagCompound tag = stack.getTagCompound(); - if(tag == null) - { - tag = new NBTTagCompound(); - stack.setTagCompound(tag); - } - - NBTTagCompound locTag = location.writeToNBT(new NBTTagCompound()); - locTag.setBoolean("isStored", true); - - tag.setTag("location", locTag); - } - - public void voidStoredLocation(ItemStack stack) - { - NBTTagCompound tag = stack.getTagCompound(); - if(tag == null || !tag.hasKey("location")) - { -// tag = new NBTTagCompound(); -// stack.setTagCompound(tag); - this.setStoredLocation(stack, new Int3(0,0,0)); - return; - } - - NBTTagCompound locTag = (NBTTagCompound)tag.getTag("location"); - if(locTag != null) - { - locTag.setBoolean("isStored", false); - } - } - - public Int3 getStoredLocation(ItemStack stack) - { - NBTTagCompound tag = stack.getTagCompound(); - if(tag == null || !tag.hasKey("location")) - { - return new Int3(0, 0, 0); - } - - NBTTagCompound locTag = (NBTTagCompound)tag.getTag("location"); - - return Int3.readFromNBT(locTag); - } - - public boolean hasStoredLocation(ItemStack stack) - { - NBTTagCompound tag = stack.getTagCompound(); - if(tag == null || !tag.hasKey("location")) - { - return false; - } - - NBTTagCompound locTag = (NBTTagCompound)tag.getTag("location"); - - return locTag.getBoolean("isStored"); - } - - @Override - public ItemStack onItemRightClick(ItemStack stack, World par2World, EntityPlayer par3EntityPlayer) - { - if (BindableItems.checkAndSetItemOwner(stack, par3EntityPlayer) && par3EntityPlayer.isSneaking()) - { - rotateRituals(par2World,par3EntityPlayer, stack, true); - } - - return stack; - } - - @Override - public boolean onEntitySwing(EntityLivingBase entityLiving, ItemStack stack) - { - if (entityLiving instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) entityLiving; - - if (!BindableItems.checkAndSetItemOwner(stack, player)) return true; - - if (!player.isSwingInProgress) - { - 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 ChatComponentText(StatCollector.translateToLocal("tooltip.ritualdiviner.ritualtunedto") + " " + this.getNameForDirection(direction))); -// } -// } - } - } - - return false; - } - - public void rotateRituals(World world, EntityPlayer player, ItemStack stack, boolean next) - { - this.voidStoredLocation(stack); - String currentRitualID = this.getCurrentRitual(stack); - - this.setCurrentRitual(stack, next? Rituals.getNextRitualKey(currentRitualID):Rituals.getPreviousRitualKey(currentRitualID)); - - if (world.isRemote) - { - IChatComponent chatmessagecomponent = new ChatComponentText(StatCollector.translateToLocal("message.ritual.currentritual") + " " + Rituals.getNameOfRitual(this.getCurrentRitual(stack))); - player.addChatComponentMessage(chatmessagecomponent); - } - } - - @Override - public String getCurrentRitual(ItemStack stack) - { - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - return stack.getTagCompound().getString("ritualID"); - } - - @Override - public void setCurrentRitual(ItemStack stack, String ritualID) - { - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - stack.getTagCompound().setString("ritualID", ritualID); - } - - @Override - public int getMaxRuneDisplacement(ItemStack stack) //0 indicates the starting 4 runes, 1 indicates it can use Dusk runes - { - return stack.getItemDamage(); - } - - @Override - public void setMaxRuneDisplacement(ItemStack stack, int displacement) - { - stack.setItemDamage(displacement); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - list.add(new ItemStack(id)); - - ItemStack duskRitualDivinerStack = new ItemStack(id); - this.setMaxRuneDisplacement(duskRitualDivinerStack, 1); - list.add(duskRitualDivinerStack); - - ItemStack dawnRitualDivinerStack = new ItemStack(id); - this.setMaxRuneDisplacement(dawnRitualDivinerStack, 2); - list.add(dawnRitualDivinerStack); - } - - @Override - public int getDirection(ItemStack itemStack) - { - if(itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - return itemStack.getTagCompound().getInteger("direction"); - } - - @Override - public void setDirection(ItemStack itemStack, int direction) - { - if(itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - itemStack.getTagCompound().setInteger("direction", direction); - } - - @Override - public int cycleDirection(ItemStack itemStack) - { - this.voidStoredLocation(itemStack); - int direction = this.getDirection(itemStack); - - if(direction < 4) - { - direction = Math.max(1, direction + 1); - }else - { - direction = 1; - } - - this.setDirection(itemStack, direction); - - return direction; - } - - @Override - public String getNameForDirection(int direction) - { - String dir = ""; - switch(direction) - { - case 0: - case 1: - dir = StatCollector.translateToLocal("message.ritual.side.north"); - break; - case 2: - dir = StatCollector.translateToLocal("message.ritual.side.east"); - break; - case 3: - dir = StatCollector.translateToLocal("message.ritual.side.south"); - break; - case 4: - dir = StatCollector.translateToLocal("message.ritual.side.west"); - } - - return dir; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEffectBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEffectBlock.java deleted file mode 100644 index 8a33e9af..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEffectBlock.java +++ /dev/null @@ -1,51 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -public class ItemSpellEffectBlock extends ItemBlock -{ - public ItemSpellEffectBlock(Block par1) - { - super(par1); - setHasSubtypes(true); - } - - @Override - public String getUnlocalizedName(ItemStack itemstack) - { - String name; - - switch (itemstack.getItemDamage()) - { - case 0: - name = "fire"; - break; - - case 1: - name = "ice"; - break; - - case 2: - name = "wind"; - break; - - case 3: - name = "earth"; - break; - - default: - name = "broken"; - } - - return getUnlocalizedName() + "." + name; - } - - @Override - public int getMetadata(int par1) - - { - return par1; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEnhancementBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEnhancementBlock.java deleted file mode 100644 index 0e121a16..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEnhancementBlock.java +++ /dev/null @@ -1,95 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -public class ItemSpellEnhancementBlock extends ItemBlock -{ - public ItemSpellEnhancementBlock(Block par1) - { - super(par1); - setHasSubtypes(true); - } - - @Override - public String getUnlocalizedName(ItemStack itemstack) - { - String name; - - switch (itemstack.getItemDamage()) - { - case 0: - name = "power1"; - break; - - case 1: - name = "power2"; - break; - - case 2: - name = "power3"; - break; - - case 3: - name = "power4"; - break; - - case 4: - name = "power5"; - break; - - case 5: - name = "cost1"; - break; - - case 6: - name = "cost2"; - break; - - case 7: - name = "cost3"; - break; - - case 8: - name = "cost4"; - break; - - case 9: - name = "cost5"; - break; - - case 10: - name = "potency1"; - break; - - case 11: - name = "potency2"; - break; - - case 12: - name = "potency3"; - break; - - case 13: - name = "potency4"; - break; - - case 14: - name = "potency5"; - break; - - default: - name = "broken"; - } - - return getUnlocalizedName() + "." + name; - } - - @Override - public int getMetadata(int par1) - - { - return par1; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellModifierBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellModifierBlock.java deleted file mode 100644 index 99cfebc6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellModifierBlock.java +++ /dev/null @@ -1,51 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -public class ItemSpellModifierBlock extends ItemBlock -{ - public ItemSpellModifierBlock(Block par1) - { - super(par1); - setHasSubtypes(true); - } - - @Override - public String getUnlocalizedName(ItemStack itemstack) - { - String name; - - switch (itemstack.getItemDamage()) - { - case 0: - name = "default"; - break; - - case 1: - name = "offensive"; - break; - - case 2: - name = "defensive"; - break; - - case 3: - name = "environmental"; - break; - - default: - name = "broken"; - } - - return getUnlocalizedName() + "." + name; - } - - @Override - public int getMetadata(int par1) - - { - return par1; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellParadigmBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellParadigmBlock.java deleted file mode 100644 index 1868c9dc..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellParadigmBlock.java +++ /dev/null @@ -1,50 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -public class ItemSpellParadigmBlock extends ItemBlock -{ - public ItemSpellParadigmBlock(Block par1) - { - super(par1); - setHasSubtypes(true); - } - - @Override - public String getUnlocalizedName(ItemStack itemstack) - { - String name; - - switch (itemstack.getItemDamage()) - { - case 0: - name = "projectile"; - break; - - case 1: - name = "self"; - break; - - case 2: - name = "melee"; - break; - - case 3: - name = "tool"; - break; - - default: - name = "broken"; - } - - return getUnlocalizedName() + "." + name; - } - - @Override - public int getMetadata(int par1) - { - return par1; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemStabilityGlyphBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemStabilityGlyphBlock.java deleted file mode 100644 index 45a0b90a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemStabilityGlyphBlock.java +++ /dev/null @@ -1,38 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -public class ItemStabilityGlyphBlock extends ItemBlock -{ - public ItemStabilityGlyphBlock(Block block) - { - super(block); - setHasSubtypes(true); - } - - @Override - public String getUnlocalizedName(ItemStack itemstack) - { - String name; - - switch (itemstack.getItemDamage()) - { - case 0: - name = "stability1"; - break; - - default: - name = "broken"; - } - - return getUnlocalizedName() + "." + name; - } - - @Override - public int getMetadata(int par1) - { - return par1; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/KeyOfBinding.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/KeyOfBinding.java deleted file mode 100644 index 16c07641..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/KeyOfBinding.java +++ /dev/null @@ -1,109 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.common.util.FakePlayer; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -public class KeyOfBinding extends BindableItems -{ - public KeyOfBinding() - { - super(); - setMaxStackSize(1); - this.setEnergyUsed(1000); - this.hasSubtypes = true; - } - - @Override - 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")); - } - } - - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - World world = par3EntityPlayer.worldObj; - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer instanceof FakePlayer || par3EntityPlayer instanceof EntityPlayerMP) - { - return par1ItemStack; - } - - if (world != null) - { - double posX = par3EntityPlayer.posX; - double posY = par3EntityPlayer.posY; - double posZ = par3EntityPlayer.posZ; - world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.getDimensionId(), 4, posX, posY, posZ); - } - - if (!par3EntityPlayer.worldObj.isRemote && !(par3EntityPlayer.getClass().equals(EntityPlayerMP.class))) - { - return par1ItemStack; - } - - if (par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null || itemTag.getString("ownerName").equals("")) - { - return par1ItemStack; - } - - String ownerName = itemTag.getString("ownerName"); - ItemStack[] inv = par3EntityPlayer.inventory.mainInventory; - - for (ItemStack itemStack : inv) - { - if (itemStack == null) - { - continue; - } - - Item item = itemStack.getItem(); - - if (item instanceof KeyOfBinding) - { - continue; - } - - if (item instanceof IBindable) - { - BindableItems.checkAndSetItemOwner(itemStack, ownerName); - } - } - - return par1ItemStack; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - list.add(new ItemStack(ModItems.itemKeyOfDiablo)); - ItemStack boundKey = new ItemStack(ModItems.itemKeyOfDiablo); - BindableItems.checkAndSetItemOwner(boundKey, "Server-wide Soul Network"); - list.add(boundKey); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java deleted file mode 100644 index 5cac4a71..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java +++ /dev/null @@ -1,76 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; - -public class LavaCrystal extends BindableItems -{ - public LavaCrystal() - { - super(); - setMaxStackSize(1); - setEnergyUsed(25); - } - - /* - * Used to have the item contain itself. - */ - @Override - public ItemStack getContainerItem(ItemStack itemStack) - { - SoulNetworkHandler.syphonFromNetwork(itemStack, this.getEnergyUsed()); - ItemStack copiedStack = itemStack.copy(); - copiedStack.setItemDamage(copiedStack.getItemDamage()); - copiedStack.stackSize = 1; - return copiedStack; - } - - @Override - public boolean hasContainerItem(ItemStack itemStack) - { - return true; - } - - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); - return par1ItemStack; - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.lavacrystal.desc1")); - par3List.add(StatCollector.translateToLocal("tooltip.lavacrystal.desc2")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - 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(""))) - { - String ownerName = itemStack.getTagCompound().getString("ownerName"); - - if (MinecraftServer.getServer() == null) - { - return false; - } - - if (SoulNetworkHandler.getCurrentEssence(ownerName) >= this.getEnergyUsed()) - { - return true; - } - } - return false; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/LifeBucket.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/LifeBucket.java deleted file mode 100644 index 7a19f8bd..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/LifeBucket.java +++ /dev/null @@ -1,12 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemBucket; - -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 deleted file mode 100644 index 26795324..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/MagicianBloodOrb.java +++ /dev/null @@ -1,10 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -public class MagicianBloodOrb extends Orb -{ - 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 deleted file mode 100644 index f7b15ab0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java +++ /dev/null @@ -1,10 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -public class MasterBloodOrb extends Orb -{ - public MasterBloodOrb(int damage) - { - super(damage); - orbLevel = 4; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/Orb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/Orb.java deleted file mode 100644 index 42a6a3b1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/Orb.java +++ /dev/null @@ -1,201 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -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.EnumParticleTypes; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -public class Orb extends Item implements ArmourUpgrade, IBindable, IBloodOrb -{ - private int maxEssence; - protected int orbLevel; - - public Orb(int damage) - { - super(); - setMaxStackSize(1); - maxEssence = damage; - orbLevel = 1; - } - - @Override - 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")); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) - { - return par1ItemStack; - } - - World world = par3EntityPlayer.worldObj; - - if (world != null) - { - double posX = par3EntityPlayer.posX; - double posY = par3EntityPlayer.posY; - double posZ = par3EntityPlayer.posZ; - world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.getDimensionId(), 4, posX, posY, posZ); - } - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if(SpellHelper.isFakePlayer(par2World, par3EntityPlayer)) - { - return par1ItemStack; - } - - if (itemTag == null || itemTag.getString("ownerName").equals("")) - { - return par1ItemStack; - } - - if (world.isRemote) - { - return par1ItemStack; - } - - if(itemTag.getString("ownerName").equals(SpellHelper.getUsername(par3EntityPlayer))) - { - SoulNetworkHandler.setMaxOrbToMax(itemTag.getString("ownerName"), this.orbLevel); - } - - SoulNetworkHandler.addCurrentEssenceToMaximum(itemTag.getString("ownerName"), 200, this.getMaxEssence()); - BindableItems.hurtPlayer(par3EntityPlayer, 200); - return par1ItemStack; - } - - /* - * @return the damage that was not deducted - */ - public int damageItem(ItemStack par1ItemStack, int par2int) - { - if (par2int == 0) - { - return 0; - } - - int before = this.getDamage(par1ItemStack); - this.setDamage(par1ItemStack, this.getDamage(par1ItemStack) + par2int); - return par2int - (this.getDamage(par1ItemStack) - before); - } - - protected void damagePlayer(World world, EntityPlayer player, int damage) - { - if (world != null) - { - double posX = player.posX; - double posY = player.posY; - double posZ = player.posZ; - world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - float f = 1.0F; - float f1 = f * 0.6F + 0.4F; - float f2 = f * f * 0.7F - 0.5F; - float f3 = f * f * 0.6F - 0.7F; - - for (int l = 0; l < 8; ++l) - { - world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); - } - } - - if (!player.capabilities.isCreativeMode) - { - for (int i = 0; i < damage; i++) - { - player.setHealth((player.getHealth() - 1)); - } - } - - if (player.getHealth() <= 0) - { - player.inventory.dropAllItems(); - } - } - - public int getMaxEssence() - { - return this.maxEssence; - } - - public int getOrbLevel() - { - return orbLevel; - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {} - - @Override - public boolean isUpgrade() - { - return false; - } - - @Override - public int getEnergyForTenSeconds() - { - return 0; - } - - @Override - public ItemStack getContainerItem(ItemStack itemStack) - { - return itemStack; - } - - @Override - public boolean hasContainerItem(ItemStack itemStack) - { - return true; - } - - //@SideOnly(Side.SERVER) - @Deprecated - public int getCurrentEssence(ItemStack par1ItemStack) - { - if (par1ItemStack == null) - { - return 0; - } - - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null || itemTag.getString("ownerName").equals("")) - { - return 0; - } - - String owner = itemTag.getString("ownerName"); - World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); - - if (data == null) - { - data = new LifeEssenceNetwork(owner); - worldSave.setItemData(owner, data); - } - - return data.currentEssence; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java deleted file mode 100644 index 90c5f01d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java +++ /dev/null @@ -1,36 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.StatCollector; - -public class ReinforcedTelepositionFocus extends TelepositionFocus -{ - public ReinforcedTelepositionFocus() - { - super(3); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.reinforcedtelepfocus.desc1")); - par3List.add(StatCollector.translateToLocal("tooltip.reinforcedtelepfocus.desc2")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - 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.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 deleted file mode 100644 index 2ad4253e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java +++ /dev/null @@ -1,233 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumAction; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.FakePlayer; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -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 SacrificialDagger extends Item -{ - public SacrificialDagger() - { - super(); - setMaxStackSize(1); - setFull3D(); - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - if (AlchemicalWizardry.wimpySettings) - { - par3List.add(StatCollector.translateToLocal("tooltip.sacrificialdagger.desc1")); - } else - { - par3List.add(StatCollector.translateToLocal("tooltip.sacrificialdagger.desc2")); - par3List.add(StatCollector.translateToLocal("tooltip.sacrificialdagger.desc3")); - } - } - - /** - * called when the player releases the use item button. Args: itemstack, world, entityplayer, itemInUseCount - */ - @Override - public void onPlayerStoppedUsing(ItemStack stack, World world, EntityPlayer player, int itemInUseCount) - { -// if(itemInUseCount < 32) -// { -// return; -// } - - PlayerSacrificeHandler.sacrificePlayerHealth(player); - } - - @Override - public int getMaxItemUseDuration(ItemStack stack) - { - return 72000; - } - - /** - * returns the action that specifies what animation to play when the items is being used - */ - @Override - public EnumAction getItemUseAction(ItemStack stack) - { - return EnumAction.BOW; - } - - @Override - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) - { - if (this.canUseForSacrifice(stack)) - { - player.setItemInUse(stack, this.getMaxItemUseDuration(stack)); - return stack; - } - - if (!player.capabilities.isCreativeMode) - { - SacrificeKnifeUsedEvent evt = new SacrificeKnifeUsedEvent(player, true, true, 2); - if(MinecraftForge.EVENT_BUS.post(evt)) - { - return stack; - } - - if(evt.shouldDrainHealth) - { - player.setHealth(player.getHealth() - 2); - } - - if(!evt.shouldFillAltar) - { - return stack; - } - } - - if (player instanceof FakePlayer) - { - return stack; - } - - double posX = player.posX; - double posY = player.posY; - double posZ = player.posZ; - world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - float f = 1.0F; - float f1 = f * 0.6F + 0.4F; - float f2 = f * f * 0.7F - 0.5F; - float f3 = f * f * 0.6F - 0.7F; - - for (int l = 0; l < 8; ++l) - { - world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); - } - - if (!world.isRemote && SpellHelper.isFakePlayer(world, player)) - { - return stack; - } - - if (player.isPotionActive(AlchemicalWizardry.customPotionSoulFray)) - { - findAndFillAltar(world, player, 20); - } else - { - findAndFillAltar(world, player, 200); - } - - if (player.getHealth() <= 0.001f) - { - player.onDeath(DamageSource.generic); - } - - return stack; - } - - public void findAndFillAltar(World world, EntityPlayer player, int amount) - { - BlockPos pos = player.getPosition(); - IBloodAltar altarEntity = getAltar(world, pos); - - if (altarEntity == null) - { - return; - } - - altarEntity.sacrificialDaggerCall(amount, false); - altarEntity.startCycle(); - } - - public IBloodAltar getAltar(World world, BlockPos pos) - { - TileEntity tileEntity; - - for (int i = -2; i <= 2; i++) - { - for (int j = -2; j <= 2; j++) - { - for (int k = -2; k <= 1; k++) - { - BlockPos newPos = pos.add(i, j, k); - tileEntity = world.getTileEntity(newPos); - - if(tileEntity instanceof IBloodAltar) - { - return (IBloodAltar)tileEntity; - } - } - } - } - - return null; - } - - @Override - public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) - { - if(!world.isRemote && entity instanceof EntityPlayer) - { - this.setUseForSacrifice(stack, this.isPlayerPreparedForSacrifice(world, (EntityPlayer)entity)); - } - } - - @Override - public String getItemStackDisplayName(ItemStack stack) - { - if (AlchemicalWizardry.wimpySettings) - { - return "Sacrificial Orb"; - } - return super.getItemStackDisplayName(stack); - } - - public boolean isPlayerPreparedForSacrifice(World world, EntityPlayer player) - { - return !world.isRemote && (PlayerSacrificeHandler.getPlayerIncense(player) > 0); - } - - public boolean canUseForSacrifice(ItemStack stack) - { - NBTTagCompound tag = stack.getTagCompound(); - - return tag != null && tag.getBoolean("sacrifice"); - } - - public void setUseForSacrifice(ItemStack stack, boolean sacrifice) - { - NBTTagCompound tag = stack.getTagCompound(); - if(tag == null) - { - tag = new NBTTagCompound(); - stack.setTagCompound(tag); - } - - tag.setBoolean("sacrifice", sacrifice); - } - - @Override - @SideOnly(Side.CLIENT) - public boolean hasEffect(ItemStack stack) - { - return this.canUseForSacrifice(stack) || super.hasEffect(stack); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ScribeTool.java deleted file mode 100644 index 57fd29fc..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ScribeTool.java +++ /dev/null @@ -1,51 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; - -import java.util.List; - -public class ScribeTool extends BindableItems -{ - private int meta; - - public ScribeTool(int inkType) - { - super(); - setMaxStackSize(1); - setMaxDamage(10); - setEnergyUsed(10); - this.meta = inkType; - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.scribetool.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) - { - if (par1ItemStack.getItemDamage() > 0) - { - par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() - 1); - } - } - return par1ItemStack; - } - - public int getType() - { - return this.meta; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java deleted file mode 100644 index 503643e0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java +++ /dev/null @@ -1,115 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.common.DimensionManager; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; - -public class TelepositionFocus extends BindableItems -{ - private int focusLevel; - - public TelepositionFocus(int focusLevel) - { - super(); - this.setMaxStackSize(1); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.focusLevel = focusLevel; - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.telepositionfocus.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - 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.alchemy.coords") + " " + itemTag.getInteger("xCoord") + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord")); - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.dimension") + " " + getDimensionID(par1ItemStack)); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) - { - if (par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - } - return par1ItemStack; - } - - public int getDimensionID(ItemStack itemStack) - { - if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - return itemStack.getTagCompound().getInteger("dimensionId"); - } - - public World getWorld(ItemStack itemStack) - { - return DimensionManager.getWorld(getDimensionID(itemStack)); - } - - public int xCoord(ItemStack itemStack) - { - if (!(itemStack.getTagCompound() == null)) - { - return itemStack.getTagCompound().getInteger("xCoord"); - } else - { - return 0; - } - } - - public int yCoord(ItemStack itemStack) - { - if (!(itemStack.getTagCompound() == null)) - { - return itemStack.getTagCompound().getInteger("yCoord"); - } else - { - return 0; - } - } - - public int zCoord(ItemStack itemStack) - { - if (!(itemStack.getTagCompound() == null)) - { - return itemStack.getTagCompound().getInteger("zCoord"); - } else - { - return 0; - } - } - - public BlockPos getBlockPos(ItemStack stack) - { - return new BlockPos(xCoord(stack), yCoord(stack), zCoord(stack)); - } - - public int getFocusLevel() - { - return this.focusLevel; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java deleted file mode 100644 index d8535662..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java +++ /dev/null @@ -1,10 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -public class TranscendentBloodOrb extends Orb -{ - 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 deleted file mode 100644 index 06d18615..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -public class WaterScribeTool extends ScribeTool -{ - public WaterScribeTool() - { - super(1); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java deleted file mode 100644 index b26cccab..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java +++ /dev/null @@ -1,828 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.armour; - -import java.util.List; - -import net.minecraft.client.model.ModelBiped; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumAction; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.potion.Potion; -import net.minecraft.util.DamageSource; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.common.ISpecialArmor; -import net.minecraftforge.common.util.Constants; -import net.minecraftforge.fml.common.Optional; -import net.minecraftforge.fml.common.Optional.Interface; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -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.BindableItems; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilDivination; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaArmour; - -@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")}) -public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialArmor, IBindable, ILPGauge//, IRevealer, IGoggles, IRunicArmor -{ - private static int invSize = 9; - @SideOnly(Side.CLIENT) - - public static boolean tryComplexRendering = true; - - public BoundArmour(int armorType) - { - super(ItemArmor.ArmorMaterial.GOLD, 0, armorType); - setMaxDamage(1000); - } - - ModelBiped model1 = null; - ModelBiped model2 = null; - ModelBiped model = null; - - @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) - { - if (tryComplexRendering) - { - int type = ((ItemArmor) itemStack.getItem()).armorType; - if (this.model1 == null) - { - this.model1 = new ModelOmegaArmour(1.0f, true, true, false, true); - } - if (this.model2 == null) - { - this.model2 = new ModelOmegaArmour(0.5f, false, false, true, false); - } - - if (type == 1 || type == 3 || type == 0) - { - this.model = model1; - } else - { - this.model = model2; - } - - if (this.model != null) - { - this.model.bipedHead.showModel = (type == 0); - this.model.bipedHeadwear.showModel = (type == 0); - this.model.bipedBody.showModel = ((type == 1) || (type == 2)); - this.model.bipedLeftArm.showModel = (type == 1); - this.model.bipedRightArm.showModel = (type == 1); - this.model.bipedLeftLeg.showModel = (type == 2 || type == 3); - this.model.bipedRightLeg.showModel = (type == 2 || type == 3); - this.model.isSneak = entityLiving.isSneaking(); - - this.model.isRiding = entityLiving.isRiding(); - this.model.isChild = entityLiving.isChild(); - - this.model.aimedBow = false; - this.model.heldItemRight = (entityLiving.getHeldItem() != null ? 1 : 0); - - if ((entityLiving instanceof EntityPlayer)) - { - if (((EntityPlayer) entityLiving).getItemInUseDuration() > 0) - { - EnumAction enumaction = ((EntityPlayer) entityLiving).getItemInUse().getItemUseAction(); - if (enumaction == EnumAction.BLOCK) - { - this.model.heldItemRight = 3; - } else if (enumaction == EnumAction.BOW) - { - this.model.aimedBow = true; - } - } - } - } - - return model; - - } else - { - return super.getArmorModel(entityLiving, itemStack, armorSlot); - } - } - - @Override - public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) - { - return false; - } - - public boolean isAffectedBySoulHarden() - { - return true; - } - - public double getBaseArmourReduction() - { - return 0.9; - } - - public double getArmourPenetrationReduction() - { - return 0.9; - } - - @Override - public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) - { - double armourReduction; - - int f = 0; - int h = 0; - - if (player.isPotionActive(AlchemicalWizardry.customPotionSoulFray)) - { - f = player.getActivePotionEffect(AlchemicalWizardry.customPotionSoulFray).getAmplifier() + 1; - } - - double damageAmount = 0.25; - - if (player.isPotionActive(AlchemicalWizardry.customPotionSoulHarden)) - { - h = player.getActivePotionEffect(AlchemicalWizardry.customPotionSoulHarden).getAmplifier() + 1; - } - - armourReduction = isAffectedBySoulHarden() ? 1 - (1 - this.getBaseArmourReduction()) * Math.pow(1.0/3.0, Math.max(0, h - f)) - 0.1 * Math.max(0, f-h) : getBaseArmourReduction(); - - damageAmount *= (armourReduction); - - int maxAbsorption = 100000; - - if (source.equals(DamageSource.drown)) - { - return new ArmorProperties(-1, 0, 0); - } - - if (source.equals(DamageSource.outOfWorld)) - { - if (isImmuneToVoid(armor)) - { - return new ArmorProperties(-1, damageAmount * 1000 , maxAbsorption); - } else - { - return new ArmorProperties(-1, 0, 0); - } - } - - ItemStack helmet = player.getEquipmentInSlot(4); - ItemStack plate = player.getEquipmentInSlot(3); - ItemStack leggings = player.getEquipmentInSlot(2); - ItemStack boots = player.getEquipmentInSlot(1); - - if (helmet == null || plate == null || leggings == null || boots == null) - { - return new ArmorProperties(-1, 0, 0); - } - - if (helmet.getItem() instanceof BoundArmour && plate.getItem() instanceof BoundArmour && leggings.getItem() instanceof BoundArmour && boots.getItem() instanceof BoundArmour) - { - if (source.isUnblockable()) - { - return new ArmorProperties(-1, damageAmount * getArmourPenetrationReduction(), maxAbsorption); - } - - return new ArmorProperties(-1, damageAmount, maxAbsorption); - } - - return new ArmorProperties(-1, 0, 0); - } - - @Override - public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) - { - if (armor.getItem() == ModItems.boundHelmet) - { - return 3; - } - - if (armor.getItem() == ModItems.boundChestplate) - { - return 8; - } - - if (armor.getItem() == ModItems.boundLeggings) - { - return 6; - } - - if (armor.getItem() == ModItems.boundBoots) - { - return 3; - } - - return 5; - } - - @Override - public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) - { - if (entity instanceof EntityPlayer) - { - BindableItems.checkAndSetItemOwner(stack, (EntityPlayer) entity); - - if (((EntityPlayer) entity).capabilities.isCreativeMode) - { - return; - } - } - - stack.setItemDamage(stack.getItemDamage() + damage); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.boundarmor.devprotect")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) - { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - - ItemStack[] inv = getInternalInventory(par1ItemStack); - - if (inv == null) - { - return; - } - - for (int i = 0; i < invSize; i++) - { - if (inv[i] != null) - { - par3List.add(StatCollector.translateToLocal("tooltip.item.iteminslot") + " " + i + ": " + inv[i].getDisplayName()); - } - } - } - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) - { - if (tryComplexRendering) - { - return "alchemicalwizardry:models/armor/BloodArmour_WIP.png"; - } - - if (entity instanceof EntityLivingBase) - { - if (this.getIsInvisible(stack)) - { - if (this == ModItems.boundHelmet || this == ModItems.boundChestplate || this == ModItems.boundBoots) - { - return "alchemicalwizardry:models/armor/boundArmour_invisible_layer_1.png"; - } - - if (this == ModItems.boundLeggings) - { - return "alchemicalwizardry:models/armor/boundArmour_invisible_layer_2.png"; - } - } - } - - if (this == ModItems.boundHelmet || this == ModItems.boundChestplate || this == ModItems.boundBoots) - { - return "alchemicalwizardry:models/armor/boundArmour_layer_1.png"; - } - - if (this == ModItems.boundLeggings) - { - return "alchemicalwizardry:models/armor/boundArmour_layer_2.png"; - } else - { - return null; - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); - return super.onItemRightClick(par1ItemStack, par2World, par3EntityPlayer); - } - - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) - { - if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - if (!player.isPotionActive(AlchemicalWizardry.customPotionInhibit)) - { - tickInternalInventory(itemStack, world, player, 0, false); - } - - this.setIsInvisible(itemStack, player.isPotionActive(Potion.invisibility.id)); - - this.repairArmour(world, player, itemStack); - } - - public void repairArmour(World world, EntityPlayer player, ItemStack itemStack) - { - if (itemStack.getItemDamage() > 0) - { - BindableItems.checkAndSetItemOwner(itemStack, player); - - if (!player.capabilities.isCreativeMode) - { - if(BindableItems.syphonBatteries(itemStack, player, itemStack.getItemDamage() * 75)) - { - itemStack.setItemDamage(0); - } - } - } - } - - public void tickInternalInventory(ItemStack par1ItemStack, World par2World, EntityPlayer par3Entity, int par4, boolean par5) - { - ItemStack[] inv = getInternalInventory(par1ItemStack); - - if (inv == null) - { - return; - } - - int blood = getMaxBloodShardLevel(par1ItemStack); - for (int i = 0; i < invSize; i++) - { - if (inv[i] == null) - { - continue; - } - - if (inv[i].getItem() instanceof ArmourUpgrade && blood > 0) - { - if (((ArmourUpgrade) inv[i].getItem()).isUpgrade()) - { - ((ArmourUpgrade) inv[i].getItem()).onArmourUpdate(par2World, par3Entity, inv[i]); - blood--; - } - - if (par2World.getWorldTime() % 200 == 0) - { - if (getUpgradeCostMultiplier(par1ItemStack) > 0.02f) - { - BindableItems.syphonBatteries(par1ItemStack, par3Entity, (int) (((ArmourUpgrade) inv[i].getItem()).getEnergyForTenSeconds() * getUpgradeCostMultiplier(par1ItemStack))); - } - } - } - } - } - - public int getMaxBloodShardLevel(ItemStack armourStack) - { - ItemStack[] inv = getInternalInventory(armourStack); - - if (inv == null) - { - return 0; - } - - int max = 0; - - for (int i = 0; i < invSize; i++) - { - ItemStack itemStack = inv[i]; - - if (itemStack != null) - { - if (itemStack.getItem().equals(ModItems.weakBloodShard)) - { - max = Math.max(max, 1); - } - - if (itemStack.getItem().equals(ModItems.demonBloodShard)) - { - max = Math.max(max, 2); - } - } - } - - return max; - } - - public boolean hasAddedToInventory(ItemStack sigilItemStack, ItemStack addedItemStack) - { - ItemStack[] inv = getInternalInventory(sigilItemStack); - - if (inv == null) - { - return false; - } - - if (addedItemStack == null) - { - return false; - } - - int candidateSlot = -1; - - for (int i = invSize - 1; i >= 0; i--) - { - ItemStack nextItem = inv[i]; - - if (nextItem == null) - { - candidateSlot = i; - } - } - - if (candidateSlot == -1) - { - return false; - } - - if (addedItemStack.getItem() instanceof ArmourUpgrade) - { - inv[candidateSlot] = addedItemStack; - saveInternalInventory(sigilItemStack, inv); - return true; - } - - return false; - } - - public ItemStack[] getInternalInventory(ItemStack itemStack) - { - NBTTagCompound itemTag = itemStack.getTagCompound(); - - if (itemTag == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - itemTag = itemStack.getTagCompound(); - - ItemStack[] inv = new ItemStack[9]; - NBTTagList tagList = itemTag.getTagList("Inventory", Constants.NBT.TAG_COMPOUND); - - if (tagList == null) - { - return null; - } - - for (int i = 0; i < tagList.tagCount(); i++) - { - NBTTagCompound tag = tagList.getCompoundTagAt(i); - int slot = tag.getByte("Slot"); - - if (slot >= 0 && slot < invSize) - { - inv[slot] = ItemStack.loadItemStackFromNBT(tag); - } - } - - return inv; - } - - public void saveInternalInventory(ItemStack itemStack, ItemStack[] inventory) - { - NBTTagCompound itemTag = itemStack.getTagCompound(); - - if (itemTag == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagList itemList = new NBTTagList(); - - for (int i = 0; i < invSize; i++) - { - if (inventory[i] != null) - { - NBTTagCompound tag = new NBTTagCompound(); - tag.setByte("Slot", (byte) i); - inventory[i].writeToNBT(tag); - itemList.appendTag(tag); - } - } - - itemTag.setTag("Inventory", itemList); - } - - public boolean isImmuneToVoid(ItemStack itemStack) - { - ItemStack[] inv = getInternalInventory(itemStack); - - if (inv == null) - { - return false; - } - - for (ItemStack item : inv) - { - if (item == null) - { - continue; - } - - if (item.getItem().equals(ModItems.voidSigil)) - { - return true; - } - } - - return false; - } - -// @Optional.Method(modid = "Thaumcraft") -// public boolean hasIRevealer(ItemStack itemStack) -// { -// ItemStack[] inv = getInternalInventory(itemStack); -// -// if (inv == null) -// { -// return false; -// } -// -// for (ItemStack item : inv) -// { -// if (item == null) -// { -// continue; -// } -// -// if (item.getItem() instanceof IRevealer) -// { -// return true; -// } -// } -// -// return false; -// } -// -// @Optional.Method(modid = "Thaumcraft") -// public boolean hasIGoggles(ItemStack itemStack) -// { -// ItemStack[] inv = getInternalInventory(itemStack); -// -// if (inv == null) -// { -// return false; -// } -// -// int blood = getMaxBloodShardLevel(itemStack); -// -// for (ItemStack item : inv) -// { -// if (item == null) -// { -// continue; -// } -// if (item.getItem() instanceof ArmourUpgrade && blood > 0) -// { -// if (item.getItem() instanceof IGoggles) -// { -// return true; -// } -// -// if(((ArmourUpgrade)item.getItem()).isUpgrade()) -// { -// blood--; -// } -// } -// } -// -// return false; -// } - - @Override - public boolean canSeeLPBar(ItemStack itemStack) - { - ItemStack[] inv = getInternalInventory(itemStack); - - if (inv == null) - { - return false; - } - - int blood = getMaxBloodShardLevel(itemStack); - - for (ItemStack item : inv) - { - if (item == null) - { - continue; - } - if (item.getItem() instanceof ArmourUpgrade && blood > 0) - { - if (item.getItem() instanceof SigilDivination) - { - return true; - } - - if(((ArmourUpgrade)item.getItem()).isUpgrade()) - { - blood--; - } - } - } - - return false; - } - - public float getUpgradeCostMultiplier(ItemStack itemStack) - { - ItemStack[] inv = getInternalInventory(itemStack); - - if (inv == null) - { - return 1.0f; - } - - for (ItemStack item : inv) - { - if (item == null) - { - continue; - } - - if (item.getItem().equals(ModItems.weakBloodOrb)) - { - return 0.75f; - } - - if (item.getItem().equals(ModItems.apprenticeBloodOrb)) - { - return 0.50f; - } - - if (item.getItem().equals(ModItems.magicianBloodOrb)) - { - return 0.25f; - } - - if (item.getItem().equals(ModItems.masterBloodOrb)) - { - return 0.0f; - } - - if (item.getItem().equals(ModItems.archmageBloodOrb)) - { - return 0.0f; - } - } - - return 1.0f; - } - - public int getItemEnchantability(ItemStack stack) - { - NBTTagCompound tag = stack.getTagCompound(); - if (tag != null) - { - return tag.getInteger("enchantability"); - } - - return Integer.MIN_VALUE; - } - - public void setItemEnchantability(ItemStack stack, int enchantability) - { - NBTTagCompound tag = stack.getTagCompound(); - - if (tag == null) - { - stack.setTagCompound(new NBTTagCompound()); - tag = stack.getTagCompound(); - } - - tag.setInteger("enchantability", enchantability); - } - - public boolean getIsInvisible(ItemStack armourStack) - { - NBTTagCompound tag = armourStack.getTagCompound(); - if (tag != null) - { - return tag.getBoolean("invisible"); - } - - return false; - } - - public void setIsInvisible(ItemStack armourStack, boolean invisible) - { - NBTTagCompound tag = armourStack.getTagCompound(); - - if (tag == null) - { - armourStack.setTagCompound(new NBTTagCompound()); - tag = armourStack.getTagCompound(); - } - - tag.setBoolean("invisible", invisible); - } - -// @Override -// @Optional.Method(modid = "Thaumcraft") -// public boolean showNodes(ItemStack itemstack, EntityLivingBase player) -// { -// return this.hasIRevealer(itemstack); -// } -// -// @Override -// @Optional.Method(modid = "Thaumcraft") -// public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) -// { -// return this.hasIGoggles(itemstack); -// } -// -// @Override -// @Optional.Method(modid = "Thaumcraft") -// public int getRunicCharge(ItemStack itemstack) -// { -// ItemStack[] inv = this.getInternalInventory(itemstack); -// int shardLevel = this.getMaxBloodShardLevel(itemstack); -// int count = 0; -// int harden = 0; -// -// if (inv == null) -// { -// return 0; -// } -// -// for (ItemStack stack : inv) -// { -// if (count >= shardLevel) -// { -// break; -// } -// -// if (stack == null || !(stack.getItem() instanceof ArmourUpgrade)) -// { -// continue; -// } -// -// if (stack.getItem() instanceof ItemArmor && ((ItemArmor) stack.getItem()).armorType != this.armorType) -// { -// continue; -// } -// -// if (stack.hasTagCompound()) -// { -// NBTTagCompound tag = stack.getTagCompound(); -// -// int enchLvl = tag.getByte("RS.HARDEN"); -// -// if (stack.getItem() instanceof IRunicArmor) -// { -// enchLvl += ((IRunicArmor) stack.getItem()).getRunicCharge(stack); -// } -// -// if (enchLvl > 0) -// { -// harden += enchLvl; -// if (((ArmourUpgrade) stack.getItem()).isUpgrade()) -// { -// count += 1; -// } -// } -// } -// } -// -// return harden; -// } - - @Override - public boolean showIngameHUD(World world, ItemStack stack, EntityPlayer player) - { - ItemStack[] inv = getInternalInventory(stack); - - if (inv == null) - { - return false; - } - - for (ItemStack item : inv) - { - if (item == null) - { - continue; - } - - if (item.getItem().equals(ModItems.itemSeerSigil)) - { - return true; - } - } - - return false; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java deleted file mode 100644 index 14d756b0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java +++ /dev/null @@ -1,525 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.armour; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedList; -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; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumAction; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; -import WayofTime.alchemicalWizardry.common.items.BindableItems; -import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; - -public abstract class OmegaArmour extends BoundArmour -{ - public OmegaParadigm paradigm; - public Reagent reagent; - protected boolean storeBiomeID = false; - protected boolean storeDimensionID = false; - protected boolean storeYLevel = false; - protected boolean storeSeesSky = false; - - protected List illegalEnchantmentList = new LinkedList(); - - public float reagentDrainPerDamage = 0.1f; - - public OmegaArmour(int armorType) - { - super(armorType); - } - - public void setParadigm(OmegaParadigm paradigm) - { - this.paradigm = paradigm; - } - - public OmegaParadigm getOmegaParadigm() - { - return this.paradigm; - } - - public void setReagent(Reagent reagent) - { - this.reagent = reagent; - } - - @Override - public boolean isAffectedBySoulHarden() - { - return false; - } - - @Override - public double getBaseArmourReduction() - { - return 0.9; - } - - @Override - public double getArmourPenetrationReduction() - { - return 0.5; - } - - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) - { - super.onArmorTick(world, player, itemStack); - - if(world.getWorldTime() % 50 == 0) - { - if(this.storeBiomeID()) - { - BlockPos pos = player.getPosition(); - - BiomeGenBase biome = world.getBiomeGenForCoords(pos); - if(biome != null) - { - this.setBiomeIDStored(itemStack, biome.biomeID); - } - } - - if(this.storeDimensionID()) - { - this.setDimensionIDStored(itemStack, world.provider.getDimensionId()); - } - - if(this.storeYLevel()) - { - this.setYLevelStored(itemStack, (int) Math.floor(player.posY)); - } - } - - if(this.armorType == 1) - { - paradigm.onUpdate(world, player, itemStack); - int duration = this.getOmegaStallingDuration(itemStack); - if(duration > 0) - { - this.setOmegaStallingDuration(itemStack, duration - 1); - } - } - } - - @Override - public void repairArmour(World world, EntityPlayer player, ItemStack itemStack) - { - if (itemStack.getItemDamage() > 0) - { - if (!player.capabilities.isCreativeMode) - { - if(BindableItems.syphonBatteries(itemStack, player, itemStack.getItemDamage() * 75)) - { - float reagentAmount = APISpellHelper.getPlayerCurrentReagentAmount(player); - - reagentAmount -= itemStack.getItemDamage() * reagentDrainPerDamage; - APISpellHelper.setPlayerCurrentReagentAmount(player, Math.max(0, reagentAmount)); - - itemStack.setItemDamage(0); - } - } - } - } - - public void revertArmour(EntityPlayer player, ItemStack itemStack) - { - ItemStack stack = this.getContainedArmourStack(itemStack); - player.inventory.armorInventory[3-this.armorType] = stack; - } - - 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(); - omegaStack.setTagCompound(tag); - } - this.setContainedArmourStack(omegaStack, boundStack); - SoulNetworkHandler.checkAndSetItemOwner(omegaStack, SoulNetworkHandler.getOwnerName(boundStack)); - this.setItemEnchantability(omegaStack, Math.min(enchantability, 70)); - - EnchantmentHelper.setEnchantments(new HashMap(), omegaStack); - - List enchantList = new ArrayList(); - - int adjustedEnchantLevel = Math.min(enchantmentLevel, 30); - int additionalPasses = enchantmentLevel - adjustedEnchantLevel; - - for(int i=0; i<1+additionalPasses; i++) - { - List lst = EnchantmentHelper.buildEnchantmentList(rand, omegaStack, adjustedEnchantLevel); - if(lst != null) - { - enchantList.addAll(lst); - } - } - - Map> map = new HashMap>(); - - for(Object obj : enchantList) - { - EnchantmentData enchantmentdata = (EnchantmentData)obj; - - if(!map.containsKey(enchantmentdata.enchantmentobj)) - { - map.put(enchantmentdata.enchantmentobj, new HashMap()); - } - - Map numMap = map.get(enchantmentdata.enchantmentobj); - if(numMap.containsKey(enchantmentdata.enchantmentLevel)) - { - numMap.put(enchantmentdata.enchantmentLevel, numMap.get(enchantmentdata.enchantmentLevel)+1); - }else - { - numMap.put(enchantmentdata.enchantmentLevel, 1); - } - } - - for(Enchantment ench : this.illegalEnchantmentList) - { - if(map.containsKey(ench)) - { - map.remove(ench); - } - } - - List newEnchantList = new ArrayList(); - - for(Entry> entry : map.entrySet()) - { - Enchantment ench = entry.getKey(); - Map numMap = entry.getValue(); - - if(numMap.isEmpty()) - { - continue; - } - - int[] enchantValues = new int[1]; - - for(Entry entry1 : numMap.entrySet()) - { - int enchantLevel = entry1.getKey(); - int number = entry1.getValue(); - - if(enchantLevel >= enchantValues.length) - { - int[] newEnchantValues = new int[enchantLevel+1]; - for(int i=0; i< enchantValues.length; i++) - { - newEnchantValues[i] = enchantValues[i]; - } - - enchantValues = newEnchantValues; - } - - enchantValues[enchantLevel] += number; - } - - int size = enchantValues.length; - int i = 0; - while(i= 2 && i+1 >= size) - { - int[] newEnchantValues = new int[i+2]; - for(int z=0; z< enchantValues.length; z++) - { - newEnchantValues[z] = enchantValues[z]; - } - - enchantValues = newEnchantValues; - enchantValues[i+1] += number/2; - size = enchantValues.length; - } - i++; - } - - newEnchantList.add(new EnchantmentData(ench, enchantValues.length-1)); - } - - Iterator iterator = newEnchantList.iterator(); - - while (iterator.hasNext()) - { - EnchantmentData enchantmentdata = (EnchantmentData)iterator.next(); - - { - omegaStack.addEnchantment(enchantmentdata.enchantmentobj, enchantmentdata.enchantmentLevel); - } - } - - for(int i=0; i<1; i++) - { -// omegaStack = EnchantmentHelper.addRandomEnchantment(new Random(), omegaStack, 30); - } - return omegaStack; - } - - public void setContainedArmourStack(ItemStack omegaStack, ItemStack boundStack) - { - if(omegaStack == null || boundStack == null) - { - return; - } - - NBTTagCompound tag = new NBTTagCompound(); - boundStack.writeToNBT(tag); - - NBTTagCompound omegaTag = omegaStack.getTagCompound(); - if(omegaTag == null) - { - omegaTag = new NBTTagCompound(); - omegaStack.setTagCompound(omegaTag); - } - - omegaTag.setTag("armour", tag); - } - - public ItemStack getContainedArmourStack(ItemStack omegaStack) - { - NBTTagCompound omegaTag = omegaStack.getTagCompound(); - if(omegaTag == null) - { - return null; - } - - NBTTagCompound tag = omegaTag.getCompoundTag("armour"); - - return ItemStack.loadItemStackFromNBT(tag); - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) - { - return "alchemicalwizardry:models/armor/OmegaWater.png"; - } - - @SideOnly(Side.CLIENT) - public abstract ModelBiped getChestModel(); - @SideOnly(Side.CLIENT) - public abstract ModelBiped getLegsModel(); - @SideOnly(Side.CLIENT) - ModelBiped model1 = null; - @SideOnly(Side.CLIENT) - ModelBiped model2 = null; - @SideOnly(Side.CLIENT) - ModelBiped model = null; - - @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) - { - if (tryComplexRendering) - { - int type = ((ItemArmor) itemStack.getItem()).armorType; - if (this.model1 == null) - { - this.model1 = getChestModel(); - } - if (this.model2 == null) - { - this.model2 = getLegsModel(); - } - - if (type == 1 || type == 3 || type == 0) - { - this.model = model1; - } else - { - this.model = model2; - } - - if (this.model != null) - { - this.model.bipedHead.showModel = (type == 0); - this.model.bipedHeadwear.showModel = (type == 0); - this.model.bipedBody.showModel = ((type == 1) || (type == 2)); - this.model.bipedLeftArm.showModel = (type == 1); - this.model.bipedRightArm.showModel = (type == 1); - this.model.bipedLeftLeg.showModel = (type == 2 || type == 3); - this.model.bipedRightLeg.showModel = (type == 2 || type == 3); - this.model.isSneak = entityLiving.isSneaking(); - - this.model.isRiding = entityLiving.isRiding(); - this.model.isChild = entityLiving.isChild(); - - this.model.aimedBow = false; - this.model.heldItemRight = (entityLiving.getHeldItem() != null ? 1 : 0); - - if ((entityLiving instanceof EntityPlayer)) - { - if (((EntityPlayer) entityLiving).getItemInUseDuration() > 0) - { - EnumAction enumaction = ((EntityPlayer) entityLiving).getItemInUse().getItemUseAction(); - if (enumaction == EnumAction.BLOCK) - { - this.model.heldItemRight = 3; - } else if (enumaction == EnumAction.BOW) - { - this.model.aimedBow = true; - } - } - } - } - - return model; - - } else - { - return super.getArmorModel(entityLiving, itemStack, armorSlot); - } - } - - public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack) - { - if(paradigm != null) - { - paradigm.onOmegaKeyPressed(player, stack); - } - } - - public void setOmegaStallingDuration(ItemStack stack, int duration) - { - NBTTagCompound tag = stack.getTagCompound(); - if(tag == null) - { - tag = new NBTTagCompound(); - stack.setTagCompound(tag); - } - - tag.setInteger("OmegaStallDuration", duration); - } - - public int getOmegaStallingDuration(ItemStack stack) - { - NBTTagCompound tag = stack.getTagCompound(); - if(tag == null) - { - tag = new NBTTagCompound(); - stack.setTagCompound(tag); - } - - return tag.getInteger("OmegaStallDuration"); - } - - public boolean hasOmegaStalling(ItemStack stack) - { - return this.getOmegaStallingDuration(stack) > 0; - } - - public boolean storeBiomeID() - { - return this.storeBiomeID; - } - - public boolean storeDimensionID() - { - return this.storeDimensionID; - } - - public boolean storeYLevel() - { - return this.storeYLevel; - } - - public boolean storeSeesSky() - { - return this.storeSeesSky; - } - - public int getBiomeIDStored(ItemStack stack) - { - NBTTagCompound tag = stack.getTagCompound(); - if(tag == null) - { - tag = new NBTTagCompound(); - stack.setTagCompound(tag); - } - - return tag.getInteger("biomeID"); - } - - public void setBiomeIDStored(ItemStack stack, int id) - { - NBTTagCompound tag = stack.getTagCompound(); - if(tag == null) - { - tag = new NBTTagCompound(); - stack.setTagCompound(tag); - } - - tag.setInteger("biomeID", id); - } - - public int getDimensionIDStored(ItemStack stack) - { - NBTTagCompound tag = stack.getTagCompound(); - if(tag == null) - { - tag = new NBTTagCompound(); - stack.setTagCompound(tag); - } - - return tag.getInteger("dimensionID"); - } - - public void setDimensionIDStored(ItemStack stack, int id) - { - NBTTagCompound tag = stack.getTagCompound(); - if(tag == null) - { - tag = new NBTTagCompound(); - stack.setTagCompound(tag); - } - - tag.setInteger("dimensionID", id); - } - - public int getYLevelStored(ItemStack stack) - { - NBTTagCompound tag = stack.getTagCompound(); - if(tag == null) - { - tag = new NBTTagCompound(); - stack.setTagCompound(tag); - } - - return tag.getInteger("yLevel"); - } - - public void setYLevelStored(ItemStack stack, int level) - { - NBTTagCompound tag = stack.getTagCompound(); - if(tag == null) - { - tag = new NBTTagCompound(); - stack.setTagCompound(tag); - } - - tag.setInteger("yLevel", level); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java deleted file mode 100644 index 41545359..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java +++ /dev/null @@ -1,87 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.armour; - -import java.util.UUID; - -import net.minecraft.client.model.ModelBiped; -import net.minecraft.entity.Entity; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaEarth; - -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - -public class OmegaArmourEarth extends OmegaArmour -{ - public OmegaArmourEarth(int armorType) - { - super(armorType); - this.storeYLevel = true; - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) - { - return "alchemicalwizardry:models/armor/OmegaEarth.png"; - } - - @Override - @SideOnly(Side.CLIENT) - public ModelBiped getChestModel() - { - return new ModelOmegaEarth(1.0f, true, true, false, true); - } - - @Override - @SideOnly(Side.CLIENT) - public ModelBiped getLegsModel() - { - return new ModelOmegaEarth(0.5f, false, false, true, false); - } - - @Override - public Multimap getAttributeModifiers(ItemStack stack) - { - Multimap map = HashMultimap.create(); - 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)); - - return map; - } - - public float getKnockbackResist() - { - return 0.25f; - } - - public float getDefaultArmourBoost() - { - switch(this.armorType) - { - case 0: - return 2.5f; - case 1: - return 4; - case 2: - return 3.5f; - case 3: - return 2; - } - return 0.25f; - } - - public float getHealthBoostModifierForLevel(int yLevel) - { - return 0.05f * (yLevel <= 50 ? 1.5f : yLevel >= 100 ? -0.5f : 0.5f); - } - - public float getDamageModifierForLevel(int yLevel) - { - return 0.03f * (yLevel <= 50 ? 1.5f : yLevel >= 100 ? -0.5f : 0.5f); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java deleted file mode 100644 index eabc089b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java +++ /dev/null @@ -1,121 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.armour; - -import java.util.UUID; - -import net.minecraft.client.model.ModelBiped; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.entity.Entity; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.item.ItemStack; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaFire; - -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - -public class OmegaArmourFire extends OmegaArmour -{ - public OmegaArmourFire(int armorType) - { - super(armorType); - this.storeBiomeID = true; - this.illegalEnchantmentList.add(Enchantment.fireProtection); - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) - { - return "alchemicalwizardry:models/armor/OmegaFire.png"; - } - - @Override - @SideOnly(Side.CLIENT) - public ModelBiped getChestModel() - { - return new ModelOmegaFire(1.0f, true, true, false, true); - } - - @Override - @SideOnly(Side.CLIENT) - public ModelBiped getLegsModel() - { - return new ModelOmegaFire(0.5f, false, false, true, false); - } - - @Override - public Multimap getAttributeModifiers(ItemStack stack) - { - Multimap map = HashMultimap.create(); - int biomeID = this.getBiomeIDStored(stack); - BiomeGenBase biome = BiomeGenBase.getBiome(biomeID); - if(biome != null) - { - map.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), 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), "Damage modifier" + armorType, getDefaultArmourBoost()*getDamageModifierForBiome(biome), 1)); - } - return map; - } - - public float getDefaultArmourBoost() - { - switch(this.armorType) - { - case 0: - return 2.5f; - case 1: - return 4; - case 2: - return 3.5f; - case 3: - return 2; - } - return 0.25f; - } - - public float getHealthBoostModifierForBiome(BiomeGenBase biome) - { - float modifier = 0.05f; - - if(biome.isEqualTo(BiomeGenBase.hell)) - { - return modifier * 2.0f; - } - - if(biome.isEqualTo(BiomeGenBase.ocean)) - { - return modifier * -0.5f; - } - - if(biome.temperature >= 1) - { - return modifier * 1.5f; - } - - return modifier * 0.5f; - } - - public float getDamageModifierForBiome(BiomeGenBase biome) - { - float modifier = 0.03f; - - if(biome.isEqualTo(BiomeGenBase.hell)) - { - return modifier * 2.0f; - } - - if(biome.isEqualTo(BiomeGenBase.ocean)) - { - return modifier * -0.5f; - } - - if(biome.temperature >= 1) - { - return modifier * 1.5f; - } - - return modifier * 0.5f; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java deleted file mode 100644 index 0ef14b4f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java +++ /dev/null @@ -1,118 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.armour; - -import java.util.UUID; - -import net.minecraft.client.model.ModelBiped; -import net.minecraft.entity.Entity; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.item.ItemStack; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWater; - -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - -public class OmegaArmourWater extends OmegaArmour -{ - public OmegaArmourWater(int armorType) - { - super(armorType); - this.storeBiomeID = true; - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) - { - return "alchemicalwizardry:models/armor/OmegaWater.png"; - } - - @Override - @SideOnly(Side.CLIENT) - public ModelBiped getChestModel() - { - return new ModelOmegaWater(1.0f, true, true, false, true); - } - - @Override - @SideOnly(Side.CLIENT) - public ModelBiped getLegsModel() - { - return new ModelOmegaWater(0.5f, false, false, true, false); - } - - @Override - public Multimap getAttributeModifiers(ItemStack stack) - { - Multimap map = HashMultimap.create(); - int biomeID = this.getBiomeIDStored(stack); - BiomeGenBase biome = BiomeGenBase.getBiome(biomeID); - if(biome != null) - { - map.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), 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), "Damage modifier" + armorType, getDefaultArmourBoost()*getDamageModifierForBiome(biome), 2)); - } - return map; - } - - public float getDefaultArmourBoost() - { - switch(this.armorType) - { - case 0: - return 2.5f; - case 1: - return 4; - case 2: - return 3.5f; - case 3: - return 2; - } - return 0.25f; - } - - public float getHealthBoostModifierForBiome(BiomeGenBase biome) - { - float modifier = 0.05f; - if(biome.isEqualTo(BiomeGenBase.hell)) - { - return modifier * -0.5f; - } - - if(biome.isEqualTo(BiomeGenBase.ocean) || biome.isEqualTo(BiomeGenBase.river)) - { - return modifier * 2.0f; - } - - if(biome.isHighHumidity()) - { - return modifier * 1.5f; - } - - return modifier * 0.5f; - } - - public float getDamageModifierForBiome(BiomeGenBase biome) - { - float modifier = 0.03f; - - if(biome.isEqualTo(BiomeGenBase.hell)) - { - return modifier * -0.5f; - } - - if(biome.isEqualTo(BiomeGenBase.ocean) || biome.isEqualTo(BiomeGenBase.river)) - { - return modifier * 2.0f; - } - - if(biome.isHighHumidity()) - { - return modifier * 1.5f; - } - - return modifier * 0.5f; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java deleted file mode 100644 index 47408e50..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java +++ /dev/null @@ -1,81 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.armour; - -import java.util.UUID; - -import net.minecraft.client.model.ModelBiped; -import net.minecraft.entity.Entity; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWind; - -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - -public class OmegaArmourWind extends OmegaArmour -{ - public OmegaArmourWind(int armorType) - { - super(armorType); - this.storeYLevel = true; - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) - { - return "alchemicalwizardry:models/armor/OmegaWind.png"; - } - - @Override - @SideOnly(Side.CLIENT) - public ModelBiped getChestModel() - { - return new ModelOmegaWind(1.0f, true, true, false, true); - } - - @Override - @SideOnly(Side.CLIENT) - public ModelBiped getLegsModel() - { - return new ModelOmegaWind(0.5f, false, false, true, false); - } - - @Override - 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)); - - return map; - } - - public float getDefaultArmourBoost() - { - switch(this.armorType) - { - case 0: - return 2.5f; - case 1: - return 4; - case 2: - return 3.5f; - case 3: - return 2; - } - return 0.25f; - } - - public float getHealthBoostModifierForLevel(int yLevel) - { - return 0.05f * ((((float)Math.min(yLevel, 255))/64f) * 1.5f - 1); - } - - public float getDamageModifierForLevel(int yLevel) - { - return 0.02f * ((((float)Math.min(yLevel, 255))/64f) * 1.5f - 1); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalCleanser.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalCleanser.java deleted file mode 100644 index 985a8f23..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalCleanser.java +++ /dev/null @@ -1,68 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.energy; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.ChatComponentTranslation; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; - -public class AlchemicalCleanser extends Item implements IReagentManipulator -{ - public AlchemicalCleanser() - { - super(); - setMaxStackSize(1); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.destclearer.desc1")); - par3List.add(StatCollector.translateToLocal("tooltip.destclearer.desc2")); - } - - @Override - public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) - { - if (world.isRemote) - { - return itemStack; - } - - MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, false); - - if (movingobjectposition == null) - { - return itemStack; - } else - { - if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - BlockPos pos = movingobjectposition.func_178782_a(); - - TileEntity tile = world.getTileEntity(pos); - - if (!(tile instanceof TEReagentConduit)) - { - return itemStack; - } - - TEReagentConduit relay = (TEReagentConduit) tile; - - relay.reagentTargetList.clear(); - - player.addChatComponentMessage(new ChatComponentTranslation("message.destinationclearer.cleared")); - } - } - - return itemStack; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalRouter.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalRouter.java deleted file mode 100644 index eaa27a2b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalRouter.java +++ /dev/null @@ -1,323 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.energy; - -import java.util.LinkedList; -import java.util.List; - -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.BlockPos; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.ChatComponentTranslation; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.Int3; -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.items.interfaces.IReagentManipulator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; - -public class AlchemicalRouter extends Item implements IReagentManipulator -{ - public AlchemicalRouter() - { - super(); - this.hasSubtypes = true; - setMaxStackSize(1); - } - - @Override - public String getItemStackDisplayName(ItemStack stack) - { - Reagent reagent = this.getReagent(stack); - - String name = super.getItemStackDisplayName(stack); - - if (reagent != null) - { - name = name + " (" + reagent.name + ")"; - } - - return name; - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.attunedcrystal.desc1")); - par3List.add(StatCollector.translateToLocal("tooltip.attunedcrystal.desc2")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - Reagent reagent = this.getReagent(par1ItemStack); - if (reagent != null) - { - par3List.add(StatCollector.translateToLocal("tooltip.reagent.selectedreagent") + " " + reagent.name); - } - - 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)); - } - } - } - - @Override - public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) - { - if (world.isRemote) - { - return itemStack; - } - - MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, false); - - if (movingobjectposition == null) - { - if (player.isSneaking()) - { - this.setHasSavedCoordinates(itemStack, false); - player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.clearing")); - } - - return itemStack; - } else - { - if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - BlockPos pos = movingobjectposition.func_178782_a(); - - TileEntity tile = world.getTileEntity(pos); - - if (!(tile instanceof IReagentHandler)) - { - return itemStack; - } - - IReagentHandler relay = (IReagentHandler) tile; - - if (player.isSneaking()) - { - ReagentContainerInfo[] infos = relay.getContainerInfo(EnumFacing.UP); - if (infos != null) - { - List reagentList = new LinkedList(); - for (ReagentContainerInfo info : infos) - { - if (info != null) - { - ReagentStack reagentStack = info.reagent; - if (reagentStack != null) - { - Reagent reagent = reagentStack.reagent; - if (reagent != null) - { - reagentList.add(reagent); - } - } - } - } - - Reagent pastReagent = this.getReagent(itemStack); - - if (reagentList.size() <= 0) - { - return itemStack; - } - - int reagentLocation; - - reagentLocation = reagentList.indexOf(pastReagent); - - if (reagentLocation == -1 || reagentLocation + 1 >= reagentList.size()) - { - this.setReagentWithNotification(itemStack, reagentList.get(0), player); - } else - { - this.setReagentWithNotification(itemStack, reagentList.get(reagentLocation + 1), player); - } - } - } else - { - if (this.getHasSavedCoordinates(itemStack)) - { - Int3 coords = this.getCoordinates(itemStack); - int dimension = this.getDimension(itemStack); - - if (coords == null) - { - return itemStack; - } - - final int maxDistance = 6; - - if (dimension != world.provider.getDimensionId() || Math.abs(coords.xCoord - pos.getX()) > maxDistance || Math.abs(coords.yCoord - pos.getY()) > maxDistance || Math.abs(coords.zCoord - pos.getZ()) > maxDistance) - { - player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.error.toofar")); - return itemStack; - } - - TileEntity pastTile = world.getTileEntity(new BlockPos(coords.xCoord, coords.yCoord, coords.zCoord)); - if (!(pastTile instanceof TEReagentConduit)) - { - player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.error.cannotfind")); - return itemStack; - } - - Reagent reagent = this.getReagent(itemStack); - - if (reagent == null) - { - return itemStack; - } - - TEReagentConduit pastRelay = (TEReagentConduit) pastTile; - - if (player.isSneaking()) - { - pastRelay.removeReagentDestinationViaActual(reagent, pos); - } else - { - if (pastRelay.addReagentDestinationViaActual(reagent, pos)) - { - player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("message.attunedcrystal.linked") + " " + reagent.name)); - } else - { - player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.error.noconnections")); - } - } - world.markBlockForUpdate(new BlockPos(coords.xCoord, coords.yCoord, coords.zCoord)); - } else - { - int dimension = world.provider.getDimensionId(); - - this.setDimension(itemStack, dimension); - this.setCoordinates(itemStack, new Int3(pos)); - - player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.linking")); - } - } - } - } - - return itemStack; - } - - public void setCoordinates(ItemStack stack, Int3 coords) - { - if (!stack.hasTagCompound()) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - coords.writeToNBT(tag); - - this.setHasSavedCoordinates(stack, true); - } - - public void setDimension(ItemStack stack, int dimension) - { - if (!stack.hasTagCompound()) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setInteger("dimension", dimension); - } - - public Int3 getCoordinates(ItemStack stack) - { - if (!stack.hasTagCompound()) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - return Int3.readFromNBT(tag); - } - - public int getDimension(ItemStack stack) - { - if (!stack.hasTagCompound()) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - return tag.getInteger("dimension"); - } - - public void setHasSavedCoordinates(ItemStack stack, boolean flag) - { - if (!stack.hasTagCompound()) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setBoolean("hasSavedCoordinates", flag); - } - - public boolean getHasSavedCoordinates(ItemStack stack) - { - if (!stack.hasTagCompound()) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - return tag.getBoolean("hasSavedCoordinates"); - } - - public Reagent getReagent(ItemStack stack) - { - if (!stack.hasTagCompound()) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - return ReagentRegistry.getReagentForKey(tag.getString("reagent")); - } - - public void setReagent(ItemStack stack, Reagent reagent) - { - if (!stack.hasTagCompound()) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setString("reagent", ReagentRegistry.getKeyForReagent(reagent)); - } - - public void setReagentWithNotification(ItemStack stack, Reagent reagent, EntityPlayer player) - { - this.setReagent(stack, reagent); - - if (reagent != null) - { - player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("message.attunedcrystal.setto") + " " + reagent.name)); - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalSegmenter.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalSegmenter.java deleted file mode 100644 index fe20f238..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalSegmenter.java +++ /dev/null @@ -1,200 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.energy; - -import java.util.LinkedList; -import java.util.List; - -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.BlockPos; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ISegmentedReagentHandler; -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.items.interfaces.IReagentManipulator; - -public class AlchemicalSegmenter extends Item implements IReagentManipulator -{ - public AlchemicalSegmenter() - { - super(); - this.hasSubtypes = true; - setMaxStackSize(1); - } - - @Override - public String getItemStackDisplayName(ItemStack stack) - { - Reagent reagent = this.getReagent(stack); - String name = super.getItemStackDisplayName(stack); - if (reagent != null) - { - name = name + " (" + reagent.name + ")"; - } - return name; - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.tanksegmenter.desc1")); - par3List.add(StatCollector.translateToLocal("tooltip.tanksegmenter.desc2")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - Reagent reagent = this.getReagent(par1ItemStack); - if (reagent != null) - { - par3List.add(StatCollector.translateToLocal("tooltip.reagent.selectedreagent") + " " + reagent.name); - } - } - } - - @Override - public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) - { - if (world.isRemote) - { - return itemStack; - } - MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, false); - - if (movingobjectposition == null) - { - return itemStack; - } else - { - if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - BlockPos pos = movingobjectposition.func_178782_a(); - TileEntity tile = world.getTileEntity(pos); - if (!(tile instanceof ISegmentedReagentHandler)) - { - return itemStack; - } - ISegmentedReagentHandler reagentHandler = (ISegmentedReagentHandler) tile; - - if (player.isSneaking()) - { - ReagentContainerInfo[] infos = reagentHandler.getContainerInfo(EnumFacing.UP); - if (infos != null) - { - List reagentList = new LinkedList(); - for (ReagentContainerInfo info : infos) - { - if (info != null) - { - ReagentStack reagentStack = info.reagent; - if (reagentStack != null) - { - Reagent reagent = reagentStack.reagent; - if (reagent != null) - { - reagentList.add(reagent); - } - } - } - } - Reagent pastReagent = this.getReagent(itemStack); - boolean goForNext = false; - boolean hasFound = false; - for (Reagent reagent : reagentList) - { - if (goForNext) - { - goForNext = false; - break; - } - - if (reagent == pastReagent) - { - goForNext = true; - hasFound = true; - } - } - if (hasFound) - { - if (goForNext) - { - this.setReagentWithNotification(itemStack, reagentList.get(0), player); - } - } else - { - if (reagentList.size() >= 1) - { - this.setReagentWithNotification(itemStack, reagentList.get(0), player); - } - } - } - } else - { - Reagent reagent = this.getReagent(itemStack); - if (reagent == null) - { - //TODO: Send message that "All are wiped" - reagentHandler.getAttunedTankMap().clear(); - return itemStack; - } - int totalTankSize = reagentHandler.getNumberOfTanks(); - int numberAssigned = reagentHandler.getTanksTunedToReagent(reagent) + 1; - - if (numberAssigned > totalTankSize) - { - numberAssigned = 0; - } - - player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("message.tanksegmenter.nowhas") + " " + numberAssigned + " " + StatCollector.translateToLocal("message.tanksegmenter.tankssetto") + " " + reagent.name)); - - reagentHandler.setTanksTunedToReagent(reagent, numberAssigned); - } - } else if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.MISS) - { - this.setReagent(itemStack, null); - } - } - - return itemStack; - } - - public Reagent getReagent(ItemStack stack) - { - if (!stack.hasTagCompound()) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - return ReagentRegistry.getReagentForKey(tag.getString("reagent")); - } - - public void setReagent(ItemStack stack, Reagent reagent) - { - if (!stack.hasTagCompound()) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - tag.setString("reagent", ReagentRegistry.getKeyForReagent(reagent)); - } - - public void setReagentWithNotification(ItemStack stack, Reagent reagent, EntityPlayer player) - { - this.setReagent(stack, reagent); - - if (reagent != null) - { - 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 deleted file mode 100644 index 8acc4636..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/forestry/ItemBloodFrame.java +++ /dev/null @@ -1,145 +0,0 @@ -//package WayofTime.alchemicalWizardry.common.items.forestry; -// -//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.IBee; -//import forestry.api.apiculture.IBeeGenome; -//import forestry.api.apiculture.IBeeHousing; -//import forestry.api.apiculture.IHiveFrame; -// -//public class ItemBloodFrame extends EnergyItems implements IHiveFrame -//{ -// public ItemBloodFrame() -// { -// super(); -// this.maxStackSize = 1; -// this.setMaxDamage(10); -// setEnergyUsed(1000); -// setCreativeTab(AlchemicalWizardry.tabBloodMagic); -// } -// -// @Override -// public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) -// { -// par3List.add(StatCollector.translateToLocal("tooltip.bloodframe.desc")); -// -// if (!(par1ItemStack.getTagCompound() == null)) -// { -// par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); -// } -// } -// -// @Override -// @SideOnly(Side.CLIENT) -// public void registerIcons(IIconRegister iconRegister) -// { -// this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodFrame"); -// } -// -// @Override -// public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) -// { -// if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) -// { -// if (par1ItemStack.getItemDamage() > 0) -// { -// if(EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) -// { -// par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() - 1); -// } -// } -// } -// return par1ItemStack; -// } -// -// @Override public float getTerritoryModifier(IBeeGenome genome, float currentModifier) -// { -// // TODO Auto-generated method stub -// return 1; -// } -// -// @Override public float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) -// { -// // TODO Auto-generated method stub -// return 1; -// } -// -// @Override public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) -// { -// // TODO Auto-generated method stub -// return 0.0001f; -// } -// -// @Override public float getProductionModifier(IBeeGenome genome, float currentModifier) -// { -// // TODO Auto-generated method stub -// return 0; -// } -// -// @Override public float getFloweringModifier(IBeeGenome genome, float currentModifier) -// { -// // TODO Auto-generated method stub -// return 1; -// } -// -// @Override public float getGeneticDecay(IBeeGenome genome, float currentModifier) -// { -// // TODO Auto-generated method stub -// return 1; -// } -// -// @Override public boolean isSealed() -// { -// // TODO Auto-generated method stub -// return false; -// } -// -// @Override public boolean isSelfLighted() -// { -// // TODO Auto-generated method stub -// return false; -// } -// -// @Override public boolean isSunlightSimulated() -// { -// // TODO Auto-generated method stub -// return false; -// } -// -// @Override public boolean isHellish() -// { -// // TODO Auto-generated method stub -// return false; -// } -// -// @Override public ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear) -// { -// // TODO Auto-generated method stub -// if(EnergyItems.canSyphonInContainer(frame, getEnergyUsed()*wear)) -// { -// EnergyItems.syphonWhileInContainer(frame, getEnergyUsed()*wear); -// return frame; -// }else -// { -// frame.setItemDamage(frame.getItemDamage() + wear); -// if(frame.getItemDamage()>=frame.getMaxDamage()) -// { -// return null; -// } -// return frame; -// } -// -// } -// -// -// -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java deleted file mode 100644 index 013a085a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java +++ /dev/null @@ -1,385 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.potion; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.ai.attributes.IAttribute; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityPotion; -import net.minecraft.init.Items; -import net.minecraft.item.EnumAction; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.common.util.Constants; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper; - -import com.google.common.collect.HashMultimap; - -public class AlchemyFlask extends Item -{ - public AlchemyFlask() - { - super(); - setMaxDamage(8); - setMaxStackSize(1); - } - - 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); - - for (int i = 0; i < nbttaglist.tagCount(); ++i) - { - NBTTagCompound nbttagcompound = nbttaglist.getCompoundTagAt(i); - arraylist.add(AlchemyPotionHelper.readEffectFromNBT(nbttagcompound)); - } - return arraylist; - } else - { - return null; - } - } - - public static ArrayList getPotionEffects(ItemStack par1ItemStack) - { - ArrayList list = AlchemyFlask.getEffects(par1ItemStack); - - if (list != null) - { - ArrayList newList = new ArrayList(); - - for (AlchemyPotionHelper aph : list) - { - newList.add(aph.getPotionEffect()); - } - - return newList; - } else - { - return null; - } - } - - public static void setEffects(ItemStack par1ItemStack, List list) - { - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagList nbttaglist = new NBTTagList(); - - for (AlchemyPotionHelper aph : list) - { - nbttaglist.appendTag(AlchemyPotionHelper.setEffectToNBT(aph)); - } - - par1ItemStack.getTagCompound().setTag("CustomFlaskEffects", nbttaglist); - } - - public ItemStack onEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() + 1); - } - - if (!par2World.isRemote) - { - ArrayList list = getEffects(par1ItemStack); - - if (list != null) - { - for (AlchemyPotionHelper aph : list) - { - PotionEffect pe = aph.getPotionEffect(); - - if (pe != null) - { - //if(pe.get) - par3EntityPlayer.addPotionEffect(pe); - } - } - } - } - - return par1ItemStack; - } - - /** - * How long it takes to use or consume an item - */ - public int getMaxItemUseDuration(ItemStack par1ItemStack) - { - return 32; - } - - /** - * returns the action that specifies what animation to play when the items is being used - */ - public EnumAction getItemUseAction(ItemStack par1ItemStack) - { - if (this.isPotionThrowable(par1ItemStack)) - { - return EnumAction.NONE; - } - - return EnumAction.DRINK; - } - - /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer - */ - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (par1ItemStack.getItemDamage() < par1ItemStack.getMaxDamage()) - { - if (this.isPotionThrowable(par1ItemStack)) - { - if (!par2World.isRemote) - { - EntityPotion entityPotion = this.getEntityPotion(par1ItemStack, par2World, par3EntityPlayer); - - if (entityPotion != null) - { - float velocityChange = 2.0f; - entityPotion.motionX *= velocityChange; - entityPotion.motionY *= velocityChange; - entityPotion.motionZ *= velocityChange; - par2World.spawnEntityInWorld(entityPotion); - par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() + 1); - } - } - - return par1ItemStack; - } - - par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack)); - } - return par1ItemStack; - } - - public void setConcentrationOfPotion(ItemStack par1ItemStack, int potionID, int concentration) - { - ArrayList list = getEffects(par1ItemStack); - if (list != null) - { - for (AlchemyPotionHelper aph : list) - { - if (aph.getPotionID() == potionID) - { - aph.setConcentration(concentration); - break; - } - } - setEffects(par1ItemStack, list); - } - } - - public void setDurationFactorOfPotion(ItemStack par1ItemStack, int potionID, int durationFactor) - { - ArrayList list = getEffects(par1ItemStack); - if (list != null) - { - for (AlchemyPotionHelper aph : list) - { - if (aph.getPotionID() == potionID) - { - aph.setDurationFactor(durationFactor); - break; - } - } - setEffects(par1ItemStack, list); - } - } - - public boolean hasPotionEffect(ItemStack par1ItemStack, int potionID) - { - return false; - } - - public int getNumberOfPotionEffects(ItemStack par1ItemStack) - { - if (getEffects(par1ItemStack) != null) - { - return getEffects(par1ItemStack).size(); - } else - { - return 0; - } - } - - public boolean addPotionEffect(ItemStack par1ItemStack, int potionID, int tickDuration) - { - ArrayList list = getEffects(par1ItemStack); - if (list != null) - { - for (AlchemyPotionHelper aph : list) - { - if (aph.getPotionID() == potionID) - { - return false; - } - } - list.add(new AlchemyPotionHelper(potionID, tickDuration, 0, 0)); - setEffects(par1ItemStack, list); - return true; - } else - { - list = new ArrayList(); - list.add(new AlchemyPotionHelper(potionID, tickDuration, 0, 0)); - setEffects(par1ItemStack, list); - return true; - } - } - - 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()); - - if (this.isPotionThrowable(par1ItemStack)) - { - par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemyflask.caution")); - } - - List list1 = AlchemyFlask.getPotionEffects(par1ItemStack); - HashMultimap hashmultimap = HashMultimap.create(); - Iterator iterator; - - if (list1 != null && !list1.isEmpty()) - { - iterator = list1.iterator(); - - while (iterator.hasNext()) - { - PotionEffect potioneffect = (PotionEffect) iterator.next(); - String s = StatCollector.translateToLocal(potioneffect.getEffectName()).trim(); - Potion potion = Potion.potionTypes[potioneffect.getPotionID()]; - Map map = potion.getAttributeModifierMap(); - - if (map != null && map.size() > 0) - { - Iterator iterator1 = map.entrySet().iterator(); - - while (iterator1.hasNext()) - { - Entry entry = (Entry) iterator1.next(); - AttributeModifier attributemodifier = (AttributeModifier) entry.getValue(); - AttributeModifier attributemodifier1 = new AttributeModifier(attributemodifier.getName(), potion.getAttributeModifierAmount(potioneffect.getAmplifier(), attributemodifier), attributemodifier.getOperation()); - hashmultimap.put(((IAttribute) entry.getKey()).getAttributeUnlocalizedName(), attributemodifier1); - } - } - - if (potioneffect.getAmplifier() > 0) - { - s = s + " " + StatCollector.translateToLocal("potion.potency." + potioneffect.getAmplifier()).trim(); - } - - if (potioneffect.getDuration() > 20) - { - s = s + " (" + Potion.getDurationString(potioneffect) + ")"; - } - - if (potion.isBadEffect()) - { - par3List.add(EnumChatFormatting.RED + s); - } else - { - par3List.add(EnumChatFormatting.GRAY + s); - } - } - } else - { - String s1 = StatCollector.translateToLocal("potion.empty").trim(); - par3List.add(EnumChatFormatting.GRAY + s1); - } - - if (!hashmultimap.isEmpty()) - { - par3List.add(""); - par3List.add(EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("potion.effects.whenDrank")); - iterator = hashmultimap.entries().iterator(); - - while (iterator.hasNext()) - { - Entry entry1 = (Entry) iterator.next(); - AttributeModifier attributemodifier2 = (AttributeModifier) entry1.getValue(); - double d0 = attributemodifier2.getAmount(); - double d1; - - if (attributemodifier2.getOperation() != 1 && attributemodifier2.getOperation() != 2) - { - d1 = attributemodifier2.getAmount(); - } else - { - d1 = attributemodifier2.getAmount() * 100.0D; - } - - if (d0 > 0.0D) - { - par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocalFormatted("attribute.modifier.plus." + attributemodifier2.getOperation(), new Object[]{ItemStack.DECIMALFORMAT.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.DECIMALFORMAT.format(d1), StatCollector.translateToLocal("attribute.name." + (String) entry1.getKey())})); - } - } - } - } - - public boolean isPotionThrowable(ItemStack par1ItemStack) - { - return par1ItemStack.hasTagCompound() && par1ItemStack.getTagCompound().getBoolean("throwable"); - } - - public void setIsPotionThrowable(boolean flag, ItemStack par1ItemStack) - { - if (!par1ItemStack.hasTagCompound()) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - par1ItemStack.getTagCompound().setBoolean("throwable", flag); - } - - public EntityPotion getEntityPotion(ItemStack par1ItemStack, World worldObj, EntityLivingBase entityLivingBase) - { - ItemStack potionStack = new ItemStack(Items.potionitem, 1, 0); - potionStack.setTagCompound(new NBTTagCompound()); - ArrayList potionList = getPotionEffects(par1ItemStack); - - if (potionList == null) - { - return null; - } - NBTTagList nbttaglist = new NBTTagList(); - for (PotionEffect pe : potionList) - { - NBTTagCompound d = new NBTTagCompound(); - d.setByte("Id", (byte) pe.getPotionID()); - d.setByte("Amplifier", (byte) pe.getAmplifier()); - d.setInteger("Duration", pe.getDuration()); - d.setBoolean("Ambient", pe.getIsAmbient()); - nbttaglist.appendTag(d); - } - potionStack.getTagCompound().setTag("CustomPotionEffects", nbttaglist); - return new EntityPotion(worldObj, entityLivingBase, potionStack); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java deleted file mode 100644 index fe205e3d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java +++ /dev/null @@ -1,49 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.potion; - -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.api.alchemy.AlchemyRecipeRegistry; - -public class AlchemyReagent extends Item -{ - public AlchemyReagent() - { - super(); - setMaxStackSize(64); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.usedinalchemy")); - - if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) - { - ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack); - - if (recipe != null) - { - par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe")); - - for (ItemStack item : recipe) - { - if (item != null) - { - par3List.add("" + item.getDisplayName()); - } - } - } - } else - { - 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 deleted file mode 100644 index 594fce54..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.potion; - -public class AverageLengtheningCatalyst extends LengtheningCatalyst -{ - public AverageLengtheningCatalyst() - { - super(2); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java deleted file mode 100644 index 8f6143b4..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.potion; - -public class AveragePowerCatalyst extends PowerCatalyst -{ - public AveragePowerCatalyst() - { - super(2); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java deleted file mode 100644 index d61144f7..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java +++ /dev/null @@ -1,12 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.potion; - -import net.minecraft.item.Item; -import WayofTime.alchemicalWizardry.common.alchemy.ICombinationalCatalyst; - -public class CombinationalCatalyst extends Item implements ICombinationalCatalyst -{ - public CombinationalCatalyst() - { - super(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java deleted file mode 100644 index 4a870991..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java +++ /dev/null @@ -1,38 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.potion; - -public class EnhancedFillingAgent extends WeakFillingAgent -{ - public EnhancedFillingAgent() - { - super(); - } - - @Override - public int getFilledAmountForPotionNumber(int potionEffects) - { - if (potionEffects == 0) - { - return 8; - } - { - switch (potionEffects) - { - case 1: - return 6; - - case 2: - return 4; - - case 3: - return 3; - - case 4: - return 2; - - case 5: - return 2; - } - } - return 0; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java deleted file mode 100644 index f0e63816..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.potion; - -public class GreaterLengtheningCatalyst extends LengtheningCatalyst -{ - public GreaterLengtheningCatalyst() - { - super(3); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java deleted file mode 100644 index 779d4d76..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.potion; - -public class GreaterPowerCatalyst extends PowerCatalyst -{ - public GreaterPowerCatalyst() - { - super(3); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java deleted file mode 100644 index 66bf2586..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java +++ /dev/null @@ -1,61 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.potion; - -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import WayofTime.alchemicalWizardry.common.ICatalyst; -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 java.util.List; - -public class LengtheningCatalyst extends Item implements ICatalyst -{ - private int catalystStrength; - - public LengtheningCatalyst(int catalystStrength) - { - this.catalystStrength = catalystStrength; - } - - @Override - public int getCatalystLevel() - { - return catalystStrength; - } - - @Override - public boolean isConcentration() - { - return false; - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.usedinalchemy")); - - if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) - { - ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack); - - if (recipe != null) - { - par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe")); - - for (ItemStack item : recipe) - { - if (item != null) - { - par3List.add("" + item.getDisplayName()); - } - } - } - } else - { - 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 deleted file mode 100644 index aa78b151..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.potion; - -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 deleted file mode 100644 index 958b0013..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.potion; - -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 deleted file mode 100644 index 967a0d34..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/PowerCatalyst.java +++ /dev/null @@ -1,63 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.potion; - -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import WayofTime.alchemicalWizardry.common.ICatalyst; -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 java.util.List; - -public class PowerCatalyst extends Item implements ICatalyst -{ - private int catalystStrength; - - public PowerCatalyst(int catalystStrength) - { - super(); - this.catalystStrength = catalystStrength; - } - - @Override - public int getCatalystLevel() - { - return catalystStrength; - } - - @Override - public boolean isConcentration() - { - return true; - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.usedinalchemy")); - - if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) - { - ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack); - - if (recipe != null) - { - par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe")); - - for (ItemStack item : recipe) - { - if (item != null) - { - par3List.add("" + item.getDisplayName()); - } - } - } - } else - { - 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 deleted file mode 100644 index 8e70f9ea..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java +++ /dev/null @@ -1,55 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.potion; - -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.api.alchemy.AlchemyRecipeRegistry; -import WayofTime.alchemicalWizardry.common.IBindingAgent; - -public class StandardBindingAgent extends Item implements IBindingAgent -{ - public StandardBindingAgent() - { - super(); - } - - @Override - public float getSuccessRateForPotionNumber(int potions) - { - return (float) Math.pow(0.65, potions); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.usedinalchemy")); - - if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) - { - ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack); - - if (recipe != null) - { - par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe")); - - for (ItemStack item : recipe) - { - if (item != null) - { - par3List.add("" + item.getDisplayName()); - } - } - } - } else - { - 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 deleted file mode 100644 index 21854904..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java +++ /dev/null @@ -1,25 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.potion; - -public class StandardFillingAgent extends WeakFillingAgent -{ - public StandardFillingAgent() - { - super(); - } - - @Override - public int getFilledAmountForPotionNumber(int potionEffects) - { - if (potionEffects == 0) - { - return 8; - } - - if (potionEffects >= 1 && potionEffects <= 3) - { - return (int) (4 * (Math.pow(0.5f, potionEffects - 1) + 0.01f)); - } - - return 0; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java deleted file mode 100644 index bc755dc1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.potion; - -public class WeakBindingAgent extends StandardBindingAgent -{ - public WeakBindingAgent() - { - super(); - } - - @Override - public float getSuccessRateForPotionNumber(int potions) - { - return (float) Math.pow(0.4, potions); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java deleted file mode 100644 index 8203572a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java +++ /dev/null @@ -1,74 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.potion; - -import java.util.List; -import java.util.Random; - -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.api.alchemy.AlchemyRecipeRegistry; -import WayofTime.alchemicalWizardry.common.IFillingAgent; - -public class WeakFillingAgent extends Item implements IFillingAgent -{ - public WeakFillingAgent() - { - super(); - } - - @Override - public int getFilledAmountForPotionNumber(int potionEffects) - { - Random rand = new Random(); - - if (potionEffects == 0) - { - return 8; - } - - if (potionEffects == 1 || potionEffects == 2) - { - if (rand.nextFloat() > 0.5f) - { - return (4 - potionEffects); - } else - { - return 3 - potionEffects; - } - } - - return 0; - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.usedinalchemy")); - - if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) - { - ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack); - - if (recipe != null) - { - par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe")); - - for (ItemStack item : recipe) - { - if (item != null) - { - par3List.add("" + item.getDisplayName()); - } - } - } - } else - { - 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 deleted file mode 100644 index da996b44..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/ILimitedRoutingFocus.java +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 74ce08b8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.routing; - -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 deleted file mode 100644 index b8a5f0fc..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/OutputRoutingFocus.java +++ /dev/null @@ -1,127 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.routing; - -import java.util.List; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.StatCollector; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -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; - -public class OutputRoutingFocus extends RoutingFocus implements ILimitedRoutingFocus -{ - public OutputRoutingFocus() - { - super(); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - super.addInformation(par1ItemStack, par2EntityPlayer, par3List, par4); - - if (!(par1ItemStack.getTagCompound() == null)) - { - int limit = this.getRoutingFocusLimit(par1ItemStack); - if(limit > 0) - { - par3List.add(StatCollector.translateToLocal("tooltip.routingFocus.limit") + " " + limit); - } - } - } - - @Override - public String getUnlocalizedName(ItemStack itemStack) - { - String addedString = ""; - - switch (itemStack.getItemDamage()) - { - case 0: - addedString = "default"; - break; - case 1: - addedString = "modItem"; - break; - case 2: - addedString = "ignMeta"; - break; - case 3: - addedString = "matchNBT"; - break; - case 4: - addedString = "global"; - break; - } - - return super.getUnlocalizedName() + "." + addedString; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item id, CreativeTabs creativeTab, List list) - { - for (int meta = 0; meta < 5; ++meta) - { - list.add(new ItemStack(id, 1, meta)); - } - } - - @Override - public RoutingFocusLogic getLogic(ItemStack itemStack) - { - if(itemStack != null) - { - switch(itemStack.getItemDamage()) - { - case 0: - return new RoutingFocusLogicLimitDefault(itemStack); - case 1: - return new RoutingFocusLogicLimitModItems(itemStack); - case 2: - return new RoutingFocusLogicLimitIgnMeta(itemStack); - case 3: - return new RoutingFocusLogicLimitMatchNBT(itemStack); - case 4: - return new RoutingFocusLogicLimitGlobal(itemStack); - } - } - - return new RoutingFocusLogic(); - } - - public int getDefaultStackLimit(int damage) - { - return 0; - } - - public int getRoutingFocusLimit(ItemStack itemStack) - { - if (!(itemStack.getTagCompound() == null)) - { - return itemStack.getTagCompound().getInteger("stackLimit"); - } else - { - return getDefaultStackLimit(itemStack.getItemDamage()); - } - } - - public void setRoutingFocusLimit(ItemStack itemStack, int amt) - { - if ((itemStack.getTagCompound() == null)) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - itemStack.getTagCompound().setInteger("stackLimit", amt); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/RoutingFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/RoutingFocus.java deleted file mode 100644 index cdcc8f61..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/RoutingFocus.java +++ /dev/null @@ -1,184 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.routing; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -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; - this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); - } - - public RoutingFocusPosAndFacing getPosAndFacing(ItemStack itemStack) - { - return new RoutingFocusPosAndFacing(new Int3(this.xCoord(itemStack), this.yCoord(itemStack), this.zCoord(itemStack)), this.getSetDirection(itemStack)); - } - -// @Override -// public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) -// { -// this.cycleDirection(itemStack); -// return itemStack; -// } -// -// public void cycleDirection(ItemStack itemStack) -// { -// EnumFacing dir = this.getSetDirection(itemStack); -// int direction = dir.ordinal(); -// direction++; -// if(direction >= EnumFacing.VALID_DIRECTIONS.length) -// { -// direction = 0; -// } -// -// this.setSetDirection(itemStack, EnumFacing.getOrientation(direction)); -// } - - public EnumFacing getSetDirection(ItemStack itemStack) - { - if(!itemStack.hasTagCompound()) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = itemStack.getTagCompound(); - - return EnumFacing.getFront(tag.getInteger("direction")); - } - - public void setSetDirection(ItemStack itemStack, EnumFacing dir) - { - if(!itemStack.hasTagCompound()) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = itemStack.getTagCompound(); - - tag.setInteger("direction", dir.ordinal()); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal(this.getFocusDescription())); - - 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)); - } - } - - public String getFocusDescription() - { - return "tooltip.routingFocus.desc"; - } - - @Override - public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) - { - if(world.isRemote) - { - return false; - } - - TileEntity tile = world.getTileEntity(pos); - if(tile instanceof IInventory) - { - if(player.isSneaking()) - { - if(this instanceof ILimitedRoutingFocus) - { - int pastAmount = ((ILimitedRoutingFocus)this).getRoutingFocusLimit(stack); - int amount = SpellHelper.getNumberOfItemsInInventory((IInventory)tile, side); - if(amount != pastAmount) - { - ((ILimitedRoutingFocus)this).setRoutingFocusLimit(stack, amount); - player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("message.routerfocus.limit") + amount)); - } - } - } - - this.setCoordinates(stack, pos); - this.setSetDirection(stack, side); - - return true; - } - - return true; - } - - public void setCoordinates(ItemStack itemStack, BlockPos pos) - { - if(!itemStack.hasTagCompound()) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = itemStack.getTagCompound(); - - tag.setInteger("xCoord", pos.getX()); - tag.setInteger("yCoord", pos.getY()); - tag.setInteger("zCoord", pos.getZ()); - } - - public int xCoord(ItemStack itemStack) - { - if (!(itemStack.getTagCompound() == null)) - { - return itemStack.getTagCompound().getInteger("xCoord"); - } else - { - return 0; - } - } - - public int yCoord(ItemStack itemStack) - { - if (!(itemStack.getTagCompound() == null)) - { - return itemStack.getTagCompound().getInteger("yCoord"); - } else - { - return 0; - } - } - - public int zCoord(ItemStack itemStack) - { - if (!(itemStack.getTagCompound() == null)) - { - return itemStack.getTagCompound().getInteger("zCoord"); - } else - { - return 0; - } - } - - public RoutingFocusLogic getLogic(ItemStack itemStack) - { - return new RoutingFocusLogic(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java deleted file mode 100644 index a654b677..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java +++ /dev/null @@ -1,130 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -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.BindableItems; - -public class SigilAir extends BindableItems implements ArmourUpgrade, ISigil -{ - public SigilAir() - { - super(); - setEnergyUsed(50); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.airsigil.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if(par2World.isRemote && this.isItemUnusable(par1ItemStack)) - { - return par1ItemStack; - } - - Vec3 vec = par3EntityPlayer.getLookVec(); - double wantedVelocity = 1.7; - - if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionBoost)) - { - int i = par3EntityPlayer.getActivePotionEffect(AlchemicalWizardry.customPotionBoost).getAmplifier(); - wantedVelocity += (1 + i) * (0.35); - } - - par3EntityPlayer.motionX = vec.xCoord * wantedVelocity; - par3EntityPlayer.motionY = vec.yCoord * wantedVelocity; - par3EntityPlayer.motionZ = vec.zCoord * wantedVelocity; - par2World.playSoundEffect((double) ((float) par3EntityPlayer.posX + 0.5F), (double) ((float) par3EntityPlayer.posY + 0.5F), (double) ((float) par3EntityPlayer.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F); - par3EntityPlayer.fallDistance = 0; - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - if(!par2World.isRemote) - { - this.setIsItemUnusable(par1ItemStack, true); - } - }else - { - if(!par2World.isRemote) - { - this.setIsItemUnusable(par1ItemStack, false); - } - } - } else - { - return par1ItemStack; - } - - return par1ItemStack; - } - - public boolean isItemUnusable(ItemStack stack) - { - NBTTagCompound tag = stack.getTagCompound(); - if(tag == null) - { - tag = new NBTTagCompound(); - stack.setTagCompound(tag); - } - - return tag.getBoolean("unusable"); - } - - public void setIsItemUnusable(ItemStack stack, boolean bool) - { - NBTTagCompound tag = stack.getTagCompound(); - if(tag == null) - { - tag = new NBTTagCompound(); - stack.setTagCompound(tag); - } - - tag.setBoolean("unusable", bool); - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) - { - // TODO Auto-generated method stub - player.fallDistance = 0; - } - - @Override - public boolean isUpgrade() - { - // TODO Auto-generated method stub - return true; - } - - @Override - public int getEnergyForTenSeconds() - { - // TODO Auto-generated method stub - return 50; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java deleted file mode 100644 index 1d3e9845..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java +++ /dev/null @@ -1,132 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -import java.util.List; - -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import net.minecraft.block.state.IBlockState; -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.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityBloodLightProjectile; -import WayofTime.alchemicalWizardry.common.items.BindableItems; - -public class SigilBloodLight extends BindableItems implements IHolding, ArmourUpgrade, ISigil -{ - public SigilBloodLight() - { - super(); - setEnergyUsed(10); - } - - @Override - public void addInformation(ItemStack itemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.bloodlightsigil.desc")); - - if (!(itemStack.getTagCompound() == null)) - { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + itemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ) - { - if(!BindableItems.checkAndSetItemOwner(itemStack, player) || !BindableItems.syphonBatteries(itemStack, player, getEnergyUsed())) - { - return true; - } - - if (world.isRemote) - { - return true; - } - - IBlockState light = ModBlocks.blockBloodLight.getBlockState().getBaseState(); - - if (side.getIndex() == 0 && world.isAirBlock(blockPos.add(0, -1, 0))) - { - world.setBlockState(blockPos.add(0, -1, 0), light); - } - - if (side.getIndex() == 1 && world.isAirBlock(blockPos.add(0, 1, 0))) - { - world.setBlockState(blockPos.add(0, 1, 0), light); - } - - if (side.getIndex() == 2 && world.isAirBlock(blockPos.add(0, 0, -1))) - { - world.setBlockState(blockPos.add(0, 0, -1), light); - } - - if (side.getIndex() == 3 && world.isAirBlock(blockPos.add(0, 0, 1))) - { - world.setBlockState(blockPos.add(0, 0, 1), light); - } - - if (side.getIndex() == 4 && world.isAirBlock(blockPos.add(-1, 0, 0))) - { - world.setBlockState(blockPos.add(-1, 0, 0), light); - } - - if (side.getIndex() == 5 && world.isAirBlock(blockPos.add(1, 0, 0))) - { - world.setBlockState(blockPos.add(1, 0, 0), light); - } - - return true; - } - - @Override - public ItemStack onItemRightClick(ItemStack itemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(itemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return itemStack; - } - - if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - if(!BindableItems.syphonBatteries(itemStack, par3EntityPlayer, getEnergyUsed() * 5)) - { - return itemStack; - } - - if (!par2World.isRemote) - { - par2World.spawnEntityInWorld(new EntityBloodLightProjectile(par2World, par3EntityPlayer, 10)); - } - - return itemStack; - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) - { - player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 400, 9, true, false)); - } - - @Override - public boolean isUpgrade() - { - return true; - } - - @Override - public int getEnergyForTenSeconds() - { - return 25; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilCompress.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilCompress.java deleted file mode 100644 index 49fa6114..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilCompress.java +++ /dev/null @@ -1,143 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -import java.util.List; - -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import net.minecraft.entity.Entity; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.compress.CompressionRegistry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; -import WayofTime.alchemicalWizardry.common.items.BindableItems; - -public class SigilCompress extends SigilToggleable implements IHolding, ArmourUpgrade, ISigil -{ - public SigilCompress() - { - super(); - setEnergyUsed(200); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.packratsigil.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (this.getActivated(par1ItemStack)) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); - } else - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); - } - - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - - if (this.getActivated(par1ItemStack)) - { - par1ItemStack.setItemDamage(1); - tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - this.setActivated(par1ItemStack, false); - } - } - } else - { - par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); - } - - return par1ItemStack; - } - - @Override - public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) - { - if (!(par3Entity instanceof EntityPlayer) || par2World.isRemote) - { - return; - } - - EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - if (this.getActivated(par1ItemStack)) - { - ItemStack stack = CompressionRegistry.compressInventory(par3EntityPlayer.inventory.mainInventory, par2World); - if(stack != null) - { - EntityItem entityItem = new EntityItem(par2World, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, stack); - par2World.spawnEntityInWorld(entityItem); - } - } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) - { - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - this.setActivated(par1ItemStack, false); - } - } - } - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) - { - if(world.isRemote) - { - return; - } - ItemStack stack = CompressionRegistry.compressInventory(player.inventory.mainInventory, world); - if(stack != null) - { - EntityItem entityItem = new EntityItem(world, player.posX, player.posY, player.posZ, stack); - world.spawnEntityInWorld(entityItem); - } - } - - @Override - public boolean isUpgrade() - { - return true; - } - - @Override - public int getEnergyForTenSeconds() - { - return 200; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java deleted file mode 100644 index fdda6857..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java +++ /dev/null @@ -1,119 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -import java.util.List; - -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; -import WayofTime.alchemicalWizardry.common.items.BindableItems; - -public class SigilDivination extends BindableItems implements ArmourUpgrade, IReagentManipulator, IBindable, ISigil -{ - public SigilDivination() - { - super(); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.divinationsigil.desc1")); - par3List.add(StatCollector.translateToLocal("tooltip.divinationsigil.desc2")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); - - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.worldObj.isRemote) - { - return par1ItemStack; - } - - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 0)) - { - return par1ItemStack; - } - - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null || itemTag.getString("ownerName").equals("")) - { - return par1ItemStack; - } - - String ownerName = itemTag.getString("ownerName"); - - MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, false); - - if (movingobjectposition == null) - { - par3EntityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.divinationsigil.currentessence") + " " + SoulNetworkHandler.getCurrentEssence(ownerName) + "LP")); - - return par1ItemStack; - } else - { - if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - TileEntity tile = par2World.getTileEntity(movingobjectposition.func_178782_a()); - - if (!(tile instanceof IReagentHandler)) - { - par3EntityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.divinationsigil.currentessence") + " " + SoulNetworkHandler.getCurrentEssence(ownerName) + "LP")); - - return par1ItemStack; - } - - IReagentHandler relay = (IReagentHandler) tile; - - ReagentContainerInfo[] infoList = relay.getContainerInfo(EnumFacing.DOWN); - 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)); - } - } - } - } - } - - return par1ItemStack; - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {} - @Override - public boolean isUpgrade() - { - return false; - } - - @Override - public int getEnergyForTenSeconds() - { - return 25; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilFluid.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilFluid.java deleted file mode 100644 index e15a5a4d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilFluid.java +++ /dev/null @@ -1,739 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.BindableItems; -import net.minecraft.block.Block; -import net.minecraft.block.material.MaterialLiquid; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.*; -import net.minecraft.world.World; -import net.minecraftforge.fluids.*; - -import java.util.ArrayList; -import java.util.List; - -public class SigilFluid extends BindableItems implements IFluidContainerItem, ISigil -{ - private int capacity = 128 * 1000; - private static final int STATE_SYPHON = 0; - private static final int STATE_FORCE_SYPHON = 1; - private static final int STATE_PLACE = 2; - private static final int STATE_INPUT_TANK = 3; - private static final int STATE_DRAIN_TANK = 4; - private static final int STATE_BEAST_DRAIN = 5; - private static final int maxNumOfStates = 6; - - public SigilFluid() - { - super(); - this.setMaxDamage(0); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.fluidsigil.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - switch (this.getActionState(par1ItemStack)) - { - case STATE_SYPHON: - par3List.add(StatCollector.translateToLocal("tooltip.fluidsigil.syphoningmode")); - break; - case STATE_FORCE_SYPHON: - par3List.add(StatCollector.translateToLocal("tooltip.fluidsigil.forcesyphonmode")); - break; - case STATE_PLACE: - par3List.add(StatCollector.translateToLocal("tooltip.fluidsigil.fluidplacementmode")); - break; - case STATE_INPUT_TANK: - par3List.add(StatCollector.translateToLocal("tooltip.fluidsigil.filltankmode")); - break; - case STATE_DRAIN_TANK: - par3List.add(StatCollector.translateToLocal("tooltip.fluidsigil.draintankmode")); - break; - case STATE_BEAST_DRAIN: - par3List.add(StatCollector.translateToLocal("tooltip.fluidsigil.beastmode")); - break; - } - - FluidStack fluid = this.getFluid(par1ItemStack); - if (fluid != null && fluid.amount > 0) - { - String str = fluid.getFluid().getName(); - int amount = fluid.amount; - - par3List.add("" + amount + "mB of " + str); - } else - { - par3List.add("Empty"); - } - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (par3EntityPlayer.isSneaking()) - { - int curState = this.cycleActionState(par1ItemStack); - this.sendMessageViaState(curState, par3EntityPlayer); - return par1ItemStack; - } - - switch (this.getActionState(par1ItemStack)) - { - case STATE_SYPHON: - return this.fillItemFromWorld(par1ItemStack, par2World, par3EntityPlayer, false); - case STATE_FORCE_SYPHON: - return this.fillItemFromWorld(par1ItemStack, par2World, par3EntityPlayer, true); - case STATE_PLACE: - return this.emptyItemToWorld(par1ItemStack, par2World, par3EntityPlayer); - case STATE_INPUT_TANK: - return this.fillSelectedTank(par1ItemStack, par2World, par3EntityPlayer); - case STATE_DRAIN_TANK: - return this.drainSelectedTank(par1ItemStack, par2World, par3EntityPlayer); - case STATE_BEAST_DRAIN: - return this.fillItemFromBeastWorld(par1ItemStack, par2World, par3EntityPlayer, true); - } - - return par1ItemStack; - } - - public int getActionState(ItemStack item) - { - if (item.getTagCompound() == null) - { - item.setTagCompound(new NBTTagCompound()); - } - - return item.getTagCompound().getInteger("actionState"); - } - - public void setActionState(ItemStack item, int actionState) - { - if (item.getTagCompound() == null) - { - item.setTagCompound(new NBTTagCompound()); - } - - item.getTagCompound().setInteger("actionState", actionState); - } - - public int cycleActionState(ItemStack item) - { - int state = this.getActionState(item); - - state++; - - if (state >= maxNumOfStates) - { - state = 0; - } - - this.setActionState(item, state); - - return state; - } - - public void sendMessageViaState(int state, EntityPlayer player) - { - if (player.worldObj.isRemote) - { - ChatComponentText cmc = new ChatComponentText(""); - switch (state) - { - case STATE_SYPHON: - cmc.appendText("Now in Syphoning Mode"); - break; - case STATE_FORCE_SYPHON: - cmc.appendText("Now in Force-syphon Mode"); - break; - case STATE_PLACE: - cmc.appendText("Now in Fluid Placement Mode"); - break; - case STATE_INPUT_TANK: - cmc.appendText("Now in Fill Tank Mode"); - break; - case STATE_DRAIN_TANK: - cmc.appendText("Now in Drain Tank Mode"); - break; - case STATE_BEAST_DRAIN: - cmc.appendText("Now in Beast Mode"); - break; - } - player.addChatComponentMessage(cmc); - } - } - - public ItemStack fillItemFromBeastWorld(ItemStack container, World world, EntityPlayer player, boolean forceFill) - { - if (world.isRemote) - { - return container; - } - int range = 5; - - boolean flag = true; - MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, flag); - - if (movingobjectposition == null) - { - return container; - } else - { - if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - if (!world.canMineBlockBody(player, movingobjectposition.func_178782_a())) - { - return container; - } - - if (!player.func_175151_a(movingobjectposition.func_178782_a(), movingobjectposition.field_178784_b, container)) - { - return container; - } - - boolean[][][] boolList = new boolean[range * 2 + 1][range * 2 + 1][range * 2 + 1]; - - for (int i = 0; i < 2 * range + 1; i++) - { - for (int j = 0; j < 2 * range + 1; j++) - { - for (int k = 0; k < 2 * range + 1; k++) - { - boolList[i][j][k] = false; - } - } - } - - List positionList = new ArrayList(); - - int x = movingobjectposition.func_178782_a().getX(); - int y = movingobjectposition.func_178782_a().getY(); - int z = movingobjectposition.func_178782_a().getZ(); - - boolList[range][range][range] = true; - positionList.add(new Int3(range, range, range)); - boolean isReady = false; - - while (!isReady) - { - isReady = true; - - for (int i = 0; i < 2 * range + 1; i++) - { - for (int j = 0; j < 2 * range + 1; j++) - { - for (int k = 0; k < 2 * range + 1; k++) - { - if (boolList[i][j][k]) - { - if (i - 1 >= 0 && !boolList[i - 1][j][k]) - { - Block block = world.getBlockState(new BlockPos(x - range + i - 1, y - range + j, z - range + k)).getBlock(); - Fluid fluid = FluidRegistry.lookupFluidForBlock(block); - - if (fluid != null) - { - boolList[i - 1][j][k] = true; - positionList.add(new Int3(i - 1, j, k)); - isReady = false; - } - } - - if (j - 1 >= 0 && !boolList[i][j - 1][k]) - { - Block block = world.getBlockState(new BlockPos(x - range + i, y - range + j - 1, z - range + k)).getBlock(); - Fluid fluid = FluidRegistry.lookupFluidForBlock(block); - - if (fluid != null) - { - boolList[i][j - 1][k] = true; - positionList.add(new Int3(i, j - 1, k)); - isReady = false; - } - } - - if (k - 1 >= 0 && !boolList[i][j][k - 1]) - { - Block block = world.getBlockState(new BlockPos(x - range + i, y - range + j, z - range + k - 1)).getBlock(); - Fluid fluid = FluidRegistry.lookupFluidForBlock(block); - - if (fluid != null) - { - boolList[i][j][k - 1] = true; - positionList.add(new Int3(i, j, k - 1)); - isReady = false; - } - } - - if (i + 1 <= 2 * range && !boolList[i + 1][j][k]) - { - Block block = world.getBlockState(new BlockPos(x - range + i + 1, y - range + j, z - range + k)).getBlock(); - Fluid fluid = FluidRegistry.lookupFluidForBlock(block); - - if (fluid != null) - { - boolList[i + 1][j][k] = true; - positionList.add(new Int3(i + 1, j, k)); - isReady = false; - } - } - - if (j + 1 <= 2 * range && !boolList[i][j + 1][k]) - { - Block block = world.getBlockState(new BlockPos(x - range + i, y - range + j + 1, z - range + k)).getBlock(); - Fluid fluid = FluidRegistry.lookupFluidForBlock(block); - - if (fluid != null) - { - boolList[i][j + 1][k] = true; - positionList.add(new Int3(i, j + 1, k)); - isReady = false; - } - } - - if (k + 1 <= 2 * range && !boolList[i][j][k + 1]) - { - Block block = world.getBlockState(new BlockPos(x - range + i, y - range + j, z - range + k + 1)).getBlock(); - Fluid fluid = FluidRegistry.lookupFluidForBlock(block); - - if (fluid != null) - { - boolList[i][j][k + 1] = true; - positionList.add(new Int3(i, j, k + 1)); - isReady = false; - } - } - } - } - } - } - } - - for (Int3 pos : positionList) - { - int i = pos.xCoord; - int j = pos.yCoord; - int k = pos.zCoord; - - if (!boolList[i][j][k]) - { - continue; - } - if (world.getBlockState(new BlockPos(x + i - range, y + j - range, z + k - range)).getBlock() != null && world.getBlockState(new BlockPos(x + i - range, y + j - range, z + k - range)).getBlock().getMaterial() instanceof MaterialLiquid) - { - //world.setBlockToAir(x+i-range, y+j-range, z+k-range); - Block block = world.getBlockState(new BlockPos(x + i - range, y + j - range, z + k - range)).getBlock(); - if (block == null) - { - continue; - } - Fluid fluid = FluidRegistry.lookupFluidForBlock(block); - - AlchemicalWizardry.logger.info("x: " + (i - range) + " y: " + (j - range) + " z: " + (k - range)); - - - if (fluid == null || world.getBlockState(new BlockPos(x + i - range, y + j - range, z + k - range)).getBlock().getMetaFromState(world.getBlockState(new BlockPos(x + i - range, y + j - range, z + k - range))) != 0) - { - continue; - } - - - FluidStack fillStack = new FluidStack(fluid, 1000); - - int amount = this.fill(container, fillStack, false); - - if ((amount > 0 && forceFill) || (amount >= 1000 && !forceFill)) - { - { - world.setBlockToAir(new BlockPos(x + i - range, y + j - range, z + k - range)); - } - - this.fill(container, new FluidStack(fluid, 1000), true); - } - } - } - } - - return container; - } - } - - public ItemStack fillItemFromWorld(ItemStack container, World world, EntityPlayer player, boolean forceFill) - { - boolean flag = true; - MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, flag); - - if (movingobjectposition == null) - { - return container; - } else - { - if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - if (!world.canMineBlockBody(player, movingobjectposition.func_178782_a())) - { - return container; - } - - if (!player.func_175151_a(movingobjectposition.func_178782_a(), movingobjectposition.field_178784_b, container)) - { - return container; - } - - if (world.getBlockState(movingobjectposition.func_178782_a()).getBlock() != null && world.getBlockState(movingobjectposition.func_178782_a()).getBlock().getMaterial() instanceof MaterialLiquid) - { - Block block = world.getBlockState(movingobjectposition.func_178782_a()).getBlock(); - Fluid fluid = FluidRegistry.lookupFluidForBlock(block); - - if (fluid == null) - { - return container; - } - - FluidStack fillStack = new FluidStack(fluid, 1000); - - int amount = this.fill(container, fillStack, false); - - if ((amount > 0 && forceFill) || (amount >= 1000 && !forceFill)) - { - if (!player.capabilities.isCreativeMode) - { - world.setBlockToAir(movingobjectposition.func_178782_a()); - } - - this.fill(container, new FluidStack(fluid, 1000), true); - - if (!player.capabilities.isCreativeMode) - { - } else - { - return container; - } - } - } - } - - return container; - } - } - - public ItemStack emptyItemToWorld(ItemStack container, World world, EntityPlayer player) - { - FluidStack simStack = this.drain(container, 1000, false); - - if (simStack != null && simStack.amount >= 1000) - { - boolean flag = false; - MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, flag); - - if (movingobjectposition == null) - { - return container; - } else - { - if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - if (!world.canMineBlockBody(player, movingobjectposition.func_178782_a())) - { - return container; - } - - int i = movingobjectposition.func_178782_a().getX(); - int j = movingobjectposition.func_178782_a().getY(); - int k = movingobjectposition.func_178782_a().getZ(); - - if (movingobjectposition.field_178784_b.getIndex() == 0) - { - --j; - } - - if (movingobjectposition.field_178784_b.getIndex() == 1) - { - ++j; - } - - if (movingobjectposition.field_178784_b.getIndex() == 2) - { - --k; - } - - if (movingobjectposition.field_178784_b.getIndex() == 3) - { - ++k; - } - - if (movingobjectposition.field_178784_b.getIndex() == 4) - { - --i; - } - - if (movingobjectposition.field_178784_b.getIndex() == 5) - { - ++i; - } - - if (!player.func_175151_a(new BlockPos(i, j, k), movingobjectposition.field_178784_b, container)) - { - return container; - } - - if (this.tryPlaceContainedLiquid(world, new BlockPos(i, j, k)) && !player.capabilities.isCreativeMode) - { - this.drain(container, 1000, true); - - return container; - } - } - - return container; - } - } - - return container; - } - - public boolean tryPlaceContainedLiquid(World world, BlockPos blockPos) - { - if (!world.isAirBlock(blockPos) && world.getBlockState(blockPos).getBlock().getMaterial().isSolid()) //TODO Was func_149730_j() so check this! - { - return false; - } else if ((world.getBlockState(blockPos).getBlock().getMaterial() instanceof MaterialLiquid && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0)) - { - return false; - } else - { - Block block = world.getBlockState(blockPos).getBlock(); - if ((block == Blocks.water || block == Blocks.flowing_water) && world.provider.func_177500_n()) - { - world.playSoundEffect(blockPos.getX() + 0.5D, blockPos.getY() + 0.5D, blockPos.getZ() + 0.5D, "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - - for (int l = 0; l < 8; ++l) - { - world.spawnParticle(EnumParticleTypes.SMOKE_LARGE, (double) blockPos.getX() + Math.random(), (double) blockPos.getY() + Math.random(), (double) blockPos.getZ() + Math.random(), 0.0D, 0.0D, 0.0D); - } - } else - { - world.setBlockState(blockPos, block.getBlockState().getBaseState()); - } - - return true; - } - } - - public ItemStack fillSelectedTank(ItemStack container, World world, EntityPlayer player) - { - FluidStack fluid = this.getFluid(container); - - if (fluid == null) - { - return container; - } - - float f = 1.0F; - boolean flag = false; - MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, flag); - - if (movingobjectposition == null) - { - return container; - } else - { - if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - TileEntity tile = world.getTileEntity(movingobjectposition.func_178782_a()); - - if (tile instanceof IFluidHandler) - { - int amount = ((IFluidHandler) tile).fill(movingobjectposition.field_178784_b, fluid, true); - - this.drain(container, amount, true); - } - } - } - - return container; - } - - public ItemStack drainSelectedTank(ItemStack container, World world, EntityPlayer player) - { - float f = 1.0F; - boolean flag = false; - MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, flag); - - if (movingobjectposition == null) - { - return container; - } else - { - if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - TileEntity tile = world.getTileEntity(movingobjectposition.func_178782_a()); - - if (tile instanceof IFluidHandler) - { - FluidStack fluidAmount = ((IFluidHandler) tile).drain(movingobjectposition.field_178784_b, this.getCapacity(container), false); - - int amount = this.fill(container, fluidAmount, false); - - if (amount > 0) - { - ((IFluidHandler) tile).drain(movingobjectposition.field_178784_b, this.getCapacity(container), true); - - this.fill(container, fluidAmount, true); - } - } - } - } - - return container; - } - - /* IFluidContainerItem */ - @Override - public FluidStack getFluid(ItemStack container) - { - if (container.getTagCompound() == null || !container.getTagCompound().hasKey("Fluid")) - { - return null; - } - return FluidStack.loadFluidStackFromNBT(container.getTagCompound().getCompoundTag("Fluid")); - } - - @Override - public int getCapacity(ItemStack container) - { - return capacity; - } - - @Override - public int fill(ItemStack container, FluidStack resource, boolean doFill) - { - if (resource == null) - { - return 0; - } - - if (!doFill) - { - if (container.getTagCompound() == null || !container.getTagCompound().hasKey("Fluid")) - { - return Math.min(capacity, resource.amount); - } - - FluidStack stack = FluidStack.loadFluidStackFromNBT(container.getTagCompound().getCompoundTag("Fluid")); - - if (stack == null || stack.amount <= 0) - { - return Math.min(capacity, resource.amount); - } - - if (!stack.isFluidEqual(resource)) - { - return 0; - } - - return Math.min(capacity - stack.amount, resource.amount); - } - - if (container.getTagCompound() == null) - { - container.setTagCompound(new NBTTagCompound()); - } - - if (!container.getTagCompound().hasKey("Fluid")) - { - NBTTagCompound fluidTag = resource.writeToNBT(new NBTTagCompound()); - - if (capacity < resource.amount) - { - fluidTag.setInteger("Amount", capacity); - container.getTagCompound().setTag("Fluid", fluidTag); - return capacity; - } - - container.getTagCompound().setTag("Fluid", fluidTag); - return resource.amount; - } - - NBTTagCompound fluidTag = container.getTagCompound().getCompoundTag("Fluid"); - FluidStack stack = FluidStack.loadFluidStackFromNBT(fluidTag); - - if (stack == null || stack.amount <= 0) - { - NBTTagCompound fluidTag1 = resource.writeToNBT(new NBTTagCompound()); - - if (capacity < resource.amount) - { - fluidTag1.setInteger("Amount", capacity); - container.getTagCompound().setTag("Fluid", fluidTag1); - return capacity; - } - - container.getTagCompound().setTag("Fluid", fluidTag1); - return resource.amount; - } - - if (!stack.isFluidEqual(resource)) - { - return 0; - } - - int filled = capacity - stack.amount; - if (resource.amount < filled) - { - stack.amount += resource.amount; - filled = resource.amount; - } else - { - stack.amount = capacity; - } - - container.getTagCompound().setTag("Fluid", stack.writeToNBT(fluidTag)); - return filled; - } - - @Override - public FluidStack drain(ItemStack container, int maxDrain, boolean doDrain) - { - if (container.getTagCompound() == null || !container.getTagCompound().hasKey("Fluid")) - { - return null; - } - - FluidStack stack = FluidStack.loadFluidStackFromNBT(container.getTagCompound().getCompoundTag("Fluid")); - if (stack == null) - { - return null; - } - - stack.amount = Math.min(stack.amount, maxDrain); - if (doDrain) - { - if (maxDrain >= capacity) - { - container.getTagCompound().removeTag("Fluid"); - - if (container.getTagCompound().hasNoTags()) - { - container.setTagCompound(null); - } - return stack; - } - - NBTTagCompound fluidTag = container.getTagCompound().getCompoundTag("Fluid"); - fluidTag.setInteger("Amount", fluidTag.getInteger("Amount") - maxDrain); - container.getTagCompound().setTag("Fluid", fluidTag); - } - return stack; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java deleted file mode 100644 index 3699f4c0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java +++ /dev/null @@ -1,164 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -import java.util.List; - -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; -import WayofTime.alchemicalWizardry.common.items.BindableItems; - -public class SigilHarvest extends SigilToggleable implements IHolding, ArmourUpgrade, ISigil -{ - public SigilHarvest() - { - super(); - setEnergyUsed(500); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.harvestsigil.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (this.getActivated(par1ItemStack)) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); - } else - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); - } - - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - - if (this.getActivated(par1ItemStack)) - { - par1ItemStack.setItemDamage(1); - tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - this.setActivated(par1ItemStack, false); - } - } - } else - { - par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); - } - - return par1ItemStack; - } - - @Override - public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) - { - if ((!(par3Entity instanceof EntityPlayer)) || par2World.isRemote) - { - return; - } - - EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - if (this.getActivated(par1ItemStack)) - { - int range = 3; - int verticalRange = 1; - int posX = (int) Math.round(par3Entity.posX - 0.5f); - int posY = (int) par3Entity.posY; - int posZ = (int) Math.round(par3Entity.posZ - 0.5f); - - for (int ix = posX - range; ix <= posX + range; ix++) - { - for (int iz = posZ - range; iz <= posZ + range; iz++) - { - for (int iy = posY - verticalRange; iy <= posY + verticalRange; iy++) - { - HarvestRegistry.harvestBlock(par2World, new BlockPos(ix, iy, iz)); - } - } - } - } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) - { - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - this.setActivated(par1ItemStack, false); - } - } - } - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) - { - if(world.isRemote) - { - return; - } - int range = 3; - int verticalRange = 1; - int posX = (int) Math.round(player.posX - 0.5f); - int posY = (int) player.posY; - int posZ = (int) Math.round(player.posZ - 0.5f); - - for (int ix = posX - range; ix <= posX + range; ix++) - { - for (int iz = posZ - range; iz <= posZ + range; iz++) - { - for (int iy = posY - verticalRange; iy <= posY + verticalRange; iy++) - { - HarvestRegistry.harvestBlock(world, new BlockPos(ix, iy, iz)); - } - } - } - } - - @Override - public boolean isUpgrade() { - // TODO Auto-generated method stub - return true; - } - - @Override - public int getEnergyForTenSeconds() - { - // TODO Auto-generated method stub - return 500; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java deleted file mode 100644 index 58638712..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java +++ /dev/null @@ -1,243 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -import java.util.List; - -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemBucket; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.items.Orb; -import WayofTime.alchemicalWizardry.common.items.BindableItems; - -public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil -{ - /** - * field for checking if the bucket has been filled. - */ - private Block isFull = Blocks.lava; - private int energyUsed; - - public SigilLava() - { - super(Blocks.lava); - setEnergyUsed(1000); - } - - @Override - public ItemStack getContainerItem(ItemStack itemStack) - { - ItemStack copiedStack = itemStack.copy(); - copiedStack.setItemDamage(copiedStack.getItemDamage() + getEnergyUsed()); - copiedStack.stackSize = 1; - return copiedStack; - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.lavasigil.desc1")); - par3List.add(StatCollector.translateToLocal("tooltip.lavasigil.desc2")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer - */ - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) - { - return stack; - } - - @Override - public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (world.isRemote || !BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) - { - return false; - } - - if (!world.canMineBlockBody(player, blockPos)) - { - return false; - } - - TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof IFluidHandler) - { - FluidStack fluid = new FluidStack(FluidRegistry.LAVA, 1000); - int amount = ((IFluidHandler) tile).fill(side, fluid, false); - - if (amount > 0 && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) - { - ((IFluidHandler) tile).fill(side, fluid, true); - } - - return false; - } - else if (tile instanceof TESocket) - { - return false; - } - - { - int x = blockPos.getX(); - int y = blockPos.getY(); - int z = blockPos.getZ(); - - if (side.getIndex() == 0) - { - --y; - } - - if (side.getIndex() == 1) - { - ++y; - } - - if (side.getIndex() == 2) - { - --z; - } - - if (side.getIndex() == 3) - { - ++z; - } - - if (side.getIndex() == 4) - { - --x; - } - - if (side.getIndex() == 5) - { - ++x; - } - - if (!player.func_175151_a(new BlockPos(x, y, z), side, stack)) - { - return false; - } - - if(this.canPlaceContainedLiquid(world, new BlockPos(x, y, z)) && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) - { - return this.func_180616_a(world, new BlockPos(x, y, z)); - } - } - - return false; - } - - @Override - /** - * Attempts to place the liquid contained inside the bucket. - */ - public boolean func_180616_a(World par1World, BlockPos blockPos) - { - if (!par1World.isAirBlock(blockPos) && par1World.getBlockState(blockPos).getBlock().getMaterial().isSolid()) - { - return false; - } else if ((par1World.getBlockState(blockPos).getBlock() == Blocks.lava || par1World.getBlockState(blockPos).getBlock() == Blocks.flowing_lava) && par1World.getBlockState(blockPos).getBlock().getMetaFromState(par1World.getBlockState(blockPos)) == 0) - { - return false; - } else - { - par1World.setBlockState(blockPos, this.isFull.getBlockState().getBaseState()); - return true; - } - } - - public boolean canPlaceContainedLiquid(World par1World, BlockPos blockPos) - { - if (!par1World.isAirBlock(blockPos) && par1World.getBlockState(blockPos).getBlock().getMaterial().isSolid()) - { - return false; - } else if ((par1World.getBlockState(blockPos).getBlock() == Blocks.lava || par1World.getBlockState(blockPos).getBlock() == Blocks.flowing_lava) && par1World.getBlockState(blockPos).getBlock().getMetaFromState(par1World.getBlockState(blockPos)) == 0) - { - return false; - } else - { - return true; - } - } - - protected void setEnergyUsed(int par1int) - { - this.energyUsed = par1int; - } - - protected int getEnergyUsed() - { - return this.energyUsed; - } - - protected boolean syphonBatteries(ItemStack ist, EntityPlayer player, int damageToBeDone) - { - if (!player.capabilities.isCreativeMode) - { - boolean usedBattery = false; - IInventory inventory = player.inventory; - - for (int slot = 0; slot < inventory.getSizeInventory(); slot++) - { - ItemStack stack = inventory.getStackInSlot(slot); - - if (stack == null) - { - continue; - } - if (stack.getItem() instanceof Orb && !usedBattery) - { - if (stack.getItemDamage() <= stack.getMaxDamage() - damageToBeDone) - { - stack.setItemDamage(stack.getItemDamage() + damageToBeDone); - usedBattery = true; - } - } - } - - return usedBattery; - } else - { - return true; - } - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) - { - player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 9, true, false)); - player.extinguish(); - } - - @Override - public boolean isUpgrade() - { - return true; - } - - @Override - public int getEnergyForTenSeconds() - { - return 100; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java deleted file mode 100644 index 9882d773..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java +++ /dev/null @@ -1,107 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.BindableItems; -import net.minecraft.entity.Entity; -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 java.util.List; - -public class SigilOfElementalAffinity extends SigilToggleable implements ISigil -{ - public SigilOfElementalAffinity() - { - super(); - setEnergyUsed(200); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigilofelementalaffinity.desc1")); - par3List.add(StatCollector.translateToLocal("tooltip.sigilofelementalaffinity.desc2")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (this.getActivated(par1ItemStack)) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); - } else - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); - } - - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - - if (this.getActivated(par1ItemStack) && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - par1ItemStack.setItemDamage(1); - tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); - par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 0, true, false)); - par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 0, true, false)); - } else - { - par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); - } - - return par1ItemStack; - } - - @Override - public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) - { - if (!(par3Entity instanceof EntityPlayer)) - { - return; - } - - EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - if (this.getActivated(par1ItemStack)) - { - par3EntityPlayer.fallDistance = 0; - par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 0, true, false)); - par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 0, true, false)); - } - - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) - { - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - this.setActivated(par1ItemStack, false); - } - } - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java deleted file mode 100644 index ffd3e7a5..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java +++ /dev/null @@ -1,119 +0,0 @@ -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.BindableItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; - -import java.util.List; - -public class SigilOfEnderSeverance extends SigilToggleable implements IHolding, ISigil -{ - public SigilOfEnderSeverance() - { - super(); - setEnergyUsed(200); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigilofenderseverance.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (this.getActivated(par1ItemStack)) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); - } else - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); - } - - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - - if (this.getActivated(par1ItemStack)) - { - par1ItemStack.setItemDamage(1); - tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - this.setActivated(par1ItemStack, false); - } - } - } else - { - par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); - } - - return par1ItemStack; - } - - @Override - public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) - { - if (!(par3Entity instanceof EntityPlayer)) - { - return; - } - - EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - if (this.getActivated(par1ItemStack)) - { - 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).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionPlanarBinding.id, 5, 0)); - } - } - } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) - { - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - this.setActivated(par1ItemStack, false); - } - } - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java deleted file mode 100644 index aefe2d9c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java +++ /dev/null @@ -1,237 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.BindableItems; -import net.minecraft.block.IGrowable; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.common.IPlantable; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.player.BonemealEvent; -import net.minecraftforge.fml.common.eventhandler.Event; - -import java.util.List; - -public class SigilOfGrowth extends SigilToggleable implements ArmourUpgrade, ISigil -{ - private int tickDelay = 100; - - public SigilOfGrowth() - { - super(); - setEnergyUsed(150); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigilofgrowth.desc1")); - par3List.add(StatCollector.translateToLocal("tooltip.sigilofgrowth.desc2")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (this.getActivated(par1ItemStack)) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); - } else - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); - } - - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (BindableItems.checkAndSetItemOwner(stack, playerIn)) - { - if (applyBonemeal(stack, worldIn, pos, playerIn)) - { - BindableItems.syphonBatteries(stack, playerIn, getEnergyUsed()); - - if (worldIn.isRemote) - { - worldIn.playAuxSFX(2005, pos, 0); - return true; - } - - return true; - } - } - return false; - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (par2World.isRemote) - { - return par1ItemStack; - } - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = par1ItemStack.getTagCompound(); - tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); - - if (tag.getBoolean("isActive") && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - par1ItemStack.setItemDamage(1); - tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay); - } else - { - par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); - } - - return par1ItemStack; - } - - @Override - public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) - { - if (!(par3Entity instanceof EntityPlayer) || par2World.isRemote) - { - return; - } - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - if (this.getActivated(par1ItemStack)) - { - if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) - { - if(!BindableItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed())) - { - this.setActivated(par1ItemStack, false); - } - } - int range = 3; - int verticalRange = 2; - int posX = (int) Math.round(par3Entity.posX - 0.5f); - int posY = (int) par3Entity.posY; - int posZ = (int) Math.round(par3Entity.posZ - 0.5f); - - for (int ix = posX - range; ix <= posX + range; ix++) - { - for (int iz = posZ - range; iz <= posZ + range; iz++) - { - for (int iy = posY - verticalRange; iy <= posY + verticalRange; iy++) - { - IBlockState block = par2World.getBlockState(new BlockPos(ix, iy, iz)); - - if (block instanceof IPlantable || block instanceof IGrowable) - { - if (par2World.rand.nextInt(50) == 0) - { - block.getBlock().updateTick(par2World, new BlockPos(ix, iy, iz), block, par2World.rand); - } - } - } - } - } - } - } - - public static boolean applyBonemeal(ItemStack p_179234_0_, World world, BlockPos blockPos, EntityPlayer player) - { - IBlockState block = world.getBlockState(blockPos); - - BonemealEvent event = new BonemealEvent(player, world, blockPos, block); - if (MinecraftForge.EVENT_BUS.post(event)) - { - return false; - } - - if (event.getResult() == Event.Result.ALLOW) - { - return true; - } - - if (block instanceof IGrowable) - { - IGrowable igrowable = (IGrowable) block; - - if (igrowable.isStillGrowing(world, blockPos, block, world.isRemote)) - { - if (!world.isRemote) - { - if (igrowable.canUseBonemeal(world, world.rand, blockPos, block)) - { - igrowable.grow(world, world.rand, blockPos, block); - } - } - - return true; - } - } - - return false; - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) - { - if (world.isRemote) - { - return; - } - - int range = 5; - int verticalRange = 2; - int posX = (int) Math.round(player.posX - 0.5f); - int posY = (int) player.posY; - int posZ = (int) Math.round(player.posZ - 0.5f); - - for (int ix = posX - range; ix <= posX + range; ix++) - { - for (int iz = posZ - range; iz <= posZ + range; iz++) - { - for (int iy = posY - verticalRange; iy <= posY + verticalRange; iy++) - { - IBlockState block = world.getBlockState(new BlockPos(ix, iy, iz)); - - if (block instanceof IPlantable) - { - if (world.rand.nextInt(100) == 0) - { - block.getBlock().updateTick(world, new BlockPos(ix, iy, iz), block, world.rand); - } - } - } - } - } - } - - @Override - public boolean isUpgrade() - { - return true; - } - - @Override - public int getEnergyForTenSeconds() - { - return 50; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java deleted file mode 100644 index 8ed6ece0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java +++ /dev/null @@ -1,127 +0,0 @@ -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.BindableItems; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; - -import java.util.List; - -public class SigilOfHaste extends SigilToggleable implements ArmourUpgrade, ISigil -{ - public SigilOfHaste() - { - super(); - setEnergyUsed(250); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigilofhaste.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (this.getActivated(par1ItemStack)) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); - } else - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); - } - - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - - if (this.getActivated(par1ItemStack) && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - par1ItemStack.setItemDamage(1); - tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); - par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionBoost.id, 3, 1)); - } else - { - par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); - } - - return par1ItemStack; - } - - @Override - public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) - { - if (!(par3Entity instanceof EntityPlayer)) - { - return; - } - - EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - if (this.getActivated(par1ItemStack)) - { - par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionBoost.id, 3, 1, true, false)); - } - - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) - { - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - this.setActivated(par1ItemStack, false); - } - } - } - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack itemStack) - { - if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionBoost.id, 3, 1, true, false)); - } - - @Override - public boolean isUpgrade() - { - return true; - } - - @Override - public int getEnergyForTenSeconds() - { - return 150; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java deleted file mode 100644 index 737a6079..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java +++ /dev/null @@ -1,166 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -import java.util.List; - -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import net.minecraft.entity.Entity; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.item.EntityXPOrb; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; -import WayofTime.alchemicalWizardry.common.items.BindableItems; - -public class SigilOfMagnetism extends SigilToggleable implements ArmourUpgrade, IHolding, ISigil -{ - private int tickDelay = 300; - - public SigilOfMagnetism() - { - super(); - setEnergyUsed(50); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigilofmagnetism.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (this.getActivated(par1ItemStack)) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); - } else - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); - } - - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - - if (this.getActivated(par1ItemStack) && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - par1ItemStack.setItemDamage(1); - tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay); - } else - { - par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); - } - - return par1ItemStack; - } - - @Override - public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) - { - if (!(par3Entity instanceof EntityPlayer)) - { - return; - } - - EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - if (this.getActivated(par1ItemStack)) - { - if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) - { - if(!BindableItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed())) - { - this.setActivated(par1ItemStack, false); - } - } - - int range = 5; - int verticalRange = 5; - float posX = Math.round(par3Entity.posX); - float posY = (float) (par3Entity.posY - par3Entity.getEyeHeight()); - float posZ = Math.round(par3Entity.posZ); - List entities = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(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, new AxisAlignedBB(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) - { - entity.onCollideWithPlayer(par3EntityPlayer); - } - } - - for (EntityXPOrb xpOrb : xpOrbs) - { - if (xpOrb != null && !par2World.isRemote) - { - xpOrb.onCollideWithPlayer(par3EntityPlayer); - } - } - } - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) - { - int range = 5; - int verticalRange = 5; - float posX = Math.round(player.posX); - float posY = (float) (player.posY - player.getEyeHeight()); - float posZ = Math.round(player.posZ); - List entities = player.worldObj.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(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, new AxisAlignedBB(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 && !world.isRemote) - { - entity.onCollideWithPlayer(player); - } - } - - for (EntityXPOrb xpOrb : xpOrbs) - { - if (xpOrb != null && !world.isRemote) - { - xpOrb.onCollideWithPlayer(player); - } - } - } - - @Override - public boolean isUpgrade() - { - return true; - } - - @Override - public int getEnergyForTenSeconds() - { - return 25; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java deleted file mode 100644 index 24865997..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java +++ /dev/null @@ -1,220 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.BindableItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.StatCollector; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; - -import java.util.List; - -public class SigilOfSupression extends SigilToggleable implements ArmourUpgrade, ISigil -{ - private int radius = 5; - private int refresh = 100; - - public SigilOfSupression() - { - super(); - setEnergyUsed(400); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigilofsupression.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (this.getActivated(par1ItemStack)) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); - } else - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); - } - - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - int tickDelay = 200; - - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || SpellHelper.isFakePlayer(par2World, par3EntityPlayer)) - { - return par1ItemStack; - } - - if (par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - - if (this.getActivated(par1ItemStack)) - { - par1ItemStack.setItemDamage(1); - tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay); - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - this.setActivated(par1ItemStack, false); - } - } - } else - { - par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); - } - - return par1ItemStack; - } - - @Override - public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) - { - if (!(par3Entity instanceof EntityPlayer)) - { - return; - } - - if (SpellHelper.isFakePlayer(par2World, (EntityPlayer) par3Entity)) - { - return; - } - - EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - if (this.getActivated(par1ItemStack) && (!par2World.isRemote)) - { - Vec3 blockVec = new Vec3((int) Math.round(par3EntityPlayer.posX - 0.5F), par3EntityPlayer.posY, (int) Math.round(par3EntityPlayer.posZ - 0.5F)); - int x = (int) blockVec.xCoord; - int y = (int) blockVec.yCoord; - int z = (int) blockVec.zCoord; - - for (int i = -radius; i <= radius; i++) - { - for (int j = -radius; j <= radius; j++) - { - for (int k = -radius; k <= radius; k++) - { - if (i * i + j * j + k * k >= (radius + 0.50f) * (radius + 0.50f)) - { - continue; - } - - BlockPos blockPos = new BlockPos(x + i, y + j, z + k); - IBlockState block = par2World.getBlockState(blockPos); - - if (SpellHelper.isBlockFluid(block.getBlock())) - { - if (par2World.getTileEntity(blockPos) != null) - { - par2World.setBlockToAir(blockPos); - } - TESpectralContainer.createSpectralBlockAtLocation(par2World, blockPos, refresh); - } else - { - TileEntity tile = par2World.getTileEntity(blockPos); - if (tile instanceof TESpectralContainer) - { - ((TESpectralContainer) tile).resetDuration(refresh); - } - } - } - } - } - } - - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) - { - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - this.setActivated(par1ItemStack, false); - } - } - } - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) - { - Vec3 blockVec = new Vec3((int) Math.round(player.posX - 0.5F), player.posY, (int) Math.round(player.posZ - 0.5F)); - int x = (int) blockVec.xCoord; - int y = (int) blockVec.yCoord; - int z = (int) blockVec.zCoord; - - for (int i = -radius; i <= radius; i++) - { - for (int j = -radius; j <= radius; j++) - { - for (int k = -radius; k <= radius; k++) - { - if (i * i + j * j + k * k >= (radius + 0.50f) * (radius + 0.50f)) - { - continue; - } - - BlockPos blockPos = new BlockPos(x + i, y + j, z + k); - IBlockState block = world.getBlockState(blockPos); - - if (SpellHelper.isBlockFluid(block.getBlock())) - { - if (world.getTileEntity(blockPos) != null) - { - world.setBlockToAir(blockPos); - } - TESpectralContainer.createSpectralBlockAtLocation(world, blockPos, refresh); - } else - { - TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TESpectralContainer) - { - ((TESpectralContainer) tile).resetDuration(refresh); - } - } - } - } - } - } - - @Override - public boolean isUpgrade() - { - return true; - } - - @Override - public int getEnergyForTenSeconds() - { - return 200; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java deleted file mode 100644 index 7397efec..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java +++ /dev/null @@ -1,269 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -import java.util.List; - -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -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.*; -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.common.items.BindableItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport; - -public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, ISigil -{ - public SigilOfTheAssassin() - { - super(); - setEnergyUsed(100); - } - - @Override - public void onCreated(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - } - - @Override - public ItemStack getContainerItem(ItemStack itemStack) - { - ItemStack copiedStack = itemStack.copy(); - copiedStack.setItemDamage(copiedStack.getItemDamage() + 1); - copiedStack.stackSize = 1; - return copiedStack; - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigiloftheassassin.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer - */ - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - float f = 10.0F; - - MovingObjectPosition movingobjectposition = SpellHelper.raytraceFromEntity(par2World, par3EntityPlayer, false, f); - - if (movingobjectposition == null) - { - AlchemicalWizardry.logger.info("I saw nothing."); - return par1ItemStack; - } else - { - AlchemicalWizardry.logger.info("Got something! Type of hit: " + movingobjectposition.typeOfHit); - - if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY) - { - Entity hitEntity = movingobjectposition.entityHit; - double x = hitEntity.posX; - double y = hitEntity.posY; - double z = hitEntity.posZ; - - if(hitEntity instanceof EntityLivingBase) - { - AlchemicalWizardry.logger.info("It's a living entity!"); - - teleportTo(par3EntityPlayer, x, y, z, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ); - } - } - - return par1ItemStack; - } - } - - 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)) - { - return false; - } - - double d3 = lastX; - double d4 = lastY; - double d5 = lastZ; - SpellTeleport.moveEntityViaTeleport(entityLiving, event.targetX, event.targetY, event.targetZ); - boolean flag = false; - int i = MathHelper.floor_double(entityLiving.posX); - int j = MathHelper.floor_double(entityLiving.posY); - int k = MathHelper.floor_double(entityLiving.posZ); - BlockPos blockPos = new BlockPos(i, j, k); - IBlockState l; - - if (!entityLiving.worldObj.isAirBlock(blockPos)) - { - boolean flag1 = false; - - while (!flag1 && j > 0) - { - l = entityLiving.worldObj.getBlockState(blockPos); - - if (l != null && l.getBlock().getMaterial().blocksMovement()) - { - flag1 = true; - } else - { - --entityLiving.posY; - --j; - } - } - - if (flag1) - { - SpellTeleport.moveEntityViaTeleport(entityLiving, entityLiving.posX, entityLiving.posY, entityLiving.posZ); - - if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.getBoundingBox()).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.getBoundingBox())) - { - flag = true; - } - } - } - - if (!flag) - { - SpellTeleport.moveEntityViaTeleport(entityLiving, d3, d4, d5); - return false; - } else - { - short short1 = 128; - - for (j = 0; j < short1; ++j) - { - double d6 = (double) j / ((double) short1 - 1.0D); - 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 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; - double d8 = d4 + (entityLiving.posY - d4) * d6 + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height; - double d9 = d5 + (entityLiving.posZ - d5) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; - entityLiving.worldObj.spawnParticle(EnumParticleTypes.PORTAL, d7, d8, d9, (double) f, (double) f1, (double) f2); - } - return true; - } - } - - 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 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; - Vec3 vec3 = new Vec3(d0, d1, d2); - float f3 = MathHelper.cos(-f2 * 0.017453292F - (float)Math.PI); - float f4 = MathHelper.sin(-f2 * 0.017453292F - (float)Math.PI); - float f5 = -MathHelper.cos(-f1 * 0.017453292F); - float f6 = MathHelper.sin(-f1 * 0.017453292F); - float f7 = f4 * f5; - float f8 = f3 * f5; - double d3 = 500.0D; -// if (p_77621_2_ instanceof EntityPlayerMP) - { -// d3 = ((EntityPlayerMP)p_77621_2_).theItemInWorldManager.getBlockReachDistance(); - } - Vec3 vec31 = vec3.addVector((double)f7 * d3, (double)f6 * d3, (double)f8 * d3); - return p_77621_1_.rayTraceBlocks(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); -// -// 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, motionZ).expand(1.0D, 1.0D, 1.0D)); -// double var7 = 0.0D; -// Iterator var9 = var6.iterator(); -// float var11; -// -// 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 (var13 != null) -// { -// double var14 = var17.distanceTo(var13.hitVec); -// -// if (var14 < var7 || var7 == 0.0D) -// { -// var5 = var10; -// var7 = var14; -// } -// } -// } -// } -// -// if (var5 != null) -// { -// var4 = new MovingObjectPosition(var5); -// } -// -// if (var4 != null) -// { -// this.onImpact(var4); -// } -// } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) - { - player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 9, true, false)); - } - - @Override - public boolean isUpgrade() - { - return true; - } - - @Override - public int getEnergyForTenSeconds() - { - return 50; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java deleted file mode 100644 index 6b174bcf..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java +++ /dev/null @@ -1,252 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.BindableItems; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; - -import java.util.List; - -public class SigilOfTheBridge extends SigilToggleable implements ArmourUpgrade, ISigil -{ - private int tickDelay = 200; - - public SigilOfTheBridge() - { - super(); - setEnergyUsed(100); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigilofthebridge.desc1")); - par3List.add(StatCollector.translateToLocal("tooltip.sigilofthebridge.desc2")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (this.getActivated(par1ItemStack)) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); - } else - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); - } - - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - - if (this.getActivated(par1ItemStack) && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - par1ItemStack.setItemDamage(1); - tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay); - } else - { - par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); - } - - return par1ItemStack; - } - - @Override - public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) - { - if (!(par3Entity instanceof EntityPlayer)) - { - return; - } - - EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - if (this.getActivated(par1ItemStack)) - { - if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) - { - if(BindableItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, this.getLPUsed(par1ItemStack))) - { - this.setLPUsed(par1ItemStack, 0); - }else - { - this.setActivated(par1ItemStack, false); - } - } - if (!par3EntityPlayer.onGround && !par3EntityPlayer.isSneaking()) - { - return; - } - - int range = 2; - int verticalOffset = -1; - - if (par3EntityPlayer.isSneaking()) - { - verticalOffset--; - } - - if (par2World.isRemote) - { - verticalOffset--; - } - - int posX = (int) Math.round(par3Entity.posX - 0.5f); - int posY = (int) par3Entity.posY; - int posZ = (int) Math.round(par3Entity.posZ - 0.5f); - int incremented = 0; - - for (int ix = posX - range; ix <= posX + range; ix++) - { - for (int iz = posZ - range; iz <= posZ + range; iz++) - { - { - IBlockState block = par2World.getBlockState(new BlockPos(ix, posY + verticalOffset, iz)); - - if (par2World.isAirBlock(new BlockPos(ix, posY + verticalOffset, iz))) - { - par2World.setBlockState(new BlockPos(ix, posY + verticalOffset, iz), ModBlocks.spectralBlock.getDefaultState(), 3); - - TileEntity tile = par2World.getTileEntity(new BlockPos(ix, posY + verticalOffset, iz)); - if (tile instanceof TESpectralBlock) - { - ((TESpectralBlock) tile).setDuration(100); - } - - if (par2World.rand.nextInt(2) == 0) - { - incremented++; - } - } else if (block == ModBlocks.spectralBlock) - { - TileEntity tile = par2World.getTileEntity(new BlockPos(ix, posY + verticalOffset, iz)); - if (tile instanceof TESpectralBlock) - { - ((TESpectralBlock) tile).setDuration(100); - } - } - } - } - } - - this.incrimentLPUSed(par1ItemStack, incremented); - } - } - - public int getLPUsed(ItemStack par1ItemStack) - { - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - return par1ItemStack.getTagCompound().getInteger("LPUsed"); - } - - public void incrimentLPUSed(ItemStack par1ItemStack, int addedLP) - { - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - par1ItemStack.getTagCompound().setInteger("LPUsed", par1ItemStack.getTagCompound().getInteger("LPUsed") + addedLP); - } - - public void setLPUsed(ItemStack par1ItemStack, int newLP) - { - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - par1ItemStack.getTagCompound().setInteger("LPUsed", newLP); - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) - { - if (!player.onGround && !player.isSneaking()) - { - return; - } - - int range = 2; - int verticalOffset = -1; - - if (player.isSneaking()) - { - verticalOffset--; - } - - int posX = (int) Math.round(player.posX - 0.5f); - int posY = (int) player.posY; - int posZ = (int) Math.round(player.posZ - 0.5f); - for (int ix = posX - range; ix <= posX + range; ix++) - { - for (int iz = posZ - range; iz <= posZ + range; iz++) - { - IBlockState block = world.getBlockState(new BlockPos(ix, posY + verticalOffset, iz)); - - if (world.isAirBlock(new BlockPos(ix, posY + verticalOffset, iz))) - { - world.setBlockState(new BlockPos(ix, posY + verticalOffset, iz), ModBlocks.spectralBlock.getDefaultState(), 3); - - TileEntity tile = world.getTileEntity(new BlockPos(ix, posY + verticalOffset, iz)); - if (tile instanceof TESpectralBlock) - { - ((TESpectralBlock) tile).setDuration(100); - } - } else if (block == ModBlocks.spectralBlock) - { - TileEntity tile = world.getTileEntity(new BlockPos(ix, posY + verticalOffset, iz)); - if (tile instanceof TESpectralBlock) - { - ((TESpectralBlock) tile).setDuration(100); - } - } - } - } - } - - @Override - public boolean isUpgrade() - { - return true; - } - - @Override - public int getEnergyForTenSeconds() - { - return 100; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java deleted file mode 100644 index bde22ef7..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java +++ /dev/null @@ -1,127 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.BindableItems; -import net.minecraft.entity.Entity; -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 java.util.List; - -public class SigilOfTheFastMiner extends SigilToggleable implements ArmourUpgrade, ISigil -{ - public SigilOfTheFastMiner() - { - super(); - setEnergyUsed(100); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigilofthefastminer.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (this.getActivated(par1ItemStack)) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); - } else - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); - } - - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - - if (this.getActivated(par1ItemStack) && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - par1ItemStack.setItemDamage(1); - tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); - par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2, 1)); - } else - { - par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); - } - - return par1ItemStack; - } - - @Override - public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) - { - if (!(par3Entity instanceof EntityPlayer)) - { - return; - } - - EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - if (this.getActivated(par1ItemStack)) - { - par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2, 1, true, false)); - } - - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) - { - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - this.setActivated(par1ItemStack, false); - } - } - } - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack itemStack) - { - if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 3, 1, true, false)); - } - - @Override - public boolean isUpgrade() - { - return true; - } - - @Override - public int getEnergyForTenSeconds() - { - return 50; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java deleted file mode 100644 index 84b21315..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java +++ /dev/null @@ -1,127 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -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.BindableItems; - -public class SigilOfWind extends SigilToggleable implements ArmourUpgrade, ISigil -{ - public SigilOfWind() - { - super(); - setEnergyUsed(250); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigilofwind.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (this.getActivated(par1ItemStack)) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); - } else - { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); - } - - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - - if (this.getActivated(par1ItemStack) && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - par1ItemStack.setItemDamage(1); - tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); - par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 2, 1, true, false)); - } else - { - par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); - } - - return par1ItemStack; - } - - @Override - public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) - { - if (!(par3Entity instanceof EntityPlayer)) - { - return; - } - - EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - if (this.getActivated(par1ItemStack)) - { - par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 2, 1, true, false)); - } - - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) - { - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - this.setActivated(par1ItemStack, false); - } - } - } - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack itemStack) - { - if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 3, 1, true, false)); - } - - @Override - public boolean isUpgrade() - { - return true; - } - - @Override - public int getEnergyForTenSeconds() - { - return 150; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java deleted file mode 100644 index 66dd0fd4..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java +++ /dev/null @@ -1,66 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -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.BindableItems; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; - -import java.util.List; - -public class SigilSeer extends Item implements IHolding, ArmourUpgrade, ISigil -{ - public SigilSeer() - { - super(); - setMaxStackSize(1); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.seersigil.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.worldObj.isRemote) - { - return par1ItemStack; - } - - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null || itemTag.getString("ownerName").equals("")) - { - return par1ItemStack; - } - - return par1ItemStack; - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {} - @Override - public boolean isUpgrade() - { - return false; - } - - @Override - public int getEnergyForTenSeconds() - { - return 0; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilToggleable.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilToggleable.java deleted file mode 100644 index ae698659..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilToggleable.java +++ /dev/null @@ -1,17 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -import net.minecraft.item.ItemStack; -import WayofTime.alchemicalWizardry.common.items.BindableItems; - -public class SigilToggleable extends BindableItems -{ - public void setActivated(ItemStack stack, boolean newActivated) - { - stack.setItemDamage(newActivated ? 1 : 0); - } - - public boolean getActivated(ItemStack stack) - { - return stack.getItemDamage() == 1; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java deleted file mode 100644 index 2d9aee04..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java +++ /dev/null @@ -1,164 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -import java.util.List; - -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBucket; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.items.BindableItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -public class SigilVoid extends ItemBucket implements ArmourUpgrade, ISigil -{ - private int energyUsed; - - public SigilVoid() - { - super(null); - setEnergyUsed(50); - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.voidsigil.desc")); - - if (!(stack.getTagCompound() == null)) - { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + stack.getTagCompound().getString("ownerName")); - } - } - - @Override - public ItemStack getContainerItem(ItemStack itemStack) - { - ItemStack copiedStack = itemStack.copy(); - copiedStack.setItemDamage(copiedStack.getItemDamage() + getEnergyUsed()); - copiedStack.stackSize = 1; - return copiedStack; - } - - protected void setEnergyUsed(int par1int) - { - this.energyUsed = par1int; - } - - protected int getEnergyUsed() - { - return this.energyUsed; - } - - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) - { - return stack; - } - - @Override - public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (world.isRemote || !BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) - { - return false; - } - - if (!world.canMineBlockBody(player, blockPos)) - { - return false; - } - - TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof IFluidHandler) - { - FluidStack amount = ((IFluidHandler) tile).drain(side, 1000, false); - - if (amount != null && amount.amount > 0 && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) - { - ((IFluidHandler) tile).drain(side, 1000, true); - return true; - } - - return false; - } - - int x = blockPos.getX(); - int y = blockPos.getY(); - int z = blockPos.getZ(); - - if (side.getIndex() == 0) - { - --y; - } - - if (side.getIndex() == 1) - { - ++y; - } - - if (side.getIndex() == 2) - { - --z; - } - - if (side.getIndex() == 3) - { - ++z; - } - - if (side.getIndex() == 4) - { - --x; - } - - if (side.getIndex() == 5) - { - ++x; - } - - if (!player.func_175151_a(new BlockPos(x, y, z), side, stack)) //was canPlayerEdit - { - return false; - } - - if (SpellHelper.isBlockFluid(world.getBlockState(new BlockPos(x, y, z)).getBlock()) && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) - { - world.setBlockToAir(new BlockPos(x, y, z)); - return true; - } - - - return false; - } - - @Override - /** - * Attempts to place the liquid contained inside the bucket. - */ - public boolean func_180616_a(World world, BlockPos blockPos) //was tryPlaceContainedLiquid - { - return false; - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {} - - @Override - public boolean isUpgrade() - { - return true; - } - - @Override - public int getEnergyForTenSeconds() - { - return 25; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java deleted file mode 100644 index 4bf58364..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java +++ /dev/null @@ -1,242 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -import java.util.List; - -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemBucket; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.items.BindableItems; - -public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil -{ - private Block isFull = Blocks.water; - private int energyUsed; - - public SigilWater() - { - super(Blocks.water); - setEnergyUsed(100); - } - - @Override - public void onCreated(ItemStack stack, World world, EntityPlayer player) - { - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - } - - @Override - public ItemStack getContainerItem(ItemStack itemStack) - { - return itemStack; - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.watersigil.desc")); - - if (!(stack.getTagCompound() == null)) - { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + stack.getTagCompound().getString("ownerName")); - } - } - - @Override - /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer - */ - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) - { - return stack; - } - - @Override - public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (world.isRemote || !BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) - { - return false; - } - - if (!world.canMineBlockBody(player, blockPos)) - { - return false; - } - - TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof IFluidHandler) - { - FluidStack fluid = new FluidStack(FluidRegistry.WATER, 1000); - int amount = ((IFluidHandler) tile).fill(side, fluid, false); - - if (amount > 0 && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) - { - ((IFluidHandler) tile).fill(side, fluid, true); - } - - return false; - } - else if (tile instanceof TESocket) - { - return false; - } - - int x = blockPos.getX(); - int y = blockPos.getY(); - int z = blockPos.getZ(); - { - if (side.getIndex() == 0) - { - --y; - } - - if (side.getIndex() == 1) - { - ++y; - } - - if (side.getIndex() == 2) - { - --z; - } - - if (side.getIndex() == 3) - { - ++z; - } - - if (side.getIndex() == 4) - { - --x; - } - - if (side.getIndex() == 5) - { - ++x; - } - - if (!player.func_175151_a(new BlockPos(x, y, z), side, stack)) // was canPlayerEdit - { - return false; - } - - if(this.canPlaceContainedLiquid(world, new BlockPos(x, y, z)) && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) - { - return this.func_180616_a(world, new BlockPos(x, y, z)); - } - } - - return false; - - } - - /** - * Attempts to place the liquid contained inside the bucket. - */ - public boolean func_180616_a(World world, BlockPos blockPos) //was tryPlaceContainedLiquid - { - if (this.isFull == Blocks.air) - { - return false; - } - else - { - Material material = world.getBlockState(blockPos).getBlock().getMaterial(); - boolean flag = !material.isSolid(); - - if (!world.isAirBlock(blockPos) && !flag) - { - return false; - } - else - { - if (world.provider.func_177500_n() && this.isFull == Blocks.flowing_water) - { - int i = blockPos.getX(); - int j = blockPos.getY(); - int k = blockPos.getZ(); - world.playSoundEffect((double)((float)i + 0.5F), (double)((float)j + 0.5F), (double)((float)k + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - - for (int l = 0; l < 8; ++l) - { - world.spawnParticle(EnumParticleTypes.SMOKE_LARGE, (double)i + Math.random(), (double)j + Math.random(), (double)k + Math.random(), 0.0D, 0.0D, 0.0D, 0); - } - } - else - { - if (!world.isRemote && flag && !material.isLiquid()) - { - world.destroyBlock(blockPos, true); - } - - world.setBlockState(blockPos, this.isFull.getDefaultState(), 3); - } - - return true; - } - } - } - - public boolean canPlaceContainedLiquid(World world, BlockPos blockPos) - { - if (!world.isAirBlock(blockPos) && world.getBlockState(blockPos).getBlock().getMaterial().isSolid()) - { - return false; - } else if ((world.getBlockState(blockPos).getBlock() == Blocks.water || world.getBlockState(blockPos).getBlock() == Blocks.flowing_water) && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0) - { - return false; - } else - { - return true; - } - } - - protected void setEnergyUsed(int par1int) - { - this.energyUsed = par1int; - } - - protected int getEnergyUsed() - { - return this.energyUsed; - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) - { - player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 9)); - } - - @Override - public boolean isUpgrade() - { - return true; - } - - @Override - public int getEnergyForTenSeconds() - { - return 50; - } -} 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 deleted file mode 100644 index e4d3afc2..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ContainerHolding.java +++ /dev/null @@ -1,195 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil.holding; - -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 net.minecraftforge.fml.common.FMLCommonHandler; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; - -public class ContainerHolding extends Container -{ - protected final int PLAYER_INVENTORY_ROWS = 3; - protected final int PLAYER_INVENTORY_COLUMNS = 9; - - private int inventoryColumns = 5; - - private final EntityPlayer player; - public final InventoryHolding inventoryHolding; - - public ContainerHolding(EntityPlayer player, InventoryHolding inventoryHolding) - { - this.player = player; - this.inventoryHolding = inventoryHolding; - int currentSlotHeldIn = player.inventory.currentItem; - - for (int columnIndex = 0; columnIndex < inventoryColumns; ++columnIndex) - { - this.addSlotToContainer(new SlotHolding(this, inventoryHolding, player, columnIndex, 8 + columnIndex * 36, 15)); - } - - 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)); - } - } - - for (int actionBarIndex = 0; actionBarIndex < PLAYER_INVENTORY_COLUMNS; ++actionBarIndex) - { - if (actionBarIndex == currentSlotHeldIn) - { - this.addSlotToContainer(new SlotDisabled(player.inventory, actionBarIndex, 8 + actionBarIndex * 18, 97)); - } - else - { - this.addSlotToContainer(new Slot(player.inventory, actionBarIndex, 8 + actionBarIndex * 18, 97)); - } - } - } - - @Override - public boolean canInteractWith(EntityPlayer entityPlayer) - { - return true; - } - - @Override - public void onContainerClosed(EntityPlayer entityPlayer) - { - super.onContainerClosed(entityPlayer); - - if (!entityPlayer.worldObj.isRemote) - { - saveInventory(entityPlayer); - } - } - - @Override - public void detectAndSendChanges() - { - super.detectAndSendChanges(); - - if (!player.worldObj.isRemote) - { - saveInventory(player); - } - } - - @Override - public ItemStack transferStackInSlot(EntityPlayer entityPlayer, int slotIndex) - { - ItemStack stack = null; - Slot slotObject = (Slot) inventorySlots.get(slotIndex); - int slots = inventorySlots.size(); - - if (slotObject != null && slotObject.getHasStack()) - { - ItemStack stackInSlot = slotObject.getStack(); - stack = stackInSlot.copy(); - - if (stack.getItem() instanceof ISigil) - { - if (slotIndex < inventoryColumns) - { - if (!this.mergeItemStack(stackInSlot, inventoryColumns, slots, false)) - { - return null; - } - } - else if (!this.mergeItemStack(stackInSlot, 0, inventoryColumns, false)) - { - return null; - } - } - else if (stack.getItem() instanceof SigilOfHolding) - { - if (slotIndex < inventoryColumns + (PLAYER_INVENTORY_ROWS * PLAYER_INVENTORY_COLUMNS)) - { - if (!this.mergeItemStack(stackInSlot, inventoryColumns + (PLAYER_INVENTORY_ROWS * PLAYER_INVENTORY_COLUMNS), inventorySlots.size(), false)) - { - return null; - } - } - else if (!this.mergeItemStack(stackInSlot, inventoryColumns, inventoryColumns + (PLAYER_INVENTORY_ROWS * PLAYER_INVENTORY_COLUMNS), false)) - { - return null; - } - } - - if (stackInSlot.stackSize == 0) - { - slotObject.putStack(null); - } else - { - slotObject.onSlotChanged(); - } - - if (stackInSlot.stackSize == stack.stackSize) - { - return null; - } - - slotObject.onPickupFromSlot(player, stackInSlot); - } - - return stack; - } - - public void saveInventory(EntityPlayer entityPlayer) - { - inventoryHolding.onGuiSaved(entityPlayer); - } - - 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) - { - super(inventory, slotIndex, x, y); - this.player = player; - this.containerHolding = containerHolding; - } - - @Override - public void onSlotChanged() - { - super.onSlotChanged(); - - if (FMLCommonHandler.instance().getEffectiveSide().isServer()) - { - containerHolding.saveInventory(player); - } - } - - @Override - public boolean isItemValid(ItemStack itemStack) - { - return itemStack.getItem() instanceof ISigil; - } - } - - private class SlotDisabled extends Slot - { - public SlotDisabled(IInventory inventory, int slotIndex, int x, int y) - { - super(inventory, slotIndex, x, y); - } - - @Override - public boolean isItemValid(ItemStack itemStack) - { - return false; - } - - @Override - public boolean canTakeStack(EntityPlayer player) - { - return false; - } - } -} 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 deleted file mode 100644 index f47ee663..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/GuiHolding.java +++ /dev/null @@ -1,39 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil.holding; - -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.lwjgl.opengl.GL11; - -@SideOnly(Side.CLIENT) -public class GuiHolding extends GuiContainer -{ - public GuiHolding(EntityPlayer player, InventoryHolding inventoryHolding) - { - super(new ContainerHolding(player, inventoryHolding)); - xSize = 176; - ySize = 121; - } - - @Override - protected void drawGuiContainerForegroundLayer(int param1, int param2) - { - //the parameters for drawString are: string, x, y, color - fontRendererObj.drawString("Sigil of Holding", 52, 4, 4210752); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) - { - //draw your Gui here, only thing you need to change is the path - ResourceLocation test = new ResourceLocation("alchemicalwizardry", "gui/SigilOfHolding.png"); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.mc.getTextureManager().bindTexture(test); - int x = (width - xSize) / 2; - int y = (height - ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize); - } -} 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 deleted file mode 100644 index f6acf021..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketHandler.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil.holding; - -import net.minecraftforge.fml.common.network.NetworkRegistry; -import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; -import net.minecraftforge.fml.relauncher.Side; - -public class HoldingPacketHandler -{ - public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel("SigilOfHolding"); - - public static void init() - { - INSTANCE.registerMessage(HoldingPacketProcessor.class, HoldingPacketProcessor.class, 0, Side.SERVER); - } -} 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 deleted file mode 100644 index dc82e3b1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketProcessor.java +++ /dev/null @@ -1,55 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil.holding; - -import io.netty.buffer.ByteBuf; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.network.simpleimpl.IMessage; -import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; - -public class HoldingPacketProcessor implements IMessage, IMessageHandler -{ - private int slot; - private int mode; - - public HoldingPacketProcessor() - { - } - - public HoldingPacketProcessor(int slot, int mode) - { - this.slot = slot; - this.mode = mode; - } - - @Override - public void toBytes(ByteBuf buffer) - { - buffer.writeInt(slot); - buffer.writeInt(mode); - } - - @Override - public void fromBytes(ByteBuf buffer) - { - slot = buffer.readInt(); - mode = buffer.readInt(); - } - - @Override - public IMessage onMessage(HoldingPacketProcessor message, MessageContext ctx) - { - ItemStack itemStack = null; - - if (message.slot > -1 && message.slot < 9) - { - itemStack = ctx.getServerHandler().playerEntity.inventory.getStackInSlot(message.slot); - } - - if (itemStack != null) - { - SigilOfHolding.cycleSigil(itemStack, message.mode); - } - - return null; - } -} 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 deleted file mode 100644 index f894aad9..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/InventoryHolding.java +++ /dev/null @@ -1,292 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil.holding; - -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -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 net.minecraft.util.IChatComponent; - -import java.util.UUID; - -public class InventoryHolding implements IInventory -{ - public ItemStack parentItemStack; - protected ItemStack[] inventory; - - protected static String NBT_MOST_SIG = "MostSig"; - protected static String NBT_LEAST_SIG = "LeastSig"; - protected static String NBT_ITEMS = "Items"; - - public InventoryHolding(ItemStack itemStack) - { - parentItemStack = itemStack; - - inventory = new ItemStack[5]; - - readFromNBT(itemStack.getTagCompound()); - } - - public void onGuiSaved(EntityPlayer entityPlayer) - { - parentItemStack = findParentItemStack(entityPlayer); - - if (parentItemStack != null) - { - save(); - } - } - - public ItemStack findParentItemStack(EntityPlayer entityPlayer) - { - if (hasUUID(parentItemStack)) - { - UUID parentItemStackUUID = new UUID(parentItemStack.getTagCompound().getLong(NBT_MOST_SIG), parentItemStack.getTagCompound().getLong(NBT_LEAST_SIG)); - for (int i = 0; i < entityPlayer.inventory.getSizeInventory(); i++) - { - ItemStack itemStack = entityPlayer.inventory.getStackInSlot(i); - - if (hasUUID(itemStack)) - { - if (itemStack.getTagCompound().getLong(NBT_MOST_SIG) == parentItemStackUUID.getMostSignificantBits() && itemStack.getTagCompound().getLong(NBT_LEAST_SIG) == parentItemStackUUID.getLeastSignificantBits()) - { - return itemStack; - } - } - } - } - - return null; - } - - public void save() - { - NBTTagCompound nbtTagCompound = parentItemStack.getTagCompound(); - - if (nbtTagCompound == null) - { - nbtTagCompound = new NBTTagCompound(); - - UUID uuid = UUID.randomUUID(); - nbtTagCompound.setLong(NBT_MOST_SIG, uuid.getMostSignificantBits()); - nbtTagCompound.setLong(NBT_LEAST_SIG, uuid.getLeastSignificantBits()); - } - - writeToNBT(nbtTagCompound); - parentItemStack.setTagCompound(nbtTagCompound); - } - - @Override - public int getSizeInventory() - { - return inventory.length; - } - - @Override - public ItemStack getStackInSlot(int slotIndex) - { - return slotIndex >= 0 && slotIndex < this.inventory.length ? inventory[slotIndex] : null; - } - - @Override - public ItemStack decrStackSize(int slotIndex, int decrementAmount) - { - ItemStack itemStack = getStackInSlot(slotIndex); - if (itemStack != null) - { - if (itemStack.stackSize <= decrementAmount) - { - setInventorySlotContents(slotIndex, null); - } - else - { - itemStack = itemStack.splitStack(decrementAmount); - if (itemStack.stackSize == 0) - { - setInventorySlotContents(slotIndex, null); - } - } - } - - return itemStack; - } - - @Override - public ItemStack getStackInSlotOnClosing(int slotIndex) - { - if (inventory[slotIndex] != null) - { - ItemStack itemStack = inventory[slotIndex]; - inventory[slotIndex] = null; - return itemStack; - } - else - { - return null; - } - } - - @Override - public void setInventorySlotContents(int slotIndex, ItemStack itemStack) - { - if (slotIndex >= 0 && slotIndex < this.inventory.length) - { - this.inventory[slotIndex] = itemStack; - } - } - - @Override - public String getName() - { - return "SigilOfHolding"; - } - - @Override - public boolean hasCustomName() - { - return false; - } - - @Override - public int getInventoryStackLimit() - { - return 1; - } - - @Override - public void markDirty() - { - // NOOP - } - - @Override - public boolean isUseableByPlayer(EntityPlayer entityPlayer) - { - return true; - } - - @Override - public void openInventory(EntityPlayer player) - { - // NOOP - } - - @Override - public void closeInventory(EntityPlayer player) - { - // NOOP - } - - @Override - public boolean isItemValidForSlot(int slotIndex, ItemStack itemStack) - { - return itemStack.getItem() instanceof ISigil; - } - - public void readFromNBT(NBTTagCompound nbtTagCompound) - { - if (nbtTagCompound != null && nbtTagCompound.hasKey(NBT_ITEMS)) - { - // Read in the ItemStacks in the inventory from NBT - if (nbtTagCompound.hasKey(NBT_ITEMS)) - { - NBTTagList tagList = nbtTagCompound.getTagList(NBT_ITEMS, 10); - inventory = new ItemStack[this.getSizeInventory()]; - for (int i = 0; i < tagList.tagCount(); ++i) - { - NBTTagCompound tagCompound = tagList.getCompoundTagAt(i); - byte slotIndex = tagCompound.getByte("Slot"); - if (slotIndex >= 0 && slotIndex < inventory.length) - { - inventory[slotIndex] = ItemStack.loadItemStackFromNBT(tagCompound); - } - } - } - } - } - - public void writeToNBT(NBTTagCompound nbtTagCompound) - { - // Write the ItemStacks in the inventory to NBT - NBTTagList tagList = new NBTTagList(); - for (int currentIndex = 0; currentIndex < inventory.length; ++currentIndex) - { - if (inventory[currentIndex] != null) - { - NBTTagCompound tagCompound = new NBTTagCompound(); - tagCompound.setByte("Slot", (byte) currentIndex); - inventory[currentIndex].writeToNBT(tagCompound); - tagList.appendTag(tagCompound); - } - } - nbtTagCompound.setTag(NBT_ITEMS, tagList); - } - - public static boolean hasTag(ItemStack itemStack, String keyName) - { - return itemStack != null && itemStack.getTagCompound() != null && itemStack.getTagCompound().hasKey(keyName); - } - - public static boolean hasUUID(ItemStack itemStack) - { - return hasTag(itemStack, NBT_MOST_SIG) && hasTag(itemStack, NBT_LEAST_SIG); - } - - public static void setUUID(ItemStack itemStack) - { - initNBTTagCompound(itemStack); - - if (!hasTag(itemStack, NBT_MOST_SIG) && !hasTag(itemStack, NBT_LEAST_SIG)) - { - UUID itemUUID = UUID.randomUUID(); - setLong(itemStack, NBT_MOST_SIG, itemUUID.getMostSignificantBits()); - setLong(itemStack, NBT_LEAST_SIG, itemUUID.getLeastSignificantBits()); - } - } - - private static void initNBTTagCompound(ItemStack itemStack) - { - if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - } - - public static void setLong(ItemStack itemStack, String keyName, long keyValue) - { - initNBTTagCompound(itemStack); - - itemStack.getTagCompound().setLong(keyName, keyValue); - } - - @Override - public IChatComponent getDisplayName() { - // TODO Auto-generated method stub - return null; - } - - @Override - public int getField(int id) { - // TODO Auto-generated method stub - return 0; - } - - @Override - public void setField(int id, int value) { - // TODO Auto-generated method stub - - } - - @Override - public int getFieldCount() { - // TODO Auto-generated method stub - return 0; - } - - @Override - public void clear() { - // TODO Auto-generated method stub - - } -} 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 deleted file mode 100644 index bb96bf84..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ScrollHelper.java +++ /dev/null @@ -1,45 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil.holding; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.EntityPlayerSP; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.client.event.MouseEvent; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class ScrollHelper -{ - @SubscribeEvent - public void onMouseEvent(MouseEvent event) - { - EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; - - if (event.dwheel != 0 && player != null && player.isSneaking()) - { - ItemStack stack = player.getCurrentEquippedItem(); - - if (stack != null) - { - Item item = stack.getItem(); - - if (item instanceof SigilOfHolding) - { - cycleSigil(stack, player, event.dwheel); - event.setCanceled(true); - } - } - } - } - - private void cycleSigil(ItemStack stack, EntityPlayer player, int dWheel) - { - int mode = SigilOfHolding.getCurrentItem(stack); - mode = dWheel < 0 ? SigilOfHolding.next(mode) : SigilOfHolding.prev(mode); - SigilOfHolding.cycleSigil(stack, mode); - HoldingPacketHandler.INSTANCE.sendToServer(new HoldingPacketProcessor(player.inventory.currentItem, mode)); - } -} 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 deleted file mode 100644 index e0eeaecb..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java +++ /dev/null @@ -1,281 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil.holding; - -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MathHelper; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.items.BindableItems; - -public class SigilOfHolding extends BindableItems -{ - private static int invSize = 5; - - private static final String NBT_CURRENT_SIGIL = "CurrentSigil"; - - public SigilOfHolding() - { - super(); - setMaxStackSize(1); - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.sigilofholding.desc")); - - if (!(stack.getTagCompound() == null)) - { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + stack.getTagCompound().getString("ownerName")); - ItemStack[] inv = getInternalInventory(stack); - - if (inv == null) - { - return; - } - - int currentSlot = getCurrentItem(stack); - ItemStack item = inv[currentSlot]; - - if (item != null) - { - par3List.add(StatCollector.translateToLocal("tooltip.item.currentitem") + " " + item.getDisplayName()); - } - - for (int i = 0; i < invSize; i++) - { - if (inv[i] != null) - { - par3List.add(StatCollector.translateToLocal("tooltip.item.iteminslot") + " " + (i + 1) + ": " + inv[i].getDisplayName()); - } - } - } - } - - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (checkAndSetItemOwner(stack, player)) - { - int currentSlot = getCurrentItem(stack); - ItemStack[] inv = getInternalInventory(stack); - - if (inv == null) - { - return false; - } - - ItemStack itemUsed = inv[currentSlot]; - - if (itemUsed == null) - { - return false; - } - - boolean bool = itemUsed.getItem().onItemUse(stack, player, world, pos, side, hitX, hitY, hitZ); - - saveInventory(stack, inv); - - return bool; - } - - return false; - } - - @Override - public ItemStack onItemRightClick(ItemStack stack, World par2World, EntityPlayer par3EntityPlayer) - { - if (checkAndSetItemOwner(stack, par3EntityPlayer)) - { - if (par3EntityPlayer.isSneaking()) - { - InventoryHolding.setUUID(stack); - par3EntityPlayer.openGui(AlchemicalWizardry.instance, 3, par3EntityPlayer.worldObj, (int) par3EntityPlayer.posX, (int) par3EntityPlayer.posY, (int) par3EntityPlayer.posZ); - return stack; - } - - int currentSlot = getCurrentItem(stack); - ItemStack[] inv = getInternalInventory(stack); - - if (inv == null) - { - return stack; - } - - ItemStack itemUsed = inv[currentSlot]; - - if (itemUsed == null) - { - return stack; - } - - itemUsed.getItem().onItemRightClick(itemUsed, par2World, par3EntityPlayer); - saveInventory(stack, inv); - } - return stack; - } - - public static int next(int mode) - { - int index = mode + 1; - - if (index >= invSize + 1) - { - index = 0; - } - - return index; - } - - public static int prev(int mode) - { - int index = mode - 1; - - if (index < 0) - { - index = invSize; - } - - return index; - } - - private static void initModeTag(ItemStack itemStack) - { - if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - itemStack.getTagCompound().setInteger(NBT_CURRENT_SIGIL, invSize); - } - } - - public static ItemStack getCurrentSigil(ItemStack itemStack) - { - if (itemStack != null && itemStack.getItem() instanceof SigilOfHolding) - { - ItemStack[] itemStacks = getInternalInventory(itemStack); - int currentSlot = getCurrentItem(itemStack); - if (itemStacks != null) - { - return itemStacks[currentSlot]; - } - } - - return null; - } - - public static int getCurrentItem(ItemStack itemStack) - { - if (itemStack != null && itemStack.getItem() instanceof SigilOfHolding) - { - initModeTag(itemStack); - int currentSigil = itemStack.getTagCompound().getInteger(NBT_CURRENT_SIGIL); - currentSigil = MathHelper.clamp_int(currentSigil, 0, invSize); - return currentSigil; - } - - return 4; - } - - public static ItemStack[] getInternalInventory(ItemStack itemStack) - { - initModeTag(itemStack); - NBTTagCompound tagCompound = itemStack.getTagCompound(); - - if (tagCompound == null) - { - return null; - } - - ItemStack[] inv = new ItemStack[9]; - NBTTagList tagList = tagCompound.getTagList(InventoryHolding.NBT_ITEMS, 10); - - if (tagList == null) - { - return null; - } - - for (int i = 0; i < tagList.tagCount(); i++) - { - NBTTagCompound tag = tagList.getCompoundTagAt(i); - int slot = tag.getByte("Slot"); - - if (slot >= 0 && slot < invSize) - { - inv[slot] = ItemStack.loadItemStackFromNBT(tag); - } - } - - return inv; - } - - public void saveInventory(ItemStack itemStack, ItemStack[] inventory) - { - NBTTagCompound itemTag = itemStack.getTagCompound(); - - if (itemTag == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagList itemList = new NBTTagList(); - - for (int i = 0; i < invSize; i++) - { - if (inventory[i] != null) - { - NBTTagCompound tag = new NBTTagCompound(); - tag.setByte("Slot", (byte) i); - inventory[i].writeToNBT(tag); - itemList.appendTag(tag); - } - } - - itemTag.setTag(InventoryHolding.NBT_ITEMS, itemList); - } - - public static void cycleSigil(ItemStack itemStack, int mode) - { - if (itemStack != null && itemStack.getItem() instanceof SigilOfHolding) - { - initModeTag(itemStack); - itemStack.getTagCompound().setInteger(NBT_CURRENT_SIGIL, mode); - } - } - - @Override - public void onUpdate(ItemStack stack, World par2World, Entity par3Entity, int par4, boolean par5) - { - if (!(stack.getTagCompound() == null)) - { - this.tickInternalInventory(stack, par2World, par3Entity, par4, par5); - } - } - - public void tickInternalInventory(ItemStack stack, World par2World, Entity par3Entity, int par4, boolean par5) - { - ItemStack[] inv = getInternalInventory(stack); - - if (inv == null) - { - return; - } - - for (int i = 0; i < invSize; i++) - { - if (inv[i] == null) - { - continue; - } - - inv[i].getItem().onUpdate(inv[i], par2World, par3Entity, par4, par5); - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java deleted file mode 100644 index f044912d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java +++ /dev/null @@ -1,192 +0,0 @@ -//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 net.minecraft.client.renderer.texture.IIconRegister; -//import net.minecraft.entity.Entity; -//import net.minecraft.entity.EntityLivingBase; -//import net.minecraft.entity.player.EntityPlayer; -//import net.minecraft.item.ItemArmor; -//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 java.util.List; -// -//public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGoggles, IVisDiscountGear, IRevealer, IRunicArmor, IRepairable -//{ -// @SideOnly(Side.CLIENT) -// private IIcon helmetIcon; -// @SideOnly(Side.CLIENT) -// private IIcon plateIcon; -// @SideOnly(Side.CLIENT) -// private IIcon leggingsIcon; -// @SideOnly(Side.CLIENT) -// private IIcon bootsIcon; -// -// public ItemSanguineArmour(int armorType) -// { -// super(AlchemicalWizardry.sanguineArmourArmourMaterial, 0, armorType); -// setMaxDamage(1000); -// setCreativeTab(AlchemicalWizardry.tabBloodMagic); -// } -// -// @Override -// @SideOnly(Side.CLIENT) -// public void registerIcons(IIconRegister iconRegister) -// { -// this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); -// this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineHelmet"); -// this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguinePlate"); -// this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineLeggings"); -// this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineBoots"); -// } -// -// @SideOnly(Side.CLIENT) -// public IIcon getIconFromDamage(int par1) -// { -// if (this.equals(ModItems.sanguineHelmet)) -// { -// return this.helmetIcon; -// } -// -// if (this.equals(ModItems.sanguineRobe)) -// { -// return this.plateIcon; -// } -// -// if (this.equals(ModItems.sanguinePants)) -// { -// return this.leggingsIcon; -// } -// -// if (this.equals(ModItems.sanguineBoots)) -// { -// return this.bootsIcon; -// } -// -// return this.itemIcon; -// } -// -// @Override -// public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) -// { -// if (this == ModItems.sanguineHelmet) -// { -// return "alchemicalwizardry:models/armor/sanguineArmour_layer_1.png"; -// } -// -// if (this == ModItems.sanguineRobe || this == ModItems.sanguineBoots) -// { -// return "alchemicalwizardry:models/armor/sanguineArmour_layer_1.png"; -// } -// -// if (this == ModItems.sanguinePants) -// { -// return "alchemicalwizardry:models/armor/sanguineArmour_layer_2.png"; -// } else -// { -// return null; -// } -// } -// -// @Override -// public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) -// { -// int discount = 0; -// -// switch (this.armorType) -// { -// case 0: -// discount = 6; -// break; -// case 1: -// discount = 3; -// break; -// case 2: -// discount = 3; -// break; -// case 3: -// discount = 2; -// break; -// } -// -// switch (this.armorType) -// { -// case 0: -// par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc1")); -// break; -// case 1: -// -// case 2: -// -// case 3: -// par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc2")); -// } -// -// par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.visdisc") + " " + discount + "%"); -// } -// -// @Override -// public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) -// { -// return; -// } -// -// @Override -// public boolean isUpgrade() -// { -// return true; -// } -// -// @Override -// public int getEnergyForTenSeconds() -// { -// return 0; -// } -// -// @Override -// public boolean showNodes(ItemStack itemstack, EntityLivingBase player) -// { -// return true; -// } -// -// @Override -// public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) -// { -// switch (this.armorType) -// { -// case 0: -// return 7; -// case 1: -// return 3; -// case 2: -// return 2; -// case 3: -// return 2; -// } -// return 0; -// } -// -// @Override -// public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) -// { -// return true; -// } -// -// @Override -// public int getRunicCharge(ItemStack itemstack) -// { -// return 0; -// } -//} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java deleted file mode 100644 index 06c4b2fc..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java +++ /dev/null @@ -1,11 +0,0 @@ -package WayofTime.alchemicalWizardry.common.omega; - -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; - -public interface IEnchantmentGlyph extends IStabilityGlyph -{ - int getEnchantability(World world, BlockPos pos, int meta); - - int getEnchantmentLevel(World world, BlockPos pos, int meta); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java deleted file mode 100644 index 2b826b0f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.omega; - -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; - -public interface IStabilityGlyph -{ - int getAdditionalStabilityForFaceCount(World world, BlockPos pos, 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 deleted file mode 100644 index 3c93d301..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigm.java +++ /dev/null @@ -1,167 +0,0 @@ -package WayofTime.alchemicalWizardry.common.omega; - -import java.util.Random; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -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; - public OmegaArmour boots; - - public 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; - this.boots = boots; - - this.helmet.setParadigm(this); - this.chestPiece.setParadigm(this); - this.leggings.setParadigm(this); - this.boots.setParadigm(this); - this.helmet.setReagent(reagent); - this.chestPiece.setReagent(reagent); - this.leggings.setReagent(reagent); - this.boots.setReagent(reagent); - - 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) - { - ItemStack[] armours = player.inventory.armorInventory; - - ItemStack helmetStack = armours[3]; - ItemStack chestStack = armours[2]; - ItemStack leggingsStack = armours[1]; - ItemStack bootsStack = armours[0]; - - if(helmetStack != null && helmetStack.getItem() == ModItems.boundHelmet && chestStack != null && chestStack.getItem() == ModItems.boundChestplate && leggingsStack != null && leggingsStack.getItem() == ModItems.boundLeggings && 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); - - armours[3] = omegaHelmetStack; - armours[2] = omegaChestStack; - armours[1] = omegaLeggingsStack; - armours[0] = omegaBootsStack; - - return true; - } - - return false; - } - - public ReagentRegenConfiguration getRegenConfig(EntityPlayer player) - { - return this.config; - } - - public int getMaxAdditionalHealth() - { - return 20; - } - - public boolean setOmegaStalling(EntityPlayer player, int duration) - { - ItemStack[] armours = player.inventory.armorInventory; - - ItemStack chestStack = armours[2]; - - if(chestStack != null && chestStack.getItem() == this.chestPiece) - { - ((OmegaArmour)chestStack.getItem()).setOmegaStallingDuration(chestStack, duration); - return true; - } - - return false; - } - - public float getCostPerTickOfUse(EntityPlayer player) - { - return 1; - } - - public boolean doDrainReagent(EntityPlayer player) - { - ItemStack[] armours = player.inventory.armorInventory; - - ItemStack chestStack = armours[2]; - - if(chestStack != null && chestStack.getItem() == this.chestPiece) - { - return !((OmegaArmour)chestStack.getItem()).hasOmegaStalling(chestStack); - } - return true; - } - - public boolean isPlayerWearingFullSet(EntityPlayer player) - { - ItemStack[] armours = player.inventory.armorInventory; - - ItemStack helmetStack = armours[3]; - ItemStack chestStack = armours[2]; - ItemStack leggingsStack = armours[1]; - ItemStack bootsStack = armours[0]; - - return helmetStack != null && helmetStack.getItem() == helmet && chestStack != null && chestStack.getItem() == chestPiece && leggingsStack != null && leggingsStack.getItem() == leggings && bootsStack != null && bootsStack.getItem() == boots; - } - - public void onUpdate(World world, EntityPlayer player, ItemStack stack) - { - - } - - public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack) - { - - } - - public boolean getBlockEffectWhileInside(Entity entity, BlockPos blockPos) - { - return false; - } - - public boolean onHPBarDepleted(EntityPlayer player, ItemStack stack) - { - return false; - } - - /** - * - * @param stack - * @param player - * @param entity - * @return False if it does not do damage - */ - public boolean onBoundSwordLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) - { - return true; - } - - public void onEmptyHandEntityInteract(EntityPlayer player, Entity entity) - { - - } - - public void onBoundSwordInteractWithEntity(EntityPlayer player, Entity entity) - { - - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java deleted file mode 100644 index bb021201..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java +++ /dev/null @@ -1,51 +0,0 @@ -package WayofTime.alchemicalWizardry.common.omega; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -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, helmet, chestPiece, leggings, boots, new ReagentRegenConfiguration(50, 1, 10)); - } - - @Override - public float getCostPerTickOfUse(EntityPlayer player) - { -// if(player.isBurning()) -// { -// return 0.5f; -// } - return 1; - } - - @Override - public void onUpdate(World world, EntityPlayer player, ItemStack stack) - { - if(world.getWorldTime() % 100 == 0 && !world.isRemote) - { - if(player.posY < 50 && player.getHealth() < player.getMaxHealth()) - { - player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, 0, true, false)); - } - } - - if(player.posY > 100) - { - player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, 200, 0, true, false)); - } - } - - @Override - public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack) - { - - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java deleted file mode 100644 index d4fd272a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java +++ /dev/null @@ -1,64 +0,0 @@ -package WayofTime.alchemicalWizardry.common.omega; - -import net.minecraft.block.material.Material; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -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, helmet, chestPiece, leggings, boots, new ReagentRegenConfiguration(50, 1, 10)); - } - - @Override - public float getCostPerTickOfUse(EntityPlayer player) - { - if(player.isBurning()) - { - return 0.5f; - } - return 1; - } - - @Override - public void onUpdate(World world, EntityPlayer player, ItemStack stack) - { - if(world.getWorldTime() % 100 == 0 && !world.isRemote) - { - boolean isInLava = player.isInsideOfMaterial(Material.lava); - if(player.isBurning() && player.getHealth() < player.getMaxHealth()) - { - player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, isInLava ? 1 : 0, true, false)); - } - - if(player.isBurning()) - { - player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, isInLava ? 400 : 200, isInLava ? 1 : 0, true, false)); - } - - if(player.isInWater()) - { - player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 200, 2, true, false)); - player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, 2, true, false)); - player.addPotionEffect(new PotionEffect(Potion.weakness.id, 200, 1, true, false)); - } - } - - if(player.isBurning()) - { - player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 200, 0, true, false)); - } - } - - @Override - public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack) - { - - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java deleted file mode 100644 index 80fda3d3..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java +++ /dev/null @@ -1,83 +0,0 @@ -package WayofTime.alchemicalWizardry.common.omega; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.BlockPos; -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, helmet, chestPiece, leggings, boots, new ReagentRegenConfiguration(50, 1, 10)); - } - - @Override - public float getCostPerTickOfUse(EntityPlayer player) - { - if(player.isInWater()) - { - return 0.5f; - }else - { - return 1; - } - } - - @Override - public void onUpdate(World world, EntityPlayer player, ItemStack stack) - { - player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 3, 0, true, false)); - player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionAmphibian.id, 3, 0, true, false)); - - if(world.getWorldTime() % 100 == 0 && !world.isRemote) - { - if(player.isInWater() && player.getHealth() < player.getMaxHealth()) - { - player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, 0, true, false)); - } - } - } - - @Override - public boolean getBlockEffectWhileInside(Entity entity, BlockPos pos) - { - if(entity instanceof EntityLivingBase) - { - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 100, 1, true, false)); - } - return true; - } - - @Override - public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack) - { - World world = player.worldObj; - - int x = (int) Math.round(player.posX); - int y = (int) Math.round(player.posY); - int z = (int) Math.round(player.posZ); - - int range = 3; - - for(int i=-range; i<=range; i++) - { - for(int j=-range; j<=range; j++) - { - for(int k=-range; k<=range; k++) - { - TEMimicBlock.createMimicBlockAtLocation(world, new BlockPos(x+i, y+j, z+k), 300, Blocks.water.getDefaultState(), ReagentRegistry.aquasalusReagent); - } - } - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java deleted file mode 100644 index 67ad78c8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.omega; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -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, helmet, chestPiece, leggings, boots, new ReagentRegenConfiguration(50, 1, 10)); - } - - @Override - public float getCostPerTickOfUse(EntityPlayer player) - { - if(player.isAirBorne) - { - return 0.5f; - }else - { - return 1; - } - } - - @Override - public void onUpdate(World world, EntityPlayer player, ItemStack stack) - { - 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, false)); - } - - player.fallDistance = 0; - } - - @Override - public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack) - { - - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaRegistry.java deleted file mode 100644 index 0f804337..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaRegistry.java +++ /dev/null @@ -1,42 +0,0 @@ -package WayofTime.alchemicalWizardry.common.omega; - -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) - { - omegaList.put(reagent, parad); - } - - public static OmegaParadigm getParadigmForReagent(Reagent reagent) - { - return omegaList.get(reagent); - } - - public static boolean hasParadigm(Reagent reagent) - { - return omegaList.containsKey(reagent); - } - - public static OmegaParadigm getOmegaParadigmOfWeilder(EntityPlayer player) - { - ItemStack[] armours = player.inventory.armorInventory; - - ItemStack chestStack = armours[2]; - - if(chestStack != null && chestStack.getItem() instanceof OmegaArmour) - { - return ((OmegaArmour)chestStack.getItem()).getOmegaParadigm(); - } - - return null; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java deleted file mode 100644 index 45561cf9..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java +++ /dev/null @@ -1,161 +0,0 @@ -package WayofTime.alchemicalWizardry.common.omega; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -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, BlockPos pos, 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 next to air blocks in question but is NOT air - - for (int i = 0; i < 2 * range + 1; i++) - { - for (int j = 0; j < 2 * range + 1; j++) - { - for (int k = 0; k < 2 * range + 1; k++) - { - boolList[i][j][k] = 0; - } - } - } - - boolList[range + offset.xCoord][range + offset.yCoord][range + offset.zCoord] = 1; - boolean isReady = false; - - while (!isReady) - { - isReady = true; - - for (int i = 0; i < 2 * range + 1; i++) - { - for (int j = 0; j < 2 * range + 1; j++) - { - for (int k = 0; k < 2 * range + 1; k++) - { - if (boolList[i][j][k] == 1) - { - BlockPos position = pos.add(i - range, j - range, k - range); - - for(EnumFacing face : EnumFacing.VALUES) - { - int iP = i + face.getFrontOffsetX(); - int jP = j + face.getFrontOffsetY(); - int kP = k + face.getFrontOffsetZ(); - - if(iP >= 0 && iP <= 2 * range && jP >= 0 && jP <= 2 * range && kP >= 0 && kP <= 2 * range && !(boolList[iP][jP][kP] == 1 || boolList[iP][jP][kP] == -1)) - { - BlockPos newPos = position.add(face.getDirectionVec()); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - if (world.isAirBlock(newPos) || block == ModBlocks.blockSpectralContainer) - { - if(iP == 0 && iP == 2 * range && jP == 0 && jP == 2 * range && kP == 0 && kP == 2 * range) - { - return emptyParam; - } - boolList[iP][jP][kP] = 1; - isReady = false; - }else - { - boolList[iP][jP][kP] = -1; - } - } - } - } - } - } - } - } - - int tally = 0; - int enchantability = 0; - int enchantmentLevel = 0; - - for (int i = 0; i < 2 * range + 1; i++) - { - for (int j = 0; j < 2 * range + 1; j++) - { - for (int k = 0; k < 2 * range + 1; k++) - { - if (boolList[i][j][k] != -1) - { - continue; - } - - int indTally = 0; - - if (i - 1 >= 0 && boolList[i - 1][j][k] == 1) - { - indTally++; - } - - if (j - 1 >= 0 && boolList[i][j - 1][k] == 1) - { - indTally++; - } - - if (k - 1 >= 0 && boolList[i][j][k - 1] == 1) - { - indTally++; - } - - if (i + 1 <= 2 * range && boolList[i + 1][j][k] == 1) - { - indTally++; - } - - if (j + 1 <= 2 * range && boolList[i][j + 1][k] == 1) - { - indTally++; - } - - if (k + 1 <= 2 * range && boolList[i][j][k + 1] == 1) - { - indTally++; - } - - BlockPos newPos = pos.add(i - range, j - range, k - range); - - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - int meta = block.getMetaFromState(state); - - if(block instanceof IEnchantmentGlyph) - { - tally += ((IEnchantmentGlyph)block).getAdditionalStabilityForFaceCount(world, newPos, meta, indTally); - enchantability += ((IEnchantmentGlyph)block).getEnchantability(world, newPos, meta); - enchantmentLevel += ((IEnchantmentGlyph)block).getEnchantmentLevel(world, newPos, meta); - }else if(block instanceof IStabilityGlyph) - { - tally += ((IStabilityGlyph)block).getAdditionalStabilityForFaceCount(world, newPos, meta, indTally); - }else - { - tally += indTally; - } - } - } - } - - return new OmegaStructureParameters(tally, enchantability, enchantmentLevel); - } - - public static OmegaStructureParameters getStructureStabilityFactor(World world, BlockPos pos, int expLim) - { - return getStructureStabilityFactor(world, pos, expLim, new Int3(0, 0, 0)); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureParameters.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureParameters.java deleted file mode 100644 index 2ecd32c4..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureParameters.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.alchemicalWizardry.common.omega; - -public class OmegaStructureParameters -{ - public final int stability; - public final int enchantability; - public final int enchantmentLevel; - - public OmegaStructureParameters(int stability, int enchantability, int enchantmentLevel) - { - this.stability = stability; - this.enchantability = enchantability; - this.enchantmentLevel = enchantmentLevel; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/ReagentRegenConfiguration.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/ReagentRegenConfiguration.java deleted file mode 100644 index 0c6d4df1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/ReagentRegenConfiguration.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.alchemicalWizardry.common.omega; - -public class ReagentRegenConfiguration -{ - public int tickRate; - public int healPerTick; - public float costPerPoint; - - public ReagentRegenConfiguration(int tickRate, int healPerTick, float costPerPoint) - { - this.tickRate = tickRate; - this.healPerTick = healPerTick; - this.costPerPoint = costPerPoint; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBloodMagic.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBloodMagic.java deleted file mode 100644 index 4b86628d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBloodMagic.java +++ /dev/null @@ -1,19 +0,0 @@ -package WayofTime.alchemicalWizardry.common.potion; - -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; - -public class PotionBloodMagic extends Potion -{ - public PotionBloodMagic(int par1, boolean par2, int par3) - { - super(par1, new ResourceLocation("speed"),par2, par3); - } - - @Override - public Potion setIconIndex(int par1, int par2) - { - super.setIconIndex(par1, par2); - return this; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java deleted file mode 100644 index 29185083..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java +++ /dev/null @@ -1,88 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer; - -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; -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 int colourRed; - private int colourGreen; - private int colourBlue; - private int colourIntensity; - private double xOffset; - private double yOffset; - private double zOffset; - private double radius; - 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) - { - this.resourceLocation = resource; - this.colourRed = red; - this.colourGreen = green; - this.colourBlue = blue; - this.colourIntensity = intensity; - this.xOffset = xOff; - this.initialY = initialY; - this.yOffset = yOff; - this.zOffset = zOff; - this.radius = radius; - this.renderWithoutReagents = renderWithoutReagents; - } - - @Override - public void renderAt(IMasterRitualStone tile, double x, double y, double z) - { - if (tile.areTanksEmpty() && !renderWithoutReagents) - { - return; - } - - GL11.glPushMatrix(); - Tessellator tessellator = Tessellator.getInstance(); - this.bindTexture(resourceLocation); - GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); - GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_CULL_FACE); -// GL11.glEnable(GL11.GL_BLEND); -// GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - -// GL11.glDepthMask(false); - - WorldRenderer wr = tessellator.getWorldRenderer(); - wr.startDrawingQuads(); - wr.func_178961_b(colourRed, colourGreen, colourBlue, colourIntensity); - - GL11.glTranslated(x + 0.5 + xOffset, y + 0.5 + (yOffset - initialY) * (tile.getRunningTime() / 100d) + initialY, z + 0.5 + zOffset); - - float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL); - - GL11.glRotatef(rotationAngle, 0F, 1F, 0F); //Rotate on planar axis -// tessellator.setBrightness(240); - - double finalRadius = (radius) * (tile.getRunningTime() / 100d); - - wr.addVertexWithUV(-finalRadius, 0, -finalRadius, 0.0d, 0.0d); - wr.addVertexWithUV(finalRadius, 0, -finalRadius, 1.0d, 0.0d); - wr.addVertexWithUV(finalRadius, 0, finalRadius, 1.0d, 1.0d); - wr.addVertexWithUV(-finalRadius, 0, finalRadius, 0.0d, 1.0d); - - tessellator.draw(); - -// GL11.glDepthMask(true); - - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_TEXTURE_2D); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - GL11.glPopMatrix(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicalCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicalCalcinator.java deleted file mode 100644 index defed192..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicalCalcinator.java +++ /dev/null @@ -1,201 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block; - -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - -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; - -public class RenderAlchemicalCalcinator extends TileEntitySpecialRenderer -{ - private final RenderItem customRenderItem; - private ModelAlchemicalCalcinator modelConduit = new ModelAlchemicalCalcinator(); - - private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/Reagent.png"); - - public RenderAlchemicalCalcinator() - { - customRenderItem = Minecraft.getMinecraft().getRenderItem(); - } - - @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) - { - if (tileEntity instanceof TEAlchemicalCalcinator) - { - TEAlchemicalCalcinator tileAltar = (TEAlchemicalCalcinator) tileEntity; - - GL11.glPushMatrix(); - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); - ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/AlchemicalCalcinator.png"); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); - GL11.glPushMatrix(); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelConduit.render(null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - - GL11.glPushMatrix(); - - if (tileAltar.getStackInSlot(1) != null) - { - float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(1)); - EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); - ghostEntityItem.hoverStart = 0.0F; - ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(1)); - float displacement = 0.2F; - - if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) - { - 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.0625f * 2f); - } - GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); - - if (!(ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock)) - { - GL11.glRotatef(90f, 1.0f, 0.0f, 0.0F); - } - - customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel - } - - - GL11.glPopMatrix(); - GL11.glPushMatrix(); - - if (tileAltar.getStackInSlot(0) != null) - { - float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0)); - EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); - ghostEntityItem.hoverStart = 0.0F; - ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0)); - float displacement = -0.5F; - - if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) - { - 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.0625f * 2f); - } - GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); - - if (!(ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock)) - { - GL11.glRotatef(90f, 1.0f, 0.0f, 0.0F); - } - - customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel - } - - GL11.glPopMatrix(); - - - ReagentContainerInfo[] info = tileAltar.getContainerInfo(EnumFacing.UP); - if (info.length >= 1 && info[0] != null) - { - ReagentStack reagentStack = info[0].reagent; - int capacity = info[0].capacity; - if (reagentStack != null && reagentStack.reagent != null) - { - Reagent reagent = reagentStack.reagent; - this.renderTankContents(d0, d1, d2, reagent.getColourRed(), reagent.getColourGreen(), reagent.getColourBlue(), 200 * reagentStack.amount / capacity); - } - } - } - } - - private void renderTankContents(double x, double y, double z, int colourRed, int colourGreen, int colourBlue, int colourIntensity) - { - GL11.glPushMatrix(); - Tessellator tessellator = Tessellator.getInstance(); - this.bindTexture(resourceLocation); - GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); - GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_CULL_FACE); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - - GL11.glDepthMask(false); - - WorldRenderer wr = tessellator.getWorldRenderer(); - wr.startDrawingQuads(); - wr.func_178961_b(colourRed, colourGreen, colourBlue, colourIntensity); //setCoulourRGBA - GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5); - wr.func_178963_b(240); //setBrightness - - double x1 = -7d / 16d; - double x2 = 7d / 16d; - double y1 = 1d / 16d; - double y2 = 5d / 16d; - double z1 = -7d / 16d; - double z2 = 7d / 16d; - - double resx1 = 0.0d; - double resx2 = 0.0d; - double resy1 = 1.0d; - double resy2 = 1.0d; - - wr.addVertexWithUV(x1, y1, z1, resx1, resy1); - wr.addVertexWithUV(x2, y1, z1, resx2, resy1); - wr.addVertexWithUV(x2, y2, z1, resx2, resy2); - wr.addVertexWithUV(x1, y2, z1, resx1, resy2); - wr.addVertexWithUV(x1, y1, z1, resx1, resy1); - wr.addVertexWithUV(x1, y1, z2, resx2, resy1); - wr.addVertexWithUV(x1, y2, z2, resx2, resy2); - wr.addVertexWithUV(x1, y2, z1, resx1, resy2); - wr.addVertexWithUV(x1, y1, z2, resx1, resy1); - wr.addVertexWithUV(x2, y1, z2, resx2, resy1); - wr.addVertexWithUV(x2, y2, z2, resx2, resy2); - wr.addVertexWithUV(x1, y2, z2, resx1, resy2); - wr.addVertexWithUV(x2, y1, z1, resx1, resy1); - wr.addVertexWithUV(x2, y1, z2, resx2, resy1); - wr.addVertexWithUV(x2, y2, z2, resx2, resy2); - wr.addVertexWithUV(x2, y2, z1, resx1, resy2); - tessellator.draw(); - - GL11.glDepthMask(true); - - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_TEXTURE_2D); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - GL11.glPopMatrix(); - } - - private float getGhostItemScaleFactor(ItemStack itemStack) - { - float scaleFactor = 1.5F; - - if (itemStack != null) - { - if (itemStack.getItem() instanceof ItemBlock) - { - return 0.90F * scaleFactor; - } else - { - return 0.65F * scaleFactor; - } - } - - return scaleFactor; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAltar.java deleted file mode 100644 index 6f1294a2..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAltar.java +++ /dev/null @@ -1,80 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; - -public class RenderAltar extends TileEntitySpecialRenderer -{ - private ModelBloodAltar modelBloodAltar = new ModelBloodAltar(); - private final RenderItem customRenderItem; - - public RenderAltar() - { - customRenderItem = Minecraft.getMinecraft().getRenderItem(); - } - - @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) - { - modelBloodAltar.renderBloodAltar((TEAltar) tileEntity, d0, d1, d2); - modelBloodAltar.renderBloodLevel((TEAltar) tileEntity, d0, d1, d2); - - if (tileEntity instanceof TEAltar) - { - TEAltar tileAltar = (TEAltar) tileEntity; - GL11.glPushMatrix(); - - if (tileAltar.getStackInSlot(0) != null) - { - float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0)); - float rotationAngle = Minecraft.getMinecraft().gameSettings.fancyGraphics ? (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL) : 0; - EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); - ghostEntityItem.hoverStart = 0.0F; - ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0)); - float displacement = 0.2F; - - if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) - { - 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 + 0.6F, (float) d2 + 0.5F); - } - GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); - GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F); - customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel - } - - GL11.glPopMatrix(); - } - } - - private float getGhostItemScaleFactor(ItemStack itemStack) - { - float scaleFactor = 1.0F; - - if (itemStack != null) - { - if (itemStack.getItem() instanceof ItemBlock) - { - return 0.9f; - } else - { - return 0.65f; - } - } - - return scaleFactor; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderChemistrySet.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderChemistrySet.java deleted file mode 100644 index cc3aa790..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderChemistrySet.java +++ /dev/null @@ -1,166 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block; - -import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelChemistrySet; - -public class RenderChemistrySet extends TileEntitySpecialRenderer -{ - private ModelChemistrySet modelChemistrySet = new ModelChemistrySet(); - private final RenderItem customRenderItem; - - public RenderChemistrySet() - { - customRenderItem = Minecraft.getMinecraft().getRenderItem(); - } - - @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int a) - { - if (tileEntity instanceof TEChemistrySet) - { - TEChemistrySet tileAltar = (TEChemistrySet) tileEntity; - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPushMatrix(); - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); - ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/WritingTable.png"); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); - GL11.glPushMatrix(); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelChemistrySet.render(null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - - for (int i = 1; i <= 6; i++) - { - GL11.glPushMatrix(); - GL11.glEnable(GL11.GL_LIGHTING); - if (tileAltar.getStackInSlot(i) != null) - { - float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(i)); - float rotationAngle = Minecraft.getMinecraft().gameSettings.fancyGraphics ? (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL) : 0; - EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); - ghostEntityItem.hoverStart = 0.0F; - ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(i)); - float displacementX = getXDisplacementForSlot(i); - float displacementY = getYDisplacementForSlot(i); - float displacementZ = getZDisplacementForSlot(i); - - if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) - { - GL11.glTranslatef((float) d0 + 0.5F + displacementX, (float) d1 + displacementY + 0.7F, (float) d2 + 0.5F + displacementZ); - } else - { - GL11.glTranslatef((float) d0 + 0.5F + displacementX, (float) d1 + displacementY + 0.6F, (float) d2 + 0.5F + displacementZ); - } - GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); - GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F); - customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel - } - - GL11.glPopMatrix(); - } - } - } - - private float getGhostItemScaleFactor(ItemStack itemStack) - { - float scaleFactor = 0.8F; - - if (itemStack != null) - { - if (itemStack.getItem() instanceof ItemBlock) - { - return 0.9f * scaleFactor; - } else - { - return 0.65F * scaleFactor; - } - } - - return scaleFactor; - } - - private float getXDisplacementForSlot(int slot) - { - switch (slot) - { - case 0: - return 0.0f; - - case 1: - return -0.375f; - - case 2: - return -0.125f; - - case 3: - return 0.3125f; - - case 4: - return 0.3125f; - - case 5: - return -0.125f; - - default: - return 0.0f; - } - } - - private float getYDisplacementForSlot(int slot) - { - switch (slot) - { - case 0: - return 0.4f; - - case 1: - return -0.35f; - - case 6: - return 0.4f; - - default: - return -0.35f; - } - } - - private float getZDisplacementForSlot(int slot) - { - switch (slot) - { - case 0: - return 0.0f; - - case 1: - return 0.0f; - - case 2: - return 0.375f; - - case 3: - return 0.25f; - - case 4: - return -0.25f; - - case 5: - return -0.375f; - - default: - return 0.0f; - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java deleted file mode 100644 index 2eb6d20a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java +++ /dev/null @@ -1,34 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block; - -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelConduit; -import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; - -public class RenderConduit extends TileEntitySpecialRenderer -{ - private ModelConduit modelConduit = new ModelConduit(); - - @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) - { - if (tileEntity instanceof TEConduit) - { - TEConduit tileConduit = (TEConduit) tileEntity; - GL11.glPushMatrix(); - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 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(null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileConduit.getInputDirection(), tileConduit.getOutputDirection()); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java deleted file mode 100644 index 2330212b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java +++ /dev/null @@ -1,115 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block; - -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - -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; - -public class RenderCrystalBelljar extends TileEntitySpecialRenderer -{ - private ModelCrystalBelljar modelConduit = new ModelCrystalBelljar(); - - private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/Reagent.png"); - - @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) - { - if (tileEntity instanceof TEBelljar) - { - TEBelljar tileAltar = (TEBelljar) tileEntity; - GL11.glPushMatrix(); - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); - ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/CrystalBelljar.png"); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); - GL11.glPushMatrix(); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelConduit.render(null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - - ReagentContainerInfo[] info = tileAltar.getContainerInfo(EnumFacing.UP); - if (info.length >= 1 && info[0] != null) - { - ReagentStack reagentStack = info[0].reagent; - int capacity = info[0].capacity; - if (reagentStack != null && reagentStack.reagent != null) - { - Reagent reagent = reagentStack.reagent; - this.renderTankContents(d0, d1, d2, reagent.getColourRed(), reagent.getColourGreen(), reagent.getColourBlue(), 200 * reagentStack.amount / capacity); - } - } - } - } - - private void renderTankContents(double x, double y, double z, int colourRed, int colourGreen, int colourBlue, int colourIntensity) - { - GL11.glPushMatrix(); - Tessellator tessellator = Tessellator.getInstance(); - this.bindTexture(resourceLocation); - GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); - GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_CULL_FACE); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - GL11.glDepthMask(false); - WorldRenderer wr = tessellator.getWorldRenderer(); - wr.startDrawingQuads(); - wr.func_178961_b(colourRed, colourGreen, colourBlue, colourIntensity); //setColourRGBA - GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5); - wr.func_178963_b(240); //setBrightness - - double x1 = -4d / 16d; - double x2 = 4d / 16d; - double y1 = -6d / 16d; - double y2 = 4d / 16d; - double z1 = -4d / 16d; - double z2 = 4d / 16d; - - double resx1 = 0.0d; - double resx2 = 0.0d; - double resy1 = 1.0d; - double resy2 = 1.0d; - - wr.addVertexWithUV(x1, y1, z1, resx1, resy1); - wr.addVertexWithUV(x2, y1, z1, resx2, resy1); - wr.addVertexWithUV(x2, y2, z1, resx2, resy2); - wr.addVertexWithUV(x1, y2, z1, resx1, resy2); - wr.addVertexWithUV(x1, y1, z1, resx1, resy1); - wr.addVertexWithUV(x1, y1, z2, resx2, resy1); - wr.addVertexWithUV(x1, y2, z2, resx2, resy2); - wr.addVertexWithUV(x1, y2, z1, resx1, resy2); - wr.addVertexWithUV(x1, y1, z2, resx1, resy1); - wr.addVertexWithUV(x2, y1, z2, resx2, resy1); - wr.addVertexWithUV(x2, y2, z2, resx2, resy2); - wr.addVertexWithUV(x1, y2, z2, resx1, resy2); - wr.addVertexWithUV(x2, y1, z1, resx1, resy1); - wr.addVertexWithUV(x2, y1, z2, resx2, resy1); - wr.addVertexWithUV(x2, y2, z2, resx2, resy2); - wr.addVertexWithUV(x2, y2, z1, resx1, resy2); - wr.addVertexWithUV(x1, y2, z1, resx1, resy1); - wr.addVertexWithUV(x2, y2, z1, resx2, resy1); - wr.addVertexWithUV(x2, y2, z2, resx2, resy2); - wr.addVertexWithUV(x1, y2, z2, resx1, resy2); - tessellator.draw(); - - GL11.glDepthMask(true); - - GL11.glEnable(GL11.GL_CULL_FACE); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_TEXTURE_2D); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - GL11.glPopMatrix(); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderMasterStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderMasterStone.java deleted file mode 100644 index 8ef4f8ff..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderMasterStone.java +++ /dev/null @@ -1,25 +0,0 @@ -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; - -public class RenderMasterStone extends TileEntitySpecialRenderer -{ - @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) - { - if (tileEntity instanceof TEMasterStone) - { - String str = ((TEMasterStone) tileEntity).getCurrentRitual(); - MRSRenderer renderer = Rituals.getRendererForKey(str); - - if (renderer != null) - { - renderer.renderAt(((TEMasterStone) tileEntity), d0, d1, d2); - } - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java deleted file mode 100644 index 21e05777..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java +++ /dev/null @@ -1,97 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelPedestal; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; - -public class RenderPedestal extends TileEntitySpecialRenderer -{ - private ModelPedestal modelPedestal = new ModelPedestal(); - private final RenderItem customRenderItem; - - public RenderPedestal() - { - customRenderItem = Minecraft.getMinecraft().getRenderItem(); - } - - @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) - { - if (tileEntity instanceof TEPedestal) - { - TEPedestal tileAltar = (TEPedestal) tileEntity; - GL11.glPushMatrix(); - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); - ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/Pedestal.png"); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); - GL11.glPushMatrix(); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelPedestal.render(null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - GL11.glPushMatrix(); - - if (tileAltar.getStackInSlot(0) != null) - { - float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0)); - float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL); - EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); - ghostEntityItem.hoverStart = 0.0F; - ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0)); - float displacement = 0.2F; - - if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) - { - 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 + 0.6F, (float) d2 + 0.5F); - } - GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); - GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F); - customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel - } - - GL11.glPopMatrix(); - - - GL11.glPushMatrix(); - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); - - FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); - GL11.glPushMatrix(); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - } - } - - private float getGhostItemScaleFactor(ItemStack itemStack) - { - float scaleFactor = 1.0F; - - if (itemStack != null) - { - if (itemStack.getItem() instanceof ItemBlock) - { - return 0.9f; - } else - { - return 0.65f; - } - } - - return scaleFactor; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java deleted file mode 100644 index 759c6e97..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java +++ /dev/null @@ -1,91 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelPlinth; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; - -public class RenderPlinth extends TileEntitySpecialRenderer -{ - private ModelPlinth modelPlinth = new ModelPlinth(); - private final RenderItem customRenderItem; - - public RenderPlinth() - { - customRenderItem = Minecraft.getMinecraft().getRenderItem(); - } - - @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) - { - if (tileEntity instanceof TEPlinth) - { - TEPlinth tileAltar = (TEPlinth) tileEntity; - GL11.glPushMatrix(); - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); - ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/Plinth.png"); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); - GL11.glPushMatrix(); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelPlinth.render(null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - GL11.glPushMatrix(); - - if (tileAltar.getStackInSlot(0) != null) - { - float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0)); - EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); - ghostEntityItem.hoverStart = 0.0F; - ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0)); - float displacement = 0.2F; - - if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) - { - 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); - } - GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); - - if (!(ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock)) - { - GL11.glRotatef(90f, 1.0f, 0.0f, 0.0F); - } - - customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel - } - - GL11.glPopMatrix(); - } - } - - private float getGhostItemScaleFactor(ItemStack itemStack) - { - float scaleFactor = 2.0F / 0.9F; - - if (itemStack != null) - { - if (itemStack.getItem() instanceof ItemBlock) - { - return 0.9f * scaleFactor; - } else - { - return 0.65f * scaleFactor; - } - } - - return scaleFactor; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderReagentConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderReagentConduit.java deleted file mode 100644 index 6fbd6266..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderReagentConduit.java +++ /dev/null @@ -1,62 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block; - -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -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"); - - @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) - { - if (tileEntity instanceof TEReagentConduit) - { - int renderCount = ((TEReagentConduit) tileEntity).renderCount; - BlockPos pos = tileEntity.getPos(); - float key1 = (pos.getX() * 54f - pos.getY() * 38.72f + pos.getZ() * 10.432f); - float key2 = (pos.getX() * 21.43f - pos.getY() * 9.96f + pos.getZ() * 12.8f); - Int3 colourMap = ((TEReagentConduit) tileEntity).getColour(); - GL11.glPushMatrix(); - Tessellator tessellator = Tessellator.getInstance(); - WorldRenderer wr = tessellator.getWorldRenderer(); - this.bindTexture(field_110629_a); - GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); - GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_CULL_FACE); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - GL11.glDepthMask(false); - wr.startDrawingQuads(); - wr.func_178961_b(colourMap.xCoord, colourMap.yCoord, colourMap.zCoord, 200); - GL11.glTranslated(d0 + 0.5, d1 + 0.5, d2 + 0.5); - GL11.glRotatef(tileEntity.getWorld().getWorldTime() / 3.0f, 0F, 1F, 0F); //Rotate on planar axis - GL11.glRotatef(renderCount + key1, 0F, 0F, 1F); //Rotate vertical axis - GL11.glRotatef(renderCount * 2f + key2, 1F, 0F, 0F); //Rotate cylindrically - wr.func_178963_b(240); - wr.addVertexWithUV(-0.5d, 0, -0.5d, 0.0d, 0.0d); - wr.addVertexWithUV(0.5d, 0, -0.5d, 1.0d, 0.0d); - wr.addVertexWithUV(0.5d, 0, 0.5d, 1.0d, 1.0d); - wr.addVertexWithUV(-0.5d, 0, 0.5d, 0.0d, 1.0d); - - tessellator.draw(); - - GL11.glDepthMask(true); - - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_TEXTURE_2D); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - GL11.glPopMatrix(); - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEffectBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEffectBlock.java deleted file mode 100644 index e1209166..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEffectBlock.java +++ /dev/null @@ -1,38 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block; - -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEffectBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock; - -public class RenderSpellEffectBlock extends TileEntitySpecialRenderer -{ - private ModelSpellEffectBlock modelSpellEffectBlock = new ModelSpellEffectBlock(); - - @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) - { - if (tileEntity instanceof TESpellEffectBlock) - { - TESpellEffectBlock tileSpellBlock = (TESpellEffectBlock) tileEntity; - GL11.glPushMatrix(); - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); - ResourceLocation test; - int meta = tileEntity.getBlockMetadata(); - String resource = tileSpellBlock.getResourceLocationForMeta(meta); - test = new ResourceLocation(resource); - - FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); - GL11.glPushMatrix(); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelSpellEffectBlock.render(null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileSpellBlock.getInputDirection(), tileSpellBlock.getOutputDirection()); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEnhancementBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEnhancementBlock.java deleted file mode 100644 index d07bf185..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEnhancementBlock.java +++ /dev/null @@ -1,38 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block; - -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; - -public class RenderSpellEnhancementBlock extends TileEntitySpecialRenderer -{ - private ModelSpellEnhancementBlock modelSpellEnhancementBlock = new ModelSpellEnhancementBlock(); - - @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) - { - if (tileEntity instanceof TESpellEnhancementBlock) - { - TESpellEnhancementBlock tileSpellBlock = (TESpellEnhancementBlock) tileEntity; - GL11.glPushMatrix(); - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); - ResourceLocation test; - int meta = tileEntity.getBlockMetadata(); - String resource = tileSpellBlock.getResourceLocationForMeta(meta); - test = new ResourceLocation(resource); - - FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); - GL11.glPushMatrix(); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelSpellEnhancementBlock.render(null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileSpellBlock.getInputDirection(), tileSpellBlock.getOutputDirection()); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellModifierBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellModifierBlock.java deleted file mode 100644 index 84264019..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellModifierBlock.java +++ /dev/null @@ -1,38 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block; - -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellModifierBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; - -public class RenderSpellModifierBlock extends TileEntitySpecialRenderer -{ - private ModelSpellModifierBlock modelSpellModifierBlock = new ModelSpellModifierBlock(); - - @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) - { - if (tileEntity instanceof TESpellModifierBlock) - { - TESpellModifierBlock tileSpellBlock = (TESpellModifierBlock) tileEntity; - GL11.glPushMatrix(); - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); - ResourceLocation test; - int meta = tileEntity.getBlockMetadata(); - String resource = tileSpellBlock.getResourceLocationForMeta(meta); - test = new ResourceLocation(resource); - - FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); - GL11.glPushMatrix(); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelSpellModifierBlock.render(null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileSpellBlock.getInputDirection(), tileSpellBlock.getOutputDirection()); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellParadigmBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellParadigmBlock.java deleted file mode 100644 index df39cd1e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellParadigmBlock.java +++ /dev/null @@ -1,38 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block; - -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellParadigmBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; - -public class RenderSpellParadigmBlock extends TileEntitySpecialRenderer -{ - private ModelSpellParadigmBlock modelSpellParadigmBlock = new ModelSpellParadigmBlock(); - - @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) - { - if (tileEntity instanceof TESpellParadigmBlock) - { - TESpellParadigmBlock tileSpellBlock = (TESpellParadigmBlock) tileEntity; - GL11.glPushMatrix(); - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); - ResourceLocation test; - int meta = tileEntity.getBlockMetadata(); - String resource = tileSpellBlock.getResourceLocationForMeta(meta); - test = new ResourceLocation(resource); - - FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); - GL11.glPushMatrix(); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelSpellParadigmBlock.render(null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileSpellBlock.getInputDirection(), tileSpellBlock.getOutputDirection()); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - } - } -} \ No newline at end of file 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 deleted file mode 100644 index 48ec3a48..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAlchemicalCalcinatorItemRenderer.java +++ /dev/null @@ -1,78 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelAlchemicalCalcinator; - -public class TEAlchemicalCalcinatorItemRenderer implements IItemRenderer -{ - private ModelAlchemicalCalcinator modelConduit = new ModelAlchemicalCalcinator(); - - private void renderConduitItem(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"); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); - GL11.glPushMatrix(); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelConduit.render(null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - } - - /** - * IItemRenderer implementation * - */ - @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { - switch (type) - { - case ENTITY: - return true; - case EQUIPPED: - return true; - case EQUIPPED_FIRST_PERSON: - return true; - case INVENTORY: - return true; - default: - return false; - } - } - - - @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - return true; - } - - - @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - switch (type) - { - case ENTITY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); - break; - case EQUIPPED: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); - break; - case EQUIPPED_FIRST_PERSON: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); - break; - case INVENTORY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); - break; - default: - } - } -} 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 deleted file mode 100644 index dd3385fe..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAltarItemRenderer.java +++ /dev/null @@ -1,68 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar; - -public class TEAltarItemRenderer implements IItemRenderer -{ - private ModelBloodAltar modelBloodAltar; - - public TEAltarItemRenderer() - { - modelBloodAltar = new ModelBloodAltar(); - } - - @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { - return true; - } - - @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - return true; - } - - @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - float scale = 0.08f; - switch (type) - { - case ENTITY: - renderBloodAltar(item, 0, 0, 0, scale); - break; - case EQUIPPED: - renderBloodAltar(item, 0, 0, 0.5f, scale); - break; - case EQUIPPED_FIRST_PERSON: - renderBloodAltar(item, +0.5f, 0.5f, +0.5f, scale); - break; - case INVENTORY: - renderBloodAltar(item, -0.5f, -0.75f, -0.5f, scale); - break; - - default: - return; - } - } - - private void renderBloodAltar(ItemStack item, float x, float y, float z, float scale) - { - GL11.glPushMatrix(); - GL11.glTranslatef(x, y, z); - GL11.glScalef(scale, scale, scale); - GL11.glRotatef(180f, 0f, 1f, 0f); - ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/altar.png"); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); - modelBloodAltar.renderBloodAltar(); - GL11.glPopMatrix(); - } -} 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 deleted file mode 100644 index 4c35bb2c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java +++ /dev/null @@ -1,180 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; - -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.fml.client.FMLClientHandler; - -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; - -public class TEBellJarItemRenderer implements IItemRenderer -{ - private ModelCrystalBelljar modelConduit = new ModelCrystalBelljar(); - private ResourceLocation mainResource = new ResourceLocation("alchemicalwizardry:textures/models/CrystalBelljar.png"); - private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/Reagent.png"); - - private void renderConduitItem(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); - GL11.glPushMatrix(); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelConduit.renderSpecialItem((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, 0); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - - ReagentContainerInfo[] info = TEBelljar.getContainerInfoFromItem(item); - if (info.length >= 1 && info[0] != null) - { - ReagentStack reagentStack = info[0].reagent; - int capacity = info[0].capacity; - if (reagentStack != null && reagentStack.reagent != null) - { - Reagent reagent = reagentStack.reagent; - this.renderTankContents(translateX, translateY, translateZ, reagent.getColourRed(), reagent.getColourGreen(), reagent.getColourBlue(), 200 * reagentStack.amount / capacity); - } - } - - GL11.glEnable(GL11.GL_BLEND); - GL11.glEnable(GL11.GL_CULL_FACE); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - - GL11.glPushMatrix(); - GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(mainResource); - GL11.glPushMatrix(); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelConduit.renderSpecialItem((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, 1); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - - GL11.glDisable(GL11.GL_CULL_FACE); - GL11.glDisable(GL11.GL_BLEND); - } - - private void renderTankContents(double x, double y, double z, int colourRed, int colourGreen, int colourBlue, int colourIntensity) - { - GL11.glPushMatrix(); - Tessellator tessellator = Tessellator.getInstance(); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(resourceLocation); - GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); - GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_CULL_FACE); - GL11.glEnable(GL11.GL_TEXTURE_2D); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - - GL11.glDepthMask(false); - - WorldRenderer wr = tessellator.getWorldRenderer(); - wr.startDrawingQuads(); - wr.func_178961_b(colourRed, colourGreen, colourBlue, colourIntensity); - - GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5); - - wr.func_178963_b(240); - - double x1 = -4d / 16d; - double x2 = 4d / 16d; - double y1 = -6d / 16d; - double y2 = 4d / 16d; - double z1 = -4d / 16d; - double z2 = 4d / 16d; - - double resx1 = 0.0d; - double resx2 = 0.0d; - double resy1 = 1.0d; - double resy2 = 1.0d; - - wr.addVertexWithUV(x1, y1, z1, resx1, resy1); - wr.addVertexWithUV(x2, y1, z1, resx2, resy1); - wr.addVertexWithUV(x2, y2, z1, resx2, resy2); - wr.addVertexWithUV(x1, y2, z1, resx1, resy2); - wr.addVertexWithUV(x1, y1, z1, resx1, resy1); - wr.addVertexWithUV(x1, y1, z2, resx2, resy1); - wr.addVertexWithUV(x1, y2, z2, resx2, resy2); - wr.addVertexWithUV(x1, y2, z1, resx1, resy2); - wr.addVertexWithUV(x1, y1, z2, resx1, resy1); - wr.addVertexWithUV(x2, y1, z2, resx2, resy1); - wr.addVertexWithUV(x2, y2, z2, resx2, resy2); - wr.addVertexWithUV(x1, y2, z2, resx1, resy2); - wr.addVertexWithUV(x2, y1, z1, resx1, resy1); - wr.addVertexWithUV(x2, y1, z2, resx2, resy1); - wr.addVertexWithUV(x2, y2, z2, resx2, resy2); - wr.addVertexWithUV(x2, y2, z1, resx1, resy2); - wr.addVertexWithUV(x1, y2, z1, resx1, resy1); - wr.addVertexWithUV(x2, y2, z1, resx2, resy1); - wr.addVertexWithUV(x2, y2, z2, resx2, resy2); - wr.addVertexWithUV(x1, y2, z2, resx1, resy2); - tessellator.draw(); - - GL11.glDepthMask(true); - - GL11.glEnable(GL11.GL_CULL_FACE); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_TEXTURE_2D); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - GL11.glPopMatrix(); - } - - /** - * IItemRenderer implementation * - */ - @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { - switch (type) - { - case ENTITY: - return true; - case EQUIPPED: - return true; - case EQUIPPED_FIRST_PERSON: - return true; - case INVENTORY: - return true; - default: - return false; - } - } - - - @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - return true; - } - - - @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - switch (type) - { - case ENTITY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); - break; - case EQUIPPED: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); - break; - case EQUIPPED_FIRST_PERSON: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); - break; - case INVENTORY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); - break; - default: - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEChemistrySetItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEChemistrySetItemRenderer.java deleted file mode 100644 index 2292f83b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEChemistrySetItemRenderer.java +++ /dev/null @@ -1,78 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; - -import net.minecraft.entity.Entity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelChemistrySet; - -public class TEChemistrySetItemRenderer implements IItemRenderer -{ - private ModelChemistrySet model; - - public TEChemistrySetItemRenderer() - { - model = new ModelChemistrySet(); - } - - @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { - return true; - } - - @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - return true; - } - - @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - float scale = 0.08f; - switch (type) - { - case ENTITY: - { - renderBloodAltar(0f, 0f, 0f, scale); - return; - } - - case EQUIPPED: - { - renderBloodAltar(0f, 0f, 0f, scale); - return; - } - - case INVENTORY: - { - renderBloodAltar(0f, -0.25f, 0f, scale); - return; - } - - default: - return; - } - } - - private void renderBloodAltar(float x, float y, float z, float scale) - { - GL11.glPushMatrix(); - // Disable Lighting Calculations - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glTranslatef(x, y, z); - GL11.glScalef(scale, scale, scale); - GL11.glRotatef(180f, 0f, 1f, 0f); - ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/WritingTable.png"); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); - model.render((Entity) null, 0, 0, 0, 0, 0, 0); - // Re-enable Lighting Calculations - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); - } -} \ No newline at end of file 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 deleted file mode 100644 index 6044f3dd..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEConduitItemRenderer.java +++ /dev/null @@ -1,82 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; - -import net.minecraft.entity.Entity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelConduit; - -@SuppressWarnings("deprecation") -public class TEConduitItemRenderer implements IItemRenderer -{ - private ModelConduit modelConduit = new ModelConduit(); - - private void renderConduitItem(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, EnumFacing.DOWN, EnumFacing.UP); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - } - - - /** - * IItemRenderer implementation * - */ - @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { - switch (type) - { - case ENTITY: - return true; - case EQUIPPED: - return true; - case EQUIPPED_FIRST_PERSON: - return true; - case INVENTORY: - return true; - default: - return false; - } - } - - - @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - return true; - } - - - @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - switch (type) - { - case ENTITY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); - break; - case EQUIPPED: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); - break; - case EQUIPPED_FIRST_PERSON: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); - break; - case INVENTORY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); - break; - default: - } - } -} \ No newline at end of file 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 deleted file mode 100644 index a6d25c4a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEffectBlockItemRenderer.java +++ /dev/null @@ -1,98 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; - -import net.minecraft.entity.Entity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEffectBlock; - -public class TESpellEffectBlockItemRenderer implements IItemRenderer -{ - private ModelSpellEffectBlock modelSpellBlock = new ModelSpellEffectBlock(); - - private void renderConduitItem(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, EnumFacing.DOWN, EnumFacing.UP); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - } - - - /** - * IItemRenderer implementation * - */ - @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { - switch (type) - { - case ENTITY: - return true; - case EQUIPPED: - return true; - case EQUIPPED_FIRST_PERSON: - return true; - case INVENTORY: - return true; - default: - return false; - } - } - - - @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - return true; - } - - - @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - switch (type) - { - case ENTITY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); - break; - case EQUIPPED: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); - break; - case EQUIPPED_FIRST_PERSON: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); - break; - case INVENTORY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); - break; - default: - } - } - - public String getResourceLocationForMeta(int meta) - { - switch (meta) - { - case 0: - return "alchemicalwizardry:textures/models/SpellEffectFire.png"; - case 1: - return "alchemicalwizardry:textures/models/SpellEffectIce.png"; - case 2: - return "alchemicalwizardry:textures/models/SpellEffectWind.png"; - case 3: - return "alchemicalwizardry:textures/models/SpellEffectEarth.png"; - } - return ""; - } -} 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 deleted file mode 100644 index c0c48ed0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEnhancementBlockItemRenderer.java +++ /dev/null @@ -1,115 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; - -import net.minecraft.entity.Entity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock; - -public class TESpellEnhancementBlockItemRenderer implements IItemRenderer -{ - private ModelSpellEnhancementBlock modelSpellBlock = new ModelSpellEnhancementBlock(); - - private void renderConduitItem(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, EnumFacing.DOWN, EnumFacing.UP); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - } - - - /** - * IItemRenderer implementation * - */ - @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { - switch (type) - { - case ENTITY: - return true; - case EQUIPPED: - return true; - case EQUIPPED_FIRST_PERSON: - return true; - case INVENTORY: - return true; - default: - return false; - } - } - - - @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - return true; - } - - - @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - switch (type) - { - case ENTITY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); - break; - case EQUIPPED: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); - break; - case EQUIPPED_FIRST_PERSON: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); - break; - case INVENTORY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); - break; - default: - } - } - - public String getResourceLocationForMeta(int meta) - { - switch (meta) - { - case 0: - return "alchemicalwizardry:textures/models/SpellEnhancementPower1.png"; - case 1: - return "alchemicalwizardry:textures/models/SpellEnhancementPower2.png"; - case 2: - return "alchemicalwizardry:textures/models/SpellEnhancementPower3.png"; - case 3: - return "alchemicalwizardry:textures/models/SpellEnhancementPower4.png"; - case 5: - return "alchemicalwizardry:textures/models/SpellEnhancementCost1.png"; - case 6: - return "alchemicalwizardry:textures/models/SpellEnhancementCost2.png"; - case 7: - return "alchemicalwizardry:textures/models/SpellEnhancementCost3.png"; - case 8: - return "alchemicalwizardry:textures/models/SpellEnhancementCost4.png"; - case 10: - return "alchemicalwizardry:textures/models/SpellEnhancementPotency1.png"; - case 11: - return "alchemicalwizardry:textures/models/SpellEnhancementPotency2.png"; - case 12: - return "alchemicalwizardry:textures/models/SpellEnhancementPotency3.png"; - case 13: - return "alchemicalwizardry:textures/models/SpellEnhancementPotency4.png"; - - } - return "alchemicalwizardry:textures/models/SpellEnhancementPower1.png"; - } -} 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 deleted file mode 100644 index 3ea9c791..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellModifierBlockItemRenderer.java +++ /dev/null @@ -1,98 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; - -import net.minecraft.entity.Entity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellModifierBlock; - -public class TESpellModifierBlockItemRenderer implements IItemRenderer -{ - private ModelSpellModifierBlock modelSpellBlock = new ModelSpellModifierBlock(); - - private void renderConduitItem(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, EnumFacing.DOWN, EnumFacing.UP); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - } - - - /** - * IItemRenderer implementation * - */ - @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { - switch (type) - { - case ENTITY: - return true; - case EQUIPPED: - return true; - case EQUIPPED_FIRST_PERSON: - return true; - case INVENTORY: - return true; - default: - return false; - } - } - - - @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - return true; - } - - - @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - switch (type) - { - case ENTITY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); - break; - case EQUIPPED: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); - break; - case EQUIPPED_FIRST_PERSON: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); - break; - case INVENTORY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); - break; - default: - } - } - - public String getResourceLocationForMeta(int meta) - { - switch (meta) - { - case 0: - return "alchemicalwizardry:textures/models/SpellModifierDefault.png"; - case 1: - return "alchemicalwizardry:textures/models/SpellModifierOffensive.png"; - case 2: - return "alchemicalwizardry:textures/models/SpellModifierDefensive.png"; - case 3: - return "alchemicalwizardry:textures/models/SpellModifierEnvironmental.png"; - } - return "alchemicalwizardry:textures/models/SpellModifierDefault.png"; - } -} 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 deleted file mode 100644 index 2dc201ba..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellParadigmBlockItemRenderer.java +++ /dev/null @@ -1,97 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; - -import net.minecraft.entity.Entity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellParadigmBlock; - -public class TESpellParadigmBlockItemRenderer implements IItemRenderer -{ - private ModelSpellParadigmBlock modelSpellBlock = new ModelSpellParadigmBlock(); - - private void renderConduitItem(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, EnumFacing.DOWN, EnumFacing.UP); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - } - - - /** - * IItemRenderer implementation * - */ - @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { - switch (type) - { - case ENTITY: - return true; - case EQUIPPED: - return true; - case EQUIPPED_FIRST_PERSON: - return true; - case INVENTORY: - return true; - default: - return false; - } - } - - - @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - return true; - } - - - @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - switch (type) - { - case ENTITY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); - break; - case EQUIPPED: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); - break; - case EQUIPPED_FIRST_PERSON: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); - break; - case INVENTORY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); - break; - default: - } - } - - public String getResourceLocationForMeta(int meta) - { - switch (meta) - { - case 0: - return "alchemicalwizardry:textures/models/SpellParadigmProjectile.png"; - case 1: - return "alchemicalwizardry:textures/models/SpellParadigmSelf.png"; - case 2: - return "alchemicalwizardry:textures/models/SpellParadigmMelee.png"; - case 3: - return "alchemicalwizardry:textures/models/SpellParadigmTool.png"; - } - return "alchemicalwizardry:textures/models/SpellParadigmProjectile.png"; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java deleted file mode 100644 index a44fb4c3..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java +++ /dev/null @@ -1,28 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.mob; - -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBileDemon; -import net.minecraft.client.Minecraft; -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 RenderBileDemon extends RenderLiving -{ - private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/BileDemon.png"); - - public RenderBileDemon(ModelBase par1ModelBase, float par2) - { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); - } - - public ResourceLocation func_110832_a(EntityBileDemon par1EntityBileDemon) - { - return field_110833_a; - } - - public ResourceLocation getEntityTexture(Entity par1Entity) - { - return this.func_110832_a((EntityBileDemon) par1Entity); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java deleted file mode 100644 index 4b3f1691..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java +++ /dev/null @@ -1,28 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.mob; - -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBoulderFist; -import net.minecraft.client.Minecraft; -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 RenderBoulderFist extends RenderLiving -{ - private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/BoulderFist.png"); - - public RenderBoulderFist(ModelBase par1ModelBase, float par2) - { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); - } - - public ResourceLocation func_110832_a(EntityBoulderFist par1EntityBoulderFist) - { - return field_110833_a; - } - - public ResourceLocation getEntityTexture(Entity par1Entity) - { - return this.func_110832_a((EntityBoulderFist) par1Entity); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java deleted file mode 100644 index 82ae9f1a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java +++ /dev/null @@ -1,63 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.mob; - -import WayofTime.alchemicalWizardry.common.entity.mob.*; -import net.minecraft.client.Minecraft; -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 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"); - - public RenderElemental(ModelBase par1ModelBase, float par2) - { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); - } - - public ResourceLocation func_110832_a(EntityElemental par1EntityElemental) - { - if (par1EntityElemental instanceof EntityAirElemental) - { - return airBeacon; - } - - if (par1EntityElemental instanceof EntityWaterElemental) - { - return waterBeacon; - } - - if (par1EntityElemental instanceof EntityEarthElemental) - { - return earthBeacon; - } - - if (par1EntityElemental instanceof EntityFireElemental) - { - return fireBeacon; - } - - if (par1EntityElemental instanceof EntityShadeElemental) - { - return shadeBeacon; - } - - if (par1EntityElemental instanceof EntityHolyElemental) - { - return holyBeacon; - } - - return airBeacon; - } - - public ResourceLocation getEntityTexture(Entity par1Entity) - { - return this.func_110832_a((EntityElemental) par1Entity); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java deleted file mode 100644 index adc58c3d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java +++ /dev/null @@ -1,31 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.mob; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.entity.Entity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel; - -@SideOnly(Side.CLIENT) -public class RenderFallenAngel extends RenderLiving -{ - private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/WingedAngel.png"); - - public RenderFallenAngel(ModelBase par1ModelBase, float par2) - { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); - } - - public ResourceLocation func_110832_a(EntityFallenAngel par1EntityFallenAngel) - { - return field_110833_a; - } - - public ResourceLocation getEntityTexture(Entity par1Entity) - { - return this.func_110832_a((EntityFallenAngel) par1Entity); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java deleted file mode 100644 index 92ea947a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java +++ /dev/null @@ -1,28 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.mob; - -import net.minecraft.client.Minecraft; -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"); - - public RenderIceDemon(ModelBase par1ModelBase, float par2) - { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); - } - - public ResourceLocation func_110832_a(EntityIceDemon par1EntityIceDemon) - { - return field_110833_a; - } - - public ResourceLocation getEntityTexture(Entity par1Entity) - { - return this.func_110832_a((EntityIceDemon) par1Entity); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java deleted file mode 100644 index 7407e47f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java +++ /dev/null @@ -1,28 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.mob; - -import net.minecraft.client.Minecraft; -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"); - - public RenderLowerGuardian(ModelBase par1ModelBase, float par2) - { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); - } - - public ResourceLocation func_110832_a(EntityLowerGuardian par1EntityLowerGuardian) - { - return field_110833_a; - } - - public ResourceLocation getEntityTexture(Entity par1Entity) - { - return this.func_110832_a((EntityLowerGuardian) par1Entity); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGrunt.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGrunt.java deleted file mode 100644 index e975edee..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGrunt.java +++ /dev/null @@ -1,50 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.mob; - -import net.minecraft.client.Minecraft; -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; - -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"); - - public RenderMinorDemonGrunt(ModelBase par1ModelBase, float par2) - { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); - } - - public ResourceLocation func_110832_a(EntityMinorDemonGrunt entity) - { - if(entity instanceof EntityMinorDemonGruntFire) - { - return fireTexture; - }else if(entity instanceof EntityMinorDemonGruntWind) - { - return windTexture; - }else if(entity instanceof EntityMinorDemonGruntIce) - { - return iceTexture; - }else if(entity instanceof EntityMinorDemonGruntEarth) - { - return earthTexture; - } - - return normalTexture; - } - - public ResourceLocation getEntityTexture(Entity entity) - { - return this.func_110832_a((EntityMinorDemonGrunt) entity); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGruntGuardian.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGruntGuardian.java deleted file mode 100644 index ba52f114..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGruntGuardian.java +++ /dev/null @@ -1,50 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.mob; - -import net.minecraft.client.Minecraft; -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; - -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"); - - public RenderMinorDemonGruntGuardian(ModelBase par1ModelBase, float par2) - { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); - } - - public ResourceLocation func_110832_a(EntityMinorDemonGruntGuardian entity) - { - if(entity instanceof EntityMinorDemonGruntGuardianFire) - { - return fireTexture; - }else if(entity instanceof EntityMinorDemonGruntGuardianWind) - { - return windTexture; - }else if(entity instanceof EntityMinorDemonGruntGuardianIce) - { - return iceTexture; - }else if(entity instanceof EntityMinorDemonGruntGuardianEarth) - { - return earthTexture; - } - - return normalTexture; - } - - public ResourceLocation getEntityTexture(Entity entity) - { - return this.func_110832_a((EntityMinorDemonGruntGuardian) entity); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java deleted file mode 100644 index b3d4a844..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java +++ /dev/null @@ -1,28 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.mob; - -import WayofTime.alchemicalWizardry.common.entity.mob.EntityShade; -import net.minecraft.client.Minecraft; -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 RenderShade extends RenderLiving -{ - private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/ShadeMob.png"); - - public RenderShade(ModelBase par1ModelBase, float par2) - { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); - } - - public ResourceLocation func_110832_a(EntityShade par1EntityShade) - { - return field_110833_a; - } - - public ResourceLocation getEntityTexture(Entity par1Entity) - { - return this.func_110832_a((EntityShade) par1Entity); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java deleted file mode 100644 index 42b70f01..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java +++ /dev/null @@ -1,28 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.mob; - -import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem; -import net.minecraft.client.Minecraft; -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 RenderSmallEarthGolem extends RenderLiving -{ - private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/SmallEarthGolem.png"); - - public RenderSmallEarthGolem(ModelBase par1ModelBase, float par2) - { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); - } - - public ResourceLocation func_110832_a(EntitySmallEarthGolem par1EntitySmallEarthGolem) - { - return field_110833_a; - } - - public ResourceLocation getEntityTexture(Entity par1Entity) - { - return this.func_110832_a((EntitySmallEarthGolem) par1Entity); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java deleted file mode 100644 index af809551..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java +++ /dev/null @@ -1,28 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.mob; - -import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon; -import net.minecraft.client.Minecraft; -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 RenderWingedFireDemon extends RenderLiving -{ - private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/WingedFireDemon.png"); - - public RenderWingedFireDemon(ModelBase par1ModelBase, float par2) - { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); - } - - public ResourceLocation func_110832_a(EntityWingedFireDemon par1EntityWingedFireDemon) - { - return field_110833_a; - } - - public ResourceLocation getEntityTexture(Entity par1Entity) - { - return this.func_110832_a((EntityWingedFireDemon) par1Entity); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelAlchemicalCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelAlchemicalCalcinator.java deleted file mode 100644 index 1724a715..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelAlchemicalCalcinator.java +++ /dev/null @@ -1,140 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -public class ModelAlchemicalCalcinator extends ModelBase -{ - //fields - ModelRenderer top1; - ModelRenderer top2; - ModelRenderer top3; - ModelRenderer top4; - ModelRenderer tank; - ModelRenderer centreCollumn; - ModelRenderer furnaceShape; - ModelRenderer glassWindow; - ModelRenderer Shape1; - ModelRenderer Shape2; - ModelRenderer Shape3; - ModelRenderer Shape4; - ModelRenderer Shape5; - - public ModelAlchemicalCalcinator() - { - textureWidth = 128; - textureHeight = 128; - - top1 = new ModelRenderer(this, 0, 34); - top1.addBox(4F, -8F, -8F, 4, 3, 16); - top1.setRotationPoint(0F, 16F, 0F); - top1.setTextureSize(128, 128); - top1.mirror = true; - setRotation(top1, 0F, 0F, 0F); - top2 = new ModelRenderer(this, 41, 34); - top2.addBox(-8F, -8F, -8F, 4, 3, 16); - top2.setRotationPoint(0F, 16F, 0F); - top2.setTextureSize(128, 128); - top2.mirror = true; - setRotation(top2, 0F, 0F, 0F); - top3 = new ModelRenderer(this, 25, 55); - top3.addBox(-4F, -8F, 4F, 8, 3, 4); - top3.setRotationPoint(0F, 16F, 0F); - top3.setTextureSize(128, 128); - top3.mirror = true; - setRotation(top3, 0F, 0F, 0F); - top4 = new ModelRenderer(this, 0, 55); - top4.addBox(-4F, -8F, -8F, 8, 3, 4); - top4.setRotationPoint(0F, 16F, 0F); - top4.setTextureSize(128, 128); - top4.mirror = true; - setRotation(top4, 0F, 0F, 0F); - tank = new ModelRenderer(this, 0, 0); - tank.addBox(-8F, -5F, -8F, 16, 4, 16); - tank.setRotationPoint(0F, 16F, 0F); - tank.setTextureSize(128, 128); - tank.mirror = true; - setRotation(tank, 0F, 0F, 0F); - centreCollumn = new ModelRenderer(this, 0, 21); - centreCollumn.addBox(-4F, -5F, -4F, 8, 4, 8); - centreCollumn.setRotationPoint(0F, 16F, 0F); - centreCollumn.setTextureSize(128, 128); - centreCollumn.mirror = true; - setRotation(centreCollumn, 0F, 0F, 0F); - furnaceShape = new ModelRenderer(this, 0, 63); - furnaceShape.addBox(-8F, -1F, -8F, 16, 5, 16); - furnaceShape.setRotationPoint(0F, 16F, 0F); - furnaceShape.setTextureSize(128, 128); - furnaceShape.mirror = true; - setRotation(furnaceShape, 0F, 0F, 0F); - glassWindow = new ModelRenderer(this, 0, 85); - glassWindow.addBox(-4F, -8F, -4F, 8, 0, 8); - glassWindow.setRotationPoint(0F, 16F, 0F); - glassWindow.setTextureSize(128, 128); - glassWindow.mirror = true; - setRotation(glassWindow, 0F, 0F, 0F); - Shape1 = new ModelRenderer(this, 0, 94); - Shape1.addBox(-8F, 4F, -8F, 4, 4, 4); - Shape1.setRotationPoint(0F, 16F, 0F); - Shape1.setTextureSize(128, 128); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - Shape2 = new ModelRenderer(this, 0, 103); - Shape2.addBox(-4F, 6F, -4F, 8, 1, 8); - Shape2.setRotationPoint(0F, 16F, 0F); - Shape2.setTextureSize(128, 128); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - Shape3 = new ModelRenderer(this, 0, 94); - Shape3.addBox(4F, 4F, -8F, 4, 4, 4); - Shape3.setRotationPoint(0F, 16F, 0F); - Shape3.setTextureSize(128, 128); - Shape3.mirror = true; - setRotation(Shape3, 0F, 0F, 0F); - Shape4 = new ModelRenderer(this, 0, 94); - Shape4.addBox(-8F, 4F, 4F, 4, 4, 4); - Shape4.setRotationPoint(0F, 16F, 0F); - Shape4.setTextureSize(128, 128); - Shape4.mirror = true; - setRotation(Shape4, 0F, 0F, 0F); - Shape5 = new ModelRenderer(this, 0, 94); - Shape5.addBox(4F, 4F, 4F, 4, 4, 4); - Shape5.setRotationPoint(0F, 16F, 0F); - Shape5.setTextureSize(128, 128); - Shape5.mirror = true; - setRotation(Shape5, 0F, 0F, 0F); - } - - 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); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - top1.render(f5); - top2.render(f5); - top3.render(f5); - top4.render(f5); - tank.render(f5); - centreCollumn.render(f5); - furnaceShape.render(f5); - glassWindow.render(f5); - Shape1.render(f5); - Shape2.render(f5); - Shape3.render(f5); - Shape4.render(f5); - Shape5.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBileDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBileDemon.java deleted file mode 100644 index e09db58e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBileDemon.java +++ /dev/null @@ -1,181 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -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; - ModelRenderer head; - ModelRenderer nose; - ModelRenderer leftHorn; - ModelRenderer leftArmSpacer; - ModelRenderer leftArm; - ModelRenderer leftChain; - ModelRenderer leftBall; - ModelRenderer rightHorn; - ModelRenderer rightChain; - ModelRenderer rightBall; - ModelRenderer rightArmSpacer; - ModelRenderer rightArm; - - public ModelBileDemon() - { - textureWidth = 128; - textureHeight = 64; - belly = new ModelRenderer(this, 0, 31); - belly.addBox(-8F, -1F, -10F, 16, 15, 18); - belly.setRotationPoint(0F, 10F, 0F); - belly.setTextureSize(128, 64); - belly.mirror = true; - setRotation(belly, 0F, 0F, 0F); - chest = new ModelRenderer(this, 70, 46); - chest.addBox(-7F, -4F, -6F, 14, 4, 14); - chest.setRotationPoint(0F, 10F, 0F); - chest.setTextureSize(128, 64); - chest.mirror = true; - setRotation(chest, -0.1115358F, 0F, 0F); - head = new ModelRenderer(this, 0, 0); - head.addBox(-4F, -8F, -4F, 8, 8, 8); - head.setRotationPoint(0F, 6F, 3F); - head.setTextureSize(128, 64); - head.mirror = true; - setRotation(head, 0F, 0F, 0F); - nose = new ModelRenderer(this, 0, 0); - nose.addBox(-1F, -4F, -5F, 2, 1, 1); - nose.setRotationPoint(0F, 6F, 3F); - nose.setTextureSize(128, 64); - nose.mirror = true; - setRotation(nose, 0F, 0F, 0F); - leftHorn = new ModelRenderer(this, 93, 1); - leftHorn.addBox(4F, -7F, 0F, 16, 1, 1); - leftHorn.setRotationPoint(0F, 6F, 3F); - leftHorn.setTextureSize(128, 64); - leftHorn.mirror = true; - setRotation(leftHorn, 0F, 0F, 0F); - leftArmSpacer = new ModelRenderer(this, 80, 1); - leftArmSpacer.addBox(0F, -2F, -2F, 1, 4, 4); - leftArmSpacer.setRotationPoint(7F, 8F, 3F); - leftArmSpacer.setTextureSize(128, 64); - leftArmSpacer.mirror = true; - setRotation(leftArmSpacer, 0F, 0F, 0F); - leftArm = new ModelRenderer(this, 62, 1); - leftArm.addBox(1F, -2F, -2F, 4, 18, 4); - leftArm.setRotationPoint(7F, 8F, 3F); - leftArm.setTextureSize(128, 64); - leftArm.mirror = true; - setRotation(leftArm, 0F, 0F, 0F); - leftChain = new ModelRenderer(this, 95, 5); - leftChain.addBox(17F, -6F, 0F, 1, 6, 1); - leftChain.setRotationPoint(0F, 6F, 3F); - leftChain.setTextureSize(128, 64); - leftChain.mirror = true; - setRotation(leftChain, 0F, 0F, 0F); - leftBall = new ModelRenderer(this, 107, 4); - leftBall.addBox(15F, 0F, -2F, 5, 5, 5); - leftBall.setRotationPoint(0F, 6F, 3F); - leftBall.setTextureSize(128, 64); - leftBall.mirror = true; - setRotation(leftBall, 0F, 0F, 0F); - rightHorn = new ModelRenderer(this, 93, 1); - rightHorn.mirror = true; - rightHorn.addBox(-20F, -7F, 0F, 16, 1, 1); - rightHorn.setRotationPoint(0F, 6F, 3F); - rightHorn.setTextureSize(128, 64); - rightHorn.mirror = true; - setRotation(rightHorn, 0F, 0F, 0F); - rightHorn.mirror = false; - rightChain = new ModelRenderer(this, 95, 5); - rightChain.mirror = true; - rightChain.addBox(-18F, -6F, 0F, 1, 6, 1); - rightChain.setRotationPoint(0F, 6F, 3F); - rightChain.setTextureSize(128, 64); - rightChain.mirror = true; - setRotation(rightChain, 0F, 0F, 0F); - rightChain.mirror = false; - rightBall = new ModelRenderer(this, 107, 4); - rightBall.mirror = true; - rightBall.addBox(-20F, 0F, -2F, 5, 5, 5); - rightBall.setRotationPoint(0F, 6F, 3F); - rightBall.setTextureSize(128, 64); - rightBall.mirror = true; - setRotation(rightBall, 0F, 0F, 0F); - rightBall.mirror = false; - rightArmSpacer = new ModelRenderer(this, 80, 1); - rightArmSpacer.mirror = true; - rightArmSpacer.addBox(-1F, -2F, -2F, 1, 4, 4); - rightArmSpacer.setRotationPoint(-7F, 8F, 3F); - rightArmSpacer.setTextureSize(128, 64); - rightArmSpacer.mirror = true; - setRotation(rightArmSpacer, 0F, 0F, 0F); - rightArmSpacer.mirror = false; - rightArm = new ModelRenderer(this, 62, 1); - rightArm.mirror = true; - rightArm.addBox(-5F, -2F, -2F, 4, 18, 4); - rightArm.setRotationPoint(-7F, 8F, 3F); - rightArm.setTextureSize(128, 64); - rightArm.mirror = true; - setRotation(rightArm, 0F, 0F, 0F); - rightArm.mirror = false; - } - - 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); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - float scale = 1.3f; - GL11.glScalef(scale, scale, scale); - GL11.glTranslatef(0.0f, -(6.0f / 16.0f), 0.0f); - belly.render(f5); - chest.render(f5); - head.render(f5); - nose.render(f5); - leftHorn.render(f5); - leftArmSpacer.render(f5); - leftArm.render(f5); - leftChain.render(f5); - leftBall.render(f5); - rightHorn.render(f5); - rightChain.render(f5); - rightBall.render(f5); - rightArmSpacer.render(f5); - rightArm.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.head.rotateAngleX = f4 / (180F / (float) Math.PI); - this.head.rotateAngleY = f3 / (180F / (float) Math.PI); - this.rightArm.rotateAngleX = MathHelper.cos(f * 0.3662F + (float) Math.PI) * 1.0F * f1; - this.leftArm.rotateAngleX = MathHelper.cos(f * 0.3662F) * 1.0F * f1; - this.rightArmSpacer.rotateAngleX = MathHelper.cos(f * 0.3662F + (float) Math.PI) * 1.0F * f1; - this.leftArmSpacer.rotateAngleX = MathHelper.cos(f * 0.3662F) * 1.0F * f1; - this.leftBall.rotateAngleX = this.head.rotateAngleX; - this.leftBall.rotateAngleY = this.head.rotateAngleY; - this.rightBall.rotateAngleX = this.head.rotateAngleX; - this.rightBall.rotateAngleY = this.head.rotateAngleY; - this.leftChain.rotateAngleX = this.head.rotateAngleX; - this.leftChain.rotateAngleY = this.head.rotateAngleY; - this.rightChain.rotateAngleX = this.head.rotateAngleX; - this.rightChain.rotateAngleY = this.head.rotateAngleY; - this.leftHorn.rotateAngleX = this.head.rotateAngleX; - this.leftHorn.rotateAngleY = this.head.rotateAngleY; - this.rightHorn.rotateAngleX = this.head.rotateAngleX; - this.rightHorn.rotateAngleY = this.head.rotateAngleY; - this.nose.rotateAngleX = this.head.rotateAngleX; - this.nose.rotateAngleY = this.head.rotateAngleY; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java deleted file mode 100644 index 9634a1ce..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java +++ /dev/null @@ -1,77 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; - -public class ModelBloodAltar extends ModelBase -{ - 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")); - } - - public void renderBloodAltar() - { -// modelBloodAltar.renderAll(); - } - - public void renderBloodAltar(TEAltar altar, double x, double y, double z) - { -// float scale = 0.1f; -// // Push a blank matrix onto the stack -// GL11.glPushMatrix(); -// // Move the object into the correct position on the block (because the OBJ's origin is the center of the object) -// GL11.glTranslatef((float) x + 0.5f, (float) y, (float) z + 0.5f); -// // Scale our object to about half-size in all directions (the OBJ file is a little large) -// GL11.glScalef(scale, scale, scale); -// // Bind the texture, so that OpenGL properly textures our block. -// FMLClientHandler.instance().getClient().renderEngine.bindTexture(altar_texture); -// // Render the object, using modelTutBox.renderAll(); -// this.renderBloodAltar(); -// // Pop this matrix from the stack. -// GL11.glPopMatrix(); - } - - public void renderBloodLevel(TEAltar altar, double x, double y, double z) - { -// GL11.glPushMatrix(); -// float level = altar.getFluidAmount(); -// GL11.glTranslatef((float) x , (float) y + 0.6499f + 0.12f * (level / altar.getCapacity()), (float) z); -// FMLClientHandler.instance().getClient().renderEngine.bindTexture(TextureMap.locationBlocksTexture); -// renderBloodLevel(AlchemicalWizardry.lifeEssenceFluid.getStillIcon()); -// GL11.glPopMatrix(); - } - - public void renderBloodLevel(TextureAtlasSprite icon) - { - Tessellator tessellator = Tessellator.getInstance(); - WorldRenderer wr = tessellator.getWorldRenderer(); - - double minU = (double) icon.getInterpolatedU(0); - double maxU = (double) icon.getInterpolatedU(16); - double minV = (double) icon.getInterpolatedV(0); - double maxV = (double) icon.getInterpolatedV(16); - - wr.startDrawingQuads(); - wr.func_178980_d(0, 1, 0); //setNormal - wr.addVertexWithUV(1, 0, 1, maxU, maxV); - wr.addVertexWithUV(1, 0, 0, maxU, minV); - wr.addVertexWithUV(0, 0, 0, minU, minV); - wr.addVertexWithUV(0, 0, 1, minU, maxV); - tessellator.draw(); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBoulderFist.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBoulderFist.java deleted file mode 100644 index a2cebd46..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBoulderFist.java +++ /dev/null @@ -1,153 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; - -public class ModelBoulderFist extends ModelBase -{ - //fields - ModelRenderer leftFist; - ModelRenderer leftArm; - ModelRenderer body; - ModelRenderer leftLeg1; - ModelRenderer leftLeg2; - ModelRenderer leftFoot; - ModelRenderer rightFist; - ModelRenderer rightArm; - ModelRenderer rightLeg1; - ModelRenderer rightLeg2; - ModelRenderer rightFoot; - ModelRenderer head; - - public ModelBoulderFist() - { - textureWidth = 64; - textureHeight = 64; - leftFist = new ModelRenderer(this, 33, 52); - leftFist.addBox(-1F, 12F, -3F, 6, 6, 6); - leftFist.setRotationPoint(5F, 6F, -6F); - leftFist.setTextureSize(64, 64); - leftFist.mirror = true; - setRotation(leftFist, 0F, 0F, 0F); - leftArm = new ModelRenderer(this, 48, 33); - leftArm.addBox(0F, -2F, -2F, 4, 14, 4); - leftArm.setRotationPoint(5F, 6F, -6F); - leftArm.setTextureSize(64, 64); - leftArm.mirror = true; - setRotation(leftArm, 0F, 0F, 0F); - body = new ModelRenderer(this, 0, 40); - body.addBox(-5F, -2F, -3F, 10, 18, 6); - body.setRotationPoint(0F, 6F, -6F); - body.setTextureSize(64, 64); - body.mirror = true; - setRotation(body, 1.22173F, 0F, 0F); - leftLeg1 = new ModelRenderer(this, 0, 25); - leftLeg1.addBox(0F, -1F, -1F, 4, 6, 2); - leftLeg1.setRotationPoint(5F, 11F, 7F); - leftLeg1.setTextureSize(64, 64); - leftLeg1.mirror = true; - setRotation(leftLeg1, -((float) Math.PI / 4F), 0F, 0F); - leftLeg2 = new ModelRenderer(this, 1, 25); - leftLeg2.addBox(0F, 5F, -1F, 4, 2, 12); - leftLeg2.setRotationPoint(5F, 11F, 7F); - leftLeg2.setTextureSize(64, 64); - leftLeg2.mirror = true; - setRotation(leftLeg2, -((float) Math.PI / 4F), 0F, 0F); - leftFoot = new ModelRenderer(this, 22, 25); - leftFoot.addBox(0F, 11F, -1F, 4, 2, 5); - leftFoot.setRotationPoint(5F, 11F, 7F); - leftFoot.setTextureSize(64, 64); - leftFoot.mirror = true; - setRotation(leftFoot, 0F, 0F, 0F); - rightFist = new ModelRenderer(this, 33, 52); - rightFist.mirror = true; - rightFist.addBox(-5F, 12F, -3F, 6, 6, 6); - rightFist.setRotationPoint(-5F, 6F, -6F); - rightFist.setTextureSize(64, 64); - rightFist.mirror = true; - setRotation(rightFist, 0F, 0F, 0F); - rightFist.mirror = false; - rightArm = new ModelRenderer(this, 48, 33); - rightArm.mirror = true; - rightArm.addBox(-4F, -2F, -2F, 4, 14, 4); - rightArm.setRotationPoint(-5F, 6F, -6F); - rightArm.setTextureSize(64, 64); - rightArm.mirror = true; - setRotation(rightArm, 0F, 0F, 0F); - rightArm.mirror = false; - rightLeg1 = new ModelRenderer(this, 0, 25); - rightLeg1.mirror = true; - rightLeg1.addBox(-4F, -1F, -1F, 4, 6, 2); - rightLeg1.setRotationPoint(-5F, 11F, 7F); - rightLeg1.setTextureSize(64, 64); - rightLeg1.mirror = true; - setRotation(rightLeg1, -((float) Math.PI / 4F), 0F, 0F); - rightLeg1.mirror = false; - rightLeg2 = new ModelRenderer(this, 1, 25); - rightLeg2.mirror = true; - rightLeg2.addBox(-4F, 5F, -1F, 4, 2, 12); - rightLeg2.setRotationPoint(-5F, 11F, 7F); - rightLeg2.setTextureSize(64, 64); - rightLeg2.mirror = true; - setRotation(rightLeg2, -((float) Math.PI / 4F), 0F, 0F); - rightLeg2.mirror = false; - rightFoot = new ModelRenderer(this, 22, 25); - rightFoot.mirror = true; - rightFoot.addBox(-4F, 11F, -1F, 4, 2, 5); - rightFoot.setRotationPoint(-5F, 11F, 7F); - rightFoot.setTextureSize(64, 64); - rightFoot.mirror = true; - setRotation(rightFoot, 0F, 0F, 0F); - rightFoot.mirror = false; - head = new ModelRenderer(this, 0, 0); - head.addBox(-3F, -5F, -5F, 6, 6, 6); - head.setRotationPoint(0F, 5F, -7F); - head.setTextureSize(64, 64); - head.mirror = true; - setRotation(head, 0F, 0F, 0F); - } - - 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); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - leftFist.render(f5); - leftArm.render(f5); - body.render(f5); - leftLeg1.render(f5); - leftLeg2.render(f5); - leftFoot.render(f5); - rightFist.render(f5); - rightArm.render(f5); - rightLeg1.render(f5); - rightLeg2.render(f5); - rightFoot.render(f5); - head.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.head.rotateAngleX = f4 / (180F / (float) Math.PI); - this.head.rotateAngleY = f3 / (180F / (float) Math.PI); - this.leftFoot.rotateAngleX = MathHelper.cos(f * 0.6662F) * 0.8F * f1; - this.rightFoot.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 0.8F * f1; - this.leftLeg1.rotateAngleX = leftFoot.rotateAngleX - ((float) Math.PI / 4F); - this.rightLeg1.rotateAngleX = rightFoot.rotateAngleX - ((float) Math.PI / 4F); - this.leftLeg2.rotateAngleX = leftFoot.rotateAngleX - ((float) Math.PI / 4F); - this.rightLeg2.rotateAngleX = rightFoot.rotateAngleX - ((float) Math.PI / 4F); - this.rightArm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 0.9f * f1; - this.leftArm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 0.9f * f1; - this.leftFist.rotateAngleX = leftArm.rotateAngleX; - this.rightFist.rotateAngleX = rightArm.rotateAngleX; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelChemistrySet.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelChemistrySet.java deleted file mode 100644 index 2dfc6c8f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelChemistrySet.java +++ /dev/null @@ -1,138 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -public class ModelChemistrySet extends ModelBase -{ - //fields - ModelRenderer base; - ModelRenderer support; - ModelRenderer appendage1; - ModelRenderer appendage2; - ModelRenderer appendage3; - ModelRenderer appendage4; - ModelRenderer appendage5; - ModelRenderer outputPad; - ModelRenderer input1; - ModelRenderer input5; - ModelRenderer input4; - ModelRenderer input3; - ModelRenderer Shape1; - - public ModelChemistrySet() - { - textureWidth = 64; - textureHeight = 64; - base = new ModelRenderer(this, 0, 0); - base.addBox(0F, 0F, 0F, 16, 2, 16); - base.setRotationPoint(-8F, 22F, -8F); - base.setTextureSize(64, 32); - base.mirror = true; - setRotation(base, 0F, 0F, 0F); - support = new ModelRenderer(this, 0, 0); - support.addBox(0F, 0F, 0F, 2, 12, 2); - support.setRotationPoint(-1F, 10F, -1F); - support.setTextureSize(64, 32); - support.mirror = true; - setRotation(support, 0F, 0F, 0F); - appendage1 = new ModelRenderer(this, 48, 0); - appendage1.addBox(1F, 0F, 0F, 7, 11, 0); - appendage1.setRotationPoint(0F, 10F, 0F); - appendage1.setTextureSize(64, 32); - appendage1.mirror = true; - setRotation(appendage1, 0F, 0F, 0F); - appendage2 = new ModelRenderer(this, 48, 0); - appendage2.addBox(1F, 0F, 0F, 7, 11, 0); - appendage2.setRotationPoint(0F, 10F, 0F); - appendage2.setTextureSize(64, 32); - appendage2.mirror = true; - setRotation(appendage2, 0F, ((float) Math.PI * 2F / 5F), 0F); - appendage3 = new ModelRenderer(this, 48, 0); - appendage3.addBox(1F, 0F, 0F, 7, 11, 0); - appendage3.setRotationPoint(0F, 10F, 0F); - appendage3.setTextureSize(64, 32); - appendage3.mirror = true; - setRotation(appendage3, 0F, 2.513274F, 0F); - appendage4 = new ModelRenderer(this, 48, 0); - appendage4.addBox(1F, 0F, 0F, 7, 11, 0); - appendage4.setRotationPoint(0F, 10F, 0F); - appendage4.setTextureSize(64, 32); - appendage4.mirror = true; - setRotation(appendage4, 0F, -2.513274F, 0F); - appendage5 = new ModelRenderer(this, 48, 0); - appendage5.addBox(1F, 0F, 0F, 7, 11, 0); - appendage5.setRotationPoint(0F, 10F, 0F); - appendage5.setTextureSize(64, 32); - appendage5.mirror = true; - setRotation(appendage5, 0F, -((float) Math.PI * 2F / 5F), 0F); - outputPad = new ModelRenderer(this, 0, 20); - outputPad.addBox(0F, 0F, 0F, 4, 1, 4); - outputPad.setRotationPoint(-2F, 9F, -2F); - outputPad.setTextureSize(64, 64); - outputPad.mirror = true; - setRotation(outputPad, 0F, 0F, 0F); - input1 = new ModelRenderer(this, 0, 20); - input1.addBox(4F, 0F, -2F, 4, 1, 4); - input1.setRotationPoint(0F, 21F, 0F); - input1.setTextureSize(64, 64); - input1.mirror = true; - setRotation(input1, 0F, 0F, 0F); - input5 = new ModelRenderer(this, 0, 20); - input5.addBox(0F, 0F, 0F, 4, 1, 4); - input5.setRotationPoint(0F, 21F, -8F); - input5.setTextureSize(64, 64); - input5.mirror = true; - setRotation(input5, 0F, 0F, 0F); - input4 = new ModelRenderer(this, 0, 20); - input4.addBox(-7F, 0F, -6F, 4, 1, 4); - input4.setRotationPoint(0F, 21F, 0F); - input4.setTextureSize(64, 64); - input4.mirror = true; - setRotation(input4, 0F, 0F, 0F); - input3 = new ModelRenderer(this, 0, 20); - input3.addBox(-7F, 0F, 2F, 4, 1, 4); - input3.setRotationPoint(0F, 21F, 0F); - input3.setTextureSize(64, 64); - input3.mirror = true; - setRotation(input3, 0F, 0F, 0F); - Shape1 = new ModelRenderer(this, 0, 20); - Shape1.addBox(0F, 0F, 4F, 4, 1, 4); - Shape1.setRotationPoint(0F, 21F, 0F); - Shape1.setTextureSize(64, 64); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - } - - 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); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - base.render(f5); - support.render(f5); - appendage1.render(f5); - appendage2.render(f5); - appendage3.render(f5); - appendage4.render(f5); - appendage5.render(f5); - outputPad.render(f5); - input1.render(f5); - input5.render(f5); - input4.render(f5); - input3.render(f5); - Shape1.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java deleted file mode 100644 index 83f3ddc8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java +++ /dev/null @@ -1,287 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -//Date: 11/26/2013 1:57:16 PM -//Template version 1.1 -//Java generated by Techne -//Keep in mind that you still need to fill in some blanks -//- ZeuX - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.EnumFacing; - -public class ModelConduit extends ModelBase -{ - //fields - ModelRenderer curvedInput; - ModelRenderer curvedOutput; - ModelRenderer straightBar1; - ModelRenderer curvedBar1; - ModelRenderer spacer1; - ModelRenderer straightBar2; - ModelRenderer curvedBar2; - ModelRenderer spacer2; - ModelRenderer straightBar3; - ModelRenderer curvedBar3; - ModelRenderer straightBar4; - ModelRenderer curvedBar4; - ModelRenderer spacer3; - ModelRenderer spacer4; - ModelRenderer spacer5; - ModelRenderer spacer6; - ModelRenderer spacer7; - ModelRenderer spacer8; - - public ModelConduit() - { - textureWidth = 64; - textureHeight = 32; - curvedInput = new ModelRenderer(this, 0, 0); - curvedInput.addBox(-2F, -2F, -8F, 4, 4, 10); - curvedInput.setRotationPoint(0F, 16F, 0F); - curvedInput.setTextureSize(64, 32); - curvedInput.mirror = true; - setRotation(curvedInput, 0F, 0F, 0F); - curvedOutput = new ModelRenderer(this, 18, 0); - curvedOutput.addBox(2F, -2F, -2F, 6, 4, 4); - curvedOutput.setRotationPoint(0F, 16F, 0F); - curvedOutput.setTextureSize(64, 32); - curvedOutput.mirror = true; - setRotation(curvedOutput, 0F, 0F, 0F); - straightBar1 = new ModelRenderer(this, 0, 17); - straightBar1.addBox(-5F, 3F, -8F, 2, 2, 13); - straightBar1.setRotationPoint(0F, 16F, 0F); - straightBar1.setTextureSize(64, 32); - straightBar1.mirror = true; - setRotation(straightBar1, 0F, 0F, 0F); - curvedBar1 = new ModelRenderer(this, 29, 10); - curvedBar1.addBox(-5F, 3F, 3F, 13, 2, 2); - curvedBar1.setRotationPoint(0F, 16F, 0F); - curvedBar1.setTextureSize(64, 32); - curvedBar1.mirror = true; - setRotation(curvedBar1, 0F, 0F, 0F); - spacer1 = new ModelRenderer(this, 40, 0); - spacer1.addBox(-5.5F, 2.5F, 2.5F, 3, 3, 3); - spacer1.setRotationPoint(0F, 16F, 0F); - spacer1.setTextureSize(64, 32); - spacer1.mirror = true; - setRotation(spacer1, 0F, 0F, 0F); - straightBar2 = new ModelRenderer(this, 0, 17); - straightBar2.addBox(-5F, -5F, -8F, 2, 2, 13); - straightBar2.setRotationPoint(0F, 16F, 0F); - straightBar2.setTextureSize(64, 32); - straightBar2.mirror = true; - setRotation(straightBar2, 0F, 0F, 0F); - curvedBar2 = new ModelRenderer(this, 29, 10); - curvedBar2.addBox(-5F, -5F, 3F, 13, 2, 2); - curvedBar2.setRotationPoint(0F, 16F, 0F); - curvedBar2.setTextureSize(64, 32); - curvedBar2.mirror = true; - setRotation(curvedBar2, 0F, 0F, 0F); - spacer2 = new ModelRenderer(this, 40, 0); - spacer2.addBox(-5.5F, -5.5F, 2.5F, 3, 3, 3); - spacer2.setRotationPoint(0F, 16F, 0F); - spacer2.setTextureSize(64, 32); - spacer2.mirror = true; - setRotation(spacer2, 0F, 0F, 0F); - straightBar3 = new ModelRenderer(this, 0, 17); - straightBar3.addBox(3F, 3F, -8F, 2, 2, 13); - straightBar3.setRotationPoint(0F, 16F, 0F); - straightBar3.setTextureSize(64, 32); - straightBar3.mirror = true; - setRotation(straightBar3, 0F, 0F, 0F); - curvedBar3 = new ModelRenderer(this, 29, 10); - curvedBar3.addBox(-5F, 3F, -5F, 13, 2, 2); - curvedBar3.setRotationPoint(0F, 16F, 0F); - curvedBar3.setTextureSize(64, 32); - curvedBar3.mirror = true; - setRotation(curvedBar3, 0F, 0F, 0F); - straightBar4 = new ModelRenderer(this, 0, 17); - straightBar4.addBox(3F, -5F, -8F, 2, 2, 13); - straightBar4.setRotationPoint(0F, 16F, 0F); - straightBar4.setTextureSize(64, 32); - straightBar4.mirror = true; - setRotation(straightBar4, 0F, 0F, 0F); - curvedBar4 = new ModelRenderer(this, 29, 10); - curvedBar4.addBox(-5F, -5F, -5F, 13, 2, 2); - curvedBar4.setRotationPoint(0F, 16F, 0F); - curvedBar4.setTextureSize(64, 32); - curvedBar4.mirror = true; - setRotation(curvedBar4, 0F, 0F, 0F); - spacer3 = new ModelRenderer(this, 40, 0); - spacer3.addBox(2.5F, 2.5F, 2.5F, 3, 3, 3); - spacer3.setRotationPoint(0F, 16F, 0F); - spacer3.setTextureSize(64, 32); - spacer3.mirror = true; - setRotation(spacer3, 0F, 0F, 0F); - spacer4 = new ModelRenderer(this, 40, 0); - spacer4.addBox(2.5F, 2.5F, -5.5F, 3, 3, 3); - spacer4.setRotationPoint(0F, 16F, 0F); - spacer4.setTextureSize(64, 32); - spacer4.mirror = true; - setRotation(spacer4, 0F, 0F, 0F); - spacer5 = new ModelRenderer(this, 40, 0); - spacer5.addBox(-5.5F, 2.5F, -5.484F, 3, 3, 3); - spacer5.setRotationPoint(0F, 16F, 0F); - spacer5.setTextureSize(64, 32); - spacer5.mirror = true; - setRotation(spacer5, 0F, 0F, 0F); - spacer6 = new ModelRenderer(this, 40, 0); - spacer6.addBox(2.5F, -5.5F, 2.5F, 3, 3, 3); - spacer6.setRotationPoint(0F, 16F, 0F); - spacer6.setTextureSize(64, 32); - spacer6.mirror = true; - setRotation(spacer6, 0F, 0F, 0F); - spacer7 = new ModelRenderer(this, 40, 0); - spacer7.addBox(2.5F, -5.5F, -5.5F, 3, 3, 3); - spacer7.setRotationPoint(0F, 16F, 0F); - spacer7.setTextureSize(64, 32); - spacer7.mirror = true; - setRotation(spacer7, 0F, 0F, 0F); - spacer8 = new ModelRenderer(this, 40, 0); - spacer8.addBox(-5.5F, -5.5F, -5.5F, 3, 3, 3); - spacer8.setRotationPoint(0F, 16F, 0F); - spacer8.setTextureSize(64, 32); - spacer8.mirror = true; - setRotation(spacer8, 0F, 0F, 0F); - } - - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, EnumFacing input, EnumFacing output) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - float xInputRot = 0.0f; - float yInputRot = 0.0f; - float zInputRot = 0.0f; - float xOutputRot = 0.0f; - float yOutputRot = 0.0f; - float zOutputRot = 0.0f; - - switch (input) - { - case NORTH: - xInputRot = 0.0f; - yInputRot = 0.0f; - zInputRot = 0.0f; - break; - - case EAST: - xInputRot = 0.0f; - yInputRot = (float) (0.5f * Math.PI); - zInputRot = 0.0f; - break; - - case SOUTH: - xInputRot = 0.0f; - yInputRot = (float) (1.0f * Math.PI); - zInputRot = 0.0f; - break; - - case WEST: - xInputRot = 0.0f; - yInputRot = (float) (-0.5f * Math.PI); - zInputRot = 0.0f; - break; - - case UP: - xInputRot = (float) (-0.5f * Math.PI); - yInputRot = 0.0f; - zInputRot = 0.0f; - break; - - case DOWN: - xInputRot = (float) (0.5f * Math.PI); - yInputRot = 0.0f; - zInputRot = 0.0f; - break; - - default: - break; - } - - switch (output) - { - case NORTH: - xOutputRot = 0.0f; - yOutputRot = (float) (0.5f * Math.PI); - zOutputRot = 0.0f; - break; - - case EAST: - xOutputRot = 0.0f; - yOutputRot = (float) (1.0f * Math.PI); - zOutputRot = 0.0f; - break; - - case SOUTH: - xOutputRot = 0.0f; - yOutputRot = (float) (-0.5f * Math.PI); - zOutputRot = 0.0f; - break; - - case WEST: - xOutputRot = 0.0f; - yOutputRot = 0.0f; - zOutputRot = 0.0f; - break; - - case UP: - xOutputRot = 0.0f; - yOutputRot = 0.0f; - zOutputRot = (float) (-0.5f * Math.PI); - break; - - case DOWN: - xOutputRot = 0.0f; - yOutputRot = 0.0f; - zOutputRot = (float) (0.5f * Math.PI); - break; - - default: - break; - } - - this.setRotation(curvedInput, xInputRot, yInputRot, zInputRot); - this.setRotation(curvedOutput, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(straightBar1, xInputRot, yInputRot, zInputRot); - this.setRotation(curvedBar1, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(straightBar2, xInputRot, yInputRot, zInputRot); - this.setRotation(curvedBar2, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(straightBar3, xInputRot, yInputRot, zInputRot); - this.setRotation(curvedBar3, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(straightBar4, xInputRot, yInputRot, zInputRot); - this.setRotation(curvedBar4, xOutputRot, yOutputRot, zOutputRot); - curvedInput.render(f5); - curvedOutput.render(f5); - //setRotation(curvedOutput,0F,-(float)(Math.PI/2),0F); - straightBar1.render(f5); - curvedBar1.render(f5); - spacer1.render(f5); - straightBar2.render(f5); - curvedBar2.render(f5); - spacer2.render(f5); - straightBar3.render(f5); - curvedBar3.render(f5); - straightBar4.render(f5); - curvedBar4.render(f5); - spacer3.render(f5); - spacer4.render(f5); - spacer5.render(f5); - spacer6.render(f5); - spacer7.render(f5); - spacer8.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.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 deleted file mode 100644 index 58a9b1d1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelCrystalBelljar.java +++ /dev/null @@ -1,119 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -public class ModelCrystalBelljar extends ModelBase -{ - //fields - ModelRenderer handle1; - ModelRenderer handle2; - ModelRenderer jar1; - ModelRenderer woodBottom; - ModelRenderer jar2; - ModelRenderer jar3; - ModelRenderer jar4; - ModelRenderer jar5; - - public ModelCrystalBelljar() - { - textureWidth = 128; - textureHeight = 64; - - handle1 = new ModelRenderer(this, 0, 17); - handle1.addBox(-2F, -7F, -2F, 4, 1, 4); - handle1.setRotationPoint(0F, 16F, 0F); - handle1.setTextureSize(128, 64); - handle1.mirror = true; - setRotation(handle1, 0F, 0F, 0F); - handle2 = new ModelRenderer(this, 0, 23); - handle2.addBox(-1F, -6F, -1F, 2, 1, 2); - handle2.setRotationPoint(0F, 16F, 0F); - handle2.setTextureSize(128, 64); - handle2.mirror = true; - setRotation(handle2, 0F, 0F, 0F); - jar1 = new ModelRenderer(this, 0, 27); - jar1.addBox(-4F, -5F, -4F, 8, 1, 8); - jar1.setRotationPoint(0F, 16F, 0F); - jar1.setTextureSize(128, 64); - jar1.mirror = true; - setRotation(jar1, 0F, 0F, 0F); - woodBottom = new ModelRenderer(this, 0, 0); - woodBottom.addBox(-7F, 6F, -7F, 14, 2, 14); - woodBottom.setRotationPoint(0F, 16F, 0F); - woodBottom.setTextureSize(128, 64); - woodBottom.mirror = true; - setRotation(woodBottom, 0F, 0F, 0F); - jar2 = new ModelRenderer(this, 0, 38); - jar2.addBox(-5F, -4F, 4F, 10, 10, 1); - jar2.setRotationPoint(0F, 16F, 0F); - jar2.setTextureSize(128, 64); - jar2.mirror = true; - setRotation(jar2, 0F, 0F, 0F); - jar3 = new ModelRenderer(this, 46, 38); - jar3.addBox(4F, -4F, -4F, 1, 10, 8); - jar3.setRotationPoint(0F, 16F, 0F); - jar3.setTextureSize(128, 64); - jar3.mirror = true; - setRotation(jar3, 0F, 0F, 0F); - jar4 = new ModelRenderer(this, 23, 38); - jar4.addBox(-5F, -4F, -5F, 10, 10, 1); - jar4.setRotationPoint(0F, 16F, 0F); - jar4.setTextureSize(128, 64); - jar4.mirror = true; - setRotation(jar4, 0F, 0F, 0F); - jar5 = new ModelRenderer(this, 65, 38); - jar5.addBox(-5F, -4F, -4F, 1, 10, 8); - jar5.setRotationPoint(0F, 16F, 0F); - jar5.setTextureSize(128, 64); - jar5.mirror = true; - setRotation(jar5, 0F, 0F, 0F); - } - - 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); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - handle1.render(f5); - handle2.render(f5); - jar1.render(f5); - woodBottom.render(f5); - jar2.render(f5); - jar3.render(f5); - jar4.render(f5); - jar5.render(f5); - } - - public void renderSpecialItem(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, int part) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - if (part == 0) - { - woodBottom.render(f5); - } else - { - handle1.render(f5); - handle2.render(f5); - jar1.render(f5); - jar2.render(f5); - jar3.render(f5); - jar4.render(f5); - jar5.render(f5); - } - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java deleted file mode 100644 index 25cb2814..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java +++ /dev/null @@ -1,81 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.entity.monster.EntityBlaze; -import net.minecraft.world.World; - -public class ModelElemental extends ModelBase -{ - //fields - ModelRenderer body; - ModelRenderer Shape2; - ModelRenderer Shape1; - ModelRenderer Shape3; - - public ModelElemental() - { - textureWidth = 64; - textureHeight = 32; - body = new ModelRenderer(this, 33, 0); - body.addBox(-3F, -3F, -3F, 6, 6, 6); - body.setRotationPoint(0F, 14F, 0F); - body.setTextureSize(64, 32); - body.mirror = true; - setRotation(body, 0F, 0F, 0F); - Shape2 = new ModelRenderer(this, 0, 0); - Shape2.addBox(-4F, -4F, -4F, 8, 8, 8); - Shape2.setRotationPoint(0F, 14F, 0F); - Shape2.setTextureSize(64, 32); - Shape2.mirror = true; - setRotation(Shape2, ((float) Math.PI / 4F), ((float) Math.PI / 4F), 0F); - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(-4F, -4F, -4F, 8, 8, 8); - Shape1.setRotationPoint(0F, 14F, 0F); - Shape1.setTextureSize(64, 32); - Shape1.mirror = true; - setRotation(Shape1, 0F, ((float) Math.PI / 4F), ((float) Math.PI / 4F)); - Shape3 = new ModelRenderer(this, 0, 0); - Shape3.addBox(-4F, -4F, -4F, 8, 8, 8); - Shape3.setRotationPoint(0F, 14F, 0F); - Shape3.setTextureSize(64, 32); - Shape3.mirror = true; - setRotation(Shape3, ((float) Math.PI / 4F), 0F, ((float) Math.PI / 4F)); - } - - 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); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - body.render(f5); - Shape2.render(f5); - Shape1.render(f5); - Shape3.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - World world = entity.worldObj; - - if (world == null) - { - return; - } - - int ratio = 20; - float rot = (entity.worldObj.getWorldTime() % ratio) / ratio; - Shape1.rotateAngleX = f / 5; - Shape2.rotateAngleZ = f / 5; - Shape3.rotateAngleY = f / 5; - EntityBlaze d; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelEnergyBazookaMainProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelEnergyBazookaMainProjectile.java deleted file mode 100644 index de8e7e6b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelEnergyBazookaMainProjectile.java +++ /dev/null @@ -1,122 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -public class ModelEnergyBazookaMainProjectile extends ModelBase -{ - //fields - ModelRenderer thirdWarHead; - ModelRenderer firstWarHead; - ModelRenderer secondWarHead; - ModelRenderer support1; - ModelRenderer mainBody; - ModelRenderer support2; - ModelRenderer support3; - ModelRenderer support4; - ModelRenderer base1; - ModelRenderer base2; - ModelRenderer base3; - - public ModelEnergyBazookaMainProjectile() - { - textureWidth = 64; - textureHeight = 32; - thirdWarHead = new ModelRenderer(this, 43, 0); - thirdWarHead.addBox(-1F, -1F, -9F, 2, 2, 1); - thirdWarHead.setRotationPoint(0F, 0F, 0F); - thirdWarHead.setTextureSize(64, 32); - thirdWarHead.mirror = true; - setRotation(thirdWarHead, 0F, 0F, 0F); - firstWarHead = new ModelRenderer(this, 52, 0); - firstWarHead.addBox(-2F, -2F, -8F, 4, 4, 2); - firstWarHead.setRotationPoint(0F, 0F, 0F); - firstWarHead.setTextureSize(64, 32); - firstWarHead.mirror = true; - setRotation(firstWarHead, 0F, 0F, 0F); - secondWarHead = new ModelRenderer(this, 48, 8); - secondWarHead.addBox(-3F, -3F, -6F, 6, 6, 2); - secondWarHead.setRotationPoint(0F, 0F, 0F); - secondWarHead.setTextureSize(64, 32); - secondWarHead.mirror = true; - setRotation(secondWarHead, 0F, 0F, 0F); - support1 = new ModelRenderer(this, 0, 0); - support1.addBox(2F, 2F, -4F, 1, 1, 9); - support1.setRotationPoint(0F, 0F, 0F); - support1.setTextureSize(64, 32); - support1.mirror = true; - setRotation(support1, 0F, 0F, 0F); - mainBody = new ModelRenderer(this, 0, 19); - mainBody.addBox(-2F, -2F, -4F, 4, 4, 9); - mainBody.setRotationPoint(0F, 0F, 0F); - mainBody.setTextureSize(64, 32); - mainBody.mirror = true; - setRotation(mainBody, 0F, 0F, 0F); - support2 = new ModelRenderer(this, 0, 0); - support2.addBox(-3F, 2F, -4F, 1, 1, 9); - support2.setRotationPoint(0F, 0F, 0F); - support2.setTextureSize(64, 32); - support2.mirror = true; - setRotation(support2, 0F, 0F, 0F); - support3 = new ModelRenderer(this, 0, 0); - support3.addBox(-3F, -3F, -4F, 1, 1, 9); - support3.setRotationPoint(0F, 0F, 0F); - support3.setTextureSize(64, 32); - support3.mirror = true; - setRotation(support3, 0F, 0F, 0F); - support4 = new ModelRenderer(this, 0, 0); - support4.addBox(2F, -3F, -4F, 1, 1, 9); - support4.setRotationPoint(0F, 0F, 0F); - support4.setTextureSize(64, 32); - support4.mirror = true; - setRotation(support4, 0F, 0F, 0F); - base1 = new ModelRenderer(this, 28, 0); - base1.addBox(-3F, -3F, 5F, 6, 6, 1); - base1.setRotationPoint(0F, 0F, 0F); - base1.setTextureSize(64, 32); - base1.mirror = true; - setRotation(base1, 0F, 0F, 0F); - base2 = new ModelRenderer(this, 28, 9); - base2.addBox(-2F, -2F, 6F, 4, 4, 1); - base2.setRotationPoint(0F, 0F, 0F); - base2.setTextureSize(64, 32); - base2.mirror = true; - setRotation(base2, 0F, 0F, 0F); - base3 = new ModelRenderer(this, 28, 15); - base3.addBox(-3F, -3F, 7F, 6, 6, 1); - base3.setRotationPoint(0F, 0F, 0F); - base3.setTextureSize(64, 32); - base3.mirror = true; - setRotation(base3, 0F, 0F, 0F); - } - - 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); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - thirdWarHead.render(f5); - firstWarHead.render(f5); - secondWarHead.render(f5); - support1.render(f5); - mainBody.render(f5); - support2.render(f5); - support3.render(f5); - support4.render(f5); - base1.render(f5); - base2.render(f5); - base3.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelFallenAngel.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelFallenAngel.java deleted file mode 100644 index aacef80d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelFallenAngel.java +++ /dev/null @@ -1,113 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; - -public class ModelFallenAngel extends ModelBase -{ - //fields - ModelRenderer leftWing; - ModelRenderer rightWing; - ModelRenderer head; - ModelRenderer body; - ModelRenderer rightarm; - ModelRenderer leftarm; - ModelRenderer rightleg; - ModelRenderer leftleg; - - public ModelFallenAngel() - { - textureWidth = 64; - textureHeight = 32; - leftWing = new ModelRenderer(this, 33, 8); - leftWing.mirror = true; - leftWing.addBox(0F, 0F, 0F, 10, 7, 0); - leftWing.setRotationPoint(0F, 1F, 2F); - leftWing.setTextureSize(64, 32); - leftWing.mirror = true; - setRotation(leftWing, 0F, 0F, 0F); - rightWing = new ModelRenderer(this, 33, 8); - rightWing.addBox(-10F, 0F, 0F, 10, 7, 0); - rightWing.setRotationPoint(0F, 1F, 2F); - rightWing.setTextureSize(64, 32); - rightWing.mirror = true; - setRotation(rightWing, 0F, 0F, 0F); - rightWing.mirror = false; - head = new ModelRenderer(this, 0, 0); - head.addBox(-4F, -8F, -4F, 8, 8, 8); - head.setRotationPoint(0F, 0F, 0F); - head.setTextureSize(64, 32); - 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(64, 32); - body.mirror = true; - setRotation(body, 0F, 0F, 0F); - rightarm = new ModelRenderer(this, 40, 16); - rightarm.addBox(-3F, -2F, -2F, 4, 12, 4); - rightarm.setRotationPoint(-5F, 2F, 0F); - rightarm.setTextureSize(64, 32); - rightarm.mirror = true; - setRotation(rightarm, 0F, 0F, 0F); - rightarm.mirror = false; - leftarm = new ModelRenderer(this, 40, 16); - leftarm.mirror = true; - leftarm.addBox(-1F, -2F, -2F, 4, 12, 4); - leftarm.setRotationPoint(5F, 2F, 0F); - leftarm.setTextureSize(64, 32); - 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(64, 32); - rightleg.mirror = true; - setRotation(rightleg, 0F, 0F, 0F); - rightleg.mirror = false; - leftleg = new ModelRenderer(this, 0, 16); - leftleg.mirror = true; - leftleg.addBox(-2F, 0F, -2F, 4, 12, 4); - leftleg.setRotationPoint(2F, 12F, 0F); - leftleg.setTextureSize(64, 32); - leftleg.mirror = true; - setRotation(leftleg, 0F, 0F, 0F); - } - - 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); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - leftWing.render(f5); - rightWing.render(f5); - head.render(f5); - body.render(f5); - rightarm.render(f5); - leftarm.render(f5); - rightleg.render(f5); - leftleg.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.head.rotateAngleX = f4 / (180F / (float) Math.PI); - this.head.rotateAngleY = f3 / (180F / (float) Math.PI); - this.leftleg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; - this.rightleg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1; - this.rightarm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1; - this.leftarm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; - this.rightWing.rotateAngleY = MathHelper.cos(0.1662F); - this.leftWing.rotateAngleY = MathHelper.cos(0.1662F + (float) Math.PI); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelIceDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelIceDemon.java deleted file mode 100644 index 9c6d3c32..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelIceDemon.java +++ /dev/null @@ -1,197 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; - -public class ModelIceDemon extends ModelBase -{ - //fields - ModelRenderer head; - ModelRenderer leftHorn; - ModelRenderer rightHorn; - ModelRenderer body; - ModelRenderer leftArm; - ModelRenderer leftWrist; - ModelRenderer leftIcicle1; - ModelRenderer leftIcicle2; - ModelRenderer leftIcicle3; - ModelRenderer leftLeg; - ModelRenderer rightArm; - ModelRenderer rightWrist; - ModelRenderer rightIcicle1; - ModelRenderer rightIcicle2; - ModelRenderer rightIcicle3; - ModelRenderer rightLeg; - ModelRenderer Shape1; - - public ModelIceDemon() - { - textureWidth = 64; - textureHeight = 64; - head = new ModelRenderer(this, 40, 0); - head.addBox(-3F, -8F, -3F, 6, 8, 6); - head.setRotationPoint(0F, -3F, 0F); - head.setTextureSize(64, 64); - head.mirror = true; - setRotation(head, 0F, 0F, 0F); - leftHorn = new ModelRenderer(this, 0, 0); - leftHorn.addBox(3F, -7F, 2F, 1, 1, 10); - leftHorn.setRotationPoint(0F, -3F, 0F); - leftHorn.setTextureSize(64, 64); - leftHorn.mirror = true; - setRotation(leftHorn, 0.4363323F, 0F, 0F); - rightHorn = new ModelRenderer(this, 0, 0); - rightHorn.mirror = true; - rightHorn.addBox(-4F, -7F, 2F, 1, 1, 10); - rightHorn.setRotationPoint(0F, -3F, 0F); - rightHorn.setTextureSize(64, 64); - rightHorn.mirror = true; - setRotation(rightHorn, 0.4363323F, 0F, 0F); - rightHorn.mirror = false; - body = new ModelRenderer(this, 40, 15); - body.addBox(-4F, 0F, -2F, 8, 13, 4); - body.setRotationPoint(0F, -3F, 0F); - body.setTextureSize(64, 64); - body.mirror = true; - setRotation(body, 0F, 0F, 0F); - leftArm = new ModelRenderer(this, 0, 48); - leftArm.addBox(0F, -2F, -2F, 4, 12, 4); - leftArm.setRotationPoint(4F, -1F, 0F); - leftArm.setTextureSize(64, 64); - leftArm.mirror = true; - setRotation(leftArm, 0F, 0F, 0F); - leftWrist = new ModelRenderer(this, 32, 57); - leftWrist.addBox(0F, 6F, -2.5F, 5, 2, 5); - leftWrist.setRotationPoint(4F, -1F, 0F); - leftWrist.setTextureSize(64, 64); - leftWrist.mirror = true; - setRotation(leftWrist, 0F, 0F, 0F); - leftIcicle1 = new ModelRenderer(this, 0, 0); - leftIcicle1.addBox(4.9F, 0F, -0.5F, 1, 6, 1); - leftIcicle1.setRotationPoint(4F, -1F, 0F); - leftIcicle1.setTextureSize(64, 64); - leftIcicle1.mirror = true; - setRotation(leftIcicle1, 0F, 0F, 0.1396263F); - leftIcicle2 = new ModelRenderer(this, 0, 0); - leftIcicle2.addBox(5F, 0F, 0F, 1, 6, 1); - leftIcicle2.setRotationPoint(4F, -1F, 0F); - leftIcicle2.setTextureSize(64, 64); - leftIcicle2.mirror = true; - setRotation(leftIcicle2, 0F, 0.5585054F, 0.1919862F); - leftIcicle3 = new ModelRenderer(this, 0, 0); - leftIcicle3.addBox(5F, 0F, -1F, 1, 6, 1); - leftIcicle3.setRotationPoint(4F, -1F, 0F); - leftIcicle3.setTextureSize(64, 64); - leftIcicle3.mirror = true; - setRotation(leftIcicle3, 0F, -0.5585054F, 0.1919862F); - leftLeg = new ModelRenderer(this, 16, 46); - leftLeg.addBox(-2F, 0F, -2F, 4, 14, 4); - leftLeg.setRotationPoint(2F, 10F, 0F); - leftLeg.setTextureSize(64, 64); - leftLeg.mirror = true; - setRotation(leftLeg, 0F, 0F, 0F); - rightArm = new ModelRenderer(this, 0, 48); - rightArm.mirror = true; - rightArm.addBox(-4F, -2F, -2F, 4, 12, 4); - rightArm.setRotationPoint(-4F, -1F, 0F); - rightArm.setTextureSize(64, 64); - rightArm.mirror = true; - setRotation(rightArm, 0F, 0F, 0F); - rightArm.mirror = false; - rightWrist = new ModelRenderer(this, 32, 57); - rightWrist.mirror = true; - rightWrist.addBox(-5F, 6F, -2.5F, 5, 2, 5); - rightWrist.setRotationPoint(-4F, -1F, 0F); - rightWrist.setTextureSize(64, 64); - rightWrist.mirror = true; - setRotation(rightWrist, 0F, 0F, 0F); - rightWrist.mirror = false; - rightIcicle1 = new ModelRenderer(this, 0, 0); - rightIcicle1.addBox(-5.9F, 0F, -0.5F, 1, 6, 1); - rightIcicle1.setRotationPoint(-4F, -1F, 0F); - rightIcicle1.setTextureSize(64, 64); - rightIcicle1.mirror = true; - setRotation(rightIcicle1, 0F, 0F, -0.1396263F); - rightIcicle2 = new ModelRenderer(this, 0, 0); - rightIcicle2.addBox(-6F, 0F, 0F, 1, 6, 1); - rightIcicle2.setRotationPoint(-4F, -1F, 0F); - rightIcicle2.setTextureSize(64, 64); - rightIcicle2.mirror = true; - setRotation(rightIcicle2, 0F, -0.5585054F, -0.1919862F); - rightIcicle3 = new ModelRenderer(this, 0, 0); - rightIcicle3.addBox(-6F, 0F, -1F, 1, 6, 1); - rightIcicle3.setRotationPoint(-4F, -1F, 0F); - rightIcicle3.setTextureSize(64, 64); - rightIcicle3.mirror = true; - setRotation(rightIcicle3, 0F, 0.5585054F, -0.1919862F); - rightLeg = new ModelRenderer(this, 16, 46); - rightLeg.mirror = true; - rightLeg.addBox(-2F, 0F, -2F, 4, 14, 4); - rightLeg.setRotationPoint(-2F, 10F, 0F); - rightLeg.setTextureSize(64, 64); - rightLeg.mirror = true; - setRotation(rightLeg, 0F, 0F, 0F); - rightLeg.mirror = false; - Shape1 = new ModelRenderer(this, 0, 12); - Shape1.addBox(-0.5F, 0F, -0.5F, 1, 10, 1); - Shape1.setRotationPoint(0F, 8F, 1.5F); - Shape1.setTextureSize(64, 64); - Shape1.mirror = true; - setRotation(Shape1, 0.5948578F, 0F, 0F); - } - - 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); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - head.render(f5); - leftHorn.render(f5); - rightHorn.render(f5); - body.render(f5); - leftArm.render(f5); - leftWrist.render(f5); - leftIcicle1.render(f5); - leftIcicle2.render(f5); - leftIcicle3.render(f5); - leftLeg.render(f5); - rightArm.render(f5); - rightWrist.render(f5); - rightIcicle1.render(f5); - rightIcicle2.render(f5); - rightIcicle3.render(f5); - rightLeg.render(f5); - Shape1.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.head.rotateAngleX = f4 / (180F / (float) Math.PI); - this.head.rotateAngleY = f3 / (180F / (float) Math.PI); - this.leftLeg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; - this.rightLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1; - this.rightArm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1; - this.leftArm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; - this.leftHorn.rotateAngleX = head.rotateAngleX + 0.4363323F; - this.leftHorn.rotateAngleY = head.rotateAngleY; - this.rightHorn.rotateAngleX = head.rotateAngleX + 0.4363323F; - this.rightHorn.rotateAngleY = head.rotateAngleY; - this.rightIcicle1.rotateAngleX = rightArm.rotateAngleX; - this.rightIcicle2.rotateAngleX = rightArm.rotateAngleX; - this.rightIcicle3.rotateAngleX = rightArm.rotateAngleX; - this.leftIcicle1.rotateAngleX = leftArm.rotateAngleX; - this.leftIcicle2.rotateAngleX = leftArm.rotateAngleX; - this.leftIcicle3.rotateAngleX = leftArm.rotateAngleX; - this.rightWrist.rotateAngleX = rightArm.rotateAngleX; - this.leftWrist.rotateAngleX = leftArm.rotateAngleX; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelLowerGuardian.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelLowerGuardian.java deleted file mode 100644 index 61d7b85d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelLowerGuardian.java +++ /dev/null @@ -1,207 +0,0 @@ -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; - -public class ModelLowerGuardian extends ModelBase -{ - //fields - ModelRenderer Body; - ModelRenderer Torso; - ModelRenderer Head; - ModelRenderer leftArm; - ModelRenderer rightArm; - ModelRenderer leftLeg; - ModelRenderer leftFoot; - ModelRenderer rightLeg; - ModelRenderer rightFoot; - ModelRenderer leftHorn; - ModelRenderer hornAppendage1; - ModelRenderer hornAppendage2; - ModelRenderer rightHorn; - ModelRenderer hornAppendage3; - ModelRenderer hornAppendage4; - - public ModelLowerGuardian() - { - textureWidth = 64; - textureHeight = 64; - Body = new ModelRenderer(this, 0, 0); - Body.addBox(-8F, -7F, -4F, 16, 14, 8); - Body.setRotationPoint(0F, -3F, 0F); - Body.setTextureSize(64, 64); - Body.mirror = true; - setRotation(Body, 0F, 0F, 0F); - Torso = new ModelRenderer(this, 0, 25); - Torso.addBox(-4F, 0F, -3F, 8, 4, 6); - Torso.setRotationPoint(0F, 4F, 0F); - Torso.setTextureSize(64, 64); - Torso.mirror = true; - setRotation(Torso, 0F, 0F, 0F); - Head = new ModelRenderer(this, 29, 25); - Head.addBox(-4F, -8F, -4F, 8, 8, 8); - Head.setRotationPoint(0F, -10F, 0F); - Head.setTextureSize(64, 64); - Head.mirror = true; - setRotation(Head, 0F, 0F, 0F); - leftArm = new ModelRenderer(this, 17, 42); - leftArm.addBox(0F, -2F, -2F, 4, 18, 4); - leftArm.setRotationPoint(8F, -8F, 0F); - leftArm.setTextureSize(64, 64); - leftArm.mirror = true; - setRotation(leftArm, 0F, 0F, 0F); - rightArm = new ModelRenderer(this, 17, 42); - rightArm.mirror = true; - rightArm.addBox(-4F, -2F, -2F, 4, 18, 4); - rightArm.setRotationPoint(-8F, -8F, 0F); - rightArm.setTextureSize(64, 64); - rightArm.mirror = true; - setRotation(rightArm, 0F, 0F, 0F); - rightArm.mirror = false; - leftLeg = new ModelRenderer(this, 0, 42); - leftLeg.addBox(0F, -2F, -2F, 4, 17, 4); - leftLeg.setRotationPoint(4F, 6F, 0F); - leftLeg.setTextureSize(64, 64); - leftLeg.mirror = true; - setRotation(leftLeg, 0F, 0F, 0F); - leftFoot = new ModelRenderer(this, 34, 42); - leftFoot.addBox(0F, 15F, -6F, 4, 3, 8); - leftFoot.setRotationPoint(4F, 6F, 0F); - leftFoot.setTextureSize(64, 64); - leftFoot.mirror = true; - setRotation(leftFoot, 0F, 0F, 0F); - rightLeg = new ModelRenderer(this, 0, 42); - rightLeg.mirror = true; - rightLeg.addBox(-4F, -2F, -2F, 4, 17, 4); - rightLeg.setRotationPoint(-4F, 6F, 0F); - rightLeg.setTextureSize(64, 64); - rightLeg.mirror = true; - setRotation(rightLeg, 0F, 0F, 0F); - rightLeg.mirror = false; - rightFoot = new ModelRenderer(this, 34, 42); - rightFoot.mirror = true; - rightFoot.addBox(-4F, 15F, -6F, 4, 3, 8); - rightFoot.setRotationPoint(-4F, 6F, 0F); - rightFoot.setTextureSize(64, 64); - rightFoot.mirror = true; - setRotation(rightFoot, 0F, 0F, 0F); - rightFoot.mirror = false; - leftHorn = new ModelRenderer(this, 0, 0); - leftHorn.addBox(4F, -11F, 0F, 1, 6, 1); - leftHorn.setRotationPoint(0F, -10F, 0F); - leftHorn.setTextureSize(64, 64); - leftHorn.mirror = true; - setRotation(leftHorn, 0F, 0F, 0F); - hornAppendage1 = new ModelRenderer(this, 0, 0); - hornAppendage1.addBox(4F, -7F, -1F, 1, 1, 1); - hornAppendage1.setRotationPoint(0F, -10F, 0F); - hornAppendage1.setTextureSize(64, 64); - hornAppendage1.mirror = true; - setRotation(hornAppendage1, 0F, 0F, 0F); - hornAppendage2 = new ModelRenderer(this, 0, 0); - hornAppendage2.addBox(4F, -6F, 1F, 1, 1, 1); - hornAppendage2.setRotationPoint(0F, -10F, 0F); - hornAppendage2.setTextureSize(64, 64); - hornAppendage2.mirror = true; - setRotation(hornAppendage2, 0F, 0F, 0F); - rightHorn = new ModelRenderer(this, 0, 0); - rightHorn.mirror = true; - rightHorn.addBox(-5F, -11F, 0F, 1, 6, 1); - rightHorn.setRotationPoint(0F, -10F, 0F); - rightHorn.setTextureSize(64, 64); - rightHorn.mirror = true; - setRotation(rightHorn, 0F, 0F, 0F); - rightHorn.mirror = false; - hornAppendage3 = new ModelRenderer(this, 0, 0); - hornAppendage3.mirror = true; - hornAppendage3.addBox(-5F, -7F, -1F, 1, 1, 1); - hornAppendage3.setRotationPoint(0F, -10F, 0F); - hornAppendage3.setTextureSize(64, 64); - hornAppendage3.mirror = true; - setRotation(hornAppendage3, 0F, 0F, 0F); - hornAppendage3.mirror = false; - hornAppendage4 = new ModelRenderer(this, 0, 0); - hornAppendage4.mirror = true; - hornAppendage4.addBox(-5F, -6F, 1F, 1, 1, 1); - hornAppendage4.setRotationPoint(0F, -10F, 0F); - hornAppendage4.setTextureSize(64, 64); - hornAppendage4.mirror = true; - setRotation(hornAppendage4, 0F, 0F, 0F); - hornAppendage4.mirror = false; - } - - 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); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Body.render(f5); - Torso.render(f5); - Head.render(f5); - leftArm.render(f5); - rightArm.render(f5); - leftLeg.render(f5); - leftFoot.render(f5); - rightLeg.render(f5); - rightFoot.render(f5); - leftHorn.render(f5); - hornAppendage1.render(f5); - hornAppendage2.render(f5); - rightHorn.render(f5); - hornAppendage3.render(f5); - hornAppendage4.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setLivingAnimations(EntityLivingBase par1EntityLivingBase, float par2, float par3, float par4) - { - EntityLowerGuardian entityLowerGuardian = (EntityLowerGuardian) par1EntityLivingBase; - int i = entityLowerGuardian.getAttackTimer(); - - if (i > 0) - { - this.rightLeg.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float) i - par4, 10.0F); - this.rightFoot.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float) i - par4, 10.0F); - //this.ironGolemLeftArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - par4, 10.0F); - } - } - - private float func_78172_a(float par1, float par2) - { - return (Math.abs(par1 % par2 - par2 * 0.5F) - par2 * 0.25F) / (par2 * 0.25F); - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.Head.rotateAngleX = f4 / (180F / (float) Math.PI); - this.Head.rotateAngleY = f3 / (180F / (float) Math.PI); - this.leftLeg.rotateAngleX = MathHelper.cos(f * 0.3662F) * 1.0F * f1; - this.rightLeg.rotateAngleX = MathHelper.cos(f * 0.3662F + (float) Math.PI) * 1.0F * f1; - this.leftFoot.rotateAngleX = MathHelper.cos(f * 0.3662F) * 1.0F * f1; - this.rightFoot.rotateAngleX = MathHelper.cos(f * 0.3662F + (float) Math.PI) * 1.0F * f1; - this.rightArm.rotateAngleX = MathHelper.cos(f * 0.3662F + (float) Math.PI) * 1.0F * f1; - this.leftArm.rotateAngleX = MathHelper.cos(f * 0.3662F) * 1.0F * f1; - this.hornAppendage1.rotateAngleX = this.Head.rotateAngleX; - this.hornAppendage1.rotateAngleY = this.Head.rotateAngleY; - this.hornAppendage2.rotateAngleX = this.Head.rotateAngleX; - this.hornAppendage2.rotateAngleY = this.Head.rotateAngleY; - this.hornAppendage3.rotateAngleX = this.Head.rotateAngleX; - this.hornAppendage3.rotateAngleY = this.Head.rotateAngleY; - this.hornAppendage4.rotateAngleX = this.Head.rotateAngleX; - this.hornAppendage4.rotateAngleY = this.Head.rotateAngleY; - this.leftHorn.rotateAngleX = this.Head.rotateAngleX; - this.leftHorn.rotateAngleY = this.Head.rotateAngleY; - this.rightHorn.rotateAngleX = this.Head.rotateAngleX; - this.rightHorn.rotateAngleY = this.Head.rotateAngleY; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMeteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMeteor.java deleted file mode 100644 index 26a94989..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMeteor.java +++ /dev/null @@ -1,90 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -public class ModelMeteor extends ModelBase -{ - //fields - ModelRenderer Shape1; - ModelRenderer Shape2; - ModelRenderer Shape3; - ModelRenderer Shape4; - ModelRenderer Shape5; - ModelRenderer Shape6; - ModelRenderer Shape7; - - public ModelMeteor() - { - textureWidth = 64; - textureHeight = 64; - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(-8F, -8F, -8F, 16, 16, 16); - Shape1.setRotationPoint(0F, 0F, 0F); - Shape1.setTextureSize(64, 64); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - Shape2 = new ModelRenderer(this, 0, 32); - Shape2.addBox(3F, -10F, -1F, 12, 12, 12); - Shape2.setRotationPoint(0F, 0F, 0F); - Shape2.setTextureSize(64, 64); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - Shape3 = new ModelRenderer(this, 0, 32); - Shape3.addBox(0F, 0F, -10F, 12, 12, 12); - Shape3.setRotationPoint(0F, 0F, 0F); - Shape3.setTextureSize(64, 64); - Shape3.mirror = true; - setRotation(Shape3, 0F, 0F, 0F); - Shape4 = new ModelRenderer(this, 0, 32); - Shape4.addBox(1F, 2F, 2F, 12, 12, 12); - Shape4.setRotationPoint(0F, 0F, 0F); - Shape4.setTextureSize(64, 64); - Shape4.mirror = true; - setRotation(Shape4, 0F, 0F, 0F); - Shape5 = new ModelRenderer(this, 0, 32); - Shape5.addBox(-12F, -5F, 0F, 12, 12, 12); - Shape5.setRotationPoint(0F, 0F, 0F); - Shape5.setTextureSize(64, 64); - Shape5.mirror = true; - setRotation(Shape5, 0F, 0F, 0F); - Shape6 = new ModelRenderer(this, 0, 32); - Shape6.addBox(-13F, -2F, -11F, 12, 12, 12); - Shape6.setRotationPoint(0F, 0F, 0F); - Shape6.setTextureSize(64, 64); - Shape6.mirror = true; - setRotation(Shape6, 0F, 0F, 0F); - Shape7 = new ModelRenderer(this, 0, 32); - Shape7.addBox(-6F, -14F, -9F, 12, 12, 12); - Shape7.setRotationPoint(0F, 0F, 0F); - Shape7.setTextureSize(64, 64); - Shape7.mirror = true; - setRotation(Shape7, 0F, 0F, 0F); - } - - 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); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Shape1.render(f5); - Shape2.render(f5); - Shape3.render(f5); - Shape4.render(f5); - Shape5.render(f5); - Shape6.render(f5); - Shape7.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMinorDemonGrunt.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMinorDemonGrunt.java deleted file mode 100644 index 4519617d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMinorDemonGrunt.java +++ /dev/null @@ -1,113 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; - -public class ModelMinorDemonGrunt extends ModelBase -{ - //fields - ModelRenderer head; - ModelRenderer chest; - ModelRenderer midrift; - ModelRenderer rightarm; - ModelRenderer leftarm; - ModelRenderer rightleg; - ModelRenderer leftleg; - ModelRenderer middle; - - public ModelMinorDemonGrunt() - { - textureWidth = 128; - textureHeight = 64; - - head = new ModelRenderer(this, 0, 0); - head.addBox(-4F, -8F, -4F, 8, 8, 8); - head.setRotationPoint(0F, 0F, 0F); - head.setTextureSize(128, 64); - head.mirror = true; - setRotation(head, 0F, 0F, 0F); - chest = new ModelRenderer(this, 16, 16); - chest.addBox(-5F, 0F, -3.5F, 10, 7, 7); - chest.setRotationPoint(0F, 0F, 0F); - chest.setTextureSize(128, 64); - chest.mirror = true; - setRotation(chest, 0F, 0F, 0F); - midrift = new ModelRenderer(this, 16, 33); - midrift.addBox(-4F, 7F, -2F, 8, 5, 4); - midrift.setRotationPoint(0F, 0F, 0F); - midrift.setTextureSize(128, 64); - midrift.mirror = true; - setRotation(midrift, 0F, 0F, 0F); - rightarm = new ModelRenderer(this, 50, 16); - rightarm.mirror = true; - rightarm.addBox(-3F, -2F, -2F, 4, 12, 4); - rightarm.setRotationPoint(-6F, 2F, 0F); - rightarm.setTextureSize(128, 64); - rightarm.mirror = true; - setRotation(rightarm, 0F, 0F, 0F); - rightarm.mirror = false; - leftarm = new ModelRenderer(this, 50, 16); - leftarm.addBox(-1F, -2F, -2F, 4, 12, 4); - leftarm.setRotationPoint(6F, 2F, 0F); - leftarm.setTextureSize(128, 64); - leftarm.mirror = true; - setRotation(leftarm, 0F, 0F, 0F); - rightleg = new ModelRenderer(this, 0, 16); - rightleg.mirror = true; - rightleg.addBox(-2F, 0F, -2F, 4, 12, 4); - rightleg.setRotationPoint(-2F, 12F, 0F); - rightleg.setTextureSize(128, 64); - rightleg.mirror = true; - setRotation(rightleg, 0F, 0F, 0F); - rightleg.mirror = false; - leftleg = new ModelRenderer(this, 0, 16); - leftleg.addBox(-2F, 0F, -2F, 4, 12, 4); - leftleg.setRotationPoint(2F, 12F, 0F); - leftleg.setTextureSize(128, 64); - leftleg.mirror = true; - setRotation(leftleg, 0F, 0F, 0F); - middle = new ModelRenderer(this, 16, 43); - middle.addBox(-2F, 7F, -3F, 4, 3, 1); - middle.setRotationPoint(0F, 0F, 0F); - middle.setTextureSize(128, 64); - middle.mirror = true; - setRotation(middle, 0F, 0F, 0F); - } - - 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); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - head.render(f5); - chest.render(f5); - midrift.render(f5); - rightarm.render(f5); - leftarm.render(f5); - rightleg.render(f5); - leftleg.render(f5); - middle.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - - this.head.rotateAngleX = f4 / (180F / (float) Math.PI); - this.head.rotateAngleY = f3 / (180F / (float) Math.PI); - - this.leftleg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; - this.rightleg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.0F * f1; - this.rightarm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.0F * f1; - this.leftarm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; - } - -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMinorDemonGruntGuardian.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMinorDemonGruntGuardian.java deleted file mode 100644 index 663d5db1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelMinorDemonGruntGuardian.java +++ /dev/null @@ -1,181 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; - -public class ModelMinorDemonGruntGuardian extends ModelBase -{ - //fields - ModelRenderer head; - ModelRenderer chest; - ModelRenderer midrift; - ModelRenderer rightarm; - ModelRenderer leftarm; - ModelRenderer rightleg; - ModelRenderer leftleg; - ModelRenderer middle; - ModelRenderer helmet; - ModelRenderer leftClaw; - ModelRenderer rightClaw; - ModelRenderer leftShoulder; - ModelRenderer rightShoulder; - ModelRenderer bar1; - ModelRenderer bar2; - - public ModelMinorDemonGruntGuardian() - { - textureWidth = 128; - textureHeight = 64; - - head = new ModelRenderer(this, 0, 0); - head.addBox(-4F, -8F, -4F, 8, 8, 8); - head.setRotationPoint(0F, 0F, 0F); - head.setTextureSize(128, 64); - head.mirror = true; - setRotation(head, 0F, 0F, 0F); - chest = new ModelRenderer(this, 16, 16); - chest.addBox(-5F, 0F, -3.5F, 10, 7, 7); - chest.setRotationPoint(0F, 0F, 0F); - chest.setTextureSize(128, 64); - chest.mirror = true; - setRotation(chest, 0F, 0F, 0F); - midrift = new ModelRenderer(this, 16, 33); - midrift.addBox(-4F, 7F, -2F, 8, 5, 4); - midrift.setRotationPoint(0F, 0F, 0F); - midrift.setTextureSize(128, 64); - midrift.mirror = true; - setRotation(midrift, 0F, 0F, 0F); - rightarm = new ModelRenderer(this, 50, 16); - rightarm.mirror = true; - rightarm.addBox(-3F, -2F, -2F, 4, 12, 4); - rightarm.setRotationPoint(-6F, 2F, 0F); - rightarm.setTextureSize(128, 64); - rightarm.mirror = true; - setRotation(rightarm, 0F, 0F, 0F); - rightarm.mirror = false; - leftarm = new ModelRenderer(this, 50, 16); - leftarm.addBox(-1F, -2F, -2F, 4, 12, 4); - leftarm.setRotationPoint(6F, 2F, 0F); - leftarm.setTextureSize(128, 64); - leftarm.mirror = true; - setRotation(leftarm, 0F, 0F, 0F); - rightleg = new ModelRenderer(this, 0, 16); - rightleg.mirror = true; - rightleg.addBox(-2F, 0F, -2F, 4, 12, 4); - rightleg.setRotationPoint(-2F, 12F, 0F); - rightleg.setTextureSize(128, 64); - rightleg.mirror = true; - setRotation(rightleg, 0F, 0F, 0F); - rightleg.mirror = false; - leftleg = new ModelRenderer(this, 0, 16); - leftleg.addBox(-2F, 0F, -2F, 4, 12, 4); - leftleg.setRotationPoint(2F, 12F, 0F); - leftleg.setTextureSize(128, 64); - leftleg.mirror = true; - setRotation(leftleg, 0F, 0F, 0F); - middle = new ModelRenderer(this, 16, 43); - middle.addBox(-2F, 7F, -3F, 4, 3, 1); - middle.setRotationPoint(0F, 0F, 0F); - middle.setTextureSize(128, 64); - middle.mirror = true; - setRotation(middle, 0F, 0F, 0F); - helmet = new ModelRenderer(this, 67, 0); - helmet.addBox(-4.5F, -8.5F, -4.5F, 9, 9, 9); - helmet.setRotationPoint(0F, 0F, 0F); - helmet.setTextureSize(128, 64); - helmet.mirror = true; - setRotation(helmet, 0F, 0F, 0F); - leftClaw = new ModelRenderer(this, 67, 23); - leftClaw.addBox(1.5F, 6F, -2.5F, 2, 6, 5); - leftClaw.setRotationPoint(6F, 2F, 0F); - leftClaw.setTextureSize(128, 64); - leftClaw.mirror = true; - setRotation(leftClaw, 0F, 0F, 0F); - rightClaw = new ModelRenderer(this, 67, 23); - rightClaw.mirror = true; - rightClaw.addBox(-3.5F, 6F, -2.5F, 2, 6, 5); - rightClaw.setRotationPoint(-6F, 2F, 0F); - rightClaw.setTextureSize(128, 64); - rightClaw.mirror = true; - setRotation(rightClaw, 0F, 0F, 0F); - rightClaw.mirror = false; - leftShoulder = new ModelRenderer(this, 67, 35); - leftShoulder.addBox(-1F, -2.5F, -2.5F, 5, 4, 5); - leftShoulder.setRotationPoint(6F, 2F, 0F); - leftShoulder.setTextureSize(128, 64); - leftShoulder.mirror = true; - setRotation(leftShoulder, 0F, 0F, 0F); - rightShoulder = new ModelRenderer(this, 67, 35); - rightShoulder.mirror = true; - rightShoulder.addBox(-4F, -2.5F, -2.5F, 5, 4, 5); - rightShoulder.setRotationPoint(-6F, 2F, 0F); - rightShoulder.setTextureSize(128, 64); - rightShoulder.mirror = true; - setRotation(rightShoulder, 0F, 0F, 0F); - rightShoulder.mirror = false; - bar1 = new ModelRenderer(this, 67, 20); - bar1.addBox(-3F, 3F, 4F, 14, 1, 1); - bar1.setRotationPoint(0F, 0F, 0F); - bar1.setTextureSize(128, 64); - bar1.mirror = true; - setRotation(bar1, 0F, 0F, 0.7853982F); - bar2 = new ModelRenderer(this, 67, 20); - bar2.addBox(-11F, 3F, 4F, 14, 1, 1); - bar2.setRotationPoint(0F, 0F, 0F); - bar2.setTextureSize(128, 64); - bar2.mirror = true; - setRotation(bar2, 0F, 0F, -0.7853982F); - } - - 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); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - head.render(f5); - chest.render(f5); - midrift.render(f5); - rightarm.render(f5); - leftarm.render(f5); - rightleg.render(f5); - leftleg.render(f5); - middle.render(f5); - helmet.render(f5); - leftClaw.render(f5); - rightClaw.render(f5); - leftShoulder.render(f5); - rightShoulder.render(f5); - bar1.render(f5); - bar2.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - - this.head.rotateAngleX = f4 / (180F / (float) Math.PI); - this.head.rotateAngleY = f3 / (180F / (float) Math.PI); - - this.helmet.rotateAngleX = this.head.rotateAngleX; - this.helmet.rotateAngleY = this.head.rotateAngleY; - - this.leftleg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; - this.rightleg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.0F * f1; - this.rightarm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.0F * f1; - this.leftarm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; - - this.leftClaw.rotateAngleX = this.leftarm.rotateAngleX; - this.leftShoulder.rotateAngleX = this.leftarm.rotateAngleX; - - this.rightClaw.rotateAngleX = this.rightarm.rotateAngleX; - this.rightShoulder.rotateAngleX = this.rightarm.rotateAngleX; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaArmour.java deleted file mode 100644 index f09589aa..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaArmour.java +++ /dev/null @@ -1,898 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBiped; -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 leftFacePlate; - ModelRenderer rightFacePlate; - ModelRenderer facePlate1; - ModelRenderer facePlate2; - ModelRenderer facePlate3; - ModelRenderer leftWingPlate1; - ModelRenderer leftWingPlate2; - ModelRenderer rightWingPlate1; - ModelRenderer rightWingPlate2; - ModelRenderer topPlate1; - ModelRenderer topPlate2; - ModelRenderer topPlate3; - ModelRenderer backPlate1; - ModelRenderer backPlate2; - ModelRenderer backPlate3; - ModelRenderer backPlate4; - ModelRenderer backPlate5; - ModelRenderer backPlate6; - ModelRenderer eyePlate; - ModelRenderer rightArmMain; - ModelRenderer rightKnucklePlate; - ModelRenderer rightKnuckleBrace; - ModelRenderer rightKnuckle1; - ModelRenderer rightKnuckle2; - ModelRenderer rightKnuckle3; - ModelRenderer rightKnuckle4; - ModelRenderer rightKnuckle5; - ModelRenderer rightKnuckle6; - ModelRenderer rightShoulder1; - ModelRenderer rightShoulder2; - ModelRenderer rightShoulder3; - ModelRenderer mainPlate; - ModelRenderer chestPlate1; - ModelRenderer chestPlate2; - ModelRenderer chestPlate3; - ModelRenderer chestPlate4; - ModelRenderer chestPlate5; - ModelRenderer chestPlate6; - ModelRenderer belt; - ModelRenderer leftArmMain; - ModelRenderer leftKnucklePlate; - ModelRenderer leftKnuckleBrace; - ModelRenderer leftKnuckle1; - ModelRenderer leftKnuckle2; - ModelRenderer leftKnuckle3; - ModelRenderer leftKnuckle4; - ModelRenderer leftKnuckle5; - ModelRenderer leftKnuckle6; - ModelRenderer leftShoulder1; - ModelRenderer leftShoulder2; - ModelRenderer leftShoulder3; - ModelRenderer leftBootBottom; - ModelRenderer leftBootPlate; - ModelRenderer leftBootBrace; - ModelRenderer leftBootWing1; - ModelRenderer leftBootWing2; - ModelRenderer rightBootBottom; - ModelRenderer rightBootPlate; - ModelRenderer rightBootBrace; - ModelRenderer rightBootWing1; - ModelRenderer rightBootWing2; - ModelRenderer leftLegSidePlate; - ModelRenderer leftLegMain; - ModelRenderer leftLegPlate1; - ModelRenderer leftLegPlate2; - ModelRenderer leftLegPlate3; - ModelRenderer leftLegPlate4; - ModelRenderer rightLegSidePlate; - ModelRenderer rightLegMain; - ModelRenderer rightLegPlate1; - ModelRenderer rightLegPlate2; - ModelRenderer rightLegPlate3; - ModelRenderer rightLegPlate4; - - public ModelOmegaArmour(float f, boolean addHelmet, boolean addChestPiece, boolean addLeggings, boolean addBoots) - { - super(f, 0.0f, 128, 128); - textureWidth = 128; - textureHeight = 128; - -// 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); - } - - /* Helmet */ - { - leftFacePlate = new ModelRenderer(this, 66, 52); - leftFacePlate.addBox(-2F, -5F, -5F, 5, 4, 1); - leftFacePlate.setRotationPoint(0F, 0F, 0F); - leftFacePlate.setTextureSize(128, 128); - leftFacePlate.mirror = true; - setRotation(leftFacePlate, 0.296706F, -0.3490659F, -0.0872665F); - - rightFacePlate = new ModelRenderer(this, 66, 52); - rightFacePlate.mirror = true; - rightFacePlate.addBox(-3F, -5F, -5F, 5, 4, 1); - rightFacePlate.setRotationPoint(0F, 0F, 0F); - rightFacePlate.setTextureSize(128, 128); - rightFacePlate.mirror = true; - setRotation(rightFacePlate, 0.296706F, 0.3490659F, 0.0872665F); - rightFacePlate.mirror = false; - - facePlate1 = new ModelRenderer(this, 79, 52); - facePlate1.addBox(-5F, -8F, -5F, 10, 3, 1); - facePlate1.setRotationPoint(0F, 0F, 0F); - facePlate1.setTextureSize(128, 128); - facePlate1.mirror = true; - setRotation(facePlate1, 0F, 0F, 0F); - - facePlate2 = new ModelRenderer(this, 79, 57); - facePlate2.addBox(-1F, -5F, -5F, 2, 1, 1); - facePlate2.setRotationPoint(0F, 0F, 0F); - facePlate2.setTextureSize(128, 128); - facePlate2.mirror = true; - setRotation(facePlate2, 0F, 0F, 0F); - - facePlate3 = new ModelRenderer(this, 79, 60); - facePlate3.addBox(-3F, -4F, -5F, 6, 1, 1); - facePlate3.setRotationPoint(0F, 0F, 0F); - facePlate3.setTextureSize(128, 128); - facePlate3.mirror = true; - setRotation(facePlate3, 0F, 0F, 0F); - - leftWingPlate1 = new ModelRenderer(this, 66, 58); - leftWingPlate1.addBox(5F, -5F, -2.5F, 1, 5, 8); - leftWingPlate1.setRotationPoint(0F, 0F, 0F); - leftWingPlate1.setTextureSize(128, 128); - leftWingPlate1.mirror = true; - setRotation(leftWingPlate1, 0.2617994F, 0.1745329F, 0F); - - leftWingPlate2 = new ModelRenderer(this, 66, 72); - leftWingPlate2.addBox(5F, -8F, -2F, 1, 3, 10); - leftWingPlate2.setRotationPoint(0F, 0F, 0F); - leftWingPlate2.setTextureSize(128, 128); - leftWingPlate2.mirror = true; - setRotation(leftWingPlate2, 0.2617994F, 0.1745329F, 0F); - - rightWingPlate1 = new ModelRenderer(this, 66, 58); - rightWingPlate1.mirror = true; - rightWingPlate1.addBox(-6F, -5F, -2.5F, 1, 5, 8); - rightWingPlate1.setRotationPoint(0F, 0F, 0F); - rightWingPlate1.setTextureSize(128, 128); - rightWingPlate1.mirror = true; - setRotation(rightWingPlate1, 0.2617994F, -0.1745329F, 0F); - rightWingPlate1.mirror = false; - - rightWingPlate2 = new ModelRenderer(this, 66, 72); - rightWingPlate2.mirror = true; - rightWingPlate2.addBox(-6F, -8F, -2F, 1, 3, 10); - rightWingPlate2.setRotationPoint(0F, 0F, 0F); - rightWingPlate2.setTextureSize(128, 128); - rightWingPlate2.mirror = true; - setRotation(rightWingPlate2, 0.2617994F, -0.1745329F, 0F); - rightWingPlate2.mirror = false; - - topPlate1 = new ModelRenderer(this, 79, 72); - topPlate1.addBox(-5F, -9F, -0.5F, 10, 1, 5); - topPlate1.setRotationPoint(0F, 0F, 0F); - topPlate1.setTextureSize(128, 128); - topPlate1.mirror = true; - setRotation(topPlate1, 0.4363323F, 0F, 0F); - - topPlate2 = new ModelRenderer(this, 79, 72); - topPlate2.addBox(-5F, -8F, 1.5F, 10, 1, 5); - topPlate2.setRotationPoint(0F, 0F, 0F); - topPlate2.setTextureSize(128, 128); - topPlate2.mirror = true; - setRotation(topPlate2, 0.4363323F, 0F, 0F); - - topPlate3 = new ModelRenderer(this, 79, 72); - topPlate3.addBox(-5F, -7F, 3.5F, 10, 1, 5); - topPlate3.setRotationPoint(0F, 0F, 0F); - topPlate3.setTextureSize(128, 128); - topPlate3.mirror = true; - setRotation(topPlate3, 0.4363323F, 0F, 0F); - - backPlate1 = new ModelRenderer(this, 66, 86); - backPlate1.mirror = true; - backPlate1.addBox(-4.5F, -7F, 6F, 6, 4, 1); - backPlate1.setRotationPoint(0F, 0F, 0F); - backPlate1.setTextureSize(128, 128); - backPlate1.mirror = true; - setRotation(backPlate1, 0.2617994F, -0.2617994F, 0F); - backPlate1.mirror = false; - - backPlate2 = new ModelRenderer(this, 66, 86); - backPlate2.mirror = true; - backPlate2.addBox(-4.5F, -6.5F, 6F, 6, 4, 1); - backPlate2.setRotationPoint(0F, 2F, 0F); - backPlate2.setTextureSize(128, 128); - backPlate2.mirror = true; - setRotation(backPlate2, 0.2617994F, -0.2617994F, 0F); - backPlate2.mirror = false; - - backPlate3 = new ModelRenderer(this, 66, 86); - backPlate3.mirror = true; - backPlate3.addBox(-4.5F, -6F, 6F, 6, 4, 1); - backPlate3.setRotationPoint(0F, 4F, 0F); - backPlate3.setTextureSize(128, 128); - backPlate3.mirror = true; - setRotation(backPlate3, 0.2617994F, -0.2617994F, 0F); - backPlate3.mirror = false; - - backPlate4 = new ModelRenderer(this, 66, 86); - backPlate4.addBox(-1.5F, -7F, 6F, 6, 4, 1); - backPlate4.setRotationPoint(0F, 0F, 0F); - backPlate4.setTextureSize(128, 128); - backPlate4.mirror = true; - setRotation(backPlate4, 0.2617994F, 0.2617994F, 0F); - - backPlate5 = new ModelRenderer(this, 66, 86); - backPlate5.addBox(-1.5F, -7F, 6F, 6, 4, 1); - backPlate5.setRotationPoint(0F, 2.5F, 0F); - backPlate5.setTextureSize(128, 128); - backPlate5.mirror = true; - setRotation(backPlate5, 0.2617994F, 0.2617994F, 0F); - - backPlate6 = new ModelRenderer(this, 66, 86); - backPlate6.addBox(-1.5F, -7F, 6F, 6, 4, 1); - backPlate6.setRotationPoint(0F, 5F, 0F); - backPlate6.setTextureSize(128, 128); - backPlate6.mirror = true; - setRotation(backPlate6, 0.2617994F, 0.2617994F, 0F); - - eyePlate = new ModelRenderer(this, 63, 38); - eyePlate.addBox(-4F, -5F, -4.5F, 8, 2, 1); - eyePlate.setRotationPoint(0F, 0F, 0F); - eyePlate.setTextureSize(128, 128); - eyePlate.mirror = true; - setRotation(eyePlate, 0F, 0F, 0F); - } - - /* Right arm */ - { - rightArmMain = new ModelRenderer(this, 0, 33); - rightArmMain.mirror = true; - rightArmMain.addBox(-3.5F, -2.5F, -2.5F, 5, 11, 5); - rightArmMain.setRotationPoint(0F, 0F, 0F); - rightArmMain.setTextureSize(128, 128); - rightArmMain.mirror = true; - setRotation(rightArmMain, 0F, 0F, 0F); - - rightKnucklePlate = new ModelRenderer(this, 0, 50); - rightKnucklePlate.addBox(-4F, 4F, -1.5F, 1, 5, 3); - rightKnucklePlate.setRotationPoint(0F, 0F, 0F); - rightKnucklePlate.setTextureSize(128, 128); - rightKnucklePlate.mirror = true; - setRotation(rightKnucklePlate, 0F, 0F, 0F); - - rightKnuckleBrace = new ModelRenderer(this, 9, 50); - rightKnuckleBrace.mirror = true; - rightKnuckleBrace.addBox(-4F, 3F, -3F, 2, 1, 6); - rightKnuckleBrace.setRotationPoint(0F, 0F, 0F); - rightKnuckleBrace.setTextureSize(128, 128); - setRotation(rightKnuckleBrace, 0F, 0F, 0F); - - rightKnuckle1 = new ModelRenderer(this, 0, 59); - rightKnuckle1.mirror = true; - rightKnuckle1.addBox(-4F, 7F, -2.5F, 1, 6, 1); - rightKnuckle1.setRotationPoint(0F, 0F, 0F); - rightKnuckle1.setTextureSize(128, 128); - setRotation(rightKnuckle1, 0F, 0F, 0F); - - rightKnuckle2 = new ModelRenderer(this, 5, 59); - rightKnuckle2.mirror = true; - rightKnuckle2.addBox(-3F, 11F, -2.5F, 1, 3, 1); - rightKnuckle2.setRotationPoint(0F, 0F, 0F); - rightKnuckle2.setTextureSize(128, 128); - setRotation(rightKnuckle2, 0F, 0F, 0F); - - rightKnuckle3 = new ModelRenderer(this, 0, 59); - rightKnuckle3.mirror = true; - rightKnuckle3.addBox(-4.5F, 8F, -0.5F, 1, 6, 1); - rightKnuckle3.setRotationPoint(0F, 0F, 0F); - rightKnuckle3.setTextureSize(128, 128); - setRotation(rightKnuckle3, 0F, 0F, 0F); - - rightKnuckle4 = new ModelRenderer(this, 5, 59); - rightKnuckle4.mirror = true; - rightKnuckle4.addBox(-3.5F, 12F, -0.5F, 1, 3, 1); - rightKnuckle4.setRotationPoint(0F, 0F, 0F); - rightKnuckle4.setTextureSize(128, 128); - setRotation(rightKnuckle4, 0F, 0F, 0F); - - rightKnuckle5 = new ModelRenderer(this, 0, 59); - rightKnuckle5.mirror = true; - rightKnuckle5.addBox(-4F, 7F, 1.5F, 1, 6, 1); - rightKnuckle5.setRotationPoint(0F, 0F, 0F); - rightKnuckle5.setTextureSize(128, 128); - setRotation(rightKnuckle5, 0F, 0F, 0F); - - rightKnuckle6 = new ModelRenderer(this, 5, 59); - rightKnuckle6.mirror = true; - rightKnuckle6.addBox(-3F, 11F, 1.5F, 1, 3, 1); - rightKnuckle6.setRotationPoint(0F, 0F, 0F); - rightKnuckle6.setTextureSize(128, 128); - setRotation(rightKnuckle6, 0F, 0F, 0F); - - rightShoulder1 = new ModelRenderer(this, 10, 59); - rightShoulder1.mirror = true; - rightShoulder1.addBox(-5F, -3F, -4F, 1, 4, 8); - rightShoulder1.setRotationPoint(0F, 0F, 0F); - rightShoulder1.setTextureSize(128, 128); - setRotation(rightShoulder1, 0F, 0F, 0.6981317F); - - rightShoulder2 = new ModelRenderer(this, 10, 59); - rightShoulder2.mirror = true; - rightShoulder2.addBox(-4F, -1.5F, -4F, 1, 4, 8); - rightShoulder2.setRotationPoint(0F, 0F, 0F); - rightShoulder2.setTextureSize(128, 128); - setRotation(rightShoulder2, 0F, 0F, 0.6981317F); - - rightShoulder3 = new ModelRenderer(this, 10, 59); - rightShoulder3.mirror = true; - rightShoulder3.addBox(-3F, 0F, -4F, 1, 4, 8); - rightShoulder3.setRotationPoint(0F, 0F, 0F); - rightShoulder3.setTextureSize(128, 128); - setRotation(rightShoulder3, 0F, 0F, 0.6981317F); - } - - /* Chest piece main body */ - { - mainPlate = new ModelRenderer(this, 31, 33); - mainPlate.addBox(-4.5F, -0.5F, -3F, 9, 12, 6); - mainPlate.setRotationPoint(0F, 0F, 0F); - mainPlate.setTextureSize(128, 128); - mainPlate.mirror = true; - setRotation(mainPlate, 0F, 0F, 0F); - - chestPlate1 = new ModelRenderer(this, 63, 33); - chestPlate1.addBox(-1.5F, 3F, -4.5F, 6, 2, 1); - chestPlate1.setRotationPoint(0F, -3F, -1F); - chestPlate1.setTextureSize(128, 128); - setRotation(chestPlate1, 0.3490659F, 0F, -0.2617994F); - - chestPlate2 = new ModelRenderer(this, 63, 33); - chestPlate2.addBox(-1.5F, 3F, -4.5F, 6, 2, 1); - chestPlate2.setRotationPoint(0F, -1.5F, -1F); - chestPlate2.setTextureSize(128, 128); - setRotation(chestPlate2, 0.3490659F, 0F, -0.2617994F); - - chestPlate3 = new ModelRenderer(this, 63, 33); - chestPlate3.addBox(-1.5F, 3F, -4.5F, 6, 2, 1); - chestPlate3.setRotationPoint(0F, 0F, -1F); - chestPlate3.setTextureSize(128, 128); - setRotation(chestPlate3, 0.3490659F, 0F, -0.2617994F); - - chestPlate4 = new ModelRenderer(this, 63, 33); - chestPlate4.mirror = true; - chestPlate4.addBox(-4.5F, 3F, -4.5F, 6, 2, 1); - chestPlate4.setRotationPoint(0F, -3F, -1F); - chestPlate4.setTextureSize(128, 128); - setRotation(chestPlate4, 0.3490659F, 0F, 0.2617994F); - - chestPlate5 = new ModelRenderer(this, 63, 33); - chestPlate5.mirror = true; - chestPlate5.addBox(-4.5F, 3F, -4.5F, 6, 2, 1); - chestPlate5.setRotationPoint(0F, -1.5F, -1F); - chestPlate5.setTextureSize(128, 128); - setRotation(chestPlate5, 0.3490659F, 0F, 0.2617994F); - - chestPlate6 = new ModelRenderer(this, 63, 33); - chestPlate6.mirror = true; - chestPlate6.addBox(-4.5F, 3F, -4.5F, 6, 2, 1); - chestPlate6.setRotationPoint(0F, 0F, -1F); - chestPlate6.setTextureSize(128, 128); - setRotation(chestPlate6, 0.3490659F, 0F, 0.2617994F); - } - - /* Left arm */ - { - leftArmMain = new ModelRenderer(this, 0, 33); - leftArmMain.addBox(-1.5F, -2.533333F, -2.5F, 5, 11, 5); - leftArmMain.setRotationPoint(0F, 0F, 0F); - leftArmMain.setTextureSize(128, 128); - leftArmMain.mirror = true; - setRotation(leftArmMain, 0F, 0F, 0F); - - leftKnucklePlate = new ModelRenderer(this, 0, 50); - leftKnucklePlate.addBox(3F, 4F, -1.5F, 1, 5, 3); - leftKnucklePlate.setRotationPoint(0F, 0F, 0F); - leftKnucklePlate.setTextureSize(128, 128); - leftKnucklePlate.mirror = true; - setRotation(leftKnucklePlate, 0F, 0F, 0F); - - leftKnuckleBrace = new ModelRenderer(this, 9, 50); - leftKnuckleBrace.addBox(2F, 3F, -3F, 2, 1, 6); - leftKnuckleBrace.setRotationPoint(0F, 0F, 0F); - leftKnuckleBrace.setTextureSize(128, 128); - leftKnuckleBrace.mirror = true; - setRotation(leftKnuckleBrace, 0F, 0F, 0F); - - leftKnuckle1 = new ModelRenderer(this, 0, 59); - leftKnuckle1.addBox(3F, 7F, -2.5F, 1, 6, 1); - leftKnuckle1.setRotationPoint(0F, 0F, 0F); - leftKnuckle1.setTextureSize(128, 128); - leftKnuckle1.mirror = true; - setRotation(leftKnuckle1, 0F, 0F, 0F); - - leftKnuckle2 = new ModelRenderer(this, 5, 59); - leftKnuckle2.addBox(2F, 11F, -2.5F, 1, 3, 1); - leftKnuckle2.setRotationPoint(0F, 0F, 0F); - leftKnuckle2.setTextureSize(128, 128); - leftKnuckle2.mirror = true; - setRotation(leftKnuckle2, 0F, 0F, 0F); - - leftKnuckle3 = new ModelRenderer(this, 0, 59); - leftKnuckle3.addBox(3.5F, 8F, -0.5F, 1, 6, 1); - leftKnuckle3.setRotationPoint(0F, 0F, 0F); - leftKnuckle3.setTextureSize(128, 128); - leftKnuckle3.mirror = true; - setRotation(leftKnuckle3, 0F, 0F, 0F); - - leftKnuckle4 = new ModelRenderer(this, 5, 59); - leftKnuckle4.addBox(2.5F, 12F, -0.5F, 1, 3, 1); - leftKnuckle4.setRotationPoint(0F, 0F, 0F); - leftKnuckle4.setTextureSize(128, 128); - leftKnuckle4.mirror = true; - setRotation(leftKnuckle4, 0F, 0F, 0F); - - leftKnuckle5 = new ModelRenderer(this, 0, 59); - leftKnuckle5.addBox(3F, 7F, 1.5F, 1, 6, 1); - leftKnuckle5.setRotationPoint(0F, 0F, 0F); - leftKnuckle5.setTextureSize(128, 128); - leftKnuckle5.mirror = true; - setRotation(leftKnuckle5, 0F, 0F, 0F); - - leftKnuckle6 = new ModelRenderer(this, 5, 59); - leftKnuckle6.addBox(2F, 11F, 1.5F, 1, 3, 1); - leftKnuckle6.setRotationPoint(0F, 0F, 0F); - leftKnuckle6.setTextureSize(128, 128); - leftKnuckle6.mirror = true; - setRotation(leftKnuckle6, 0F, 0F, 0F); - - leftShoulder1 = new ModelRenderer(this, 10, 59); - leftShoulder1.addBox(4F, -3F, -4F, 1, 4, 8); - leftShoulder1.setRotationPoint(0F, 0F, 0F); - leftShoulder1.setTextureSize(128, 128); - leftShoulder1.mirror = true; - setRotation(leftShoulder1, 0F, 0F, -0.6981317F); - - leftShoulder2 = new ModelRenderer(this, 10, 59); - leftShoulder2.addBox(3F, -1.5F, -4F, 1, 4, 8); - leftShoulder2.setRotationPoint(0F, 0F, 0F); - leftShoulder2.setTextureSize(128, 128); - leftShoulder2.mirror = true; - setRotation(leftShoulder2, 0F, 0F, -0.6981317F); - - leftShoulder3 = new ModelRenderer(this, 10, 59); - leftShoulder3.addBox(2F, 0F, -4F, 1, 4, 8); - leftShoulder3.setRotationPoint(0F, 0F, 0F); - leftShoulder3.setTextureSize(128, 128); - leftShoulder3.mirror = true; - setRotation(leftShoulder3, 0F, 0F, -0.6981317F); - } - - /* Left boot */ - { - leftBootBottom = new ModelRenderer(this, 0, 84); - leftBootBottom.addBox(-2.5F, 9.5F, -5.5F, 6, 3, 8); - leftBootBottom.setRotationPoint(0F, 0F, 0F); - leftBootBottom.setTextureSize(128, 128); - leftBootBottom.mirror = true; - setRotation(leftBootBottom, 0F, 0F, 0F); - - leftBootPlate = new ModelRenderer(this, 0, 96); - leftBootPlate.addBox(-2F, 6F, 6F, 5, 3, 1); - leftBootPlate.setRotationPoint(0F, 0F, 0F); - leftBootPlate.setTextureSize(128, 128); - leftBootPlate.mirror = true; - setRotation(leftBootPlate, -1.151917F, 0F, 0F); - - leftBootBrace = new ModelRenderer(this, 0, 72); - leftBootBrace.addBox(-2F, 7F, -3F, 5, 3, 6); - leftBootBrace.setRotationPoint(0F, 0F, 0F); - leftBootBrace.setTextureSize(128, 128); - leftBootBrace.mirror = true; - setRotation(leftBootBrace, 0F, 0F, 0F); - - leftBootWing1 = new ModelRenderer(this, 13, 96); - leftBootWing1.addBox(3F, 7F, -4F, 1, 1, 7); - leftBootWing1.setRotationPoint(0F, 0F, 0F); - leftBootWing1.setTextureSize(128, 128); - leftBootWing1.mirror = true; - setRotation(leftBootWing1, 0.2617994F, 0.1745329F, 0F); - - leftBootWing2 = new ModelRenderer(this, 13, 96); - leftBootWing2.addBox(3F, 8F, -5F, 1, 1, 7); - leftBootWing2.setRotationPoint(0F, 0F, 0F); - leftBootWing2.setTextureSize(128, 128); - leftBootWing2.mirror = true; - setRotation(leftBootWing2, 0.2617994F, 0.1745329F, 0F); - } - - - /* Right boot */ - { - rightBootBottom = new ModelRenderer(this, 0, 84); - rightBootBottom.mirror = true; - rightBootBottom.addBox(-3.5F, 9.5F, -5.5F, 6, 3, 8); - rightBootBottom.setRotationPoint(0F, 0F, 0F); - rightBootBottom.setTextureSize(128, 128); - setRotation(rightBootBottom, 0F, 0F, 0F); - - rightBootPlate = new ModelRenderer(this, 0, 96); - rightBootPlate.mirror = true; - rightBootPlate.addBox(-3F, 6F, 6F, 5, 3, 1); - rightBootPlate.setRotationPoint(0F, 0F, 0F); - rightBootPlate.setTextureSize(128, 128); - setRotation(rightBootPlate, -1.151917F, 0F, 0F); - - rightBootBrace = new ModelRenderer(this, 0, 72); - rightBootBrace.mirror = true; - rightBootBrace.addBox(-3F, 7F, -3F, 5, 3, 6); - rightBootBrace.setRotationPoint(0F, 0F, 0F); - rightBootBrace.setTextureSize(128, 128); - setRotation(rightBootBrace, 0F, 0F, 0F); - - rightBootWing1 = new ModelRenderer(this, 13, 96); - rightBootWing1.mirror = true; - rightBootWing1.addBox(-4F, 7F, -4F, 1, 1, 7); - rightBootWing1.setRotationPoint(0F, 0F, 0F); - rightBootWing1.setTextureSize(128, 128); - setRotation(rightBootWing1, 0.2617994F, -0.1745329F, 0F); - - rightBootWing2 = new ModelRenderer(this, 13, 96); - rightBootWing2.mirror = true; - rightBootWing2.addBox(-4F, 8F, -5F, 1, 1, 7); - rightBootWing2.setRotationPoint(0F, 0F, 0F); - rightBootWing2.setTextureSize(128, 128); - setRotation(rightBootWing2, 0.2617994F, -0.1745329F, 0F); - } - - /* Main legs */ - { - belt = new ModelRenderer(this, 31, 52); - belt.addBox(-5F, 9.5F, -3.5F, 10, 2, 7); - belt.setRotationPoint(0F, 0F, 0F); - belt.setTextureSize(128, 128); - belt.mirror = true; - setRotation(belt, 0F, 0F, 0F); - } - - /* Left leg */ - { - leftLegSidePlate = new ModelRenderer(this, 40, 93); - leftLegSidePlate.addBox(-0.5F, 12F, -3F, 1, 6, 6); - leftLegSidePlate.setRotationPoint(-2F, -12F, 0F); - leftLegSidePlate.setTextureSize(128, 128); - leftLegSidePlate.mirror = true; - setRotation(leftLegSidePlate, 0F, 0F, -0.3490659F); - - leftLegMain = new ModelRenderer(this, 40, 93); - leftLegMain.addBox(-0.5F, 11F, -2.5F, 5, 9, 5); - leftLegMain.setRotationPoint(-2F, -12F, 0F); - leftLegMain.setTextureSize(128, 128); - leftLegMain.mirror = true; - setRotation(leftLegMain, 0F, 0F, 0F); - - leftLegPlate1 = new ModelRenderer(this, 46, 71); - leftLegPlate1.addBox(-2.5F, 11F, -3F, 2, 6, 1); - leftLegPlate1.setRotationPoint(-2F, -12F, 0F); - leftLegPlate1.setTextureSize(128, 128); - leftLegPlate1.mirror = true; - setRotation(leftLegPlate1, 0F, 0F, -0.3490659F); - - leftLegPlate2 = new ModelRenderer(this, 46, 71); - leftLegPlate2.addBox(-2.5F, 11F, 2F, 2, 6, 1); - leftLegPlate2.setRotationPoint(-2F, -12F, 0F); - leftLegPlate2.setTextureSize(128, 128); - leftLegPlate2.mirror = true; - setRotation(leftLegPlate2, 0F, 0F, -0.3490659F); - - leftLegPlate3 = new ModelRenderer(this, 31, 62); - leftLegPlate3.addBox(0F, 11.9F, -1F, 4, 7, 1); - leftLegPlate3.setRotationPoint(-2F, -12F, 0F); - leftLegPlate3.setTextureSize(128, 128); - leftLegPlate3.mirror = true; - setRotation(leftLegPlate3, -0.1745329F, 0F, 0F); - - leftLegPlate4 = new ModelRenderer(this, 42, 62); - leftLegPlate4.addBox(0F, 11.9F, 0F, 4, 7, 1); - leftLegPlate4.setRotationPoint(-2F, -12F, 0F); - leftLegPlate4.setTextureSize(128, 128); - leftLegPlate4.mirror = true; - setRotation(leftLegPlate4, 0.1745329F, 0F, 0F); - } - - /* Right leg */ - { - rightLegSidePlate = new ModelRenderer(this, 31, 71); - rightLegSidePlate.mirror = true; - rightLegSidePlate.addBox(-0.5F, 12F, -3F, 1, 6, 6); - rightLegSidePlate.setRotationPoint(2F, -12F, 0F); - rightLegSidePlate.setTextureSize(128, 128); - setRotation(rightLegSidePlate, 0F, 0F, 0.3490659F); - - rightLegMain = new ModelRenderer(this, 40, 93); - rightLegMain.mirror = true; - rightLegMain.addBox(-4.5F, 11F, -2.5F, 5, 9, 5); - rightLegMain.setRotationPoint(2F, -12F, 0F); - rightLegMain.setTextureSize(128, 128); - setRotation(rightLegMain, 0F, 0F, 0F); - - rightLegPlate1 = new ModelRenderer(this, 46, 71); - rightLegPlate1.mirror = true; - rightLegPlate1.addBox(0.5F, 11F, -3F, 2, 6, 1); - rightLegPlate1.setRotationPoint(2F, -12F, 0F); - rightLegPlate1.setTextureSize(128, 128); - setRotation(rightLegPlate1, 0F, 0F, 0.3490659F); - - rightLegPlate2 = new ModelRenderer(this, 46, 71); - rightLegPlate2.mirror = true; - rightLegPlate2.addBox(0.5F, 11F, 2F, 2, 6, 1); - rightLegPlate2.setRotationPoint(2F, -12F, 0F); - rightLegPlate2.setTextureSize(128, 128); - setRotation(rightLegPlate2, 0F, 0F, 0.3490659F); - - rightLegPlate3 = new ModelRenderer(this, 31, 62); - rightLegPlate3.mirror = true; - rightLegPlate3.addBox(-4F, 11.9F, -1F, 4, 7, 1); - rightLegPlate3.setRotationPoint(2F, -12F, 0F); - rightLegPlate3.setTextureSize(128, 128); - setRotation(rightLegPlate3, -0.1745329F, 0F, 0F); - - rightLegPlate4 = new ModelRenderer(this, 42, 62); - rightLegPlate4.mirror = true; - rightLegPlate4.addBox(-4F, 11.9F, 0F, 4, 7, 1); - rightLegPlate4.setRotationPoint(2F, -12F, 0F); - rightLegPlate4.setTextureSize(128, 128); - setRotation(rightLegPlate4, 0.1745329F, 0F, 0F); - } - - this.bipedHead.cubeList.clear(); - this.bipedHeadwear.cubeList.clear(); - if (addHelmet) - { - this.bipedHead.addChild(this.leftFacePlate); - this.bipedHead.addChild(this.rightFacePlate); - this.bipedHead.addChild(this.facePlate1); - this.bipedHead.addChild(this.facePlate2); - this.bipedHead.addChild(this.facePlate3); - this.bipedHead.addChild(this.leftWingPlate1); - this.bipedHead.addChild(this.leftWingPlate2); - this.bipedHead.addChild(this.rightWingPlate1); - this.bipedHead.addChild(this.rightWingPlate2); - this.bipedHead.addChild(this.topPlate1); - this.bipedHead.addChild(this.topPlate2); - this.bipedHead.addChild(this.topPlate3); - this.bipedHead.addChild(this.backPlate1); - this.bipedHead.addChild(this.backPlate2); - this.bipedHead.addChild(this.backPlate3); - this.bipedHead.addChild(this.backPlate4); - this.bipedHead.addChild(this.backPlate5); - this.bipedHead.addChild(this.backPlate6); - this.bipedHead.addChild(this.eyePlate); - } - - this.bipedBody.cubeList.clear(); - if (addChestPiece) - { - this.bipedBody.addChild(this.chestPlate1); - this.bipedBody.addChild(this.chestPlate2); - this.bipedBody.addChild(this.chestPlate3); - this.bipedBody.addChild(this.chestPlate4); - this.bipedBody.addChild(this.chestPlate5); - this.bipedBody.addChild(this.chestPlate6); - this.bipedBody.addChild(this.mainPlate); - } - if (addLeggings) - { - this.bipedBody.addChild(this.belt); - } - - this.bipedRightArm.cubeList.clear(); - if (addChestPiece) - { - this.bipedRightArm.addChild(rightArmMain); - this.bipedRightArm.addChild(this.rightKnucklePlate); - this.bipedRightArm.addChild(this.rightKnuckleBrace); - this.bipedRightArm.addChild(this.rightKnuckle1); - this.bipedRightArm.addChild(this.rightKnuckle2); - this.bipedRightArm.addChild(this.rightKnuckle3); - this.bipedRightArm.addChild(this.rightKnuckle4); - this.bipedRightArm.addChild(this.rightKnuckle5); - this.bipedRightArm.addChild(this.rightKnuckle6); - this.bipedRightArm.addChild(this.rightArmMain); - this.bipedRightArm.addChild(this.rightShoulder1); - this.bipedRightArm.addChild(this.rightShoulder2); - this.bipedRightArm.addChild(this.rightShoulder3); - } - - this.bipedLeftArm.cubeList.clear(); - if (addChestPiece) - { - this.bipedLeftArm.addChild(leftArmMain); - this.bipedLeftArm.addChild(this.leftKnucklePlate); - this.bipedLeftArm.addChild(this.leftKnuckleBrace); - this.bipedLeftArm.addChild(this.leftKnuckle1); - this.bipedLeftArm.addChild(this.leftKnuckle2); - this.bipedLeftArm.addChild(this.leftKnuckle3); - this.bipedLeftArm.addChild(this.leftKnuckle4); - this.bipedLeftArm.addChild(this.leftKnuckle5); - this.bipedLeftArm.addChild(this.leftKnuckle6); - this.bipedLeftArm.addChild(this.leftArmMain); - this.bipedLeftArm.addChild(this.leftShoulder1); - this.bipedLeftArm.addChild(this.leftShoulder2); - this.bipedLeftArm.addChild(this.leftShoulder3); - } - - this.bipedLeftLeg.cubeList.clear(); - if (addBoots) - { - this.bipedLeftLeg.addChild(this.leftBootBottom); - this.bipedLeftLeg.addChild(this.leftBootBrace); - this.bipedLeftLeg.addChild(this.leftBootPlate); - this.bipedLeftLeg.addChild(this.leftBootWing1); - this.bipedLeftLeg.addChild(this.leftBootWing2); - } - if (addLeggings) - { - this.bipedLeftLeg.addChild(this.leftLegMain); - this.bipedLeftLeg.addChild(this.leftLegSidePlate); - this.bipedLeftLeg.addChild(this.leftLegPlate1); - this.bipedLeftLeg.addChild(this.leftLegPlate2); - this.bipedLeftLeg.addChild(this.leftLegPlate3); - this.bipedLeftLeg.addChild(this.leftLegPlate4); - } - - this.bipedRightLeg.cubeList.clear(); - if (addBoots) - { - this.bipedRightLeg.addChild(this.rightBootBottom); - this.bipedRightLeg.addChild(this.rightBootBrace); - this.bipedRightLeg.addChild(this.rightBootPlate); - this.bipedRightLeg.addChild(this.rightBootWing1); - this.bipedRightLeg.addChild(this.rightBootWing2); - } - if (addLeggings) - { - this.bipedRightLeg.addChild(this.rightLegMain); - this.bipedRightLeg.addChild(this.rightLegSidePlate); - this.bipedRightLeg.addChild(this.rightLegPlate1); - this.bipedRightLeg.addChild(this.rightLegPlate2); - this.bipedRightLeg.addChild(this.rightLegPlate3); - this.bipedRightLeg.addChild(this.rightLegPlate4); - } - } - - 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); - - - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - - this.bipedHead.render(f5); - this.bipedBody.render(f5); - this.bipedLeftArm.render(f5); - this.bipedRightArm.render(f5); - 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); -// -// { -// 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); -// } - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaEarth.java deleted file mode 100644 index 4af279d5..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaEarth.java +++ /dev/null @@ -1,509 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -/** - * OmegaEarth.tcn - TechneToTabulaImporter - * Created using Tabula 4.1.0 - */ -public class ModelOmegaEarth extends ModelBiped{ - - public ModelRenderer backPlate; - public ModelRenderer topPlate; - public ModelRenderer sidePlate6; - public ModelRenderer sidePlate5; - public ModelRenderer sidePlate4; - public ModelRenderer sidePlate3; - public ModelRenderer sidePlate2; - public ModelRenderer sidePlate1; - public ModelRenderer facePlate6; - public ModelRenderer facePlate1; - public ModelRenderer facePlate5; - public ModelRenderer facePlate4; - public ModelRenderer facePlate2; - public ModelRenderer facePlate3; - public ModelRenderer chestMain; - public ModelRenderer backPlate_1; - public ModelRenderer chestPlate1; - public ModelRenderer chestPlate2; - public ModelRenderer chestPlate3; - public ModelRenderer chestPlate4; - public ModelRenderer chestPlate5; - public ModelRenderer chestPlate6; - public ModelRenderer belt; - public ModelRenderer rightShoulder; - public ModelRenderer rightArm; - public ModelRenderer rightArmSymbol; - public ModelRenderer rightArmPlate1; - public ModelRenderer rightArmPlate2; - public ModelRenderer rightArmPlate3; - public ModelRenderer rightArmPlate4; - public ModelRenderer leftShoulder; - public ModelRenderer leftArm; - public ModelRenderer leftArmSymbol; - public ModelRenderer leftArmPlate1; - public ModelRenderer leftArmPlate2; - public ModelRenderer leftArmPlate3; - public ModelRenderer leftArmPlate4; - public ModelRenderer rightLeg; - public ModelRenderer rightLegPlate1; - public ModelRenderer rightLegPlate2; - public ModelRenderer rightLegPlate3; - public ModelRenderer rightLegPlate4; - public ModelRenderer rightLegPlate5; - public ModelRenderer rightLegPlate6; - public ModelRenderer rightLegPlate7; - public ModelRenderer rightLegPlate8; - public ModelRenderer rightLegPlate10; - public ModelRenderer rightLegPlate9; - public ModelRenderer rightLegPlate11; - public ModelRenderer rightLegPlate12; - public ModelRenderer rightLegPlate13; - public ModelRenderer rightBoot1; - public ModelRenderer rightBoot2; - public ModelRenderer rightBoot3; - public ModelRenderer leftLeg; - public ModelRenderer leftLegPlate1; - public ModelRenderer leftLegPlate2; - public ModelRenderer leftLegPlate3; - public ModelRenderer leftLegPlate4; - public ModelRenderer leftLegPlate5; - public ModelRenderer leftLegPlate6; - public ModelRenderer leftLegPlate7; - public ModelRenderer leftLegPlate8; - public ModelRenderer leftLegPlate9; - public ModelRenderer leftLegPlate10; - public ModelRenderer leftLegPlate11; - public ModelRenderer leftLegPlate12; - public ModelRenderer leftLegPlate13; - public ModelRenderer leftBoot1; - public ModelRenderer leftBoot2; - public ModelRenderer leftBoot3; - - public ModelOmegaEarth(float f, boolean addHelmet, boolean addChestPiece, boolean addLeggings, boolean addBoots) - { - super(f, 0.0f, 256, 128); - this.leftShoulder = new ModelRenderer(this, 29, 33); - this.leftShoulder.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftShoulder.addBox(-1.0F, -3.0F, -3.0F, 6, 5, 6, 0.0F); - this.leftBoot1 = new ModelRenderer(this, 44, 61); - this.leftBoot1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftBoot1.addBox(-2.0F, 9.5F, -5.0F, 5, 3, 8, 0.0F); - this.leftLegPlate9 = new ModelRenderer(this, 0, 86); - this.leftLegPlate9.setRotationPoint(0.0F, 2.5F, 0.0F); - this.leftLegPlate9.addBox(-2.5F, 1.5F, 1.3F, 5, 3, 1, 0.0F); - this.setRotateAngle(leftLegPlate9, 0.40142572795869574F, -0.0F, 0.0F); - this.facePlate3 = new ModelRenderer(this, 0, 100); - this.facePlate3.setRotationPoint(0.0F, 0.0F, 0.0F); - this.facePlate3.addBox(-1.0F, -7.5F, -6.5F, 5, 4, 1, 0.0F); - this.setRotateAngle(facePlate3, -0.17453292012214658F, -0.15707963705062866F, 0.0F); - this.leftArm = new ModelRenderer(this, 29, 45); - this.leftArm.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftArm.addBox(-1.0F-0.5f, 2.0F, -2.5F, 5, 9, 5, 0.0F); - this.leftLegPlate11 = new ModelRenderer(this, 0, 91); - this.leftLegPlate11.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftLegPlate11.addBox(1.0F, 1.5F, -2.5F, 1, 3, 5, 0.0F); - this.setRotateAngle(leftLegPlate11, 0.0F, -0.0F, -0.40142572795869574F); - this.leftBoot3 = new ModelRenderer(this, 45, 73); - this.leftBoot3.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftBoot3.addBox(0.0F, 9.0F, -4.5F, 1, 3, 7, 0.0F); - this.setRotateAngle(leftBoot3, 0.10471975511965977F, -0.0F, -0.2617993877991494F); - this.leftLegPlate5 = new ModelRenderer(this, 13, 86); - this.leftLegPlate5.setRotationPoint(0.0F, 5.0F, 0.0F); - this.leftLegPlate5.addBox(-2.5F, 1.5F, -2.8F, 3, 2, 1, 0.0F); - this.setRotateAngle(leftLegPlate5, -0.40142572795869574F, -0.0F, 0.0F); - this.leftArmPlate1 = new ModelRenderer(this, 0, 56); - this.leftArmPlate1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftArmPlate1.addBox(-2.0F, -5.0F, -4.5F, 6, 3, 1, 0.0F); - this.setRotateAngle(leftArmPlate1, -0.19198621771937624F, -0.0F, 0.9599310885968813F); - this.rightLegPlate13 = new ModelRenderer(this, 0, 91); - this.rightLegPlate13.mirror = true; - this.rightLegPlate13.setRotationPoint(0.0F, 5.0F, 0.0F); - this.rightLegPlate13.addBox(-2.0F, 1.5F, -2.5F, 1, 3, 5, 0.0F); - this.setRotateAngle(rightLegPlate13, 0.0F, -0.0F, 0.40142572795869574F); - this.rightLegPlate2 = new ModelRenderer(this, 0, 86); - this.rightLegPlate2.mirror = true; - this.rightLegPlate2.setRotationPoint(0.0F, 2.5F, 0.0F); - this.rightLegPlate2.addBox(-2.5F, 1.5F, -2.3F, 5, 3, 1, 0.0F); - this.setRotateAngle(rightLegPlate2, -0.40142572795869574F, -0.0F, 0.0F); - this.rightLegPlate8 = new ModelRenderer(this, 0, 86); - this.rightLegPlate8.mirror = true; - this.rightLegPlate8.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightLegPlate8.addBox(-2.5F, 1.5F, 1.3F, 5, 3, 1, 0.0F); - this.setRotateAngle(rightLegPlate8, 0.40142572795869574F, -0.0F, 0.0F); - this.rightLegPlate1 = new ModelRenderer(this, 0, 86); - this.rightLegPlate1.mirror = true; - this.rightLegPlate1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightLegPlate1.addBox(-2.5F, 1.5F, -2.3F, 5, 3, 1, 0.0F); - this.setRotateAngle(rightLegPlate1, -0.40142572795869574F, -0.0F, 0.0F); - this.rightLegPlate7 = new ModelRenderer(this, 13, 90); - this.rightLegPlate7.mirror = true; - this.rightLegPlate7.setRotationPoint(0.0F, 5.0F, 0.0F); - this.rightLegPlate7.addBox(-1.5F, 1.0F, -2.8F, 1, 2, 1, 0.0F); - this.setRotateAngle(rightLegPlate7, -0.40142572795869574F, -0.0F, 0.0F); - this.chestPlate6 = new ModelRenderer(this, 0, 52); - this.chestPlate6.mirror = true; - this.chestPlate6.setRotationPoint(0.0F, -3.5F, 0.0F); - this.chestPlate6.addBox(-5.5F, 2.0F, -4.5F, 5, 2, 1, 0.0F); - this.setRotateAngle(chestPlate6, 0.3141592741012573F, -0.0F, -0.12217304855585097F); - - this.sidePlate5 = new ModelRenderer(this, 13, 110); - this.sidePlate5.setRotationPoint(0.0F, 0.5F, 3.0F); - this.sidePlate5.addBox(4.0F, -8.5F, -4.0F, 1, 7, 4, 0.0F); - this.setRotateAngle(sidePlate5, 0.0F, 0.22689279913902283F, 0.0F); - - this.chestMain = new ModelRenderer(this, 0, 33); - this.chestMain.setRotationPoint(0.0F, 0.0F, 0.0F); - this.chestMain.addBox(-4.5F, -0.009999999776482582F, -2.5F, 9, 13, 5, 0.0F); - this.facePlate2 = new ModelRenderer(this, 0, 110); - this.facePlate2.mirror = true; - this.facePlate2.setRotationPoint(0.0F, 0.5F, 0.0F); - this.facePlate2.addBox(-3.0F, -3.5F, -5.5F, 5, 3, 1, 0.0F); - this.setRotateAngle(facePlate2, 0.05235987901687623F, 0.34906584024429316F, 0.0F); - this.rightArm = new ModelRenderer(this, 29, 45); - this.rightArm.mirror = true; - this.rightArm.setRotationPoint(0.0F+0.5f, 0.0F, 0.0F); - this.rightArm.addBox(-4.0F, 2.0F, -2.5F, 5, 9, 5, 0.0F); - - this.rightLegPlate11 = new ModelRenderer(this, 0, 91); - this.rightLegPlate11.mirror = true; - this.rightLegPlate11.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightLegPlate11.addBox(-2.0F, 1.5F, -2.5F, 1, 3, 5, 0.0F); - this.setRotateAngle(rightLegPlate11, 0.0F, -0.0F, 0.40142572795869574F); - this.leftLegPlate3 = new ModelRenderer(this, 0, 86); - this.leftLegPlate3.setRotationPoint(0.0F, 5.0F, 0.0F); - this.leftLegPlate3.addBox(-2.5F, 1.5F, -2.3F, 5, 3, 1, 0.0F); - this.setRotateAngle(leftLegPlate3, -0.40142572795869574F, -0.0F, 0.0F); - this.rightArmPlate4 = new ModelRenderer(this, 0, 56); - this.rightArmPlate4.mirror = true; - this.rightArmPlate4.setRotationPoint(-0.0F, 0.0F, 0.0F); - this.rightArmPlate4.addBox(-4.0F, -3.0F, 3.0F, 6, 3, 1, 0.0F); - this.setRotateAngle(rightArmPlate4, 0.19198621771937624F, -0.0F, -0.9599310885968813F); - this.rightLegPlate10 = new ModelRenderer(this, 0, 86); - this.rightLegPlate10.mirror = true; - this.rightLegPlate10.setRotationPoint(0.0F, 5.0F, 0.0F); - this.rightLegPlate10.addBox(-2.5F, 1.5F, 1.3F, 5, 3, 1, 0.0F); - this.setRotateAngle(rightLegPlate10, 0.40142572795869574F, -0.0F, 0.0F); - this.rightArmSymbol = new ModelRenderer(this, 50, 45); - this.rightArmSymbol.mirror = true; - this.rightArmSymbol.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightArmSymbol.addBox(-5.0F+0.5f, 4.0F, -2.0F, 1, 4, 4, 0.0F); - this.leftLegPlate1 = new ModelRenderer(this, 0, 86); - this.leftLegPlate1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftLegPlate1.addBox(-2.5F, 1.5F, -2.3F, 5, 3, 1, 0.0F); - this.setRotateAngle(leftLegPlate1, -0.40142572795869574F, -0.0F, 0.0F); - this.rightArmPlate1 = new ModelRenderer(this, 0, 56); - this.rightArmPlate1.mirror = true; - this.rightArmPlate1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightArmPlate1.addBox(-4.0F, -5.0F, -4.5F, 6, 3, 1, 0.0F); - this.setRotateAngle(rightArmPlate1, -0.19198621771937624F, -0.0F, -0.9599310885968813F); - this.leftLegPlate13 = new ModelRenderer(this, 0, 91); - this.leftLegPlate13.setRotationPoint(0.0F, 5.0F, 0.0F); - this.leftLegPlate13.addBox(1.0F, 1.5F, -2.5F, 1, 3, 5, 0.0F); - this.setRotateAngle(leftLegPlate13, 0.0F, -0.0F, -0.40142572795869574F); - this.backPlate = new ModelRenderer(this, 22, 94); - this.backPlate.setRotationPoint(0.0F, 0.0F, 0.0F); - this.backPlate.addBox(-4.0F, -7.699999809265137F, 3.700000047683716F, 8, 8, 1, 0.0F); - this.setRotateAngle(backPlate, 0.06981316953897475F, -0.0F, 0.0F); - this.leftLegPlate8 = new ModelRenderer(this, 0, 86); - this.leftLegPlate8.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftLegPlate8.addBox(-2.5F, 1.5F, 1.3F, 5, 3, 1, 0.0F); - this.setRotateAngle(leftLegPlate8, 0.40142572795869574F, -0.0F, 0.0F); - this.leftLeg = new ModelRenderer(this, 0, 70); - this.leftLeg.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftLeg.addBox(-2.5F, 0.0F, -2.5F, 5, 10, 5, 0.0F); - this.facePlate5 = new ModelRenderer(this, 0, 106); - this.facePlate5.setRotationPoint(0.0F, 0.0F, 0.0F); - this.facePlate5.addBox(-4.0F, -4.5F, -4.5F, 8, 2, 1, 0.0F); - this.belt = new ModelRenderer(this, 0, 61); - this.belt.setRotationPoint(0.0F, 0.0F, 0.0F); - this.belt.addBox(-5.0F, 11.0F, -3.0F, 10, 2, 6, 0.0F); - this.rightLegPlate3 = new ModelRenderer(this, 0, 86); - this.rightLegPlate3.mirror = true; - this.rightLegPlate3.setRotationPoint(0.0F, 5.0F, 0.0F); - this.rightLegPlate3.addBox(-2.5F, 1.5F, -2.3F, 5, 3, 1, 0.0F); - this.setRotateAngle(rightLegPlate3, -0.40142572795869574F, -0.0F, 0.0F); - this.chestPlate3 = new ModelRenderer(this, 0, 52); - this.chestPlate3.setRotationPoint(0.0F, -1.5F, 0.0F); - this.chestPlate3.addBox(0.6000000238418579F, 2.0F, -4.5F, 5, 2, 1, 0.0F); - this.setRotateAngle(chestPlate3, 0.3141592741012573F, -0.0F, 0.17453292012214658F); - this.sidePlate4 = new ModelRenderer(this, 13, 110); - this.sidePlate4.setRotationPoint(0.0F, 0.5F, 0.0F); - this.sidePlate4.addBox(4.0F, -8.5F, -3.0F, 1, 7, 4, 0.0F); - this.setRotateAngle(sidePlate4, 0.0F, 0.22689279913902283F, 0.0F); - this.rightLegPlate6 = new ModelRenderer(this, 13, 90); - this.rightLegPlate6.mirror = true; - this.rightLegPlate6.setRotationPoint(0.0F, 2.5F, 0.0F); - this.rightLegPlate6.addBox(-1.5F, 1.0F, -2.8F, 1, 2, 1, 0.0F); - this.setRotateAngle(rightLegPlate6, -0.40142572795869574F, -0.0F, 0.0F); - - this.rightBoot2 = new ModelRenderer(this, 22, 73); - this.rightBoot2.mirror = true; - this.rightBoot2.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightBoot2.addBox(-3.0F, 8.5F, -3.0F, 5, 1, 6, 0.0F); - this.leftLegPlate7 = new ModelRenderer(this, 13, 90); - this.leftLegPlate7.setRotationPoint(0.0F, 5.0F, 0.0F); - this.leftLegPlate7.addBox(0.5F, 1.0F, -2.8F, 1, 2, 1, 0.0F); - this.setRotateAngle(leftLegPlate7, -0.40142572795869574F, -0.0F, 0.0F); - this.facePlate6 = new ModelRenderer(this, 19, 106); - this.facePlate6.setRotationPoint(0.0F, 0.0F, 0.0F); - this.facePlate6.addBox(-1.0F, -4.5F, -5.0F, 2, 2, 1, 0.0F); - this.facePlate1 = new ModelRenderer(this, 0, 110); - this.facePlate1.setRotationPoint(0.0F, 0.5F, 0.0F); - this.facePlate1.addBox(-2.0F, -3.5F, -5.5F, 5, 3, 1, 0.0F); - this.setRotateAngle(facePlate1, 0.05235987901687623F, -0.34906584024429316F, 0.0F); - this.sidePlate1 = new ModelRenderer(this, 13, 110); - this.sidePlate1.mirror = true; - this.sidePlate1.setRotationPoint(0.0F, 0.5F, 0.0F); - this.sidePlate1.addBox(-5.0F, -8.5F, -3.0F, 1, 7, 4, 0.0F); - this.setRotateAngle(sidePlate1, 0.0F, -0.22689279913902283F, 0.0F); - this.facePlate4 = new ModelRenderer(this, 0, 100); - this.facePlate4.mirror = true; - this.facePlate4.setRotationPoint(0.0F, 0.0F, 0.0F); - this.facePlate4.addBox(-4.0F, -7.5F, -6.5F, 5, 4, 1, 0.0F); - this.setRotateAngle(facePlate4, -0.17453292012214658F, 0.15707963705062866F, 0.0F); - this.rightLegPlate12 = new ModelRenderer(this, 0, 91); - this.rightLegPlate12.mirror = true; - this.rightLegPlate12.setRotationPoint(0.0F, 2.5F, 0.0F); - this.rightLegPlate12.addBox(-2.0F, 1.5F, -2.5F, 1, 3, 5, 0.0F); - this.setRotateAngle(rightLegPlate12, 0.0F, -0.0F, 0.40142572795869574F); - this.leftArmPlate4 = new ModelRenderer(this, 0, 56); - this.leftArmPlate4.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftArmPlate4.addBox(-2.0F, -3.0F, 3.0F, 6, 3, 1, 0.0F); - this.setRotateAngle(leftArmPlate4, 0.19198621771937624F, -0.0F, 0.9599310885968813F); - this.rightLegPlate4 = new ModelRenderer(this, 13, 86); - this.rightLegPlate4.mirror = true; - this.rightLegPlate4.setRotationPoint(0.0F, 2.5F, 0.0F); - this.rightLegPlate4.addBox(-0.5F, 1.5F, -2.8F, 3, 2, 1, 0.0F); - this.setRotateAngle(rightLegPlate4, -0.40142572795869574F, -0.0F, 0.0F); - this.leftLegPlate12 = new ModelRenderer(this, 0, 91); - this.leftLegPlate12.setRotationPoint(0.0F, 2.5F, 0.0F); - this.leftLegPlate12.addBox(1.0F, 1.5F, -2.5F, 1, 3, 5, 0.0F); - this.setRotateAngle(leftLegPlate12, 0.0F, -0.0F, -0.40142572795869574F); - this.chestPlate2 = new ModelRenderer(this, 0, 52); - this.chestPlate2.mirror = true; - this.chestPlate2.setRotationPoint(0.0F, 0.5F, 0.0F); - this.chestPlate2.addBox(-5.699999809265137F, 2.0F, -4.5F, 5, 2, 1, 0.0F); - this.setRotateAngle(chestPlate2, 0.3141592741012573F, -0.0F, -0.22689279913902285F); - this.backPlate_1 = new ModelRenderer(this, 33, 61); - this.backPlate_1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.backPlate_1.addBox(-2.0F, 2.0F, 2.5F, 4, 6, 1, 0.0F); - this.topPlate = new ModelRenderer(this, 22, 84); - this.topPlate.setRotationPoint(0.0F, 0.0F, 0.0F); - this.topPlate.addBox(-4.0F, -8.199999809265137F, -3.5999999046325684F, 8, 1, 8, 0.0F); - this.setRotateAngle(topPlate, 0.05235987901687623F, -0.0F, 0.0F); - this.rightBoot3 = new ModelRenderer(this, 45, 73); - this.rightBoot3.mirror = true; - this.rightBoot3.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightBoot3.addBox(-1.0F, 9.0F, -4.5F, 1, 3, 7, 0.0F); - this.setRotateAngle(rightBoot3, 0.10471975511965977F, -0.0F, 0.2617993877991494F); - this.leftArmSymbol = new ModelRenderer(this, 50, 45); - this.leftArmSymbol.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftArmSymbol.addBox(4.0F-0.5f, 4.0F, -2.0F, 1, 4, 4, 0.0F); - this.sidePlate6 = new ModelRenderer(this, 13, 110); - this.sidePlate6.setRotationPoint(0.0F, 0.5F, 6.0F); - this.sidePlate6.addBox(4.0F, -8.5F, -5.0F, 1, 7, 4, 0.0F); - this.setRotateAngle(sidePlate6, 0.0F, 0.22689279913902283F, 0.0F); - this.chestPlate5 = new ModelRenderer(this, 0, 52); - this.chestPlate5.setRotationPoint(0.0F, -3.5F, 0.0F); - this.chestPlate5.addBox(0.5F, 2.0F, -4.5F, 5, 2, 1, 0.0F); - this.setRotateAngle(chestPlate5, 0.3141592741012573F, -0.0F, 0.12217304855585097F); - this.rightLeg = new ModelRenderer(this, 0, 70); - this.rightLeg.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightLeg.addBox(-2.5F, 0.0F, -2.5F, 5, 10, 5, 0.0F); - this.leftArmPlate2 = new ModelRenderer(this, 0, 56); - this.leftArmPlate2.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftArmPlate2.addBox(-2.0F, -3.0F, -4.0F, 6, 3, 1, 0.0F); - this.setRotateAngle(leftArmPlate2, -0.19198621771937624F, -0.0F, 0.9599310885968813F); - this.leftBoot2 = new ModelRenderer(this, 22, 73); - this.leftBoot2.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftBoot2.addBox(-2.0F, 8.5F, -3.0F, 5, 1, 6, 0.0F); - this.leftArmPlate3 = new ModelRenderer(this, 0, 56); - this.leftArmPlate3.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftArmPlate3.addBox(-2.0F, -5.0F, 3.5F, 6, 3, 1, 0.0F); - this.setRotateAngle(leftArmPlate3, 0.19198621771937624F, -0.0F, 0.9599310885968813F); - - this.rightLegPlate5 = new ModelRenderer(this, 13, 86); - this.rightLegPlate5.mirror = true; - this.rightLegPlate5.setRotationPoint(0.0F, 5.0F, 0.0F); - this.rightLegPlate5.addBox(-0.5F, 1.5F, -2.8F, 3, 2, 1, 0.0F); - this.setRotateAngle(rightLegPlate5, -0.40142572795869574F, -0.0F, 0.0F); - this.sidePlate3 = new ModelRenderer(this, 13, 110); - this.sidePlate3.mirror = true; - this.sidePlate3.setRotationPoint(0.0F, 0.5F, 6.0F); - this.sidePlate3.addBox(-5.0F, -8.5F, -5.0F, 1, 7, 4, 0.0F); - this.setRotateAngle(sidePlate3, 0.0F, -0.22689279913902283F, 0.0F); - this.chestPlate1 = new ModelRenderer(this, 0, 52); - this.chestPlate1.setRotationPoint(0.0F, 0.5F, 0.0F); - this.chestPlate1.addBox(0.699999988079071F, 2.0F, -4.5F, 5, 2, 1, 0.0F); - this.setRotateAngle(chestPlate1, 0.3141592741012573F, -0.0F, 0.22689279913902285F); - this.leftLegPlate4 = new ModelRenderer(this, 13, 86); - this.leftLegPlate4.setRotationPoint(0.0F, 2.5F, 0.0F); - this.leftLegPlate4.addBox(-2.5F, 1.5F, -2.8F, 3, 2, 1, 0.0F); - this.setRotateAngle(leftLegPlate4, -0.40142572795869574F, -0.0F, 0.0F); - this.rightBoot1 = new ModelRenderer(this, 44, 61); - this.rightBoot1.mirror = true; - this.rightBoot1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightBoot1.addBox(-3.0F, 9.5F, -5.0F, 5, 3, 8, 0.0F); - this.chestPlate4 = new ModelRenderer(this, 0, 52); - this.chestPlate4.mirror = true; - this.chestPlate4.setRotationPoint(0.0F, -1.5F, 0.0F); - this.chestPlate4.addBox(-5.599999904632568F, 2.0F, -4.5F, 5, 2, 1, 0.0F); - this.setRotateAngle(chestPlate4, 0.3141592741012573F, -0.0F, -0.17453292012214658F); - this.rightShoulder = new ModelRenderer(this, 29, 33); - this.rightShoulder.mirror = true; - this.rightShoulder.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightShoulder.addBox(-5.0F, -3.0F, -3.0F, 6, 5, 6, 0.0F); - this.rightLegPlate9 = new ModelRenderer(this, 0, 86); - this.rightLegPlate9.mirror = true; - this.rightLegPlate9.setRotationPoint(0.0F, 2.5F, 0.0F); - this.rightLegPlate9.addBox(-2.5F, 1.5F, 1.3F, 5, 3, 1, 0.0F); - this.setRotateAngle(rightLegPlate9, 0.40142572795869574F, -0.0F, 0.0F); - this.sidePlate2 = new ModelRenderer(this, 13, 110); - this.sidePlate2.mirror = true; - this.sidePlate2.setRotationPoint(0.0F, 0.5F, 3.0F); - this.sidePlate2.addBox(-5.0F, -8.5F, -4.0F, 1, 7, 4, 0.0F); - this.setRotateAngle(sidePlate2, 0.0F, -0.22689279913902283F, 0.0F); - - this.rightArmPlate3 = new ModelRenderer(this, 0, 56); - this.rightArmPlate3.mirror = true; - this.rightArmPlate3.setRotationPoint(-0.0F, 0.0F, 0.0F); - this.rightArmPlate3.addBox(-4.0F, -5.0F, 3.5F, 6, 3, 1, 0.0F); - this.setRotateAngle(rightArmPlate3, 0.19198621771937624F, -0.0F, -0.9599310885968813F); - this.leftLegPlate6 = new ModelRenderer(this, 13, 90); - this.leftLegPlate6.setRotationPoint(0.0F, 2.5F, 0.0F); - this.leftLegPlate6.addBox(0.5F, 1.0F, -2.8F, 1, 2, 1, 0.0F); - this.setRotateAngle(leftLegPlate6, -0.40142572795869574F, -0.0F, 0.0F); - this.rightArmPlate2 = new ModelRenderer(this, 0, 56); - this.rightArmPlate2.mirror = true; - this.rightArmPlate2.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightArmPlate2.addBox(-4.0F, -3.0F, -4.0F, 6, 3, 1, 0.0F); - this.setRotateAngle(rightArmPlate2, -0.19198621771937624F, -0.0F, -0.9599310885968813F); - this.leftLegPlate10 = new ModelRenderer(this, 0, 86); - this.leftLegPlate10.setRotationPoint(0.0F, 5.0F, 0.0F); - this.leftLegPlate10.addBox(-2.5F, 1.5F, 1.3F, 5, 3, 1, 0.0F); - this.setRotateAngle(leftLegPlate10, 0.40142572795869574F, -0.0F, 0.0F); - this.leftLegPlate2 = new ModelRenderer(this, 0, 86); - this.leftLegPlate2.setRotationPoint(0.0F, 2.5F, 0.0F); - this.leftLegPlate2.addBox(-2.5F, 1.5F, -2.3F, 5, 3, 1, 0.0F); - this.setRotateAngle(leftLegPlate2, -0.40142572795869574F, -0.0F, 0.0F); - - this.bipedBody.cubeList.clear(); - this.bipedHead.cubeList.clear(); - this.bipedHeadwear.cubeList.clear(); - this.bipedLeftArm.cubeList.clear(); - this.bipedLeftLeg.cubeList.clear(); - this.bipedRightArm.cubeList.clear(); - this.bipedRightLeg.cubeList.clear(); - - if(addChestPiece) - { - this.bipedLeftArm.addChild(this.leftShoulder); - this.bipedLeftArm.addChild(this.leftArm); - this.bipedLeftArm.addChild(this.leftArmPlate1); - this.bipedBody.addChild(this.chestPlate6); - this.bipedHead.addChild(this.sidePlate5); - this.bipedBody.addChild(this.chestMain); - this.bipedRightArm.addChild(this.rightArm); - this.bipedRightArm.addChild(this.rightArmPlate4); - this.bipedRightArm.addChild(this.rightArmSymbol); - this.bipedRightArm.addChild(this.rightArmPlate1); - this.bipedBody.addChild(this.chestPlate3); - this.bipedLeftArm.addChild(this.leftArmPlate4); - this.bipedBody.addChild(this.chestPlate2); - this.bipedBody.addChild(this.backPlate_1); - this.bipedLeftArm.addChild(this.leftArmSymbol); - this.bipedBody.addChild(this.chestPlate5); - this.bipedLeftArm.addChild(this.leftArmPlate2); - this.bipedLeftArm.addChild(this.leftArmPlate3); - this.bipedBody.addChild(this.chestPlate1); - this.bipedBody.addChild(this.chestPlate4); - this.bipedRightArm.addChild(this.rightShoulder); - this.bipedRightArm.addChild(this.rightArmPlate3); - this.bipedRightArm.addChild(this.rightArmPlate2); - } - - if(addLeggings) - { - this.bipedLeftLeg.addChild(this.leftLegPlate9); - this.bipedLeftLeg.addChild(this.leftLegPlate11); - this.bipedLeftLeg.addChild(this.leftLegPlate5); - this.bipedRightLeg.addChild(this.rightLegPlate13); - this.bipedRightLeg.addChild(this.rightLegPlate2); - this.bipedRightLeg.addChild(this.rightLegPlate8); - this.bipedRightLeg.addChild(this.rightLegPlate1); - this.bipedRightLeg.addChild(this.rightLegPlate7); - this.bipedRightLeg.addChild(this.rightLegPlate11); - this.bipedLeftLeg.addChild(this.leftLegPlate3); - this.bipedRightLeg.addChild(this.rightLegPlate10); - this.bipedLeftLeg.addChild(this.leftLegPlate1); - this.bipedLeftLeg.addChild(this.leftLegPlate13); - this.bipedLeftLeg.addChild(this.leftLegPlate8); - this.bipedLeftLeg.addChild(this.leftLeg); - this.bipedBody.addChild(this.belt); - this.bipedRightLeg.addChild(this.rightLegPlate3); - this.bipedRightLeg.addChild(this.rightLegPlate6); - this.bipedLeftLeg.addChild(this.leftLegPlate7); - this.bipedRightLeg.addChild(this.rightLegPlate12); - this.bipedRightLeg.addChild(this.rightLegPlate4); - this.bipedLeftLeg.addChild(this.leftLegPlate12); - this.bipedRightLeg.addChild(this.rightLeg); - this.bipedRightLeg.addChild(this.rightLegPlate5); - this.bipedLeftLeg.addChild(this.leftLegPlate4); - this.bipedLeftLeg.addChild(this.leftLegPlate2); - this.bipedLeftLeg.addChild(this.leftLegPlate10); - this.bipedLeftLeg.addChild(this.leftLegPlate6); - this.bipedRightLeg.addChild(this.rightLegPlate9); - } - - if(addBoots) - { - this.bipedLeftLeg.addChild(this.leftBoot1); - this.bipedLeftLeg.addChild(this.leftBoot3); - this.bipedRightLeg.addChild(this.rightBoot2); - this.bipedLeftLeg.addChild(this.leftBoot2); - this.bipedRightLeg.addChild(this.rightBoot1); - this.bipedRightLeg.addChild(this.rightBoot3); - } - - if(addHelmet) - { - this.bipedHead.addChild(this.facePlate3); - this.bipedHead.addChild(this.facePlate2); - this.bipedHead.addChild(this.backPlate); - this.bipedHead.addChild(this.facePlate5); - this.bipedHead.addChild(this.sidePlate4); - this.bipedHead.addChild(this.facePlate6); - this.bipedHead.addChild(this.facePlate1); - this.bipedHead.addChild(this.sidePlate1); - this.bipedHead.addChild(this.facePlate4); - this.bipedHead.addChild(this.topPlate); - this.bipedHead.addChild(this.sidePlate6); - this.bipedHead.addChild(this.sidePlate3); - this.bipedHead.addChild(this.sidePlate2); - } - } - - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.bipedLeftArm.render(f5); - this.bipedRightArm.render(f5); - this.bipedLeftLeg.render(f5); - this.bipedHead.render(f5); - this.bipedRightLeg.render(f5); - this.bipedBody.render(f5); - } - - /** - * This is a helper function from Tabula to set the rotation of model parts - */ - public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { - modelRenderer.rotateAngleX = x; - modelRenderer.rotateAngleY = y; - modelRenderer.rotateAngleZ = z; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaFire.java deleted file mode 100644 index 2d8a2c79..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaFire.java +++ /dev/null @@ -1,434 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -/** - * OmegaFire - WayofTime - * Created using Tabula 4.1.0 - */ -public class ModelOmegaFire extends ModelBiped -{ - public ModelRenderer facePlate1; - public ModelRenderer facePlate2; - public ModelRenderer facePlate3; - public ModelRenderer facePlate4; - public ModelRenderer facePlate5; - public ModelRenderer facePlate6; - public ModelRenderer facePlate7; - public ModelRenderer topPlate; - public ModelRenderer facePlate8; - public ModelRenderer backPlate; - public ModelRenderer chestMain; - public ModelRenderer bodyPlate1; - public ModelRenderer bodyPlate2; - public ModelRenderer bodyPlate3; - public ModelRenderer bodyPlate5; - public ModelRenderer bodyPlate4; - public ModelRenderer belt; - public ModelRenderer bodyPlate6; - public ModelRenderer omegaPlate; - public ModelRenderer rightSpacer1; - public ModelRenderer leftSpacer1; - public ModelRenderer rightShoulder; - public ModelRenderer rightArm; - public ModelRenderer rightArmPlate7; - public ModelRenderer rightArmPlate1; - public ModelRenderer rightArmPlate2; - public ModelRenderer rightArmPlate3; - public ModelRenderer rightArmPlate4; - public ModelRenderer rightArmPlate5; - public ModelRenderer rightArmPlate6; - public ModelRenderer leftShoulder; - public ModelRenderer leftArm; - public ModelRenderer leftArmPlate1; - public ModelRenderer leftArmPlate2; - public ModelRenderer leftArmPlate3; - public ModelRenderer leftArmPlate5; - public ModelRenderer leftArmPlate4; - public ModelRenderer leftArmPlate6; - public ModelRenderer leftArmPlate7; - public ModelRenderer leftLeg; - public ModelRenderer leftLegPlate1; - public ModelRenderer leftLegPlate2; - public ModelRenderer leftLegPlate3; - public ModelRenderer leftLegPlate4; - public ModelRenderer leftLegPlate5; - public ModelRenderer leftLegPlate6; - public ModelRenderer leftLegPlate7; - public ModelRenderer leftBoot1; - public ModelRenderer leftBoot2; - public ModelRenderer leftBoot3; - public ModelRenderer rightLeg; - public ModelRenderer rightLegPlate1; - public ModelRenderer rightLegPlate1_1; - public ModelRenderer rightLegPlate3; - public ModelRenderer rightLegPlate4; - public ModelRenderer rightLegPlate5; - public ModelRenderer rightLegPlate6; - public ModelRenderer rightLegPlate7; - public ModelRenderer rightBoot1; - public ModelRenderer rightBoot2; - public ModelRenderer rightBoot3; - - public ModelOmegaFire(float f, boolean addHelmet, boolean addChestPiece, boolean addLeggings, boolean addBoots) - { - super(f, 0.0f, 128, 128); - this.textureWidth = 128; - this.textureHeight = 128; - this.bodyPlate5 = new ModelRenderer(this, 29, 33); - this.bodyPlate5.setRotationPoint(0.0F, 3.0F, 0.0F); - this.bodyPlate5.addBox(-0.9F, 1.4F, -3.3F, 5, 2, 1, 0.0F); - this.setRotateAngle(bodyPlate5, -0.3490658503988659F, -0.22689280275926282F, 0.0F); - this.facePlate2 = new ModelRenderer(this, 24, 89); - this.facePlate2.setRotationPoint(0.0F, 0.0F, 0.0F); - this.facePlate2.addBox(-1.0F, -4.5F, -5.0F, 2, 2, 1, 0.0F); - this.leftArmPlate5 = new ModelRenderer(this, 16, 54); - this.leftArmPlate5.setRotationPoint(0.0F, 3.4F, 0.0F); - this.leftArmPlate5.addBox(5.3F, -2.0F, -2.5F, 1, 3, 4, 0.0F); - this.setRotateAngle(leftArmPlate5, 0.0F, 0.22689280275926282F, -0.3490658503988659F); - this.leftArmPlate6 = new ModelRenderer(this, 16, 62); - this.leftArmPlate6.setRotationPoint(0.0F, 3.4F, 0.0F); - this.leftArmPlate6.addBox(5.3F, -2.0F, -1.5F, 1, 3, 4, 0.0F); - this.setRotateAngle(leftArmPlate6, 0.0F, -0.22689280275926282F, -0.3490658503988659F); - this.facePlate8 = new ModelRenderer(this, 27, 104); - this.facePlate8.mirror = true; - this.facePlate8.setRotationPoint(0.0F, 0.0F, 0.0F); - this.facePlate8.addBox(-4.4F, -8.0F, -3.6F, 1, 8, 9, 0.0F); - this.setRotateAngle(facePlate8, 0.0F, -0.10471975511965977F, 0.0F); - this.leftArmPlate7 = new ModelRenderer(this, 29, 73); - this.leftArmPlate7.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftArmPlate7.addBox(0.0F, -3.5F, -3.5F, 3, 4, 7, 0.0F); - this.leftArm = new ModelRenderer(this, 29, 49); - this.leftArm.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftArm.addBox(-1.0F, 2.0F, -2.5F, 5, 9, 5, 0.0F); - this.rightShoulder = new ModelRenderer(this, 29, 37); - this.rightShoulder.mirror = true; - this.rightShoulder.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightShoulder.addBox(-5.0F, -3.0F, -3.0F, 6, 5, 6, 0.0F); - this.rightArmPlate6 = new ModelRenderer(this, 16, 62); - this.rightArmPlate6.setRotationPoint(0.0F, 3.4F, 0.0F); - this.rightArmPlate6.addBox(-6.3F, -2.0F, -1.5F, 1, 3, 4, 0.0F); - this.setRotateAngle(rightArmPlate6, 0.0F, 0.22689280275926282F, 0.3490658503988659F); - this.leftSpacer1 = new ModelRenderer(this, 11, 54); - this.leftSpacer1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftSpacer1.addBox(2.5F, 6.3F, -3.0F, 1, 4, 1, 0.0F); - this.omegaPlate = new ModelRenderer(this, 0, 54); - this.omegaPlate.setRotationPoint(0.0F, 0.0F, 0.0F); - this.omegaPlate.addBox(-2.0F, 5.3F, -3.5F, 4, 4, 1, 0.0F); - this.bodyPlate2 = new ModelRenderer(this, 29, 33); - this.bodyPlate2.setRotationPoint(0.0F, 1.5F, 0.0F); - this.bodyPlate2.addBox(-0.9F, 1.4F, -3.5F, 5, 2, 1, 0.0F); - this.setRotateAngle(bodyPlate2, -0.3490658503988659F, -0.22689280275926282F, 0.0F); - this.rightLeg = new ModelRenderer(this, 0, 70); - this.rightLeg.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightLeg.addBox(-2.5F, 0.0F, -2.5F, 5, 10, 5, 0.0F); - this.leftArmPlate2 = new ModelRenderer(this, 16, 62); - this.leftArmPlate2.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftArmPlate2.addBox(5.3F, -2.0F, -1.5F, 1, 3, 4, 0.0F); - this.setRotateAngle(leftArmPlate2, 0.0F, -0.22689280275926282F, -0.3490658503988659F); - this.rightLegPlate3 = new ModelRenderer(this, 0, 86); - this.rightLegPlate3.mirror = true; - this.rightLegPlate3.setRotationPoint(0.0F, 4.6F, 0.0F); - this.rightLegPlate3.addBox(-2.4F, 1.6F, -2.7F, 5, 3, 1, 0.0F); - this.setRotateAngle(rightLegPlate3, -0.20943951023931953F, 0.1832595714594046F, 0.0F); - this.leftLegPlate5 = new ModelRenderer(this, 0, 91); - this.leftLegPlate5.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftLegPlate5.addBox(-2.6F, 1.6F, 1.7F, 5, 3, 1, 0.0F); - this.setRotateAngle(leftLegPlate5, 0.20943951023931953F, 0.1832595714594046F, 0.0F); - this.leftLegPlate2 = new ModelRenderer(this, 0, 86); - this.leftLegPlate2.setRotationPoint(0.0F, 2.3F, 0.0F); - this.leftLegPlate2.addBox(-2.6F, 1.6F, -2.7F, 5, 3, 1, 0.0F); - this.setRotateAngle(leftLegPlate2, -0.20943951023931953F, -0.1832595714594046F, 0.0F); - this.rightSpacer1 = new ModelRenderer(this, 11, 54); - this.rightSpacer1.mirror = true; - this.rightSpacer1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightSpacer1.addBox(-3.5F, 6.3F, -3.0F, 1, 4, 1, 0.0F); - this.rightArmPlate2 = new ModelRenderer(this, 16, 62); - this.rightArmPlate2.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightArmPlate2.addBox(-6.3F, -2.0F, -1.5F, 1, 3, 4, 0.0F); - this.setRotateAngle(rightArmPlate2, 0.0F, 0.22689280275926282F, 0.3490658503988659F); - this.rightArmPlate3 = new ModelRenderer(this, 16, 54); - this.rightArmPlate3.setRotationPoint(0.0F, 1.7F, 0.0F); - this.rightArmPlate3.addBox(-6.3F, -2.0F, -2.5F, 1, 3, 4, 0.0F); - this.setRotateAngle(rightArmPlate3, 0.0F, -0.22689280275926282F, 0.3490658503988659F); - this.topPlate = new ModelRenderer(this, 37, 89); - this.topPlate.setRotationPoint(0.0F, 0.0F, 0.0F); - this.topPlate.addBox(-4.0F, -8.2F, -3.6F, 8, 1, 8, 0.0F); - this.setRotateAngle(topPlate, 0.05235987755982988F, -0.0F, 0.0F); - this.leftBoot1 = new ModelRenderer(this, 0, 99); - this.leftBoot1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftBoot1.addBox(-2.0F, 9.5F, -5.0F, 5, 3, 8, 0.0F); - this.leftArmPlate1 = new ModelRenderer(this, 16, 54); - this.leftArmPlate1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftArmPlate1.addBox(5.3F, -2.0F, -2.5F, 1, 3, 4, 0.0F); - this.setRotateAngle(leftArmPlate1, 0.0F, 0.22689280275926282F, -0.3490658503988659F); - this.rightLegPlate1_1 = new ModelRenderer(this, 0, 86); - this.rightLegPlate1_1.mirror = true; - this.rightLegPlate1_1.setRotationPoint(0.0F, 2.3F, 0.0F); - this.rightLegPlate1_1.addBox(-2.4F, 1.6F, -2.7F, 5, 3, 1, 0.0F); - this.setRotateAngle(rightLegPlate1_1, -0.20943951023931953F, 0.1832595714594046F, 0.0F); - this.bodyPlate4 = new ModelRenderer(this, 29, 33); - this.bodyPlate4.mirror = true; - this.bodyPlate4.setRotationPoint(0.0F, 1.5F, 0.0F); - this.bodyPlate4.addBox(-4.1F, 1.4F, -3.5F, 5, 2, 1, 0.0F); - this.setRotateAngle(bodyPlate4, -0.3490658503988659F, 0.22689280275926282F, 0.0F); - this.leftLegPlate3 = new ModelRenderer(this, 0, 86); - this.leftLegPlate3.setRotationPoint(0.0F, 4.6F, 0.0F); - this.leftLegPlate3.addBox(-2.6F, 1.6F, -2.7F, 5, 3, 1, 0.0F); - this.setRotateAngle(leftLegPlate3, -0.20943951023931953F, -0.1832595714594046F, 0.0F); - this.chestMain = new ModelRenderer(this, 0, 33); - this.chestMain.setRotationPoint(0.0F, 0.0F, 0.0F); - this.chestMain.addBox(-4.5F, -0.01F, -2.5F, 9, 13, 5, 0.0F); - this.rightArmPlate5 = new ModelRenderer(this, 16, 54); - this.rightArmPlate5.setRotationPoint(0.0F, 3.4F, 0.0F); - this.rightArmPlate5.addBox(-6.3F, -2.0F, -2.5F, 1, 3, 4, 0.0F); - this.setRotateAngle(rightArmPlate5, 0.0F, -0.22689280275926282F, 0.3490658503988659F); - this.rightArm = new ModelRenderer(this, 29, 49); - this.rightArm.mirror = true; - this.rightArm.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightArm.addBox(-4.0F, 2.0F, -2.5F, 5, 9, 5, 0.0F); - this.bodyPlate1 = new ModelRenderer(this, 29, 33); - this.bodyPlate1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.bodyPlate1.addBox(-0.9F, 1.4F, -3.7F, 5, 2, 1, 0.0F); - this.setRotateAngle(bodyPlate1, -0.3490658503988659F, -0.22689280275926282F, 0.0F); - this.facePlate3 = new ModelRenderer(this, 24, 93); - this.facePlate3.setRotationPoint(0.0F, 0.5F, 0.0F); - this.facePlate3.addBox(-2.0F, -3.5F, -5.5F, 5, 3, 1, 0.0F); - this.setRotateAngle(facePlate3, 0.05235987755982988F, -0.3490658503988659F, 0.0F); - this.facePlate1 = new ModelRenderer(this, 24, 85); - this.facePlate1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.facePlate1.addBox(-4.0F, -4.5F, -4.5F, 8, 2, 1, 0.0F); - this.facePlate6 = new ModelRenderer(this, 24, 98); - this.facePlate6.mirror = true; - this.facePlate6.setRotationPoint(0.0F, 0.5F, 0.0F); - this.facePlate6.addBox(-2.9F, -8.7F, -6.0F, 5, 4, 1, 0.0F); - this.setRotateAngle(facePlate6, -0.05235987755982988F, 0.3490658503988659F, 0.0F); - this.rightLegPlate6 = new ModelRenderer(this, 0, 91); - this.rightLegPlate6.mirror = true; - this.rightLegPlate6.setRotationPoint(0.0F, 2.3F, 0.0F); - this.rightLegPlate6.addBox(-2.4F, 1.6F, 1.7F, 5, 3, 1, 0.0F); - this.setRotateAngle(rightLegPlate6, 0.20943951023931953F, -0.1832595714594046F, 0.0F); - this.leftShoulder = new ModelRenderer(this, 29, 37); - this.leftShoulder.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftShoulder.addBox(-1.0F, -3.0F, -3.0F, 6, 5, 6, 0.0F); - this.rightBoot1 = new ModelRenderer(this, 0, 99); - this.rightBoot1.mirror = true; - this.rightBoot1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightBoot1.addBox(-3.0F, 9.5F, -5.0F, 5, 3, 8, 0.0F); - this.leftLegPlate4 = new ModelRenderer(this, 13, 86); - this.leftLegPlate4.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftLegPlate4.addBox(2.0F, 1.1F, -2.0F, 1, 8, 4, 0.0F); - this.setRotateAngle(leftLegPlate4, 0.0F, 0.0F, -0.08726646259971647F); - this.rightBoot2 = new ModelRenderer(this, 0, 111); - this.rightBoot2.mirror = true; - this.rightBoot2.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightBoot2.addBox(-3.0F, 8.5F, -3.0F, 5, 1, 6, 0.0F); - this.leftArmPlate3 = new ModelRenderer(this, 16, 54); - this.leftArmPlate3.setRotationPoint(0.0F, 1.7F, 0.0F); - this.leftArmPlate3.addBox(5.3F, -2.0F, -2.5F, 1, 3, 4, 0.0F); - this.setRotateAngle(leftArmPlate3, 0.0F, 0.22689280275926282F, -0.3490658503988659F); - this.rightLegPlate4 = new ModelRenderer(this, 13, 86); - this.rightLegPlate4.mirror = true; - this.rightLegPlate4.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightLegPlate4.addBox(-3.0F, 1.1F, -2.0F, 1, 8, 4, 0.0F); - this.setRotateAngle(rightLegPlate4, 0.0F, 0.0F, 0.08726646259971647F); - this.leftLegPlate7 = new ModelRenderer(this, 0, 91); - this.leftLegPlate7.setRotationPoint(0.0F, 4.6F, 0.0F); - this.leftLegPlate7.addBox(-2.6F, 1.6F, 1.7F, 5, 3, 1, 0.0F); - this.setRotateAngle(leftLegPlate7, 0.20943951023931953F, 0.1832595714594046F, 0.0F); - this.bodyPlate6 = new ModelRenderer(this, 29, 33); - this.bodyPlate6.mirror = true; - this.bodyPlate6.setRotationPoint(0.0F, 3.0F, 0.0F); - this.bodyPlate6.addBox(-4.1F, 1.4F, -3.3F, 5, 2, 1, 0.0F); - this.setRotateAngle(bodyPlate6, -0.3490658503988659F, 0.22689280275926282F, 0.0F); - this.facePlate5 = new ModelRenderer(this, 24, 98); - this.facePlate5.setRotationPoint(0.0F, 0.5F, 0.0F); - this.facePlate5.addBox(-2.0F, -8.7F, -6.0F, 5, 4, 1, 0.0F); - this.setRotateAngle(facePlate5, -0.05235987755982988F, -0.3490658503988659F, 0.0F); - this.backPlate = new ModelRenderer(this, 48, 99); - this.backPlate.setRotationPoint(0.0F, 0.0F, 0.0F); - this.backPlate.addBox(-4.0F, -7.8F, 3.6F, 8, 8, 1, 0.0F); - this.setRotateAngle(backPlate, 0.05235987755982988F, -0.0F, 0.0F); - this.rightBoot3 = new ModelRenderer(this, 0, 119); - this.rightBoot3.mirror = true; - this.rightBoot3.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightBoot3.addBox(-3.0F, 9.0F, -2.5F, 1, 2, 7, 0.0F); - this.setRotateAngle(rightBoot3, 0.0F, 0.0F, 0.08726646259971647F); - this.leftLeg = new ModelRenderer(this, 0, 70); - this.leftLeg.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftLeg.addBox(-2.5F, 0.0F, -2.5F, 5, 10, 5, 0.0F); - this.bodyPlate3 = new ModelRenderer(this, 29, 33); - this.bodyPlate3.mirror = true; - this.bodyPlate3.setRotationPoint(0.0F, 0.0F, 0.0F); - this.bodyPlate3.addBox(-4.1F, 1.4F, -3.7F, 5, 2, 1, 0.0F); - this.setRotateAngle(bodyPlate3, -0.3490658503988659F, 0.22689280275926282F, 0.0F); - this.facePlate4 = new ModelRenderer(this, 24, 93); - this.facePlate4.mirror = true; - this.facePlate4.setRotationPoint(0.0F, 0.5F, 0.0F); - this.facePlate4.addBox(-3.0F, -3.5F, -5.5F, 5, 3, 1, 0.0F); - this.setRotateAngle(facePlate4, 0.05235987755982988F, 0.3490658503988659F, 0.0F); - this.rightArmPlate4 = new ModelRenderer(this, 16, 62); - this.rightArmPlate4.setRotationPoint(0.0F, 1.7F, 0.0F); - this.rightArmPlate4.addBox(-6.3F, -2.0F, -1.5F, 1, 3, 4, 0.0F); - this.setRotateAngle(rightArmPlate4, 0.0F, 0.22689280275926282F, 0.3490658503988659F); - this.leftLegPlate1 = new ModelRenderer(this, 0, 86); - this.leftLegPlate1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftLegPlate1.addBox(-2.6F, 1.6F, -2.7F, 5, 3, 1, 0.0F); - this.setRotateAngle(leftLegPlate1, -0.20943951023931953F, -0.1832595714594046F, 0.0F); - this.rightLegPlate7 = new ModelRenderer(this, 0, 91); - this.rightLegPlate7.mirror = true; - this.rightLegPlate7.setRotationPoint(0.0F, 4.6F, 0.0F); - this.rightLegPlate7.addBox(-2.4F, 1.6F, 1.7F, 5, 3, 1, 0.0F); - this.setRotateAngle(rightLegPlate7, 0.20943951023931953F, -0.1832595714594046F, 0.0F); - this.rightLegPlate1 = new ModelRenderer(this, 0, 86); - this.rightLegPlate1.mirror = true; - this.rightLegPlate1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightLegPlate1.addBox(-2.4F, 1.6F, -2.7F, 5, 3, 1, 0.0F); - this.setRotateAngle(rightLegPlate1, -0.20943951023931953F, 0.1832595714594046F, 0.0F); - this.belt = new ModelRenderer(this, 29, 64); - this.belt.setRotationPoint(0.0F, 0.0F, 0.0F); - this.belt.addBox(-5.0F, 11.0F, -3.0F, 10, 2, 6, 0.0F); - this.rightLegPlate5 = new ModelRenderer(this, 0, 91); - this.rightLegPlate5.mirror = true; - this.rightLegPlate5.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightLegPlate5.addBox(-2.4F, 1.6F, 1.7F, 5, 3, 1, 0.0F); - this.setRotateAngle(rightLegPlate5, 0.20943951023931953F, -0.1832595714594046F, 0.0F); - this.leftBoot3 = new ModelRenderer(this, 0, 119); - this.leftBoot3.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftBoot3.addBox(2.0F, 9.0F, -2.5F, 1, 2, 7, 0.0F); - this.setRotateAngle(leftBoot3, 0.0F, 0.0F, -0.08726646259971647F); - this.leftBoot2 = new ModelRenderer(this, 0, 111); - this.leftBoot2.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftBoot2.addBox(-2.0F, 8.5F, -3.0F, 5, 1, 6, 0.0F); - this.leftLegPlate6 = new ModelRenderer(this, 0, 91); - this.leftLegPlate6.setRotationPoint(0.0F, 2.3F, 0.0F); - this.leftLegPlate6.addBox(-2.6F, 1.6F, 1.7F, 5, 3, 1, 0.0F); - this.setRotateAngle(leftLegPlate6, 0.20943951023931953F, 0.1832595714594046F, 0.0F); - this.rightArmPlate7 = new ModelRenderer(this, 29, 73); - this.rightArmPlate7.mirror = true; - this.rightArmPlate7.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightArmPlate7.addBox(-3.0F, -3.5F, -3.5F, 3, 4, 7, 0.0F); - this.rightArmPlate1 = new ModelRenderer(this, 16, 54); - this.rightArmPlate1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightArmPlate1.addBox(-6.3F, -2.0F, -2.5F, 1, 3, 4, 0.0F); - this.setRotateAngle(rightArmPlate1, 0.0F, -0.22689280275926282F, 0.3490658503988659F); - this.leftArmPlate4 = new ModelRenderer(this, 16, 62); - this.leftArmPlate4.setRotationPoint(0.0F, 1.7F, 0.0F); - this.leftArmPlate4.addBox(5.3F, -2.0F, -1.5F, 1, 3, 4, 0.0F); - this.setRotateAngle(leftArmPlate4, 0.0F, -0.22689280275926282F, -0.3490658503988659F); - this.facePlate7 = new ModelRenderer(this, 27, 104); - this.facePlate7.setRotationPoint(0.0F, 0.0F, 0.0F); - this.facePlate7.addBox(3.4F, -8.0F, -3.6F, 1, 8, 9, 0.0F); - this.setRotateAngle(facePlate7, 0.0F, 0.10471975511965977F, 0.0F); - - this.bipedBody.cubeList.clear(); - this.bipedHead.cubeList.clear(); - this.bipedHeadwear.cubeList.clear(); - this.bipedLeftArm.cubeList.clear(); - this.bipedLeftLeg.cubeList.clear(); - this.bipedRightArm.cubeList.clear(); - this.bipedRightLeg.cubeList.clear(); - - if(addChestPiece) - { - this.bipedBody.addChild(this.bodyPlate5); - this.bipedBody.addChild(this.leftSpacer1); - this.bipedBody.addChild(this.bodyPlate2); - this.bipedBody.addChild(this.omegaPlate); - this.bipedLeftArm.addChild(this.leftArmPlate5); - this.bipedLeftArm.addChild(this.leftArmPlate6); - this.bipedLeftArm.addChild(this.leftArmPlate7); - this.bipedLeftArm.addChild(this.leftArm); - this.bipedRightArm.addChild(this.rightShoulder); - this.bipedRightArm.addChild(this.rightArmPlate6); - this.bipedLeftArm.addChild(this.leftArmPlate2); - this.bipedLeftArm.addChild(this.leftArmPlate1); - this.bipedRightArm.addChild(this.rightArmPlate2); - this.bipedRightArm.addChild(this.rightArmPlate3); - this.bipedRightArm.addChild(this.rightArmPlate5); - this.bipedRightArm.addChild(this.rightArm); - this.bipedLeftArm.addChild(this.leftShoulder); - this.bipedLeftArm.addChild(this.leftArmPlate3); - this.bipedRightArm.addChild(this.rightArmPlate5); - this.bipedRightArm.addChild(this.rightArmPlate7); - this.bipedRightArm.addChild(this.rightArmPlate1); - this.bipedLeftArm.addChild(this.leftArmPlate4); - this.bipedRightArm.addChild(this.rightArmPlate4); - this.bipedBody.addChild(this.bodyPlate6); - this.bipedBody.addChild(this.rightSpacer1); - this.bipedBody.addChild(this.bodyPlate1); - this.bipedBody.addChild(this.bodyPlate4); - this.bipedBody.addChild(this.bodyPlate3); - this.bipedBody.addChild(this.chestMain); - } - - if(addLeggings) - { - this.bipedBody.addChild(this.belt); - this.bipedRightLeg.addChild(this.rightLeg); - this.bipedRightLeg.addChild(this.rightLegPlate3); - this.bipedLeftLeg.addChild(this.leftLegPlate5); - this.bipedLeftLeg.addChild(this.leftLegPlate2); - this.bipedRightLeg.addChild(this.rightLegPlate6); - this.bipedLeftLeg.addChild(this.leftLegPlate4); - this.bipedLeftLeg.addChild(this.leftLegPlate7); - this.bipedRightLeg.addChild(this.rightLegPlate4); - this.bipedRightLeg.addChild(this.rightLegPlate1_1); - this.bipedLeftLeg.addChild(this.leftLegPlate6); - this.bipedLeftLeg.addChild(this.leftLegPlate3); - this.bipedLeftLeg.addChild(this.leftLeg); - this.bipedRightLeg.addChild(this.rightLegPlate7); - this.bipedRightLeg.addChild(this.rightLegPlate1); - this.bipedRightLeg.addChild(this.rightLegPlate5); - this.bipedLeftLeg.addChild(this.leftLegPlate1); - } - - if(addBoots) - { - this.bipedLeftLeg.addChild(this.leftBoot1); - this.bipedRightLeg.addChild(this.rightBoot1); - this.bipedRightLeg.addChild(this.rightBoot2); - this.bipedLeftLeg.addChild(this.leftBoot3); - this.bipedLeftLeg.addChild(this.leftBoot2); - this.bipedRightLeg.addChild(this.rightBoot3); - } - - if(addHelmet) - { - this.bipedHead.addChild(this.facePlate3); - this.bipedHead.addChild(this.facePlate1); - this.bipedHead.addChild(this.facePlate6); - this.bipedHead.addChild(this.facePlate2); - this.bipedHead.addChild(this.facePlate8); - this.bipedHead.addChild(this.topPlate); - this.bipedHead.addChild(this.facePlate5); - this.bipedHead.addChild(this.backPlate); - this.bipedHead.addChild(this.facePlate4); - this.bipedHead.addChild(this.facePlate7); - } - } - - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.bipedRightLeg.render(f5); - this.bipedRightArm.render(f5); - this.bipedLeftArm.render(f5); - this.bipedBody.render(f5); - this.bipedHead.render(f5); - this.bipedLeftLeg.render(f5); - } - - /** - * This is a helper function from Tabula to set the rotation of model parts - */ - public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) - { - modelRenderer.rotateAngleX = x; - modelRenderer.rotateAngleY = y; - modelRenderer.rotateAngleZ = z; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaWater.java deleted file mode 100644 index b46da158..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaWater.java +++ /dev/null @@ -1,500 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -public class ModelOmegaWater extends ModelBiped -{ - //fields - ModelRenderer belt; - - ModelRenderer chestMain; - ModelRenderer chestPlate1; - ModelRenderer chestPlate2; - ModelRenderer chestPlate3; - ModelRenderer chestPlate4; - ModelRenderer leftTank; - ModelRenderer rightTank; - ModelRenderer tankBrace; - ModelRenderer leftArmPlate1; - ModelRenderer leftArmPlate2; - ModelRenderer leftShoulder; - ModelRenderer leftArm; - ModelRenderer rightArm; - ModelRenderer rightArmPlate1; - ModelRenderer rightArmPlate2; - ModelRenderer rightShoulder; - ModelRenderer leftLeg; - ModelRenderer leftLegBrace; - ModelRenderer leftLegPouch; - ModelRenderer rightLeg; - ModelRenderer leftFoot; - ModelRenderer leftFootBrace; - ModelRenderer leftFootPlate; - ModelRenderer rightFoot; - ModelRenderer rightFootBrace; - ModelRenderer rightFootPlate; - ModelRenderer topHeadPlate; - ModelRenderer facePlate1; - ModelRenderer facePlate2; - ModelRenderer facePlate3; - ModelRenderer facePlate4; - ModelRenderer facePlate5; - ModelRenderer leftPlate1; - ModelRenderer leftPlate2; - ModelRenderer leftPlate3; - ModelRenderer backPlate2; - ModelRenderer leftPlate4; - ModelRenderer backPlate1; - ModelRenderer rightPlate1; - ModelRenderer rightPlate2; - ModelRenderer rightPlate3; - ModelRenderer rightPlate4; - - public ModelOmegaWater(float f, boolean addHelmet, boolean addChestPiece, boolean addLeggings, boolean addBoots) - { - super(f, 0.0f, 256, 128); - textureWidth = 256; - textureHeight = 128; - - belt = new ModelRenderer(this, 29, 42); - belt.addBox(-5F, 0F, -3F, 10, 2, 6); - belt.setRotationPoint(0F, 11F, 0F); - belt.setTextureSize(256, 128); - belt.mirror = true; - setRotation(belt, 0F, 0F, 0F); - - chestMain = new ModelRenderer(this, 0, 42); - chestMain.addBox(-4.5F, -0.5F, -2.5F, 9, 13, 5); - chestMain.setRotationPoint(0F, 0F, 0F); - chestMain.setTextureSize(256, 128); - chestMain.mirror = true; - setRotation(chestMain, 0F, 0F, 0F); - - chestPlate1 = new ModelRenderer(this, 0, 60); - chestPlate1.addBox(-4F, 1F, -2.5F, 8, 3, 2); - chestPlate1.setRotationPoint(0F, 0F, 0F); - chestPlate1.setTextureSize(256, 128); - chestPlate1.mirror = true; - setRotation(chestPlate1, -0.3490659F, 0F, 0F); - - chestPlate2 = new ModelRenderer(this, 0, 66); - chestPlate2.mirror = true; - chestPlate2.addBox(-4.5F, 2.5F, -3.5F, 3, 3, 1); - chestPlate2.setRotationPoint(0F, 0F, 0F); - chestPlate2.setTextureSize(256, 128); - chestPlate2.mirror = true; - setRotation(chestPlate2, 0F, 0F, 0F); - chestPlate2.mirror = false; - - chestPlate3 = new ModelRenderer(this, 0, 66); - chestPlate3.addBox(1.5F, 2.5F, -3.5F, 3, 3, 1); - chestPlate3.setRotationPoint(0F, 0F, 0F); - chestPlate3.setTextureSize(256, 128); - chestPlate3.mirror = true; - setRotation(chestPlate3, 0F, 0F, 0F); - - chestPlate4 = new ModelRenderer(this, 0, 71); - chestPlate4.addBox(-1.5F, 4.5F, -3.5F, 3, 5, 1); - chestPlate4.setRotationPoint(0F, 0F, 0F); - chestPlate4.setTextureSize(256, 128); - chestPlate4.mirror = true; - setRotation(chestPlate4, 0F, 0F, 0F); - - leftTank = new ModelRenderer(this, 9, 66); - leftTank.addBox(1F, 1F, 2.5F, 2, 8, 1); - leftTank.setRotationPoint(0F, 0F, 0F); - leftTank.setTextureSize(256, 128); - leftTank.mirror = true; - setRotation(leftTank, 0F, 0F, 0F); - - rightTank = new ModelRenderer(this, 9, 66); - rightTank.addBox(-3F, 1F, 2.5F, 2, 8, 1); - rightTank.setRotationPoint(0F, 0F, 0F); - rightTank.setTextureSize(256, 128); - rightTank.mirror = true; - setRotation(rightTank, 0F, 0F, 0F); - - tankBrace = new ModelRenderer(this, 0, 78); - tankBrace.addBox(-4F, 1.5F, 2F, 8, 2, 1); - tankBrace.setRotationPoint(0F, 0F, 0F); - tankBrace.setTextureSize(256, 128); - tankBrace.mirror = true; - setRotation(tankBrace, 0F, 0F, 0F); - - leftArmPlate1 = new ModelRenderer(this, 0, 82); - leftArmPlate1.addBox(-0.4F-4F, -2F-3F, -4F-1, 6, 3, 1); - leftArmPlate1.setRotationPoint(5F, 2F, 0F); - leftArmPlate1.setTextureSize(256, 128); - leftArmPlate1.mirror = true; - setRotation(leftArmPlate1, -0.3490659F, 0F, -0.2617994F); - - leftArmPlate2 = new ModelRenderer(this, 0, 82); - leftArmPlate2.addBox(-0.4F-4F, -2F-3F, -4F-1, 6, 3, 1); - leftArmPlate2.setRotationPoint(5F, 4F, 0F); - leftArmPlate2.setTextureSize(256, 128); - leftArmPlate2.mirror = true; - setRotation(leftArmPlate2, -0.3490659F, 0F, -0.2617994F); - - leftShoulder = new ModelRenderer(this, 21, 82); - leftShoulder.addBox(-1F-5F, -3F-2F, -3F, 6, 5, 6); - leftShoulder.setRotationPoint(5F, 2F, 0F); - leftShoulder.setTextureSize(256, 128); - leftShoulder.mirror = true; - setRotation(leftShoulder, 0F, 0F, 0F); - - leftArm = new ModelRenderer(this, 0, 87); - leftArm.addBox(-1F-5.5F, 1.5F-2F, -2.5F, 5, 9, 5); - leftArm.setRotationPoint(5F, 2F, 0F); - leftArm.setTextureSize(256, 128); - leftArm.mirror = true; - setRotation(leftArm, 0F, 0F, 0F); - - rightArm = new ModelRenderer(this, 0, 87); - rightArm.mirror = true; - rightArm.addBox(-4F+5.5F, 1.5F-2F, -2.5F, 5, 9, 5); - rightArm.setRotationPoint(-5F, 2F, 0F); - rightArm.setTextureSize(256, 128); - rightArm.mirror = true; - setRotation(rightArm, 0F, 0F, 0F); - rightArm.mirror = false; - - rightArmPlate1 = new ModelRenderer(this, 0, 82); - rightArmPlate1.mirror = true; - rightArmPlate1.addBox(-4.6F+4F, -2.2F-3F, -4F-1, 6, 3, 1); - rightArmPlate1.setRotationPoint(-6F, 2F, 0F); - rightArmPlate1.setTextureSize(256, 128); - rightArmPlate1.mirror = true; - setRotation(rightArmPlate1, -0.3490659F, 0F, 0.2617994F); - rightArmPlate1.mirror = false; - - rightArmPlate2 = new ModelRenderer(this, 0, 82); - rightArmPlate2.mirror = true; - rightArmPlate2.addBox(-4.6F+4F, -2.2F-3F, -4F-1, 6, 3, 1); - rightArmPlate2.setRotationPoint(-6F, 4F, 0F); - rightArmPlate2.setTextureSize(256, 128); - rightArmPlate2.mirror = true; - setRotation(rightArmPlate2, -0.3490659F, 0F, 0.2617994F); - rightArmPlate2.mirror = false; - - rightShoulder = new ModelRenderer(this, 21, 82); - rightShoulder.mirror = true; - rightShoulder.addBox(-4F+5F, -3F-2F, -3F, 6, 5, 6); - rightShoulder.setRotationPoint(-6F, 2F, 0F); - rightShoulder.setTextureSize(256, 128); - rightShoulder.mirror = true; - setRotation(rightShoulder, 0F, 0F, 0F); - rightShoulder.mirror = false; - - leftLeg = new ModelRenderer(this, 29, 51); - leftLeg.addBox(-4.5F, -12F, -2.5F, 5, 10, 5); - leftLeg.setRotationPoint(2F, 12F, 0F); - leftLeg.setTextureSize(256, 128); - leftLeg.mirror = true; - setRotation(leftLeg, 0F, 0F, 0F); - - leftLegBrace = new ModelRenderer(this, 38, 67); - leftLegBrace.addBox(-2F, -7F, -3F, 3, 1, 6); - leftLegBrace.setRotationPoint(2F, 12F, 0F); - leftLegBrace.setTextureSize(256, 128); - leftLegBrace.mirror = true; - setRotation(leftLegBrace, 0F, 0F, 0F); - - leftLegPouch = new ModelRenderer(this, 29, 67); - leftLegPouch.addBox(0.5F, 3F-12F, -1.5F, 1, 4, 3); - leftLegPouch.setRotationPoint(2F, 12F, 0F); - leftLegPouch.setTextureSize(256, 128); - leftLegPouch.mirror = true; - setRotation(leftLegPouch, 0F, 0F, 0F); - - rightLeg = new ModelRenderer(this, 29, 51); - rightLeg.mirror = true; - rightLeg.addBox(-0.5F, 0F-12F, -2.5F, 5, 10, 5); - rightLeg.setRotationPoint(-2F, 12F, 0F); - rightLeg.setTextureSize(256, 128); - rightLeg.mirror = true; - setRotation(rightLeg, 0F, 0F, 0F); - rightLeg.mirror = false; - - leftFoot = new ModelRenderer(this, 21, 103); - leftFoot.addBox(-4F, 9.5F-12F, -5F, 5, 3, 8); - leftFoot.setRotationPoint(2F, 12F, 0F); - leftFoot.setTextureSize(256, 128); - leftFoot.mirror = true; - setRotation(leftFoot, 0F, 0F, 0F); - - leftFootBrace = new ModelRenderer(this, 21, 94); - leftFootBrace.addBox(-4F, 7.5F-12F, -3F, 5, 2, 6); - leftFootBrace.setRotationPoint(2F, 12F, 0F); - leftFootBrace.setTextureSize(256, 128); - leftFootBrace.mirror = true; - setRotation(leftFootBrace, 0F, 0F, 0F); - - leftFootPlate = new ModelRenderer(this, 21, 115); - leftFootPlate.addBox(-3.5F, 7F-8F, 4F-9F, 4, 3, 1); - leftFootPlate.setRotationPoint(2F, 12F, 0F); - leftFootPlate.setTextureSize(256, 128); - leftFootPlate.mirror = true; - setRotation(leftFootPlate, -0.8726646F, 0F, 0F); - - rightFoot = new ModelRenderer(this, 21, 103); - rightFoot.mirror = true; - rightFoot.addBox(-1F, 9.5F-12F, -5F, 5, 3, 8); - rightFoot.setRotationPoint(-2F, 12F, 0F); - rightFoot.setTextureSize(256, 128); - rightFoot.mirror = true; - setRotation(rightFoot, 0F, 0F, 0F); - rightFoot.mirror = false; - - rightFootBrace = new ModelRenderer(this, 21, 94); - rightFootBrace.mirror = true; - rightFootBrace.addBox(-1F, 7.5F-12F, -3F, 5, 2, 6); - rightFootBrace.setRotationPoint(-2F, 12F, 0F); - rightFootBrace.setTextureSize(256, 128); - rightFootBrace.mirror = true; - setRotation(rightFootBrace, 0F, 0F, 0F); - rightFootBrace.mirror = false; - - rightFootPlate = new ModelRenderer(this, 21, 115); - rightFootPlate.mirror = true; - rightFootPlate.addBox(-0.5F, 7F-8F, 4F-9F, 4, 3, 1); - rightFootPlate.setRotationPoint(-2F, 12F, 0F); - rightFootPlate.setTextureSize(256, 128); - rightFootPlate.mirror = true; - setRotation(rightFootPlate, -0.8726646F, 0F, 0F); - rightFootPlate.mirror = false; - - topHeadPlate = new ModelRenderer(this, 58, 19); - topHeadPlate.addBox(-4F, -8.5F, -4.5F, 8, 1, 9); - topHeadPlate.setRotationPoint(0F, 0F, 0F); - topHeadPlate.setTextureSize(256, 128); - topHeadPlate.mirror = true; - setRotation(topHeadPlate, 0F, 0F, 0F); - - facePlate1 = new ModelRenderer(this, 58, 0); - facePlate1.addBox(-4F, -8.5F, -5F, 8, 4, 1); - facePlate1.setRotationPoint(0F, 0F, 0F); - facePlate1.setTextureSize(256, 128); - facePlate1.mirror = true; - setRotation(facePlate1, 0F, 0F, 0F); - - facePlate2 = new ModelRenderer(this, 58, 6); - facePlate2.addBox(-1F, -4.5F, -5F, 2, 2, 1); - facePlate2.setRotationPoint(0F, 0F, 0F); - facePlate2.setTextureSize(256, 128); - facePlate2.mirror = true; - setRotation(facePlate2, 0F, 0F, 0F); - - facePlate3 = new ModelRenderer(this, 58, 15); - facePlate3.addBox(-4F, -4.5F, -4.5F, 8, 2, 1); - facePlate3.setRotationPoint(0F, 0F, 0F); - facePlate3.setTextureSize(256, 128); - facePlate3.mirror = true; - setRotation(facePlate3, 0F, 0F, 0F); - - facePlate4 = new ModelRenderer(this, 58, 10); - facePlate4.mirror = true; - facePlate4.addBox(-2F, -3.5F, -5.5F, 4, 3, 1); - facePlate4.setRotationPoint(0F, 0.5F, 0F); - facePlate4.setTextureSize(256, 128); - facePlate4.mirror = true; - setRotation(facePlate4, 0.0523599F, 0.3490659F, 0F); - facePlate4.mirror = false; - - facePlate5 = new ModelRenderer(this, 58, 10); - facePlate5.addBox(-2F, -3.5F, -5.5F, 4, 3, 1); - facePlate5.setRotationPoint(0F, 0.5F, 0F); - facePlate5.setTextureSize(256, 128); - facePlate5.mirror = true; - setRotation(facePlate5, 0.0523599F, -0.3490659F, 0F); - - leftPlate1 = new ModelRenderer(this, 77, 0); - leftPlate1.addBox(4.5F, -5.2F, -4.6F, 1, 3, 9); - leftPlate1.setRotationPoint(0F, -2F, 0F); - leftPlate1.setTextureSize(256, 128); - leftPlate1.mirror = true; - setRotation(leftPlate1, 0F, 0F, -0.1919862F); - - leftPlate2 = new ModelRenderer(this, 77, 0); - leftPlate2.addBox(4.5F, -5.2F, -4.6F, 1, 3, 9); - leftPlate2.setRotationPoint(0F, 0F, 0F); - leftPlate2.setTextureSize(256, 128); - leftPlate2.mirror = true; - setRotation(leftPlate2, 0F, 0F, -0.1919862F); - - leftPlate3 = new ModelRenderer(this, 77, 0); - leftPlate3.addBox(4.5F, -5.2F, -4.6F, 1, 3, 9); - leftPlate3.setRotationPoint(0F, 2F, 0F); - leftPlate3.setTextureSize(256, 128); - leftPlate3.mirror = true; - setRotation(leftPlate3, 0F, 0F, -0.1919862F); - - backPlate2 = new ModelRenderer(this, 98, 0); - backPlate2.addBox(-4F, -5.5F, 4.5F, 8, 4, 1); - backPlate2.setRotationPoint(0F, 2F, 0F); - backPlate2.setTextureSize(256, 128); - backPlate2.mirror = true; - setRotation(backPlate2, 0.122173F, 0F, 0F); - - leftPlate4 = new ModelRenderer(this, 98, 6); - leftPlate4.addBox(3.5F, -5.8F, -4.6F, 1, 2, 9); - leftPlate4.setRotationPoint(0F, 4F, 0F); - leftPlate4.setTextureSize(256, 128); - leftPlate4.mirror = true; - setRotation(leftPlate4, 0F, 0F, 0F); - - backPlate1 = new ModelRenderer(this, 98, 0); - backPlate1.addBox(-4F, -5.5F, 4.5F, 8, 4, 1); - backPlate1.setRotationPoint(0F, -2F, 0F); - backPlate1.setTextureSize(256, 128); - backPlate1.mirror = true; - setRotation(backPlate1, 0.122173F, 0F, 0F); - - rightPlate1 = new ModelRenderer(this, 77, 0); - rightPlate1.mirror = true; - rightPlate1.addBox(-5.5F, -5.2F, -4.6F, 1, 3, 9); - rightPlate1.setRotationPoint(0F, -2F, 0F); - rightPlate1.setTextureSize(256, 128); - rightPlate1.mirror = true; - setRotation(rightPlate1, 0F, 0F, 0.1919862F); - rightPlate1.mirror = false; - - rightPlate2 = new ModelRenderer(this, 77, 0); - rightPlate2.mirror = true; - rightPlate2.addBox(-5.5F, -5.2F, -4.6F, 1, 3, 9); - rightPlate2.setRotationPoint(0F, 0F, 0F); - rightPlate2.setTextureSize(256, 128); - rightPlate2.mirror = true; - setRotation(rightPlate2, 0F, 0F, 0.1919862F); - rightPlate2.mirror = false; - - rightPlate3 = new ModelRenderer(this, 77, 0); - rightPlate3.mirror = true; - rightPlate3.addBox(-5.5F, -5.2F, -4.6F, 1, 3, 9); - rightPlate3.setRotationPoint(0F, 2F, 0F); - rightPlate3.setTextureSize(256, 128); - rightPlate3.mirror = true; - setRotation(rightPlate3, 0F, 0F, 0.1919862F); - rightPlate3.mirror = false; - - rightPlate4 = new ModelRenderer(this, 98, 6); - rightPlate4.mirror = true; - rightPlate4.addBox(-4.5F, -5.8F, -4.6F, 1, 2, 9); - rightPlate4.setRotationPoint(0F, 4F, 0F); - rightPlate4.setTextureSize(256, 128); - rightPlate4.mirror = true; - setRotation(rightPlate4, 0F, 0F, 0F); - rightPlate4.mirror = false; - - this.bipedHead.cubeList.clear(); - this.bipedHeadwear.cubeList.clear(); - if (addHelmet) - { - this.bipedHead.addChild(this.facePlate1); - this.bipedHead.addChild(this.facePlate2); - this.bipedHead.addChild(this.facePlate3); - this.bipedHead.addChild(this.facePlate4); - this.bipedHead.addChild(this.facePlate5); - this.bipedHead.addChild(this.topHeadPlate); - this.bipedHead.addChild(this.leftPlate1); - this.bipedHead.addChild(this.rightPlate1); - this.bipedHead.addChild(this.leftPlate2); - this.bipedHead.addChild(this.rightPlate2); - this.bipedHead.addChild(this.leftPlate3); - this.bipedHead.addChild(this.rightPlate3); - this.bipedHead.addChild(this.leftPlate4); - this.bipedHead.addChild(this.rightPlate4); - this.bipedHead.addChild(this.backPlate1); - this.bipedHead.addChild(this.backPlate2); - - } - - this.bipedBody.cubeList.clear(); - if (addChestPiece) - { - this.bipedBody.addChild(this.chestMain); - this.bipedBody.addChild(this.chestPlate1); - this.bipedBody.addChild(this.chestPlate2); - this.bipedBody.addChild(this.chestPlate3); - this.bipedBody.addChild(this.chestPlate4); - this.bipedBody.addChild(this.leftTank); - this.bipedBody.addChild(this.rightTank); - this.bipedBody.addChild(this.tankBrace); - } - if (addLeggings) - { - this.bipedBody.addChild(this.belt); - } - - this.bipedRightArm.cubeList.clear(); - if (addChestPiece) - { - this.bipedRightArm.addChild(this.rightArm); - this.bipedRightArm.addChild(this.rightShoulder); - this.bipedRightArm.addChild(this.rightArmPlate1); - this.bipedRightArm.addChild(this.rightArmPlate2); - - } - - this.bipedLeftArm.cubeList.clear(); - if (addChestPiece) - { - this.bipedLeftArm.addChild(this.leftArm); - this.bipedLeftArm.addChild(this.leftShoulder); - this.bipedLeftArm.addChild(this.leftArmPlate1); - this.bipedLeftArm.addChild(this.leftArmPlate2); - } - - this.bipedLeftLeg.cubeList.clear(); - if (addBoots) - { - this.bipedLeftLeg.addChild(this.leftFoot); - this.bipedLeftLeg.addChild(this.leftFootBrace); - this.bipedLeftLeg.addChild(this.leftFootPlate); - } - if (addLeggings) - { - this.bipedLeftLeg.addChild(this.leftLeg); - this.bipedLeftLeg.addChild(this.leftLegBrace); - this.bipedLeftLeg.addChild(this.leftLegPouch); - } - - this.bipedRightLeg.cubeList.clear(); - if (addBoots) - { - this.bipedRightLeg.addChild(this.rightFoot); - this.bipedRightLeg.addChild(this.rightFootBrace); - this.bipedRightLeg.addChild(this.rightFootPlate); - } - if (addLeggings) - { - this.bipedRightLeg.addChild(this.rightLeg); - } - } - - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - - this.bipedHead.render(f5); - this.bipedBody.render(f5); - this.bipedLeftArm.render(f5); - this.bipedRightArm.render(f5); - this.bipedLeftLeg.render(f5); - this.bipedRightLeg.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaWind.java deleted file mode 100644 index 6dfb7dc8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelOmegaWind.java +++ /dev/null @@ -1,405 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -/** - * OmegaWind.tcn - TechneToTabulaImporter - * Created using Tabula 4.1.0 - */ -public class ModelOmegaWind extends ModelBiped -{ - public ModelRenderer facePlate1; - public ModelRenderer facePlate2; - public ModelRenderer facePlate3; - public ModelRenderer facePlate4; - public ModelRenderer forePlate; - public ModelRenderer topWingPlate; - public ModelRenderer leftWingPlate1; - public ModelRenderer leftWingPlate3; - public ModelRenderer rightWingPlate1; - public ModelRenderer rightWingPlate2; - public ModelRenderer rightWingPlate3; - public ModelRenderer topPlate; - public ModelRenderer backPlate; - public ModelRenderer leftWingPlate2; - public ModelRenderer chestMain; - public ModelRenderer chestPlate1; - public ModelRenderer chestPlate3; - public ModelRenderer chestPlate4; - public ModelRenderer chestPlate5; - public ModelRenderer chestPlate6; - public ModelRenderer chestOrnament; - public ModelRenderer belt; - public ModelRenderer chestPlate2; - public ModelRenderer rightArm; - public ModelRenderer rightShoulder; - public ModelRenderer rightArmPlate1; - public ModelRenderer rightArmPlate2; - public ModelRenderer rightArmPlate3; - public ModelRenderer rightFloater1; - public ModelRenderer rightFloater2; - public ModelRenderer rightFloater3; - public ModelRenderer rightFloater4; - public ModelRenderer leftArm; - public ModelRenderer leftShoulder; - public ModelRenderer leftArmPlate1; - public ModelRenderer leftArmPlate2; - public ModelRenderer leftArmPlate3; - public ModelRenderer leftFloater1; - public ModelRenderer leftFloater2; - public ModelRenderer leftFloater3; - public ModelRenderer leftFloater4; - public ModelRenderer rightLeg; - public ModelRenderer rightLegFloater1; - public ModelRenderer rightLegFloater2; - public ModelRenderer rightLegFloater3; - public ModelRenderer rightFoot2; - public ModelRenderer rightFootPlate; - public ModelRenderer rightFoot1; - public ModelRenderer leftLeg; - public ModelRenderer leftLegFloater1; - public ModelRenderer leftLegFloater2; - public ModelRenderer leftLegFloater3; - public ModelRenderer leftFoot1; - public ModelRenderer leftFoot2; - public ModelRenderer leftFootPlate; - - public ModelOmegaWind(float f, boolean addHelmet, boolean addChestPiece, boolean addLeggings, boolean addBoots) - { - super(f, 0.0f, 128, 128); - this.rightWingPlate2 = new ModelRenderer(this, 33, 82); - this.rightWingPlate2.mirror = true; - this.rightWingPlate2.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightWingPlate2.addBox(-5.0F, -4.900000095367432F, -2.5F, 1, 2, 3, 0.0F); - this.setRotateAngle(rightWingPlate2, 0.13962633907794952F, -0.0F, 0.0F); - this.leftFloater1 = new ModelRenderer(this, 0, 78); - this.leftFloater1.setRotationPoint(1.0F, 7.0F, 0.0F); - this.leftFloater1.addBox(3.5F, -2.0F, -1.5F, 1, 3, 3, 0.0F); - this.setRotateAngle(leftFloater1, -0.148352986419518F, -0.5040510879759623F, 0.30002209841782523F); - - this.leftWingPlate3 = new ModelRenderer(this, 38, 92); - this.leftWingPlate3.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftWingPlate3.addBox(3.5F, -5.0F, -3.9000000953674316F, 1, 5, 9, 0.0F); - this.setRotateAngle(leftWingPlate3, 0.0F, 0.12217304855585097F, 0.0F); - this.leftFoot1 = new ModelRenderer(this, 0, 110); - this.leftFoot1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftFoot1.addBox(-2.0F, 9.5F, -5.0F, 5, 3, 8, 0.0F); - this.rightArmPlate1 = new ModelRenderer(this, 21, 51); - this.rightArmPlate1.mirror = true; - this.rightArmPlate1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightArmPlate1.addBox(-5.5F, -2.0F, -4.0F, 1, 4, 8, 0.0F); - this.setRotateAngle(rightArmPlate1, 0.0F, -0.0F, 0.5585053606381855F); - this.topPlate = new ModelRenderer(this, 59, 92); - this.topPlate.setRotationPoint(0.0F, 0.0F, 0.0F); - this.topPlate.addBox(-4.5F, -8.100000381469727F, -4.0F, 9, 1, 8, 0.0F); - - this.leftShoulder = new ModelRenderer(this, 0, 66); - this.leftShoulder.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftShoulder.addBox(-1.0F, -3.0F, -3.0F, 5, 5, 6, 0.0F); - this.leftArmPlate3 = new ModelRenderer(this, 21, 51); - this.leftArmPlate3.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftArmPlate3.addBox(2.5F, 1.0F, -4.0F, 1, 4, 8, 0.0F); - this.setRotateAngle(leftArmPlate3, 0.0F, -0.0F, -0.5585053606381855F); - this.leftFloater4 = new ModelRenderer(this, 0, 78); - this.leftFloater4.setRotationPoint(1.0F, 7.0F, 0.0F); - this.leftFloater4.addBox(3.5F, -2.0F, -1.5F, 1, 3, 3, 0.0F); - this.setRotateAngle(leftFloater4, -1.5707963267948966F, -1.3089969389957472F, 1.5707963267948966F); - this.leftWingPlate1 = new ModelRenderer(this, 42, 77); - this.leftWingPlate1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftWingPlate1.addBox(4.0F, -7.900000095367432F, -4.5F, 1, 3, 11, 0.0F); - this.setRotateAngle(leftWingPlate1, 0.13962633907794952F, -0.0F, 0.0F); - this.rightShoulder = new ModelRenderer(this, 0, 66); - this.rightShoulder.mirror = true; - this.rightShoulder.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightShoulder.addBox(-4.0F, -3.0F, -3.0F, 5, 5, 6, 0.0F); - this.leftLegFloater3 = new ModelRenderer(this, 0, 78); - this.leftLegFloater3.mirror = true; - this.leftLegFloater3.setRotationPoint(0.0F, 5.0F, 0.0F); - this.leftLegFloater3.addBox(4.0F, -1.5F, -1.5F, 1, 3, 3, 0.0F); - this.setRotateAngle(leftLegFloater3, -0.7681194038027044F, -1.2027063875492923F, 0.8026769229921922F); - this.facePlate4 = new ModelRenderer(this, 42, 63); - this.facePlate4.mirror = true; - this.facePlate4.setRotationPoint(0.0F, 0.5F, 0.0F); - this.facePlate4.addBox(-2.0F, -3.5F, -5.5F, 4, 3, 1, 0.0F); - this.setRotateAngle(facePlate4, 0.05235987901687623F, 0.34906584024429316F, 0.0F); - this.leftLegFloater1 = new ModelRenderer(this, 0, 78); - this.leftLegFloater1.mirror = true; - this.leftLegFloater1.setRotationPoint(0.0F, 5.0F, 0.0F); - this.leftLegFloater1.addBox(4.0F, -1.5F, -1.5F, 1, 3, 3, 0.0F); - this.setRotateAngle(leftLegFloater1, 0.0F, -0.0F, 0.2617993877991494F); - this.rightLegFloater2 = new ModelRenderer(this, 0, 78); - this.rightLegFloater2.setRotationPoint(0.0F, 5.0F, 0.0F); - this.rightLegFloater2.addBox(-5.0F, -1.5F, -1.5F, 1, 3, 3, 0.0F); - this.setRotateAngle(rightLegFloater2, -0.7681194038027044F, 1.2027063875492923F, -0.8026769229921922F); - this.leftFloater3 = new ModelRenderer(this, 0, 78); - this.leftFloater3.setRotationPoint(1.0F, 7.0F, 0.0F); - this.leftFloater3.addBox(3.5F, -2.0F, -1.5F, 1, 3, 3, 0.0F); - this.setRotateAngle(leftFloater3, 1.5707963267948966F, 1.3089969389957472F, 1.5707963267948966F); - this.leftWingPlate2 = new ModelRenderer(this, 33, 82); - this.leftWingPlate2.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftWingPlate2.addBox(4.0F, -4.900000095367432F, -2.5F, 1, 2, 3, 0.0F); - this.setRotateAngle(leftWingPlate2, 0.13962633907794952F, -0.0F, 0.0F); - this.facePlate3 = new ModelRenderer(this, 42, 63); - this.facePlate3.setRotationPoint(0.0F, 0.5F, 0.0F); - this.facePlate3.addBox(-2.0F, -3.5F, -5.5F, 4, 3, 1, 0.0F); - this.setRotateAngle(facePlate3, 0.05235987901687623F, -0.34906584024429316F, 0.0F); - this.rightLegFloater3 = new ModelRenderer(this, 0, 78); - this.rightLegFloater3.setRotationPoint(0.0F, 5.0F, 0.0F); - this.rightLegFloater3.addBox(-5.0F, -1.5F, -1.5F, 1, 3, 3, 0.0F); - this.setRotateAngle(rightLegFloater3, 0.7681194038027044F, -1.2027063875492923F, -0.8026769229921922F); - this.rightArmPlate3 = new ModelRenderer(this, 21, 51); - this.rightArmPlate3.mirror = true; - this.rightArmPlate3.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightArmPlate3.addBox(-3.5F, 1.0F, -4.0F, 1, 4, 8, 0.0F); - this.setRotateAngle(rightArmPlate3, 0.0F, -0.0F, 0.5585053606381855F); - this.chestPlate6 = new ModelRenderer(this, 29, 33); - this.chestPlate6.mirror = true; - this.chestPlate6.setRotationPoint(0.0F, 3.0F, -3.0F); - this.chestPlate6.addBox(-6.0F, -1.0F, 0.0F, 5, 2, 1, 0.0F); - this.setRotateAngle(chestPlate6, 0.17457550921422682F, -0.060447682496676876F, -0.5246555175572628F); - this.belt = new ModelRenderer(this, 0, 85); - this.belt.setRotationPoint(0.0F, 0.0F, 0.0F); - this.belt.addBox(-5.0F, 11.0F, -3.0F, 10, 2, 6, 0.0F); - this.rightArmPlate2 = new ModelRenderer(this, 21, 51); - this.rightArmPlate2.mirror = true; - this.rightArmPlate2.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightArmPlate2.addBox(-4.5F, -0.5F, -4.0F, 1, 4, 8, 0.0F); - this.setRotateAngle(rightArmPlate2, 0.0F, -0.0F, 0.5585053606381855F); - this.rightFoot2 = new ModelRenderer(this, 27, 110); - this.rightFoot2.mirror = true; - this.rightFoot2.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightFoot2.addBox(-3.0F, 7.5F, -3.0F, 5, 2, 6, 0.0F); - this.rightLegFloater1 = new ModelRenderer(this, 0, 78); - this.rightLegFloater1.setRotationPoint(0.0F, 5.0F, 0.0F); - this.rightLegFloater1.addBox(-5.0F, -1.5F, -1.5F, 1, 3, 3, 0.0F); - this.setRotateAngle(rightLegFloater1, 0.0F, -0.0F, -0.2617993877991494F); - this.leftFloater2 = new ModelRenderer(this, 0, 78); - this.leftFloater2.setRotationPoint(1.0F, 7.0F, 0.0F); - this.leftFloater2.addBox(3.5F, -2.0F, -1.5F, 1, 3, 3, 0.0F); - this.setRotateAngle(leftFloater2, 0.148352986419518F, 0.5040510879759623F, 0.30002209841782523F); - this.rightFloater2 = new ModelRenderer(this, 0, 78); - this.rightFloater2.mirror = true; - this.rightFloater2.setRotationPoint(-1.0F, 7.0F, 0.0F); - this.rightFloater2.addBox(-4.5F, -2.0F, -1.5F, 1, 3, 3, 0.0F); - this.setRotateAngle(rightFloater2, -1.5707963267948966F, 1.3089969389957472F, -1.5707963267948966F); - this.rightWingPlate1 = new ModelRenderer(this, 42, 77); - this.rightWingPlate1.mirror = true; - this.rightWingPlate1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightWingPlate1.addBox(-5.0F, -7.900000095367432F, -4.5F, 1, 3, 11, 0.0F); - this.setRotateAngle(rightWingPlate1, 0.13962633907794952F, -0.0F, 0.0F); - - this.leftArm = new ModelRenderer(this, 0, 51); - this.leftArm.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftArm.addBox(-1.5F, 2.0F, -2.5F, 5, 9, 5, 0.0F); - this.rightLeg = new ModelRenderer(this, 0, 94); - this.rightLeg.mirror = true; - this.rightLeg.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightLeg.addBox(-2.5F, 0.0F, -2.5F, 5, 10, 5, 0.0F); - this.leftLegFloater2 = new ModelRenderer(this, 0, 78); - this.leftLegFloater2.mirror = true; - this.leftLegFloater2.setRotationPoint(0.0F, 5.0F, 0.0F); - this.leftLegFloater2.addBox(4.0F, -1.5F, -1.5F, 1, 3, 3, 0.0F); - this.setRotateAngle(leftLegFloater2, 0.7681194038027044F, 1.2027063875492923F, 0.8026769229921922F); - this.chestMain = new ModelRenderer(this, 0, 33); - this.chestMain.setRotationPoint(0.0F, 0.0F, 0.0F); - this.chestMain.addBox(-4.5F, -0.5F, -2.5F, 9, 12, 5, 0.0F); - this.chestPlate4 = new ModelRenderer(this, 29, 33); - this.chestPlate4.mirror = true; - this.chestPlate4.setRotationPoint(0.0F, 3.0F, -3.0F); - this.chestPlate4.addBox(-6.0F, -1.0F, 0.0F, 5, 2, 1, 0.0F); - this.setRotateAngle(chestPlate4, 0.10467716894167224F, -0.060447682496676876F, 0.5246555175572628F); - this.leftLeg = new ModelRenderer(this, 0, 94); - this.leftLeg.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftLeg.addBox(-2.5F, 0.0F, -2.5F, 5, 10, 5, 0.0F); - - this.rightFloater3 = new ModelRenderer(this, 0, 78); - this.rightFloater3.mirror = true; - this.rightFloater3.setRotationPoint(-1.0F, 7.0F, 0.0F); - this.rightFloater3.addBox(-4.5F, -2.0F, -1.5F, 1, 3, 3, 0.0F); - this.setRotateAngle(rightFloater3, 0.148352986419518F, -0.5040510879759623F, -0.30002209841782523F); - this.chestPlate2 = new ModelRenderer(this, 29, 33); - this.chestPlate2.setRotationPoint(0.0F, 3.0F, -3.0F); - this.chestPlate2.addBox(1.0F, -1.0F, 0.0F, 5, 2, 1, 0.0F); - this.setRotateAngle(chestPlate2, 0.13962633907794952F, 0.06981316953897476F, 0.0F); - this.rightFootPlate = new ModelRenderer(this, 21, 94); - this.rightFootPlate.mirror = true; - this.rightFootPlate.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightFootPlate.addBox(-1.5F, 9.5F, -3.5F, 1, 3, 7, 0.0F); - this.setRotateAngle(rightFootPlate, 0.0F, -0.0F, 0.22689280275926282F); - this.chestOrnament = new ModelRenderer(this, 29, 37); - this.chestOrnament.setRotationPoint(0.0F, 3.0F, -3.0F); - this.chestOrnament.addBox(-2.0F, -2.0F, -0.5F, 4, 4, 1, 0.0F); - this.rightFloater1 = new ModelRenderer(this, 0, 78); - this.rightFloater1.mirror = true; - this.rightFloater1.setRotationPoint(-1.0F, 7.0F, 0.0F); - this.rightFloater1.addBox(-4.5F, -2.0F, -1.5F, 1, 3, 3, 0.0F); - this.setRotateAngle(rightFloater1, -0.148352986419518F, 0.5040510879759623F, -0.30002209841782523F); - this.leftArmPlate2 = new ModelRenderer(this, 21, 51); - this.leftArmPlate2.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftArmPlate2.addBox(3.5F, -0.5F, -4.0F, 1, 4, 8, 0.0F); - this.setRotateAngle(leftArmPlate2, 0.0F, -0.0F, -0.5585053606381855F); - this.rightFoot1 = new ModelRenderer(this, 0, 110); - this.rightFoot1.mirror = true; - this.rightFoot1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightFoot1.addBox(-3.0F, 9.5F, -5.0F, 5, 3, 8, 0.0F); - this.chestPlate3 = new ModelRenderer(this, 29, 33); - this.chestPlate3.setRotationPoint(0.0F, 3.0F, -3.0F); - this.chestPlate3.addBox(1.0F, -1.0F, 0.0F, 5, 2, 1, 0.0F); - this.setRotateAngle(chestPlate3, 0.17457550921422682F, 0.060447682496676876F, 0.5246555175572628F); - this.chestPlate1 = new ModelRenderer(this, 29, 33); - this.chestPlate1.setRotationPoint(0.0F, 3.0F, -3.0F); - this.chestPlate1.addBox(1.0F, -1.0F, 0.0F, 5, 2, 1, 0.0F); - this.setRotateAngle(chestPlate1, 0.10467716894167224F, 0.060447682496676876F, -0.5246555175572628F); - this.rightArm = new ModelRenderer(this, 0, 51); - this.rightArm.mirror = true; - this.rightArm.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightArm.addBox(-3.5F, 2.0F, -2.5F, 5, 9, 5, 0.0F); - this.leftFoot2 = new ModelRenderer(this, 27, 110); - this.leftFoot2.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftFoot2.addBox(-2.0F, 7.5F, -3.0F, 5, 2, 6, 0.0F); - this.leftFootPlate = new ModelRenderer(this, 21, 94); - this.leftFootPlate.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftFootPlate.addBox(0.5F, 9.5F, -3.5F, 1, 3, 7, 0.0F); - this.setRotateAngle(leftFootPlate, 0.0F, -0.0F, -0.22689280275926282F); - this.facePlate1 = new ModelRenderer(this, 23, 64); - this.facePlate1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.facePlate1.addBox(-4.0F, -4.5F, -4.5F, 8, 2, 1, 0.0F); - this.leftArmPlate1 = new ModelRenderer(this, 21, 51); - this.leftArmPlate1.setRotationPoint(0.0F, 0.0F, 0.0F); - this.leftArmPlate1.addBox(4.5F, -2.0F, -4.0F, 1, 4, 8, 0.0F); - this.setRotateAngle(leftArmPlate1, 0.0F, -0.0F, -0.5585053606381855F); - this.topWingPlate = new ModelRenderer(this, 34, 68); - this.topWingPlate.setRotationPoint(0.0F, 0.0F, 0.0F); - this.topWingPlate.addBox(-4.5F, -2.5F, -9.100000381469727F, 9, 3, 1, 0.0F); - this.setRotateAngle(topWingPlate, -0.9773843884468076F, -0.0F, 0.0F); - this.rightWingPlate3 = new ModelRenderer(this, 38, 92); - this.rightWingPlate3.mirror = true; - this.rightWingPlate3.setRotationPoint(0.0F, 0.0F, 0.0F); - this.rightWingPlate3.addBox(-4.5F, -5.0F, -3.9000000953674316F, 1, 5, 9, 0.0F); - this.setRotateAngle(rightWingPlate3, 0.0F, -0.12217304855585097F, 0.0F); - - this.backPlate = new ModelRenderer(this, 59, 102); - this.backPlate.setRotationPoint(0.0F, 0.0F, 0.0F); - this.backPlate.addBox(-4.5F, -7.5F, 4.0F, 9, 8, 1, 0.0F); - this.setRotateAngle(backPlate, 0.1047197580337524F, -0.0F, 0.0F); - this.facePlate2 = new ModelRenderer(this, 23, 68); - this.facePlate2.setRotationPoint(0.0F, 0.0F, 0.0F); - this.facePlate2.addBox(-1.0F, -4.5F, -5.0F, 2, 2, 1, 0.0F); - this.rightFloater4 = new ModelRenderer(this, 0, 78); - this.rightFloater4.mirror = true; - this.rightFloater4.setRotationPoint(-1.0F, 7.0F, 0.0F); - this.rightFloater4.addBox(-4.5F, -2.0F, -1.5F, 1, 3, 3, 0.0F); - this.setRotateAngle(rightFloater4, 1.5707963267948966F, -1.3089969389957472F, -1.5707963267948966F); - this.forePlate = new ModelRenderer(this, 23, 77); - this.forePlate.setRotationPoint(0.0F, 0.0F, 0.0F); - this.forePlate.addBox(-4.0F, -7.900000095367432F, -4.5F, 8, 3, 1, 0.0F); - this.setRotateAngle(forePlate, 0.13962633907794952F, -0.0F, 0.0F); - this.chestPlate5 = new ModelRenderer(this, 29, 33); - this.chestPlate5.mirror = true; - this.chestPlate5.setRotationPoint(0.0F, 3.0F, -3.0F); - this.chestPlate5.addBox(-6.0F, -1.0F, 0.0F, 5, 2, 1, 0.0F); - this.setRotateAngle(chestPlate5, 0.13962633907794952F, -0.06981316953897476F, 0.0F); - - this.bipedBody.cubeList.clear(); - this.bipedHead.cubeList.clear(); - this.bipedHeadwear.cubeList.clear(); - this.bipedLeftArm.cubeList.clear(); - this.bipedLeftLeg.cubeList.clear(); - this.bipedRightArm.cubeList.clear(); - this.bipedRightLeg.cubeList.clear(); - - if(addChestPiece) - { - this.bipedLeftArm.addChild(this.leftFloater1); - this.bipedRightArm.addChild(this.rightArmPlate1); - this.bipedLeftArm.addChild(this.leftShoulder); - this.bipedLeftArm.addChild(this.leftArmPlate3); - this.bipedLeftArm.addChild(this.leftFloater4); - this.bipedRightArm.addChild(this.rightShoulder); - this.bipedLeftArm.addChild(this.leftFloater3); - this.bipedRightArm.addChild(this.rightArmPlate3); - this.bipedBody.addChild(this.chestPlate6); - this.bipedRightArm.addChild(this.rightArmPlate2); - this.bipedLeftArm.addChild(this.leftFloater2); - this.bipedRightArm.addChild(this.rightFloater2); - this.bipedLeftArm.addChild(this.leftArm); - this.bipedBody.addChild(this.chestMain); - this.bipedBody.addChild(this.chestPlate4); - this.bipedRightArm.addChild(this.rightFloater3); - this.bipedBody.addChild(this.chestPlate2); - this.bipedBody.addChild(this.chestOrnament); - this.bipedRightArm.addChild(this.rightFloater1); - this.bipedLeftArm.addChild(this.leftArmPlate2); - this.bipedBody.addChild(this.chestPlate3); - this.bipedBody.addChild(this.chestPlate1); - this.bipedRightArm.addChild(this.rightArm); - this.bipedRightArm.addChild(this.rightFloater4); - this.bipedBody.addChild(this.chestPlate5); - this.bipedLeftArm.addChild(this.leftArmPlate1); - } - - if(addLeggings) - { - this.bipedLeftLeg.addChild(this.leftLegFloater3); - this.bipedLeftLeg.addChild(this.leftLegFloater1); - this.bipedRightLeg.addChild(this.rightLegFloater2); - this.bipedRightLeg.addChild(this.rightLegFloater3); - this.bipedBody.addChild(this.belt); - this.bipedRightLeg.addChild(this.rightLegFloater1); - this.bipedRightLeg.addChild(this.rightLeg); - this.bipedLeftLeg.addChild(this.leftLegFloater2); - this.bipedLeftLeg.addChild(this.leftLeg); - } - - if(addBoots) - { - this.bipedLeftLeg.addChild(this.leftFoot1); - this.bipedRightLeg.addChild(this.rightFoot2); - this.bipedRightLeg.addChild(this.rightFootPlate); - this.bipedRightLeg.addChild(this.rightFoot1); - this.bipedLeftLeg.addChild(this.leftFoot2); - this.bipedLeftLeg.addChild(this.leftFootPlate); - } - - if(addHelmet) - { - this.bipedHead.addChild(this.rightWingPlate2); - this.bipedHead.addChild(this.leftWingPlate3); - this.bipedHead.addChild(this.topPlate); - this.bipedHead.addChild(this.leftWingPlate1); - this.bipedHead.addChild(this.facePlate4); - this.bipedHead.addChild(this.leftWingPlate2); - this.bipedHead.addChild(this.facePlate3); - this.bipedHead.addChild(this.rightWingPlate1); - this.bipedHead.addChild(this.facePlate1); - this.bipedHead.addChild(this.topWingPlate); - this.bipedHead.addChild(this.rightWingPlate3); - this.bipedHead.addChild(this.backPlate); - this.bipedHead.addChild(this.facePlate2); - this.bipedHead.addChild(this.forePlate); - } - } - - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - this.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.bipedBody.render(f5); - this.bipedRightLeg.render(f5); - this.bipedLeftLeg.render(f5); - this.bipedRightArm.render(f5); - this.bipedLeftArm.render(f5); - this.bipedHead.render(f5); - } - - /** - * This is a helper function from Tabula to set the rotation of model parts - */ - public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { - modelRenderer.rotateAngleX = x; - modelRenderer.rotateAngleY = y; - modelRenderer.rotateAngleZ = z; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelPedestal.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelPedestal.java deleted file mode 100644 index 753df6a5..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelPedestal.java +++ /dev/null @@ -1,58 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -public class ModelPedestal extends ModelBase -{ - //fields - ModelRenderer base; - ModelRenderer top; - ModelRenderer middle; - - public ModelPedestal() - { - textureWidth = 64; - textureHeight = 32; - base = new ModelRenderer(this, 0, 0); - base.addBox(0F, 0F, 0F, 10, 1, 10); - base.setRotationPoint(-5F, 23F, -5F); - base.setTextureSize(64, 32); - base.mirror = true; - setRotation(base, 0F, 0F, 0F); - top = new ModelRenderer(this, 0, 19); - top.addBox(0F, 0F, 0F, 6, 1, 6); - top.setRotationPoint(-3F, 14F, -3F); - top.setTextureSize(64, 32); - top.mirror = true; - setRotation(top, 0F, 0F, 0F); - middle = new ModelRenderer(this, 50, 0); - middle.addBox(0F, 0F, 0F, 2, 8, 2); - middle.setRotationPoint(-1F, 15F, -1F); - middle.setTextureSize(64, 32); - middle.mirror = true; - setRotation(middle, 0F, 0F, 0F); - } - - 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); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - base.render(f5); - top.render(f5); - middle.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelPlinth.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelPlinth.java deleted file mode 100644 index f4190b5d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelPlinth.java +++ /dev/null @@ -1,90 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -public class ModelPlinth extends ModelBase -{ - //fields - ModelRenderer base; - ModelRenderer table; - ModelRenderer pillar; - ModelRenderer edge1; - ModelRenderer edge2; - ModelRenderer edge3; - ModelRenderer edge4; - - public ModelPlinth() - { - textureWidth = 64; - textureHeight = 64; - base = new ModelRenderer(this, 0, 16); - base.addBox(0F, 0F, 0F, 10, 2, 10); - base.setRotationPoint(-5F, 22F, -5F); - base.setTextureSize(64, 64); - base.mirror = true; - setRotation(base, 0F, 0F, 0F); - table = new ModelRenderer(this, 0, 0); - table.addBox(0F, 0F, 0F, 14, 1, 14); - table.setRotationPoint(-7F, 11F, -7F); - table.setTextureSize(64, 64); - table.mirror = true; - setRotation(table, 0F, 0F, 0F); - pillar = new ModelRenderer(this, 0, 32); - pillar.addBox(0F, 0F, 0F, 6, 10, 6); - pillar.setRotationPoint(-3F, 12F, -3F); - pillar.setTextureSize(64, 64); - pillar.mirror = true; - setRotation(pillar, 0F, 0F, 0F); - edge1 = new ModelRenderer(this, 0, 29); - edge1.addBox(0F, 0F, 0F, 14, 1, 1); - edge1.setRotationPoint(-7F, 10F, 6F); - edge1.setTextureSize(64, 64); - edge1.mirror = true; - setRotation(edge1, 0F, 0F, 0F); - edge2 = new ModelRenderer(this, 0, 29); - edge2.addBox(0F, 0F, 0F, 14, 1, 1); - edge2.setRotationPoint(-7F, 10F, -7F); - edge2.setTextureSize(64, 64); - edge2.mirror = true; - setRotation(edge2, 0F, 0F, 0F); - edge3 = new ModelRenderer(this, 25, 32); - edge3.addBox(0F, 0F, 0F, 1, 1, 12); - edge3.setRotationPoint(-7F, 10F, -6F); - edge3.setTextureSize(64, 64); - edge3.mirror = true; - setRotation(edge3, 0F, 0F, 0F); - edge4 = new ModelRenderer(this, 25, 32); - edge4.addBox(0F, 0F, 0F, 1, 1, 12); - edge4.setRotationPoint(6F, 10F, -6F); - edge4.setTextureSize(64, 64); - edge4.mirror = true; - setRotation(edge4, 0F, 0F, 0F); - } - - 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); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - base.render(f5); - table.render(f5); - pillar.render(f5); - edge1.render(f5); - edge2.render(f5); - edge3.render(f5); - edge4.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelShade.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelShade.java deleted file mode 100644 index 8a7f2632..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelShade.java +++ /dev/null @@ -1,86 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -public class ModelShade extends ModelBase -{ - //fields - ModelRenderer body; - ModelRenderer tail1; - ModelRenderer leftArm; - ModelRenderer rightArm; - ModelRenderer tail2; - ModelRenderer head; - - public ModelShade() - { - textureWidth = 64; - textureHeight = 64; - body = new ModelRenderer(this, 0, 45); - body.addBox(-6F, 0F, -3F, 12, 12, 6); - body.setRotationPoint(0F, -4F, 0F); - body.setTextureSize(64, 64); - body.mirror = true; - setRotation(body, 0F, 0F, 0F); - tail1 = new ModelRenderer(this, 37, 43); - tail1.addBox(-2F, 1F, -2F, 4, 6, 4); - tail1.setRotationPoint(0F, 8F, 0F); - tail1.setTextureSize(64, 64); - tail1.mirror = true; - setRotation(tail1, 0.122173F, 0F, 0F); - leftArm = new ModelRenderer(this, 0, 0); - leftArm.addBox(0F, -4F, -2F, 4, 20, 4); - leftArm.setRotationPoint(6F, -2F, 0F); - leftArm.setTextureSize(64, 64); - leftArm.mirror = true; - setRotation(leftArm, 0F, 0F, 0F); - rightArm = new ModelRenderer(this, 0, 0); - rightArm.mirror = true; - rightArm.addBox(-4F, -4F, -2F, 4, 20, 4); - rightArm.setRotationPoint(-6F, -2F, 0F); - rightArm.setTextureSize(64, 64); - rightArm.mirror = true; - setRotation(rightArm, 0F, 0F, 0F); - rightArm.mirror = false; - tail2 = new ModelRenderer(this, 37, 54); - tail2.addBox(-1.5F, 6F, -3F, 3, 6, 3); - tail2.setRotationPoint(0F, 8F, 0F); - tail2.setTextureSize(64, 64); - tail2.mirror = true; - setRotation(tail2, 0.4363323F, 0F, 0F); - head = new ModelRenderer(this, 17, 0); - head.addBox(-4F, -8F, -4F, 8, 8, 8); - head.setRotationPoint(0F, -4F, -1F); - head.setTextureSize(64, 64); - head.mirror = true; - setRotation(head, 0F, 0F, 0F); - } - - 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); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - body.render(f5); - tail1.render(f5); - leftArm.render(f5); - rightArm.render(f5); - tail2.render(f5); - head.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.head.rotateAngleX = f4 / (180F / (float) Math.PI); - this.head.rotateAngleY = f3 / (180F / (float) Math.PI); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSmallEarthGolem.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSmallEarthGolem.java deleted file mode 100644 index 45a232de..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSmallEarthGolem.java +++ /dev/null @@ -1,127 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; - -public class ModelSmallEarthGolem extends ModelBase -{ - //fields - ModelRenderer leftLeg; - ModelRenderer rightLeg; - ModelRenderer body; - ModelRenderer head; - ModelRenderer chest1; - ModelRenderer chest2; - ModelRenderer chest3; - ModelRenderer leftArm; - ModelRenderer rightArm; - ModelRenderer back1; - - public ModelSmallEarthGolem() - { - textureWidth = 32; - textureHeight = 32; - leftLeg = new ModelRenderer(this, 13, 0); - leftLeg.addBox(-1F, 0F, -1F, 2, 5, 2); - leftLeg.setRotationPoint(1F, 19F, 0F); - leftLeg.setTextureSize(32, 32); - leftLeg.mirror = true; - setRotation(leftLeg, 0F, 0F, 0F); - rightLeg = new ModelRenderer(this, 13, 0); - rightLeg.mirror = true; - rightLeg.addBox(-1F, 0F, -1F, 2, 5, 2); - rightLeg.setRotationPoint(-1F, 19F, 0F); - rightLeg.setTextureSize(32, 32); - rightLeg.mirror = true; - setRotation(rightLeg, 0F, 0F, 0F); - rightLeg.mirror = false; - body = new ModelRenderer(this, 0, 7); - body.addBox(-2F, 0F, -1F, 4, 5, 2); - body.setRotationPoint(0F, 14F, 0F); - body.setTextureSize(32, 32); - body.mirror = true; - setRotation(body, 0F, 0F, 0F); - head = new ModelRenderer(this, 0, 0); - head.addBox(-1.5F, -3F, -2F, 3, 3, 3); - head.setRotationPoint(0F, 14F, 0F); - head.setTextureSize(32, 32); - head.mirror = true; - setRotation(head, 0F, 0F, 0F); - chest1 = new ModelRenderer(this, 22, 0); - chest1.addBox(-1F, 0.5F, -2F, 2, 3, 1); - chest1.setRotationPoint(0F, 14F, 0F); - chest1.setTextureSize(32, 32); - chest1.mirror = true; - setRotation(chest1, 0F, 0F, 0F); - chest2 = new ModelRenderer(this, 22, 5); - chest2.addBox(1F, 1.5F, -2F, 1, 1, 1); - chest2.setRotationPoint(0F, 14F, 0F); - chest2.setTextureSize(32, 32); - chest2.mirror = true; - setRotation(chest2, 0F, 0F, 0F); - chest3 = new ModelRenderer(this, 22, 5); - chest3.mirror = true; - chest3.addBox(-2F, 1.5F, -2F, 1, 1, 1); - chest3.setRotationPoint(0F, 14F, 0F); - chest3.setTextureSize(32, 32); - chest3.mirror = true; - setRotation(chest3, 0F, 0F, 0F); - chest3.mirror = false; - leftArm = new ModelRenderer(this, 13, 7); - leftArm.addBox(0F, -1F, -1F, 2, 5, 2); - leftArm.setRotationPoint(2F, 15F, 0F); - leftArm.setTextureSize(32, 32); - leftArm.mirror = true; - setRotation(leftArm, 0F, 0F, 0F); - rightArm = new ModelRenderer(this, 13, 7); - rightArm.mirror = true; - rightArm.addBox(-2F, -1F, -1F, 2, 5, 2); - rightArm.setRotationPoint(-2F, 15F, 0F); - rightArm.setTextureSize(32, 32); - rightArm.mirror = true; - setRotation(rightArm, 0F, 0F, 0F); - rightArm.mirror = false; - back1 = new ModelRenderer(this, 22, 8); - back1.addBox(-1.5F, 1.5F, 1F, 3, 1, 1); - back1.setRotationPoint(0F, 14F, 0F); - back1.setTextureSize(32, 32); - back1.mirror = true; - setRotation(back1, 0F, 0F, 0F); - } - - 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); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - leftLeg.render(f5); - rightLeg.render(f5); - body.render(f5); - head.render(f5); - chest1.render(f5); - chest2.render(f5); - chest3.render(f5); - leftArm.render(f5); - rightArm.render(f5); - back1.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.head.rotateAngleX = f4 / (180F / (float) Math.PI); - this.head.rotateAngleY = f3 / (180F / (float) Math.PI); - this.leftLeg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; - this.rightLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1; - this.rightArm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1; - this.leftArm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEffectBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEffectBlock.java deleted file mode 100644 index fcf03321..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEffectBlock.java +++ /dev/null @@ -1,332 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.EnumFacing; - -public class ModelSpellEffectBlock extends ModelBase -{ - //fields - ModelRenderer core; - ModelRenderer frame1; - ModelRenderer frame2; - ModelRenderer frame3; - ModelRenderer frame4; - ModelRenderer frame5; - ModelRenderer frame6; - ModelRenderer frame7; - ModelRenderer frame8; - ModelRenderer frame9; - ModelRenderer frame10; - ModelRenderer frame11; - ModelRenderer frame12; - ModelRenderer inputSpacer1; - ModelRenderer inputFace; - ModelRenderer inputSpacer2; - ModelRenderer inputSpacer3; - ModelRenderer inputSpacer4; - ModelRenderer outputFace; - ModelRenderer outputPlug; - ModelRenderer outputSpacer1; - ModelRenderer outputSpacer2; - ModelRenderer outputSpacer3; - ModelRenderer outputSpacer4; - - public ModelSpellEffectBlock() - { - textureWidth = 64; - textureHeight = 64; - - core = new ModelRenderer(this, 0, 0); - core.addBox(-3F, -3F, -3F, 6, 6, 6); - core.setRotationPoint(0F, 16F, 0F); - core.setTextureSize(64, 64); - core.mirror = true; - setRotation(core, 0F, 0F, 0F); - frame1 = new ModelRenderer(this, 16, 18); - frame1.addBox(3F, -3F, -5F, 2, 6, 2); - frame1.setRotationPoint(0F, 16F, 0F); - frame1.setTextureSize(64, 64); - frame1.mirror = true; - setRotation(frame1, 0F, 0F, 0F); - frame2 = new ModelRenderer(this, 0, 18); - frame2.addBox(-5F, -3F, -5F, 2, 6, 2); - frame2.setRotationPoint(0F, 16F, 0F); - frame2.setTextureSize(64, 64); - frame2.mirror = true; - setRotation(frame2, 0F, 0F, 0F); - frame3 = new ModelRenderer(this, 0, 13); - frame3.addBox(-5F, -5F, -5F, 10, 2, 2); - frame3.setRotationPoint(0F, 16F, 0F); - frame3.setTextureSize(64, 64); - frame3.mirror = true; - setRotation(frame3, 0F, 0F, 0F); - frame4 = new ModelRenderer(this, 0, 27); - frame4.addBox(-5F, 3F, -5F, 10, 2, 2); - frame4.setRotationPoint(0F, 16F, 0F); - frame4.setTextureSize(64, 64); - frame4.mirror = true; - setRotation(frame4, 0F, 0F, 0F); - frame5 = new ModelRenderer(this, 0, 34); - frame5.addBox(-5F, -5F, 3F, 10, 2, 2); - frame5.setRotationPoint(0F, 16F, 0F); - frame5.setTextureSize(64, 64); - frame5.mirror = true; - setRotation(frame5, 0F, 0F, 0F); - frame6 = new ModelRenderer(this, 0, 48); - frame6.addBox(-5F, 3F, 3F, 10, 2, 2); - frame6.setRotationPoint(0F, 16F, 0F); - frame6.setTextureSize(64, 64); - frame6.mirror = true; - setRotation(frame6, 0F, 0F, 0F); - frame7 = new ModelRenderer(this, 16, 39); - frame7.addBox(-5F, -3F, 3F, 2, 6, 2); - frame7.setRotationPoint(0F, 16F, 0F); - frame7.setTextureSize(64, 64); - frame7.mirror = true; - setRotation(frame7, 0F, 0F, 0F); - frame8 = new ModelRenderer(this, 0, 39); - frame8.addBox(3F, -3F, 3F, 2, 6, 2); - frame8.setRotationPoint(0F, 16F, 0F); - frame8.setTextureSize(64, 64); - frame8.mirror = true; - setRotation(frame8, 0F, 0F, 0F); - frame9 = new ModelRenderer(this, 25, 9); - frame9.addBox(-5F, 3F, -3F, 2, 2, 6); - frame9.setRotationPoint(0F, 16F, 0F); - frame9.setTextureSize(64, 64); - frame9.mirror = true; - setRotation(frame9, 0F, 0F, 0F); - frame10 = new ModelRenderer(this, 25, 0); - frame10.addBox(-5F, -5F, -3F, 2, 2, 6); - frame10.setRotationPoint(0F, 16F, 0F); - frame10.setTextureSize(64, 64); - frame10.mirror = true; - setRotation(frame10, 0F, 0F, 0F); - frame11 = new ModelRenderer(this, 42, 0); - frame11.addBox(3F, -5F, -3F, 2, 2, 6); - frame11.setRotationPoint(0F, 16F, 0F); - frame11.setTextureSize(64, 64); - frame11.mirror = true; - setRotation(frame11, 0F, 0F, 0F); - frame12 = new ModelRenderer(this, 42, 9); - frame12.addBox(3F, 3F, -3F, 2, 2, 6); - frame12.setRotationPoint(0F, 16F, 0F); - frame12.setTextureSize(64, 64); - frame12.mirror = true; - setRotation(frame12, 0F, 0F, 0F); - inputSpacer1 = new ModelRenderer(this, 25, 27); - inputSpacer1.addBox(3F, -5F, -8F, 2, 2, 3); - inputSpacer1.setRotationPoint(0F, 16F, 0F); - inputSpacer1.setTextureSize(64, 64); - inputSpacer1.mirror = true; - setRotation(inputSpacer1, 0F, 0F, 0F); - inputFace = new ModelRenderer(this, 38, 27); - inputFace.addBox(-2F, -2F, -8F, 4, 4, 5); - inputFace.setRotationPoint(0F, 16F, 0F); - inputFace.setTextureSize(64, 64); - inputFace.mirror = true; - setRotation(inputFace, 0F, 0F, 0F); - inputSpacer2 = new ModelRenderer(this, 25, 27); - inputSpacer2.addBox(-5F, -5F, -8F, 2, 2, 3); - inputSpacer2.setRotationPoint(0F, 16F, 0F); - inputSpacer2.setTextureSize(64, 64); - inputSpacer2.mirror = true; - setRotation(inputSpacer2, 0F, 0F, 0F); - inputSpacer3 = new ModelRenderer(this, 25, 27); - inputSpacer3.addBox(3F, 3F, -8F, 2, 2, 3); - inputSpacer3.setRotationPoint(0F, 16F, 0F); - inputSpacer3.setTextureSize(64, 64); - inputSpacer3.mirror = true; - setRotation(inputSpacer3, 0F, 0F, 0F); - inputSpacer4 = new ModelRenderer(this, 25, 27); - inputSpacer4.addBox(-5F, 3F, -8F, 2, 2, 3); - inputSpacer4.setRotationPoint(0F, 16F, 0F); - inputSpacer4.setTextureSize(64, 64); - inputSpacer4.mirror = true; - setRotation(inputSpacer4, 0F, 0F, 0F); - outputFace = new ModelRenderer(this, 38, 37); - outputFace.addBox(6F, -2F, -2F, 2, 4, 4); - outputFace.setRotationPoint(0F, 16F, 0F); - outputFace.setTextureSize(64, 64); - outputFace.mirror = true; - setRotation(outputFace, 0F, 0F, 0F); - outputPlug = new ModelRenderer(this, 36, 48); - outputPlug.addBox(3F, -3F, -3F, 2, 6, 6); - outputPlug.setRotationPoint(0F, 16F, 0F); - outputPlug.setTextureSize(64, 64); - outputPlug.mirror = true; - setRotation(outputPlug, 0F, 0F, 0F); - outputSpacer1 = new ModelRenderer(this, 25, 48); - outputSpacer1.addBox(5F, -5F, -5F, 3, 2, 2); - outputSpacer1.setRotationPoint(0F, 16F, 0F); - outputSpacer1.setTextureSize(64, 64); - outputSpacer1.mirror = true; - setRotation(outputSpacer1, 0F, 0F, 0F); - outputSpacer2 = new ModelRenderer(this, 25, 48); - outputSpacer2.addBox(5F, -5F, 3F, 3, 2, 2); - outputSpacer2.setRotationPoint(0F, 16F, 0F); - outputSpacer2.setTextureSize(64, 64); - outputSpacer2.mirror = true; - setRotation(outputSpacer2, 0F, 0F, 0F); - outputSpacer3 = new ModelRenderer(this, 25, 48); - outputSpacer3.addBox(5F, 3F, -5F, 3, 2, 2); - outputSpacer3.setRotationPoint(0F, 16F, 0F); - outputSpacer3.setTextureSize(64, 64); - outputSpacer3.mirror = true; - setRotation(outputSpacer3, 0F, 0F, 0F); - outputSpacer4 = new ModelRenderer(this, 25, 48); - outputSpacer4.addBox(5F, 3F, 3F, 3, 2, 2); - outputSpacer4.setRotationPoint(0F, 16F, 0F); - outputSpacer4.setTextureSize(64, 64); - outputSpacer4.mirror = true; - setRotation(outputSpacer4, 0F, 0F, 0F); - } - - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, EnumFacing input, EnumFacing output) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - float xInputRot = 0.0f; - float yInputRot = 0.0f; - float zInputRot = 0.0f; - float xOutputRot = 0.0f; - float yOutputRot = 0.0f; - float zOutputRot = 0.0f; - - switch (input) - { - case NORTH: - xInputRot = 0.0f; - yInputRot = 0.0f; - zInputRot = 0.0f; - break; - - case EAST: - xInputRot = 0.0f; - yInputRot = (float) (0.5f * Math.PI); - zInputRot = 0.0f; - break; - - case SOUTH: - xInputRot = 0.0f; - yInputRot = (float) (1.0f * Math.PI); - zInputRot = 0.0f; - break; - - case WEST: - xInputRot = 0.0f; - yInputRot = (float) (-0.5f * Math.PI); - zInputRot = 0.0f; - break; - - case UP: - xInputRot = (float) (-0.5f * Math.PI); - yInputRot = 0.0f; - zInputRot = 0.0f; - break; - - case DOWN: - xInputRot = (float) (0.5f * Math.PI); - yInputRot = 0.0f; - zInputRot = 0.0f; - break; - - default: - break; - } - - switch (output) - { - case NORTH: - xOutputRot = 0.0f; - yOutputRot = (float) (0.5f * Math.PI); - zOutputRot = 0.0f; - break; - - case EAST: - xOutputRot = 0.0f; - yOutputRot = (float) (1.0f * Math.PI); - zOutputRot = 0.0f; - break; - - case SOUTH: - xOutputRot = 0.0f; - yOutputRot = (float) (-0.5f * Math.PI); - zOutputRot = 0.0f; - break; - - case WEST: - xOutputRot = 0.0f; - yOutputRot = 0.0f; - zOutputRot = 0.0f; - break; - - case UP: - xOutputRot = 0.0f; - yOutputRot = 0.0f; - zOutputRot = (float) (-0.5f * Math.PI); - break; - - case DOWN: - xOutputRot = 0.0f; - yOutputRot = 0.0f; - zOutputRot = (float) (0.5f * Math.PI); - break; - - default: - break; - } - - this.setRotation(inputFace, xInputRot, yInputRot, zInputRot); - this.setRotation(outputFace, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(inputSpacer1, xInputRot, yInputRot, zInputRot); - this.setRotation(inputSpacer2, xInputRot, yInputRot, zInputRot); - this.setRotation(inputSpacer3, xInputRot, yInputRot, zInputRot); - this.setRotation(inputSpacer4, xInputRot, yInputRot, zInputRot); - this.setRotation(outputPlug, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(outputSpacer1, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(outputSpacer2, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(outputSpacer3, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(outputSpacer4, xOutputRot, yOutputRot, zOutputRot); - - core.render(f5); - frame1.render(f5); - frame2.render(f5); - frame3.render(f5); - frame4.render(f5); - frame5.render(f5); - frame6.render(f5); - frame7.render(f5); - frame8.render(f5); - frame9.render(f5); - frame10.render(f5); - frame11.render(f5); - frame12.render(f5); - inputSpacer1.render(f5); - inputFace.render(f5); - inputSpacer2.render(f5); - inputSpacer3.render(f5); - inputSpacer4.render(f5); - outputFace.render(f5); - outputPlug.render(f5); - outputSpacer1.render(f5); - outputSpacer2.render(f5); - outputSpacer3.render(f5); - outputSpacer4.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.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 deleted file mode 100644 index 19e20c45..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEnhancementBlock.java +++ /dev/null @@ -1,334 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.EnumFacing; - - -public class ModelSpellEnhancementBlock extends ModelBase -{ - //fields - ModelRenderer core; - ModelRenderer frame1; - ModelRenderer frame2; - ModelRenderer frame3; - ModelRenderer frame4; - ModelRenderer frame5; - ModelRenderer frame6; - ModelRenderer frame7; - ModelRenderer frame8; - ModelRenderer frame9; - ModelRenderer frame10; - ModelRenderer frame11; - ModelRenderer frame12; - ModelRenderer outputMain; - ModelRenderer inputMain; - ModelRenderer output1; - ModelRenderer output2; - ModelRenderer output3; - ModelRenderer output4; - ModelRenderer input1; - ModelRenderer input2; - ModelRenderer input3; - ModelRenderer input4; - ModelRenderer outputSecond; - - public ModelSpellEnhancementBlock() - { - textureWidth = 128; - textureHeight = 64; - - core = new ModelRenderer(this, 0, 0); - core.addBox(-3F, -3F, -3F, 6, 6, 6); - core.setRotationPoint(0F, 16F, 0F); - core.setTextureSize(128, 64); - core.mirror = true; - setRotation(core, 0F, 0F, 0F); - frame1 = new ModelRenderer(this, 0, 32); - frame1.addBox(-7F, 5F, -7F, 14, 2, 2); - frame1.setRotationPoint(0F, 16F, 0F); - frame1.setTextureSize(128, 64); - frame1.mirror = true; - setRotation(frame1, 0F, 0F, 0F); - frame2 = new ModelRenderer(this, 24, 19); - frame2.addBox(5F, -5F, -7F, 2, 10, 2); - frame2.setRotationPoint(0F, 16F, 0F); - frame2.setTextureSize(128, 64); - frame2.mirror = true; - setRotation(frame2, 0F, 0F, 0F); - frame3 = new ModelRenderer(this, 0, 19); - frame3.addBox(-7F, -5F, -7F, 2, 10, 2); - frame3.setRotationPoint(0F, 16F, 0F); - frame3.setTextureSize(128, 64); - frame3.mirror = true; - setRotation(frame3, 0F, 0F, 0F); - frame4 = new ModelRenderer(this, 0, 14); - frame4.addBox(-7F, -7F, -7F, 14, 2, 2); - frame4.setRotationPoint(0F, 16F, 0F); - frame4.setTextureSize(128, 64); - frame4.mirror = true; - setRotation(frame4, 0F, 0F, 0F); - frame5 = new ModelRenderer(this, 0, 57); - frame5.addBox(-7F, 5F, 5F, 14, 2, 2); - frame5.setRotationPoint(0F, 16F, 0F); - frame5.setTextureSize(128, 64); - frame5.mirror = true; - setRotation(frame5, 0F, 0F, 0F); - frame6 = new ModelRenderer(this, 0, 44); - frame6.addBox(5F, -5F, 5F, 2, 10, 2); - frame6.setRotationPoint(0F, 16F, 0F); - frame6.setTextureSize(128, 64); - frame6.mirror = true; - setRotation(frame6, 0F, 0F, 0F); - frame7 = new ModelRenderer(this, 24, 44); - frame7.addBox(-7F, -5F, 5F, 2, 10, 2); - frame7.setRotationPoint(0F, 16F, 0F); - frame7.setTextureSize(128, 64); - frame7.mirror = true; - setRotation(frame7, 0F, 0F, 0F); - frame8 = new ModelRenderer(this, 0, 39); - frame8.addBox(-7F, -7F, 5F, 14, 2, 2); - frame8.setRotationPoint(0F, 16F, 0F); - frame8.setTextureSize(128, 64); - frame8.mirror = true; - setRotation(frame8, 0F, 0F, 0F); - frame9 = new ModelRenderer(this, 66, 14); - frame9.addBox(5F, 5F, -5F, 2, 2, 10); - frame9.setRotationPoint(0F, 16F, 0F); - frame9.setTextureSize(128, 64); - frame9.mirror = true; - setRotation(frame9, 0F, 0F, 0F); - frame10 = new ModelRenderer(this, 40, 14); - frame10.addBox(-7F, 5F, -5F, 2, 2, 10); - frame10.setRotationPoint(0F, 16F, 0F); - frame10.setTextureSize(128, 64); - frame10.mirror = true; - setRotation(frame10, 0F, 0F, 0F); - frame11 = new ModelRenderer(this, 66, 0); - frame11.addBox(5F, -7F, -5F, 2, 2, 10); - frame11.setRotationPoint(0F, 16F, 0F); - frame11.setTextureSize(128, 64); - frame11.mirror = true; - setRotation(frame11, 0F, 0F, 0F); - frame12 = new ModelRenderer(this, 40, 0); - frame12.addBox(-7F, -7F, -5F, 2, 2, 10); - frame12.setRotationPoint(0F, 16F, 0F); - frame12.setTextureSize(128, 64); - frame12.mirror = true; - setRotation(frame12, 0F, 0F, 0F); - outputMain = new ModelRenderer(this, 78, 36); - outputMain.addBox(6F, -2F, -2F, 2, 4, 4); - outputMain.setRotationPoint(0F, 16F, 0F); - outputMain.setTextureSize(128, 64); - outputMain.mirror = true; - setRotation(outputMain, 0F, 0F, 0F); - inputMain = new ModelRenderer(this, 40, 36); - inputMain.addBox(-2F, -2F, -8F, 4, 4, 5); - inputMain.setRotationPoint(0F, 16F, 0F); - inputMain.setTextureSize(128, 64); - inputMain.mirror = true; - setRotation(inputMain, 0F, 0F, 0F); - output1 = new ModelRenderer(this, 80, 30); - output1.addBox(5F, -5F, -5F, 3, 2, 2); - output1.setRotationPoint(0F, 16F, 0F); - output1.setTextureSize(128, 64); - output1.mirror = true; - setRotation(output1, 0F, 0F, 0F); - output2 = new ModelRenderer(this, 80, 30); - output2.addBox(5F, -5F, 3F, 3, 2, 2); - output2.setRotationPoint(0F, 16F, 0F); - output2.setTextureSize(128, 64); - output2.mirror = true; - setRotation(output2, 0F, 0F, 0F); - output3 = new ModelRenderer(this, 80, 30); - output3.addBox(5F, 3F, -5F, 3, 2, 2); - output3.setRotationPoint(0F, 16F, 0F); - output3.setTextureSize(128, 64); - output3.mirror = true; - setRotation(output3, 0F, 0F, 0F); - output4 = new ModelRenderer(this, 80, 30); - output4.addBox(5F, 3F, 3F, 3, 2, 2); - output4.setRotationPoint(0F, 16F, 0F); - output4.setTextureSize(128, 64); - output4.mirror = true; - setRotation(output4, 0F, 0F, 0F); - input1 = new ModelRenderer(this, 40, 27); - input1.addBox(3F, -5F, -8F, 2, 2, 5); - input1.setRotationPoint(0F, 16F, 0F); - input1.setTextureSize(128, 64); - input1.mirror = true; - setRotation(input1, 0F, 0F, 0F); - input2 = new ModelRenderer(this, 40, 27); - input2.addBox(-5F, -5F, -8F, 2, 2, 5); - input2.setRotationPoint(0F, 16F, 0F); - input2.setTextureSize(128, 64); - input2.mirror = true; - setRotation(input2, 0F, 0F, 0F); - input3 = new ModelRenderer(this, 40, 27); - input3.addBox(3F, 3F, -8F, 2, 2, 5); - input3.setRotationPoint(0F, 16F, 0F); - input3.setTextureSize(128, 64); - input3.mirror = true; - setRotation(input3, 0F, 0F, 0F); - input4 = new ModelRenderer(this, 40, 27); - input4.addBox(-5F, 3F, -8F, 2, 2, 5); - input4.setRotationPoint(0F, 16F, 0F); - input4.setTextureSize(128, 64); - input4.mirror = true; - setRotation(input4, 0F, 0F, 0F); - outputSecond = new ModelRenderer(this, 78, 47); - outputSecond.addBox(4F, -3F, -3F, 1, 6, 6); - outputSecond.setRotationPoint(0F, 16F, 0F); - outputSecond.setTextureSize(128, 64); - outputSecond.mirror = true; - setRotation(outputSecond, 0F, 0F, 0F); - } - - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, EnumFacing input, EnumFacing output) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - - float xInputRot = 0.0f; - float yInputRot = 0.0f; - float zInputRot = 0.0f; - float xOutputRot = 0.0f; - float yOutputRot = 0.0f; - float zOutputRot = 0.0f; - - switch (input) - { - case NORTH: - xInputRot = 0.0f; - yInputRot = 0.0f; - zInputRot = 0.0f; - break; - - case EAST: - xInputRot = 0.0f; - yInputRot = (float) (0.5f * Math.PI); - zInputRot = 0.0f; - break; - - case SOUTH: - xInputRot = 0.0f; - yInputRot = (float) (1.0f * Math.PI); - zInputRot = 0.0f; - break; - - case WEST: - xInputRot = 0.0f; - yInputRot = (float) (-0.5f * Math.PI); - zInputRot = 0.0f; - break; - - case UP: - xInputRot = (float) (-0.5f * Math.PI); - yInputRot = 0.0f; - zInputRot = 0.0f; - break; - - case DOWN: - xInputRot = (float) (0.5f * Math.PI); - yInputRot = 0.0f; - zInputRot = 0.0f; - break; - - default: - break; - } - - switch (output) - { - case NORTH: - xOutputRot = 0.0f; - yOutputRot = (float) (0.5f * Math.PI); - zOutputRot = 0.0f; - break; - - case EAST: - xOutputRot = 0.0f; - yOutputRot = (float) (1.0f * Math.PI); - zOutputRot = 0.0f; - break; - - case SOUTH: - xOutputRot = 0.0f; - yOutputRot = (float) (-0.5f * Math.PI); - zOutputRot = 0.0f; - break; - - case WEST: - xOutputRot = 0.0f; - yOutputRot = 0.0f; - zOutputRot = 0.0f; - break; - - case UP: - xOutputRot = 0.0f; - yOutputRot = 0.0f; - zOutputRot = (float) (-0.5f * Math.PI); - break; - - case DOWN: - xOutputRot = 0.0f; - yOutputRot = 0.0f; - zOutputRot = (float) (0.5f * Math.PI); - break; - - default: - break; - } - - this.setRotation(inputMain, xInputRot, yInputRot, zInputRot); - this.setRotation(outputMain, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(input1, xInputRot, yInputRot, zInputRot); - this.setRotation(input2, xInputRot, yInputRot, zInputRot); - this.setRotation(input3, xInputRot, yInputRot, zInputRot); - this.setRotation(input4, xInputRot, yInputRot, zInputRot); - this.setRotation(outputSecond, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(output1, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(output2, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(output3, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(output4, xOutputRot, yOutputRot, zOutputRot); - - core.render(f5); - frame1.render(f5); - frame2.render(f5); - frame3.render(f5); - frame4.render(f5); - frame5.render(f5); - frame6.render(f5); - frame7.render(f5); - frame8.render(f5); - frame9.render(f5); - frame10.render(f5); - frame11.render(f5); - frame12.render(f5); - outputMain.render(f5); - inputMain.render(f5); - output1.render(f5); - output2.render(f5); - output3.render(f5); - output4.render(f5); - input1.render(f5); - input2.render(f5); - input3.render(f5); - input4.render(f5); - outputSecond.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.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 deleted file mode 100644 index 28faaf7e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellModifierBlock.java +++ /dev/null @@ -1,303 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.EnumFacing; - -public class ModelSpellModifierBlock extends ModelBase -{ - //fields - ModelRenderer core; - ModelRenderer inputMain; - ModelRenderer Shape2; - ModelRenderer Shape3; - ModelRenderer Shape4; - ModelRenderer Shape5; - ModelRenderer Shape6; - ModelRenderer Shape7; - ModelRenderer Shape8; - ModelRenderer Shape9; - ModelRenderer outputMain; - ModelRenderer Shape11; - ModelRenderer Shape12; - ModelRenderer Shape13; - ModelRenderer Shape14; - ModelRenderer output1; - ModelRenderer output2; - ModelRenderer output3; - ModelRenderer output4; - - public ModelSpellModifierBlock() - { - textureWidth = 64; - textureHeight = 64; - - core = new ModelRenderer(this, 0, 0); - core.addBox(-3F, -3F, -3F, 6, 6, 6); - core.setRotationPoint(0F, 16F, 0F); - core.setTextureSize(64, 64); - core.mirror = true; - setRotation(core, 0F, 0F, 0F); - inputMain = new ModelRenderer(this, 25, 18); - inputMain.addBox(-2F, -2F, -8F, 4, 4, 1); - inputMain.setRotationPoint(0F, 16F, 0F); - inputMain.setTextureSize(64, 64); - inputMain.mirror = true; - setRotation(inputMain, 0F, 0F, 0F); - Shape2 = new ModelRenderer(this, 0, 13); - Shape2.addBox(-5F, -5F, -8F, 10, 2, 2); - Shape2.setRotationPoint(0F, 16F, 0F); - Shape2.setTextureSize(64, 64); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - Shape3 = new ModelRenderer(this, 0, 27); - Shape3.addBox(-5F, 3F, -8F, 10, 2, 2); - Shape3.setRotationPoint(0F, 16F, 0F); - Shape3.setTextureSize(64, 64); - Shape3.mirror = true; - setRotation(Shape3, 0F, 0F, 0F); - Shape4 = new ModelRenderer(this, 16, 18); - Shape4.addBox(3F, -3F, -8F, 2, 6, 2); - Shape4.setRotationPoint(0F, 16F, 0F); - Shape4.setTextureSize(64, 64); - Shape4.mirror = true; - setRotation(Shape4, 0F, 0F, 0F); - Shape5 = new ModelRenderer(this, 0, 18); - Shape5.addBox(-5F, -3F, -8F, 2, 6, 2); - Shape5.setRotationPoint(0F, 16F, 0F); - Shape5.setTextureSize(64, 64); - Shape5.mirror = true; - setRotation(Shape5, 0F, 0F, 0F); - Shape6 = new ModelRenderer(this, 0, 32); - Shape6.addBox(-1F, -6F, -7F, 2, 1, 5); - Shape6.setRotationPoint(0F, 16F, 0F); - Shape6.setTextureSize(64, 64); - Shape6.mirror = true; - setRotation(Shape6, 0F, 0F, 0F); - Shape7 = new ModelRenderer(this, 15, 32); - Shape7.addBox(-2F, -6F, -2F, 4, 1, 4); - Shape7.setRotationPoint(0F, 16F, 0F); - Shape7.setTextureSize(64, 64); - Shape7.mirror = true; - setRotation(Shape7, 0F, 0F, 0F); - Shape8 = new ModelRenderer(this, 15, 39); - Shape8.addBox(-2F, 5F, -2F, 4, 1, 4); - Shape8.setRotationPoint(0F, 16F, 0F); - Shape8.setTextureSize(64, 64); - Shape8.mirror = true; - setRotation(Shape8, 0F, 0F, 0F); - Shape9 = new ModelRenderer(this, 0, 39); - Shape9.addBox(-1F, 5F, -7F, 2, 1, 5); - Shape9.setRotationPoint(0F, 16F, 0F); - Shape9.setTextureSize(64, 64); - Shape9.mirror = true; - setRotation(Shape9, 0F, 0F, 0F); - outputMain = new ModelRenderer(this, 51, 23); - outputMain.addBox(7F, -2F, -2F, 1, 4, 4); - outputMain.setRotationPoint(0F, 16F, 0F); - outputMain.setTextureSize(64, 64); - outputMain.mirror = true; - setRotation(outputMain, 0F, 0F, 0F); - Shape11 = new ModelRenderer(this, 13, 46); - Shape11.addBox(5F, -2F, -2F, 1, 4, 4); - Shape11.setRotationPoint(0F, 16F, 0F); - Shape11.setTextureSize(64, 64); - Shape11.mirror = true; - setRotation(Shape11, 0F, 0F, 0F); - Shape12 = new ModelRenderer(this, 0, 46); - Shape12.addBox(5F, -1F, -7F, 1, 2, 5); - Shape12.setRotationPoint(0F, 16F, 0F); - Shape12.setTextureSize(64, 64); - Shape12.mirror = true; - setRotation(Shape12, 0F, 0F, 0F); - Shape13 = new ModelRenderer(this, 0, 56); - Shape13.addBox(-6F, -1F, -7F, 1, 2, 5); - Shape13.setRotationPoint(0F, 16F, 0F); - Shape13.setTextureSize(64, 64); - Shape13.mirror = true; - setRotation(Shape13, 0F, 0F, 0F); - Shape14 = new ModelRenderer(this, 13, 56); - Shape14.addBox(-6F, -2F, -2F, 1, 4, 4); - Shape14.setRotationPoint(0F, 16F, 0F); - Shape14.setTextureSize(64, 64); - Shape14.mirror = true; - setRotation(Shape14, 0F, 0F, 0F); - output1 = new ModelRenderer(this, 51, 18); - output1.addBox(5F, -5F, -5F, 3, 2, 2); - output1.setRotationPoint(0F, 16F, 0F); - output1.setTextureSize(64, 64); - output1.mirror = true; - setRotation(output1, 0F, 0F, 0F); - output2 = new ModelRenderer(this, 51, 18); - output2.addBox(5F, -5F, 3F, 3, 2, 2); - output2.setRotationPoint(0F, 16F, 0F); - output2.setTextureSize(64, 64); - output2.mirror = true; - setRotation(output2, 0F, 0F, 0F); - output3 = new ModelRenderer(this, 51, 18); - output3.addBox(5F, 3F, -5F, 3, 2, 2); - output3.setRotationPoint(0F, 16F, 0F); - output3.setTextureSize(64, 64); - output3.mirror = true; - setRotation(output3, 0F, 0F, 0F); - output4 = new ModelRenderer(this, 51, 18); - output4.addBox(5F, 3F, 3F, 3, 2, 2); - output4.setRotationPoint(0F, 16F, 0F); - output4.setTextureSize(64, 64); - output4.mirror = true; - setRotation(output4, 0F, 0F, 0F); - } - - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, EnumFacing input, EnumFacing output) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - - float xInputRot = 0.0f; - float yInputRot = 0.0f; - float zInputRot = 0.0f; - float xOutputRot = 0.0f; - float yOutputRot = 0.0f; - float zOutputRot = 0.0f; - - switch (input) - { - case NORTH: - xInputRot = 0.0f; - yInputRot = 0.0f; - zInputRot = 0.0f; - break; - - case EAST: - xInputRot = 0.0f; - yInputRot = (float) (0.5f * Math.PI); - zInputRot = 0.0f; - break; - - case SOUTH: - xInputRot = 0.0f; - yInputRot = (float) (1.0f * Math.PI); - zInputRot = 0.0f; - break; - - case WEST: - xInputRot = 0.0f; - yInputRot = (float) (-0.5f * Math.PI); - zInputRot = 0.0f; - break; - - case UP: - xInputRot = (float) (-0.5f * Math.PI); - yInputRot = 0.0f; - zInputRot = 0.0f; - break; - - case DOWN: - xInputRot = (float) (0.5f * Math.PI); - yInputRot = 0.0f; - zInputRot = 0.0f; - break; - - default: - break; - } - - switch (output) - { - case NORTH: - xOutputRot = 0.0f; - yOutputRot = (float) (0.5f * Math.PI); - zOutputRot = 0.0f; - break; - - case EAST: - xOutputRot = 0.0f; - yOutputRot = (float) (1.0f * Math.PI); - zOutputRot = 0.0f; - break; - - case SOUTH: - xOutputRot = 0.0f; - yOutputRot = (float) (-0.5f * Math.PI); - zOutputRot = 0.0f; - break; - - case WEST: - xOutputRot = 0.0f; - yOutputRot = 0.0f; - zOutputRot = 0.0f; - break; - - case UP: - xOutputRot = 0.0f; - yOutputRot = 0.0f; - zOutputRot = (float) (-0.5f * Math.PI); - break; - - case DOWN: - xOutputRot = 0.0f; - yOutputRot = 0.0f; - zOutputRot = (float) (0.5f * Math.PI); - break; - - default: - break; - } - - this.setRotation(inputMain, xInputRot, yInputRot, zInputRot); - this.setRotation(Shape2, xInputRot, yInputRot, zInputRot); - this.setRotation(Shape3, xInputRot, yInputRot, zInputRot); - this.setRotation(Shape4, xInputRot, yInputRot, zInputRot); - this.setRotation(Shape5, xInputRot, yInputRot, zInputRot); - this.setRotation(Shape6, xInputRot, yInputRot, zInputRot); - this.setRotation(Shape7, xInputRot, yInputRot, zInputRot); - this.setRotation(Shape8, xInputRot, yInputRot, zInputRot); - this.setRotation(Shape9, xInputRot, yInputRot, zInputRot); - this.setRotation(Shape12, xInputRot, yInputRot, zInputRot); - this.setRotation(Shape11, xInputRot, yInputRot, zInputRot); - this.setRotation(Shape13, xInputRot, yInputRot, zInputRot); - this.setRotation(Shape14, xInputRot, yInputRot, zInputRot); - - this.setRotation(outputMain, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(output1, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(output2, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(output3, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(output4, xOutputRot, yOutputRot, zOutputRot); - - - core.render(f5); - inputMain.render(f5); - Shape2.render(f5); - Shape3.render(f5); - Shape4.render(f5); - Shape5.render(f5); - Shape6.render(f5); - Shape7.render(f5); - Shape8.render(f5); - Shape9.render(f5); - outputMain.render(f5); - Shape11.render(f5); - Shape12.render(f5); - Shape13.render(f5); - Shape14.render(f5); - output1.render(f5); - output2.render(f5); - output3.render(f5); - output4.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.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 deleted file mode 100644 index 4053b60b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellParadigmBlock.java +++ /dev/null @@ -1,233 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -//Date: 07/03/2014 9:30:25 PM -//Template version 1.1 -//Java generated by Techne -//Keep in mind that you still need to fill in some blanks -//- ZeuX - - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.EnumFacing; - -public class ModelSpellParadigmBlock extends ModelBase -{ - //fields - ModelRenderer core; - ModelRenderer outputMain; - ModelRenderer output1; - ModelRenderer output2; - ModelRenderer output3; - ModelRenderer output4; - ModelRenderer Shape1; - ModelRenderer Shape2; - ModelRenderer Shape3; - ModelRenderer Shape4; - ModelRenderer Shape5; - - public ModelSpellParadigmBlock() - { - textureWidth = 64; - textureHeight = 64; - - core = new ModelRenderer(this, 0, 0); - core.addBox(-3F, -3F, -3F, 6, 6, 6); - core.setRotationPoint(0F, 16F, 0F); - core.setTextureSize(64, 64); - core.mirror = true; - setRotation(core, 0F, 0F, 0F); - outputMain = new ModelRenderer(this, 0, 13); - outputMain.addBox(6F, -2F, -2F, 2, 4, 4); - outputMain.setRotationPoint(0F, 16F, 0F); - outputMain.setTextureSize(64, 64); - outputMain.mirror = true; - setRotation(outputMain, 0F, 0F, 0F); - output1 = new ModelRenderer(this, 0, 22); - output1.addBox(5F, -5F, -5F, 3, 2, 2); - output1.setRotationPoint(0F, 16F, 0F); - output1.setTextureSize(64, 64); - output1.mirror = true; - setRotation(output1, 0F, 0F, 0F); - output2 = new ModelRenderer(this, 0, 22); - output2.addBox(5F, -5F, 3F, 3, 2, 2); - output2.setRotationPoint(0F, 16F, 0F); - output2.setTextureSize(64, 64); - output2.mirror = true; - setRotation(output2, 0F, 0F, 0F); - output3 = new ModelRenderer(this, 0, 22); - output3.addBox(5F, 3F, -5F, 3, 2, 2); - output3.setRotationPoint(0F, 16F, 0F); - output3.setTextureSize(64, 64); - output3.mirror = true; - setRotation(output3, 0F, 0F, 0F); - output4 = new ModelRenderer(this, 0, 22); - output4.addBox(5F, 3F, 3F, 3, 2, 2); - output4.setRotationPoint(0F, 16F, 0F); - output4.setTextureSize(64, 64); - output4.mirror = true; - setRotation(output4, 0F, 0F, 0F); - Shape1 = new ModelRenderer(this, 0, 28); - Shape1.addBox(-5F, -5F, -1F, 10, 1, 2); - Shape1.setRotationPoint(0F, 16F, 0F); - Shape1.setTextureSize(64, 64); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - Shape2 = new ModelRenderer(this, 25, 28); - Shape2.addBox(-5F, -4F, -4F, 1, 8, 8); - Shape2.setRotationPoint(0F, 16F, 0F); - Shape2.setTextureSize(64, 64); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - Shape3 = new ModelRenderer(this, 0, 33); - Shape3.addBox(-5F, 4F, -1F, 10, 1, 2); - Shape3.setRotationPoint(0F, 16F, 0F); - Shape3.setTextureSize(64, 64); - Shape3.mirror = true; - setRotation(Shape3, 0F, 0F, 0F); - Shape4 = new ModelRenderer(this, 0, 38); - Shape4.addBox(-5F, -1F, -5F, 10, 2, 1); - Shape4.setRotationPoint(0F, 16F, 0F); - Shape4.setTextureSize(64, 64); - Shape4.mirror = true; - setRotation(Shape4, 0F, 0F, 0F); - Shape5 = new ModelRenderer(this, 0, 43); - Shape5.addBox(-5F, -1F, 4F, 10, 2, 1); - Shape5.setRotationPoint(0F, 16F, 0F); - Shape5.setTextureSize(64, 64); - Shape5.mirror = true; - setRotation(Shape5, 0F, 0F, 0F); - } - - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, EnumFacing input, EnumFacing output) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - float xInputRot = 0.0f; - float yInputRot = 0.0f; - float zInputRot = 0.0f; - float xOutputRot = 0.0f; - float yOutputRot = 0.0f; - float zOutputRot = 0.0f; - - switch (input) - { - case NORTH: - xInputRot = 0.0f; - yInputRot = 0.0f; - zInputRot = 0.0f; - break; - - case EAST: - xInputRot = 0.0f; - yInputRot = (float) (0.5f * Math.PI); - zInputRot = 0.0f; - break; - - case SOUTH: - xInputRot = 0.0f; - yInputRot = (float) (1.0f * Math.PI); - zInputRot = 0.0f; - break; - - case WEST: - xInputRot = 0.0f; - yInputRot = (float) (-0.5f * Math.PI); - zInputRot = 0.0f; - break; - - case UP: - xInputRot = (float) (-0.5f * Math.PI); - yInputRot = 0.0f; - zInputRot = 0.0f; - break; - - case DOWN: - xInputRot = (float) (0.5f * Math.PI); - yInputRot = 0.0f; - zInputRot = 0.0f; - break; - - default: - break; - } - - switch (output) - { - case NORTH: - xOutputRot = 0.0f; - yOutputRot = (float) (0.5f * Math.PI); - zOutputRot = 0.0f; - break; - - case EAST: - xOutputRot = 0.0f; - yOutputRot = (float) (1.0f * Math.PI); - zOutputRot = 0.0f; - break; - - case SOUTH: - xOutputRot = 0.0f; - yOutputRot = (float) (-0.5f * Math.PI); - zOutputRot = 0.0f; - break; - - case WEST: - xOutputRot = 0.0f; - yOutputRot = 0.0f; - zOutputRot = 0.0f; - break; - - case UP: - xOutputRot = 0.0f; - yOutputRot = 0.0f; - zOutputRot = (float) (-0.5f * Math.PI); - break; - - case DOWN: - xOutputRot = 0.0f; - yOutputRot = 0.0f; - zOutputRot = (float) (0.5f * Math.PI); - break; - - default: - break; - } - - this.setRotation(outputMain, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(output1, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(output2, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(output3, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(output4, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(Shape1, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(Shape2, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(Shape3, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(Shape4, xOutputRot, yOutputRot, zOutputRot); - this.setRotation(Shape5, xOutputRot, yOutputRot, zOutputRot); - core.render(f5); - outputMain.render(f5); - output1.render(f5); - output2.render(f5); - output3.render(f5); - output4.render(f5); - Shape1.render(f5); - Shape2.render(f5); - Shape3.render(f5); - Shape4.render(f5); - Shape5.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.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 deleted file mode 100644 index 07164ffd..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelWingedFireDemon.java +++ /dev/null @@ -1,203 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; - -public class ModelWingedFireDemon extends ModelBase -{ - //fields - ModelRenderer leftLegPlate; - ModelRenderer leftLeg; - ModelRenderer codPiece; - ModelRenderer rightLegPlate; - ModelRenderer rightLeg; - ModelRenderer body; - ModelRenderer leftShoulder; - ModelRenderer leftArm; - ModelRenderer head; - ModelRenderer rightShoulder; - ModelRenderer rightArm; - ModelRenderer leftWing; - ModelRenderer rightWing; - ModelRenderer leftHorn1; - ModelRenderer rightHorn1; - ModelRenderer leftHorn2; - ModelRenderer rightHorn2; - - public ModelWingedFireDemon() - { - textureWidth = 64; - textureHeight = 64; - leftLegPlate = new ModelRenderer(this, 40, 36); - leftLegPlate.addBox(0F, -3F, -3F, 6, 6, 6); - leftLegPlate.setRotationPoint(2F, 5F, 0F); - leftLegPlate.setTextureSize(64, 64); - leftLegPlate.mirror = true; - setRotation(leftLegPlate, 0F, 0F, 0F); - leftLeg = new ModelRenderer(this, 48, 16); - leftLeg.addBox(1F, 3F, -2F, 4, 16, 4); - leftLeg.setRotationPoint(2F, 5F, 0F); - leftLeg.setTextureSize(64, 64); - leftLeg.mirror = true; - setRotation(leftLeg, 0F, 0F, 0F); - codPiece = new ModelRenderer(this, 48, 0); - codPiece.addBox(-2F, 0F, -2F, 4, 6, 4); - codPiece.setRotationPoint(0F, 1F, 0F); - codPiece.setTextureSize(64, 64); - codPiece.mirror = true; - setRotation(codPiece, 0F, 0F, 0F); - rightLegPlate = new ModelRenderer(this, 40, 36); - rightLegPlate.mirror = true; - rightLegPlate.addBox(-6F, -3F, -3F, 6, 6, 6); - rightLegPlate.setRotationPoint(-2F, 5F, 0F); - rightLegPlate.setTextureSize(64, 64); - rightLegPlate.mirror = true; - setRotation(rightLegPlate, 0F, 0F, 0F); - rightLegPlate.mirror = false; - rightLeg = new ModelRenderer(this, 48, 16); - rightLeg.mirror = true; - rightLeg.addBox(-5F, 3F, -2F, 4, 16, 4); - rightLeg.setRotationPoint(-2F, 5F, 0F); - rightLeg.setTextureSize(64, 64); - rightLeg.mirror = true; - setRotation(rightLeg, 0F, 0F, 0F); - rightLeg.mirror = false; - body = new ModelRenderer(this, 0, 44); - body.addBox(-5F, -14F, -3F, 10, 14, 6); - body.setRotationPoint(0F, 1F, 0F); - body.setTextureSize(64, 64); - body.mirror = true; - setRotation(body, 0F, 0F, 0F); - leftShoulder = new ModelRenderer(this, 0, 29); - leftShoulder.addBox(0F, -5F, -4F, 8, 7, 8); - leftShoulder.setRotationPoint(5F, -10F, 0F); - leftShoulder.setTextureSize(64, 64); - leftShoulder.mirror = true; - setRotation(leftShoulder, 0F, 0F, 0F); - leftArm = new ModelRenderer(this, 32, 0); - leftArm.addBox(3F, 2F, -2F, 4, 12, 4); - leftArm.setRotationPoint(5F, -10F, 0F); - leftArm.setTextureSize(64, 64); - leftArm.mirror = true; - setRotation(leftArm, 0F, 0F, 0F); - head = new ModelRenderer(this, 32, 48); - head.addBox(-4F, -7F, -4F, 8, 8, 8); - head.setRotationPoint(0F, -14F, -1F); - head.setTextureSize(64, 64); - head.mirror = true; - setRotation(head, 0F, 0F, 0F); - rightShoulder = new ModelRenderer(this, 0, 29); - rightShoulder.mirror = true; - rightShoulder.mirror = true; - rightShoulder.addBox(-8F, -5F, -4F, 8, 7, 8); - rightShoulder.setRotationPoint(-5F, -10F, 0F); - rightShoulder.setTextureSize(64, 64); - rightShoulder.mirror = true; - setRotation(rightShoulder, 0F, 0F, 0F); - rightShoulder.mirror = false; - rightArm = new ModelRenderer(this, 32, 0); - rightArm.mirror = true; - rightArm.mirror = true; - rightArm.addBox(-7F, 2F, -2F, 4, 12, 4); - rightArm.setRotationPoint(-5F, -10F, 0F); - rightArm.setTextureSize(64, 64); - rightArm.mirror = true; - setRotation(rightArm, 0F, 0F, 0F); - rightArm.mirror = false; - leftWing = new ModelRenderer(this, 0, 0); - leftWing.addBox(0F, -2F, 0F, 16, 12, 0); - leftWing.setRotationPoint(0F, -11F, 3F); - leftWing.setTextureSize(64, 64); - leftWing.mirror = true; - setRotation(leftWing, 0F, -0.5061455F, 0F); - rightWing = new ModelRenderer(this, 0, 0); - rightWing.mirror = true; - rightWing.addBox(-16F, -2F, 0F, 16, 12, 0); - rightWing.setRotationPoint(0F, -11F, 3F); - rightWing.setTextureSize(64, 64); - rightWing.mirror = true; - setRotation(rightWing, 0F, 0.5061455F, 0F); - rightWing.mirror = false; - leftHorn1 = new ModelRenderer(this, 0, 12); - leftHorn1.addBox(4F, -9F, -1F, 1, 5, 1); - leftHorn1.setRotationPoint(0F, -14F, -1F); - leftHorn1.setTextureSize(64, 64); - leftHorn1.mirror = true; - setRotation(leftHorn1, 0F, 0F, 0F); - rightHorn1 = new ModelRenderer(this, 0, 12); - rightHorn1.mirror = true; - rightHorn1.addBox(-5F, -9F, -1F, 1, 5, 1); - rightHorn1.setRotationPoint(0F, -14F, -1F); - rightHorn1.setTextureSize(64, 64); - rightHorn1.mirror = true; - setRotation(rightHorn1, 0F, 0F, 0F); - rightHorn1.mirror = false; - leftHorn2 = new ModelRenderer(this, 4, 12); - leftHorn2.addBox(4F, -10F, 0F, 1, 5, 1); - leftHorn2.setRotationPoint(0F, -14F, -1F); - leftHorn2.setTextureSize(64, 64); - leftHorn2.mirror = true; - setRotation(leftHorn2, 0F, 0F, 0F); - rightHorn2 = new ModelRenderer(this, 4, 12); - rightHorn2.mirror = true; - rightHorn2.addBox(-5F, -10F, 0F, 1, 5, 1); - rightHorn2.setRotationPoint(0F, -14F, -1F); - rightHorn2.setTextureSize(64, 64); - rightHorn2.mirror = true; - setRotation(rightHorn2, 0F, 0F, 0F); - rightHorn2.mirror = false; - } - - 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); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - leftLegPlate.render(f5); - leftLeg.render(f5); - codPiece.render(f5); - rightLegPlate.render(f5); - rightLeg.render(f5); - body.render(f5); - leftShoulder.render(f5); - leftArm.render(f5); - head.render(f5); - rightShoulder.render(f5); - rightArm.render(f5); - leftWing.render(f5); - rightWing.render(f5); - leftHorn1.render(f5); - rightHorn1.render(f5); - leftHorn2.render(f5); - rightHorn2.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.head.rotateAngleX = f4 / (180F / (float) Math.PI); - this.head.rotateAngleY = f3 / (180F / (float) Math.PI); - this.leftHorn1.rotateAngleX = head.rotateAngleX; - this.leftHorn1.rotateAngleY = head.rotateAngleY; - this.leftHorn2.rotateAngleX = head.rotateAngleX; - this.leftHorn2.rotateAngleY = head.rotateAngleY; - this.rightHorn1.rotateAngleX = head.rotateAngleX; - this.rightHorn1.rotateAngleY = head.rotateAngleY; - this.rightHorn2.rotateAngleX = head.rotateAngleX; - this.rightHorn2.rotateAngleY = head.rotateAngleY; - this.leftLeg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; - this.rightLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.0F * f1; - this.rightArm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.0F * f1; - this.leftArm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; - this.leftShoulder.rotateAngleX = this.leftArm.rotateAngleX; - this.rightShoulder.rotateAngleX = this.rightArm.rotateAngleX; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java deleted file mode 100644 index 826cec70..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.projectile; - -import net.minecraft.client.Minecraft; -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 RenderEnergyBazookaMainProjectile() - { - super(Minecraft.getMinecraft().getRenderManager()); - } - - public ModelBase model = new ModelEnergyBazookaMainProjectile(); - private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/EnergyBazookaMainProjectile.png"); - - @Override - public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) - { - float scale = 1.0f; - GL11.glPushMatrix(); - GL11.glTranslatef((float) d0, (float) d1, (float) d2); - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - GL11.glScalef(scale, scale, scale); - this.bindTexture(this.getEntityTexture(entity)); - GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * f1, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(180.0f - entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * f1, 1.0F, 0.0F, 0.0f); - model.render(entity, 0, (float) d0, (float) d1, (float) d2, f, f1); - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - GL11.glPopMatrix(); - } - - @Override - protected ResourceLocation getEntityTexture(Entity entity) - { - // TODO Auto-generated method stub - return field_110833_a; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java deleted file mode 100644 index 53228e59..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java +++ /dev/null @@ -1,109 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.projectile; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.entity.Entity; -import net.minecraft.entity.IProjectile; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; - -import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.LightningBoltProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; - -@SideOnly(Side.CLIENT) -public class RenderEnergyBlastProjectile extends Render -{ - public RenderEnergyBlastProjectile() - { - super(Minecraft.getMinecraft().getRenderManager()); - } - - 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); - GL11.glScalef(0.1F, 0.1F, 0.1F); - this.bindTexture(this.getEntityTexture(entityShot)); - Tessellator var12 = Tessellator.getInstance(); - GL11.glRotatef(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F); - WorldRenderer wr = var12.getWorldRenderer(); - wr.startDrawingQuads(); - wr.func_178980_d(0.0F, 1.0F, 0.0F); //SetNormal - wr.addVertexWithUV(-0.5F, -0.25F, 0.0D, 0, 1); - wr.addVertexWithUV(0.5F, -0.25F, 0.0D, 1, 1); - wr.addVertexWithUV(0.5F, 0.75F, 0.0D, 1, 0); - wr.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) - { - if (par1Entity instanceof IProjectile) - { - this.doRenderEnergyBlastProjectile(par1Entity, par2, par4, par6, par8, par9); - } - } - - @Override - protected ResourceLocation getEntityTexture(Entity entity) - { - if (entity instanceof IceProjectile) - { - return new ResourceLocation("alchemicalwizardry", "textures/entities/iceProjectile.png"); - } - - if (entity instanceof FireProjectile) - { - return new ResourceLocation("alchemicalwizardry", "textures/entities/fireProjectile.png"); - } - - if (entity instanceof ExplosionProjectile) - { - return new ResourceLocation("alchemicalwizardry", "textures/entities/explosionProjectile.png"); - } - - if (entity instanceof HolyProjectile) - { - return new ResourceLocation("alchemicalwizardry", "textures/entities/holyProjectile.png"); - } - - if (entity instanceof WindGustProjectile) - { - return new ResourceLocation("alchemicalwizardry", "textures/entities/windGustProjectile.png"); - } - - if (entity instanceof LightningBoltProjectile) - { - return new ResourceLocation("alchemicalwizardry", "textures/entities/lightningProjectile.png"); - } - - if (entity instanceof WaterProjectile) - { - return new ResourceLocation("alchemicalwizardry", "textures/entities/waterProjectile.png"); - } - - if (entity instanceof MudProjectile) - { - return new ResourceLocation("alchemicalwizardry", "textures/entities/mudProjectile.png"); - } - - return new ResourceLocation("alchemicalwizardry", "textures/entities/energyBlastProjectile.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 deleted file mode 100644 index f33d1178..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.projectile; - -import net.minecraft.client.Minecraft; -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 RenderMeteor() - { - super(Minecraft.getMinecraft().getRenderManager()); - // TODO Auto-generated constructor stub - } - - public ModelBase model = new ModelMeteor(); - private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/Meteor.png"); - - @Override - public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) - { - float scale = 1.0f; - GL11.glPushMatrix(); - GL11.glTranslatef((float) d0, (float) d1, (float) d2); - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - GL11.glScalef(scale, scale, scale); - this.bindTexture(this.getEntityTexture(entity)); - GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * f1, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(180.0f - entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * f1, 1.0F, 0.0F, 0.0f); - model.render(entity, 0, (float) d0, (float) d1, (float) d2, f, f1); - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - GL11.glPopMatrix(); - } - - @Override - protected ResourceLocation getEntityTexture(Entity entity) - { - return field_110833_a; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/LocalStorageAlphaPact.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/LocalStorageAlphaPact.java deleted file mode 100644 index a63baace..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/LocalStorageAlphaPact.java +++ /dev/null @@ -1,25 +0,0 @@ -//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; -// -//public class LocalStorageAlphaPact extends LocalRitualStorage -//{ -// public static Set hoardList = new HashSet(); -// -// public void thrallDemon(IHoardDemon demon) -// { -// if(demon instanceof IHoardDemon) -// { -// boolean enthrall = ((IHoardDemon) demon).thrallDemon(new Int3(this.xCoord, this.yCoord, this.zCoord)); -// if(enthrall) -// { -// this.hoardList.add((IHoardDemon)demon); -// } -// } -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAlphaPact.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAlphaPact.java deleted file mode 100644 index 6fafc94c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAlphaPact.java +++ /dev/null @@ -1,178 +0,0 @@ -//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.BlockPos; -//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; -//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; -// -//public class RitualEffectAlphaPact extends RitualEffect -//{ -// Random rand = new Random(); -// -// @Override -// public void performEffect(IMasterRitualStone ritualStone) -// { -// String owner = ritualStone.getOwner(); -// -// int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); -// World world = ritualStone.getWorldObj(); -// BlockPos pos = ritualStone.getPosition(); -// -// if (world.getWorldTime() % 20 != 0) -// { -// return; -// } -// -// LocalRitualStorage stor = ritualStone.getLocalStorage(); -// if(stor instanceof LocalStorageAlphaPact) -// { -// LocalStorageAlphaPact storage = (LocalStorageAlphaPact)stor; -// -// Object[] demonList = storage.hoardList.toArray(); -// -// for(Object demon : demonList) -// { -// if(demon instanceof EntityLivingBase) -// { -// if(!((EntityLivingBase) demon).isEntityAlive()) -// { -// System.out.println(storage.hoardList.remove(demon)); -// } -// } -// } -// -// System.out.println("Hi!"); -// -// int summons = 0; -// -// int horizontalRange = 25; -// int verticalRange = 20; -// -// if(storage.hoardList.isEmpty()) -// { -// IHoardDemon demon = this.getRandomDemonForStage(world, x, y, z, horizontalRange, verticalRange); -// if(demon instanceof EntityLivingBase) -// { -// world.spawnEntityInWorld((EntityLivingBase)demon); -// storage.thrallDemon(demon); -// } -// }else -// { -// } -// } -// } -// -// public IHoardDemon getRandomDemonForStage(World world, int x, int y, int z, int horizontalRange, int verticalRange) -// { -// EntityLivingBase entityLiving = new EntityMinorDemonGrunt(world); -// -// boolean isGood = false; -// for(int n=0; n<100; n++) -// { -// double newX = x + (rand.nextInt(horizontalRange) - horizontalRange) + 0.5; -// double newY = y + (double) (rand.nextInt((int) verticalRange)); -// double newZ = z + (rand.nextInt(horizontalRange) - horizontalRange) + 0.5; -// -// entityLiving.posX = newX; -// entityLiving.posY = newY; -// entityLiving.posZ = newZ; -// -// int i = MathHelper.floor_double(entityLiving.posX); -// int j = MathHelper.floor_double(entityLiving.posY); -// int k = MathHelper.floor_double(entityLiving.posZ); -// Block l; -// -// if (entityLiving.worldObj.blockExists(i, j, k)) -// { -// boolean flag1 = false; -// -// while (!flag1 && j > 0) -// { -// l = entityLiving.worldObj.getBlock(i, j - 1, k); -// -// if (l != null && l.getMaterial().blocksMovement()) -// { -// flag1 = true; -// } else -// { -// --entityLiving.posY; -// --j; -// } -// } -// } -// -// if(entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.boundingBox)) -// { -// entityLiving.setPositionAndUpdate(newX, newY, newZ); -// isGood = true; -// } -// } -// -// if(isGood = false) -// { -// return null; -// } -// -// return (IHoardDemon)entityLiving; -// } -// -// public int spawnMoreDemons(LocalStorageAlphaPact storage) -// { -// return 5; -// } -// -// @Override -// public int getCostPerRefresh() -// { -// return 1; -// } -// -// public LocalRitualStorage getNewLocalStorage() -// { -// return new LocalStorageAlphaPact(); -// } -// -// @Override -// public List getRitualComponentList() -// { -// ArrayList omegaRitual = new ArrayList(); -// -// this.addCornerRunes(omegaRitual, 1, 0, RitualComponent.BLANK); -// this.addOffsetRunes(omegaRitual, 2, 1, 0, RitualComponent.FIRE); -// this.addParallelRunes(omegaRitual, 4, 0, RitualComponent.WATER); -// this.addParallelRunes(omegaRitual, 5, 0, RitualComponent.EARTH); -// this.addCornerRunes(omegaRitual, 4, 0, RitualComponent.AIR); -// this.addOffsetRunes(omegaRitual, 3, 4, 0, RitualComponent.AIR); -// this.addParallelRunes(omegaRitual, 5, 1, RitualComponent.WATER); -// this.addParallelRunes(omegaRitual, 5, 2, RitualComponent.EARTH); -// this.addParallelRunes(omegaRitual, 4, 3, RitualComponent.WATER); -// this.addParallelRunes(omegaRitual, 4, 4, RitualComponent.WATER); -// this.addParallelRunes(omegaRitual, 3, 5, RitualComponent.BLANK); -// this.addParallelRunes(omegaRitual, 2, 5, RitualComponent.FIRE); -// this.addParallelRunes(omegaRitual, 1, 5, RitualComponent.DUSK); -// this.addOffsetRunes(omegaRitual, 5, 3, 1, RitualComponent.WATER); -// this.addOffsetRunes(omegaRitual, 6, 3, 1, RitualComponent.DUSK); -// this.addOffsetRunes(omegaRitual, 6, 4, 1, RitualComponent.FIRE); -// this.addOffsetRunes(omegaRitual, 6, 5, 1, RitualComponent.BLANK); -// this.addCornerRunes(omegaRitual, 4, 2, RitualComponent.FIRE); -// this.addCornerRunes(omegaRitual, 4, 3, RitualComponent.AIR); -// this.addCornerRunes(omegaRitual, 4, 4, RitualComponent.AIR); -// this.addOffsetRunes(omegaRitual, 4, 3, 2, RitualComponent.BLANK); -// this.addCornerRunes(omegaRitual, 3, 5, RitualComponent.EARTH); -// this.addOffsetRunes(omegaRitual, 2, 3, 5, RitualComponent.AIR); -// -// return omegaRitual; -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java deleted file mode 100644 index a9068614..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java +++ /dev/null @@ -1,155 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.EntityAgeable; -import net.minecraft.entity.passive.EntityAnimal; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -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; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (world.getWorldTime() % 20 != 0) - { - return; - } - - double range = 2; - - AxisAlignedBB axisalignedbb = new AxisAlignedBB(pos.offsetUp(), pos.add(1, 3, 1)).expand(range, 0, range); - List list = world.getEntitiesWithinAABB(EntityAgeable.class, axisalignedbb); - - int entityCount = 0; - boolean flag = false; - - if (currentEssence < this.getCostPerRefresh() * list.size()) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - boolean hasReductus = this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); - - for (EntityAgeable entity : list) - { - if (entity.getGrowingAge() < 0) - { - entity.addGrowth(5); - entityCount++; - } else - { - hasReductus = hasReductus && this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); - if (hasReductus && entity instanceof EntityAnimal && entity.getGrowingAge() > 0) - { - EntityAnimal animal = (EntityAnimal) entity; - entity.setGrowingAge(Math.max(0, animal.getGrowingAge() - 20 * 2)); - this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true); - entityCount++; - } - } - } - - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * entityCount); - } - - boolean hasVirtus = this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false); - - if (hasVirtus && SoulNetworkHandler.canSyphonFromOnlyNetwork(owner, breedingCost)) - { - List animalList = world.getEntitiesWithinAABB(EntityAnimal.class, axisalignedbb); - TileEntity tile = world.getTileEntity(pos.offsetUp()); - IInventory inventory = null; - if (tile instanceof IInventory) - { - inventory = (IInventory) tile; - } else - { - tile = world.getTileEntity(pos.offsetDown()); - if (tile instanceof IInventory) - { - inventory = (IInventory) tile; - } - } - - if (inventory != null) - { - for (EntityAnimal entityAnimal : animalList) - { - if (entityAnimal.isInLove() || entityAnimal.isChild() || entityAnimal.getGrowingAge() > 0) - { - continue; - } - - hasVirtus = hasVirtus && this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false); - boolean hasLP = SoulNetworkHandler.canSyphonFromOnlyNetwork(owner, breedingCost); - - for (int i = 0; i < inventory.getSizeInventory(); i++) - { - ItemStack stack = inventory.getStackInSlot(i); - - if (stack != null && entityAnimal.isBreedingItem(stack)) - { - inventory.decrStackSize(i, 1); - entityAnimal.setInLove(null); - this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, true); - SoulNetworkHandler.syphonFromNetwork(owner, breedingCost); - break; - } - } - } - } - } - } - - @Override - public int getCostPerRefresh() - { - - return 2; - } - - @Override - public List getRitualComponentList() - { - ArrayList animalGrowthRitual = new ArrayList(); - animalGrowthRitual.add(new RitualComponent(0, 0, 2, RitualComponent.DUSK)); - animalGrowthRitual.add(new RitualComponent(2, 0, 0, RitualComponent.DUSK)); - animalGrowthRitual.add(new RitualComponent(0, 0, -2, RitualComponent.DUSK)); - animalGrowthRitual.add(new RitualComponent(-2, 0, 0, RitualComponent.DUSK)); - animalGrowthRitual.add(new RitualComponent(0, 0, 1, RitualComponent.WATER)); - animalGrowthRitual.add(new RitualComponent(1, 0, 0, RitualComponent.WATER)); - animalGrowthRitual.add(new RitualComponent(0, 0, -1, RitualComponent.WATER)); - animalGrowthRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.WATER)); - animalGrowthRitual.add(new RitualComponent(1, 0, 2, RitualComponent.EARTH)); - animalGrowthRitual.add(new RitualComponent(-1, 0, 2, RitualComponent.EARTH)); - animalGrowthRitual.add(new RitualComponent(1, 0, -2, RitualComponent.EARTH)); - animalGrowthRitual.add(new RitualComponent(-1, 0, -2, RitualComponent.EARTH)); - animalGrowthRitual.add(new RitualComponent(2, 0, 1, RitualComponent.AIR)); - animalGrowthRitual.add(new RitualComponent(2, 0, -1, RitualComponent.AIR)); - animalGrowthRitual.add(new RitualComponent(-2, 0, 1, RitualComponent.AIR)); - animalGrowthRitual.add(new RitualComponent(-2, 0, -1, RitualComponent.AIR)); - return animalGrowthRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java deleted file mode 100644 index f1878498..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java +++ /dev/null @@ -1,71 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -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.util.BlockPos; -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(); - World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); - - if (data == null) - { - data = new LifeEssenceNetwork(owner); - worldSave.setItemData(owner, data); - } - - int currentEssence = data.currentEssence; - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - - if (currentEssence < this.getCostPerRefresh()) - { - EntityPlayer entityOwner = SpellHelper.getPlayerForUsername(owner); - - if (entityOwner == null) - { - return; - } - - entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - } - - @Override - public int getCostPerRefresh() - { - return 10; - } - - @Override - public List getRitualComponentList() - { - ArrayList apiaryRitual = new ArrayList(); - apiaryRitual.add(new RitualComponent(1, 0, 0, RitualComponent.DUSK)); - apiaryRitual.add(new RitualComponent(1, 0, 1, RitualComponent.DUSK)); - apiaryRitual.add(new RitualComponent(1, 0, -1, RitualComponent.DUSK)); - apiaryRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.DUSK)); - apiaryRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.DUSK)); - apiaryRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.DUSK)); - apiaryRitual.add(new RitualComponent(0, 0, -1, RitualComponent.DUSK)); - apiaryRitual.add(new RitualComponent(0, 0, 1, RitualComponent.DUSK)); - return apiaryRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java deleted file mode 100644 index c8406e13..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java +++ /dev/null @@ -1,430 +0,0 @@ -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.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -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.api.tile.IBloodAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; - -public class RitualEffectAutoAlchemy extends RitualEffect -{ - public static final boolean fillToOne = true; - - public static final int potentiaDrain = 2; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (currentEssence < this.getCostPerRefresh() * 6) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); - - int flag = 0; - - TileEntity topEntity = world.getTileEntity(pos.offsetUp()); - if (!(topEntity instanceof IBloodAltar)) - { - return; - } - - IBloodAltar altar = (IBloodAltar) topEntity; - ItemStack targetStack = ((IInventory)altar).getStackInSlot(0); - if (targetStack == null) - { - return; - } - - ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(targetStack); - if (recipe != null) - { - TEChemistrySet alchemyEntity; - IInventory outputInv = null; - IInventory inputInv1 = null; - IInventory inputInv2 = null; - - TileEntity northEntity = world.getTileEntity(pos.offsetNorth()); - TileEntity southEntity = world.getTileEntity(pos.offsetSouth()); - TileEntity eastEntity = world.getTileEntity(pos.offsetEast()); - TileEntity westEntity = world.getTileEntity(pos.offsetWest()); - - if (northEntity instanceof TEChemistrySet) - { - alchemyEntity = (TEChemistrySet) northEntity; - if (southEntity instanceof IInventory && !(southEntity instanceof TEChemistrySet)) - { - outputInv = (IInventory) southEntity; - } - if (eastEntity instanceof IInventory && !(eastEntity instanceof TEChemistrySet)) - { - inputInv1 = (IInventory) eastEntity; - } - if (westEntity instanceof IInventory && !(westEntity instanceof TEChemistrySet)) - { - inputInv2 = (IInventory) westEntity; - } - } else if (southEntity instanceof TEChemistrySet) - { - alchemyEntity = (TEChemistrySet) southEntity; - if (northEntity instanceof IInventory) - { - outputInv = (IInventory) northEntity; - } - if (eastEntity instanceof IInventory && !(eastEntity instanceof TEChemistrySet)) - { - inputInv1 = (IInventory) eastEntity; - } - if (westEntity instanceof IInventory && !(westEntity instanceof TEChemistrySet)) - { - inputInv2 = (IInventory) westEntity; - } - } else if (eastEntity instanceof TEChemistrySet) - { - alchemyEntity = (TEChemistrySet) eastEntity; - if (westEntity instanceof IInventory && !(westEntity instanceof TEChemistrySet)) - { - outputInv = (IInventory) westEntity; - } - if (northEntity instanceof IInventory) - { - inputInv1 = (IInventory) northEntity; - } - if (southEntity instanceof IInventory) - { - inputInv2 = (IInventory) southEntity; - } - } else if (westEntity instanceof TEChemistrySet) - { - alchemyEntity = (TEChemistrySet) westEntity; - if (eastEntity instanceof IInventory) - { - outputInv = (IInventory) eastEntity; - } - if (northEntity instanceof IInventory) - { - inputInv1 = (IInventory) northEntity; - } - if (southEntity instanceof IInventory) - { - inputInv2 = (IInventory) southEntity; - } - } else - { - return; - } - - if (hasPotentia) - { - alchemyEntity.setAccelerationTime(5); - if (alchemyEntity.isWorking()) - { - this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, true); - } - } - - if (outputInv != null) - { - ItemStack outputStack = alchemyEntity.getStackInSlot(6); - if (outputStack != null) - { - for (int i = 0; i < outputInv.getSizeInventory(); i++) - { - ItemStack curStack = outputInv.getStackInSlot(i); - if (curStack == null) - { - ItemStack copyStack = outputStack.copy(); - copyStack.stackSize = 1; - - outputStack.stackSize--; - if (outputStack.stackSize <= 0) - { - alchemyEntity.setInventorySlotContents(6, null); - } else - { - alchemyEntity.setInventorySlotContents(6, outputStack); - } - - 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); - } - - curStack.stackSize++; - outputInv.setInventorySlotContents(i, curStack); - flag++; - break; - } - } - } - - for (int i = 0; i < 5; i++) - { - ItemStack recItem; - if (recipe.length <= i) - { - recItem = null; - } else - { - recItem = recipe[i]; - } - - ItemStack alchStack = alchemyEntity.getStackInSlot(i + 1); - if ((recItem == null && alchStack != null) || (alchStack != null && !(areItemStacksEqualWithWildcard(recItem, alchStack)))) - { - for (int j = 0; j < outputInv.getSizeInventory(); j++) - { - ItemStack curStack = outputInv.getStackInSlot(j); - if (curStack == null) - { - ItemStack copyStack = alchStack.copy(); - copyStack.stackSize = 1; - - alchStack.stackSize--; - if (alchStack.stackSize <= 0) - { - alchemyEntity.setInventorySlotContents(i + 1, null); - } else - { - alchemyEntity.setInventorySlotContents(i + 1, alchStack); - } - - outputInv.setInventorySlotContents(j, copyStack); - flag++; - break; - } 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); - } - - curStack.stackSize++; - outputInv.setInventorySlotContents(j, curStack); - flag++; - break; - } - } - } - } - - } - - if (world.getWorldTime() % 10 == 0) - { - if (flag == 0 && inputInv1 != null) - { - for (int i = 0; i < recipe.length; i++) - { - ItemStack recItem = recipe[i]; - if (recItem == null) - { - continue; - } - ItemStack alchStack = alchemyEntity.getStackInSlot(i + 1); - - if (alchStack != null && ((!areItemStacksEqualWithWildcard(recItem, alchStack)) || alchStack.stackSize >= (fillToOne ? 1 : alchStack.getMaxStackSize()))) - { - continue; - } - - for (int j = 0; j < inputInv1.getSizeInventory(); j++) - { - ItemStack curItem = inputInv1.getStackInSlot(j); - if (curItem == null) - { - continue; - } - - if(!inputInv1.isItemValidForSlot(j, curItem) || (inputInv1 instanceof ISidedInventory && !((ISidedInventory) inputInv1).canExtractItem(j, curItem, EnumFacing.DOWN))) - { - continue; - } - - if (areItemStacksEqualWithWildcard(recItem, curItem)) - { - if (alchStack == null) - { - ItemStack copyStack = recItem.copy(); - copyStack.stackSize = 1; - alchemyEntity.setInventorySlotContents(i + 1, copyStack); - - curItem.stackSize--; - if (curItem.stackSize <= 0) - { - inputInv1.setInventorySlotContents(j, null); - } else - { - inputInv1.setInventorySlotContents(j, curItem); - } - - flag++; - break; - - } else - { - alchStack.stackSize++; - alchemyEntity.setInventorySlotContents(i + 1, alchStack); - - curItem.stackSize--; - if (curItem.stackSize <= 0) - { - inputInv1.setInventorySlotContents(j, null); - } else - { - inputInv1.setInventorySlotContents(j, curItem); - } - - flag++; - break; - } - } - } - } - } - if (flag == 0 && inputInv2 != null) - { - for (int i = 0; i < recipe.length; i++) - { - ItemStack recItem = recipe[i]; - if (recItem == null) - { - continue; - } - ItemStack alchStack = alchemyEntity.getStackInSlot(i + 1); - if (alchStack != null && ((!areItemStacksEqualWithWildcard(recItem, alchStack)) || alchStack.stackSize >= (fillToOne ? 1 : alchStack.getMaxStackSize()))) - { - continue; - } - - for (int j = 0; j < inputInv2.getSizeInventory(); j++) - { - ItemStack curItem = inputInv2.getStackInSlot(j); - if (curItem == null) - { - continue; - } - if (areItemStacksEqualWithWildcard(recItem, curItem)) - { - if (alchStack == null) - { - ItemStack copyStack = recItem.copy(); - copyStack.stackSize = 1; - alchemyEntity.setInventorySlotContents(i + 1, copyStack); - - curItem.stackSize--; - if (curItem.stackSize <= 0) - { - inputInv2.setInventorySlotContents(j, null); - } else - { - inputInv2.setInventorySlotContents(j, curItem); - } - - flag++; - break; - - } else - { - alchStack.stackSize++; - alchemyEntity.setInventorySlotContents(i + 1, alchStack); - - curItem.stackSize--; - if (curItem.stackSize <= 0) - { - inputInv2.setInventorySlotContents(j, null); - } else - { - inputInv2.setInventorySlotContents(j, curItem); - } - - flag++; - break; - } - } - } - } - } - } - } - - if (flag > 0) - { - for(EnumFacing face : EnumFacing.HORIZONTALS) - { - world.markBlockForUpdate(pos.offset(face)); - } - - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * flag); - } - } - } - - @Override - public int getCostPerRefresh() - { - return 10; - } - - @Override - public List getRitualComponentList() - { - ArrayList autoAlchemyRitual = new ArrayList(); - autoAlchemyRitual.add(new RitualComponent(1, 0, 1, RitualComponent.DUSK)); - autoAlchemyRitual.add(new RitualComponent(1, 0, -1, RitualComponent.DUSK)); - autoAlchemyRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.DUSK)); - autoAlchemyRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.DUSK)); - autoAlchemyRitual.add(new RitualComponent(2, 0, 2, RitualComponent.WATER)); - autoAlchemyRitual.add(new RitualComponent(2, 0, -2, RitualComponent.WATER)); - autoAlchemyRitual.add(new RitualComponent(-2, 0, -2, RitualComponent.WATER)); - autoAlchemyRitual.add(new RitualComponent(-2, 0, 2, RitualComponent.WATER)); - autoAlchemyRitual.add(new RitualComponent(-3, 0, -2, RitualComponent.FIRE)); - autoAlchemyRitual.add(new RitualComponent(-2, 0, -3, RitualComponent.FIRE)); - autoAlchemyRitual.add(new RitualComponent(-3, 0, 2, RitualComponent.FIRE)); - autoAlchemyRitual.add(new RitualComponent(-2, 0, 3, RitualComponent.FIRE)); - autoAlchemyRitual.add(new RitualComponent(3, 0, -2, RitualComponent.FIRE)); - autoAlchemyRitual.add(new RitualComponent(2, 0, -3, RitualComponent.FIRE)); - autoAlchemyRitual.add(new RitualComponent(3, 0, 2, RitualComponent.FIRE)); - autoAlchemyRitual.add(new RitualComponent(2, 0, 3, RitualComponent.FIRE)); - return autoAlchemyRitual; - } - - public boolean areItemStacksEqualWithWildcard(ItemStack recipeStack, ItemStack comparedStack) - { - 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 deleted file mode 100644 index 5416441b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java +++ /dev/null @@ -1,189 +0,0 @@ -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.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -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(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (currentEssence < this.getCostPerRefresh()) - { - EntityPlayer entityOwner = SpellHelper.getPlayerForUsername(owner); - - if (entityOwner == null) - { - return; - } - - entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } else - { - if (ritualStone.getVar1() == 0) - { - int d0 = 0; - AxisAlignedBB axisalignedbb = new AxisAlignedBB(pos.offsetUp(), pos.add(1, 2, 1)).expand(d0, d0, d0); - List list = world.getEntitiesWithinAABB(EntityItem.class, axisalignedbb); - Iterator iterator = list.iterator(); - EntityItem item; - - while (iterator.hasNext()) - { - item = (EntityItem) iterator.next(); - ItemStack itemStack = item.getEntityItem(); - - if (itemStack == null) - { - continue; - } - - - if (BindingRegistry.isRequiredItemValid(itemStack)) - { - ritualStone.setVar1(BindingRegistry.getIndexForItem(itemStack) + 1); - itemStack.stackSize--; - world.addWeatherEffect(new EntityLightningBolt(world, pos.getX(), pos.getY() + 1, pos.getZ())); - ritualStone.setCooldown(ritualStone.getCooldown() - 1); - if(itemStack.stackSize <= 0) - { - item.setDead(); - } - break; - } - - if (world.rand.nextInt(10) == 0) - { - SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, world.provider.getDimensionId(), 1, pos); - } - } - - SoulNetworkHandler.syphonFromNetwork(owner, getCostPerRefresh()); - } else - { - ritualStone.setCooldown(ritualStone.getCooldown() - 1); - - if (world.rand.nextInt(20) == 0) - { - int lightningPoint = world.rand.nextInt(8); - - BlockPos newPos = getPositionForLightning(pos, lightningPoint); - world.addWeatherEffect(new EntityLightningBolt(world, newPos.getX(), newPos.getY(), newPos.getZ())); - } - - if (ritualStone.getCooldown() <= 0) - { - - ItemStack spawnedItem = BindingRegistry.getOutputForIndex(ritualStone.getVar1() - 1); - - if (spawnedItem != null) - { - EntityItem newItem = new EntityItem(world, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, spawnedItem.copy()); - world.spawnEntityInWorld(newItem); - } - - ritualStone.setActive(false); - } - } - } - } - - public BlockPos getPositionForLightning(BlockPos pos, int lightning) - { - switch (lightning) - { - case 0: - return pos.add(4, 3, 0); - - case 1: - return pos.add(-4, 3, 0); - - case 2: - return pos.add(0, 3, 4); - - case 3: - return pos.add(0, 3, -4); - - case 4: - return pos.add(3, 3, 3); - - case 5: - return pos.add(-3, 3, 3); - - case 6: - return pos.add(-3, 3, -3); - - case 7: - return pos.add(3, 3, -3); - - default: - return pos.add(0, 3, 0); - } - } - - @Override - public int getCostPerRefresh() - { - return 0; - } - - @Override - public int getInitialCooldown() - { - return 200; - } - - @Override - public List getRitualComponentList() - { - ArrayList boundSoulRitual = new ArrayList(); - boundSoulRitual.add(new RitualComponent(3, 0, 0, 2)); - boundSoulRitual.add(new RitualComponent(-3, 0, 0, 2)); - boundSoulRitual.add(new RitualComponent(0, 0, 3, 2)); - boundSoulRitual.add(new RitualComponent(0, 0, -3, 2)); - boundSoulRitual.add(new RitualComponent(2, 0, 2, 4)); - boundSoulRitual.add(new RitualComponent(-2, 0, 2, 4)); - boundSoulRitual.add(new RitualComponent(2, 0, -2, 4)); - boundSoulRitual.add(new RitualComponent(-2, 0, -2, 4)); - boundSoulRitual.add(new RitualComponent(4, 2, 0, 1)); - boundSoulRitual.add(new RitualComponent(-4, 2, 0, 1)); - boundSoulRitual.add(new RitualComponent(0, 2, 4, 1)); - boundSoulRitual.add(new RitualComponent(0, 2, -4, 1)); - boundSoulRitual.add(new RitualComponent(3, 2, 3, 3)); - boundSoulRitual.add(new RitualComponent(3, 2, -3, 3)); - boundSoulRitual.add(new RitualComponent(-3, 2, 3, 3)); - boundSoulRitual.add(new RitualComponent(-3, 2, -3, 3)); - boundSoulRitual.add(new RitualComponent(4, 1, 0, 0)); - boundSoulRitual.add(new RitualComponent(-4, 1, 0, 0)); - boundSoulRitual.add(new RitualComponent(0, 1, 4, 0)); - boundSoulRitual.add(new RitualComponent(0, 1, -4, 0)); - boundSoulRitual.add(new RitualComponent(3, 1, 3, 0)); - boundSoulRitual.add(new RitualComponent(3, 1, -3, 0)); - boundSoulRitual.add(new RitualComponent(-3, 1, 3, 0)); - boundSoulRitual.add(new RitualComponent(-3, 1, -3, 0)); - return boundSoulRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java deleted file mode 100644 index a113d896..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java +++ /dev/null @@ -1,410 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.chunk.Chunk; -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(); - - int cooldown = ritualStone.getCooldown(); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (cooldown > 0) - { - ritualStone.setCooldown(cooldown - 1); - - if (world.rand.nextInt(15) == 0) - { - world.addWeatherEffect(new EntityLightningBolt(world, pos.getX() - 1 + world.rand.nextInt(3), pos.getY() + 1, pos.getZ() - 1 + world.rand.nextInt(3))); - } - - return; - } - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - - - int range = 10; - - if (currentEssence < this.getCostPerRefresh()) - { - EntityPlayer entityOwner = SpellHelper.getPlayerForUsername(owner); - - if (entityOwner == null) - { - return; - } - - entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } else - { - boolean[][] boolList = new boolean[range * 2 + 1][range * 2 + 1]; - - for (int i = 0; i < 2 * range + 1; i++) - { - for (int j = 0; j < 2 * range + 1; j++) - { - boolList[i][j] = false; - } - } - - boolList[range][range] = true; - boolean isReady = false; - - while (!isReady) - { - isReady = true; - - for (int i = 0; i < 2 * range + 1; i++) - { - for (int j = 0; j < 2 * range + 1; j++) - { - if (boolList[i][j]) - { - BlockPos position = pos.add(i - range, 1, j - range); - - for(EnumFacing face : EnumFacing.HORIZONTALS) - { - int iP = i + face.getFrontOffsetX(); - int jP = j + face.getFrontOffsetY(); - - if(iP >= 0 && iP <= 2 * range && jP >= 0 && jP <= 2 * range && !boolList[iP][jP]) - { - BlockPos newPos = position.add(face.getDirectionVec()); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - if (!ModBlocks.largeBloodStoneBrick.equals(block) && !ModBlocks.bloodStoneBrick.equals(block)) - { - boolList[iP][jP] = true; - isReady = false; - } - } - } - } - } - } - } - - float temperature = 0.5f; - float humidity = 0.5f; - float acceptableRange = 0.1f; - - for (int i = -1; i <= 1; i++) - { - for (int j = -1; j <= 1; j++) - { - if (i == 0 && j == 0) - { - continue; - } - - boolean isItemConsumed = false; - BlockPos newPos = pos.add(i, 0, j); - TileEntity tileEntity = world.getTileEntity(newPos); - - if (!(tileEntity instanceof TEPlinth)) - { - continue; - } - - TEPlinth tilePlinth = (TEPlinth) tileEntity; - ItemStack itemStack = tilePlinth.getStackInSlot(0); - - if (itemStack != null) - { - Item itemTest = itemStack.getItem(); - - if (itemTest != null) - { - if (itemTest instanceof ItemBlock) - { - Block item = ((ItemBlock) itemTest).getBlock(); - if (item == (Blocks.sand)) - { - humidity -= 0.1f; - isItemConsumed = true; - } else if (item == (Blocks.lapis_block)) - { - humidity += 0.4f; - isItemConsumed = true; - } else if (item == (Blocks.sand)) - { - humidity -= 0.1f; - isItemConsumed = true; - } else if (item == (Blocks.sandstone)) - { - humidity -= 0.2f; - isItemConsumed = true; - } else if (item == (Blocks.netherrack)) - { - humidity -= 0.4f; - isItemConsumed = true; - } else if (item == (Blocks.coal_block)) - { - temperature += 0.2f; - isItemConsumed = true; - } else if (item == (Blocks.ice)) - { - temperature -= 0.4f; - isItemConsumed = true; - } else if (item == (Blocks.snow)) - { - temperature -= 0.2f; - isItemConsumed = true; - } - } else if (itemTest.equals(Items.dye) && itemStack.getItemDamage() == 4) - { - humidity += 0.1f; - isItemConsumed = true; - } else if (itemTest.equals(Items.lava_bucket)) - { - temperature += 0.4f; - isItemConsumed = true; - } else if (itemTest.equals(Items.water_bucket)) - { - humidity += 0.2f; - isItemConsumed = true; - } else if (itemTest.equals(Items.coal)) - { - temperature += 0.1f; - isItemConsumed = true; - } else if (itemTest.equals(Items.snowball)) - { - temperature -= 0.1f; - isItemConsumed = true; - } - } - } - - if (isItemConsumed) - { - tilePlinth.setInventorySlotContents(0, null); - world.markBlockForUpdate(newPos); - world.addWeatherEffect(new EntityLightningBolt(world, newPos.getX(), newPos.getY() + 1, newPos.getZ())); - } - } - } - - int biomeID = 1; - BiomeGenBase[] biomeList = BiomeGenBase.getBiomeGenArray(); - int iteration = 0; - - for (BiomeGenBase biome : biomeList) - { - if (biome == null) - { - continue; - } - - float temp = biome.temperature; - float rainfall = biome.rainfall; - temperature = Math.min(2.0f, Math.max(0.0f, temperature)); - humidity = Math.min(2.0f, Math.max(0.0f, humidity)); - - if (Math.abs(rainfall - humidity) < acceptableRange && Math.abs(temperature - temp) < acceptableRange) - { - biomeID = iteration; - break; - } - - iteration++; - } - - for (int i = 0; i < 2 * range + 1; i++) - { - for (int j = 0; j < 2 * range + 1; j++) - { - if (boolList[i][j]) - { - BlockPos newPos = pos.add(i - range, 0, j - range); - Chunk chunk = world.getChunkFromBlockCoords(newPos); - byte[] byteArray = chunk.getBiomeArray(); - int moduX = (newPos.getX()) % 16; - int moduZ = (newPos.getZ()) % 16; - - if (moduX < 0) - { - moduX = moduX + 16; - } - - if (moduZ < 0) - { - moduZ = moduZ + 16; - } - - byteArray[moduZ * 16 + moduX] = (byte) biomeID; - chunk.setBiomeArray(byteArray); - } - } - } - - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); - ritualStone.setActive(false); - } - } - - @Override - public int getCostPerRefresh() - { - return 0; - } - - @Override - public int getInitialCooldown() - { - return 200; - } - - @Override - public List getRitualComponentList() - { - ArrayList biomeChangerRitual = new ArrayList(); - biomeChangerRitual.add(new RitualComponent(1, 0, -2, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(1, 0, -3, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(2, 0, -1, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(3, 0, -1, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(1, 0, 2, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(1, 0, 3, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(2, 0, 1, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(3, 0, 1, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(-1, 0, -2, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(-1, 0, -3, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(-2, 0, -1, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(-3, 0, -1, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(-1, 0, 2, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(-1, 0, 3, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(-2, 0, 1, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(-3, 0, 1, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(3, 0, -3, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(3, 0, -4, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(4, 0, -3, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(4, 0, -5, RitualComponent.FIRE)); - biomeChangerRitual.add(new RitualComponent(5, 0, -4, RitualComponent.FIRE)); - biomeChangerRitual.add(new RitualComponent(3, 0, 3, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(3, 0, 4, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(4, 0, 3, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(4, 0, 5, RitualComponent.FIRE)); - biomeChangerRitual.add(new RitualComponent(5, 0, 4, RitualComponent.FIRE)); - biomeChangerRitual.add(new RitualComponent(-3, 0, 3, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(-3, 0, 4, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(-4, 0, 3, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(-4, 0, 5, RitualComponent.FIRE)); - biomeChangerRitual.add(new RitualComponent(-5, 0, 4, RitualComponent.FIRE)); - biomeChangerRitual.add(new RitualComponent(-3, 0, -3, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(-3, 0, -4, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(-4, 0, -3, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(-4, 0, -5, RitualComponent.FIRE)); - biomeChangerRitual.add(new RitualComponent(-5, 0, -4, RitualComponent.FIRE)); - biomeChangerRitual.add(new RitualComponent(0, 0, -5, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(-1, 0, -6, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(1, 0, -6, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(-1, 0, -8, RitualComponent.BLANK)); - biomeChangerRitual.add(new RitualComponent(0, 0, -8, RitualComponent.BLANK)); - biomeChangerRitual.add(new RitualComponent(1, 0, -8, RitualComponent.BLANK)); - biomeChangerRitual.add(new RitualComponent(-1, 0, -10, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(0, 0, -10, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(1, 0, -10, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(0, 0, 5, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(-1, 0, 6, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(1, 0, 6, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(-1, 0, 8, RitualComponent.BLANK)); - biomeChangerRitual.add(new RitualComponent(0, 0, 8, RitualComponent.BLANK)); - biomeChangerRitual.add(new RitualComponent(1, 0, 8, RitualComponent.BLANK)); - biomeChangerRitual.add(new RitualComponent(-1, 0, 10, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(0, 0, 10, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(1, 0, 10, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(-5, 0, 0, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(-6, 0, -1, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(-6, 0, 1, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(-8, 0, -1, RitualComponent.BLANK)); - biomeChangerRitual.add(new RitualComponent(-8, 0, 0, RitualComponent.BLANK)); - biomeChangerRitual.add(new RitualComponent(-8, 0, 1, RitualComponent.BLANK)); - biomeChangerRitual.add(new RitualComponent(-10, 0, -1, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(-10, 0, 0, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(-10, 0, 1, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(5, 0, 0, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(6, 0, -1, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(6, 0, 1, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(8, 0, -1, RitualComponent.BLANK)); - biomeChangerRitual.add(new RitualComponent(8, 0, 0, RitualComponent.BLANK)); - biomeChangerRitual.add(new RitualComponent(8, 0, 1, RitualComponent.BLANK)); - biomeChangerRitual.add(new RitualComponent(10, 0, -1, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(10, 0, 0, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(10, 0, 1, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(6, 0, -6, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(6, 0, -7, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(7, 0, -6, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(7, 0, -5, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(5, 0, -7, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(8, 0, -5, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(8, 0, -4, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(9, 0, -4, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(5, 0, -8, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(4, 0, -8, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(4, 0, -9, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(-6, 0, 6, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(-6, 0, 7, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(-7, 0, 6, RitualComponent.AIR)); - biomeChangerRitual.add(new RitualComponent(-7, 0, 5, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(-5, 0, 7, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(-8, 0, 5, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(-8, 0, 4, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(-9, 0, 4, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(-5, 0, 8, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(-4, 0, 8, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(-4, 0, 9, RitualComponent.EARTH)); - biomeChangerRitual.add(new RitualComponent(6, 0, 6, RitualComponent.FIRE)); - biomeChangerRitual.add(new RitualComponent(6, 0, 7, RitualComponent.FIRE)); - biomeChangerRitual.add(new RitualComponent(7, 0, 6, RitualComponent.FIRE)); - biomeChangerRitual.add(new RitualComponent(7, 0, 5, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(5, 0, 7, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(8, 0, 5, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(8, 0, 4, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(9, 0, 4, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(5, 0, 8, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(4, 0, 8, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(4, 0, 9, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(-6, 0, -6, RitualComponent.FIRE)); - biomeChangerRitual.add(new RitualComponent(-6, 0, -7, RitualComponent.FIRE)); - biomeChangerRitual.add(new RitualComponent(-7, 0, -6, RitualComponent.FIRE)); - biomeChangerRitual.add(new RitualComponent(-7, 0, -5, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(-5, 0, -7, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(-8, 0, -5, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(-8, 0, -4, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(-9, 0, -4, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(-5, 0, -8, RitualComponent.DUSK)); - biomeChangerRitual.add(new RitualComponent(-4, 0, -8, RitualComponent.WATER)); - biomeChangerRitual.add(new RitualComponent(-4, 0, -9, RitualComponent.WATER)); - return biomeChangerRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java deleted file mode 100644 index bdd237f6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java +++ /dev/null @@ -1,129 +0,0 @@ -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.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.ReflectionHelper; -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.spell.complex.effect.SpellHelper; - -public class RitualEffectContainment extends RitualEffect -{ - public static final String[] TIME_SINCE_IGNITED = new String[]{"timeSinceIgnited", "field_70833_d", "bq"}; - public static final int crepitousDrain = 1; - public static final int terraeDrain = 3; - public static final int magicalesDrain = 10; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (currentEssence < this.getCostPerRefresh()) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - int d0 = 5; - List entityList = SpellHelper.getEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, d0, d0); - boolean flag = false; - boolean hasCrepitous = this.canDrainReagent(ritualStone, ReagentRegistry.crepitousReagent, crepitousDrain, false); - boolean hasMagicales = this.canDrainReagent(ritualStone, ReagentRegistry.magicalesReagent, magicalesDrain, false); - - for (Entity entity : entityList) - { - if (!(entity instanceof EntityLivingBase)) - { - continue; - } - - EntityLivingBase livingEntity = (EntityLivingBase) entity; - - if (livingEntity instanceof EntityPlayer) - { - continue; - } - - - double xDif = livingEntity.posX - (pos.getX() + 0.5); - double yDif = livingEntity.posY - (pos.getY() + 3); - double zDif = livingEntity.posZ - (pos.getZ() + 0.5); - livingEntity.motionX = -0.05 * xDif; - livingEntity.motionY = -0.05 * yDif; - livingEntity.motionZ = -0.05 * zDif; - flag = true; - - livingEntity.fallDistance = 0; - - if (hasMagicales && this.canDrainReagent(ritualStone, ReagentRegistry.magicalesReagent, magicalesDrain, false)) - { - if (!livingEntity.isPotionActive(AlchemicalWizardry.customPotionPlanarBinding)) - { - livingEntity.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionPlanarBinding.id, 100, 0)); - this.canDrainReagent(ritualStone, ReagentRegistry.magicalesReagent, magicalesDrain, true); - } - } - - if (hasCrepitous && this.canDrainReagent(ritualStone, ReagentRegistry.crepitousReagent, crepitousDrain, false)) - { - if (entity instanceof EntityCreeper) - { - ReflectionHelper.setPrivateValue(EntityCreeper.class, (EntityCreeper) entity, 2, TIME_SINCE_IGNITED); - ((EntityCreeper) entity).setAttackTarget(null); - this.canDrainReagent(ritualStone, ReagentRegistry.crepitousReagent, crepitousDrain, true); - } - } - } - - if (world.getWorldTime() % 2 == 0 && flag) - { - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); - } - } - } - - @Override - public int getCostPerRefresh() - { - return 1; - } - - @Override - public List getRitualComponentList() - { - ArrayList containmentRitual = new ArrayList(); - containmentRitual.add(new RitualComponent(1, 0, 0, 3)); - containmentRitual.add(new RitualComponent(-1, 0, 0, 3)); - containmentRitual.add(new RitualComponent(0, 0, 1, 3)); - containmentRitual.add(new RitualComponent(0, 0, -1, 3)); - containmentRitual.add(new RitualComponent(2, 0, 2, 3)); - containmentRitual.add(new RitualComponent(2, 0, -2, 3)); - containmentRitual.add(new RitualComponent(-2, 0, 2, 3)); - containmentRitual.add(new RitualComponent(-2, 0, -2, 3)); - containmentRitual.add(new RitualComponent(1, 5, 0, 3)); - containmentRitual.add(new RitualComponent(-1, 5, 0, 3)); - containmentRitual.add(new RitualComponent(0, 5, 1, 3)); - containmentRitual.add(new RitualComponent(0, 5, -1, 3)); - containmentRitual.add(new RitualComponent(2, 5, 2, 3)); - containmentRitual.add(new RitualComponent(2, 5, -2, 3)); - containmentRitual.add(new RitualComponent(-2, 5, 2, 3)); - containmentRitual.add(new RitualComponent(-2, 5, -2, 3)); - return containmentRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java deleted file mode 100644 index 5b5a623b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java +++ /dev/null @@ -1,445 +0,0 @@ -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.player.EntityPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.InventoryCrafting; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; -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(); - - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); - - if(world.getWorldTime() % (hasPotentia ? 1 : 4) != 0) - { - return; - } - - if (currentEssence < this.getCostPerRefresh()) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - NBTTagCompound tag = ritualStone.getCustomRitualTag(); - - if(tag == null) - { - ritualStone.setCustomRitualTag(new NBTTagCompound()); - tag = ritualStone.getCustomRitualTag(); - } - - boolean lastFailed = tag.getBoolean("didLastCraftFail"); - - int slotDesignation = tag.getInteger("slotDesignation"); - if(lastFailed) - { - slotDesignation++; - tag.setInteger("slotDesignation", slotDesignation); - tag.setBoolean("didLastCraftFail", false); - } - int direction = ritualStone.getDirection(); - - boolean canContinue = false; - - ItemStack[] recipe = new ItemStack[9]; - 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++) - { - int gridSpace = (i+1)*3 + (j+1); - - Int3 position = this.getSlotPositionForDirection(gridSpace, direction); - TileEntity inv = world.getTileEntity(pos.add(position.xCoord, position.yCoord, position.zCoord)); - if(inv instanceof IInventory) - { - if(((IInventory) inv).getSizeInventory() <= slotDesignation || !((IInventory) inv).isItemValidForSlot(slotDesignation, ((IInventory) inv).getStackInSlot(slotDesignation))) - { - - }else - { - ItemStack invStack = ((IInventory) inv).getStackInSlot(slotDesignation); - if(invStack != null) - { - inventory.setInventorySlotContents(gridSpace, invStack); - recipe[gridSpace] = invStack; - canContinue = true; - } - } - } - } - } - - if(!canContinue) - { - tag.setInteger("slotDesignation", 0); - return; - } - - ItemStack returnStack = CraftingManager.getInstance().findMatchingRecipe(inventory, world); - - if (returnStack == null) - { - tag.setBoolean("didLastCraftFail", true); - }else - { - boolean hasVirtus = this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false); - boolean addOutputToInputs = hasVirtus; - - IInventory outputInv = null; - - List invList = new ArrayList(); - - TileEntity northEntity = world.getTileEntity(pos.add(0, -1, -2)); - TileEntity southEntity = world.getTileEntity(pos.add(0, -1, 2)); - TileEntity eastEntity = world.getTileEntity(pos.add(2, -1, 0)); - TileEntity westEntity = world.getTileEntity(pos.add(-2, -1, 0)); - - switch(direction) - { - case 1: - if(southEntity instanceof IInventory) - { - outputInv = (IInventory)southEntity; - }else - { - return; - } - - if(northEntity instanceof IInventory) - { - invList.add((IInventory)northEntity); - } - if(eastEntity instanceof IInventory) - { - invList.add((IInventory)eastEntity); - } - if(westEntity instanceof IInventory) - { - invList.add((IInventory)westEntity); - } - - break; - - case 2: - if(westEntity instanceof IInventory) - { - outputInv = (IInventory)westEntity; - }else - { - return; - } - - if(northEntity instanceof IInventory) - { - invList.add((IInventory)northEntity); - } - if(eastEntity instanceof IInventory) - { - invList.add((IInventory)eastEntity); - } - if(southEntity instanceof IInventory) - { - invList.add((IInventory)southEntity); - } - - break; - - case 3: - if(northEntity instanceof IInventory) - { - outputInv = (IInventory)northEntity; - }else - { - return; - } - - if(eastEntity instanceof IInventory) - { - invList.add((IInventory)eastEntity); - } - if(southEntity instanceof IInventory) - { - invList.add((IInventory)southEntity); - } - if(westEntity instanceof IInventory) - { - invList.add((IInventory)westEntity); - } - - break; - - case 4: - if(eastEntity instanceof IInventory) - { - outputInv = (IInventory)eastEntity; - }else - { - return; - } - - if(northEntity instanceof IInventory) - { - invList.add((IInventory)northEntity); - } - if(southEntity instanceof IInventory) - { - invList.add((IInventory)southEntity); - } - if(westEntity instanceof IInventory) - { - invList.add((IInventory)westEntity); - } - - break; - } - - if (outputInv != null) - { - if(!(!limitToSingleStack ? SpellHelper.canInsertStackFullyIntoInventory(returnStack, outputInv, EnumFacing.DOWN) : SpellHelper.canInsertStackFullyIntoInventory(returnStack, outputInv, EnumFacing.DOWN, true, returnStack.getMaxStackSize()))) - { - tag.setBoolean("didLastCraftFail", true); - return; - } - - if(addOutputToInputs) - { - invList.add(outputInv); - } - - Map> syphonMap = new HashMap>(); //Inventory, Slot, how much claimed - - for(int n = 0; n < recipe.length; n++) //Look for the correct items - { - ItemStack recipeStack = recipe[n]; - if(recipeStack == null) - { - continue; - } - - boolean isItemTaken = false; - - for(int i = 0; i < invList.size(); i++) - { - if(isItemTaken) - { - break; - } - IInventory inputInv = invList.get(i); - if(inputInv == null) - { - continue; - } - - for(int j = 0; j < inputInv.getSizeInventory(); j++) - { - if(!inputInv.isItemValidForSlot(j, recipeStack)) - { - continue; - } - - ItemStack invItem = inputInv.getStackInSlot(j); - if(invItem == null) - { - continue; - } - - if(this.areItemsEqualForCrafting(recipeStack, invItem)) - { - //TODO - inventory.setInventorySlotContents(n, invItem); -// ItemStack returnedStack = CraftingManager.getInstance().findMatchingRecipe(inventory, world); -// if(returnedStack == null || returnedStack.getItem() == null || returnedStack.getItem() != returnStack.getItem()) -// { -// continue; -// } - Map slotMap = syphonMap.get(i); - if(slotMap == null) - { - slotMap = new HashMap(); - syphonMap.put(i, slotMap); - } - - if(slotMap.containsKey(j)) - { - int syphoned = slotMap.get(j); - if(invItem.stackSize - syphoned > 0) - { - slotMap.put(j, syphoned + 1); - isItemTaken = true; - break; - } - }else - { - slotMap.put(j, 1); - isItemTaken = true; - break; - } - } - } - } - - if(!isItemTaken) - { - tag.setBoolean("didLastCraftFail", true); - return; - } - } - - /* The recipe is valid and the items have been found */ - - SpellHelper.insertStackIntoInventory(CraftingManager.getInstance().findMatchingRecipe(inventory, world), outputInv, EnumFacing.DOWN); - - for(Entry> entry1 : syphonMap.entrySet()) - { - IInventory inputInv = invList.get(entry1.getKey()); - for(Entry entry2 : entry1.getValue().entrySet()) - { - ItemStack drainedStack = inputInv.getStackInSlot(entry2.getKey()); - Item item = drainedStack.getItem(); - if(item.hasContainerItem(drainedStack)) - { - inputInv.setInventorySlotContents(entry2.getKey(), item.getContainerItem(drainedStack)); - }else - { - drainedStack.stackSize -= entry2.getValue(); - if(drainedStack.stackSize <= 0) - { - inputInv.setInventorySlotContents(entry2.getKey(), null); - } - } - } - } - - if(addOutputToInputs && syphonMap.containsKey(invList.size())) - { - this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, true); - } - - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); - - if(hasPotentia) - { - this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, true); - } - - world.markBlockForUpdate(pos.add(0, 1, 2)); - world.markBlockForUpdate(pos.add(0, 1, -2)); - world.markBlockForUpdate(pos.add(2, 1, 0)); - world.markBlockForUpdate(pos.add(-2, 1, 0)); - -// 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); - } - } - } - } - - @Override - public int getCostPerRefresh() - { - return 10; - } - - @Override - public List getRitualComponentList() - { - ArrayList autoCraftingRitual = new ArrayList(); - - this.addCornerRunes(autoCraftingRitual, 1, 1, RitualComponent.EARTH); - this.addParallelRunes(autoCraftingRitual, 1, 1, RitualComponent.EARTH); - autoCraftingRitual.add(new RitualComponent(0, 1, 0, RitualComponent.AIR)); - this.addOffsetRunes(autoCraftingRitual, 1, 2, -1, RitualComponent.FIRE); - this.addCornerRunes(autoCraftingRitual, 1, -1, RitualComponent.FIRE); - autoCraftingRitual.add(new RitualComponent(-1, -1, 0, RitualComponent.EARTH)); - autoCraftingRitual.add(new RitualComponent(1, -1, 0, RitualComponent.EARTH)); - autoCraftingRitual.add(new RitualComponent(0, -1, -1, RitualComponent.EARTH)); - autoCraftingRitual.add(new RitualComponent(0, -1, 0, RitualComponent.FIRE)); - autoCraftingRitual.add(new RitualComponent(0, -1, 1, RitualComponent.WATER)); - - return autoCraftingRitual; - } - - public boolean areItemsEqualForCrafting(ItemStack stack1, ItemStack stack2) - { - if (stack1 == null || stack2 == null) - { - 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()); - } - - public Int3 getSlotPositionForDirection(int slot, int direction) - { - int x = slot % 3 - 1; - int z = slot / 3 - 1; - switch(direction) - { - case 1: //NORTH-facing - return new Int3(x, 2, z); - case 2: //EAST-facing - return new Int3(z, 2, -x); - case 3: //SOUTH-facing - return new Int3(-x, 2, -z); - case 4: //WEST-facing - return new Int3(-z, 2, x); - } - return new Int3(0,0,0); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java deleted file mode 100644 index 7d461d57..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java +++ /dev/null @@ -1,267 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.init.Blocks; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -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; - public static final int virtusDrain = 10; - public static final int incendiumDrain = 10; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (world.getWorldTime() % 10 != 5) - { - return; - } - - TileEntity tile = world.getTileEntity(pos.offsetUp()); - IInventory tileEntity; - - if (tile instanceof IInventory) - { - tileEntity = (IInventory) tile; - } else - { - return; - } - - if (tileEntity.getSizeInventory() <= 0) - { - return; - } - - boolean hasRoom = false; - for (int i = 0; i < tileEntity.getSizeInventory(); i++) - { - if (tileEntity.getStackInSlot(i) == null) - { - hasRoom = true; - break; - } - } - - if (!hasRoom) - { - return; //Prevents overflow - } - - 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); - - int fortuneLevel = 0; - if (hasOrbisTerrae) - { - fortuneLevel++; - } - if (hasPotentia) - { - fortuneLevel++; - } - if (hasVirtus) - { - fortuneLevel++; - } - - if (currentEssence < this.getCostPerRefresh()) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - for (int j = -3; j < 0; j++) - { - for (int i = -1; i <= 1; i++) - { - for (int k = -1; k <= 1; k++) - { - BlockPos newPos = pos.add(i, j, k); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - - if(block.getBlockHardness(world, newPos) == -1) - { - continue; - } - - if (!world.isAirBlock(newPos)) - { - if ((block.equals(ModBlocks.ritualStone) || block.equals(ModBlocks.blockMasterStone)) || SpellHelper.isBlockFluid(block)) - { - continue; - } - - if (hasCrystallos && block.canSilkHarvest(world, newPos, state, null)) - { - ItemStack item = new ItemStack(block, 1, block.getMetaFromState(state)); - ItemStack copyStack = ItemStack.copyItemStack(item); - - SpellHelper.insertStackIntoInventory(copyStack, tileEntity, EnumFacing.DOWN); - - if (copyStack.stackSize > 0) - { - world.spawnEntityInWorld(new EntityItem(world, pos.getX() + 0.5, pos.getY() + 2, pos.getZ() + 0.5, copyStack)); - } - - if (hasCrystallos) - { - this.canDrainReagent(ritualStone, ReagentRegistry.crystallosReagent, crystallosDrain, true); - } - } else - { - List itemDropList = block.getDrops(world, newPos, state, fortuneLevel); - - if (itemDropList != null) - { - int invSize = tileEntity.getSizeInventory(); - - for (ItemStack item : itemDropList) - { - hasIncendium = hasIncendium && this.canDrainReagent(ritualStone, ReagentRegistry.incendiumReagent, incendiumDrain, false); - ItemStack copyStack = ItemStack.copyItemStack(item); - - if (this.usesIncendium(copyStack)) - { - copyStack = this.transformToNewItem(copyStack, hasIncendium, false); - this.canDrainReagent(ritualStone, ReagentRegistry.incendiumReagent, incendiumDrain, true); - } - - SpellHelper.insertStackIntoInventory(copyStack, tileEntity, EnumFacing.DOWN); - if (copyStack.stackSize > 0) - { - world.spawnEntityInWorld(new EntityItem(world, pos.getX() + 0.5, pos.getY() + 2, pos.getZ() + 0.5, copyStack)); - } - } - - if (hasOrbisTerrae) - { - this.canDrainReagent(ritualStone, ReagentRegistry.orbisTerraeReagent, orbisTerraeDrain, true); - } - if (hasPotentia) - { - this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, true); - } - if (hasVirtus) - { - this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, true); - } - } - } - world.setBlockToAir(newPos); - world.playSoundEffect(newPos.getX(), newPos.getY(), newPos.getZ(), "mob.endermen.portal", 1.0F, 1.0F); - - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); - - return; - } - } - } - } - } - } - - private boolean usesIncendium(ItemStack stack) - { - if (stack != null) - { - Item item = stack.getItem(); - if (item instanceof ItemBlock) - { - Block block = ((ItemBlock) item).getBlock(); - - if (block == Blocks.cobblestone || block == Blocks.stone) - { - return true; - } - } - } - return false; - } - - private ItemStack transformToNewItem(ItemStack stack, boolean hasIncendium, boolean hasCrepitous) - { - if (stack != null) - { - ItemStack copyStack = ItemStack.copyItemStack(stack); - int stackSize = copyStack.stackSize; - - Item item = stack.getItem(); - if (item instanceof ItemBlock) - { - Block block = ((ItemBlock) item).getBlock(); - - if (hasIncendium) - { - if (block == Blocks.cobblestone || block == Blocks.stone) - { - copyStack = new ItemStack(Blocks.netherrack, stackSize, 0); - } - } - } - - return copyStack; - } - return stack; - } - - @Override - public int getCostPerRefresh() - { - return 7; - } - - @Override - public List getRitualComponentList() - { - ArrayList crushingRitual = new ArrayList(); - crushingRitual.add(new RitualComponent(0, 0, 1, RitualComponent.EARTH)); - crushingRitual.add(new RitualComponent(1, 0, 0, RitualComponent.EARTH)); - crushingRitual.add(new RitualComponent(0, 0, -1, RitualComponent.EARTH)); - crushingRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.EARTH)); - crushingRitual.add(new RitualComponent(2, 0, 0, RitualComponent.FIRE)); - crushingRitual.add(new RitualComponent(0, 0, 2, RitualComponent.FIRE)); - crushingRitual.add(new RitualComponent(-2, 0, 0, RitualComponent.FIRE)); - crushingRitual.add(new RitualComponent(0, 0, -2, RitualComponent.FIRE)); - crushingRitual.add(new RitualComponent(2, 0, 2, RitualComponent.DUSK)); - crushingRitual.add(new RitualComponent(2, 0, -2, RitualComponent.DUSK)); - crushingRitual.add(new RitualComponent(-2, 0, 2, RitualComponent.DUSK)); - crushingRitual.add(new RitualComponent(-2, 0, -2, RitualComponent.DUSK)); - crushingRitual.add(new RitualComponent(2, 1, 0, RitualComponent.AIR)); - crushingRitual.add(new RitualComponent(-2, 1, 0, RitualComponent.AIR)); - crushingRitual.add(new RitualComponent(0, 1, 2, RitualComponent.AIR)); - crushingRitual.add(new RitualComponent(0, 1, -2, RitualComponent.AIR)); - return crushingRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java deleted file mode 100644 index 2674b0ce..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java +++ /dev/null @@ -1,182 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; -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.BlockPos; -import net.minecraft.util.ChatComponentTranslation; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -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.demonVillage.tileEntity.TEDemonPortal; -import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; - -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)}; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (currentEssence < this.getCostPerRefresh()) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - NBTTagCompound tag = ritualStone.getCustomRitualTag(); - - boolean reagentsFulfilled = true; - - for(Reagent reagent : reagents) - { - int reagentAmount = tag.getInteger(ReagentRegistry.getKeyForReagent(reagent)); - if(reagentAmount < neededAmount) - { - reagentsFulfilled = false; -// System.out.println("Reagents not fulfilled. Missing: " + ReagentRegistry.getKeyForReagent(reagent)); - int drainAmount = Math.min(drainRate, neededAmount - reagentAmount); - - if(drainAmount <= 0) - { - continue; - } - - if(this.canDrainReagent(ritualStone, reagent, drainAmount, true)) - { - if(rand.nextInt(10) == 0) - { - this.createRandomLightning(world, pos.getX(), pos.getY(), pos.getZ()); - } - reagentAmount += drainAmount; - - tag.setInteger(ReagentRegistry.getKeyForReagent(reagent), reagentAmount); - break; - } - } - } - - ritualStone.setCustomRitualTag(tag); - - if(reagentsFulfilled && checkCreatePortal(ritualStone)) - { - world.setBlockState(pos.offsetUp(), ModBlocks.blockDemonPortal.getDefaultState()); - - TEDemonPortal portal = (TEDemonPortal) world.getTileEntity(pos.offsetUp()); - portal.start(); - - ritualStone.setActive(false); - } - - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); - } - } - - public boolean checkCreatePortal(IMasterRitualStone ritualStone) - { - BlockPos pos = ritualStone.getPosition(); - TileEntity entity = ritualStone.getWorldObj().getTileEntity(pos.offsetUp()); - if(entity instanceof IBloodAltar) - { - IBloodAltar altar = (IBloodAltar)entity; - if(altar.hasDemonBlood() && ritualStone.getWorldObj().isAirBlock(pos.offsetUp(2))) - { - return true; - } - } - return false; - } - - @Override - public int getCostPerRefresh() - { - return 0; - } - - 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))); - } - - @Override - public boolean startRitual(IMasterRitualStone ritualStone, EntityPlayer player) - { - if(!checkJars(ritualStone)) - { - player.addChatMessage(new ChatComponentTranslation("message.ritualdemonportal.missingjar")); - return false; - } - return true; - } - - public boolean checkJars(IMasterRitualStone ritualStone) - { - BlockPos position = ritualStone.getPosition(); - - for(Int3 pos : jarLocations) - { - if(!(ritualStone.getWorldObj().getTileEntity(position.add(pos.xCoord, pos.yCoord, pos.zCoord)) instanceof TEBelljar)) - { - return false; - } - } - - return true; - } - - @Override - public List getRitualComponentList() - { - ArrayList demonRitual = new ArrayList(); - this.addParallelRunes(demonRitual, 3, 0, RitualComponent.FIRE); - this.addParallelRunes(demonRitual, 5, 0, RitualComponent.FIRE); - this.addCornerRunes(demonRitual, 2, 0, RitualComponent.AIR); - this.addCornerRunes(demonRitual, 3, 0, RitualComponent.DUSK); - this.addOffsetRunes(demonRitual, 3, 4, 0, RitualComponent.AIR); - - this.addCornerRunes(demonRitual, 4, 1, RitualComponent.BLANK); - this.addCornerRunes(demonRitual, 4, 2, RitualComponent.EARTH); - this.addCornerRunes(demonRitual, 4, 3, RitualComponent.EARTH); - this.addCornerRunes(demonRitual, 4, 4, RitualComponent.DUSK); - - this.addParallelRunes(demonRitual, 6, 1, RitualComponent.BLANK); - this.addParallelRunes(demonRitual, 6, 2, RitualComponent.WATER); - this.addParallelRunes(demonRitual, 6, 3, RitualComponent.WATER); - this.addParallelRunes(demonRitual, 6, 4, RitualComponent.DUSK); - - this.addOffsetRunes(demonRitual, 2, 6, 1, RitualComponent.FIRE); - this.addOffsetRunes(demonRitual, 2, 7, 1, RitualComponent.BLANK); - this.addOffsetRunes(demonRitual, 2, 8, 1, RitualComponent.FIRE); - this.addOffsetRunes(demonRitual, 2, 9, 1, RitualComponent.BLANK); - this.addOffsetRunes(demonRitual, 1, 9, 1, RitualComponent.AIR); - this.addParallelRunes(demonRitual, 9, 2, RitualComponent.DUSK); - - this.addCornerRunes(demonRitual, 6, 3, RitualComponent.BLANK); - this.addOffsetRunes(demonRitual, 6, 7, 3, RitualComponent.BLANK); - this.addOffsetRunes(demonRitual, 5, 7, 3, RitualComponent.AIR); - this.addOffsetRunes(demonRitual, 4, 7, 3, RitualComponent.AIR); - - return demonRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java deleted file mode 100644 index bdb47c52..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java +++ /dev/null @@ -1,259 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -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(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - TileEntity tile = world.getTileEntity(pos.offsetUp()); - - if (!(tile instanceof IInventory) || ((IInventory) tile).getSizeInventory() < 3) - { - return; - } - - ItemStack item1 = ((IInventory) tile).getStackInSlot(0); - ItemStack item2 = ((IInventory) tile).getStackInSlot(1); - ItemStack item3 = ((IInventory) tile).getStackInSlot(2); - - int xSize = item1 == null ? 0 : item1.stackSize; - int ySize = item2 == null ? 0 : item2.stackSize; - int zSize = item3 == null ? 0 : item3.stackSize; - - int cost = 5; - - if (currentEssence < cost) - { - EntityPlayer entityOwner = SpellHelper.getPlayerForUsername(owner); - - if (entityOwner == null) - { - return; - } - - entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } else - { - tile = world.getTileEntity(pos.offsetDown()); - if(!(tile instanceof IInventory)) - { - return; - } - - ItemBlock placedBlock = null; - ItemStack stack = null; - int slot = 0; - IInventory inv = (IInventory)tile; - - while(slot < inv.getSizeInventory()) - { - stack = inv.getStackInSlot(slot); - if(stack == null) - { - slot++; - continue; - } - - if(stack.getItem() instanceof ItemBlock) - { - placedBlock = (ItemBlock)stack.getItem(); - break; - } - - slot++; - } - - if(placedBlock == null || stack == null || slot >= inv.getSizeInventory()) - { - return; - } - - int count = 10; - - Int3 lastPos = this.getLastPosition(ritualStone.getCustomRitualTag()); - - int i = -xSize; - int j = -ySize; - int k = -zSize; - - if(lastPos != null) - { - i = Math.min(xSize, Math.max(-xSize, lastPos.xCoord)); - j = Math.min(ySize, Math.max(-ySize, lastPos.yCoord)); - k = Math.min(zSize, Math.max(-zSize, lastPos.zCoord)); - } - - boolean incrementNext = false; - - while(j <= ySize) - { - if(pos.getY() + j < 0) - { - j++; - continue; - } - 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((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((xSize + 0.50f) * (ySize + 0.50f) * (zSize + 0.50f), 2)) - { - k++; - continue; - } - - if(incrementNext || count <= 0) - { - this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); - return; - } - - count--; - - BlockPos newPos = pos.add(i, j, k); - - if (!world.isAirBlock(newPos)) - { - k++; - continue; - } else - { - //This is pulled from the ItemBlock's placing calls - int newState = placedBlock.getMetadata(stack.getMetadata()); - IBlockState iblockstate1 = placedBlock.block.onBlockPlaced(world, newPos, EnumFacing.UP, 0, 0, 0, newState, null); - - if (placedBlock.placeBlockAt(stack, null, world, pos, EnumFacing.UP, 0, 0, 0, iblockstate1)) - { - world.playSoundEffect((double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), placedBlock.block.stepSound.getPlaceSound(), (placedBlock.block.stepSound.getVolume() + 1.0F) / 2.0F, placedBlock.block.stepSound.getFrequency() * 0.8F); - --stack.stackSize; - } - - this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); - - incrementNext = true; - SoulNetworkHandler.syphonFromNetwork(owner, cost); - - k++; - } - } - k = -zSize; - i++; - } - i = -xSize; - j++; - this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); - return; - } - - this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(-xSize, -ySize, -zSize)); - } - } - - @Override - public int getCostPerRefresh() - { - return 0; - } - - @Override - public List getRitualComponentList() - { - ArrayList ellipsoidRitual = new ArrayList(); - - ellipsoidRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(1, 0, -1, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(1, 0, 1, RitualComponent.DUSK)); - - ellipsoidRitual.add(new RitualComponent(4, 0, 0, RitualComponent.FIRE)); - ellipsoidRitual.add(new RitualComponent(5, 0, 0, RitualComponent.FIRE)); - ellipsoidRitual.add(new RitualComponent(5, 0, -1, RitualComponent.FIRE)); - ellipsoidRitual.add(new RitualComponent(5, 0, -2, RitualComponent.FIRE)); - ellipsoidRitual.add(new RitualComponent(-4, 0, 0, RitualComponent.FIRE)); - ellipsoidRitual.add(new RitualComponent(-5, 0, 0, RitualComponent.FIRE)); - ellipsoidRitual.add(new RitualComponent(-5, 0, 1, RitualComponent.FIRE)); - ellipsoidRitual.add(new RitualComponent(-5, 0, 2, RitualComponent.FIRE)); - - ellipsoidRitual.add(new RitualComponent(0, 0, 4, RitualComponent.AIR)); - ellipsoidRitual.add(new RitualComponent(0, 0, 5, RitualComponent.AIR)); - ellipsoidRitual.add(new RitualComponent(1, 0, 5, RitualComponent.AIR)); - ellipsoidRitual.add(new RitualComponent(2, 0, 5, RitualComponent.AIR)); - ellipsoidRitual.add(new RitualComponent(0, 0, -4, RitualComponent.AIR)); - ellipsoidRitual.add(new RitualComponent(0, 0, -5, RitualComponent.AIR)); - ellipsoidRitual.add(new RitualComponent(-1, 0, -5, RitualComponent.AIR)); - ellipsoidRitual.add(new RitualComponent(-2, 0, -5, RitualComponent.AIR)); - - ellipsoidRitual.add(new RitualComponent(3, 0, 1, RitualComponent.EARTH)); - ellipsoidRitual.add(new RitualComponent(3, 0, 2, RitualComponent.EARTH)); - ellipsoidRitual.add(new RitualComponent(3, 0, 3, RitualComponent.EARTH)); - ellipsoidRitual.add(new RitualComponent(2, 0, 3, RitualComponent.EARTH)); - ellipsoidRitual.add(new RitualComponent(-3, 0, -1, RitualComponent.EARTH)); - ellipsoidRitual.add(new RitualComponent(-3, 0, -2, RitualComponent.EARTH)); - ellipsoidRitual.add(new RitualComponent(-3, 0, -3, RitualComponent.EARTH)); - ellipsoidRitual.add(new RitualComponent(-2, 0, -3, RitualComponent.EARTH)); - - ellipsoidRitual.add(new RitualComponent(1, 0, -3, RitualComponent.WATER)); - ellipsoidRitual.add(new RitualComponent(2, 0, -3, RitualComponent.WATER)); - ellipsoidRitual.add(new RitualComponent(3, 0, -3, RitualComponent.WATER)); - ellipsoidRitual.add(new RitualComponent(3, 0, -2, RitualComponent.WATER)); - ellipsoidRitual.add(new RitualComponent(-1, 0, 3, RitualComponent.WATER)); - ellipsoidRitual.add(new RitualComponent(-2, 0, 3, RitualComponent.WATER)); - ellipsoidRitual.add(new RitualComponent(-3, 0, 3, RitualComponent.WATER)); - ellipsoidRitual.add(new RitualComponent(-3, 0, 2, RitualComponent.WATER)); - - return ellipsoidRitual; - } - - public Int3 getLastPosition(NBTTagCompound tag) - { - if(tag != null && tag.getBoolean("hasWorked")) - { - return Int3.readFromNBT(tag); - } - - return null; - } - - public void setLastPosition(NBTTagCompound tag, Int3 pos) - { - if(tag != null) - { - pos.writeToNBT(tag); - tag.setBoolean("hasWorked", true); - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java deleted file mode 100644 index 53c81bba..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java +++ /dev/null @@ -1,211 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -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; - -public class RitualEffectEvaporation extends RitualEffect -{ - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (currentEssence < 0) - { - EntityPlayer entityOwner = SpellHelper.getPlayerForUsername(owner); - - if (entityOwner == null) - { - return; - } - - entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } else - { - IBlockState state1 = world.getBlockState(pos.offsetDown()); - Block block1 = state1.getBlock(); - int range = this.getRadiusForModifierBlock(block1); - - boolean[][][] boolList = new boolean[range * 2 + 1][range * 2 + 1][range * 2 + 1]; - - for (int i = 0; i < 2 * range + 1; i++) - { - for (int j = 0; j < 2 * range + 1; j++) - { - for (int k = 0; k < 2 * range + 1; k++) - { - boolList[i][j][k] = false; - } - } - } - - boolList[range][range][range] = true; - boolean isReady = false; - - while (!isReady) - { - isReady = true; - - for (int i = 0; i < 2 * range + 1; i++) - { - for (int j = 0; j < 2 * range + 1; j++) - { - for (int k = 0; k < 2 * range + 1; k++) - { - if (boolList[i][j][k]) - { - BlockPos position = pos.add(i - range, j - range, k - range); - - for(EnumFacing face : EnumFacing.VALUES) - { - int iP = i + face.getFrontOffsetX(); - int jP = j + face.getFrontOffsetY(); - int kP = k + face.getFrontOffsetZ(); - - if(iP >= 0 && iP <= 2 * range && jP >= 0 && jP <= 2 * range && kP >= 0 && kP <= 2 * range && !boolList[iP][jP][kP]) - { - BlockPos newPos = position.add(face.getDirectionVec()); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - if (world.isAirBlock(newPos) || block == ModBlocks.blockSpectralContainer) - { - boolList[iP][jP][kP] = true; - isReady = false; - } - } - } - } - } - } - } - } - - for (int i = 0; i < 2 * range + 1; i++) - { - for (int j = 0; j < 2 * range + 1; j++) - { - for (int k = 0; k < 2 * range + 1; k++) - { - if (!boolList[i][j][k]) - { - continue; - } - - BlockPos newPos = pos.add(i - range, j - range, k - range); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - - if (block == ModBlocks.blockSpectralContainer) - { - world.setBlockToAir(newPos); - } - } - } - } - - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); - - ritualStone.setActive(false); - } - } - - @Override - public int getCostPerRefresh() - { - return 0; - } - - @Override - public List getRitualComponentList() - { - ArrayList ellipsoidRitual = new ArrayList(); - - ellipsoidRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(1, 0, -1, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(1, 0, 1, RitualComponent.DUSK)); - - ellipsoidRitual.add(new RitualComponent(4, 0, 0, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(5, 0, 0, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(5, 0, -1, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(5, 0, -2, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(-4, 0, 0, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(-5, 0, 0, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(-5, 0, 1, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(-5, 0, 2, RitualComponent.DUSK)); - - ellipsoidRitual.add(new RitualComponent(0, 0, 4, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(0, 0, 5, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(1, 0, 5, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(2, 0, 5, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(0, 0, -4, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(0, 0, -5, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(-1, 0, -5, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(-2, 0, -5, RitualComponent.DUSK)); - - ellipsoidRitual.add(new RitualComponent(3, 0, 1, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(3, 0, 2, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(3, 0, 3, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(2, 0, 3, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(-3, 0, -1, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(-3, 0, -2, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(-3, 0, -3, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(-2, 0, -3, RitualComponent.DUSK)); - - ellipsoidRitual.add(new RitualComponent(1, 0, -3, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(2, 0, -3, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(3, 0, -3, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(3, 0, -2, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(-1, 0, 3, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(-2, 0, 3, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(-3, 0, 3, RitualComponent.DUSK)); - ellipsoidRitual.add(new RitualComponent(-3, 0, 2, RitualComponent.DUSK)); - - return ellipsoidRitual; - } - - public int getRadiusForModifierBlock(Block block) - { - if (block == null) - { - return 10; - } - - if (block == Blocks.diamond_block) - { - return 30; - } - - if (block == Blocks.gold_block) - { - return 20; - } - - if (block == Blocks.iron_block) - { - return 15; - } - - return 10; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java deleted file mode 100644 index 0ee1c57e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java +++ /dev/null @@ -1,339 +0,0 @@ -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.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.living.EnderTeleportEvent; -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.BindableItems; -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; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (currentEssence < this.getCostPerRefresh()) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - boolean hasVirtus = this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, 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, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, range); - boolean flag = false; - - TileEntity tile = world.getTileEntity(pos.offsetUp()); - IInventory inventoryTile = null; - if (tile instanceof IInventory) - { - inventoryTile = (IInventory) tile; - } - - for (EntityPlayer entityplayer : playerList) - { - if(entityplayer.capabilities.isCreativeMode) - { - continue; - } - String playerString = SpellHelper.getUsername(entityplayer); - if (!playerString.equals(owner)) - { - if (inventoryTile != null) - { - boolean test = false; - for (int i = 0; i < inventoryTile.getSizeInventory(); i++) - { - ItemStack stack = inventoryTile.getStackInSlot(i); - if (stack != null && stack.getItem() instanceof IBindable && BindableItems.getOwnerName(stack).equals(playerString)) - { - test = true; - } - } - - if(test) - { - continue; - } - } - flag = teleportRandomly(entityplayer, teleportDistance) || flag; - } - } - - if (flag) - { - if (hasVirtus) - { - this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, true); - } - - if (hasPotentia) - { - this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, true); - } - - SoulNetworkHandler.syphonFromNetwork(owner, getCostPerRefresh()); - } - } - - 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); - - int teleportDistance = hasVirtus ? 300 : 100; - int range = hasPotentia ? 50 : 25; - List livingList = SpellHelper.getLivingEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, range); - boolean flag = false; - - for (EntityLivingBase livingEntity : livingList) - { - if (livingEntity instanceof EntityPlayer) - { - continue; - } - - flag = teleportRandomly(livingEntity, teleportDistance) || flag; - } - - if (flag) - { - if (hasVirtus) - { - this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, true); - } - - if (hasPotentia) - { - this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, true); - } - - this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tennebraeDrain, true); - - SoulNetworkHandler.syphonFromNetwork(owner, 1000); - } - } - } - - @Override - public int getCostPerRefresh() - { - return 1000; - } - - public boolean teleportRandomly(EntityLivingBase entityLiving, double distance) - { - double x = entityLiving.posX; - double y = entityLiving.posY; - double z = entityLiving.posZ; - Random rand = new Random(); - double d0 = x + (rand.nextDouble() - 0.5D) * distance; - double d1 = y + (rand.nextInt((int) distance) - (distance) / 2); - double d2 = z + (rand.nextDouble() - 0.5D) * distance; - int i = 0; - - while (!teleportTo(entityLiving, d0, d1, d2, x, y, z) && i < 100) - { - d0 = x + (rand.nextDouble() - 0.5D) * distance; - d1 = y + (rand.nextInt((int) distance) - (distance) / 2); - d2 = z + (rand.nextDouble() - 0.5D) * distance; - i++; - } - - if (i >= 100) - { - return false; - } - - return true; - } - - 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)) - { - return false; - } - - SpellTeleport.moveEntityViaTeleport(entityLiving, event.targetX, event.targetY, event.targetZ); - boolean flag = false; - - - int i = MathHelper.floor_double(entityLiving.posX); - int j = MathHelper.floor_double(entityLiving.posY); - int k = MathHelper.floor_double(entityLiving.posZ); - int l; - -// if (entityLiving.worldObj.blockExists(i, j, k)) - { - boolean flag1 = false; - - while (!flag1 && j > 0) - { - BlockPos newPos = new BlockPos(i, j - 1, k); - IBlockState state = entityLiving.worldObj.getBlockState(newPos); - Block block = state.getBlock(); - - if (block != null && block.getMaterial().blocksMovement()) - { - flag1 = true; - } else - { - --entityLiving.posY; - --j; - } - } - - if (flag1) - { - SpellTeleport.moveEntityViaTeleport(entityLiving, entityLiving.posX, entityLiving.posY, entityLiving.posZ); - - if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.getBoundingBox()).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.getBoundingBox())) - { - flag = true; - } - } - } - - if (!flag) - { - SpellTeleport.moveEntityViaTeleport(entityLiving, lastX, lastY, lastZ); - return false; - } else - { - short short1 = 128; - - for (l = 0; l < short1; ++l) - { - double d6 = (double) l / ((double) short1 - 1.0D); - 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 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; - double d8 = lastY + (entityLiving.posY - lastY) * d6 + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height; - double d9 = lastZ + (entityLiving.posZ - lastZ) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; - entityLiving.worldObj.spawnParticle(EnumParticleTypes.PORTAL, d7, d8, d9, (double) f, (double) f1, (double) f2); - } - return true; - } - } - - public void moveEntityViaTeleport(EntityLivingBase entityLiving, double x, double y, double z) - { - if (entityLiving instanceof EntityPlayer) - { - if (entityLiving instanceof EntityPlayerMP) - { - EntityPlayerMP entityplayermp = (EntityPlayerMP) entityLiving; - - if (entityplayermp.worldObj == entityLiving.worldObj) - { - EnderTeleportEvent event = new EnderTeleportEvent(entityplayermp, x, y, z, 5.0F); - - if (!MinecraftForge.EVENT_BUS.post(event)) - { - if (entityLiving.isRiding()) - { - entityLiving.mountEntity(null); - } - entityLiving.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ); - } - } - } - } else if (entityLiving != null) - { - entityLiving.setPosition(x, y, z); - } - } - - @Override - public List getRitualComponentList() - { - ArrayList expulsionRitual = new ArrayList(); - expulsionRitual.add(new RitualComponent(2, 0, 2, RitualComponent.EARTH)); - expulsionRitual.add(new RitualComponent(2, 0, 1, RitualComponent.EARTH)); - expulsionRitual.add(new RitualComponent(1, 0, 2, RitualComponent.EARTH)); - expulsionRitual.add(new RitualComponent(2, 0, -2, RitualComponent.EARTH)); - expulsionRitual.add(new RitualComponent(2, 0, -1, RitualComponent.EARTH)); - expulsionRitual.add(new RitualComponent(-1, 0, 2, RitualComponent.EARTH)); - expulsionRitual.add(new RitualComponent(-2, 0, 2, RitualComponent.EARTH)); - expulsionRitual.add(new RitualComponent(-2, 0, 1, RitualComponent.EARTH)); - expulsionRitual.add(new RitualComponent(1, 0, -2, RitualComponent.EARTH)); - expulsionRitual.add(new RitualComponent(-2, 0, -2, RitualComponent.EARTH)); - expulsionRitual.add(new RitualComponent(-2, 0, -1, RitualComponent.EARTH)); - expulsionRitual.add(new RitualComponent(-1, 0, -2, RitualComponent.EARTH)); - expulsionRitual.add(new RitualComponent(4, 0, 2, RitualComponent.AIR)); - expulsionRitual.add(new RitualComponent(5, 0, 2, RitualComponent.AIR)); - expulsionRitual.add(new RitualComponent(4, 0, -2, RitualComponent.AIR)); - expulsionRitual.add(new RitualComponent(5, 0, -2, RitualComponent.AIR)); - expulsionRitual.add(new RitualComponent(-4, 0, 2, RitualComponent.AIR)); - expulsionRitual.add(new RitualComponent(-5, 0, 2, RitualComponent.AIR)); - expulsionRitual.add(new RitualComponent(-4, 0, -2, RitualComponent.AIR)); - expulsionRitual.add(new RitualComponent(-5, 0, -2, RitualComponent.AIR)); - expulsionRitual.add(new RitualComponent(2, 0, 4, RitualComponent.AIR)); - expulsionRitual.add(new RitualComponent(2, 0, 5, RitualComponent.AIR)); - expulsionRitual.add(new RitualComponent(-2, 0, 4, RitualComponent.AIR)); - expulsionRitual.add(new RitualComponent(-2, 0, 5, RitualComponent.AIR)); - expulsionRitual.add(new RitualComponent(2, 0, -4, RitualComponent.AIR)); - expulsionRitual.add(new RitualComponent(2, 0, -5, RitualComponent.AIR)); - expulsionRitual.add(new RitualComponent(-2, 0, -4, RitualComponent.AIR)); - expulsionRitual.add(new RitualComponent(-2, 0, -5, RitualComponent.AIR)); - expulsionRitual.add(new RitualComponent(0, 0, 6, RitualComponent.EARTH)); - expulsionRitual.add(new RitualComponent(0, 0, -6, RitualComponent.EARTH)); - expulsionRitual.add(new RitualComponent(6, 0, 0, RitualComponent.EARTH)); - expulsionRitual.add(new RitualComponent(-6, 0, 0, RitualComponent.EARTH)); - expulsionRitual.add(new RitualComponent(-5, 0, 0, RitualComponent.DUSK)); - expulsionRitual.add(new RitualComponent(-6, 0, 1, RitualComponent.DUSK)); - expulsionRitual.add(new RitualComponent(-6, 0, -1, RitualComponent.DUSK)); - expulsionRitual.add(new RitualComponent(5, 0, 0, RitualComponent.DUSK)); - expulsionRitual.add(new RitualComponent(6, 0, 1, RitualComponent.DUSK)); - expulsionRitual.add(new RitualComponent(6, 0, -1, RitualComponent.DUSK)); - expulsionRitual.add(new RitualComponent(0, 0, 5, RitualComponent.DUSK)); - expulsionRitual.add(new RitualComponent(1, 0, 6, RitualComponent.DUSK)); - expulsionRitual.add(new RitualComponent(-1, 0, 6, RitualComponent.DUSK)); - expulsionRitual.add(new RitualComponent(0, 0, -5, RitualComponent.DUSK)); - expulsionRitual.add(new RitualComponent(1, 0, -6, RitualComponent.DUSK)); - expulsionRitual.add(new RitualComponent(-1, 0, -6, RitualComponent.DUSK)); - expulsionRitual.add(new RitualComponent(4, 0, 4, RitualComponent.FIRE)); - expulsionRitual.add(new RitualComponent(4, 0, -4, RitualComponent.FIRE)); - expulsionRitual.add(new RitualComponent(-4, 0, 4, RitualComponent.FIRE)); - expulsionRitual.add(new RitualComponent(-4, 0, -4, RitualComponent.FIRE)); - return expulsionRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java deleted file mode 100644 index 6b8faa20..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java +++ /dev/null @@ -1,171 +0,0 @@ -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.util.BlockPos; -import net.minecraft.world.World; -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 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; - - public static final int costCooldown = 10; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (ritualStone.getCooldown() > 0) - { - int x = pos.getX(); - int y = pos.getY(); - int z = pos.getZ(); - - world.addWeatherEffect(new EntityLightningBolt(world, x + 4, y + 5, z + 4)); - world.addWeatherEffect(new EntityLightningBolt(world, x + 4, y + 5, z - 4)); - world.addWeatherEffect(new EntityLightningBolt(world, x - 4, y + 5, z - 4)); - world.addWeatherEffect(new EntityLightningBolt(world, x - 4, y + 5, z + 4)); - ritualStone.setCooldown(0); - } - - boolean hasTerrae = this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, 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); - int verticalRange = hasAether ? 60 : 30; - List entities = world.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(pos, pos.add(1, 1, 1)).expand(range, verticalRange, range)); - int entityCount = 0; - boolean flag = false; - - entityCount += entities.size(); - - if (currentEssence < this.getCostPerRefresh() * entityCount) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - for (EntityLivingBase entity : entities) - { - entity.fallDistance = 0; - flag = true; - } - - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * entityCount); - - if (flag && world.getWorldTime() % costCooldown == 0) - { - if (hasTerrae) - { - this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true); - } - if (hasOrbisTerrae) - { - this.canDrainReagent(ritualStone, ReagentRegistry.orbisTerraeReagent, orbisTerraeDrain, true); - } - if (hasAether) - { - this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true); - } - } - } - } - - @Override - public int getCostPerRefresh() - { - return 0; - } - - @Override - public int getInitialCooldown() - { - return 1; - } - - @Override - public List getRitualComponentList() - { - ArrayList featheredEarthRitual = new ArrayList(); - featheredEarthRitual.add(new RitualComponent(1, 0, 0, RitualComponent.DUSK)); - featheredEarthRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.DUSK)); - featheredEarthRitual.add(new RitualComponent(0, 0, 1, RitualComponent.DUSK)); - featheredEarthRitual.add(new RitualComponent(0, 0, -1, RitualComponent.DUSK)); - featheredEarthRitual.add(new RitualComponent(2, 0, 2, RitualComponent.AIR)); - featheredEarthRitual.add(new RitualComponent(-2, 0, 2, RitualComponent.AIR)); - featheredEarthRitual.add(new RitualComponent(-2, 0, -2, RitualComponent.AIR)); - featheredEarthRitual.add(new RitualComponent(2, 0, -2, RitualComponent.AIR)); - featheredEarthRitual.add(new RitualComponent(1, 0, 3, RitualComponent.EARTH)); - featheredEarthRitual.add(new RitualComponent(0, 0, 3, RitualComponent.EARTH)); - featheredEarthRitual.add(new RitualComponent(-1, 0, 3, RitualComponent.EARTH)); - featheredEarthRitual.add(new RitualComponent(1, 0, -3, RitualComponent.EARTH)); - featheredEarthRitual.add(new RitualComponent(0, 0, -3, RitualComponent.EARTH)); - featheredEarthRitual.add(new RitualComponent(-1, 0, -3, RitualComponent.EARTH)); - featheredEarthRitual.add(new RitualComponent(3, 0, 1, RitualComponent.EARTH)); - featheredEarthRitual.add(new RitualComponent(3, 0, 0, RitualComponent.EARTH)); - featheredEarthRitual.add(new RitualComponent(3, 0, -1, RitualComponent.EARTH)); - featheredEarthRitual.add(new RitualComponent(-3, 0, 1, RitualComponent.EARTH)); - featheredEarthRitual.add(new RitualComponent(-3, 0, 0, RitualComponent.EARTH)); - featheredEarthRitual.add(new RitualComponent(-3, 0, -1, RitualComponent.EARTH)); - featheredEarthRitual.add(new RitualComponent(4, 4, 4, RitualComponent.FIRE)); - featheredEarthRitual.add(new RitualComponent(-4, 4, 4, RitualComponent.FIRE)); - featheredEarthRitual.add(new RitualComponent(-4, 4, -4, RitualComponent.FIRE)); - featheredEarthRitual.add(new RitualComponent(4, 4, -4, RitualComponent.FIRE)); - featheredEarthRitual.add(new RitualComponent(4, 5, 5, RitualComponent.AIR)); - featheredEarthRitual.add(new RitualComponent(4, 5, 3, RitualComponent.AIR)); - featheredEarthRitual.add(new RitualComponent(5, 5, 4, RitualComponent.AIR)); - featheredEarthRitual.add(new RitualComponent(3, 5, 4, RitualComponent.AIR)); - featheredEarthRitual.add(new RitualComponent(-4, 5, 5, RitualComponent.AIR)); - featheredEarthRitual.add(new RitualComponent(-4, 5, 3, RitualComponent.AIR)); - featheredEarthRitual.add(new RitualComponent(-5, 5, 4, RitualComponent.AIR)); - featheredEarthRitual.add(new RitualComponent(-3, 5, 4, RitualComponent.AIR)); - featheredEarthRitual.add(new RitualComponent(4, 5, -5, RitualComponent.AIR)); - featheredEarthRitual.add(new RitualComponent(4, 5, -3, RitualComponent.AIR)); - featheredEarthRitual.add(new RitualComponent(5, 5, -4, RitualComponent.AIR)); - featheredEarthRitual.add(new RitualComponent(3, 5, -4, RitualComponent.AIR)); - featheredEarthRitual.add(new RitualComponent(-4, 5, -5, RitualComponent.AIR)); - featheredEarthRitual.add(new RitualComponent(-4, 5, -3, RitualComponent.AIR)); - featheredEarthRitual.add(new RitualComponent(-5, 5, -4, RitualComponent.AIR)); - featheredEarthRitual.add(new RitualComponent(-3, 5, -4, RitualComponent.AIR)); - return featheredEarthRitual; - } - - public int getHorizontalRangeForReagent(boolean hasTerrae, boolean hasOrbisTerrae) - { - if (hasOrbisTerrae) - { - if (hasTerrae) - { - return 64; - } else - { - return 45; - } - } else - { - if (hasTerrae) - { - return 30; - } else - { - return 20; - } - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java deleted file mode 100644 index 39c0e4e7..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java +++ /dev/null @@ -1,181 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -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 WayofTime.alchemicalWizardry.api.tile.IBloodAltar; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; - -public class RitualEffectFeatheredKnife extends RitualEffect -{ - public final int amount = 100; - - public static final int sanctusDrain = 5; - public static final int reductusDrain = 3; - public static final int magicalesDrain = 2; - public static final int potentiaDrain = 5; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); - - int timeDelay = hasPotentia ? 10 : 20; - - if (world.getWorldTime() % timeDelay != 0) - { - return; - } - - IBloodAltar tileAltar = null; - boolean testFlag = false; - - for (int i = -5; i <= 5; i++) - { - for (int j = -5; j <= 5; j++) - { - for (int k = -10; k <= 10; k++) - { - BlockPos newPos = pos.add(i, k, j); - if (world.getTileEntity(newPos) instanceof IBloodAltar) - { - tileAltar = (IBloodAltar) world.getTileEntity(newPos); - testFlag = true; - } - } - } - } - - if (!testFlag) - { - return; - } - - boolean hasReductus = this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); - - double range = hasReductus ? 8 : 15; - double vertRange = hasReductus ? 8 : 20; - List list = SpellHelper.getPlayersInRange(world, pos.getX(), pos.getY(), pos.getZ(), range, vertRange); - - int entityCount = 0; - - if (currentEssence < this.getCostPerRefresh() * list.size()) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - boolean hasMagicales = this.canDrainReagent(ritualStone, ReagentRegistry.magicalesReagent, magicalesDrain, false); - boolean hasSanctus = this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false); - - EntityPlayer ownerPlayer = SpellHelper.getPlayerForUsername(owner); - for (EntityPlayer player : list) - { - hasSanctus = hasSanctus && this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false); - double threshold = hasSanctus ? 0.7d : 0.3d; - - if ((hasMagicales && player == ownerPlayer) || !hasMagicales) - { - if (!SpellHelper.isFakePlayer(world, player)) - { - if (player.getHealth() / player.getMaxHealth() > threshold) - { - player.setHealth(player.getHealth() - 1); - entityCount++; - tileAltar.sacrificialDaggerCall(this.amount, false); - if (hasSanctus) - { - this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true); - } - if (hasMagicales) - { - this.canDrainReagent(ritualStone, ReagentRegistry.magicalesReagent, magicalesDrain, true); - break; - } - } - } - } - } - - if (entityCount > 0) - { - if (hasReductus) - { - this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true); - } - if (hasPotentia) - { - this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, true); - } - - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * entityCount); - } - } - } - - @Override - public int getCostPerRefresh() - { - return 20; - } - - @Override - public List getRitualComponentList() - { - ArrayList featheredKnifeRitual = new ArrayList(); - featheredKnifeRitual.add(new RitualComponent(1, 0, 0, RitualComponent.DUSK)); - featheredKnifeRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.DUSK)); - featheredKnifeRitual.add(new RitualComponent(0, 0, 1, RitualComponent.DUSK)); - featheredKnifeRitual.add(new RitualComponent(0, 0, -1, RitualComponent.DUSK)); - featheredKnifeRitual.add(new RitualComponent(2, -1, 0, RitualComponent.WATER)); - featheredKnifeRitual.add(new RitualComponent(-2, -1, 0, RitualComponent.WATER)); - featheredKnifeRitual.add(new RitualComponent(0, -1, 2, RitualComponent.WATER)); - featheredKnifeRitual.add(new RitualComponent(0, -1, -2, RitualComponent.WATER)); - featheredKnifeRitual.add(new RitualComponent(1, -1, 1, RitualComponent.AIR)); - featheredKnifeRitual.add(new RitualComponent(1, -1, -1, RitualComponent.AIR)); - featheredKnifeRitual.add(new RitualComponent(-1, -1, 1, RitualComponent.AIR)); - featheredKnifeRitual.add(new RitualComponent(-1, -1, -1, RitualComponent.AIR)); - featheredKnifeRitual.add(new RitualComponent(4, -1, 2, RitualComponent.FIRE)); - featheredKnifeRitual.add(new RitualComponent(2, -1, 4, RitualComponent.FIRE)); - featheredKnifeRitual.add(new RitualComponent(-4, -1, 2, RitualComponent.FIRE)); - featheredKnifeRitual.add(new RitualComponent(2, -1, -4, RitualComponent.FIRE)); - featheredKnifeRitual.add(new RitualComponent(4, -1, -2, RitualComponent.FIRE)); - featheredKnifeRitual.add(new RitualComponent(-2, -1, 4, RitualComponent.FIRE)); - featheredKnifeRitual.add(new RitualComponent(-4, -1, -2, RitualComponent.FIRE)); - featheredKnifeRitual.add(new RitualComponent(-2, -1, -4, RitualComponent.FIRE)); - featheredKnifeRitual.add(new RitualComponent(4, 0, 2, RitualComponent.EARTH)); - featheredKnifeRitual.add(new RitualComponent(2, 0, 4, RitualComponent.EARTH)); - featheredKnifeRitual.add(new RitualComponent(-4, 0, 2, RitualComponent.EARTH)); - featheredKnifeRitual.add(new RitualComponent(2, 0, -4, RitualComponent.EARTH)); - featheredKnifeRitual.add(new RitualComponent(4, 0, -2, RitualComponent.EARTH)); - featheredKnifeRitual.add(new RitualComponent(-2, 0, 4, RitualComponent.EARTH)); - featheredKnifeRitual.add(new RitualComponent(-4, 0, -2, RitualComponent.EARTH)); - featheredKnifeRitual.add(new RitualComponent(-2, 0, -4, RitualComponent.EARTH)); - featheredKnifeRitual.add(new RitualComponent(4, 0, 3, RitualComponent.EARTH)); - featheredKnifeRitual.add(new RitualComponent(3, 0, 4, RitualComponent.EARTH)); - featheredKnifeRitual.add(new RitualComponent(-4, 0, 3, RitualComponent.EARTH)); - featheredKnifeRitual.add(new RitualComponent(3, 0, -4, RitualComponent.EARTH)); - featheredKnifeRitual.add(new RitualComponent(4, 0, -3, RitualComponent.EARTH)); - featheredKnifeRitual.add(new RitualComponent(-3, 0, 4, RitualComponent.EARTH)); - featheredKnifeRitual.add(new RitualComponent(-4, 0, -3, RitualComponent.EARTH)); - featheredKnifeRitual.add(new RitualComponent(-3, 0, -4, RitualComponent.EARTH)); - featheredKnifeRitual.add(new RitualComponent(3, 0, 3, RitualComponent.AIR)); - featheredKnifeRitual.add(new RitualComponent(3, 0, -3, RitualComponent.AIR)); - featheredKnifeRitual.add(new RitualComponent(-3, 0, 3, RitualComponent.AIR)); - featheredKnifeRitual.add(new RitualComponent(-3, 0, -3, RitualComponent.AIR)); - return featheredKnifeRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java deleted file mode 100644 index 177d7a7e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java +++ /dev/null @@ -1,182 +0,0 @@ -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.spell.complex.effect.SpellHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; - -public class RitualEffectFlight extends RitualEffect -{ - public static final int aetherDrain = 10; - public static final int reductusDrain = 5; - public static final int reagentCooldown = 50; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - int range = 20; - int verticalRange = 70; - AxisAlignedBB axis = new AxisAlignedBB(pos, pos.add(1, 1, 1)).expand(range, verticalRange, range); -// axis.maxY = 256; -// axis.minY = 0; - List entities = world.getEntitiesWithinAABB(EntityPlayer.class, axis); - int entityCount = 0; - - boolean hasAether = this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false); - boolean hasReductus = this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); - - for (EntityPlayer entity : entities) - { - entityCount++; - } - - if (currentEssence < this.getCostPerRefresh() * entityCount) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - entityCount = 0; - EntityPlayer ownerEntity = SpellHelper.getPlayerForUsername(owner); - for (EntityPlayer entity : entities) - { - if (hasReductus && entity != ownerEntity) - { - continue; - } - entity.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFlight.id, hasAether ? 30 * 20 : 20, 0)); - entityCount++; - } - - if (entityCount > 0 && world.getWorldTime() % reagentCooldown == 0) - { - if (hasAether) - { - this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true); - } - if (hasReductus) - { - this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true); - } - } - - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * entityCount); - } - } - - @Override - public int getCostPerRefresh() - { - return 0; - } - - @Override - public int getInitialCooldown() - { - return 1; - } - - @Override - public List getRitualComponentList() - { - ArrayList flightRitual = new ArrayList(); - flightRitual.add(new RitualComponent(1, 0, 0, RitualComponent.DUSK)); - flightRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.DUSK)); - flightRitual.add(new RitualComponent(0, 0, 1, RitualComponent.DUSK)); - flightRitual.add(new RitualComponent(0, 0, -1, RitualComponent.DUSK)); - flightRitual.add(new RitualComponent(2, 0, 2, RitualComponent.AIR)); - flightRitual.add(new RitualComponent(-2, 0, 2, RitualComponent.AIR)); - flightRitual.add(new RitualComponent(-2, 0, -2, RitualComponent.AIR)); - flightRitual.add(new RitualComponent(2, 0, -2, RitualComponent.AIR)); - flightRitual.add(new RitualComponent(1, 0, 3, RitualComponent.EARTH)); - flightRitual.add(new RitualComponent(0, 0, 3, RitualComponent.EARTH)); - flightRitual.add(new RitualComponent(-1, 0, 3, RitualComponent.EARTH)); - flightRitual.add(new RitualComponent(1, 0, -3, RitualComponent.EARTH)); - flightRitual.add(new RitualComponent(0, 0, -3, RitualComponent.EARTH)); - flightRitual.add(new RitualComponent(-1, 0, -3, RitualComponent.EARTH)); - flightRitual.add(new RitualComponent(3, 0, 1, RitualComponent.EARTH)); - flightRitual.add(new RitualComponent(3, 0, 0, RitualComponent.EARTH)); - flightRitual.add(new RitualComponent(3, 0, -1, RitualComponent.EARTH)); - flightRitual.add(new RitualComponent(-3, 0, 1, RitualComponent.EARTH)); - flightRitual.add(new RitualComponent(-3, 0, 0, RitualComponent.EARTH)); - flightRitual.add(new RitualComponent(-3, 0, -1, RitualComponent.EARTH)); - flightRitual.add(new RitualComponent(-3, 0, -4, RitualComponent.WATER)); - flightRitual.add(new RitualComponent(-4, 0, -3, RitualComponent.WATER)); - flightRitual.add(new RitualComponent(-3, 0, 4, RitualComponent.WATER)); - flightRitual.add(new RitualComponent(4, 0, -3, RitualComponent.WATER)); - flightRitual.add(new RitualComponent(3, 0, -4, RitualComponent.WATER)); - flightRitual.add(new RitualComponent(-4, 0, 3, RitualComponent.WATER)); - flightRitual.add(new RitualComponent(3, 0, 4, RitualComponent.WATER)); - flightRitual.add(new RitualComponent(4, 0, 3, RitualComponent.WATER)); - flightRitual.add(new RitualComponent(-1, 1, 0, RitualComponent.FIRE)); - flightRitual.add(new RitualComponent(1, 1, 0, RitualComponent.FIRE)); - flightRitual.add(new RitualComponent(0, 1, -1, RitualComponent.FIRE)); - flightRitual.add(new RitualComponent(0, 1, 1, RitualComponent.FIRE)); - flightRitual.add(new RitualComponent(-2, 1, 0, RitualComponent.BLANK)); - flightRitual.add(new RitualComponent(2, 1, 0, RitualComponent.BLANK)); - flightRitual.add(new RitualComponent(0, 1, -2, RitualComponent.BLANK)); - flightRitual.add(new RitualComponent(0, 1, 2, RitualComponent.BLANK)); - flightRitual.add(new RitualComponent(-4, 1, 0, RitualComponent.BLANK)); - flightRitual.add(new RitualComponent(4, 1, 0, RitualComponent.BLANK)); - flightRitual.add(new RitualComponent(0, 1, -4, RitualComponent.BLANK)); - flightRitual.add(new RitualComponent(0, 1, 4, RitualComponent.BLANK)); - flightRitual.add(new RitualComponent(-5, 1, 0, RitualComponent.AIR)); - flightRitual.add(new RitualComponent(5, 1, 0, RitualComponent.AIR)); - flightRitual.add(new RitualComponent(0, 1, -5, RitualComponent.AIR)); - flightRitual.add(new RitualComponent(0, 1, 5, RitualComponent.AIR)); - flightRitual.add(new RitualComponent(5, 0, 0, RitualComponent.DUSK)); - flightRitual.add(new RitualComponent(-5, 0, 0, RitualComponent.DUSK)); - flightRitual.add(new RitualComponent(0, 0, 5, RitualComponent.DUSK)); - flightRitual.add(new RitualComponent(0, 0, -5, RitualComponent.DUSK)); - - for (int i = 2; i <= 4; i++) - { - flightRitual.add(new RitualComponent(-i, 2, 0, RitualComponent.EARTH)); - flightRitual.add(new RitualComponent(i, 2, 0, RitualComponent.EARTH)); - flightRitual.add(new RitualComponent(0, 2, -i, RitualComponent.EARTH)); - flightRitual.add(new RitualComponent(0, 2, i, RitualComponent.EARTH)); - } - - flightRitual.add(new RitualComponent(2, 4, 1, RitualComponent.FIRE)); - flightRitual.add(new RitualComponent(1, 4, 2, RitualComponent.FIRE)); - flightRitual.add(new RitualComponent(-2, 4, 1, RitualComponent.FIRE)); - flightRitual.add(new RitualComponent(1, 4, -2, RitualComponent.FIRE)); - flightRitual.add(new RitualComponent(2, 4, -1, RitualComponent.FIRE)); - flightRitual.add(new RitualComponent(-1, 4, 2, RitualComponent.FIRE)); - flightRitual.add(new RitualComponent(-2, 4, -1, RitualComponent.FIRE)); - flightRitual.add(new RitualComponent(-1, 4, -2, RitualComponent.FIRE)); - flightRitual.add(new RitualComponent(2, 4, 2, RitualComponent.AIR)); - flightRitual.add(new RitualComponent(-2, 4, 2, RitualComponent.AIR)); - flightRitual.add(new RitualComponent(2, 4, -2, RitualComponent.AIR)); - flightRitual.add(new RitualComponent(-2, 4, -2, RitualComponent.AIR)); - flightRitual.add(new RitualComponent(-4, 2, -4, RitualComponent.FIRE)); - flightRitual.add(new RitualComponent(4, 2, 4, RitualComponent.FIRE)); - flightRitual.add(new RitualComponent(4, 2, -4, RitualComponent.FIRE)); - flightRitual.add(new RitualComponent(-4, 2, 4, RitualComponent.FIRE)); - - for (int i = -1; i <= 1; i++) - { - flightRitual.add(new RitualComponent(3, 4, i, RitualComponent.EARTH)); - flightRitual.add(new RitualComponent(-3, 4, i, RitualComponent.EARTH)); - flightRitual.add(new RitualComponent(i, 4, 3, RitualComponent.EARTH)); - flightRitual.add(new RitualComponent(i, 4, -3, RitualComponent.EARTH)); - } - return flightRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java deleted file mode 100644 index 2d967606..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java +++ /dev/null @@ -1,151 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.FoodStats; -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.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -public class RitualEffectFullStomach extends RitualEffect -{ - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (world.getWorldTime() % 20 != 0) - { - return; - } - - double horizRange = 16; - double vertRange = 16; - - List playerList = SpellHelper.getPlayersInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, horizRange, vertRange); - - if (playerList == null) - { - return; - } - - if (currentEssence < this.getCostPerRefresh() * playerList.size()) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - TileEntity tile = world.getTileEntity(pos.offsetUp()); - IInventory inventory = null; - if (tile instanceof IInventory) - { - inventory = (IInventory) tile; - } else - { - tile = world.getTileEntity(pos.offsetDown()); - if (tile instanceof IInventory) - { - inventory = (IInventory) tile; - } - } - - int count = 0; - - if (inventory != null) - { - for (EntityPlayer player : playerList) - { - FoodStats foodStats = player.getFoodStats(); - float satLevel = foodStats.getSaturationLevel(); - - for (int i = 0; i < inventory.getSizeInventory(); i++) - { - ItemStack stack = inventory.getStackInSlot(i); - - if (stack != null && stack.getItem() instanceof ItemFood) - { - ItemFood foodItem = (ItemFood) stack.getItem(); - - int regularHeal = foodItem.getHealAmount(stack); - float saturatedHeal = foodItem.getSaturationModifier(stack) * regularHeal * 2.0f; - - if (saturatedHeal + satLevel <= 20) - { - NBTTagCompound nbt = new NBTTagCompound(); - foodStats.writeNBT(nbt); - nbt.setFloat("foodSaturationLevel", saturatedHeal + satLevel); - foodStats.readNBT(nbt); - - inventory.decrStackSize(i, 1); - count++; - break; - } - } - } - } - } - - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * count); - } - } - - @Override - public int getCostPerRefresh() - { - return 100; - } - - @Override - public List getRitualComponentList() - { - ArrayList fullRitual = new ArrayList(); - fullRitual.add(new RitualComponent(0, 0, 3, RitualComponent.FIRE)); - fullRitual.add(new RitualComponent(0, 0, -3, RitualComponent.FIRE)); - fullRitual.add(new RitualComponent(3, 0, 0, RitualComponent.FIRE)); - fullRitual.add(new RitualComponent(-3, 0, 0, RitualComponent.FIRE)); - fullRitual.add(new RitualComponent(1, 0, 1, RitualComponent.AIR)); - fullRitual.add(new RitualComponent(1, 0, -1, RitualComponent.AIR)); - fullRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.AIR)); - fullRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.AIR)); - - fullRitual.add(new RitualComponent(2, 0, 1, RitualComponent.AIR)); - fullRitual.add(new RitualComponent(2, 0, -1, RitualComponent.AIR)); - fullRitual.add(new RitualComponent(-2, 0, -1, RitualComponent.AIR)); - fullRitual.add(new RitualComponent(-2, 0, 1, RitualComponent.AIR)); - fullRitual.add(new RitualComponent(1, 0, 2, RitualComponent.AIR)); - fullRitual.add(new RitualComponent(1, 0, -2, RitualComponent.AIR)); - fullRitual.add(new RitualComponent(-1, 0, -2, RitualComponent.AIR)); - fullRitual.add(new RitualComponent(-1, 0, 2, RitualComponent.AIR)); - - fullRitual.add(new RitualComponent(4, 0, 4, RitualComponent.WATER)); - fullRitual.add(new RitualComponent(4, 0, -4, RitualComponent.WATER)); - fullRitual.add(new RitualComponent(-4, 0, -4, RitualComponent.WATER)); - fullRitual.add(new RitualComponent(-4, 0, 4, RitualComponent.WATER)); - - fullRitual.add(new RitualComponent(4, 0, 3, RitualComponent.EARTH)); - fullRitual.add(new RitualComponent(3, 0, 4, RitualComponent.EARTH)); - fullRitual.add(new RitualComponent(-4, 0, 3, RitualComponent.EARTH)); - fullRitual.add(new RitualComponent(3, 0, -4, RitualComponent.EARTH)); - fullRitual.add(new RitualComponent(-4, 0, -3, RitualComponent.EARTH)); - fullRitual.add(new RitualComponent(-3, 0, -4, RitualComponent.EARTH)); - fullRitual.add(new RitualComponent(4, 0, -3, RitualComponent.EARTH)); - fullRitual.add(new RitualComponent(-3, 0, 4, RitualComponent.EARTH)); - - return fullRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java deleted file mode 100644 index 3ec289cd..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java +++ /dev/null @@ -1,148 +0,0 @@ -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.block.state.IBlockState; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.IPlantable; -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 RitualEffectGrowth extends RitualEffect -{ - private static final int aquasalusDrain = 10; - private static final int terraeDrain = 20; - private static final int orbisTerraeDrain = 20; - private static final int virtusDrain = 10; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (currentEssence < this.getCostPerRefresh() * 9) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - boolean hasTerrae = this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, 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); - if (world.getWorldTime() % speed != 0) - { - return; - } - - if (this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, false)) - { - int hydrationRange = hasVirtus ? 4 : 1; - for (int i = -hydrationRange; i <= hydrationRange; i++) - { - for (int j = -hydrationRange; j <= hydrationRange; j++) - { - if (this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, false)) - { - BlockPos newPos = pos.add(i, 1, j); - if (SpellHelper.hydrateSoil(world, newPos)) - { - this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, true); - } - } - } - } - } - - int flag = 0; - - int range = hasVirtus ? 4 : 1; - for (int i = -range; i <= range; i++) - { - for (int j = -range; j <= range; j++) - { - BlockPos newPos = pos.add(i, 2, j); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - - if (block instanceof IPlantable || block instanceof IGrowable) - { - { - SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, world.provider.getDimensionId(), 3, pos); - block.updateTick(world, newPos, state, world.rand); - flag++; - } - } - } - } - - if (flag > 0) - { - if (hasTerrae) - this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true); - if (hasOrbisTerrae) - this.canDrainReagent(ritualStone, ReagentRegistry.orbisTerraeReagent, orbisTerraeDrain, true); - if (hasVirtus) - this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, true); - - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * flag); - } - } - } - - @Override - public int getCostPerRefresh() - { - return 20; - } - - @Override - public List getRitualComponentList() - { - ArrayList growthRitual = new ArrayList(); - growthRitual.add(new RitualComponent(1, 0, 0, 1)); - growthRitual.add(new RitualComponent(-1, 0, 0, 1)); - growthRitual.add(new RitualComponent(0, 0, 1, 1)); - growthRitual.add(new RitualComponent(0, 0, -1, 1)); - growthRitual.add(new RitualComponent(-1, 0, 1, 3)); - growthRitual.add(new RitualComponent(1, 0, 1, 3)); - growthRitual.add(new RitualComponent(-1, 0, -1, 3)); - growthRitual.add(new RitualComponent(1, 0, -1, 3)); - return growthRitual; - } - - public int getSpeedForReagents(boolean hasTerrae, boolean hasOrbisTerrae) - { - if (hasOrbisTerrae) - { - if (hasTerrae) - { - return 10; - } else - { - return 15; - } - } else - { - if (hasTerrae) - { - return 20; - } else - { - return 30; - } - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java deleted file mode 100644 index 55307e88..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java +++ /dev/null @@ -1,142 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; -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 RitualEffectHarvest extends RitualEffect -{ - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - int maxCount = 100; - - if (currentEssence < this.getCostPerRefresh() * maxCount) - { - EntityPlayer entityOwner = SpellHelper.getPlayerForUsername(owner); - - if (entityOwner == null) - { - return; - } - - entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } else - { - if (world.getWorldTime() % 5 != 0) - { - return; - } - - IBlockState state = world.getBlockState(pos.offsetDown()); - Block block = state.getBlock(); - int flag = 0; - int range = this.getRadiusForModifierBlock(block); - int vertRange = 4; - - for (int i = -range; i <= range; i++) - { - for (int j = -vertRange; j <= vertRange; j++) - { - for (int k = -range; k <= range; k++) - { - if (HarvestRegistry.harvestBlock(world, pos.add(i, j, k)) && flag < maxCount) - { - flag++; - } - } - } - } - - if (flag > 0) - { - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * Math.min(maxCount, flag)); - } - } - } - - @Override - public int getCostPerRefresh() - { - return 20; - } - - public int getRadiusForModifierBlock(Block block) - { - if (block == null) - { - return 4; - } - - if (block == Blocks.diamond_block) - { - return 15; - } - - if (block == Blocks.gold_block) - { - return 10; - } - - if (block == Blocks.iron_block) - { - return 6; - } - - return 4; - } - - @Override - public List getRitualComponentList() - { - ArrayList harvestRitual = new ArrayList(); - - harvestRitual.add(new RitualComponent(1, 0, 1, RitualComponent.DUSK)); - harvestRitual.add(new RitualComponent(1, 0, -1, RitualComponent.DUSK)); - harvestRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.DUSK)); - harvestRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.DUSK)); - harvestRitual.add(new RitualComponent(2, 0, 0, RitualComponent.EARTH)); - harvestRitual.add(new RitualComponent(-2, 0, 0, RitualComponent.EARTH)); - harvestRitual.add(new RitualComponent(0, 0, 2, RitualComponent.EARTH)); - harvestRitual.add(new RitualComponent(0, 0, -2, RitualComponent.EARTH)); - harvestRitual.add(new RitualComponent(3, 0, 1, RitualComponent.EARTH)); - harvestRitual.add(new RitualComponent(3, 0, -1, RitualComponent.EARTH)); - harvestRitual.add(new RitualComponent(-3, 0, 1, RitualComponent.EARTH)); - harvestRitual.add(new RitualComponent(-3, 0, -1, RitualComponent.EARTH)); - harvestRitual.add(new RitualComponent(1, 0, 3, RitualComponent.EARTH)); - harvestRitual.add(new RitualComponent(-1, 0, 3, RitualComponent.EARTH)); - harvestRitual.add(new RitualComponent(1, 0, -3, RitualComponent.EARTH)); - harvestRitual.add(new RitualComponent(-1, 0, -3, RitualComponent.EARTH)); - harvestRitual.add(new RitualComponent(2, 0, 3, RitualComponent.WATER)); - harvestRitual.add(new RitualComponent(3, 0, 2, RitualComponent.WATER)); - harvestRitual.add(new RitualComponent(2, 0, -3, RitualComponent.WATER)); - harvestRitual.add(new RitualComponent(-3, 0, 2, RitualComponent.WATER)); - harvestRitual.add(new RitualComponent(-2, 0, 3, RitualComponent.WATER)); - harvestRitual.add(new RitualComponent(3, 0, -2, RitualComponent.WATER)); - harvestRitual.add(new RitualComponent(-2, 0, -3, RitualComponent.WATER)); - harvestRitual.add(new RitualComponent(-3, 0, -2, RitualComponent.WATER)); - - - return harvestRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java deleted file mode 100644 index 8a39075a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java +++ /dev/null @@ -1,178 +0,0 @@ -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.util.BlockPos; -import net.minecraft.world.World; -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 RitualEffectHealing extends RitualEffect -{ - public static final int reductusDrain = 10; - public static final int virtusDrain = 10; - public static final int praesidiumDrain = 2; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - int timeDelay = 50; - - if (world.getWorldTime() % timeDelay != 0) - { - return; - } - - 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, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, vertRange); - int entityCount = 0; - - for (EntityLivingBase livingEntity : list) - { - if (livingEntity instanceof EntityPlayer) - { - entityCount += 10; - } else - { - entityCount++; - } - } - - boolean hasVirtus = this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false); - - int cost = this.getCostPerRefresh() * (hasVirtus ? 3 : 1); - int potency = hasVirtus ? 1 : 0; - - if (currentEssence < cost * entityCount) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - entityCount = 0; - - boolean hasReductus = this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); - - for (EntityLivingBase livingEntity : list) - { - hasReductus = hasReductus && this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); - if (hasReductus && !(livingEntity instanceof EntityPlayer)) - { - continue; - } - - if (livingEntity.getHealth() + 0.1f < livingEntity.getMaxHealth()) - { - PotionEffect effect = livingEntity.getActivePotionEffect(Potion.regeneration); - if (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); - } - if (hasVirtus) - { - this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, true); - } - - if (livingEntity instanceof EntityPlayer) - { - entityCount += 10; - } else - { - entityCount++; - } - } - } - } - } - - if (entityCount > 0) - { - if (hasPraesidium) - { - this.canDrainReagent(ritualStone, ReagentRegistry.praesidiumReagent, praesidiumDrain, true); - } - SoulNetworkHandler.syphonFromNetwork(owner, cost * entityCount); - } - } - } - - @Override - public int getCostPerRefresh() - { - return 20; - } - - @Override - public List getRitualComponentList() - { - ArrayList healingRitual = new ArrayList(); - healingRitual.add(new RitualComponent(4, 0, 0, RitualComponent.AIR)); - healingRitual.add(new RitualComponent(5, 0, -1, RitualComponent.AIR)); - healingRitual.add(new RitualComponent(5, 0, 1, RitualComponent.AIR)); - healingRitual.add(new RitualComponent(-4, 0, 0, RitualComponent.AIR)); - healingRitual.add(new RitualComponent(-5, 0, -1, RitualComponent.AIR)); - healingRitual.add(new RitualComponent(-5, 0, 1, RitualComponent.AIR)); - healingRitual.add(new RitualComponent(0, 0, 4, RitualComponent.FIRE)); - healingRitual.add(new RitualComponent(-1, 0, 5, RitualComponent.FIRE)); - healingRitual.add(new RitualComponent(1, 0, 5, RitualComponent.FIRE)); - healingRitual.add(new RitualComponent(0, 0, -4, RitualComponent.FIRE)); - healingRitual.add(new RitualComponent(-1, 0, -5, RitualComponent.FIRE)); - healingRitual.add(new RitualComponent(1, 0, -5, RitualComponent.FIRE)); - healingRitual.add(new RitualComponent(3, 0, 5, RitualComponent.WATER)); - healingRitual.add(new RitualComponent(5, 0, 3, RitualComponent.WATER)); - healingRitual.add(new RitualComponent(3, 0, -5, RitualComponent.WATER)); - healingRitual.add(new RitualComponent(5, 0, -3, RitualComponent.WATER)); - healingRitual.add(new RitualComponent(-3, 0, 5, RitualComponent.WATER)); - healingRitual.add(new RitualComponent(-5, 0, 3, RitualComponent.WATER)); - healingRitual.add(new RitualComponent(-3, 0, -5, RitualComponent.WATER)); - healingRitual.add(new RitualComponent(-5, 0, -3, RitualComponent.WATER)); - healingRitual.add(new RitualComponent(-3, 0, -3, RitualComponent.DUSK)); - healingRitual.add(new RitualComponent(-3, 0, 3, RitualComponent.DUSK)); - healingRitual.add(new RitualComponent(3, 0, -3, RitualComponent.DUSK)); - healingRitual.add(new RitualComponent(3, 0, 3, RitualComponent.DUSK)); - healingRitual.add(new RitualComponent(4, 0, 5, RitualComponent.EARTH)); - healingRitual.add(new RitualComponent(4, -1, 5, RitualComponent.EARTH)); - healingRitual.add(new RitualComponent(5, 0, 4, RitualComponent.EARTH)); - healingRitual.add(new RitualComponent(5, -1, 4, RitualComponent.EARTH)); - healingRitual.add(new RitualComponent(5, 0, 5, RitualComponent.EARTH)); - healingRitual.add(new RitualComponent(4, 0, -5, RitualComponent.EARTH)); - healingRitual.add(new RitualComponent(4, -1, -5, RitualComponent.EARTH)); - healingRitual.add(new RitualComponent(5, 0, -4, RitualComponent.EARTH)); - healingRitual.add(new RitualComponent(5, -1, -4, RitualComponent.EARTH)); - healingRitual.add(new RitualComponent(5, 0, -5, RitualComponent.EARTH)); - healingRitual.add(new RitualComponent(-4, 0, 5, RitualComponent.EARTH)); - healingRitual.add(new RitualComponent(-4, -1, 5, RitualComponent.EARTH)); - healingRitual.add(new RitualComponent(-5, 0, 4, RitualComponent.EARTH)); - healingRitual.add(new RitualComponent(-5, -1, 4, RitualComponent.EARTH)); - healingRitual.add(new RitualComponent(-5, 0, 5, RitualComponent.EARTH)); - healingRitual.add(new RitualComponent(-4, 0, -5, RitualComponent.EARTH)); - healingRitual.add(new RitualComponent(-4, -1, -5, RitualComponent.EARTH)); - healingRitual.add(new RitualComponent(-5, 0, -4, RitualComponent.EARTH)); - healingRitual.add(new RitualComponent(-5, -1, -4, RitualComponent.EARTH)); - healingRitual.add(new RitualComponent(-5, 0, -5, RitualComponent.EARTH)); - return healingRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java deleted file mode 100644 index 6a6253dd..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java +++ /dev/null @@ -1,137 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -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 net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; - -public class RitualEffectInterdiction extends RitualEffect -{ - public static final int aetherDrain = 1; - public static final int magicalesDrain = 1; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (currentEssence < this.getCostPerRefresh()) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - int d0 = 5; - - List list = SpellHelper.getLivingEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, d0, d0); - boolean flag = false; - - boolean hasOffensa = this.canDrainReagent(ritualStone, ReagentRegistry.magicalesReagent, magicalesDrain, false); - boolean playerFlag = false; - - for (EntityLivingBase entityLiving : list) - { - if (!((!hasOffensa && entityLiving instanceof EntityPlayer) && (SpellHelper.getUsername((EntityPlayer) entityLiving).equals(owner)))) - { - double xDif = entityLiving.posX - (pos.getX() - 0.5); - double yDif = entityLiving.posY - ((pos.getY() - 0.5) + 1); - double zDif = entityLiving.posZ - (pos.getZ() - 0.5); - entityLiving.motionX = 0.1 * xDif; - entityLiving.motionY = 0.1 * yDif; - entityLiving.motionZ = 0.1 * zDif; - - if (hasOffensa && entityLiving instanceof EntityPlayer) - { - SpellHelper.setPlayerSpeedFromServer((EntityPlayer) entityLiving, 0.1 * xDif, 0.1 * yDif, 0.1 * zDif); - playerFlag = true; - } - entityLiving.fallDistance = 0; - flag = true; - } - } - - if (playerFlag) - { - this.canDrainReagent(ritualStone, ReagentRegistry.magicalesReagent, magicalesDrain, true); - } - - boolean hasAether = this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false); - - if (hasAether) - { - int aetherDrainRate = 10; - - int horizontalRadius = 5; - int verticalRadius = 5; - List itemList = world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(pos, pos.add(1, 1, 1)).expand(horizontalRadius, verticalRadius, horizontalRadius)); - - if (itemList != null) - { - boolean itemFlag = false; - - for (EntityItem entity : itemList) - { - double xDif = entity.posX - (pos.getX() - 0.5); - double yDif = entity.posY - ((pos.getY() - 0.5) + 1); - double zDif = entity.posZ - (pos.getZ() - 0.5); - entity.motionX = 0.1 * xDif; - entity.motionY = 0.1 * yDif; - entity.motionZ = 0.1 * zDif; - - itemFlag = true; - } - - if (itemFlag) - { - flag = true; - if (world.getWorldTime() % aetherDrainRate == 0) - { - this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true); - } - } - } - } - - - if (world.getWorldTime() % 2 == 0 && flag) - { - SoulNetworkHandler.syphonFromNetwork(owner, getCostPerRefresh()); - } - } - } - - @Override - public int getCostPerRefresh() - { - return 1; - } - - @Override - public List getRitualComponentList() - { - ArrayList interdictionRitual = new ArrayList(); - interdictionRitual.add(new RitualComponent(1, 0, 0, 4)); - interdictionRitual.add(new RitualComponent(-1, 0, 0, 4)); - interdictionRitual.add(new RitualComponent(0, 0, 1, 4)); - interdictionRitual.add(new RitualComponent(0, 0, -1, 4)); - interdictionRitual.add(new RitualComponent(-1, 0, 1, 4)); - interdictionRitual.add(new RitualComponent(1, 0, 1, 4)); - interdictionRitual.add(new RitualComponent(-1, 0, -1, 4)); - interdictionRitual.add(new RitualComponent(1, 0, -1, 4)); - return interdictionRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java deleted file mode 100644 index ab737d9b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java +++ /dev/null @@ -1,248 +0,0 @@ -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.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.api.RoutingFocusParadigm; -import WayofTime.alchemicalWizardry.api.RoutingFocusPosAndFacing; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.common.items.routing.InputRoutingFocus; -import WayofTime.alchemicalWizardry.common.items.routing.OutputRoutingFocus; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -public class RitualEffectItemRouting extends RitualEffect -{ - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (world.getWorldTime() % 20 != 0) - { - return; - } - - List outputList = new ArrayList(); - for(int i=0; i<4; i++) //Check output foci chests, return if none available - { - Int3 outputFocusChest = this.getOutputBufferChestLocation(i); - BlockPos newPos = pos.add(outputFocusChest.xCoord, outputFocusChest.yCoord, outputFocusChest.zCoord); - TileEntity outputFocusInv = world.getTileEntity(newPos); - if(outputFocusInv instanceof IInventory) - { - outputList.add((IInventory)outputFocusInv); - } - } - - if(outputList.isEmpty()) - { - return; - } - - for(IInventory outputFocusInventory : outputList) - { - { - OutputRoutingFocus outputFocus; - - RoutingFocusParadigm parad = new RoutingFocusParadigm(); - - TileEntity outputChest = null; //Destination - EnumFacing inputDirection; - - { - IInventory outputChestInventory = null; - - boolean lastItemWasFocus = true; - - for(int j=0; j getRitualComponentList() - { - ArrayList omegaRitual = new ArrayList(); - - this.addCornerRunes(omegaRitual, 1, 0, RitualComponent.BLANK); - this.addOffsetRunes(omegaRitual, 2, 1, 0, RitualComponent.FIRE); - this.addParallelRunes(omegaRitual, 4, 0, RitualComponent.WATER); - this.addParallelRunes(omegaRitual, 5, 0, RitualComponent.EARTH); - this.addCornerRunes(omegaRitual, 4, 0, RitualComponent.WATER); - - return omegaRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java deleted file mode 100644 index 0e5112be..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java +++ /dev/null @@ -1,126 +0,0 @@ -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.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -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 RitualEffectItemSuction extends RitualEffect -{ - public static final int reductusDrain = 1; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - TileEntity tile = world.getTileEntity(pos.offsetUp()); - IInventory tileEntity; - - if (tile instanceof IInventory) - { - tileEntity = (IInventory) tile; - } else - { - return; - } - - if (tileEntity.getSizeInventory() <= 0) - { - return; - } - - if (currentEssence < this.getCostPerRefresh() * 100) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - List itemDropList = SpellHelper.getItemsInRange(world, pos.getX() + 0.5f, pos.getY() + 0.5f, pos.getZ() + 0.5f, 10, 10); - - boolean hasReductus = this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); - - int count = 0; - - if (itemDropList != null) - { - for (EntityItem itemEntity : itemDropList) - { -// hasReductus = hasReductus && this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); -// if (hasReductus && itemEntity.age < this.timeDelayMin) -// { -// continue; -// } - ItemStack copyStack = itemEntity.getEntityItem().copy(); - - int pastAmount = copyStack.stackSize; - ItemStack newStack = SpellHelper.insertStackIntoInventory(copyStack, tileEntity, EnumFacing.DOWN); - - if (newStack != null && newStack.stackSize < pastAmount) - { - count++; - if (newStack.stackSize <= 0) - { - itemEntity.setDead(); - itemEntity.getEntityItem().stackSize = newStack.stackSize; - } - - if (newStack.stackSize > 0) - { - itemEntity.getEntityItem().stackSize = newStack.stackSize; - } - if (hasReductus) - { - this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true); - } - } - } - } - - if (count > 0) - { - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * Math.min(count, 100)); - } - } - } - - @Override - public int getCostPerRefresh() - { - return 5; - } - - @Override - public List getRitualComponentList() - { - ArrayList suctionRitual = new ArrayList(); - suctionRitual.add(new RitualComponent(2, 0, 0, RitualComponent.AIR)); - suctionRitual.add(new RitualComponent(-2, 0, 0, RitualComponent.AIR)); - suctionRitual.add(new RitualComponent(0, 0, 2, RitualComponent.AIR)); - suctionRitual.add(new RitualComponent(0, 0, -2, RitualComponent.AIR)); - suctionRitual.add(new RitualComponent(1, 1, 1, RitualComponent.AIR)); - suctionRitual.add(new RitualComponent(1, 1, -1, RitualComponent.AIR)); - suctionRitual.add(new RitualComponent(-1, 1, 1, RitualComponent.AIR)); - suctionRitual.add(new RitualComponent(-1, 1, -1, RitualComponent.AIR)); - suctionRitual.add(new RitualComponent(1, -1, 0, RitualComponent.AIR)); - suctionRitual.add(new RitualComponent(-1, -1, 0, RitualComponent.AIR)); - suctionRitual.add(new RitualComponent(0, -1, 1, RitualComponent.AIR)); - suctionRitual.add(new RitualComponent(0, -1, -1, RitualComponent.AIR)); - return suctionRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java deleted file mode 100644 index bd77b632..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java +++ /dev/null @@ -1,112 +0,0 @@ -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.spell.complex.effect.SpellHelper; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; - -public class RitualEffectJumping extends RitualEffect -{ - public final int aetherDrain = 10; - public final int terraeDrain = 10; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - double range = 0.5; - List livingList = SpellHelper.getLivingEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 1.5, pos.getZ() + 0.5, range, range); - - if (currentEssence < this.getCostPerRefresh() * livingList.size()) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - int flag = 0; - - boolean hasAether = this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false); - boolean hasTerrae = this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false); - - for (EntityLivingBase livingEntity : livingList) - { - if (livingEntity.isSneaking()) - { - continue; - } - - hasAether = hasAether && this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false); - hasTerrae = hasTerrae && this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false); - - double motionY = 1.5 * (hasAether ? 2 : 1); - - if (livingEntity instanceof EntityPlayer) - { - SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, livingEntity.motionX, motionY, livingEntity.motionZ); - livingEntity.motionY = motionY; - livingEntity.fallDistance = 0; - flag++; - } else - { - livingEntity.motionY = motionY; - livingEntity.fallDistance = 0; - flag++; - } - - if (hasAether) - { - this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true); - } - if (hasTerrae) - { - if (!livingEntity.isPotionActive(AlchemicalWizardry.customPotionFeatherFall)) - { - livingEntity.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFeatherFall.id, 5 * 20, 0)); - this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true); - } - } - } - - if (flag > 0) - { - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * flag); - } - } - } - - @Override - public int getCostPerRefresh() - { - return 5; - } - - @Override - public List getRitualComponentList() - { - ArrayList jumpingRitual = new ArrayList(); - - for (int i = -1; i <= 1; i++) - { - jumpingRitual.add(new RitualComponent(1, i, 1, RitualComponent.AIR)); - jumpingRitual.add(new RitualComponent(-1, i, 1, RitualComponent.AIR)); - jumpingRitual.add(new RitualComponent(-1, i, -1, RitualComponent.AIR)); - jumpingRitual.add(new RitualComponent(1, i, -1, RitualComponent.AIR)); - } - return jumpingRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java deleted file mode 100644 index 030ab73a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java +++ /dev/null @@ -1,136 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -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; - - public static final int fireFuseCost = 1000; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (this.canDrainReagent(ritualStone, ReagentRegistry.offensaReagent, offensaDrain, false) && SoulNetworkHandler.canSyphonFromOnlyNetwork(owner, fireFuseCost)) - { - boolean hasReductus = this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); - boolean drainReductus = world.getWorldTime() % 100 == 0; - - int range = 5; - List entityList = SpellHelper.getLivingEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, range); - EntityPlayer player = SpellHelper.getPlayerForUsername(owner); - - for (EntityLivingBase entity : entityList) - { - if (entity != player && 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 (entity instanceof EntityPlayer) - { - if (drainReductus) - { - this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true); - } - - continue; - } - } - - entity.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFireFuse.id, 100, 0)); - this.canDrainReagent(ritualStone, ReagentRegistry.offensaReagent, offensaDrain, true); - SoulNetworkHandler.syphonFromNetwork(owner, fireFuseCost); - } - } - } - - BlockPos newPos = pos.offsetUp(); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - - if (world.isAirBlock(newPos) && !(block instanceof BlockSpectralContainer)) - { - if (currentEssence < this.getCostPerRefresh()) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - for (int i = 0; i < 10; i++) - { - SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, world.provider.getDimensionId(), 3, pos); - } - - world.setBlockState(newPos, Blocks.lava.getDefaultState()); - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); - } - } else - { - boolean hasSanctus = this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false); - if (!hasSanctus) - { - return; - } - TileEntity tile = world.getTileEntity(newPos); - if (tile instanceof IFluidHandler) - { - int amount = ((IFluidHandler) tile).fill(EnumFacing.DOWN, new FluidStack(FluidRegistry.LAVA, 1000), false); - if (amount >= 1000) - { - ((IFluidHandler) tile).fill(EnumFacing.DOWN, new FluidStack(FluidRegistry.LAVA, 1000), true); - - this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true); - - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); - } - } - } - } - - @Override - public int getCostPerRefresh() - { - return 500; - } - - @Override - public List getRitualComponentList() - { - ArrayList lavaRitual = new ArrayList(); - lavaRitual.add(new RitualComponent(1, 0, 0, 2)); - lavaRitual.add(new RitualComponent(-1, 0, 0, 2)); - lavaRitual.add(new RitualComponent(0, 0, 1, 2)); - lavaRitual.add(new RitualComponent(0, 0, -1, 2)); - return lavaRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java deleted file mode 100644 index 2774c4fb..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java +++ /dev/null @@ -1,223 +0,0 @@ -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.spell.complex.effect.SpellHelper; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; - -public class RitualEffectLeap extends RitualEffect -{ - public static final int aetherDrain = 10; - public static final int terraeDrain = 10; - public static final int reductusDrain = 10; - public static final int tenebraeDrain = 10; - public static final int sanctusDrain = 10; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - double range = 2.0; - - List livingList = SpellHelper.getLivingEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, range); - - if (livingList == null) - { - return; - } - - if (currentEssence < this.getCostPerRefresh() * livingList.size()) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } 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 hasSanctus = this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false); - - int direction = ritualStone.getDirection(); - - int flag = 0; - - for (EntityLivingBase livingEntity : livingList) - { - if (livingEntity.isSneaking()) - { - continue; - } - - hasAether = hasAether && this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false); - hasTerrae = hasTerrae && this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false); - hasReductus = hasReductus && this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); - hasTenebrae = hasTenebrae && this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, false); - hasSanctus = hasSanctus && this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false); - - double motionY = hasTerrae ? 0.6 : 1.2; - double speed = hasAether ? 6.0 : 3.0; - - if (!(hasTenebrae || hasSanctus) || livingEntity instanceof EntityPlayer) - { - livingEntity.motionY = motionY; - livingEntity.fallDistance = 0; - - if(livingEntity instanceof EntityPlayer) - { - switch (direction) - { - case 1: - SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, 0, motionY, -speed); - break; - - case 2: - SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, speed, motionY, 0); - break; - - case 3: - SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, 0, motionY, speed); - break; - - case 4: - SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, -speed, motionY, 0); - break; - } - }else - { - livingEntity.motionY = motionY; - - switch (direction) - { - case 1: - livingEntity.motionX = 0.0; - livingEntity.motionZ = -speed; - break; - - case 2: - livingEntity.motionX = speed; - livingEntity.motionZ = 0.0; - break; - - case 3: - livingEntity.motionX = 0.0; - livingEntity.motionZ = -speed; - break; - - case 4: - livingEntity.motionX = -speed; - livingEntity.motionZ = 0.0; - break; - } - } - - - flag++; - } else - { - if ((hasSanctus && !livingEntity.isChild()) || (hasTenebrae && livingEntity.isChild())) - { - continue; - } - - livingEntity.motionY = motionY; - - switch (direction) - { - case 1: - livingEntity.motionX = 0.0; - livingEntity.motionZ = -speed; - break; - - case 2: - livingEntity.motionX = speed; - livingEntity.motionZ = 0.0; - break; - - case 3: - livingEntity.motionX = 0.0; - livingEntity.motionZ = -speed; - break; - - case 4: - livingEntity.motionX = -speed; - livingEntity.motionZ = 0.0; - break; - } - - if (hasTenebrae) - { - this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, true); - } - if (hasSanctus) - { - this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true); - } - - livingEntity.fallDistance = 0; - flag++; - } - - if (hasAether) - { - this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true); - } - if (hasTerrae) - { - this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true); - } - if (hasReductus) - { - if (!livingEntity.isPotionActive(AlchemicalWizardry.customPotionFeatherFall)) - { - livingEntity.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFeatherFall.id, 3 * 20, 0)); - this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true); - } - } - - } - - if (flag > 0) - { - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * flag); - } - } - } - - @Override - public int getCostPerRefresh() - { - return 5; - } - - @Override - public List getRitualComponentList() - { - ArrayList leapingRitual = new ArrayList(); - leapingRitual.add(new RitualComponent(0, 0, -2, RitualComponent.DUSK)); - leapingRitual.add(new RitualComponent(1, 0, -1, RitualComponent.AIR)); - leapingRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.AIR)); - - for (int i = 0; i <= 2; i++) - { - leapingRitual.add(new RitualComponent(2, 0, i, RitualComponent.AIR)); - leapingRitual.add(new RitualComponent(-2, 0, i, RitualComponent.AIR)); - } - return leapingRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java deleted file mode 100644 index da3b7397..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java +++ /dev/null @@ -1,174 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -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; -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; - -public class RitualEffectLifeConduit extends RitualEffect -{ - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - IBloodAltar tileAltar = null; - boolean testFlag = false; - - for (int i = -5; i <= 5; i++) - { - for (int j = -5; j <= 5; j++) - { - for (int k = -10; k <= 10; k++) - { - BlockPos newPos = pos.add(i, j, k); - if (world.getTileEntity(newPos) instanceof IBloodAltar) - { - tileAltar = (IBloodAltar) world.getTileEntity(newPos); - testFlag = true; - } - } - } - } - - if (!testFlag) - { - return; - } - - if(!(tileAltar instanceof IFluidHandler)) - { - return; - } - - int d0 = 15; - int vertRange = 20; - - EntityPlayer entityOwner = null; - List list = SpellHelper.getPlayersInRange(world, pos.getX(), pos.getY(), pos.getZ(), d0, vertRange); - - for (EntityPlayer player : list) - { - if (SpellHelper.getUsername(player).equals(owner)) - { - entityOwner = player; - } - } - - if (entityOwner == null) - { - return; - } - - int fillAmount = Math.min(currentEssence / 2, ((IFluidHandler)tileAltar).fill(EnumFacing.UP, new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 10000), false)); - - { - ((IFluidHandler)tileAltar).fill(EnumFacing.UP, new FluidStack(AlchemicalWizardry.lifeEssenceFluid, fillAmount), true); - if (entityOwner.getHealth() > 2.0f && fillAmount != 0) - { - entityOwner.setHealth(2.0f); - } - SoulNetworkHandler.syphonFromNetwork(owner, fillAmount * 2); - } - } - - @Override - public int getCostPerRefresh() - { - return 0; - } - - @Override - public List getRitualComponentList() - { - ArrayList conduitRitual = new ArrayList(); - - conduitRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.FIRE)); - conduitRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.FIRE)); - conduitRitual.add(new RitualComponent(1, 0, 1, RitualComponent.FIRE)); - conduitRitual.add(new RitualComponent(1, 0, -1, RitualComponent.FIRE)); - - for (int i = 0; i < 4; i++) - { - conduitRitual.add(new RitualComponent(-2, i, -2, RitualComponent.AIR)); - conduitRitual.add(new RitualComponent(-2, i, 2, RitualComponent.AIR)); - conduitRitual.add(new RitualComponent(2, i, 2, RitualComponent.AIR)); - conduitRitual.add(new RitualComponent(2, i, -2, RitualComponent.AIR)); - } - - conduitRitual.add(new RitualComponent(4, 1, 4, RitualComponent.EARTH)); - conduitRitual.add(new RitualComponent(4, 1, -4, RitualComponent.EARTH)); - conduitRitual.add(new RitualComponent(-4, 1, -4, RitualComponent.EARTH)); - conduitRitual.add(new RitualComponent(-4, 1, 4, RitualComponent.EARTH)); - conduitRitual.add(new RitualComponent(3, 1, 4, RitualComponent.EARTH)); - conduitRitual.add(new RitualComponent(4, 1, 3, RitualComponent.EARTH)); - conduitRitual.add(new RitualComponent(-3, 1, 4, RitualComponent.EARTH)); - conduitRitual.add(new RitualComponent(-4, 1, 3, RitualComponent.EARTH)); - conduitRitual.add(new RitualComponent(3, 1, -4, RitualComponent.EARTH)); - conduitRitual.add(new RitualComponent(4, 1, -3, RitualComponent.EARTH)); - conduitRitual.add(new RitualComponent(-3, 1, -4, RitualComponent.EARTH)); - conduitRitual.add(new RitualComponent(-4, 1, -3, RitualComponent.EARTH)); - - - for (int i = 0; i < 2; i++) - { - conduitRitual.add(new RitualComponent(4, i + 2, 4, RitualComponent.WATER)); - conduitRitual.add(new RitualComponent(4, i + 2, -4, RitualComponent.WATER)); - conduitRitual.add(new RitualComponent(-4, i + 2, -4, RitualComponent.WATER)); - conduitRitual.add(new RitualComponent(-4, i + 2, 4, RitualComponent.WATER)); - } - - conduitRitual.add(new RitualComponent(4, 4, 4, RitualComponent.DUSK)); - conduitRitual.add(new RitualComponent(4, 4, -4, RitualComponent.DUSK)); - conduitRitual.add(new RitualComponent(-4, 4, -4, RitualComponent.DUSK)); - conduitRitual.add(new RitualComponent(-4, 4, 4, RitualComponent.DUSK)); - - conduitRitual.add(new RitualComponent(6, 0, 5, RitualComponent.FIRE)); - conduitRitual.add(new RitualComponent(5, 0, 6, RitualComponent.FIRE)); - conduitRitual.add(new RitualComponent(-6, 0, 5, RitualComponent.FIRE)); - conduitRitual.add(new RitualComponent(-5, 0, 6, RitualComponent.FIRE)); - conduitRitual.add(new RitualComponent(6, 0, -5, RitualComponent.FIRE)); - conduitRitual.add(new RitualComponent(5, 0, -6, RitualComponent.FIRE)); - conduitRitual.add(new RitualComponent(-6, 0, -5, RitualComponent.FIRE)); - conduitRitual.add(new RitualComponent(-5, 0, -6, RitualComponent.FIRE)); - - for (int i = 0; i < 2; i++) - { - conduitRitual.add(new RitualComponent(6, i, 6, RitualComponent.FIRE)); - conduitRitual.add(new RitualComponent(6, i, -6, RitualComponent.FIRE)); - conduitRitual.add(new RitualComponent(-6, i, 6, RitualComponent.FIRE)); - conduitRitual.add(new RitualComponent(-6, i, -6, RitualComponent.FIRE)); - } - - for (int i = 0; i < 3; i++) - { - conduitRitual.add(new RitualComponent(6, i + 2, 6, RitualComponent.BLANK)); - conduitRitual.add(new RitualComponent(6, i + 2, -6, RitualComponent.BLANK)); - conduitRitual.add(new RitualComponent(-6, i + 2, 6, RitualComponent.BLANK)); - conduitRitual.add(new RitualComponent(-6, i + 2, -6, RitualComponent.BLANK)); - } - - conduitRitual.add(new RitualComponent(6, 5, 6, RitualComponent.DUSK)); - conduitRitual.add(new RitualComponent(6, 5, -6, RitualComponent.DUSK)); - conduitRitual.add(new RitualComponent(-6, 5, 6, RitualComponent.DUSK)); - conduitRitual.add(new RitualComponent(-6, 5, -6, RitualComponent.DUSK)); - - return conduitRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java deleted file mode 100644 index 8aed0a4c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java +++ /dev/null @@ -1,248 +0,0 @@ -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.block.state.IBlockState; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; -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.ItemType; -import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; - -public class RitualEffectMagnetic extends RitualEffect -{ - private static final int potentiaDrain = 10; - private static final int terraeDrain = 10; - private static final int orbisTerraeDrain = 10; - - private static final Map oreBlockCache = new HashMap(); - - public static boolean isBlockOre(Block block, int meta) - { - if (block == null || Item.getItemFromBlock(block) == null) - return false; - - if (block instanceof BlockOre || block instanceof BlockRedstoneOre) - return true; - - ItemType type = new ItemType(block, meta); - Boolean result = oreBlockCache.get(type); - if (result == null) - { - result = computeIsItemOre(type); - oreBlockCache.put(type, result); - } - return result; - } - - private static boolean computeIsItemOre(ItemType type) - { - ItemStack itemStack = type.createStack(1); - for (int id : OreDictionary.getOreIDs(itemStack)) - { - String oreName = OreDictionary.getOreName(id); - if (oreName.contains("ore")) - return true; - } - return false; - } - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); - - if (world.getWorldTime() % (hasPotentia ? 10 : 40) != 0) - { - return; - } - - boolean hasTerrae = this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false); - boolean hasOrbisTerrae = this.canDrainReagent(ritualStone, ReagentRegistry.orbisTerraeReagent, orbisTerraeDrain, false); - - int radius = this.getRadiusForReagents(hasTerrae, hasOrbisTerrae); - - if (currentEssence < this.getCostPerRefresh()) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - BlockPos posRep = null; - boolean replace = false; - - outer: - for (int j = 1; j <= 3; j++) - { - for (int i = -1; i <= 1; i++) - { - for (int k = -1; k <= 1; k++) - { - BlockPos newPos = pos.add(i, j, k); - if ((!replace) && world.isAirBlock(newPos)) - { - posRep = newPos; - replace = true; - break outer; - } - } - } - } - - if (replace) - { - Int3 lastPos = this.getLastPosition(ritualStone.getCustomRitualTag()); - - int j = pos.getY() - 1; - int i = 0; - int k = 0; - - if(lastPos != null) - { - j = lastPos.yCoord; - i = Math.min(radius, Math.max(-radius, lastPos.xCoord)); - k = Math.min(radius, Math.max(-radius, lastPos.zCoord)); - } - - while(j >= 0) - { - while(i <= radius) - { - while(k <= radius) - { - BlockPos newPos = new BlockPos(pos.getX() + i, j, pos.getZ() + k); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - - if (isBlockOre(block, block.getMetaFromState(state))) - { - //Allow swapping code. This means the searched block is an ore. - BlockTeleposer.swapBlocks(this, world, world, newPos, posRep); - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); - - if (hasPotentia) - { - this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, true); - } - - if (hasTerrae) - { - this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true); - } - - if (hasOrbisTerrae) - { - this.canDrainReagent(ritualStone, ReagentRegistry.orbisTerraeReagent, orbisTerraeDrain, true); - } - - this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); - - return; - } - k++; - } - k = -radius; - i++; - } - i = -radius; - j--; - this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); - return; - } - - j = pos.getY() - 1; - this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); - } - } - } - - @Override - public int getCostPerRefresh() - { - return 50; - } - - public Int3 getLastPosition(NBTTagCompound tag) - { - if(tag != null) - { - return Int3.readFromNBT(tag); - } - - return new Int3(0, 0, 0); - } - - public void setLastPosition(NBTTagCompound tag, Int3 pos) - { - if(tag != null) - { - pos.writeToNBT(tag); - } - } - - @Override - public List getRitualComponentList() - { - ArrayList magneticRitual = new ArrayList(); - magneticRitual.add(new RitualComponent(1, 0, 1, RitualComponent.EARTH)); - magneticRitual.add(new RitualComponent(1, 0, -1, RitualComponent.EARTH)); - magneticRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.EARTH)); - magneticRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.EARTH)); - magneticRitual.add(new RitualComponent(2, 1, 0, RitualComponent.EARTH)); - magneticRitual.add(new RitualComponent(0, 1, 2, RitualComponent.EARTH)); - magneticRitual.add(new RitualComponent(-2, 1, 0, RitualComponent.EARTH)); - magneticRitual.add(new RitualComponent(0, 1, -2, RitualComponent.EARTH)); - magneticRitual.add(new RitualComponent(2, 1, 2, RitualComponent.AIR)); - magneticRitual.add(new RitualComponent(2, 1, -2, RitualComponent.AIR)); - magneticRitual.add(new RitualComponent(-2, 1, 2, RitualComponent.AIR)); - magneticRitual.add(new RitualComponent(-2, 1, -2, RitualComponent.AIR)); - magneticRitual.add(new RitualComponent(2, 2, 0, RitualComponent.FIRE)); - magneticRitual.add(new RitualComponent(0, 2, 2, RitualComponent.FIRE)); - magneticRitual.add(new RitualComponent(-2, 2, 0, RitualComponent.FIRE)); - magneticRitual.add(new RitualComponent(0, 2, -2, RitualComponent.FIRE)); - return magneticRitual; - } - - public int getRadiusForReagents(boolean hasTerrae, boolean hasOrbisTerrae) - { - if (hasTerrae) - { - if (hasOrbisTerrae) - { - return 31; - } else - { - return 7; - } - } else - { - if (hasOrbisTerrae) - { - return 12; - } else - { - return 3; - } - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java deleted file mode 100644 index 363e5d6f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java +++ /dev/null @@ -1,103 +0,0 @@ -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.util.BlockPos; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -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.api.spell.APISpellHelper; -import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; -import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -public class RitualEffectOmegaStalling extends RitualEffect -{ - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (world.getWorldTime() % 20 != 0) - { - return; - } - - TileEntity tile = world.getTileEntity(pos.offsetUp(5)); - if(tile instanceof TileEntityBeacon) - { - int levels = ((TileEntityBeacon) tile).getField(0); - if(levels >= 4) - { - int horizontalRadius = 100; - int verticalRadius = 100; - - List playerList = SpellHelper.getPlayersInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, horizontalRadius, verticalRadius); - - for(EntityPlayer player : playerList) - { - if(SoulNetworkHandler.canSyphonFromOnlyNetwork(owner, getCostPerRefresh())) - { - Reagent reagent = APISpellHelper.getPlayerReagentType(player); - OmegaParadigm parad = OmegaRegistry.getParadigmForReagent(reagent); - if(parad != null) - { - float costOffset = parad.getCostPerTickOfUse(player); - parad.setOmegaStalling(player, 100); - SoulNetworkHandler.syphonFromNetwork(owner, (int)(getCostPerRefresh() * Math.min(costOffset, 1))); - } - } - } - } - } - } - - @Override - public int getCostPerRefresh() - { - return 5000; - } - - @Override - public List getRitualComponentList() - { - ArrayList omegaRitual = new ArrayList(); - - this.addCornerRunes(omegaRitual, 1, 0, RitualComponent.FIRE); - this.addOffsetRunes(omegaRitual, 2, 1, 0, RitualComponent.DUSK); - this.addParallelRunes(omegaRitual, 4, 0, RitualComponent.WATER); - this.addParallelRunes(omegaRitual, 5, 0, RitualComponent.EARTH); - this.addCornerRunes(omegaRitual, 4, 0, RitualComponent.AIR); - this.addOffsetRunes(omegaRitual, 3, 4, 0, RitualComponent.AIR); - this.addParallelRunes(omegaRitual, 5, 1, RitualComponent.WATER); - this.addParallelRunes(omegaRitual, 5, 2, RitualComponent.EARTH); - this.addParallelRunes(omegaRitual, 4, 3, RitualComponent.WATER); - this.addParallelRunes(omegaRitual, 4, 4, RitualComponent.WATER); - this.addParallelRunes(omegaRitual, 3, 5, RitualComponent.BLANK); - this.addParallelRunes(omegaRitual, 2, 5, RitualComponent.FIRE); - this.addParallelRunes(omegaRitual, 1, 5, RitualComponent.DAWN); - this.addOffsetRunes(omegaRitual, 5, 3, 1, RitualComponent.WATER); - this.addOffsetRunes(omegaRitual, 6, 3, 1, RitualComponent.DUSK); - this.addOffsetRunes(omegaRitual, 6, 4, 1, RitualComponent.FIRE); - this.addOffsetRunes(omegaRitual, 6, 5, 1, RitualComponent.BLANK); - this.addCornerRunes(omegaRitual, 4, 2, RitualComponent.FIRE); - this.addCornerRunes(omegaRitual, 4, 3, RitualComponent.AIR); - this.addCornerRunes(omegaRitual, 4, 4, RitualComponent.AIR); - this.addOffsetRunes(omegaRitual, 4, 3, 2, RitualComponent.BLANK); - this.addCornerRunes(omegaRitual, 3, 5, RitualComponent.EARTH); - this.addOffsetRunes(omegaRitual, 2, 3, 5, RitualComponent.AIR); - - return omegaRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java deleted file mode 100644 index 1092ad61..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java +++ /dev/null @@ -1,258 +0,0 @@ -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.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.Int3; -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.ReagentStack; -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.api.spell.APISpellHelper; -import WayofTime.alchemicalWizardry.common.NewPacketHandler; -import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; -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; - -public class RitualEffectOmegaTest extends RitualEffect -{ - public static final boolean isTesting = false; - public static final int drainTotal = 32 * 1000; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (world.getWorldTime() % 200 != 0) - { - return; - } - - OmegaStructureParameters param = OmegaStructureHandler.getStructureStabilityFactor(world, pos, 5, new Int3(0,1,0)); - int stab = param.stability; - int enchantability = param.enchantability; - int enchantmentLevel = param.enchantmentLevel; - - if(stab <= 0) - { - return; - } - -// System.out.println("Stability: " + stab + ", Enchantability: " + enchantability + ", Enchantment Level: " + enchantmentLevel); - - double range = 0.5; - - List playerList = SpellHelper.getPlayersInRange(world, pos.getX() + 0.5, pos.getY() + 1.5, pos.getZ() + 0.5, range, range); - - Reagent reagent = null; - - Map reagentMap = new HashMap(); - for(int i=0; i<4; i++) - { - Int3 jarLoc = this.getJarLocation(i); - BlockPos newPos = pos.add(jarLoc.xCoord, jarLoc.yCoord, jarLoc.zCoord); - TileEntity tile = world.getTileEntity(newPos); - if(tile instanceof IReagentHandler) - { - IReagentHandler container = (IReagentHandler)tile; - ReagentContainerInfo[] containerInfoArray = container.getContainerInfo(EnumFacing.UP); - if(containerInfoArray == null) - { - continue; - } - - for(ReagentContainerInfo containerInfo : containerInfoArray) - { - ReagentStack containedReagent = containerInfo.reagent; - if(containedReagent == null) - { - continue; - } - Reagent rea = containedReagent.reagent; - int amt = containedReagent.amount; - if(reagentMap.containsKey(rea)) - { - reagentMap.put(rea, reagentMap.get(rea) + amt); - }else - { - reagentMap.put(rea, amt); - } - } - } - } - - for(Entry entry : reagentMap.entrySet()) - { - if(entry.getValue() >= drainTotal) - { - reagent = entry.getKey(); - break; - } - } - - if(reagent == null) - { - return; - } - - int tickDuration = isTesting ? 20 * 30 : 15 * 20 * 60 + (int)((15 * 20 * 60) * Math.sqrt(stab / 700)); - - int affinity = 0; - - for(EntityPlayer player : playerList) - { - OmegaParadigm waterParadigm = OmegaRegistry.getParadigmForReagent(reagent); - if(waterParadigm != null && waterParadigm.convertPlayerArmour(player, pos.getX(), pos.getY(), pos.getZ(), stab, affinity, enchantability, enchantmentLevel)) - { - APISpellHelper.setPlayerCurrentReagentAmount(player, tickDuration); - APISpellHelper.setPlayerMaxReagentAmount(player, tickDuration); - APISpellHelper.setPlayerReagentType(player, reagent); - APISpellHelper.setCurrentAdditionalMaxHP(player, waterParadigm.getMaxAdditionalHealth()); - NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getReagentBarPacket(reagent, APISpellHelper.getPlayerCurrentReagentAmount(player), APISpellHelper.getPlayerMaxReagentAmount(player)), (EntityPlayerMP)player); - - if(!isTesting) - { - int drainLeft = drainTotal; - for(int i = 0; i < 4; i++) - { - if(drainLeft <= 0) - { - break; - } - Int3 jarLoc = this.getJarLocation(i); - BlockPos newPos = pos.add(jarLoc.xCoord, jarLoc.yCoord, jarLoc.zCoord); - TileEntity tile = world.getTileEntity(newPos); - if(tile instanceof IReagentHandler) - { - IReagentHandler container = (IReagentHandler)tile; - ReagentStack drained = container.drain(EnumFacing.UP, new ReagentStack(reagent, drainLeft), true); - if(drained != null) - { - drainLeft -= drained.amount; - world.markBlockForUpdate(newPos); - world.addWeatherEffect(new EntityLightningBolt(world, newPos.getX(), newPos.getY(), newPos.getZ())); - } - } - } - - ritualStone.setActive(false); - } - - break; - } - } - } - - @Override - public int getCostPerRefresh() - { - return 0; - } - - @Override - public List getRitualComponentList() - { - ArrayList omegaRitual = new ArrayList(); - this.addCornerRunes(omegaRitual, 1, 0, RitualComponent.DUSK); - this.addCornerRunes(omegaRitual, 2, 0, RitualComponent.DUSK); - this.addCornerRunes(omegaRitual, 3, 0, RitualComponent.BLANK); - this.addCornerRunes(omegaRitual, 4, 0, RitualComponent.DUSK); - this.addCornerRunes(omegaRitual, 5, 0, RitualComponent.BLANK); - this.addParallelRunes(omegaRitual, 1, 0, RitualComponent.DAWN); - this.addParallelRunes(omegaRitual, 2, 0, RitualComponent.BLANK); - this.addParallelRunes(omegaRitual, 4, 0, RitualComponent.BLANK); - this.addParallelRunes(omegaRitual, 5, 0, RitualComponent.DAWN); - this.addOffsetRunes(omegaRitual, 1, 3, 0, RitualComponent.DUSK); - this.addOffsetRunes(omegaRitual, 1, 5, 0, RitualComponent.DUSK); - - for(int i=2; i<=4; i++) - { - omegaRitual.add(new RitualComponent(-5, 0, i, RitualComponent.WATER)); - omegaRitual.add(new RitualComponent(-5, 0, -i, RitualComponent.WATER)); - omegaRitual.add(new RitualComponent(5, 0, i, RitualComponent.FIRE)); - omegaRitual.add(new RitualComponent(5, 0, -i, RitualComponent.FIRE)); - omegaRitual.add(new RitualComponent(i, 0, -5, RitualComponent.EARTH)); - omegaRitual.add(new RitualComponent(-i, 0, -5, RitualComponent.EARTH)); - omegaRitual.add(new RitualComponent(i, 0, 5, RitualComponent.AIR)); - omegaRitual.add(new RitualComponent(-i, 0, 5, RitualComponent.AIR)); - } - - for(int i=2; i<=3; i++) - { - omegaRitual.add(new RitualComponent(4, 0, i, RitualComponent.WATER)); - omegaRitual.add(new RitualComponent(4, 0, -i, RitualComponent.WATER)); - omegaRitual.add(new RitualComponent(-4, 0, i, RitualComponent.FIRE)); - omegaRitual.add(new RitualComponent(-4, 0, -i, RitualComponent.FIRE)); - omegaRitual.add(new RitualComponent(i, 0, 4, RitualComponent.EARTH)); - omegaRitual.add(new RitualComponent(-i, 0, 4, RitualComponent.EARTH)); - omegaRitual.add(new RitualComponent(i, 0, -4, RitualComponent.AIR)); - omegaRitual.add(new RitualComponent(-i, 0, -4, RitualComponent.AIR)); - } - - omegaRitual.add(new RitualComponent(-2, 0, 1, RitualComponent.AIR)); - omegaRitual.add(new RitualComponent(-2, 0, -1, RitualComponent.AIR)); - omegaRitual.add(new RitualComponent(-4, 0, 1, RitualComponent.AIR)); - omegaRitual.add(new RitualComponent(-4, 0, -1, RitualComponent.AIR)); - omegaRitual.add(new RitualComponent(2, 0, 1, RitualComponent.EARTH)); - omegaRitual.add(new RitualComponent(2, 0, -1, RitualComponent.EARTH)); - omegaRitual.add(new RitualComponent(4, 0, 1, RitualComponent.EARTH)); - omegaRitual.add(new RitualComponent(4, 0, -1, RitualComponent.EARTH)); - omegaRitual.add(new RitualComponent(1, 0, 2, RitualComponent.FIRE)); - omegaRitual.add(new RitualComponent(-1, 0, 2, RitualComponent.FIRE)); - omegaRitual.add(new RitualComponent(1, 0, 4, RitualComponent.FIRE)); - omegaRitual.add(new RitualComponent(-1, 0, 4, RitualComponent.FIRE)); - omegaRitual.add(new RitualComponent(1, 0, -2, RitualComponent.WATER)); - omegaRitual.add(new RitualComponent(-1, 0, -2, RitualComponent.WATER)); - omegaRitual.add(new RitualComponent(1, 0, -4, RitualComponent.WATER)); - omegaRitual.add(new RitualComponent(-1, 0, -4, RitualComponent.WATER)); - - omegaRitual.add(new RitualComponent(-3, 0, 2, RitualComponent.FIRE)); - omegaRitual.add(new RitualComponent(-3, 0, -2, RitualComponent.FIRE)); - omegaRitual.add(new RitualComponent(3, 0, 2, RitualComponent.WATER)); - omegaRitual.add(new RitualComponent(3, 0, -2, RitualComponent.WATER)); - omegaRitual.add(new RitualComponent(-2, 0, -3, RitualComponent.AIR)); - omegaRitual.add(new RitualComponent(2, 0, -3, RitualComponent.AIR)); - omegaRitual.add(new RitualComponent(-2, 0, 3, RitualComponent.EARTH)); - omegaRitual.add(new RitualComponent(2, 0, 3, RitualComponent.EARTH)); - - return omegaRitual; - } - - public Int3 getJarLocation(int i) - { - switch(i) - { - case 0: - return new Int3(-3,0,0); - case 1: - return new Int3(3,0,0); - case 2: - return new Int3(0,0,-3); - case 3: - return new Int3(0,0,3); - default: - return new Int3(0,0,0); - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java deleted file mode 100644 index 5cb2deda..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java +++ /dev/null @@ -1,117 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import net.minecraft.util.BlockPos; -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.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks; -import WayofTime.alchemicalWizardry.common.CoordAndRange; - -public class RitualEffectSpawnWard extends RitualEffect -{ - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (currentEssence < this.getCostPerRefresh()) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - int horizRange = 32; - int vertRange = 32; - - int dimension = world.provider.getDimensionId(); - - if (AlchemicalWizardryEventHooks.respawnMap.containsKey(dimension)) - { - List list = AlchemicalWizardryEventHooks.respawnMap.get(dimension); - if (list != null) - { - if (!list.contains(new CoordAndRange(pos, horizRange, vertRange))) - { - for (CoordAndRange coords : list) - { - BlockPos locationPos = coords.getPos(); - - if (locationPos.equals(pos)) - { - list.remove(coords); - break; - } - } - list.add(new CoordAndRange(pos, horizRange, vertRange)); - } - } else - { - list = new LinkedList(); - list.add(new CoordAndRange(pos, horizRange, vertRange)); - AlchemicalWizardryEventHooks.respawnMap.put(dimension, list); - } - } else - { - List list = new LinkedList(); - list.add(new CoordAndRange(pos, horizRange, vertRange)); - AlchemicalWizardryEventHooks.respawnMap.put(dimension, list); - } - - - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); - } - } - - @Override - public int getCostPerRefresh() - { - return 15; - } - - @Override - public List getRitualComponentList() - { - ArrayList wardRitualRitual = new ArrayList(); - - for (int i = 2; i <= 4; i++) - { - if (i <= 3) - { - wardRitualRitual.add(new RitualComponent(0, 0, i, RitualComponent.AIR)); - wardRitualRitual.add(new RitualComponent(0, 0, -i, RitualComponent.AIR)); - wardRitualRitual.add(new RitualComponent(i, 0, 0, RitualComponent.AIR)); - wardRitualRitual.add(new RitualComponent(-i, 0, 0, RitualComponent.AIR)); - } - - wardRitualRitual.add(new RitualComponent(i, 0, i, RitualComponent.FIRE)); - wardRitualRitual.add(new RitualComponent(i, 0, -i, RitualComponent.FIRE)); - wardRitualRitual.add(new RitualComponent(-i, 0, -i, RitualComponent.FIRE)); - wardRitualRitual.add(new RitualComponent(-i, 0, i, RitualComponent.FIRE)); - } - - wardRitualRitual.add(new RitualComponent(0, 0, 5, RitualComponent.DUSK)); - wardRitualRitual.add(new RitualComponent(0, 0, -5, RitualComponent.DUSK)); - wardRitualRitual.add(new RitualComponent(5, 0, 0, RitualComponent.DUSK)); - wardRitualRitual.add(new RitualComponent(-5, 0, 0, RitualComponent.DUSK)); - - wardRitualRitual.add(new RitualComponent(6, 0, 5, RitualComponent.WATER)); - wardRitualRitual.add(new RitualComponent(5, 0, 6, RitualComponent.WATER)); - wardRitualRitual.add(new RitualComponent(6, 0, -5, RitualComponent.WATER)); - wardRitualRitual.add(new RitualComponent(-5, 0, 6, RitualComponent.WATER)); - wardRitualRitual.add(new RitualComponent(-6, 0, 5, RitualComponent.WATER)); - wardRitualRitual.add(new RitualComponent(5, 0, -6, RitualComponent.WATER)); - wardRitualRitual.add(new RitualComponent(-6, 0, -5, RitualComponent.WATER)); - wardRitualRitual.add(new RitualComponent(-5, 0, -6, RitualComponent.WATER)); - - return wardRitualRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java deleted file mode 100644 index 49d79db6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java +++ /dev/null @@ -1,223 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -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.util.BlockPos; -import net.minecraft.world.World; -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.block.BlockTeleposer; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -public class RitualEffectSphereCreator extends RitualEffect -{ -// private static final int potentiaDrain = 10; - public static int MAX_RADIUS = 32; - private static final int terraeDrain = 1; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - -// boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); - - if (world.getWorldTime() % 1 != 0) - { - return; - } - - if (currentEssence < this.getCostPerRefresh()) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - TileEntity tile = world.getTileEntity(pos.offsetUp()); - if(!(tile instanceof IInventory)) - { - return; - } - - int negYOffset = 0; - int radius = 0; - IInventory inv = (IInventory)tile; - - int invSize = inv.getSizeInventory(); - if(invSize < 1) - { - return; - }else - { - if(invSize >= 2) - { - ItemStack invStack2 = inv.getStackInSlot(1); - if(invStack2 != null) - { - negYOffset = invStack2.stackSize; - } - } - - ItemStack invStack1 = inv.getStackInSlot(0); - if(invStack1 == null) - { - return; - } - - radius = invStack1.stackSize; - } - - if(radius <= 0) - { - return; - } - - radius = Math.min(radius, MAX_RADIUS); - - if(negYOffset < radius + 3) - { - negYOffset = radius + 3; - } - - Int3 lastPos = this.getLastPosition(ritualStone.getCustomRitualTag(), radius); - - int j = -radius; - int i = -radius; - int k = -radius; - - if(lastPos != null) - { - j = Math.min(radius, Math.max(-radius, lastPos.yCoord)); - i = Math.min(radius, Math.max(-radius, lastPos.xCoord)); - k = Math.min(radius, Math.max(-radius, lastPos.zCoord)); - } - - int yP = negYOffset; - int yN = -negYOffset; - - boolean incrementNext = false; - - - while(i <= radius) - { - while(j <= radius) - { - while(k <= radius) - { - if (i * i + j * j + k * k >= (radius + 0.50f) * (radius + 0.50f)) - { - k++; - continue; - } - - if(incrementNext) - { - this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); - return; - } - - BlockPos pPos = pos.add(i, j + yP, k); - BlockPos nPos = pos.add(i, j + yN, k); - - IBlockState state = world.getBlockState(pPos); - Block blk = state.getBlock(); - - if (world.isAirBlock(nPos) || (!world.isAirBlock(pPos) && !SpellHelper.isBlockFluid(blk))) - { - - k++; - continue; - } - - if(BlockTeleposer.swapBlocks(this, world, world, nPos, pPos, false, 2)) - { - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); - if(this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true)) - { - world.setBlockState(nPos, Blocks.dirt.getDefaultState(), 2); - } - } - - this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); - - incrementNext = true; - - k++; - } - k = -radius; - j++; - } - j = -radius; - i++; -// this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); -// return; - } - - ritualStone.setActive(false); - this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); - } - } - - @Override - public int getCostPerRefresh() - { - return 0; - } - - public Int3 getLastPosition(NBTTagCompound tag, int radius) - { - if(tag != null && tag.getBoolean("hasWorked")) - { - return Int3.readFromNBT(tag); - } - - return new Int3(-radius, -radius, -radius); - } - - public void setLastPosition(NBTTagCompound tag, Int3 pos) - { - if(tag != null) - { - pos.writeToNBT(tag); - tag.setBoolean("hasWorked", true); - } - } - - @Override - public List getRitualComponentList() - { - ArrayList magneticRitual = new ArrayList(); - magneticRitual.add(new RitualComponent(1, 0, 1, RitualComponent.EARTH)); - magneticRitual.add(new RitualComponent(1, 0, -1, RitualComponent.EARTH)); - magneticRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.EARTH)); - magneticRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.EARTH)); - magneticRitual.add(new RitualComponent(2, 1, 0, RitualComponent.EARTH)); - magneticRitual.add(new RitualComponent(0, 1, 2, RitualComponent.EARTH)); - magneticRitual.add(new RitualComponent(-2, 1, 0, RitualComponent.EARTH)); - magneticRitual.add(new RitualComponent(0, 1, -2, RitualComponent.EARTH)); - magneticRitual.add(new RitualComponent(2, 1, 2, RitualComponent.AIR)); - magneticRitual.add(new RitualComponent(2, 1, -2, RitualComponent.AIR)); - magneticRitual.add(new RitualComponent(-2, 1, 2, RitualComponent.AIR)); - magneticRitual.add(new RitualComponent(-2, 1, -2, RitualComponent.AIR)); - magneticRitual.add(new RitualComponent(2, 2, 0, RitualComponent.FIRE)); - magneticRitual.add(new RitualComponent(0, 2, 2, RitualComponent.FIRE)); - magneticRitual.add(new RitualComponent(-2, 2, 0, RitualComponent.FIRE)); - magneticRitual.add(new RitualComponent(0, 2, -2, RitualComponent.DUSK)); - return magneticRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java deleted file mode 100644 index 48969c77..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java +++ /dev/null @@ -1,211 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -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.entity.projectile.EntityMeteor; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; -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.util.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; - -public class RitualEffectSummonMeteor extends RitualEffect -{ - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (ritualStone.getCooldown() > 0) - { - ritualStone.setCooldown(0); - } - - if (currentEssence < this.getCostPerRefresh()) - { - EntityPlayer entityOwner = SpellHelper.getPlayerForUsername(owner); - - if (entityOwner == null) - { - return; - } - - entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } else - { - List entities = world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(pos.offsetUp(), pos.add(1, 2, 1))); - - if (entities == null) - { - return; - } - - for (EntityItem entityItem : entities) - { - if (entityItem != null && MeteorRegistry.isValidParadigmItem(entityItem.getEntityItem())) - { - int meteorID = MeteorRegistry.getParadigmIDForItem(entityItem.getEntityItem()); - EntityMeteor meteor = new EntityMeteor(world, pos.getX() + 0.5f, 257, pos.getZ() + 0.5f, meteorID); - meteor.motionY = -1.0f; - - if (this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, 1000, true)) - { - meteor.hasTerrae = true; - } - if (this.canDrainReagent(ritualStone, ReagentRegistry.orbisTerraeReagent, 1000, true)) - { - meteor.hasOrbisTerrae = true; - } - if (this.canDrainReagent(ritualStone, ReagentRegistry.crystallosReagent, 1000, true)) - { - meteor.hasCrystallos = true; - } - if (this.canDrainReagent(ritualStone, ReagentRegistry.incendiumReagent, 1000, true)) - { - meteor.hasIncendium = true; - } - if (this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, 1000, true)) - { - meteor.hasTennebrae = true; - } - - entityItem.setDead(); - world.spawnEntityInWorld(meteor); - ritualStone.setActive(false); - break; - } - } - - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); - } - } - - @Override - public int getCostPerRefresh() - { - return 0; - } - - @Override - public List getRitualComponentList() - { - ArrayList meteorRitual = new ArrayList(); - meteorRitual.add(new RitualComponent(2, 0, 0, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(-2, 0, 0, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(0, 0, 2, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(0, 0, -2, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(3, 0, 1, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(3, 0, -1, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(-3, 0, 1, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(-3, 0, -1, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(1, 0, 3, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(-1, 0, 3, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(1, 0, -3, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(-1, 0, -3, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(4, 0, 2, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(4, 0, -2, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(-4, 0, 2, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(-4, 0, -2, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(2, 0, 4, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(-2, 0, 4, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(2, 0, -4, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(-2, 0, -4, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(5, 0, 3, RitualComponent.DUSK)); - meteorRitual.add(new RitualComponent(5, 0, -3, RitualComponent.DUSK)); - meteorRitual.add(new RitualComponent(-5, 0, 3, RitualComponent.DUSK)); - meteorRitual.add(new RitualComponent(-5, 0, -3, RitualComponent.DUSK)); - meteorRitual.add(new RitualComponent(3, 0, 5, RitualComponent.DUSK)); - meteorRitual.add(new RitualComponent(-3, 0, 5, RitualComponent.DUSK)); - meteorRitual.add(new RitualComponent(3, 0, -5, RitualComponent.DUSK)); - meteorRitual.add(new RitualComponent(-3, 0, -5, RitualComponent.DUSK)); - meteorRitual.add(new RitualComponent(-4, 0, -4, RitualComponent.DUSK)); - meteorRitual.add(new RitualComponent(-4, 0, 4, RitualComponent.DUSK)); - meteorRitual.add(new RitualComponent(4, 0, 4, RitualComponent.DUSK)); - meteorRitual.add(new RitualComponent(4, 0, -4, RitualComponent.DUSK)); - - for (int i = 4; i <= 6; i++) - { - meteorRitual.add(new RitualComponent(i, 0, 0, RitualComponent.EARTH)); - meteorRitual.add(new RitualComponent(-i, 0, 0, RitualComponent.EARTH)); - meteorRitual.add(new RitualComponent(0, 0, i, RitualComponent.EARTH)); - meteorRitual.add(new RitualComponent(0, 0, -i, RitualComponent.EARTH)); - } - - meteorRitual.add(new RitualComponent(8, 0, 0, RitualComponent.EARTH)); - meteorRitual.add(new RitualComponent(-8, 0, 0, RitualComponent.EARTH)); - meteorRitual.add(new RitualComponent(0, 0, 8, RitualComponent.EARTH)); - meteorRitual.add(new RitualComponent(0, 0, -8, RitualComponent.EARTH)); - meteorRitual.add(new RitualComponent(8, 1, 0, RitualComponent.EARTH)); - meteorRitual.add(new RitualComponent(-8, 1, 0, RitualComponent.EARTH)); - meteorRitual.add(new RitualComponent(0, 1, 8, RitualComponent.EARTH)); - meteorRitual.add(new RitualComponent(0, 1, -8, RitualComponent.EARTH)); - meteorRitual.add(new RitualComponent(7, 1, 0, RitualComponent.EARTH)); - meteorRitual.add(new RitualComponent(-7, 1, 0, RitualComponent.EARTH)); - meteorRitual.add(new RitualComponent(0, 1, 7, RitualComponent.EARTH)); - meteorRitual.add(new RitualComponent(0, 1, -7, RitualComponent.EARTH)); - meteorRitual.add(new RitualComponent(7, 2, 0, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(-7, 2, 0, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(0, 2, 7, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(0, 2, -7, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(6, 2, 0, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(-6, 2, 0, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(0, 2, 6, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(0, 2, -6, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(6, 3, 0, RitualComponent.WATER)); - meteorRitual.add(new RitualComponent(-6, 3, 0, RitualComponent.WATER)); - meteorRitual.add(new RitualComponent(0, 3, 6, RitualComponent.WATER)); - meteorRitual.add(new RitualComponent(0, 3, -6, RitualComponent.WATER)); - meteorRitual.add(new RitualComponent(5, 3, 0, RitualComponent.WATER)); - meteorRitual.add(new RitualComponent(-5, 3, 0, RitualComponent.WATER)); - meteorRitual.add(new RitualComponent(0, 3, 5, RitualComponent.WATER)); - meteorRitual.add(new RitualComponent(0, 3, -5, RitualComponent.WATER)); - meteorRitual.add(new RitualComponent(5, 4, 0, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(-5, 4, 0, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(0, 4, 5, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(0, 4, -5, RitualComponent.AIR)); - - for (int i = -1; i <= 1; i++) - { - meteorRitual.add(new RitualComponent(i, 4, 4, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(i, 4, -4, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(4, 4, i, RitualComponent.AIR)); - meteorRitual.add(new RitualComponent(-4, 4, i, RitualComponent.AIR)); - } - - meteorRitual.add(new RitualComponent(2, 4, 4, RitualComponent.WATER)); - meteorRitual.add(new RitualComponent(4, 4, 2, RitualComponent.WATER)); - meteorRitual.add(new RitualComponent(2, 4, -4, RitualComponent.WATER)); - meteorRitual.add(new RitualComponent(-4, 4, 2, RitualComponent.WATER)); - meteorRitual.add(new RitualComponent(-2, 4, 4, RitualComponent.WATER)); - meteorRitual.add(new RitualComponent(4, 4, -2, RitualComponent.WATER)); - meteorRitual.add(new RitualComponent(-2, 4, -4, RitualComponent.WATER)); - meteorRitual.add(new RitualComponent(-4, 4, -2, RitualComponent.WATER)); - meteorRitual.add(new RitualComponent(2, 4, 3, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(3, 4, 2, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(3, 4, 3, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(-2, 4, 3, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(3, 4, -2, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(3, 4, -3, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(2, 4, -3, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(-3, 4, 2, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(-3, 4, 3, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(-2, 4, -3, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(-3, 4, -2, RitualComponent.FIRE)); - meteorRitual.add(new RitualComponent(-3, 4, -3, RitualComponent.FIRE)); - return meteorRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java deleted file mode 100644 index dc3150e8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java +++ /dev/null @@ -1,169 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -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 WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; - -public class RitualEffectSupression extends RitualEffect -{ - public static final int aquasalusDrain = 15; - public static final int aetherDrain = 15; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - IBlockState stateish = world.getBlockState(pos.offsetDown()); - Block blockish = stateish.getBlock(); - - boolean hasAquasalus = this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, false); - boolean hasAether = this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false); - - int costMod = this.getCostModifier(blockish); - int radius = this.getRadiusForReagents(hasAether, hasAquasalus); - int masterRadius = radius; - - int yIndex = (int) (world.getWorldTime() % (2 * radius + 1)) - radius; - boolean expansion = false; - - if (ritualStone.getVar1() < (radius + 1)) - { - expansion = true; - radius = ritualStone.getVar1(); - ritualStone.setVar1(ritualStone.getVar1() + 1); - } - - if (currentEssence < this.getCostPerRefresh() * costMod) - { - EntityPlayer entityOwner = SpellHelper.getPlayerForUsername(owner); - - if (entityOwner == null) - { - return; - } - - entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } else - { - for (int i = -radius; i <= radius; i++) - { - for (int j = (expansion ? -radius : yIndex); j <= (expansion ? radius : yIndex); j++) - { - for (int k = -radius; k <= radius; k++) - { - if (i * i + j * j + k * k >= (radius + 0.50f) * (radius + 0.50f)) - { - continue; - } - - BlockPos newPos = pos.add(i, j, k); - IBlockState state = world.getBlockState(newPos); - - Block block = state.getBlock(); - - - if (SpellHelper.isBlockFluid(block)) - { - TESpectralContainer.createSpectralBlockAtLocation(world, newPos, 3 * masterRadius); - } else - { - TileEntity tile = world.getTileEntity(newPos); - if (tile instanceof TESpectralContainer) - { - ((TESpectralContainer) tile).resetDuration(3 * masterRadius); - } - } - } - } - } - - - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * costMod); - - if (world.getWorldTime() % 100 == 0) - { - if (hasAquasalus) - { - this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, true); - } - if (hasAether) - { - this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true); - } - } - } - } - - @Override - public int getCostPerRefresh() - { - return 2; - } - - @Override - public List getRitualComponentList() - { - ArrayList supressionRitual = new ArrayList(); - supressionRitual.add(new RitualComponent(2, 0, 2, RitualComponent.WATER)); - supressionRitual.add(new RitualComponent(2, 0, -2, RitualComponent.WATER)); - supressionRitual.add(new RitualComponent(-2, 0, 2, RitualComponent.WATER)); - supressionRitual.add(new RitualComponent(-2, 0, -2, RitualComponent.WATER)); - supressionRitual.add(new RitualComponent(-2, 0, -1, RitualComponent.AIR)); - supressionRitual.add(new RitualComponent(-1, 0, -2, RitualComponent.AIR)); - supressionRitual.add(new RitualComponent(-2, 0, 1, RitualComponent.AIR)); - supressionRitual.add(new RitualComponent(1, 0, -2, RitualComponent.AIR)); - supressionRitual.add(new RitualComponent(2, 0, 1, RitualComponent.AIR)); - supressionRitual.add(new RitualComponent(1, 0, 2, RitualComponent.AIR)); - supressionRitual.add(new RitualComponent(2, 0, -1, RitualComponent.AIR)); - supressionRitual.add(new RitualComponent(-1, 0, 2, RitualComponent.AIR)); - return supressionRitual; - } - - public int getCostModifier(Block block) - { - return 1; - } - - public int getRadiusForReagents(boolean hasAether, boolean hasAquasalus) - { - if (hasAether) - { - if (hasAquasalus) - { - return 30; - } else - { - return 20; - } - } else - { - if (hasAquasalus) - { - return 15; - } else - { - return 10; - } - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java deleted file mode 100644 index 18badc5d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java +++ /dev/null @@ -1,204 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.bindingRegistry.UnbindingRegistry; -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.BindableItems; -import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -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.util.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -public class RitualEffectUnbinding extends RitualEffect -{ - public static final int sanctusDrain = 1000; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (currentEssence < this.getCostPerRefresh()) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - int d0 = 0; - AxisAlignedBB axisalignedbb = new AxisAlignedBB(pos, pos.add(1, 1, 1)).expand(d0, d0, d0); - List list = world.getEntitiesWithinAABB(EntityItem.class, axisalignedbb); - Iterator iterator = list.iterator(); - EntityItem item; - - boolean drain = false; - - int x = pos.getX(); - int y = pos.getY(); - int z = pos.getZ(); - - while (iterator.hasNext()) - { - item = (EntityItem) iterator.next(); - ItemStack itemStack = item.getEntityItem(); - - if (itemStack == null) - { - continue; - } - - boolean hasSanctus = this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false); - if (hasSanctus) - { - if (itemStack.getItem() instanceof IBindable && !BindableItems.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)); - world.addWeatherEffect(new EntityLightningBolt(world, x + 5, y + 1, z)); - - BindableItems.setItemOwner(itemStack, ""); - this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true); - drain = true; - ritualStone.setActive(false); - break; - } - } - - if (itemStack.getItem() == ModItems.boundHelmet) - { - ritualStone.setVar1(5); - } else if (itemStack.getItem() == ModItems.boundChestplate) - { - ritualStone.setVar1(8); - } else if (itemStack.getItem() == ModItems.boundLeggings) - { - ritualStone.setVar1(7); - } else if (itemStack.getItem() == ModItems.boundBoots) - { - ritualStone.setVar1(4); - } - else if (UnbindingRegistry.isRequiredItemValid(itemStack)) - { - ritualStone.setVar1(UnbindingRegistry.getIndexForItem(itemStack) + 9); - } - - if (ritualStone.getVar1() > 0 && ritualStone.getVar1() <= 8) - { - item.setDead(); - doLightning(world, x, y, z); - ItemStack[] inv = ((BoundArmour) itemStack.getItem()).getInternalInventory(itemStack); - - if (inv != null) - { - 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()); - world.spawnEntityInWorld(newItem); - } - } - } - - EntityItem newItem = new EntityItem(world, x + 0.5, y + 1, z + 0.5, new ItemStack(ModBlocks.bloodSocket, ritualStone.getVar1())); - world.spawnEntityInWorld(newItem); - ritualStone.setActive(false); - drain = true; - break; - } - else if (ritualStone.getVar1() >= 9) - { - item.setDead(); - doLightning(world, x, y, z); - ItemStack spawnedItem = UnbindingRegistry.getOutputForIndex(ritualStone.getVar1() - 9); - EntityItem newItem = new EntityItem(world, x + 0.5, y + 1, z + 0.5, spawnedItem.copy()); - world.spawnEntityInWorld(newItem); - ritualStone.setActive(false); - drain = true; - break; - } - - } - - if (drain) { - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); - } - } - - if (world.rand.nextInt(10) == 0) - { - SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, world.provider.getDimensionId(), 1, pos); - } - } - - private void doLightning(World world, int x, int y, int z) - { - 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)); - world.addWeatherEffect(new EntityLightningBolt(world, x + 5, y + 1, z)); - } - - @Override - public int getCostPerRefresh() - { - return 0; - } - - @Override - public List getRitualComponentList() - { - ArrayList unbindingRitual = new ArrayList(); - unbindingRitual.add(new RitualComponent(-2, 0, 0, 4)); - unbindingRitual.add(new RitualComponent(2, 0, 0, 4)); - unbindingRitual.add(new RitualComponent(0, 0, 2, 4)); - unbindingRitual.add(new RitualComponent(0, 0, -2, 4)); - unbindingRitual.add(new RitualComponent(-2, 0, -2, 3)); - unbindingRitual.add(new RitualComponent(-2, 0, -3, 3)); - unbindingRitual.add(new RitualComponent(-3, 0, -2, 3)); - unbindingRitual.add(new RitualComponent(2, 0, -2, 3)); - unbindingRitual.add(new RitualComponent(2, 0, -3, 3)); - unbindingRitual.add(new RitualComponent(3, 0, -2, 3)); - unbindingRitual.add(new RitualComponent(-2, 0, 2, 3)); - unbindingRitual.add(new RitualComponent(-2, 0, 3, 3)); - unbindingRitual.add(new RitualComponent(-3, 0, 2, 3)); - unbindingRitual.add(new RitualComponent(2, 0, 2, 3)); - unbindingRitual.add(new RitualComponent(2, 0, 3, 3)); - unbindingRitual.add(new RitualComponent(3, 0, 2, 3)); - unbindingRitual.add(new RitualComponent(3, 1, 3, 0)); - unbindingRitual.add(new RitualComponent(3, 1, -3, 0)); - unbindingRitual.add(new RitualComponent(-3, 1, -3, 0)); - unbindingRitual.add(new RitualComponent(-3, 1, 3, 0)); - unbindingRitual.add(new RitualComponent(3, 2, 3, 0)); - unbindingRitual.add(new RitualComponent(3, 2, -3, 0)); - unbindingRitual.add(new RitualComponent(-3, 2, -3, 0)); - unbindingRitual.add(new RitualComponent(-3, 2, 3, 0)); - unbindingRitual.add(new RitualComponent(3, 3, 3, 2)); - unbindingRitual.add(new RitualComponent(3, 3, -3, 2)); - unbindingRitual.add(new RitualComponent(-3, 3, -3, 2)); - unbindingRitual.add(new RitualComponent(-3, 3, 3, 2)); - unbindingRitual.add(new RitualComponent(-5, 0, 0, 2)); - unbindingRitual.add(new RitualComponent(5, 0, 0, 2)); - unbindingRitual.add(new RitualComponent(0, 0, 5, 2)); - unbindingRitual.add(new RitualComponent(0, 0, -5, 2)); - return unbindingRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java deleted file mode 100644 index b1efd0e2..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java +++ /dev/null @@ -1,136 +0,0 @@ -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.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks; -import WayofTime.alchemicalWizardry.common.CoordAndRange; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -public class RitualEffectVeilOfEvil extends RitualEffect -{ - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (currentEssence < this.getCostPerRefresh()) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - int horizRange = 32; - int vertRange = 32; - - int dimension = world.provider.getDimensionId(); - - if (AlchemicalWizardryEventHooks.forceSpawnMap.containsKey(dimension)) - { - List list = AlchemicalWizardryEventHooks.forceSpawnMap.get(dimension); - if (list != null) - { - if (!list.contains(new CoordAndRange(pos, horizRange, vertRange))) - { - boolean hasFoundAndRemoved = false; - for (CoordAndRange coords : list) - { - BlockPos locationPos = coords.getPos(); - - if (locationPos.equals(pos)) - { - list.remove(coords); - hasFoundAndRemoved = true; - break; - } - } - list.add(new CoordAndRange(pos, horizRange, vertRange)); - } - } else - { - list = new LinkedList(); - list.add(new CoordAndRange(pos, horizRange, vertRange)); - AlchemicalWizardryEventHooks.forceSpawnMap.put(dimension, list); - } - } else - { - List list = new LinkedList(); - list.add(new CoordAndRange(pos, horizRange, vertRange)); - AlchemicalWizardryEventHooks.forceSpawnMap.put(dimension, list); - } - - - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); - } - } - - @Override - public int getCostPerRefresh() - { - return 20; - } - - @Override - public List getRitualComponentList() - { - ArrayList veilRitual = new ArrayList(); - - veilRitual.add(new RitualComponent(1, 0, 2, RitualComponent.DUSK)); - veilRitual.add(new RitualComponent(2, 0, 1, RitualComponent.DUSK)); - veilRitual.add(new RitualComponent(1, 0, -2, RitualComponent.DUSK)); - veilRitual.add(new RitualComponent(-2, 0, 1, RitualComponent.DUSK)); - veilRitual.add(new RitualComponent(-1, 0, 2, RitualComponent.DUSK)); - veilRitual.add(new RitualComponent(2, 0, -1, RitualComponent.DUSK)); - veilRitual.add(new RitualComponent(-1, 0, -2, RitualComponent.DUSK)); - veilRitual.add(new RitualComponent(-2, 0, -1, RitualComponent.DUSK)); - - veilRitual.add(new RitualComponent(3, 0, 3, RitualComponent.FIRE)); - veilRitual.add(new RitualComponent(-3, 0, 3, RitualComponent.FIRE)); - veilRitual.add(new RitualComponent(3, 0, -3, RitualComponent.FIRE)); - veilRitual.add(new RitualComponent(-3, 0, -3, RitualComponent.FIRE)); - - for (int i = 0; i <= 1; i++) - { - veilRitual.add(new RitualComponent((4 + i), i, 0, RitualComponent.DUSK)); - veilRitual.add(new RitualComponent((4 + i), i, -1, RitualComponent.BLANK)); - veilRitual.add(new RitualComponent((4 + i), i, 1, RitualComponent.BLANK)); - - veilRitual.add(new RitualComponent(-(4 + i), i, 0, RitualComponent.DUSK)); - veilRitual.add(new RitualComponent(-(4 + i), i, -1, RitualComponent.BLANK)); - veilRitual.add(new RitualComponent(-(4 + i), i, 1, RitualComponent.BLANK)); - - veilRitual.add(new RitualComponent(0, i, (4 + i), RitualComponent.DUSK)); - veilRitual.add(new RitualComponent(1, i, (4 + i), RitualComponent.BLANK)); - veilRitual.add(new RitualComponent(-1, i, (4 + i), RitualComponent.BLANK)); - - veilRitual.add(new RitualComponent(0, i, -(4 + i), RitualComponent.DUSK)); - veilRitual.add(new RitualComponent(1, i, -(4 + i), RitualComponent.BLANK)); - veilRitual.add(new RitualComponent(-1, i, -(4 + i), RitualComponent.BLANK)); - - veilRitual.add(new RitualComponent(4, i, 5, RitualComponent.EARTH)); - veilRitual.add(new RitualComponent(5, i, 4, RitualComponent.EARTH)); - veilRitual.add(new RitualComponent(4, i, -5, RitualComponent.EARTH)); - veilRitual.add(new RitualComponent(-5, i, 4, RitualComponent.EARTH)); - veilRitual.add(new RitualComponent(-4, i, 5, RitualComponent.EARTH)); - veilRitual.add(new RitualComponent(5, i, -4, RitualComponent.EARTH)); - veilRitual.add(new RitualComponent(-4, i, -5, RitualComponent.EARTH)); - veilRitual.add(new RitualComponent(-5, i, -4, RitualComponent.EARTH)); - } - - veilRitual.add(new RitualComponent(5, 1, 5, RitualComponent.BLANK)); - veilRitual.add(new RitualComponent(-5, 1, 5, RitualComponent.BLANK)); - veilRitual.add(new RitualComponent(5, 1, -5, RitualComponent.BLANK)); - veilRitual.add(new RitualComponent(-5, 1, -5, RitualComponent.BLANK)); - - return veilRitual; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java deleted file mode 100644 index 87e19084..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java +++ /dev/null @@ -1,203 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -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; - public static final int reductusDrain = 2; - public static final int crystallosDrain = 10; - - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - 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) - { - int hydrationRange = 4; - int vertRange = 3; - - for (int i = -hydrationRange; i <= hydrationRange; i++) - { - for (int j = -vertRange; j <= vertRange; j++) - { - for (int k = -hydrationRange; k <= hydrationRange; k++) - { - BlockPos newPos = pos.add(i, j, k); - if (SpellHelper.hydrateSoil(world, newPos)) - { - this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, true); - } - } - } - } - } - - if (hasOffensa) - { - boolean hasReductus = this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); - boolean drainReductus = world.getWorldTime() % 100 == 0; - - int range = 10; - List list = SpellHelper.getEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, range); - for (Entity entity : list) - { - if (entity instanceof EntityLivingBase) - { - EntityLivingBase livingEntity = (EntityLivingBase) entity; - - if (livingEntity == SpellHelper.getPlayerForUsername(owner)) - { - continue; - } - - if (hasReductus && this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false)) - { - if (livingEntity instanceof EntityPlayer) - { - if (drainReductus) - { - this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true); - } - - continue; - } - } - - if (!livingEntity.isPotionActive(AlchemicalWizardry.customPotionDrowning)) - { - livingEntity.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 100, 0)); - this.canDrainReagent(ritualStone, ReagentRegistry.offensaReagent, offensaDrain, true); - } - } - } - } - - BlockPos newPos = pos.offsetUp(); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - - if (world.isAirBlock(newPos) && !(block instanceof BlockSpectralContainer)) - { - if (currentEssence < this.getCostPerRefresh()) - { - SoulNetworkHandler.causeNauseaToPlayer(owner); - } else - { - for (int i = 0; i < 10; i++) - { - SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, world.provider.getDimensionId(), 3, pos); - } - - world.setBlockState(newPos, Blocks.water.getDefaultState()); - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); - } - } else - { - boolean hasSanctus = this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false); - if (!hasSanctus) - { - return; - } - TileEntity tile = world.getTileEntity(newPos); - if (tile instanceof IFluidHandler) - { - int amount = ((IFluidHandler) tile).fill(EnumFacing.DOWN, new FluidStack(FluidRegistry.WATER, 1000), false); - if (amount >= 1000) - { - ((IFluidHandler) tile).fill(EnumFacing.DOWN, new FluidStack(FluidRegistry.WATER, 1000), true); - - this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true); - - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); - } - } - } - - if (hasCrystallos) - { - int range = 2; - 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); - - if (hasCrystallos) - { - boolean success = false; - newPos = pos.add(i, j, k); - if (!world.isAirBlock(newPos) && SpellHelper.freezeWaterBlock(world, newPos)) - { - success = true; - } else - { - if (world.rand.nextInt(100) == 0 && world.isSideSolid(newPos, EnumFacing.UP)) - { - success = true; - } - } - - if (success) - { - this.canDrainReagent(ritualStone, ReagentRegistry.crystallosReagent, crystallosDrain, true); - } - } - } - } - } - } - } - - public int getCostPerRefresh() - { - return 25; - } - - @Override - public List getRitualComponentList() - { - ArrayList waterRitual = new ArrayList(); - waterRitual.add(new RitualComponent(-1, 0, 1, 1)); - waterRitual.add(new RitualComponent(-1, 0, -1, 1)); - waterRitual.add(new RitualComponent(1, 0, -1, 1)); - waterRitual.add(new RitualComponent(1, 0, 1, 1)); - return waterRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java deleted file mode 100644 index 365e40b7..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java +++ /dev/null @@ -1,159 +0,0 @@ -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.BlockPos; -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; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; - -public class RitualEffectWellOfSuffering extends RitualEffect -{ - public static final int timeDelay = 25; - public static final int amount = 10; - - private static final int tennebraeDrain = 5; - private static final int potentiaDrain = 10; - private static final int offensaDrain = 3; - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - if (world.getWorldTime() % timeDelay != 0) - { - return; - } - - IBloodAltar tileAltar = null; - boolean testFlag = false; - - for (int i = -5; i <= 5; i++) - { - for (int j = -5; j <= 5; j++) - { - for (int k = -10; k <= 10; k++) - { - BlockPos newPos = pos.add(i, j, k); - if (world.getTileEntity(newPos) instanceof IBloodAltar) - { - tileAltar = (IBloodAltar) world.getTileEntity(newPos); - testFlag = true; - } - } - } - } - - if (!testFlag) - { - return; - } - - boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); - - int d0 = 10; - int vertRange = hasPotentia ? 20 : 10; - AxisAlignedBB axisalignedbb = new AxisAlignedBB(pos, pos.add(1, 1, 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 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 || AlchemicalWizardry.wellBlacklist.contains(livingEntity.getClass())) - { - continue; - } - - hasOffensa = hasOffensa && this.canDrainReagent(ritualStone, ReagentRegistry.offensaReagent, offensaDrain, true); - - if (livingEntity.attackEntityFrom(DamageSource.outOfWorld, hasOffensa ? 2 : 1)) - { - hasTennebrae = hasTennebrae && this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tennebraeDrain, true); - - - entityCount++; - tileAltar.sacrificialDaggerCall(amount * (hasTennebrae ? 2 : 1) * (hasOffensa ? 2 : 1), true); - } - } - - SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * entityCount); - - if(hasPotentia) - { - this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, true); - } - } - } - - @Override - public int getCostPerRefresh() - { - return 2; - } - - @Override - public List getRitualComponentList() - { - ArrayList wellOfSufferingRitual = new ArrayList(); - wellOfSufferingRitual.add(new RitualComponent(1, 0, 1, RitualComponent.FIRE)); - wellOfSufferingRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.FIRE)); - wellOfSufferingRitual.add(new RitualComponent(1, 0, -1, RitualComponent.FIRE)); - wellOfSufferingRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.FIRE)); - wellOfSufferingRitual.add(new RitualComponent(2, -1, 2, RitualComponent.FIRE)); - wellOfSufferingRitual.add(new RitualComponent(2, -1, -2, RitualComponent.FIRE)); - wellOfSufferingRitual.add(new RitualComponent(-2, -1, 2, RitualComponent.FIRE)); - wellOfSufferingRitual.add(new RitualComponent(-2, -1, -2, RitualComponent.FIRE)); - wellOfSufferingRitual.add(new RitualComponent(0, -1, 2, RitualComponent.EARTH)); - wellOfSufferingRitual.add(new RitualComponent(2, -1, 0, RitualComponent.EARTH)); - wellOfSufferingRitual.add(new RitualComponent(0, -1, -2, RitualComponent.EARTH)); - wellOfSufferingRitual.add(new RitualComponent(-2, -1, 0, RitualComponent.EARTH)); - wellOfSufferingRitual.add(new RitualComponent(-3, -1, -3, RitualComponent.DUSK)); - wellOfSufferingRitual.add(new RitualComponent(3, -1, -3, RitualComponent.DUSK)); - wellOfSufferingRitual.add(new RitualComponent(-3, -1, 3, RitualComponent.DUSK)); - wellOfSufferingRitual.add(new RitualComponent(3, -1, 3, RitualComponent.DUSK)); - wellOfSufferingRitual.add(new RitualComponent(2, -1, 4, RitualComponent.WATER)); - wellOfSufferingRitual.add(new RitualComponent(4, -1, 2, RitualComponent.WATER)); - wellOfSufferingRitual.add(new RitualComponent(-2, -1, 4, RitualComponent.WATER)); - wellOfSufferingRitual.add(new RitualComponent(4, -1, -2, RitualComponent.WATER)); - wellOfSufferingRitual.add(new RitualComponent(2, -1, -4, RitualComponent.WATER)); - wellOfSufferingRitual.add(new RitualComponent(-4, -1, 2, RitualComponent.WATER)); - wellOfSufferingRitual.add(new RitualComponent(-2, -1, -4, RitualComponent.WATER)); - wellOfSufferingRitual.add(new RitualComponent(-4, -1, -2, RitualComponent.WATER)); - wellOfSufferingRitual.add(new RitualComponent(1, 0, 4, RitualComponent.WATER)); - wellOfSufferingRitual.add(new RitualComponent(4, 0, 1, RitualComponent.WATER)); - wellOfSufferingRitual.add(new RitualComponent(1, 0, -4, RitualComponent.WATER)); - wellOfSufferingRitual.add(new RitualComponent(-4, 0, 1, RitualComponent.WATER)); - wellOfSufferingRitual.add(new RitualComponent(-1, 0, 4, RitualComponent.WATER)); - wellOfSufferingRitual.add(new RitualComponent(4, 0, -1, RitualComponent.WATER)); - wellOfSufferingRitual.add(new RitualComponent(-1, 0, -4, RitualComponent.WATER)); - wellOfSufferingRitual.add(new RitualComponent(-4, 0, -1, RitualComponent.WATER)); - wellOfSufferingRitual.add(new RitualComponent(4, 1, 0, RitualComponent.AIR)); - wellOfSufferingRitual.add(new RitualComponent(0, 1, 4, RitualComponent.AIR)); - wellOfSufferingRitual.add(new RitualComponent(-4, 1, 0, RitualComponent.AIR)); - wellOfSufferingRitual.add(new RitualComponent(0, 1, -4, RitualComponent.AIR)); - return wellOfSufferingRitual; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicIgnMeta.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicIgnMeta.java deleted file mode 100644 index 2dd2077b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicIgnMeta.java +++ /dev/null @@ -1,13 +0,0 @@ -package WayofTime.alchemicalWizardry.common.routing; - -import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; -import net.minecraft.item.ItemStack; - -public class RoutingFocusLogicIgnMeta extends RoutingFocusLogic -{ - @Override - public boolean getDefaultMatch(ItemStack keyStack, ItemStack checkedStack) - { - return keyStack != null && checkedStack != null && keyStack.getItem() == checkedStack.getItem(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimit.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimit.java deleted file mode 100644 index ad1aed90..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimit.java +++ /dev/null @@ -1,13 +0,0 @@ -package WayofTime.alchemicalWizardry.common.routing; - -import WayofTime.alchemicalWizardry.api.ILimitingLogic; -import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; - -public class RoutingFocusLogicLimit extends RoutingFocusLogic implements ILimitingLogic -{ - @Override - 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 deleted file mode 100644 index 7c485ef9..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitDefault.java +++ /dev/null @@ -1,26 +0,0 @@ -package WayofTime.alchemicalWizardry.common.routing; - -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) - { - if(stack != null && stack.getItem() instanceof ILimitedRoutingFocus) - { - limit = ((ILimitedRoutingFocus)stack.getItem()).getRoutingFocusLimit(stack); - }else - { - limit = 0; - } - } - - @Override - public int getRoutingLimit() - { - return limit; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitGlobal.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitGlobal.java deleted file mode 100644 index 0e370db0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitGlobal.java +++ /dev/null @@ -1,32 +0,0 @@ -package WayofTime.alchemicalWizardry.common.routing; - -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) - { - if(stack != null && stack.getItem() instanceof ILimitedRoutingFocus) - { - limit = ((ILimitedRoutingFocus)stack.getItem()).getRoutingFocusLimit(stack); - }else - { - limit = 0; - } - } - - @Override - public int getRoutingLimit() - { - return limit; - } - - @Override - public boolean getDefaultMatch(ItemStack keyStack, ItemStack checkedStack) - { - return true; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitIgnMeta.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitIgnMeta.java deleted file mode 100644 index 74124d9e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitIgnMeta.java +++ /dev/null @@ -1,27 +0,0 @@ -package WayofTime.alchemicalWizardry.common.routing; - -import net.minecraft.item.ItemStack; -import WayofTime.alchemicalWizardry.api.ILimitingLogic; -import WayofTime.alchemicalWizardry.common.items.routing.ILimitedRoutingFocus; - -public class RoutingFocusLogicLimitIgnMeta extends RoutingFocusLogicIgnMeta implements ILimitingLogic -{ - public int limit = 0; - - public RoutingFocusLogicLimitIgnMeta(ItemStack stack) - { - if(stack != null && stack.getItem() instanceof ILimitedRoutingFocus) - { - limit = ((ILimitedRoutingFocus)stack.getItem()).getRoutingFocusLimit(stack); - }else - { - limit = 0; - } - } - - @Override - public int getRoutingLimit() - { - return limit; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitMatchNBT.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitMatchNBT.java deleted file mode 100644 index f7887a01..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitMatchNBT.java +++ /dev/null @@ -1,27 +0,0 @@ -package WayofTime.alchemicalWizardry.common.routing; - -import net.minecraft.item.ItemStack; -import WayofTime.alchemicalWizardry.api.ILimitingLogic; -import WayofTime.alchemicalWizardry.common.items.routing.ILimitedRoutingFocus; - -public class RoutingFocusLogicLimitMatchNBT extends RoutingFocusLogicMatchNBT implements ILimitingLogic -{ - public int limit = 0; - - public RoutingFocusLogicLimitMatchNBT(ItemStack stack) - { - if(stack != null && stack.getItem() instanceof ILimitedRoutingFocus) - { - limit = ((ILimitedRoutingFocus)stack.getItem()).getRoutingFocusLimit(stack); - }else - { - limit = 0; - } - } - - @Override - public int getRoutingLimit() - { - return limit; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitModItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitModItems.java deleted file mode 100644 index 907e925c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimitModItems.java +++ /dev/null @@ -1,27 +0,0 @@ -package WayofTime.alchemicalWizardry.common.routing; - -import net.minecraft.item.ItemStack; -import WayofTime.alchemicalWizardry.api.ILimitingLogic; -import WayofTime.alchemicalWizardry.common.items.routing.ILimitedRoutingFocus; - -public class RoutingFocusLogicLimitModItems extends RoutingFocusLogicModItems implements ILimitingLogic -{ - public int limit = 0; - - public RoutingFocusLogicLimitModItems(ItemStack stack) - { - if(stack != null && stack.getItem() instanceof ILimitedRoutingFocus) - { - limit = ((ILimitedRoutingFocus)stack.getItem()).getRoutingFocusLimit(stack); - }else - { - limit = 0; - } - } - - @Override - public int getRoutingLimit() - { - return limit; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicMatchNBT.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicMatchNBT.java deleted file mode 100644 index 382511b1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicMatchNBT.java +++ /dev/null @@ -1,18 +0,0 @@ -package WayofTime.alchemicalWizardry.common.routing; - -import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; -import net.minecraft.item.ItemStack; - -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); - } - - @Override - public boolean doesItemMatch(boolean previous, ItemStack keyStack, ItemStack checkedStack) - { - return previous && this.getDefaultMatch(keyStack, checkedStack); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java deleted file mode 100644 index c5f9d035..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java +++ /dev/null @@ -1,37 +0,0 @@ -package WayofTime.alchemicalWizardry.common.routing; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.registry.GameData; -import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; - -public class RoutingFocusLogicModItems extends RoutingFocusLogic -{ - @Override - public boolean getDefaultMatch(ItemStack keyStack, ItemStack checkedStack) - { - if(keyStack != null && checkedStack != null && keyStack.getItem() != null && checkedStack.getItem() != null) - { - String keyId = getModID(keyStack.getItem()); - String checkedId = getModID(checkedStack.getItem()); - return keyId.equals(checkedId); - } - - return false; - } - - public String getModID(Item itm) - { - String str = (String) GameData.getItemRegistry().getNameForObject(itm); - if(!str.isEmpty()) - { - String[] strs = str.split(":"); - if(strs != null && strs.length >= 1) - { - return strs[0]; - } - } - - return ""; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifier.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifier.java deleted file mode 100644 index 36754656..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifier.java +++ /dev/null @@ -1,21 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex; - -public class SpellModifier -{ - public static final int DEFAULT = 0; - public static final int OFFENSIVE = 1; - public static final int DEFENSIVE = 2; - public static final int ENVIRONMENTAL = 3; - - private int modifier; - - protected SpellModifier(int modifier) - { - this.modifier = modifier; - } - - public int getModifier() - { - return this.modifier; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefault.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefault.java deleted file mode 100644 index 771ca1ce..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefault.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex; - -public class SpellModifierDefault extends SpellModifier -{ - public SpellModifierDefault() - { - super(SpellModifier.DEFAULT); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefensive.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefensive.java deleted file mode 100644 index 29d89007..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefensive.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex; - -public class SpellModifierDefensive extends SpellModifier -{ - public SpellModifierDefensive() - { - super(SpellModifier.DEFENSIVE); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierEnvironmental.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierEnvironmental.java deleted file mode 100644 index f805dfca..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierEnvironmental.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex; - -public class SpellModifierEnvironmental extends SpellModifier -{ - public SpellModifierEnvironmental() - { - super(SpellModifier.ENVIRONMENTAL); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierOffensive.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierOffensive.java deleted file mode 100644 index 5d956e3f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierOffensive.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex; - -public class SpellModifierOffensive extends SpellModifier -{ - public SpellModifierOffensive() - { - super(SpellModifier.OFFENSIVE); - } -} 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 deleted file mode 100644 index 334cd450..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/OutputRoutingFocusModItems.java +++ /dev/null @@ -1,19 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect; - -import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; -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"; - } - - public RoutingFocusLogic getLogic() - { - return new RoutingFocusLogicModItems(); - } -} 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 deleted file mode 100644 index 7e040efe..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java +++ /dev/null @@ -1,967 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect; - -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.block.state.IBlockState; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnchantmentProtection; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityList; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.init.Blocks; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.network.play.server.S06PacketUpdateHealth; -import net.minecraft.network.play.server.S07PacketRespawn; -import net.minecraft.network.play.server.S1DPacketEntityEffect; -import net.minecraft.network.play.server.S1FPacketSetExperience; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.management.ServerConfigurationManager; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; -import net.minecraft.world.WorldServer; -import net.minecraftforge.common.util.FakePlayer; -import net.minecraftforge.fluids.IFluidBlock; -import net.minecraftforge.fml.common.FMLCommonHandler; -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; - -public class SpellHelper extends APISpellHelper -{ - 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(new Vec3(entity.posX, entity.posY, entity.posZ), new Vec3(entity2.posX, entity2.posY, entity2.posZ), false) == null; - } - - public static void smeltBlockInWorld(World world, BlockPos pos) - { - FurnaceRecipes recipes = FurnaceRecipes.instance(); - - IBlockState state = world.getBlockState(pos); - Block block = state.getBlock(); - if (block == null) - { - return; - } - - int meta = block.getMetaFromState(state); - - ItemStack smeltedStack = recipes.getSmeltingResult(new ItemStack(block, 1, meta)); - if (smeltedStack != null && smeltedStack.getItem() instanceof ItemBlock) - { - world.setBlockState(pos, ((ItemBlock) (smeltedStack.getItem())).block.getStateFromMeta(smeltedStack.getItemDamage()), 3); - } - } - - public static boolean canPlayerSeeAlchemy(EntityPlayer player) - { - if (player != null) - { - ItemStack stack = player.getCurrentArmor(3); - if (stack != null) - { - Item item = stack.getItem(); - if (item instanceof IAlchemyGoggles && ((IAlchemyGoggles) item).showIngameHUD(player.worldObj, stack, player)) - { - return true; - } - } - - ItemStack heldStack = player.getHeldItem(); - if (heldStack != null && heldStack.getItem() instanceof IReagentManipulator) - { - return true; - } - } - - return false; - } - - public static boolean canPlayerSeeLPBar(EntityPlayer player) - { - if (player != null) - { - for(int i=0; i<4; i++) - { - ItemStack stack = player.getCurrentArmor(i); - if (stack != null) - { - Item item = stack.getItem(); - if (item instanceof ILPGauge && ((ILPGauge) item).canSeeLPBar(stack)) - { - return true; - } - } - - } - - ItemStack heldStack = player.getHeldItem(); - - if (heldStack != null && heldStack.getItem() instanceof SigilDivination) - { - return true; - } - } - - return false; - } - - public static List getEntitiesInRange(World world, double posX, double posY, double posZ, double horizontalRadius, double verticalRadius) - { - return world.getEntitiesWithinAABB(Entity.class, new AxisAlignedBB(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) - { - return world.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(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) - { - return world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(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) - { - return world.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius)); - } - - public static double gaussian(double d) - { - return d * ((rand.nextFloat() - 0.5D)); - } - - public static EnumFacing getDirectionForLookVector(Vec3 lookVec) - { - double distance = lookVec.lengthVector(); - - if (lookVec.yCoord > distance * 0.9) - { - return EnumFacing.UP; - } - if (lookVec.yCoord < distance * -0.9) - { - return EnumFacing.DOWN; - } - - return getCompassDirectionForLookVector(lookVec); - } - - public static EnumFacing getCompassDirectionForLookVector(Vec3 lookVec) - { - double radius = Math.sqrt(Math.pow(lookVec.xCoord, 2) + Math.pow(lookVec.zCoord, 2)); - - if (lookVec.zCoord > radius * 1 / root2) - { - return EnumFacing.SOUTH; - } - if (lookVec.zCoord < -radius * 1 / root2) - { - return EnumFacing.NORTH; - } - if (lookVec.xCoord > radius * 1 / root2) - { - return EnumFacing.EAST; - } - if (lookVec.xCoord < -radius * 1 / root2) - { - return EnumFacing.WEST; - } - - return EnumFacing.EAST; - } - - public static boolean freezeWaterBlock(World world, BlockPos pos) - { - IBlockState state = world.getBlockState(pos); - Block block = state.getBlock(); - - if (block == Blocks.water || block == Blocks.flowing_water) - { - world.setBlockState(pos, Blocks.ice.getDefaultState()); - return true; - } - - return false; - } - - public static String getUsername(EntityPlayer player) - { - return SoulNetworkHandler.getUsername(player); - } - - public static EntityPlayer getPlayerForUsername(String str) - { - return SoulNetworkHandler.getPlayerForUsername(str); - } - - public static void sendParticleToPlayer(EntityPlayer player, EnumParticleTypes type, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel) - { - if (player instanceof EntityPlayerMP) - { - NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getParticlePacket(type, xCoord, yCoord, zCoord, xVel, yVel, zVel), (EntityPlayerMP) player); - } - } - - public static void sendIndexedParticleToPlayer(EntityPlayer player, int index, double xCoord, double yCoord, double zCoord) - { - switch (index) - { - case 1: - SpellHelper.sendParticleToPlayer(player, EnumParticleTypes.SPELL_MOB, xCoord + 0.5D + rand.nextGaussian() / 8, yCoord + 1.1D, zCoord + 0.5D + rand.nextGaussian() / 8, 0.5117D, 0.0117D, 0.0117D); - break; - case 2: - SpellHelper.sendParticleToPlayer(player, EnumParticleTypes.REDSTONE, xCoord + 0.5D + rand.nextGaussian() / 8, yCoord + 1.1D, zCoord + 0.5D + rand.nextGaussian() / 8, 0.82D, 0.941D, 0.91D); - break; - case 3: - SpellHelper.sendParticleToPlayer(player, EnumParticleTypes.SPELL_MOB, xCoord + 0.5D + rand.nextGaussian() / 8, yCoord + 1.1D, zCoord + 0.5D + rand.nextGaussian() / 8, 1.0D, 0.371D, 0.371D); - break; - case 4: - float f = 1.0F; - float f1 = f * 0.6F + 0.4F; - float f2 = f * f * 0.7F - 0.5F; - float f3 = f * f * 0.6F - 0.7F; - - for (int l = 0; l < 8; ++l) - { - SpellHelper.sendParticleToPlayer(player, EnumParticleTypes.REDSTONE, xCoord + Math.random() - Math.random(), yCoord + Math.random() - Math.random(), zCoord + Math.random() - Math.random(), f1, f2, f3); - } - break; - } - } - - public static void sendParticleToAllAround(World world, double xPos, double yPos, double zPos, int radius, int dimension, EnumParticleTypes type, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel) - { - List entities = SpellHelper.getPlayersInRange(world, xPos, yPos, zPos, radius, radius); - - if (entities == null) - { - return; - } - - for (EntityPlayer player : entities) - { - SpellHelper.sendParticleToPlayer(player, type, xCoord, yCoord, zCoord, xVel, yVel, zVel); - } - } - - 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) - { - return; - } - - for (EntityPlayer player : entities) - { - SpellHelper.sendIndexedParticleToPlayer(player, index, xCoord, yCoord, zCoord); - } - } - - public static void sendIndexedParticleToAllAround(World world, BlockPos pos1, int radius, int dimension, int index, BlockPos coordPos) - { - sendIndexedParticleToAllAround(world, pos1.getX(), pos1.getY(), pos1.getZ(), radius, dimension, index, coordPos.getX(), coordPos.getY(), coordPos.getZ()); - } - - 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); - } - } - - public static boolean isFakePlayer(World world, EntityPlayer player) - { - return !world.isRemote && isFakePlayer(player); - } - - 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(); - } - - public static void smashBlock(World world, BlockPos pos) - { - IBlockState state = world.getBlockState(pos); - Block block = state.getBlock(); - - if (block == Blocks.stone) - { - world.setBlockState(pos, Blocks.cobblestone.getDefaultState()); - } else if (block == Blocks.cobblestone) - { - world.setBlockState(pos, Blocks.gravel.getDefaultState()); - } else if (block == Blocks.gravel) - { - world.setBlockState(pos, Blocks.sand.getDefaultState()); - } - } - - public static boolean isBlockFluid(Block block) - { - return block instanceof IFluidBlock || block instanceof BlockLiquid; - } - - public static void evaporateWaterBlock(World world, BlockPos pos) - { - IBlockState state = world.getBlockState(pos); - Block block = state.getBlock(); - - if (block == Blocks.water || block == Blocks.flowing_water) - { - world.setBlockToAir(pos); - } - } - - public static ItemStack getDustForOre(ItemStack item) - { - int [] oreIds = OreDictionary.getOreIDs(item); - - for(int id : oreIds) - { - String oreName = OreDictionary.getOreName(id); - - if (oreName.contains("ore")) - { - String lowercaseOre = oreName.toLowerCase(); - boolean isAllowed = false; - - for (String str : AlchemicalWizardry.allowedCrushedOresArray) - { - String testStr = str.toLowerCase(); - - if (lowercaseOre.contains(testStr)) - { - isAllowed = true; - break; - } - } - - if (!isAllowed) - { - return null; - } - - String dustName = oreName.replace("ore", "dust"); - - List items = OreDictionary.getOres(dustName); - - if (items != null && items.size() >= 1) - { - return (items.get(0).copy()); - } - } - } - - return null; - } - - public static String getNumeralForInt(int num) - { - switch (num) - { - case 1: - return "I"; - case 2: - return "II"; - case 3: - return "III"; - case 4: - return "IV"; - case 5: - return "V"; - case 6: - return "VI"; - case 7: - return "VII"; - case 8: - return "VIII"; - case 9: - return "IX"; - case 10: - return "X"; - default: - return ""; - } - } - - /** - * 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 - * @return True if they can be combined - */ - public static boolean canCombine(ItemStack stack1, ItemStack stack2) - { - if (stack1 == null) - { - return false; - } - - if (stack2 == null) - { - return true; - } - - if (stack1.isItemStackDamageable() ^ stack2.isItemStackDamageable()) - { - return false; - } - - return stack1.getItem() == stack2.getItem() && stack1.getItemDamage() == stack2.getItemDamage() && ItemStack.areItemStackTagsEqual(stack1, stack2); - } - - /** - * @param stack1 Stack that is placed into a slot - * @param stack2 Slot content that stack1 is placed into - * @return Stacks after stacking - */ - public static ItemStack[] combineStacks(ItemStack stack1, ItemStack stack2, int transferMax) - { - ItemStack[] returned = new ItemStack[2]; - - if (canCombine(stack1, stack2)) - { - int transferedAmount = Math.min(transferMax, stack2 == null ? stack1.stackSize : Math.min(stack2.getMaxStackSize() - stack2.stackSize, stack1.stackSize)); - if (transferedAmount > 0) - { - ItemStack copyStack = stack1.splitStack(transferedAmount); - if (stack2 == null) - { - stack2 = copyStack; - } else - { - stack2.stackSize += transferedAmount; - } - } - } - - returned[0] = stack1; - returned[1] = stack2; - - return returned; - } - - /** - * @param stack1 Stack that is placed into a slot - * @param stack2 Slot content that stack1 is placed into - * @return Stacks after stacking - */ - public static ItemStack[] combineStacks(ItemStack stack1, ItemStack stack2) - { - ItemStack[] returned = new ItemStack[2]; - - if (canCombine(stack1, stack2)) - { - int transferedAmount = stack2 == null ? stack1.stackSize : Math.min(stack2.getMaxStackSize() - stack2.stackSize, stack1.stackSize); - if (transferedAmount > 0) - { - ItemStack copyStack = stack1.splitStack(transferedAmount); - if (stack2 == null) - { - stack2 = copyStack; - } else - { - stack2.stackSize += transferedAmount; - } - } - } - - returned[0] = stack1; - returned[1] = stack2; - - return returned; - } - - public static ItemStack insertStackIntoInventory(ItemStack stack, IInventory inventory, EnumFacing dir) - { - if (stack == null) - { - return null; - } - - boolean[] canBeInserted = new boolean[inventory.getSizeInventory()]; - - if(inventory instanceof ISidedInventory) - { - int[] array = ((ISidedInventory)inventory).getSlotsForFace(dir); - for(int in : array) - { - canBeInserted[in] = inventory.isItemValidForSlot(in, stack) && ((ISidedInventory)inventory).canInsertItem(in, stack, dir); - } - }else - { - for(int i=0; i= limit) - { - return stack; - } - - int newLimit = limit - numberMatching; - - for (int i = 0; i < inventory.getSizeInventory(); i++) - { - if(!canBeInserted[i]) - { - continue; - } - - int prevStackSize = stack.stackSize; - - ItemStack[] combinedStacks = combineStacks(stack, inventory.getStackInSlot(i), newLimit); - stack = combinedStacks[0]; - inventory.setInventorySlotContents(i, combinedStacks[1]); - - newLimit -= (prevStackSize - stack.stackSize); - - if (newLimit <= 0 || stack.stackSize <= 0) - { - return stack; - } - } - - return stack; - } - - public static int getNumberOfItemsInInventory(IInventory inventory, EnumFacing dir) - { - boolean[] canBeInserted = new boolean[inventory.getSizeInventory()]; - - if(inventory instanceof ISidedInventory) - { - int[] array = ((ISidedInventory)inventory).getSlotsForFace(dir); - for(int in : array) - { - canBeInserted[in] = true; - } - }else - { - for(int i=0; i 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.getDimensionId(), player.dimension); - player.timeUntilPortal = 150; - } - player.worldObj.theProfiler.endSection(); - newWorldServer.playSoundEffect(d, e, f, "mob.endermen.portal", 1.0F, 1.0F); - return player; - } else - { - NBTTagCompound tag = new NBTTagCompound(); - entity.writeToNBTOptional(tag); - entity.setDead(); - oldWorld.playSoundEffect(entity.posX, entity.posY, entity.posZ, "mob.endermen.portal", 1.0F, 1.0F); - Entity teleportedEntity = EntityList.createEntityFromNBT(tag, newWorldServer); - if (teleportedEntity != null) - { - teleportedEntity.setLocationAndAngles(d, e, f, entity.rotationYaw, entity.rotationPitch); - teleportedEntity.forceSpawn = true; - newWorldServer.spawnEntityInWorld(teleportedEntity); - teleportedEntity.setWorld(newWorldServer); - teleportedEntity.timeUntilPortal = 150; - } - oldWorldServer.resetUpdateEntityTick(); - newWorldServer.resetUpdateEntityTick(); - newWorldServer.playSoundEffect(d, e, f, "mob.endermen.portal", 1.0F, 1.0F); - return teleportedEntity; - } - } - } - return null; - } - - public static boolean areItemStacksEqual(ItemStack stack, ItemStack compressedStack) - { - return stack.isItemEqual(compressedStack) && (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 - { -// if (entity instanceof EntityZombie) - { - //par2 = par2; // Forge: Noop Warning - } - - int i; - int j; - float f1; - - if (entity.isPotionActive(Potion.resistance) && p_70672_1_ != DamageSource.outOfWorld) - { - i = (entity.getActivePotionEffect(Potion.resistance).getAmplifier() + 1) * 5; - j = 25 - i; - f1 = p_70672_2_ * (float)j; - p_70672_2_ = f1 / 25.0F; - } - - if (p_70672_2_ <= 0.0F) - { - return 0.0F; - } - else - { - return applySpecialProtection(entity, p_70672_1_, p_70672_2_); - } - } - } - - public static double protCoeff = 0.875; - public static double scalCoeff = 0.8; - - public static float applySpecialProtection(EntityLivingBase entity, DamageSource source, float damage) - { - ItemStack[] armour = entity.getInventory(); - - if(armour == null) - { - return damage; - } - - int total = 0; - for(int i = 0; i < armour.length; i++) - { - ItemStack stack = armour[i]; - if(stack != null) - { - NBTTagList nbttaglist = stack.getEnchantmentTagList(); - - if(nbttaglist != null) - { - for(int j = 0; j < nbttaglist.tagCount(); ++j) - { - short short1 = nbttaglist.getCompoundTagAt(i).getShort("id"); - short short2 = nbttaglist.getCompoundTagAt(i).getShort("lvl"); - - if (Enchantment.enchantmentsList[short1] != null) - { - Enchantment ench = Enchantment.enchantmentsList[short1]; - if(ench instanceof EnchantmentProtection) - { - total += ench.calcModifierDamage(short2, source); - } - } - } - } - } - } - - if(total > 0) - { - total = (total + 1 >> + 1) + rand.nextInt(total + 1 >> + 1); - if(total <= 20) - { - return damage * (25 - total) / 25; - }else - { - float factor = (float)(0.8 + 0.2 * (1 - Math.pow(protCoeff, Math.pow((total - 20), scalCoeff)))); - return damage * (1 - factor); - } - } - - return damage; - } -} 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 deleted file mode 100644 index fca0705a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefaultEarth.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEMeleeDefaultEarth(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmMelee) - { - ((SpellParadigmMelee)parad).addWorldEffect(new MeleeDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEMeleeDefaultEarth(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index c9e0954d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefensiveEarth.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEMeleeDefensiveEarth(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmMelee) - { - ((SpellParadigmMelee)parad).addWorldEffect(new MeleeDefensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEMeleeDefensiveEarth(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 35a00764..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeEnvironmentalEarth.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEMeleeEnvironmentalEarth(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmMelee) - { - ((SpellParadigmMelee)parad).addWorldEffect(new MeleeEnvironmentalEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEMeleeEnvironmentalEarth(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 9e294bb3..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeOffensiveEarth.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEMeleeOffensiveEarth(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmMelee) - { - ((SpellParadigmMelee)parad).addWorldEffect(new MeleeOffensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEMeleeOffensiveEarth(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 3f99eea3..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefaultEarth.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEProjectileDefaultEarth(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmProjectile) - { - ((SpellParadigmProjectile)parad).addImpactEffect(new ProjectileDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEProjectileDefaultEarth(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - return (int) (10 * Math.pow((0.5 * (this.powerEnhancement) + 1) * 2 + 1, 3) * Math.pow(0.85, 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 deleted file mode 100644 index 503fdd2a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefensiveEarth.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEProjectileDefensiveEarth(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmProjectile) - { - ((SpellParadigmProjectile)parad).addImpactEffect(new ProjectileDefensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEProjectileDefensiveEarth(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index cec867cd..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileEnvironmentalEarth.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEProjectileEnvironmentalEarth(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmProjectile) - { - ((SpellParadigmProjectile)parad).addUpdateEffect(new ProjectileEnvironmentalEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEProjectileEnvironmentalEarth(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 139c88bb..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileOffensiveEarth.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEProjectileOffensiveEarth(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmProjectile) - { - ((SpellParadigmProjectile)parad).addImpactEffect(new ProjectileOffensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEProjectileOffensiveEarth(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index fd767c1b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefaultEarth.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSESelfDefaultEarth(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmSelf) - { - ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSESelfDefaultEarth(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 64700185..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefensiveEarth.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSESelfDefensiveEarth(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmSelf) - { - ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfDefensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSESelfDefensiveEarth(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 1c5daa18..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfEnvironmentalEarth.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSESelfEnvironmentalEarth(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmSelf) - { - ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfEnvironmentalEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSESelfEnvironmentalEarth(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 3eb7bf79..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfOffensiveEarth.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSESelfOffensiveEarth(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmSelf) - { - ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfOffensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSESelfOffensiveEarth(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 0b38fa7b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefaultEarth.java +++ /dev/null @@ -1,75 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; - -public class CSEToolDefaultEarth extends ComplexSpellEffect -{ - public CSEToolDefaultEarth() - { - super(ComplexSpellType.EARTH, ComplexSpellModifier.DEFAULT); - } - - public CSEToolDefaultEarth(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmTool) - { - String toolClass = "pickaxe"; - - - float digSpeed = 7.0f; - - - switch (this.powerEnhancement) - { - case 1: - digSpeed = 9.0f; - break; - case 2: - digSpeed = 12.0f; - break; - case 3: - digSpeed = 16.0f; - break; - case 4: - digSpeed = 21.0f; - break; - case 5: - digSpeed = 27.0f; - break; - } - - - ((SpellParadigmTool)parad).setDigSpeed(toolClass, digSpeed); - - - int hlvl = this.potencyEnhancement + 2; - ((SpellParadigmTool)parad).setHarvestLevel(toolClass, hlvl); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEToolDefaultEarth(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 98416506..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefensiveEarth.java +++ /dev/null @@ -1,75 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; - -public class CSEToolDefensiveEarth extends ComplexSpellEffect -{ - public CSEToolDefensiveEarth() - { - super(ComplexSpellType.EARTH, ComplexSpellModifier.DEFENSIVE); - } - - public CSEToolDefensiveEarth(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmTool) - { - String toolClass = "shovel"; - - - float digSpeed = 7.0f; - - - switch (this.powerEnhancement) - { - case 1: - digSpeed = 9.0f; - break; - case 2: - digSpeed = 12.0f; - break; - case 3: - digSpeed = 16.0f; - break; - case 4: - digSpeed = 21.0f; - break; - case 5: - digSpeed = 27.0f; - break; - } - - - ((SpellParadigmTool)parad).setDigSpeed(toolClass, digSpeed); - - - int hlvl = this.potencyEnhancement + 2; - ((SpellParadigmTool)parad).setHarvestLevel(toolClass, hlvl); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEToolDefensiveEarth(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 376db588..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolEnvironmentalEarth.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEToolEnvironmentalEarth(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmTool) - { - ((SpellParadigmTool)parad).addDigAreaEffect(new ToolEnvironmentalEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEToolEnvironmentalEarth(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 02f1cf6b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolOffensiveEarth.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEToolOffensiveEarth(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmTool) - { - ((SpellParadigmTool)parad).addItemManipulatorEffect(new ToolOffensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEToolOffensiveEarth(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - return 1000; - } -} 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 deleted file mode 100644 index 7c4513aa..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeDefaultFire.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEMeleeDefaultFire(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmMelee) - { - ((SpellParadigmMelee) parad).addEntityEffect(new MeleeDefaultFire(powerEnhancement, potencyEnhancement, costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEMeleeDefaultFire(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 65915f0a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeDefensiveFire.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEMeleeDefensiveFire(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmMelee) - { - ((SpellParadigmMelee) parad).addWorldEffect(new MeleeDefensiveFire(powerEnhancement, potencyEnhancement, costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEMeleeDefensiveFire(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index f8851c7a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeEnvironmentalFire.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEMeleeEnvironmentalFire(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmMelee) - { - ((SpellParadigmMelee) parad).addWorldEffect(new MeleeEnvironmentalFire(powerEnhancement, potencyEnhancement, costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEMeleeEnvironmentalFire(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index e90b6a01..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEMeleeOffensiveFire.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEMeleeOffensiveFire(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmMelee) - { - ((SpellParadigmMelee) parad).addEntityEffect(new MeleeOffensiveFire(powerEnhancement, potencyEnhancement, costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEMeleeOffensiveFire(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index e87d633a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileDefaultFire.java +++ /dev/null @@ -1,47 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEProjectileDefaultFire(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmProjectile) - { - ((SpellParadigmProjectile) parad).addImpactEffect(new ProjectileDefaultFire(powerEnhancement, potencyEnhancement, costEnhancement)); - ((SpellParadigmProjectile) parad).damage += this.potencyEnhancement; - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEProjectileDefaultFire(power, cost, potency); - } - - @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)); - } -} 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 deleted file mode 100644 index 4739c7f0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileDefensiveFire.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEProjectileDefensiveFire(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmProjectile) - { - ((SpellParadigmProjectile) parad).addImpactEffect(new ProjectileDefensiveFire(powerEnhancement, potencyEnhancement, costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEProjectileDefensiveFire(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index be379e54..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileEnvironmentalFire.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEProjectileEnvironmentalFire(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmProjectile) - { - ((SpellParadigmProjectile) parad).addUpdateEffect(new ProjectileEnvironmentalFire(powerEnhancement, potencyEnhancement, costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEProjectileEnvironmentalFire(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 5637e353..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEProjectileOffensiveFire.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEProjectileOffensiveFire(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmProjectile) - { - ((SpellParadigmProjectile) parad).addImpactEffect(new ProjectileOffensiveFire(powerEnhancement, potencyEnhancement, costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEProjectileOffensiveFire(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 8cfe7696..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfDefaultFire.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSESelfDefaultFire(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmSelf) - { - ((SpellParadigmSelf) parad).addSelfSpellEffect(new SelfDefaultFire(powerEnhancement, potencyEnhancement, costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSESelfDefaultFire(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 3bc43070..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfDefensiveFire.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSESelfDefensiveFire(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmSelf) - { - ((SpellParadigmSelf) parad).addSelfSpellEffect(new SelfDefensiveFire(powerEnhancement, potencyEnhancement, costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSESelfDefensiveFire(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 116ae6d0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfEnvironmentalFire.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSESelfEnvironmentalFire(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmSelf) - { - ((SpellParadigmSelf) parad).addSelfSpellEffect(new SelfEnvironmentalFire(powerEnhancement, potencyEnhancement, costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSESelfEnvironmentalFire(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - return (int) ((15 * Math.pow(1.7, powerEnhancement) + 10 * Math.pow(potencyEnhancement, 1.8)) * Math.pow(0.85, 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 deleted file mode 100644 index c63b8539..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSESelfOffensiveFire.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSESelfOffensiveFire(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmSelf) - { - ((SpellParadigmSelf) parad).addSelfSpellEffect(new SelfOffensiveFire(powerEnhancement, potencyEnhancement, costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSESelfOffensiveFire(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 9885e23e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolDefaultFire.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEToolDefaultFire(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmTool) - { - ((SpellParadigmTool) parad).addItemManipulatorEffect(new ToolDefaultFire(powerEnhancement, potencyEnhancement, costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEToolDefaultFire(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - return 1000; - } -} 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 deleted file mode 100644 index d6244e78..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolDefensiveFire.java +++ /dev/null @@ -1,50 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEToolDefensiveFire(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmTool) - { - ((SpellParadigmTool)parad).addCritChance("defFire", this.potencyEnhancement); - - ((SpellParadigmTool)parad).addDuration("defFire", 1200 * this.powerEnhancement); - - ((SpellParadigmTool)parad).addToolString("defFire", "Unbreaking" + " " + SpellHelper.getNumeralForInt(this.powerEnhancement + 1)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEToolDefensiveFire(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index b60e1477..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolEnvironmentalFire.java +++ /dev/null @@ -1,49 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; -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); - } - - public CSEToolEnvironmentalFire(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmTool) - { - ((SpellParadigmTool)parad).addBlockBreakEffect(new ToolEnvironmentalFire(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - - ((SpellParadigmTool)parad).addToolString("envFire", "Magma Plume" + " " + SpellHelper.getNumeralForInt(this.powerEnhancement + 1)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEToolEnvironmentalFire(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - return 0; - } -} 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 deleted file mode 100644 index f8b5bab2..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/fire/CSEToolOffensiveFire.java +++ /dev/null @@ -1,49 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; -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); - } - - public CSEToolOffensiveFire(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmTool) - { - ((SpellParadigmTool)parad).addLeftClickEffect(new ToolOffensiveFire(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - - ((SpellParadigmTool)parad).addToolString("offFire", "Fire Aspect" + " " + SpellHelper.getNumeralForInt(this.powerEnhancement + 1)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEToolOffensiveFire(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index fde18f3c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeDefaultIce.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEMeleeDefaultIce(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmMelee) - { - ((SpellParadigmMelee)parad).addEntityEffect(new MeleeDefaultIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEMeleeDefaultIce(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - return (int) (250 * (potencyEnhancement + 1) * (1.5 * powerEnhancement + 1) * Math.pow(0.85, 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 deleted file mode 100644 index 180e5c29..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeDefensiveIce.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEMeleeDefensiveIce(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmMelee) - { - ((SpellParadigmMelee)parad).addWorldEffect(new MeleeDefensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEMeleeDefensiveIce(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index c1ff2fe0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeEnvironmentalIce.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEMeleeEnvironmentalIce(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmMelee) - { - ((SpellParadigmMelee)parad).addEntityEffect(new MeleeEnvironmentalIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEMeleeEnvironmentalIce(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - return (int) (20 * (0.5 * potencyEnhancement + 1) * (0 * powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); - } -} 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 deleted file mode 100644 index 02da02af..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeOffensiveIce.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEMeleeOffensiveIce(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmMelee) - { - ((SpellParadigmMelee)parad).addEntityEffect(new MeleeOffensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEMeleeOffensiveIce(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 469f4e76..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileDefaultIce.java +++ /dev/null @@ -1,47 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEProjectileDefaultIce(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - 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)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEProjectileDefaultIce(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - return (int) ((30) * (this.potencyEnhancement + 1) * Math.pow(0.85, 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 deleted file mode 100644 index e83e9071..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileDefensiveIce.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEProjectileDefensiveIce(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmProjectile) - { - ((SpellParadigmProjectile)parad).addImpactEffect(new ProjectileDefensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEProjectileDefensiveIce(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 90b73e16..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileEnvironmentalIce.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEProjectileEnvironmentalIce(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmProjectile) - { - ((SpellParadigmProjectile)parad).addUpdateEffect(new ProjectileEnvironmentalIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEProjectileEnvironmentalIce(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index a671096a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEProjectileOffensiveIce.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEProjectileOffensiveIce(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmProjectile) - { - ((SpellParadigmProjectile)parad).addImpactEffect(new ProjectileOffensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEProjectileOffensiveIce(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 494f1559..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfDefaultIce.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSESelfDefaultIce(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmSelf) - { - ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfDefaultIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSESelfDefaultIce(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - return (int) (20 * (this.powerEnhancement + 1) * Math.pow(0.85, 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 deleted file mode 100644 index 8ecf92eb..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfDefensiveIce.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSESelfDefensiveIce(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmSelf) - { - ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfDefensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSESelfDefensiveIce(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 1e0b9b95..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfEnvironmentalIce.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSESelfEnvironmentalIce(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmSelf) - { - ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfEnvironmentalIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSESelfEnvironmentalIce(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index da5daafe..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSESelfOffensiveIce.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSESelfOffensiveIce(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmSelf) - { - ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfOffensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSESelfOffensiveIce(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 14fe0ea0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolDefaultIce.java +++ /dev/null @@ -1,51 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; -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); - } - - public CSEToolDefaultIce(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmTool) - { - ((SpellParadigmTool)parad).addLeftClickEffect(new ToolDefaultIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - - ((SpellParadigmTool)parad).addToolString("FrostTouch", "FrostTouch" + " " + SpellHelper.getNumeralForInt((this.powerEnhancement + 1))); - - ((SpellParadigmTool)parad).addCritChance("FrostCrit", this.potencyEnhancement * 0.5f); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEToolDefaultIce(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 34ab2daf..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolDefensiveIce.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEToolDefensiveIce(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmTool) - { - ((SpellParadigmTool)parad).addToolSummonEffect(new ToolDefensiveIce(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEToolDefensiveIce(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index ac27a2a2..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolEnvironmentalIce.java +++ /dev/null @@ -1,48 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEToolEnvironmentalIce(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmTool) - { - ((SpellParadigmTool)parad).addToolString("SilkTouch", "Silk Touch" + " " + SpellHelper.getNumeralForInt((this.powerEnhancement + 1))); - - ((SpellParadigmTool)parad).setSilkTouch(true); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEToolEnvironmentalIce(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - return (int) (1000 * Math.pow(0.85, costEnhancement)); - } -} 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 deleted file mode 100644 index 15b3fd72..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEToolOffensiveIce.java +++ /dev/null @@ -1,50 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEToolOffensiveIce(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - 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).addCritChance("SharpCrit", this.potencyEnhancement); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEToolOffensiveIce(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index f47960e9..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefaultWind.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEMeleeDefaultWind(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmMelee) - { - ((SpellParadigmMelee)parad).addEntityEffect(new MeleeDefaultWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEMeleeDefaultWind(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index c4a05d55..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefensiveWind.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEMeleeDefensiveWind(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmMelee) - { - ((SpellParadigmMelee)parad).addEntityEffect(new MeleeDefensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEMeleeDefensiveWind(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index e47152f4..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeEnvironmentalWind.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEMeleeEnvironmentalWind(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmMelee) - { - ((SpellParadigmMelee)parad).addWorldEffect(new MeleeEnvironmentalWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEMeleeEnvironmentalWind(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 4af53a16..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeOffensiveWind.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEMeleeOffensiveWind(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmMelee) - { - ((SpellParadigmMelee)parad).addEntityEffect(new MeleeOffensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEMeleeOffensiveWind(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 387892bd..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefaultWind.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEProjectileDefaultWind(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmProjectile) - { - ((SpellParadigmProjectile)parad).addImpactEffect(new ProjectileDefaultWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEProjectileDefaultWind(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - return (int) (100 * (this.potencyEnhancement + 1) * Math.pow(0.85, 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 deleted file mode 100644 index 2381fda5..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefensiveWind.java +++ /dev/null @@ -1,45 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; - -public class CSEProjectileDefensiveWind extends ComplexSpellEffect -{ - public CSEProjectileDefensiveWind() - { - super(ComplexSpellType.WIND, ComplexSpellModifier.DEFENSIVE); - } - - public CSEProjectileDefensiveWind(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmProjectile) - { - ((SpellParadigmProjectile)parad).isSilkTouch = true; - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEProjectileDefensiveWind(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - return (int) (100 * (this.potencyEnhancement + 1)); - } -} 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 deleted file mode 100644 index 154865f2..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileEnvironmentalWind.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEProjectileEnvironmentalWind(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmProjectile) - { - ((SpellParadigmProjectile)parad).addUpdateEffect(new ProjectileEnvironmentalWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEProjectileEnvironmentalWind(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index b215b6be..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileOffensiveWind.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEProjectileOffensiveWind(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmProjectile) - { - ((SpellParadigmProjectile)parad).addImpactEffect(new ProjectileOffensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEProjectileOffensiveWind(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 4641e662..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfDefaultWind.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSESelfDefaultWind(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmSelf) - { - ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfDefaultWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSESelfDefaultWind(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - return (int) (100 * Math.pow(0.85, 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 deleted file mode 100644 index 7538b1d8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfDefensiveWind.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSESelfDefensiveWind(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmSelf) - { - ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfDefensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSESelfDefensiveWind(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 46d3ae38..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfEnvironmentalWind.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSESelfEnvironmentalWind(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmSelf) - { - ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfEnvironmentalWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSESelfEnvironmentalWind(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 78a5a021..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSESelfOffensiveWind.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSESelfOffensiveWind(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmSelf) - { - ((SpellParadigmSelf)parad).addSelfSpellEffect(new SelfOffensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSESelfOffensiveWind(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - return (int) (100 * (0.5 * this.powerEnhancement + 1) * Math.pow(0.85, 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 deleted file mode 100644 index 041e9b12..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolDefaultWind.java +++ /dev/null @@ -1,71 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; - -public class CSEToolDefaultWind extends ComplexSpellEffect -{ - public CSEToolDefaultWind() - { - super(ComplexSpellType.WIND, ComplexSpellModifier.DEFAULT); - } - - public CSEToolDefaultWind(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmTool) - { - String toolClass = "axe"; - - float digSpeed = 7.0f; - - switch (this.powerEnhancement) - { - case 1: - digSpeed = 9.0f; - break; - case 2: - digSpeed = 12.0f; - break; - case 3: - digSpeed = 16.0f; - break; - case 4: - digSpeed = 21.0f; - break; - case 5: - digSpeed = 27.0f; - break; - } - - ((SpellParadigmTool)parad).setDigSpeed(toolClass, digSpeed); - - int hlvl = this.potencyEnhancement + 2; - ((SpellParadigmTool)parad).setHarvestLevel(toolClass, hlvl); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEToolDefaultWind(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index c0e6aa1f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolDefensiveWind.java +++ /dev/null @@ -1,48 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; -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); - } - - public CSEToolDefensiveWind(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @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)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEToolDefensiveWind(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - 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 deleted file mode 100644 index 06a63676..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolEnvironmentalWind.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEToolEnvironmentalWind(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmTool) - { - ((SpellParadigmTool)parad).addBlockBreakEffect(new ToolEnvironmentalWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEToolEnvironmentalWind(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - return (int) (150 * (1 + this.powerEnhancement) * Math.pow(0.85, 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 deleted file mode 100644 index b648c24f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEToolOffensiveWind.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellEffect; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellModifier; -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -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); - } - - public CSEToolOffensiveWind(int power, int cost, int potency) - { - this(); - - this.powerEnhancement = power; - this.costEnhancement = cost; - this.potencyEnhancement = potency; - } - - @Override - public void modifyParadigm(SpellParadigm parad) - { - if(parad instanceof SpellParadigmTool) - { - ((SpellParadigmTool)parad).addLeftClickEffect(new ToolOffensiveWind(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); - } - } - - @Override - public ComplexSpellEffect copy(int power, int cost, int potency) - { - return new CSEToolOffensiveWind(power, cost, potency); - } - - @Override - public int getCostOfEffect() - { - return 0; //Cost is on the attack method - } -} 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 deleted file mode 100644 index cf4ed985..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefaultEarth.java +++ /dev/null @@ -1,48 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityFallingBlock; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; -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); - } - - @Override - public void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos) - { - int radius = this.potencyUpgrades; - - for (int i = -radius; i <= radius; i++) - { - for (int j = -radius; j <= radius; j++) - { - for (int k = -radius; k <= radius; k++) - { - BlockPos newPos = pos.add(i, j, k); - if (!world.isAirBlock(newPos) && world.getTileEntity(newPos) == null) - { - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - - if (block.getBlockHardness(world, newPos) == -1) - { - continue; - } - - EntityFallingBlock entity = new EntityFallingBlock(world, newPos.getX() + 0.5f, newPos.getY() + 0.5f, newPos.getZ() + 0.5f, state); - 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 deleted file mode 100644 index e470be7c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefensiveEarth.java +++ /dev/null @@ -1,38 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -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); - } - - @Override - public void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos) - { - EnumFacing 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 horizRadius = this.potencyUpgrades + 1; - - int xOff = dir.getFrontOffsetX(); - int zOff = dir.getFrontOffsetZ(); - - for (int i = -horizRadius; i <= horizRadius; i++) - { - for (int j = 0; j < vertRadius; j++) - { - BlockTeleposer.swapBlocks(this, world, world, pos.add(i * zOff, j, i * xOff), pos.add(i * zOff, j - vertRadius, i * xOff)); - } - } - } -} 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 deleted file mode 100644 index f80a0e70..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeEnvironmentalEarth.java +++ /dev/null @@ -1,53 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -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); - } - - @Override - public void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos) - { - int radius = this.potencyUpgrades; - - for (int i = -radius; i <= radius; i++) - { - for (int j = -radius; j <= radius; j++) - { - for (int k = -radius; k <= radius; k++) - { - BlockPos newPos = pos.add(i, j, k); - if (!world.isAirBlock(newPos) && world.getTileEntity(newPos) == null) - { - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - ItemStack stack = new ItemStack(block, 1, block.getMetaFromState(state)); - - ItemStack dustStack = SpellHelper.getDustForOre(stack); - - if (dustStack != null) - { - dustStack.stackSize = 3; - world.spawnEntityInWorld(new EntityItem(world, newPos.getX() + 0.5, newPos.getY() + 0.5, newPos.getZ() + 0.5, dustStack)); - - world.setBlockToAir(newPos); - } - } - } - } - } - } -} 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 deleted file mode 100644 index 990a81fd..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeOffensiveEarth.java +++ /dev/null @@ -1,34 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; -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); - } - - @Override - public void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos) - { - int radius = this.potencyUpgrades; - - for (int i = -radius; i <= radius; i++) - { - for (int j = -radius; j <= radius; j++) - { - for (int k = -radius; k <= radius; k++) - { - BlockPos newPos = pos.add(i, j, k); - SpellHelper.smashBlock(world, newPos); - } - } - } - } -} 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 deleted file mode 100644 index d28c5343..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefaultEarth.java +++ /dev/null @@ -1,55 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.util.BlockPos; -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); - } - - @Override - public void onEntityImpact(Entity mop, Entity proj) - { - } - - @Override - public void onTileImpact(World world, MovingObjectPosition mop) - { - BlockPos pos = mop.func_178782_a(); - - int horizRange = (int) (0.5 * (this.powerUpgrades) + 1); - int vertRange = (int) (0.5 * (this.powerUpgrades) + 1); - - for (int i = -horizRange; i <= horizRange; i++) - { - for (int j = -vertRange; j <= vertRange; j++) - { - for (int k = -horizRange; k <= horizRange; k++) - { - BlockPos newPos = pos.add(i, j, k); - if (!world.isAirBlock(newPos)) - { - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - if (block == null || block.getBlockHardness(world, newPos) == -1 || SpellHelper.isBlockFluid(block)) - { - continue; - } - //block.breakBlock(world, posX+i, posY+j, posZ+k, block.blockID, world.getBlockMetadata(posX+i, posY+j, posZ+k)); - //world.destroyBlock(posX+i, posY+j, posZ+k, true); - world.destroyBlock(newPos, false); - } - } - } - } - } -} 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 deleted file mode 100644 index 1c888f85..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefensiveEarth.java +++ /dev/null @@ -1,60 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.util.BlockPos; -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); - } - - @Override - public void onEntityImpact(Entity mop, Entity proj) - { - } - - @Override - public void onTileImpact(World world, MovingObjectPosition mop) - { - BlockPos pos = mop.func_178782_a(); - - int horizRange = (int) (this.powerUpgrades); - int vertRange = (int) (this.potencyUpgrades); - - for (int i = -horizRange; i <= horizRange; i++) - { - for (int j = -vertRange; j <= vertRange; j++) - { - for (int k = -horizRange; k <= horizRange; k++) - { - BlockPos newPos = pos.add(i, j, k); - if (!world.isAirBlock(newPos)) - { - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - if (block == null || block.getBlockHardness(world, newPos) == -1) - { - continue; - } - //block.breakBlock(world, posX+i, posY+j, posZ+k, block.blockID, world.getBlockMetadata(posX+i, posY+j, posZ+k)); - //world.destroyBlock(posX+i, posY+j, posZ+k, true); - if (world.rand.nextFloat() < 0.6f) - { - SpellHelper.smashBlock(world, newPos); - } - } - } - } - } - - } - -} 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 deleted file mode 100644 index 7a28612c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileEnvironmentalEarth.java +++ /dev/null @@ -1,76 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -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); - } - - @Override - public void onUpdateEffect(Entity projectile) - { - BlockPos pos = projectile.getPosition(); - - int horizRange = this.powerUpgrades + 1; - int vertRange = (int) (0.5 * (this.powerUpgrades + 1)); - int maxBlocks = (int) (2 * Math.pow(3.47, this.potencyUpgrades)); - - World worldObj = projectile.worldObj; - - if (projectile instanceof EntitySpellProjectile) - { - int blocksBroken = ((EntitySpellProjectile) projectile).getBlocksBroken(); - - if (blocksBroken >= maxBlocks) - { - return; - } - - for (int i = -horizRange; i <= horizRange; i++) - { - for (int j = -vertRange; j <= vertRange; j++) - { - for (int k = -horizRange; k <= horizRange; k++) - { - BlockPos newPos = pos.add(i, j, k); - if (!worldObj.isAirBlock(newPos) && blocksBroken < maxBlocks) - { - IBlockState state = worldObj.getBlockState(newPos); - Block block = state.getBlock(); - if (block == null || block.getBlockHardness(worldObj, newPos) == -1 || SpellHelper.isBlockFluid(block)) - { - continue; - } - - if (((EntitySpellProjectile) projectile).getIsSilkTouch() && block.canSilkHarvest(worldObj, newPos, state, ((EntitySpellProjectile) projectile).shootingEntity)) - { - ItemStack stack = new ItemStack(block, 1, block.getMetaFromState(state)); - EntityItem itemEntity = new EntityItem(worldObj, newPos.getX() + 0.5, newPos.getY() + 0.5, newPos.getZ() + 0.5, stack); - worldObj.spawnEntityInWorld(itemEntity); - worldObj.setBlockToAir(newPos); - } else - { - worldObj.destroyBlock(newPos, true); - } - blocksBroken++; - } - } - } - } - - ((EntitySpellProjectile) projectile).setBlocksBroken(blocksBroken); - } - } -} 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 deleted file mode 100644 index 8693f628..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileOffensiveEarth.java +++ /dev/null @@ -1,58 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; - -public class ProjectileOffensiveEarth extends ProjectileImpactEffect -{ - public ProjectileOffensiveEarth(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @Override - public void onEntityImpact(Entity mop, Entity proj) - { - int horizRange = (int) (this.powerUpgrades); - int vertDepth = (int) (3 * this.potencyUpgrades + 1); - - BlockPos pos = proj.getPosition(); - - World world = mop.worldObj; - - for (int i = -horizRange; i <= horizRange; i++) - { - for (int j = -vertDepth; j < 0; j++) - { - for (int k = -horizRange; k <= horizRange; k++) - { - BlockPos newPos = pos.add(i, j, k); - if (!world.isAirBlock(newPos)) - { - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - if (block == null || block.getBlockHardness(world, newPos) == -1) - { - continue; - } - if (block == Blocks.stone || block == Blocks.cobblestone || block == Blocks.sand || block == Blocks.gravel || block == Blocks.grass || block == Blocks.dirt) - { - world.setBlockToAir(newPos); - } - } - } - } - } - } - - @Override - public void onTileImpact(World world, MovingObjectPosition mop) - { - } -} 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 deleted file mode 100644 index 78396edb..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefaultEarth.java +++ /dev/null @@ -1,49 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; -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; - -public class SelfDefaultEarth extends SelfSpellEffect -{ - - public SelfDefaultEarth(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @Override - public void onSelfUse(World world, EntityPlayer player) - { - int horizRadius = this.powerUpgrades; - int vertRange = 5 + 10 * this.potencyUpgrades; - - BlockPos pos = player.getPosition().offsetDown(); - - for (int i = -horizRadius; i <= horizRadius; i++) - { - for (int k = -horizRadius; k <= horizRadius; k++) - { - BlockPos newPos = pos.add(i, 0, k); - if (!world.isAirBlock(newPos)) - { - continue; - } - - for (int j = -1; j >= -vertRange; j--) - { - BlockPos newNewPos = newPos.add(0, j, 0); - if (!world.isAirBlock(newNewPos) && !SpellHelper.isBlockFluid(world.getBlockState(newNewPos).getBlock())) - { - BlockTeleposer.swapBlocks(this, world, world,newPos, newNewPos); - - 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 deleted file mode 100644 index 9b71bef4..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefensiveEarth.java +++ /dev/null @@ -1,27 +0,0 @@ -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; - -public class SelfDefensiveEarth extends SelfSpellEffect -{ - - public SelfDefensiveEarth(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @Override - public void onSelfUse(World world, EntityPlayer player) - { - int pot = 2 * this.potencyUpgrades + 1; - int duration = 20 * 60 * (this.powerUpgrades + 1); - - player.addPotionEffect(new PotionEffect(Potion.field_180152_w.id, duration, pot)); - player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, duration, pot)); - } -} 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 deleted file mode 100644 index 803cf07a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfEnvironmentalEarth.java +++ /dev/null @@ -1,37 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; - -import java.util.List; - -import net.minecraft.entity.Entity; -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.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); - } - - @Override - public void onSelfUse(World world, EntityPlayer player) - { - 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); - - for (Entity entity : entities) - { - if (entity instanceof EntityLivingBase) - { - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.weakness.id, dur, this.potencyUpgrades)); - } - } - } -} 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 deleted file mode 100644 index fc3397d2..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfOffensiveEarth.java +++ /dev/null @@ -1,40 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; -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); - } - - @Override - public void onSelfUse(World world, EntityPlayer player) - { - int horizRadius = this.powerUpgrades; - int vertRadius = this.potencyUpgrades + 1; - - BlockPos pos = player.getPosition(); - - for (int i = -horizRadius; i <= horizRadius; i++) - { - for (int j = -vertRadius; j < 0; j++) - { - for (int k = -horizRadius; k <= horizRadius; k++) - { - BlockPos newPos = pos.add(i, j, k); - if (world.rand.nextFloat() < 0.7f) - { - SpellHelper.smashBlock(world, newPos); - } - } - } - } - } -} 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 deleted file mode 100644 index e7a34b6b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolEnvironmentalEarth.java +++ /dev/null @@ -1,86 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; -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) - { - if (!blockPos.typeOfHit.equals(MovingObjectPosition.MovingObjectType.BLOCK)) - { - return 0; - } - - BlockPos pos = blockPos.func_178782_a(); - EnumFacing sidehit = blockPos.field_178784_b; - - int radius = 2; - int depth = 5; - - depth--; - - int posX = radius; - int negX = radius; - int posY = radius; - int negY = radius; - int posZ = radius; - int negZ = radius; - - switch (sidehit) - { - case UP: - posY = 0; - negY = depth; - break; - case DOWN: - negY = 0; - posY = depth; - break; - case SOUTH: - posZ = 0; - negZ = depth; - break; - case NORTH: - negZ = 0; - posZ = depth; - break; - case WEST: - negX = 0; - posX = depth; - break; - case EAST: - posX = 0; - negX = depth; - break; - - default: - } - - for (int i = -negX; i <= posX; i++) - { - for (int j = -negY; j <= posY; j++) - { - for (int k = -negZ; k <= posZ; k++) - { - BlockPos newPos = pos.add(i, j, k); - itemTool.onBlockStartBreak(container, newPos, player); - } - } - } - - 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 deleted file mode 100644 index 61130c47..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolOffensiveEarth.java +++ /dev/null @@ -1,55 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; - - -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.ItemManipulator; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -import java.util.LinkedList; -import java.util.List; - - -public class ToolOffensiveEarth extends ItemManipulator -{ - 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); - } - - - @Override - public List handleItemsOnBlockBroken(ItemStack toolStack, List itemList) - { - List newList = new LinkedList(); - - for (ItemStack stack : itemList) - { - if (stack != null && stack.getItem() instanceof ItemBlock && !this.isMundaneBlock(((ItemBlock) stack.getItem()).getBlock())) - { - newList.add(stack); - } - } - - return newList; - } - - - public boolean isMundaneBlock(Block block) - { - for (Block test : mundaneList) - { - if (test.equals(block)) - { - return true; - } - } - - - return false; - } -} 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 deleted file mode 100644 index b045a199..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefaultFire.java +++ /dev/null @@ -1,30 +0,0 @@ -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; - -public class MeleeDefaultFire extends ExtrapolatedMeleeEntityEffect -{ - public MeleeDefaultFire(int power, int potency, int cost) - { - super(power, potency, cost); - this.setRange(3 + 0.3f * potency); - this.setRadius(2 + 0.3f * potency); - this.setMaxNumberHit(potency + 1); - } - - @Override - protected boolean entityEffect(World world, Entity entity, EntityPlayer entityPlayer) - { - if (entity instanceof EntityLiving) - { - entity.setFire(3 * this.powerUpgrades + 3); - return true; - } - - return false; - } -} 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 deleted file mode 100644 index 873c2998..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefensiveFire.java +++ /dev/null @@ -1,46 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -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); - } - - @Override - public void onWorldEffect(World world, EntityPlayer entityPlayer) - { - EnumFacing look = SpellHelper.getCompassDirectionForLookVector(entityPlayer.getLookVec()); - - int width = this.potencyUpgrades + 1; - int length = 5 * this.powerUpgrades + 3; - - int xOffset = look.getFrontOffsetX(); - int zOffset = look.getFrontOffsetZ(); - - BlockPos pos = entityPlayer.getPosition().add(look.getDirectionVec()); - - for (int i = -width; i <= width; i++) - { - for (int j = 0; j < length; j++) - { - for (int k = 0; k < 3; k++) - { - BlockPos newPos = pos.add(i * (zOffset) + j * (xOffset), k, i * (xOffset) + j * (zOffset)); - if (world.isAirBlock(newPos)) - { - world.setBlockState(newPos, Blocks.fire.getDefaultState()); - } - } - } - } - } -} 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 deleted file mode 100644 index 865b33c1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeEnvironmentalFire.java +++ /dev/null @@ -1,34 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; -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); - } - - @Override - public void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos) - { - int radius = this.potencyUpgrades; - - for (int i = -radius; i <= radius; i++) - { - for (int j = -radius; j <= radius; j++) - { - for (int k = -radius; k <= radius; k++) - { - BlockPos newPos = pos.add(i, j, k); - SpellHelper.evaporateWaterBlock(world, newPos); - } - } - } - } -} 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 deleted file mode 100644 index af02b553..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeOffensiveFire.java +++ /dev/null @@ -1,32 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; - -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); - this.setRadius(2 + 0.3f * potency); - this.setMaxNumberHit(1); - } - - @Override - protected boolean entityEffect(World world, Entity entity, EntityPlayer entityPlayer) - { - if (entity instanceof EntityLivingBase) - { - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFireFuse.id, 20 * (7 - this.powerUpgrades), this.potencyUpgrades)); - return true; - } - - return false; - } -} 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 deleted file mode 100644 index a9e6800d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefaultFire.java +++ /dev/null @@ -1,68 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; - -import net.minecraft.entity.Entity; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; - -public class ProjectileDefaultFire extends ProjectileImpactEffect -{ - public ProjectileDefaultFire(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @Override - public void onEntityImpact(Entity mop, Entity proj) - { - BlockPos pos = proj.getPosition(); - - World world = mop.worldObj; - - int horizRange = 0; - int vertRange = 0; - - for (int i = -horizRange; i <= horizRange; i++) - { - for (int j = -vertRange; j <= vertRange; j++) - { - for (int k = -horizRange; k <= horizRange; k++) - { - BlockPos newPos = pos.add(i, j, k); - - if (world.isAirBlock(newPos)) - { - world.setBlockState(newPos, Blocks.fire.getDefaultState()); - } - } - } - } - } - - @Override - public void onTileImpact(World world, MovingObjectPosition mop) - { - BlockPos pos = mop.func_178782_a(); - - int horizRange = 0; - int vertRange = 0; - - for (int i = -horizRange; i <= horizRange; i++) - { - for (int j = -vertRange; j <= vertRange; j++) - { - for (int k = -horizRange; k <= horizRange; k++) - { - BlockPos newPos = pos.add(i, j, k); - - if (world.isAirBlock(newPos)) - { - world.setBlockState(newPos, Blocks.fire.getDefaultState()); - } - } - } - } - } -} 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 deleted file mode 100644 index d727b1ac..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefensiveFire.java +++ /dev/null @@ -1,47 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; - -import net.minecraft.entity.Entity; -import net.minecraft.util.BlockPos; -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); - } - - @Override - public void onEntityImpact(Entity mop, Entity proj) - { - mop.setFire(3 * (this.potencyUpgrades + 1)); - } - - @Override - public void onTileImpact(World world, MovingObjectPosition mop) - { - int horizRange = (int) ((this.powerUpgrades)); - int vertRange = (int) ((this.powerUpgrades)); - - BlockPos pos = mop.func_178782_a(); - - for (int i = -horizRange; i <= horizRange; i++) - { - for (int j = -vertRange; j <= vertRange; j++) - { - for (int k = -horizRange; k <= horizRange; k++) - { - BlockPos newPos = pos.add(i, j, k); - - if (!world.isAirBlock(newPos)) - { - SpellHelper.smeltBlockInWorld(world, newPos); - } - } - } - } - } -} 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 deleted file mode 100644 index d4eb74d9..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileEnvironmentalFire.java +++ /dev/null @@ -1,42 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; - -import net.minecraft.entity.Entity; -import net.minecraft.util.BlockPos; -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); - } - - @Override - public void onUpdateEffect(Entity projectile) - { - BlockPos pos = projectile.getPosition(); - - int horizRange = this.powerUpgrades + 1; - int vertRange = (int) (0.5 * (this.powerUpgrades + 1)); - - World worldObj = projectile.worldObj; - - for (int i = -horizRange; i <= horizRange; i++) - { - for (int j = -vertRange; j <= vertRange; j++) - { - for (int k = -horizRange; k <= horizRange; k++) - { - BlockPos newPos = pos.add(i, j, k); - - if (!worldObj.isAirBlock(newPos)) - { - SpellHelper.evaporateWaterBlock(worldObj, newPos); - } - } - } - } - } -} 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 deleted file mode 100644 index e3525364..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileOffensiveFire.java +++ /dev/null @@ -1,47 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; - -import net.minecraft.entity.Entity; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; - -public class ProjectileOffensiveFire extends ProjectileImpactEffect -{ - public ProjectileOffensiveFire(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @Override - public void onEntityImpact(Entity mop, Entity proj) - { - int horizRange = (int) (this.powerUpgrades); - int vertDepth = (int) (3 * this.potencyUpgrades + 1); - - BlockPos pos = proj.getPosition(); - - World world = mop.worldObj; - - for (int i = -horizRange; i <= horizRange; i++) - { - for (int j = -vertDepth; j < 0; j++) - { - for (int k = -horizRange; k <= horizRange; k++) - { - BlockPos newPos = pos.add(i, j, k); - if (world.isAirBlock(newPos)) - { - world.setBlockState(newPos, Blocks.flowing_lava.getStateFromMeta(7)); - } - } - } - } - } - - @Override - public void onTileImpact(World world, MovingObjectPosition mop) - { - } -} 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 deleted file mode 100644 index a5bc740b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefaultFire.java +++ /dev/null @@ -1,19 +0,0 @@ -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; - -public class SelfDefaultFire extends SelfSpellEffect -{ - public SelfDefaultFire(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @Override - public void onSelfUse(World world, EntityPlayer player) - { - player.setFire((int) (10 * Math.pow(1.5, powerUpgrades + 1.5 * potencyUpgrades))); - } -} 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 deleted file mode 100644 index 4a10521d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefensiveFire.java +++ /dev/null @@ -1,41 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; - -public class SelfDefensiveFire extends SelfSpellEffect -{ - - public SelfDefensiveFire(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @Override - public void onSelfUse(World world, EntityPlayer player) - { - int horizRange = (int) (this.powerUpgrades); - int vertDepth = (int) (3 * this.potencyUpgrades + 1); - - BlockPos pos = player.getPosition(); - - for (int i = -horizRange; i <= horizRange; i++) - { - for (int j = -vertDepth; j < 0; j++) - { - for (int k = -horizRange; k <= horizRange; k++) - { - BlockPos newPos = pos.add(i, j, k); - - if (world.isAirBlock(newPos)) - { - world.setBlockState(newPos, Blocks.flowing_lava.getStateFromMeta(7)); - } - } - } - } - } -} 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 deleted file mode 100644 index 004548f8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfEnvironmentalFire.java +++ /dev/null @@ -1,59 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -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); - } - - @Override - public void onSelfUse(World world, EntityPlayer player) - { - BlockPos pos = player.getPosition(); - - int powRadius = this.powerUpgrades; - int potRadius = this.potencyUpgrades - 1; - - for (int i = -powRadius; i <= powRadius; i++) - { - for (int j = -powRadius; j <= powRadius; j++) - { - for (int k = -powRadius; k <= powRadius; k++) - { - BlockPos newPos = pos.add(i, j, k); - - if (world.isAirBlock(newPos)) - { - world.setBlockState(newPos, Blocks.fire.getDefaultState()); - - } - } - } - } - - for (int i = -potRadius; i <= potRadius; i++) - { - for (int j = -potRadius; j <= potRadius; j++) - { - for (int k = -potRadius; k <= potRadius; k++) - { - BlockPos newPos = pos.add(i, j, k); - - if (!world.isAirBlock(newPos)) - { - SpellHelper.smeltBlockInWorld(world, newPos); - } - } - } - } - - } -} 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 deleted file mode 100644 index 08641a38..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfOffensiveFire.java +++ /dev/null @@ -1,21 +0,0 @@ -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; - -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)); - } -} 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 deleted file mode 100644 index fbae06d1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolDefaultFire.java +++ /dev/null @@ -1,35 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; - -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.ItemManipulator; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; - -import java.util.LinkedList; -import java.util.List; - -public class ToolDefaultFire extends ItemManipulator -{ - public ToolDefaultFire(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @Override - public List handleItemsOnBlockBroken(ItemStack toolStack, List itemList) - { - LinkedList newList = new LinkedList(); - for (ItemStack item : itemList) - { - ItemStack newItem = FurnaceRecipes.instance().getSmeltingResult(item); - if (newItem != null) - { - newList.add(newItem); - } else - { - newList.add(item); - } - } - - return newList; - } -} 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 deleted file mode 100644 index 68d1dd9c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolEnvironmentalFire.java +++ /dev/null @@ -1,51 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; - -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -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, IBlockState state, BlockPos pos, EnumFacing sideBroken) - { - int amount = 0; - int cost = (int) (250 * (1 - 0.1f * powerUpgrades) * Math.pow(0.85, costUpgrades)); - int radius = this.powerUpgrades; - float chance = 0.35f + 0.15f * this.potencyUpgrades; - - for (int i = -radius; i <= radius; i++) - { - for (int j = -radius; j <= radius; j++) - { - for (int k = -radius; k <= radius; k++) - { - BlockPos newPos = pos.add(i - sideBroken.getFrontOffsetX(), j, k - sideBroken.getFrontOffsetZ()); - IBlockState newState = world.getBlockState(newPos); - Block blockAffected = newState.getBlock(); - - if ((new Random().nextFloat() <= chance) && (blockAffected == Blocks.gravel || blockAffected == Blocks.stone || blockAffected == Blocks.cobblestone)) - { - world.setBlockState(newPos, Blocks.lava.getDefaultState()); - amount += cost; - } - } - } - } - - return amount; - } -} 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 deleted file mode 100644 index c7a94579..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolOffensiveFire.java +++ /dev/null @@ -1,21 +0,0 @@ -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; - -public class ToolOffensiveFire extends LeftClickEffect -{ - public ToolOffensiveFire(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @Override - public int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder) - { - attacked.setFire(3 + 4 * this.powerUpgrades); - - return (int) (10 * (1 + this.powerUpgrades) * Math.pow(0.85, this.costUpgrades)); - } -} 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 deleted file mode 100644 index b375331a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefaultIce.java +++ /dev/null @@ -1,29 +0,0 @@ -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; - -public class MeleeDefaultIce extends ExtrapolatedMeleeEntityEffect -{ - - public MeleeDefaultIce(int power, int potency, int cost) - { - super(power, potency, cost); - this.setRange(3 + 0.3f * potency); - this.setRadius(2 + 0.3f * potency); - this.setMaxNumberHit(potency + 1); - } - - @Override - protected boolean entityEffect(World world, Entity entity, EntityPlayer entityPlayer) - { - if (entity.hurtResistantTime > 0) - { - entity.hurtResistantTime = Math.max(0, -(potencyUpgrades + 1) + entity.hurtResistantTime); - } - - return true; - } -} 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 deleted file mode 100644 index a581cf56..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefensiveIce.java +++ /dev/null @@ -1,49 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -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); - } - - @Override - public void onWorldEffect(World world, EntityPlayer entityPlayer) - { - EnumFacing look = SpellHelper.getCompassDirectionForLookVector(entityPlayer.getLookVec()); - - int width = this.powerUpgrades; - int height = this.powerUpgrades + 2; - - int xOffset = look.getFrontOffsetX(); - int zOffset = look.getFrontOffsetZ(); - - int range = this.potencyUpgrades + 1; - - BlockPos pos = entityPlayer.getPosition(); - - int xStart = pos.getX() + range * xOffset; - int zStart = pos.getZ() + range * zOffset; - int yStart = pos.getY(); - - for (int i = -width; i <= width; i++) - { - for (int j = 0; j < height; j++) - { - BlockPos newPos = new BlockPos(xStart + i * (zOffset), yStart + j, zStart + i * (xOffset)); - if (world.isAirBlock(newPos)) - { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); - } - } - } - } -} 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 deleted file mode 100644 index 1f735537..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeEnvironmentalIce.java +++ /dev/null @@ -1,40 +0,0 @@ -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; - -public class MeleeEnvironmentalIce extends ExtrapolatedMeleeEntityEffect -{ - public MeleeEnvironmentalIce(int power, int potency, int cost) - { - super(power, potency, cost); - this.setMaxNumberHit(1 + potency); - this.setRadius(2); - this.setRange(3); - } - - @Override - protected boolean entityEffect(World world, Entity entity, EntityPlayer entityPlayer) - { - //TODO Change to an Ice Cage - for (int i = 0; i <= this.powerUpgrades; i++) - { - double randX = (world.rand.nextDouble() - world.rand.nextDouble()) * 3; - double randY = -world.rand.nextDouble() * 3; - 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); - snowball.motionX = randX; - snowball.motionY = randY; - snowball.motionZ = randZ; - - world.spawnEntityInWorld(snowball); - } - - return true; - } - -} 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 deleted file mode 100644 index c8e99587..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeOffensiveIce.java +++ /dev/null @@ -1,43 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; - -public class MeleeOffensiveIce extends ExtrapolatedMeleeEntityEffect -{ - public MeleeOffensiveIce(int power, int potency, int cost) - { - super(power, potency, cost); - this.setMaxNumberHit(1 + potency); - this.setRadius(2); - this.setRange(3); - } - - @Override - protected boolean entityEffect(World world, Entity entity, EntityPlayer entityPlayer) - { - BlockPos pos = entityPlayer.getPosition(); - - - double yVel = 1 * (0.3 * this.powerUpgrades + 0.90); - - entity.motionY = yVel; - - for (int i = 0; i < 2; i++) - { - BlockPos newPos = pos.offsetUp(i); - if (world.isAirBlock(newPos)) - { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); - } - } - - entity.fallDistance = 0.0f; - return true; - } - -} 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 deleted file mode 100644 index cf730254..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefaultIce.java +++ /dev/null @@ -1,38 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; - -import net.minecraft.entity.Entity; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; - -public class ProjectileDefaultIce extends ProjectileImpactEffect -{ - public ProjectileDefaultIce(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @Override - public void onEntityImpact(Entity mop, Entity proj) - { - return; - } - - @Override - public void onTileImpact(World world, MovingObjectPosition mop) - { - int horizRadius = this.powerUpgrades + 1; - int vertRadius = this.potencyUpgrades; - - EnumFacing sideHit = mop.field_178784_b; - - BlockPos newPos = mop.func_178782_a().add(sideHit.getDirectionVec()); - if (world.isAirBlock(newPos)) - { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); - } - } -} 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 deleted file mode 100644 index 5c51fe35..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefensiveIce.java +++ /dev/null @@ -1,49 +0,0 @@ -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.BlockPos; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -public class ProjectileDefensiveIce extends ProjectileImpactEffect -{ - public ProjectileDefensiveIce(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @Override - public void onEntityImpact(Entity mop, Entity proj) - { - return; - } - - @Override - public void onTileImpact(World world, MovingObjectPosition mop) - { - int horizRadius = this.powerUpgrades + 1; - int vertRadius = this.potencyUpgrades; - - BlockPos pos = mop.func_178782_a(); - - for (int i = -horizRadius; i <= horizRadius; i++) - { - for (int k = -horizRadius; k <= horizRadius; k++) - { - for (int j = -vertRadius; j <= vertRadius; j++) - { - BlockPos newPos = pos.add(i, j, k); - SpellHelper.freezeWaterBlock(world, newPos); - - if (world.isAirBlock(newPos) && !world.isAirBlock(newPos.offsetDown())) - { - world.setBlockState(newPos, Blocks.snow.getDefaultState()); - } - } - } - } - } -} 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 deleted file mode 100644 index 1b689f0b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileEnvironmentalIce.java +++ /dev/null @@ -1,35 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; - -import net.minecraft.entity.Entity; -import net.minecraft.util.BlockPos; -import WayofTime.alchemicalWizardry.api.spell.ProjectileUpdateEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -public class ProjectileEnvironmentalIce extends ProjectileUpdateEffect -{ - - public ProjectileEnvironmentalIce(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @Override - public void onUpdateEffect(Entity projectile) - { - BlockPos pos = projectile.getPosition(); - - int horizRange = this.powerUpgrades + 1; - int vertRange = this.potencyUpgrades + 1; - - for (int i = -horizRange; i <= horizRange; i++) - { - for (int j = -vertRange; j <= vertRange; j++) - { - for (int k = -horizRange; k <= horizRange; k++) - { - SpellHelper.freezeWaterBlock(projectile.worldObj, pos.add(i, j, k)); - } - } - } - } -} 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 deleted file mode 100644 index 97d47967..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileOffensiveIce.java +++ /dev/null @@ -1,32 +0,0 @@ -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; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -public class ProjectileOffensiveIce extends ProjectileImpactEffect -{ - public ProjectileOffensiveIce(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @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)); - } - } - - @Override - public void onTileImpact(World world, MovingObjectPosition mop) - { - return; - } -} 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 deleted file mode 100644 index 7861cc43..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefaultIce.java +++ /dev/null @@ -1,36 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -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); - } - - @Override - public void onSelfUse(World world, EntityPlayer player) - { - BlockPos pos = player.getPosition(); - - double yVel = 1 * (0.4 * this.powerUpgrades + 0.75); - SpellHelper.setPlayerSpeedFromServer(player, player.motionX, yVel, player.motionZ); - - for (int i = 0; i < 2; i++) - { - BlockPos newPos = pos.add(0, i, 0); - if (world.isAirBlock(newPos)) - { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); - } - } - - player.fallDistance = 0.0f; - } -} 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 deleted file mode 100644 index cc9ab9e3..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefensiveIce.java +++ /dev/null @@ -1,21 +0,0 @@ -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; - -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)); - } -} 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 deleted file mode 100644 index 2e73b07e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfEnvironmentalIce.java +++ /dev/null @@ -1,43 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -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); - } - - @Override - public void onSelfUse(World world, EntityPlayer player) - { - EnumFacing look = SpellHelper.getCompassDirectionForLookVector(player.getLookVec()); - - int width = this.potencyUpgrades + 1; - int length = 5 * this.powerUpgrades + 3; - - int xOffset = look.getFrontOffsetX(); - int zOffset = look.getFrontOffsetZ(); - - BlockPos pos = player.getPosition(); - - for (int i = -width; i <= width; i++) - { - for (int j = 0; j < length; j++) - { - BlockPos newPos = pos.add(i * (zOffset) + j * (xOffset), 0, i * (xOffset) + j * (zOffset)); - if (world.isAirBlock(newPos)) - { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); - } - } - } - } -} 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 deleted file mode 100644 index 95072ab6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfOffensiveIce.java +++ /dev/null @@ -1,52 +0,0 @@ -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.Entity; -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 java.util.List; - -public class SelfOffensiveIce extends SelfSpellEffect -{ - public SelfOffensiveIce(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @Override - public void onSelfUse(World world, EntityPlayer player) - { - 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); - - if (entities == null) - { - return; - } - - int i = 0; - int number = this.powerUpgrades + 1; - - for (Entity entity : entities) - { - if (i >= number) - { - continue; - } - - if (entity instanceof EntityLivingBase && !entity.equals(player)) - { - ((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 deleted file mode 100644 index e9eeb811..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefaultIce.java +++ /dev/null @@ -1,30 +0,0 @@ -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; - - -public class ToolDefaultIce extends LeftClickEffect -{ - public ToolDefaultIce(int power, int potency, int cost) - { - super(power, potency, cost); - } - - - @Override - public int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder) - { - int duration = 200; - - - attacked.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, duration, this.powerUpgrades)); - - - return 0; - } -} 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 deleted file mode 100644 index 7c4edbfe..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefensiveIce.java +++ /dev/null @@ -1,59 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; - -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -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); - } - - @Override - 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); - - for (Entity ent : entityList) - { - if (ent instanceof EntityLivingBase && !ent.equals(entity)) - { - ((EntityLivingBase) ent).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, this.potencyUpgrades * 2)); - } - } - - BlockPos pos = entity.getPosition(); - - for (int x = -horizRadius; x <= horizRadius; x++) - { - for (int y = -vertRadius; y <= vertRadius; y++) - { - for (int z = -horizRadius; z <= horizRadius; z++) - { - BlockPos newPos = pos.add(x, y, z); - SpellHelper.freezeWaterBlock(world, newPos); - if (world.isSideSolid(newPos, EnumFacing.UP) && world.isAirBlock(newPos.offsetUp())) - { - world.setBlockState(newPos.offsetUp(), Blocks.snow_layer.getDefaultState()); - } - } - } - } - - return 0; - } -} 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 deleted file mode 100644 index 39f11169..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaEffect.java +++ /dev/null @@ -1,58 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; -import WayofTime.alchemicalWizardry.api.spell.IDigAreaEffect; - -public class DigAreaEffect implements IDigAreaEffect -{ - protected int powerUpgrades; - protected int potencyUpgrades; - protected int costUpgrades; - - public DigAreaEffect(int power, int potency, int cost) - { - this.powerUpgrades = power; - this.potencyUpgrades = potency; - this.costUpgrades = cost; - } - - @Override - 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; - } - - int x = blockPos.func_178782_a().getX(); //BlockPos - int y = blockPos.func_178782_a().getY(); - int z = blockPos.func_178782_a().getZ(); - EnumFacing sidehit = blockPos.field_178784_b; - - for (int xPos = x - 1; xPos <= x + 1; xPos++) - { - for (int yPos = y - 1; yPos <= y + 1; yPos++) - { - for (int zPos = z - 1; zPos <= z + 1; zPos++) - { - BlockPos newPos = new BlockPos(xPos, yPos, zPos); - ModItems.customTool.onBlockStartBreak(container, newPos, player); - } - } - } - - return 0; - } - - public float getHardnessDifference() - { - return 1.5f; - } -} 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 deleted file mode 100644 index a946d755..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaTunnel.java +++ /dev/null @@ -1,169 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool; - -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.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; - -public class DigAreaTunnel extends DigAreaEffect -{ - Random rand = new Random(); - - public DigAreaTunnel(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) - { - if (!blockPos.typeOfHit.equals(MovingObjectPosition.MovingObjectType.BLOCK)) - { - return 0; - } - - List vectorLine = new LinkedList(); - - double initialX = blockPos.func_178782_a().getX(); - double initialY = blockPos.func_178782_a().getY(); - double initialZ = blockPos.func_178782_a().getZ(); - EnumFacing sidehit = blockPos.field_178784_b; - EnumFacing opposite = sidehit.getOpposite(); - - double initialLength = this.getRandomVectorLength(); - - Vec3 initialVector = new Vec3(opposite.getFrontOffsetX() * initialLength, opposite.getFrontOffsetY() * initialLength, opposite.getFrontOffsetZ() * initialLength); - - Vec3 lastVec = new Vec3(initialVector.xCoord, initialVector.yCoord, initialVector.zCoord); - vectorLine.add(initialVector); - - double currentLength = lastVec.lengthVector(); - double totalLength = this.totalLength(); - - while (currentLength < totalLength - 0.01) - { - Vec3 tempVec = lastVec.addVector(0, 0, 0); - - tempVec = tempVec.normalize(); - - double varr = this.varyRate(); - - tempVec = tempVec.addVector(varr * (rand.nextFloat() - rand.nextFloat()), varr * (rand.nextFloat() - rand.nextFloat()), varr * (rand.nextFloat() - rand.nextFloat())); - - tempVec = tempVec.normalize(); - - double length = Math.min(this.getRandomVectorLength(), totalLength - currentLength); - - tempVec = new Vec3(tempVec.xCoord * length, tempVec.yCoord * length, tempVec.zCoord * length); - - vectorLine.add(tempVec); - - lastVec = tempVec; - - currentLength += tempVec.lengthVector(); - } - - for (Vec3 testVec : vectorLine) - { - this.travelVector(testVec, world, initialX, initialY, initialZ); - - initialX += testVec.xCoord; - initialY += testVec.yCoord; - initialZ += testVec.zCoord; - } - - this.travelVector(lastVec, world, initialX, initialY, initialZ); - - return 0; - } - - public double totalLength() - { - return 100; - } - - public double getStepSize() - { - return 1; - } - - public double varyRate() - { - return 0.5; - } - - public double getRandomVectorLength() - { - return 10; - } - - public double getRandomStepLength() - { - return 0.5; - } - - public int getRandomRadius() - { - return 3; - } - - public void destroySphereOfMundane(World world, double x, double y, double z, int radius) - { - BlockPos pos = new BlockPos(MathHelper.floor_double(x), MathHelper.floor_double(y), MathHelper.floor_double(z)); - for (int i = -radius; i <= radius; i++) - { - for (int j = -radius; j <= radius; j++) - { - for (int k = -radius; k <= radius; k++) - { - if (i * i + j * j + k * k >= (radius + 0.50f) * (radius + 0.50f)) - { - continue; - } - - BlockPos newPos = pos.add(i, j, k); - - this.destroyMunadeAt(world, newPos); - } - } - } - } - - public void destroyMunadeAt(World world, BlockPos pos) - { - world.setBlockToAir(pos); - } - - public void travelVector(Vec3 vector, World world, double x, double y, double z) - { - double vecLength = vector.lengthVector(); - AlchemicalWizardry.logger.info(vecLength); - Vec3 normVec = new Vec3(vector.xCoord, vector.yCoord, vector.zCoord); - normVec = normVec.normalize(); - - Vec3 prevVec = new Vec3(0, 0, 0); - double distanceTravelled = 0; - - while (distanceTravelled < vecLength) - { - AlchemicalWizardry.logger.info(distanceTravelled); - double stepLength = this.getRandomStepLength(); - - 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()); - - 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 deleted file mode 100644 index 4fe6295b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/ItemManipulator.java +++ /dev/null @@ -1,24 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool; - -import net.minecraft.item.ItemStack; - -import java.util.List; - -import WayofTime.alchemicalWizardry.api.spell.IItemManipulator; - -public abstract class ItemManipulator implements IItemManipulator -{ - protected int powerUpgrades; - protected int potencyUpgrades; - protected int costUpgrades; - - public ItemManipulator(int power, int potency, int cost) - { - this.powerUpgrades = power; - this.potencyUpgrades = potency; - this.costUpgrades = cost; - } - - @Override - public abstract List handleItemsOnBlockBroken(ItemStack toolStack, List itemList); -} 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 deleted file mode 100644 index 3cbfd2fc..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/LeftClickEffect.java +++ /dev/null @@ -1,22 +0,0 @@ -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; - -public abstract class LeftClickEffect implements ILeftClickEffect -{ - protected int powerUpgrades; - protected int potencyUpgrades; - protected int costUpgrades; - - public LeftClickEffect(int power, int potency, int cost) - { - this.powerUpgrades = power; - this.potencyUpgrades = potency; - this.costUpgrades = cost; - } - - @Override - public abstract int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder); -} 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 deleted file mode 100644 index a6af2688..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/OnBreakBlockEffect.java +++ /dev/null @@ -1,17 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool; - -import WayofTime.alchemicalWizardry.api.spell.IOnBreakBlock; - -public abstract class OnBreakBlockEffect implements IOnBreakBlock -{ - protected int powerUpgrades; - protected int potencyUpgrades; - protected int costUpgrades; - - public OnBreakBlockEffect(int power, int potency, int cost) - { - this.powerUpgrades = power; - this.potencyUpgrades = potency; - this.costUpgrades = cost; - } -} 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 deleted file mode 100644 index 5eb7b5ae..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickEffect.java +++ /dev/null @@ -1,17 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool; - -import WayofTime.alchemicalWizardry.api.spell.IRightClickEffect; - -public abstract class RightClickEffect implements IRightClickEffect -{ - protected int powerUpgrades; - protected int potencyUpgrades; - protected int costUpgrades; - - public RightClickEffect(int power, int potency, int cost) - { - this.powerUpgrades = power; - this.potencyUpgrades = potency; - this.costUpgrades = cost; - } -} 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 deleted file mode 100644 index 8051d264..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickTunnel.java +++ /dev/null @@ -1,176 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool; - -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.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; - -public class RightClickTunnel extends RightClickEffect -{ - Random rand = new Random(); - - public RightClickTunnel(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @Override - public int onRightClickBlock(ItemStack stack, EntityLivingBase weilder, World world, MovingObjectPosition mop) - { - if (weilder.worldObj.isRemote) - { - return 0; - } - if (!mop.typeOfHit.equals(MovingObjectPosition.MovingObjectType.BLOCK)) - { - return 0; - } - - List vectorLine = new LinkedList(); - - double initialX = mop.func_178782_a().getX(); - double initialY = mop.func_178782_a().getY(); - double initialZ = mop.func_178782_a().getZ(); - EnumFacing sidehit = mop.field_178784_b; - EnumFacing opposite = sidehit.getOpposite(); - - double initialLength = this.getRandomVectorLength(); - - Vec3 initialVector = new Vec3(opposite.getFrontOffsetX() * initialLength, opposite.getFrontOffsetY() * initialLength, opposite.getFrontOffsetZ() * initialLength); - - Vec3 lastVec = new Vec3(initialVector.xCoord, initialVector.yCoord, initialVector.zCoord); - vectorLine.add(initialVector); - - double currentLength = lastVec.lengthVector(); - double totalLength = this.totalLength(); - - while (currentLength < totalLength - 0.01) - { - Vec3 tempVec = lastVec.addVector(0, 0, 0); - - tempVec = tempVec.normalize(); - - double varr = this.varyRate(); - - tempVec = tempVec.addVector(varr * (rand.nextFloat() - rand.nextFloat()), varr * (rand.nextFloat() - rand.nextFloat()), varr * (rand.nextFloat() - rand.nextFloat())); - - tempVec = tempVec.normalize(); - - double length = Math.min(this.getRandomVectorLength(), totalLength - currentLength); - - tempVec = new Vec3(tempVec.xCoord * length, tempVec.yCoord * length, tempVec.zCoord * length); - - vectorLine.add(tempVec); - - lastVec = tempVec; - - currentLength += tempVec.lengthVector(); - } - - for (Vec3 testVec : vectorLine) - { - this.travelVector(testVec, world, initialX, initialY, initialZ); - - initialX += testVec.xCoord; - initialY += testVec.yCoord; - initialZ += testVec.zCoord; - } - - this.travelVector(lastVec, world, initialX, initialY, initialZ); - - return 0; - } - - @Override - public int onRightClickAir(ItemStack stack, EntityLivingBase weilder) - { - return 0; - } - - public double totalLength() - { - return 100; - } - - public double getStepSize() - { - return 1; - } - - public double varyRate() - { - return 0.5; - } - - public double getRandomVectorLength() - { - return 10; - } - - public double getRandomStepLength() - { - return 0.5; - } - - public int getRandomRadius() - { - return 3; - } - - public void destroySphereOfMundane(World world, double x, double y, double z, int radius) - { - BlockPos pos = new BlockPos(MathHelper.floor_double(x), MathHelper.floor_double(y), MathHelper.floor_double(z)); - for (int i = -radius; i <= radius; i++) - { - for (int j = -radius; j <= radius; j++) - { - for (int k = -radius; k <= radius; k++) - { - if (i * i + j * j + k * k >= (radius + 0.50f) * (radius + 0.50f)) - { - continue; - } - - BlockPos newPos = pos.add(i, j, k); - - this.destroyMunadeAt(world, newPos); - } - } - } - } - - public void destroyMunadeAt(World world, BlockPos pos) - { - world.setBlockToAir(pos); - } - - public void travelVector(Vec3 vector, World world, double x, double y, double z) - { - double vecLength = vector.lengthVector(); - - Vec3 normVec = new Vec3(vector.xCoord, vector.yCoord, vector.zCoord); - normVec = normVec.normalize(); - - Vec3 prevVec = new Vec3(0, 0, 0); - double distanceTravelled = 0; - - while (distanceTravelled < vecLength) - { - double stepLength = this.getRandomStepLength(); - - 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()); - - 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 deleted file mode 100644 index 8a14beb0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/SummonToolEffect.java +++ /dev/null @@ -1,17 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool; - -import WayofTime.alchemicalWizardry.api.spell.IOnSummonTool; - -public abstract class SummonToolEffect implements IOnSummonTool -{ - protected int powerUpgrades; - protected int potencyUpgrades; - protected int costUpgrades; - - public SummonToolEffect(int power, int potency, int cost) - { - this.powerUpgrades = power; - this.potencyUpgrades = potency; - this.costUpgrades = cost; - } -} 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 deleted file mode 100644 index 803acb7e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeDefaultWind.java +++ /dev/null @@ -1,40 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; - -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); - this.setRadius(4 + 2.0f * potency); - this.setMaxNumberHit(potency + 1); - } - - @Override - protected boolean entityEffect(World world, Entity entity, EntityPlayer player) - { - double wantedVel = -(0.5d + 0.7d * this.powerUpgrades); - - if (entity instanceof EntityLivingBase) - { - double dist = Math.sqrt(entity.getDistanceToEntity(player)); - double xVel = wantedVel * (entity.posX - player.posX) / dist; - double yVel = wantedVel * (entity.posY - player.posY) / dist; - double zVel = wantedVel * (entity.posZ - player.posZ) / dist; - - entity.motionX = xVel; - entity.motionY = yVel; - entity.motionZ = zVel; - - return true; - } - - return false; - } -} 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 deleted file mode 100644 index 34aef636..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeDefensiveWind.java +++ /dev/null @@ -1,33 +0,0 @@ -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; - -public class MeleeDefensiveWind extends ExtrapolatedMeleeEntityEffect -{ - public MeleeDefensiveWind(int power, int potency, int cost) - { - super(power, potency, cost); - this.setRange(3 + 0.3f * potency); - this.setRadius(2 + 0.3f * potency); - this.setMaxNumberHit(potency + 1); - } - - @Override - protected boolean entityEffect(World world, Entity entity, EntityPlayer player) - { - double wantedVel = 0.5d + 0.5d * this.powerUpgrades; - - if (entity instanceof EntityLiving) - { - entity.motionY = wantedVel; - - return true; - } - - return false; - } -} 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 deleted file mode 100644 index 36d9c5c6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeEnvironmentalWind.java +++ /dev/null @@ -1,37 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; - -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; -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); - } - - @Override - public void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos) - { - int radius = 5 * this.potencyUpgrades + 3; - - List entities = SpellHelper.getEntitiesInRange(world, pos.getX(), pos.getY(), pos.getZ(), radius, radius); - - for (Entity entity : entities) - { - if (entity instanceof EntityItem) - { - ((EntityItem) entity).setPickupDelay(0); - entity.onCollideWithPlayer((EntityPlayer) player); - } - } - } -} 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 deleted file mode 100644 index 8dd15f71..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeOffensiveWind.java +++ /dev/null @@ -1,40 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; - -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); - this.setRadius(2 + 0.3f * potency); - this.setMaxNumberHit(potency + 1); - } - - @Override - protected boolean entityEffect(World world, Entity entity, EntityPlayer player) - { - double wantedVel = 1.0d + 1.0d * this.powerUpgrades; - - if (entity instanceof EntityLivingBase) - { - double dist = Math.sqrt(entity.getDistanceToEntity(player)); - double xVel = wantedVel * (entity.posX - player.posX) / dist; - double yVel = wantedVel * (entity.posY - player.posY + 0.5f) / dist; - double zVel = wantedVel * (entity.posZ - player.posZ) / dist; - - entity.motionX = xVel; - entity.motionY = yVel; - entity.motionZ = zVel; - - return true; - } - - return false; - } -} 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 deleted file mode 100644 index 862b7193..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileDefaultWind.java +++ /dev/null @@ -1,30 +0,0 @@ -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; - -public class ProjectileDefaultWind extends ProjectileImpactEffect -{ - public ProjectileDefaultWind(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @Override - public void onEntityImpact(Entity mop, Entity proj) - { - float wantedYVel = (float) ((0.5) * (0.5 * this.potencyUpgrades + 1)); - - mop.motionX = proj.motionX; - mop.motionY = mop.motionY += wantedYVel; - mop.motionZ = proj.motionZ; - } - - @Override - public void onTileImpact(World world, MovingObjectPosition mop) - { - return; - } -} 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 deleted file mode 100644 index a647f34c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileEnvironmentalWind.java +++ /dev/null @@ -1,48 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; - -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); - } - - @Override - public void onUpdateEffect(Entity projectile) - { - int horizRange = this.powerUpgrades + 1; - int vertRange = 1 * this.potencyUpgrades + 1; - - World worldObj = projectile.worldObj; - - if (projectile instanceof EntitySpellProjectile) - { - Entity shooter = ((EntitySpellProjectile) projectile).shootingEntity; - if (shooter instanceof EntityPlayer) - { - List entitylist = SpellHelper.getEntitiesInRange(worldObj, projectile.posX, projectile.posY, projectile.posZ, horizRange, vertRange); - if (entitylist != null) - { - for (Entity entity : entitylist) - { - if (entity instanceof EntityItem) - { - ((EntityItem) entity).setPickupDelay(0); - entity.onCollideWithPlayer((EntityPlayer) shooter); - } - } - } - } - } - } -} 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 deleted file mode 100644 index 35f1aaf4..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileOffensiveWind.java +++ /dev/null @@ -1,33 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; - -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); - } - - @Override - public void onEntityImpact(Entity mop, Entity proj) - { - if (mop instanceof EntityLivingBase) - { - ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, (int) (100 * (2 * this.powerUpgrades + 1) * (1 / (this.potencyUpgrades + 1))), this.potencyUpgrades)); - } - } - - @Override - public void onTileImpact(World world, MovingObjectPosition mop) - { - return; - } -} 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 deleted file mode 100644 index 9c8dff52..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfDefaultWind.java +++ /dev/null @@ -1,20 +0,0 @@ -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; - -public class SelfDefaultWind extends SelfSpellEffect -{ - public SelfDefaultWind(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @Override - public void onSelfUse(World world, EntityPlayer player) - { - player.extinguish(); - player.fallDistance = 0; - } -} 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 deleted file mode 100644 index 819fdcd2..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfDefensiveWind.java +++ /dev/null @@ -1,39 +0,0 @@ -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 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 java.util.List; - -public class SelfDefensiveWind extends SelfSpellEffect -{ - public SelfDefensiveWind(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @Override - public void onSelfUse(World world, EntityPlayer player) - { - double radius = 1.5d * this.powerUpgrades + 1.5d; - double posX = player.posX; - double posY = player.posY; - double posZ = player.posZ; - - List entities = SpellHelper.getEntitiesInRange(world, posX, posY, posZ, radius, radius); - - for (Entity entity : entities) - { - if ((!entity.equals(player)) && entity instanceof EntityLiving) - { - ((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 deleted file mode 100644 index efbe60ea..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfEnvironmentalWind.java +++ /dev/null @@ -1,45 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; - -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); - } - - @Override - public void onSelfUse(World world, EntityPlayer player) - { - double radius = 1.5d * this.potencyUpgrades + 1; - double posX = player.posX; - double posY = player.posY - 0.7d; - double posZ = player.posZ; - double wantedVel = 0.7d + 0.7d * this.powerUpgrades; - - List entities = SpellHelper.getEntitiesInRange(world, posX, posY, posZ, radius, radius); - - for (Entity entity : entities) - { - if ((!entity.equals(player)) && entity instanceof EntityLivingBase) - { - double dist = Math.sqrt(entity.getDistanceToEntity(player)); - double xVel = wantedVel * (entity.posX - posX) / dist; - double yVel = wantedVel * (entity.posY - posY) / dist; - double zVel = wantedVel * (entity.posZ - posZ) / dist; - - entity.motionX = xVel; - entity.motionY = yVel; - entity.motionZ = zVel; - } - } - } -} 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 deleted file mode 100644 index 6fafe165..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/SelfOffensiveWind.java +++ /dev/null @@ -1,26 +0,0 @@ -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; - -public class SelfOffensiveWind extends SelfSpellEffect -{ - public SelfOffensiveWind(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @Override - public void onSelfUse(World world, EntityPlayer player) - { - Vec3 vec = player.getLookVec(); - double wantedVelocity = 1.5 + this.powerUpgrades * 0.4; - - SpellHelper.setPlayerSpeedFromServer(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 deleted file mode 100644 index 15745deb..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolDefensiveWind.java +++ /dev/null @@ -1,32 +0,0 @@ -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; - -public class ToolDefensiveWind extends LeftClickEffect -{ - - public ToolDefensiveWind(int power, int potency, int cost) - { - super(power, potency, cost); - } - - @Override - public int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder) - { - Vec3 vec = weilder.getLookVec(); - vec = vec.subtract(0, vec.yCoord, 0); - vec = vec.normalize(); - - float velocity = 0.5f * (1 + this.powerUpgrades * 0.8f); - float ratio = 0.1f + 0.3f * this.potencyUpgrades; - - attacked.motionX += vec.xCoord * velocity; - attacked.motionY += velocity * ratio; - attacked.motionZ += vec.zCoord * velocity; - - return 0; - } -} 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 deleted file mode 100644 index 7a1d461a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolEnvironmentalWind.java +++ /dev/null @@ -1,43 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -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, IBlockState state, BlockPos pos, EnumFacing sideBroken) - { - double vertRange = 0.5 + (this.powerUpgrades * this.powerUpgrades + this.powerUpgrades) / 2; - double horizRange = vertRange; - - List itemList = SpellHelper.getItemsInRange(world, pos.getX() + 0.5f, pos.getY() + 0.5f, pos.getZ() + 0.5f, horizRange, vertRange); - - for (EntityItem entity : itemList) - { - if (!world.isRemote) - { - entity.setPickupDelay(0); - entity.onCollideWithPlayer(player); - } - } - - return 0; - } - -} 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 deleted file mode 100644 index 07be3f79..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolOffensiveWind.java +++ /dev/null @@ -1,23 +0,0 @@ -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; - -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, (int) (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 deleted file mode 100644 index 30f3849b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpell.java +++ /dev/null @@ -1,141 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.simple; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -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; - private int environmentalEnergy; - - public HomSpell() - { - //super(id); - //this.setMaxStackSize(1); - // TODO Auto-generated constructor stub - } - - @Override - public abstract ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); - - @Override - public abstract ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); - - @Override - public abstract ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); - - @Override - public abstract ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); - - public int getOffensiveRangedEnergy() - { - return offensiveRangedEnergy; - } - - public int getOffensiveMeleeEnergy() - { - return offensiveMeleeEnergy; - } - - public int getDefensiveEnergy() - { - return defensiveEnergy; - } - - public int getEnvironmentalEnergy() - { - return environmentalEnergy; - } - - public void setEnergies(int offensiveRanged, int offensiveMelee, int defensive, int environmental) - { - this.offensiveRangedEnergy = offensiveRanged; - this.offensiveMeleeEnergy = offensiveMelee; - this.defensiveEnergy = defensive; - this.environmentalEnergy = environmental; - } - - public void setSpellParadigm(ItemStack itemStack, int paradigm) - { - if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - itemStack.getTagCompound().setInteger("paradigm", paradigm); - } - - public int getSpellParadigm(ItemStack itemStack) - { - if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - return (itemStack.getTagCompound().getInteger("paradigm")); - } - - //@Override - public ItemStack useSpell(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - int paradigm = getSpellParadigm(par1ItemStack); - - if (par3EntityPlayer.isSneaking()) - { - if (paradigm < 3) - { - this.setSpellParadigm(par1ItemStack, paradigm + 1); - } else - { - this.setSpellParadigm(par1ItemStack, 0); - } - - return par1ItemStack; - } - - switch (paradigm) - { - case 0: - return this.onOffensiveRangedRightClick(par1ItemStack, par2World, par3EntityPlayer); - - case 1: - return this.onOffensiveMeleeRightClick(par1ItemStack, par2World, par3EntityPlayer); - - case 2: - return this.onDefensiveRightClick(par1ItemStack, par2World, par3EntityPlayer); - - case 3: - return this.onEnvironmentalRightClick(par1ItemStack, par2World, par3EntityPlayer); - } - - return par1ItemStack; - } - -// @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")); -// } -// -// par3List.add("Current paradigm: " + this.getSpellParadigm(par1ItemStack)); -// } -// } - - public int getDimensionID(ItemStack itemStack) - { - if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - return itemStack.getTagCompound().getInteger("dimensionId"); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellComponent.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellComponent.java deleted file mode 100644 index 41cfcaab..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellComponent.java +++ /dev/null @@ -1,26 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.simple; - -import net.minecraft.item.ItemStack; - -public class HomSpellComponent -{ - public HomSpell spell; - public ItemStack item; - public int blockID; - - public HomSpellComponent(ItemStack item, HomSpell spell) - { - this.item = item; - this.spell = spell; - } - - public HomSpell getSpell() - { - return spell; - } - - public ItemStack getItemStack() - { - return this.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 deleted file mode 100644 index c4f5ac28..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellRegistry.java +++ /dev/null @@ -1,55 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.simple; - -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -import java.util.ArrayList; -import java.util.List; - -public class HomSpellRegistry -{ - public static List spellList = new ArrayList(); - - public static void registerBasicSpell(ItemStack item, HomSpell spell) - { - spellList.add(new HomSpellComponent(item, spell)); - } - - public static HomSpell getSpellForItemStack(ItemStack testItem) - { - if (testItem == null) - { - return null; - } - - for (HomSpellComponent hsc : spellList) - { - ItemStack item = hsc.getItemStack(); - - if (item != null) - { - if (item.getItem() instanceof ItemBlock) - { - if (testItem.getItem() instanceof ItemBlock) - { - if (testItem.getItem() == item.getItem()) - { - return hsc.getSpell(); - } - } - } else - { - if (!(testItem.getItem() instanceof ItemBlock)) - { - if (testItem.getItem() == item.getItem()) - { - return hsc.getSpell(); - } - } - } - } - } - - return null; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java deleted file mode 100644 index 77a8799d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java +++ /dev/null @@ -1,16 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.simple; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public interface ISimpleSpell -{ - public abstract ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); - - public abstract ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); - - public abstract ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); - - public abstract ItemStack onEnvironmentalRightClick(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 deleted file mode 100644 index e4c6f282..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java +++ /dev/null @@ -1,190 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.simple; - -import java.util.Random; - -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; -import WayofTime.alchemicalWizardry.common.items.BindableItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -public class SpellEarthBender extends HomSpell -{ - Random itemRand = new Random(); - - public SpellEarthBender() - { - super(); - this.setEnergies(100, 150, 350, 200); - } - - @Override - public ItemStack onOffensiveRangedRightClick(ItemStack stack, World world, EntityPlayer player) - { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) - { - return stack; - } - - if (!player.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveRangedEnergy()); - } - - world.spawnEntityInWorld(new MudProjectile(world, player, 8, false)); - world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - return stack; - } - - @Override - public ItemStack onOffensiveMeleeRightClick(ItemStack stack, World world, EntityPlayer player) - { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) - { - return stack; - } - - if (!player.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveMeleeEnergy()); - } - - if (!world.isRemote) - { - for (int i = -1; i <= 1; i++) - { - for (int j = -1; j <= 1; j++) - { - world.spawnEntityInWorld(new MudProjectile(world, player, 3, 3, player.posX, player.posY + player.getEyeHeight(), player.posZ, player.rotationYaw + i * 10F, player.rotationPitch + j * 5F, true)); - } - } - } - - return stack; - } - - @Override - public ItemStack onDefensiveRightClick(ItemStack stack, World world, EntityPlayer player) - { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) - { - return stack; - } - - if (!player.capabilities.isCreativeMode) - { - SoulNetworkHandler.syphonAndDamageFromNetwork(stack, player, this.getDefensiveEnergy()); - } - - double xCoord = player.posX; - double yCoord = player.posY; - double zCoord = player.posZ; - int posX = (int) xCoord; - int posY = (int) yCoord; - int posZ = (int) zCoord; - BlockPos pos = player.getPosition(); - IBlockState blockID = Blocks.stone.getDefaultState(); - - if (world.isAirBlock(pos.offsetUp(3))) - { - world.setBlockState(pos.offsetUp(3), Blocks.glass.getDefaultState()); - } - - for (int i = 0; i < 4; i++) - { - for (int j = 0; j < 4; j++) - { - if (world.isAirBlock(new BlockPos(posX + i - 1, posY + j, posZ - 2))) - { - world.setBlockState(new BlockPos(posX + i - 1, posY + j, posZ - 2), blockID); - } - - if (world.isAirBlock(new BlockPos(posX + 2, posY + j, posZ - 1 + i))) - { - world.setBlockState(new BlockPos(posX + 2, posY + j, posZ - 1 + i), blockID); - } - - if (world.isAirBlock(new BlockPos(posX - i + 1, posY + j, posZ + 2))) - { - world.setBlockState(new BlockPos(posX - i + 1, posY + j, posZ + 2), blockID); - } - - if (world.isAirBlock(new BlockPos(posX - 2, posY + j, posZ + 1 - i))) - { - world.setBlockState(new BlockPos(posX - 2, posY + j, posZ + 1 - i), blockID); - } - - if (world.isAirBlock(new BlockPos(posX - 1 + i, posY + 3, posZ - 1 + j))) - { - world.setBlockState(new BlockPos(posX - 1 + i, posY + 3, posZ - 1 + j), blockID); - } - } - } - - for (int i = 0; i < 20; i++) - { - SpellHelper.sendParticleToAllAround(world, xCoord, yCoord, zCoord, 30, world.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); - } - - return stack; - } - - @Override - public ItemStack onEnvironmentalRightClick(ItemStack stack, World world, EntityPlayer player) - { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) - { - return stack; - } - - if (!player.capabilities.isCreativeMode) - { - SoulNetworkHandler.syphonAndDamageFromNetwork(stack, player, this.getEnvironmentalEnergy()); - } - - int range = 3; - - if (!world.isRemote) - { - for (int i = -range; i <= range; i++) - { - for (int j = -1; j <= 1; j++) - { - for (int k = -range; k <= range; k++) - { - BlockPos pos = player.getPosition().add(i, j, k); - if (world.getBlockState(pos).getBlock() == Blocks.water || world.getBlockState(pos).getBlock() == Blocks.flowing_water) - { - int x = world.rand.nextInt(2); - - if (x == 0) - { - world.setBlockState(pos, Blocks.sand.getDefaultState()); - } else - { - world.setBlockState(pos, Blocks.dirt.getDefaultState()); - } - } - } - } - } - } - - double xCoord = player.posX; - double yCoord = player.posY; - double zCoord = player.posZ; - - for (int i = 0; i < 16; i++) - { - SpellHelper.sendParticleToAllAround(world, xCoord, yCoord, zCoord, 30, world.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); - } - - return stack; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java deleted file mode 100644 index e5c4a333..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java +++ /dev/null @@ -1,104 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.simple; - -import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile; -import WayofTime.alchemicalWizardry.common.items.BindableItems; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import java.util.Random; - -public class SpellExplosions extends HomSpell -{ - Random itemRand = new Random(); - - public SpellExplosions() - { - super(); - this.setEnergies(400, 500, 1900, 1500); - } - - @Override - public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); - } - - par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - - if (!par2World.isRemote) - { - par2World.spawnEntityInWorld(new ExplosionProjectile(par2World, par3EntityPlayer, 6, true)); - } - - return par1ItemStack; - } - - @Override - public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); - } - - int distance = 4; - double yaw = par3EntityPlayer.rotationYaw / 180 * Math.PI; - double pitch = par3EntityPlayer.rotationPitch / 180 * Math.PI; - par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX + Math.sin(yaw) * Math.cos(pitch) * (-distance), par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance, par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance, (float) (3), true); - return par1ItemStack; - } - - @Override - public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); - } - - int distance = 4; - par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight(), par3EntityPlayer.posZ, (float) (distance), false); - return par1ItemStack; - } - - @Override - public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); - } - - int radius = 3; - - for (int i = 0; i < 360; i += 36) - { - par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX + Math.cos(i) * radius, par3EntityPlayer.posY, par3EntityPlayer.posZ + Math.sin(i) * radius, (float) (2), true); - } - - return null; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java deleted file mode 100644 index f8b23fdc..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java +++ /dev/null @@ -1,154 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.simple; - -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; -import net.minecraft.item.ItemStack; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; -import WayofTime.alchemicalWizardry.common.items.BindableItems; - -public class SpellFireBurst extends HomSpell -{ - public Random itemRand = new Random(); - - public SpellFireBurst() - { - super(); - this.setEnergies(100, 300, 400, 100); - } - - @Override - public ItemStack onOffensiveRangedRightClick(ItemStack stack, World world, EntityPlayer player) - { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) - { - return stack; - } - - if (!player.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveRangedEnergy()); - } - - world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - - if (!world.isRemote) - { - FireProjectile proj = new FireProjectile(world, player, 7); - world.spawnEntityInWorld(proj); - } - - return stack; - } - - @Override - public ItemStack onOffensiveMeleeRightClick(ItemStack stack, World world, EntityPlayer player) - { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) - { - return stack; - } - - if (!player.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveMeleeEnergy()); - } - - world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - - if (!world.isRemote) - { - for (int i = -1; i <= 1; i++) - { - for (int j = -1; j <= 1; j++) - { - world.spawnEntityInWorld(new FireProjectile(world, player, 8, 2, player.posX, player.posY + player.getEyeHeight(), player.posZ, player.rotationYaw + i * 10F, player.rotationPitch + j * 10F)); - } - } - } - - return stack; - } - - @Override - public ItemStack onDefensiveRightClick(ItemStack stack, World world, EntityPlayer player) - { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) - { - return stack; - } - - if (!player.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getDefensiveEnergy()); - } - - world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - int d0 = 2; - AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) player.posX, (double) player.posY, (double) player.posZ, (double) (player.posX + 1), (double) (player.posY + 2), (double) (player.posZ + 1)).expand(d0, d0, d0); - List list = player.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); - Iterator iterator = list.iterator(); - - while (iterator.hasNext()) - { - EntityLivingBase entityLiving = (EntityLivingBase) iterator.next(); - - if (entityLiving instanceof EntityPlayer) - { - if (entityLiving.equals(player)) - { - continue; - } - } - - entityLiving.setFire(100); - entityLiving.attackEntityFrom(DamageSource.inFire, 2); - } - return stack; - } - - @Override - public ItemStack onEnvironmentalRightClick(ItemStack stack, World world, EntityPlayer player) - { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) - { - return stack; - } - - if (!player.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getEnvironmentalEnergy()); - } - - world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - World worldObj = world; - - for (int i = -1; i <= 1; i++) - { - for (int j = -1; j <= 1; j++) - { - for (int k = -1; k <= 1; k++) - { - BlockPos pos = player.getPosition().add(i, k, k); - if (worldObj.isAirBlock(pos)) - { - if (worldObj.rand.nextFloat() < 0.8F) - { - worldObj.setBlockState(pos, Blocks.fire.getDefaultState()); - } - } - } - } - } - - return stack; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java deleted file mode 100644 index 10cf5ccb..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java +++ /dev/null @@ -1,209 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.simple; - -import java.util.Random; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; -import WayofTime.alchemicalWizardry.common.items.BindableItems; - -public class SpellFrozenWater extends HomSpell -{ - public Random itemRand = new Random(); - - public SpellFrozenWater() - { - super(); - this.setEnergies(100, 200, 150, 100); - } - - @Override - public ItemStack onOffensiveRangedRightClick(ItemStack stack, World world, EntityPlayer player) - { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) - { - return stack; - } - - if (!player.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveRangedEnergy()); - } - - world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - - if (!world.isRemote) - { - world.spawnEntityInWorld(new IceProjectile(world, player, 6)); - } - - return stack; - } - - @Override - public ItemStack onOffensiveMeleeRightClick(ItemStack stack, World world, EntityPlayer player) - { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) - { - return stack; - } - - if (!player.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveMeleeEnergy()); - } - - for (int i = -2; i <= 2; i++) - { - world.spawnEntityInWorld(new IceProjectile(world, player, 6, 2, player.posX, player.posY + player.getEyeHeight(), player.posZ, player.rotationYaw + i * 5F, player.rotationPitch)); - } - - return stack; - } - - @Override - public ItemStack onDefensiveRightClick(ItemStack stack, World world, EntityPlayer player) - { - if (!player.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(stack, player, getDefensiveEnergy()); - } - - float yaw = player.rotationYaw; - float pitch = player.rotationPitch; - int range = 2; - - BlockPos pos = player.getPosition(); - BlockPos newPos = pos; - - if (pitch > 40F) - { - for (int i = -range; i <= range; i++) - { - for (int j = -range; j <= range; j++) - { - newPos = pos.add(i, -1, j); - - if (world.isAirBlock(newPos)) - { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); - } - } - } - - return stack; - } else if (pitch < -40F) - { - for (int i = -range; i <= range; i++) - { - for (int j = -range; j <= range; j++) - { - newPos = pos.add(i, 3, j); - - if (world.isAirBlock(newPos)) - { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); - } - } - } - - return stack; - } - - if ((yaw >= 315 && yaw < 360) || (yaw >= 0 && yaw < 45)) - { - for (int i = -range; i <= range; i++) - { - for (int j = 0; j < range * 2 + 1; j++) - { - newPos = pos.add(i, j, 2); - - if (world.isAirBlock(newPos)) - { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); - } - } - } - } else if (yaw >= 45 && yaw < 135) - { - for (int i = -range; i <= range; i++) - { - for (int j = 0; j < range * 2 + 1; j++) - { - newPos = pos.add(-2, j, i); - - if (world.isAirBlock(newPos)) - { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); - } - } - } - } else if (yaw >= 135 && yaw < 225) - { - for (int i = -range; i <= range; i++) - { - for (int j = 0; j < range * 2 + 1; j++) - { - newPos = pos.add(i, j, -2); - - if (world.isAirBlock(newPos)) - { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); - } - } - } - } else - { - for (int i = -range; i <= range; i++) - { - for (int j = 0; j < range * 2 + 1; j++) - { - newPos = pos.add(2, j, i); - - if (world.isAirBlock(newPos)) - { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); - } - } - } - } - - return stack; - } - - @Override - public ItemStack onEnvironmentalRightClick(ItemStack stack, World world, EntityPlayer player) - { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) - { - return stack; - } - - int radius = 3; - int posX = (int) player.posX; - int posY = (int) player.posY; - int posZ = (int) player.posZ; - - for (int i = -radius; i <= radius; i++) - { - for (int j = -radius; j <= radius; j++) - { - for (int k = -radius; k <= radius; k++) - { - BlockPos pos = player.getPosition().add(i, j, k); - - IBlockState state = world.getBlockState(pos); - if (state.getBlock() == Blocks.water || state.getBlock() == Blocks.flowing_water) - { - world.setBlockState(pos, Blocks.ice.getDefaultState()); - } - } - } - } - return stack; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java deleted file mode 100644 index f837d538..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java +++ /dev/null @@ -1,181 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.simple; - -import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; -import WayofTime.alchemicalWizardry.common.items.BindableItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.world.World; - -import java.util.Iterator; -import java.util.List; -import java.util.Random; - -public class SpellHolyBlast extends HomSpell -{ - Random itemRand = new Random(); - - public SpellHolyBlast() - { - super(); - this.setEnergies(100, 300, 500, 400); - } - - @Override - public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); - } - - par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - - if (!par2World.isRemote) - { - par2World.spawnEntityInWorld(new HolyProjectile(par2World, par3EntityPlayer, 8)); - } - - return par1ItemStack; - } - - @Override - public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); - } - - int distance = 2; - double yaw = par3EntityPlayer.rotationYaw / 180 * Math.PI; - double pitch = par3EntityPlayer.rotationPitch / 180 * Math.PI; - double xCoord = par3EntityPlayer.posX + Math.sin(yaw) * Math.cos(pitch) * (-distance); - double yCoord = par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance; - double zCoord = par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance; - float d0 = 0.5f; - AxisAlignedBB axisalignedbb = new AxisAlignedBB(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(); - - while (iterator.hasNext()) - { - EntityLivingBase entityLiving = (EntityLivingBase) iterator.next(); - - if (entityLiving instanceof EntityPlayer) - { - if (entityLiving.equals(par3EntityPlayer)) - { - continue; - } - } - - int i = 1; - - if (entityLiving.isEntityUndead()) - { - i = 3; - } - entityLiving.attackEntityFrom(DamageSource.causePlayerDamage(par3EntityPlayer), 5 * i); - } - - par2World.createExplosion(par3EntityPlayer, xCoord, yCoord, zCoord, (float) (1), false); - - for (int i = 0; i < 5; i++) - { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); - } - - return par1ItemStack; - } - - @Override - public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); - } - - 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)); - } - } - - return par1ItemStack; - } - - @Override - public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); - } - - int d0 = 3; - AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); - List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); - Iterator iterator = list.iterator(); - - while (iterator.hasNext()) - { - EntityLivingBase entityLiving = (EntityLivingBase) iterator.next(); - - if (entityLiving instanceof EntityPlayer) - { - if (entityLiving.equals(par3EntityPlayer)) - { - continue; - } - } - - int i = 1; - - if (entityLiving.isEntityUndead()) - { - i = 3; - } - entityLiving.attackEntityFrom(DamageSource.causePlayerDamage(par3EntityPlayer), 5 * i); - } - - par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (float) (2), false); - double xCoord = par3EntityPlayer.posX; - double yCoord = par3EntityPlayer.posY; - double zCoord = par3EntityPlayer.posZ; - - for (int i = 0; i < 20; i++) - { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); - } - - return par1ItemStack; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java deleted file mode 100644 index e2f4cb5c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java +++ /dev/null @@ -1,132 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.simple; - -import WayofTime.alchemicalWizardry.common.entity.projectile.LightningBoltProjectile; -import WayofTime.alchemicalWizardry.common.items.BindableItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.world.World; - -import java.util.Random; - -public class SpellLightningBolt extends HomSpell -{ - Random itemRand = new Random(); - - public SpellLightningBolt() - { - super(); - this.setEnergies(75, 200, 700, 700); - } - - @Override - public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); - } - - par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - - if (!par2World.isRemote) - { - par2World.spawnEntityInWorld(new LightningBoltProjectile(par2World, par3EntityPlayer, 8, false)); - } - - return par1ItemStack; - } - - @Override - public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - //TODO Make it work better...? - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); - } - - double xCoord = par3EntityPlayer.posX; - double yCoord = par3EntityPlayer.posY; - double zCoord = par3EntityPlayer.posZ; - par2World.getWorldInfo().setRaining(true); - if(par2World.isRemote) - { - par2World.setRainStrength(1.0f); - par2World.setThunderStrength(1.0f); - } - - par2World.getWorldInfo().setThunderTime(0); - par2World.getWorldInfo().setThundering(true); - - for (int i = 0; i < 5; i++) - { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); - } - - return par1ItemStack; - } - - @Override - public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); - } - - double xCoord = par3EntityPlayer.posX; - double yCoord = par3EntityPlayer.posY; - 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)); - } - - for (int i = 0; i < 8; i++) - { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); - } - - return par1ItemStack; - } - - @Override - public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); - } - - if (!par2World.isRemote) - { - par2World.spawnEntityInWorld(new LightningBoltProjectile(par2World, par3EntityPlayer, 8, true)); - } - - return par1ItemStack; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java deleted file mode 100644 index a4158eaf..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java +++ /dev/null @@ -1,267 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.simple; - -import java.util.Iterator; -import java.util.List; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.monster.EntityEnderman; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumParticleTypes; -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.BindableItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -public class SpellTeleport extends HomSpell -{ - public static Random itemRand = new Random(); - - public SpellTeleport() - { - super(); - this.setEnergies(500, 300, 500, 1000); - } - - @Override - public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); - } - - par2World.spawnEntityInWorld(new TeleportProjectile(par2World, par3EntityPlayer, 8, true)); - par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - EntityEnderman g; - return par1ItemStack; - } - - @Override - public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); - } - - par2World.spawnEntityInWorld(new TeleportProjectile(par2World, par3EntityPlayer, 8, false)); - return par1ItemStack; - } - - @Override - public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); - } - - double xCoord = par3EntityPlayer.posX; - double yCoord = par3EntityPlayer.posY; - double zCoord = par3EntityPlayer.posZ; - SpellTeleport.teleportRandomly(par3EntityPlayer, 128); - - for (int i = 0; i < 20; i++) - { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.PORTAL, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, itemRand.nextFloat(), itemRand.nextFloat(), itemRand.nextFloat()); - } - - return par1ItemStack; - } - - @Override - public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); - } - - if (!par2World.isRemote) - { - int d0 = 3; - AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); - List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); - Iterator iterator = list.iterator(); - - while (iterator.hasNext()) - { - EntityLivingBase entityLiving = (EntityLivingBase) iterator.next(); - - if (entityLiving instanceof EntityPlayer) - { - if (entityLiving.equals(par3EntityPlayer)) - { - continue; - } - } - SpellTeleport.teleportRandomly(entityLiving, 128); - } - } - - double xCoord = par3EntityPlayer.posX; - double yCoord = par3EntityPlayer.posY; - double zCoord = par3EntityPlayer.posZ; - - for (int i = 0; i < 32; i++) - { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.PORTAL, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, itemRand.nextFloat(), itemRand.nextFloat(), itemRand.nextFloat()); - } - - return par1ItemStack; - } - - public static boolean teleportRandomly(EntityLivingBase entityLiving, double distance) - { - double x = entityLiving.posX; - double y = entityLiving.posY; - double z = entityLiving.posZ; - Random rand = new Random(); - double d0 = x + (rand.nextDouble() - 0.5D) * distance; - double d1 = y + (double) (rand.nextInt((int) distance) - (distance) / 2); - double d2 = z + (rand.nextDouble() - 0.5D) * distance; - int i = 0; - - while (!SpellTeleport.teleportTo(entityLiving, d0, d1, d2, x, y, z) && i < 100) - { - d0 = x + (rand.nextDouble() - 0.5D) * distance; - d1 = y + (double) (rand.nextInt((int) distance) - (distance) / 2); - d2 = z + (rand.nextDouble() - 0.5D) * distance; - i++; - } - - if (i >= 100) - { - return false; - } - - return true; - } - - private static boolean teleportTo(EntityLivingBase entityLiving, double par1, double par3, double par5, double lastX, double lastY, double lastZ) - { - net.minecraftforge.event.entity.living.EnderTeleportEvent event = new net.minecraftforge.event.entity.living.EnderTeleportEvent(entityLiving, par1, par3, par5, 0); - if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) return false; - double d3 = entityLiving.posX; - double d4 = entityLiving.posY; - double d5 = entityLiving.posZ; - entityLiving.posX = event.targetX; - entityLiving.posY = event.targetY; - entityLiving.posZ = event.targetZ; - boolean flag = false; - BlockPos blockpos = new BlockPos(entityLiving.posX, entityLiving.posY, entityLiving.posZ); - - if (entityLiving.worldObj.isBlockLoaded(blockpos)) - { - boolean flag1 = false; - - while (!flag1 && blockpos.getY() > 0) - { - BlockPos blockpos1 = blockpos.offsetDown(); - Block block = entityLiving.worldObj.getBlockState(blockpos1).getBlock(); - - if (block.getMaterial().blocksMovement()) - { - flag1 = true; - } - else - { - --entityLiving.posY; - blockpos = blockpos1; - } - } - - if (flag1) - { - entityLiving.setPositionAndUpdate(entityLiving.posX, entityLiving.posY, entityLiving.posZ); - - if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.getEntityBoundingBox()).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.getEntityBoundingBox())) - { - flag = true; - } - } - } - - if (!flag) - { - entityLiving.setPosition(d3, d4, d5); - return false; - } - else - { - short short1 = 128; - - for (int i = 0; i < short1; ++i) - { - double d9 = (double)i / ((double)short1 - 1.0D); - float f = (itemRand.nextFloat() - 0.5F) * 0.2F; - float f1 = (itemRand.nextFloat() - 0.5F) * 0.2F; - float f2 = (itemRand.nextFloat() - 0.5F) * 0.2F; - double d6 = d3 + (entityLiving.posX - d3) * d9 + (itemRand.nextDouble() - 0.5D) * (double)entityLiving.width * 2.0D; - double d7 = d4 + (entityLiving.posY - d4) * d9 + itemRand.nextDouble() * (double)entityLiving.height; - double d8 = d5 + (entityLiving.posZ - d5) * d9 + (itemRand.nextDouble() - 0.5D) * (double)entityLiving.width * 2.0D; - entityLiving.worldObj.spawnParticle(EnumParticleTypes.PORTAL, d6, d7, d8, (double)f, (double)f1, (double)f2, new int[0]); - } - - entityLiving.worldObj.playSoundEffect(d3, d4, d5, "mob.endermen.portal", 1.0F, 1.0F); - entityLiving.playSound("mob.endermen.portal", 1.0F, 1.0F); - return true; - } - } - - public static void moveEntityViaTeleport(EntityLivingBase entityLiving, double x, double y, double z) - { - if (entityLiving instanceof EntityPlayer) - { - if (entityLiving != null && entityLiving instanceof EntityPlayerMP) - { - EntityPlayerMP entityplayermp = (EntityPlayerMP) entityLiving; - if (entityplayermp.worldObj == entityLiving.worldObj) - { - EnderTeleportEvent event = new EnderTeleportEvent(entityplayermp, x, y, z, 5.0F); - - if (!MinecraftForge.EVENT_BUS.post(event)) - { - if (entityLiving.isRiding()) - { - entityLiving.mountEntity((Entity) null); - } - entityLiving.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ); - } - } - } - } else if (entityLiving != null) - { - entityLiving.setPosition(x, y, z); - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java deleted file mode 100644 index 054538fe..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java +++ /dev/null @@ -1,171 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.simple; - -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; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile; -import WayofTime.alchemicalWizardry.common.items.BindableItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -public class SpellWateryGrave extends HomSpell -{ - Random itemRand = new Random(); - - public SpellWateryGrave() - { - super(); - this.setEnergies(250, 350, 500, 750); - } - - @Override - public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); - } - - par2World.spawnEntityInWorld(new WaterProjectile(par2World, par3EntityPlayer, 8)); - par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - return par1ItemStack; - } - - @Override - public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.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)); - } - } - } - - return par1ItemStack; - } - - @Override - public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); - } - - int d0 = 3; - AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); - List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); - Iterator iterator = list.iterator(); - - while (iterator.hasNext()) - { - EntityLivingBase entityLiving = (EntityLivingBase) iterator.next(); - - if (entityLiving instanceof EntityPlayer) - { - if (entityLiving.equals(par3EntityPlayer)) - { - continue; - } - } - - int x = 1; - - if (entityLiving.isImmuneToFire()) - { - x = 2; - } - - entityLiving.attackEntityFrom(DamageSource.drown, 2 * x); - entityLiving.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 100, x - 1)); - } - - double xCoord = par3EntityPlayer.posX; - double yCoord = par3EntityPlayer.posY; - double zCoord = par3EntityPlayer.posZ; - - for (int i = 0; i < 20; i++) - { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); - } - - return par1ItemStack; - } - - @Override - public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); - } - - int range = 2; - - if (!par2World.isRemote) - { - for (int i = -range; i <= range; i++) - { - for (int j = -range; j <= range; j++) - { - BlockPos newPos = new BlockPos((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY, (int) par3EntityPlayer.posZ + j); - if (par2World.isAirBlock(newPos)) - { - par2World.setBlockState(newPos, Blocks.water.getDefaultState()); - } - } - } - } - - double xCoord = par3EntityPlayer.posX; - double yCoord = par3EntityPlayer.posY; - double zCoord = par3EntityPlayer.posZ; - - for (int i = 0; i < 16; i++) - { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); - } - - 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 deleted file mode 100644 index 2bbfd322..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java +++ /dev/null @@ -1,187 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.simple; - -import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; -import WayofTime.alchemicalWizardry.common.items.BindableItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; - -import java.util.Iterator; -import java.util.List; -import java.util.Random; - -public class SpellWindGust extends HomSpell -{ - Random itemRand = new Random(); - - public SpellWindGust() - { - super(); - this.setEnergies(300, 400, 300, 500); - } - - @Override - public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); - } - - par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - - if (!par2World.isRemote) - { - par2World.spawnEntityInWorld(new WindGustProjectile(par2World, par3EntityPlayer, 8)); - } - - return par1ItemStack; - } - - @Override - public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); - } - - int distance = 3; - double yaw = par3EntityPlayer.rotationYaw / 180 * Math.PI; - double pitch = par3EntityPlayer.rotationPitch / 180 * Math.PI; - double xCoord = par3EntityPlayer.posX + Math.sin(yaw) * Math.cos(pitch) * (-distance); - double yCoord = par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance; - double zCoord = par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance; - float d0 = 0.5f; - AxisAlignedBB axisalignedbb = new AxisAlignedBB(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(); - - while (iterator.hasNext()) - { - EntityLivingBase entityLiving = (EntityLivingBase) iterator.next(); - - if (entityLiving instanceof EntityPlayer) - { - if (entityLiving.equals(par3EntityPlayer)) - { - continue; - } - } - entityLiving.motionX = Math.sin(-yaw) * 2; - entityLiving.motionY = 2; - entityLiving.motionZ = Math.cos(yaw) * 2; - } - for (int i = 0; i < 5; i++) - { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); - - } - return par1ItemStack; - } - - @Override - public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); - } - - int distance = 3; - double yaw = par3EntityPlayer.rotationYaw / 180 * Math.PI; - double pitch = par3EntityPlayer.rotationPitch / 180 * Math.PI; - double wantedVelocity = 5; - double xVel = Math.sin(yaw) * Math.cos(pitch) * (-wantedVelocity); - double yVel = Math.sin(-pitch) * wantedVelocity; - double zVel = Math.cos(yaw) * Math.cos(pitch) * wantedVelocity; - Vec3 vec = par3EntityPlayer.getLookVec(); - par3EntityPlayer.motionX = vec.xCoord * wantedVelocity; - par3EntityPlayer.motionY = vec.yCoord * wantedVelocity; - par3EntityPlayer.motionZ = vec.zCoord * wantedVelocity; - SpellHelper.setPlayerSpeedFromServer(par3EntityPlayer, xVel, yVel, zVel); - par2World.playSoundEffect((double) ((float) par3EntityPlayer.posX + 0.5F), (double) ((float) par3EntityPlayer.posY + 0.5F), (double) ((float) par3EntityPlayer.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F); - par3EntityPlayer.fallDistance = 0; - double xCoord = par3EntityPlayer.posX; - double yCoord = par3EntityPlayer.posY; - double zCoord = par3EntityPlayer.posZ; - - for (int i = 0; i < 8; i++) - { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); - } - - return par1ItemStack; - } - - @Override - public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); - } - - int d0 = 3; - AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); - List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); - Iterator iterator = list.iterator(); - double xCoord = par3EntityPlayer.posX; - double yCoord = par3EntityPlayer.posY; - double zCoord = par3EntityPlayer.posZ; - double wantedVel = 2; - - while (iterator.hasNext()) - { - EntityLivingBase entityLiving = (EntityLivingBase) iterator.next(); - - if (entityLiving instanceof EntityPlayer) - { - if (entityLiving.equals(par3EntityPlayer)) - { - continue; - } - } - - double posXDif = entityLiving.posX - par3EntityPlayer.posX; - double posYDif = entityLiving.posY - par3EntityPlayer.posY + 1; - double posZDif = entityLiving.posZ - par3EntityPlayer.posZ; - double distance2 = Math.pow(posXDif, 2) + Math.pow(posYDif, 2) + Math.pow(posZDif, 2); - double distance = Math.sqrt(distance2); - entityLiving.motionX = posXDif * wantedVel / distance; - entityLiving.motionY = posYDif * wantedVel / distance; - entityLiving.motionZ = posZDif * wantedVel / distance; - } - for (int i = 0; i < 20; i++) - { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); - } - - return par1ItemStack; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/SummoningFallenAngel.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/SummoningFallenAngel.java deleted file mode 100644 index 1375c7ff..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/SummoningFallenAngel.java +++ /dev/null @@ -1,19 +0,0 @@ -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; - -public class SummoningFallenAngel extends SummoningHelper -{ - public SummoningFallenAngel(String id) - { - super(id); - } - - public EntityLivingBase getEntity(World worldObj) - { - return new EntityFallenAngel(worldObj); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/SummoningHelperAW.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/SummoningHelperAW.java deleted file mode 100644 index c2df04ad..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/SummoningHelperAW.java +++ /dev/null @@ -1,139 +0,0 @@ -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; -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 WayofTime.alchemicalWizardry.common.entity.mob.EntityAirElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBileDemon; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBoulderFist; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityEarthElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFireElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityHolyElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityShade; -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; - -public class SummoningHelperAW extends SummoningHelper -{ - public SummoningHelperAW(String id) - { - super(id); - } - - public EntityLivingBase getEntity(World worldObj) - { - if (this.id.equals(AlchemicalWizardry.entityFallenAngelID)) - { - return new EntityFallenAngel(worldObj); - } - - if (this.id.equals(AlchemicalWizardry.entityLowerGuardianID)) - { - return new EntityLowerGuardian(worldObj); - } - - if (this.id.equals(AlchemicalWizardry.entityBileDemonID)) - { - return new EntityBileDemon(worldObj); - } - - if (this.id.equals(AlchemicalWizardry.entityWingedFireDemonID)) - { - return new EntityWingedFireDemon(worldObj); - } - - if (this.id.equals(AlchemicalWizardry.entitySmallEarthGolemID)) - { - return new EntitySmallEarthGolem(worldObj); - } - - if (this.id.equals(AlchemicalWizardry.entityIceDemonID)) - { - return new EntityIceDemon(worldObj); - } - - if (this.id.equals(AlchemicalWizardry.entityBoulderFistID)) - { - return new EntityBoulderFist(worldObj); - } - - if (this.id.equals(AlchemicalWizardry.entityShadeID)) - { - return new EntityShade(worldObj); - } - - if (this.id.equals(AlchemicalWizardry.entityAirElementalID)) - { - return new EntityAirElemental(worldObj); - } - - if (this.id.equals(AlchemicalWizardry.entityWaterElementalID)) - { - return new EntityWaterElemental(worldObj); - } - - if (this.id.equals(AlchemicalWizardry.entityEarthElementalID)) - { - return new EntityEarthElemental(worldObj); - } - - if (this.id.equals(AlchemicalWizardry.entityFireElementalID)) - { - return new EntityFireElemental(worldObj); - } - - if (this.id.equals(AlchemicalWizardry.entityShadeElementalID)) - { - return new EntityShadeElemental(worldObj); - } - - if (this.id.equals(AlchemicalWizardry.entityHolyElementalID)) - { - return new EntityHolyElemental(worldObj); - } - - if(this.id.equals(AlchemicalWizardry.entityMinorDemonGruntID)) - { - return new EntityMinorDemonGrunt(worldObj); - } - - if(this.id.equals(AlchemicalWizardry.entityMinorDemonGruntFireID)) - { - return new EntityMinorDemonGruntFire(worldObj); - } - - if(this.id.equals(AlchemicalWizardry.entityMinorDemonGruntEarthID)) - { - return new EntityMinorDemonGruntEarth(worldObj); - } - - if(this.id.equals(AlchemicalWizardry.entityMinorDemonGruntWindID)) - { - return new EntityMinorDemonGruntWind(worldObj); - } - - if(this.id.equals(AlchemicalWizardry.entityMinorDemonGruntIceID)) - { - return new EntityMinorDemonGruntIce(worldObj); - } - - return new EntityPig(worldObj); - } - - public String getSummoningHelperID() - { - return id; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java deleted file mode 100644 index 65423c95..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java +++ /dev/null @@ -1,170 +0,0 @@ -package WayofTime.alchemicalWizardry.common.summoning.meteor; - -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.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; - -public class MeteorParadigm -{ - public List componentList = new ArrayList(); - public ItemStack focusStack; - public int radius; - public static int maxChance = 1000; - - public static Random rand = new Random(); - - public MeteorParadigm(ItemStack focusStack, int radius) - { - this.focusStack = focusStack; - this.radius = radius; - } - - public void parseStringArray(String[] oreArray) - { - for (int i = 0; i + 1 < oreArray.length; i += 2) - { - String oreName = oreArray[i]; - int oreChance = Integer.parseInt(oreArray[i + 1]); - MeteorParadigmComponent mpc = new MeteorParadigmComponent(oreName, oreChance); - componentList.add(mpc); - } - } - - public void createMeteorImpact(World world, BlockPos pos, boolean[] flags) - { - boolean hasTerrae = false; - boolean hasOrbisTerrae = false; - boolean hasCrystallos = false; - boolean hasIncendium = false; - boolean hasTennebrae = false; - - if (flags != null && flags.length >= 5) - { - hasTerrae = flags[0]; - hasOrbisTerrae = flags[1]; - hasCrystallos = flags[2]; - hasIncendium = flags[3]; - hasTennebrae = flags[4]; - } - - int newRadius = radius; - int chance = maxChance; - - if (hasOrbisTerrae) - { - newRadius += 2; - chance += 200; - } else if (hasTerrae) - { - newRadius += 1; - chance += 100; - } - - world.createExplosion(null, pos.getX(), pos.getY(), pos.getZ(), newRadius * 4, AlchemicalWizardry.doMeteorsDestroyBlocks); - - float iceChance = hasCrystallos ? 1 : 0; - float soulChance = hasIncendium ? 1 : 0; - float obsidChance = hasTennebrae ? 1 : 0; - - float totalChance = iceChance + soulChance + obsidChance; - - for (int i = -newRadius; i <= newRadius; i++) - { - for (int j = -newRadius; j <= newRadius; j++) - { - for (int k = -newRadius; k <= newRadius; k++) - { - if (i * i + j * j + k * k >= (newRadius + 0.50f) * (newRadius + 0.50f)) - { - continue; - } - - BlockPos newPos = pos.add(i, j, k); - - if (!world.isAirBlock(newPos)) - { - continue; - } - - int randNum = world.rand.nextInt(chance); - boolean hasPlacedBlock = false; - - for (MeteorParadigmComponent mpc : componentList) - { - if (mpc == null || !mpc.isValidBlockParadigm()) - { - continue; - } - - randNum -= mpc.getChance(); - - if (randNum < 0) - { - ItemStack blockStack = mpc.getValidBlockParadigm(); - if(blockStack != null && blockStack.getItem() instanceof ItemBlock) - { - ((ItemBlock)blockStack.getItem()).placeBlockAt(blockStack, null, world, newPos, EnumFacing.DOWN, 0, 0, 0, ((ItemBlock)blockStack.getItem()).block.getStateFromMeta(blockStack.getItemDamage())); - world.markBlockForUpdate(newPos); - hasPlacedBlock = true; - break; - } -// world.setBlock(newPos, Block.getBlockById(Item.getIdFromItem(blockStack.getItem())), blockStack.getItemDamage(), 3); -// hasPlacedBlock = true; -// break; - } - } - - if (!hasPlacedBlock) - { - float randChance = rand.nextFloat() * totalChance; - - if (randChance < iceChance) - { - world.setBlockState(newPos, Blocks.ice.getDefaultState(), 3); - } else - { - randChance -= iceChance; - - if (randChance < soulChance) - { - switch (rand.nextInt(3)) - { - case 0: - world.setBlockState(newPos, Blocks.soul_sand.getDefaultState(), 3); - break; - case 1: - world.setBlockState(newPos, Blocks.glowstone.getDefaultState(), 3); - break; - case 2: - world.setBlockState(newPos, Blocks.netherrack.getDefaultState(), 3); - break; - } - } else - { - randChance -= soulChance; - - if (randChance < obsidChance) - { - world.setBlockState(newPos, Blocks.obsidian.getDefaultState(), 3); - } else - { - randChance -= obsidChance; - - world.setBlockState(newPos, Blocks.stone.getDefaultState(), 3); - } - } - } - } - } - } - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigmComponent.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigmComponent.java deleted file mode 100644 index 0daa43a1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigmComponent.java +++ /dev/null @@ -1,54 +0,0 @@ -package WayofTime.alchemicalWizardry.common.summoning.meteor; - -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -import java.util.List; - -public class MeteorParadigmComponent -{ - public String oreDictName; - public int chance; - - public MeteorParadigmComponent(String dictName, int chance) - { - this.oreDictName = dictName; - this.chance = chance; - } - - public boolean isValidBlockParadigm() - { - if (this.getValidBlockParadigm() != null) - { - return true; - } - - return false; - } - - public String getOreDictName() - { - return this.oreDictName; - } - - public int getChance() - { - return this.chance; - } - - public ItemStack getValidBlockParadigm() - { - List list = OreDictionary.getOres(getOreDictName()); - - for (ItemStack stack : list) - { - if (stack != null && stack.getItem() instanceof ItemBlock) - { - return stack; - } - } - - return null; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java deleted file mode 100644 index 1ed03f73..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java +++ /dev/null @@ -1,62 +0,0 @@ -package WayofTime.alchemicalWizardry.common.summoning.meteor; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -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) - { - paradigmList.add(paradigm); - } - - public static void registerMeteorParadigm(ItemStack stack, String[] oreList, int radius) - { - if (stack != null && oreList != null) - { - MeteorParadigm meteor = new MeteorParadigm(stack, radius); - meteor.parseStringArray(oreList); - paradigmList.add(meteor); - } - } - - public static void createMeteorImpact(World world, BlockPos pos, int paradigmID, boolean[] flags) - { - if (paradigmID < paradigmList.size()) - { - paradigmList.get(paradigmID).createMeteorImpact(world, pos, flags); - } - } - - public static int getParadigmIDForItem(ItemStack stack) - { - if (stack == null) - { - return -1; - } - - for (int i = 0; i < paradigmList.size(); i++) - { - ItemStack focusStack = paradigmList.get(i).focusStack; - - if (focusStack != null && focusStack.getItem() == stack.getItem() && (focusStack.getItemDamage() == OreDictionary.WILDCARD_VALUE || focusStack.getItemDamage() == stack.getItemDamage())) - { - return i; - } - } - - return -1; - } - - public static boolean isValidParadigmItem(ItemStack stack) - { - return getParadigmIDForItem(stack) != -1; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/thread/CommandDownloadGAPI.java b/src/main/java/WayofTime/alchemicalWizardry/common/thread/CommandDownloadGAPI.java deleted file mode 100644 index 0c57dc79..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/thread/CommandDownloadGAPI.java +++ /dev/null @@ -1,38 +0,0 @@ -package WayofTime.alchemicalWizardry.common.thread; - -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 CommandDownloadGAPI extends CommandBase -{ - private static final boolean ENABLED = true; - - @Override - public String getCommandName() - { - return "bloodmagic-download-g-api"; - } - - @Override - public String getCommandUsage(ICommandSender var1) - { - return "/bloodmagic-download-g-api"; - } - - @Override - public void processCommand(ICommandSender var1, String[] var2) - { - if (!ENABLED) - var1.addChatMessage(new ChatComponentTranslation("bm.versioning.disabled").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED))); - - else - if (GAPIChecker.downloadedFile) - var1.addChatMessage(new ChatComponentTranslation("bm.versioning.downloadedAlready").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED))); - else if (GAPIChecker.startedDownload) - var1.addChatMessage(new ChatComponentTranslation("bm.versioning.downloadingAlready").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED))); - else new ThreadDownloadGAPI("Guide-API-1.7.10-" + GAPIChecker.onlineVersion + ".jar"); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/thread/GAPIChecker.java b/src/main/java/WayofTime/alchemicalWizardry/common/thread/GAPIChecker.java deleted file mode 100644 index fa7bda35..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/thread/GAPIChecker.java +++ /dev/null @@ -1,119 +0,0 @@ -package WayofTime.alchemicalWizardry.common.thread; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.Arrays; -import java.util.LinkedList; -import java.util.List; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; - -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.IChatComponent; -import net.minecraft.util.StatCollector; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.common.Loader; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent; -import net.minecraftforge.fml.relauncher.FMLInjectionData; - -public class GAPIChecker -{ - public static boolean doneChecking = false; - public static String onlineVersion = "@VERSION@"; - public static boolean triedToWarnPlayer = false; - - public static boolean startedDownload = false; - public static boolean downloadedFile = false; - - private File modsDir; - - public void init() - { - FMLCommonHandler.instance().bus().register(this); - File mcDir = (File)FMLInjectionData.data()[6]; - - this.modsDir = new File(mcDir, "mods"); - - scanDepInfos(); - } - - private void scanDepInfos() - { - for (File file : modFiles()) - { - if ((file.getName().endsWith(".jar")) && file.getName().contains("BloodMagic")) - { - scanDepInfo(file); - } - } - } - - private void scanDepInfo(File file) - { - try - { - ZipFile zip = new ZipFile(file); - ZipEntry e = zip.getEntry("Guide-API-Version.info"); - if (e == null) - { - e = zip.getEntry("Guide-API-Version.info"); - } - if (e != null) - { - readConfigFile(zip.getInputStream(e)); - } - zip.close(); - } - catch (Exception e) - { - System.err.println("Failed to load dependencies.info from " + file.getName() + " as JSON"); - e.printStackTrace(); - } - } - - private List modFiles() - { - List list = new LinkedList(); - list.addAll(Arrays.asList(this.modsDir.listFiles())); - return list; - } - - private void readConfigFile(InputStream inputStream) throws IOException - { - if (inputStream != null) - { - try - { - BufferedReader r = new BufferedReader(new InputStreamReader(inputStream)); - onlineVersion = r.readLine(); - doneChecking = true; - r.close(); - } - catch (Exception e) - { - e.printStackTrace(); - } - } - } - - @SubscribeEvent - public void onTick(TickEvent.ClientTickEvent event) - { - if (!Loader.isModLoaded("guideapi")) - { - if (event.phase == TickEvent.Phase.END && Minecraft.getMinecraft().thePlayer != null && !triedToWarnPlayer) - { - EntityPlayer player = Minecraft.getMinecraft().thePlayer; - IChatComponent component = IChatComponent.Serializer.jsonToComponent(StatCollector.translateToLocal("bm.versioning.getGAPI")); - player.addChatComponentMessage(component); - } - - triedToWarnPlayer = true; - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/thread/ThreadDownloadGAPI.java b/src/main/java/WayofTime/alchemicalWizardry/common/thread/ThreadDownloadGAPI.java deleted file mode 100644 index 67965eeb..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/thread/ThreadDownloadGAPI.java +++ /dev/null @@ -1,96 +0,0 @@ -package WayofTime.alchemicalWizardry.common.thread; - -import net.minecraft.client.Minecraft; -import net.minecraft.util.*; -import net.minecraftforge.common.MinecraftForge; - -import java.awt.*; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; - -public class ThreadDownloadGAPI extends Thread -{ - String fileName; - - byte[] buffer = new byte[10240]; - - int totalBytesDownloaded; - int bytesJustDownloaded; - - InputStream webReader; - - public ThreadDownloadGAPI(String fileName) - { - setName("Blood Magic Download Guide-API Thread"); - this.fileName = fileName; - setDaemon(true); - start(); - } - - @Override - public void run() - { - try - { - IChatComponent component = IChatComponent.Serializer.jsonToComponent(String.format(StatCollector.translateToLocal("bm.versioning.startingDownload"), fileName)); - - if (Minecraft.getMinecraft().thePlayer != null) - { - Minecraft.getMinecraft().thePlayer.addChatMessage(component); - } - - GAPIChecker.startedDownload = true; - - String base = "http://minecraft.curseforge.com/mc-mods/228832-guide-api"; - URL url = new URL(base + "/files/latest"); - - try - { - url.openStream().close(); // Add to DL Counter - } - catch(IOException e) {} - - webReader = url.openStream(); - - File dir = new File(".", "mods"); - File f = new File(dir, "Guide-API-" + MinecraftForge.MC_VERSION + "-" + GAPIChecker.onlineVersion + ".jar"); - f.createNewFile(); - - FileOutputStream outputStream = new FileOutputStream(f.getAbsolutePath()); - - while ((bytesJustDownloaded = webReader.read(buffer)) > 0) - { - outputStream.write(buffer, 0, bytesJustDownloaded); - buffer = new byte[10240]; - totalBytesDownloaded += bytesJustDownloaded; - } - - if (Minecraft.getMinecraft().thePlayer != null) - { - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentTranslation("bm.versioning.doneDownloading", fileName).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GREEN))); - } - - Desktop.getDesktop().open(dir); - GAPIChecker.downloadedFile = true; - - outputStream.close(); - webReader.close(); - finalize(); - } - catch (Throwable e) - { - e.printStackTrace(); - } - } - - private void sendError() - { - if (Minecraft.getMinecraft().thePlayer != null) - { - Minecraft.getMinecraft().thePlayer.addChatComponentMessage(new ChatComponentTranslation("bm.versioning.error").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED))); - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicalCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicalCalcinator.java deleted file mode 100644 index b406f3dc..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicalCalcinator.java +++ /dev/null @@ -1,400 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -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 net.minecraft.network.NetworkManager; -import net.minecraft.network.Packet; -import net.minecraft.network.play.server.S35PacketUpdateTileEntity; -import net.minecraft.server.gui.IUpdatePlayerListBox; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.IChatComponent; -import net.minecraftforge.common.util.Constants; -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 TEAlchemicalCalcinator extends TEReagentConduit implements IInventory, IUpdatePlayerListBox -{ - protected ItemStack[] inv; - protected ReagentContainer bufferTank = new ReagentContainer(Reagent.REAGENT_SIZE * 2); - - protected int bufferTransferRate = 20; - - private int progress; - - public TEAlchemicalCalcinator() - { - super(1, Reagent.REAGENT_SIZE * 4); - this.inv = new ItemStack[2]; - this.tickRate = 20; - this.maxConnextions = 1; - this.progress = 0; - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - super.readFromNBT(tag); - bufferTransferRate = tag.getInteger("bufferTransferRate"); - progress = tag.getInteger("progress"); - - NBTTagCompound bufferTankTag = tag.getCompoundTag("bufferTank"); - - this.bufferTank = ReagentContainer.readFromNBT(bufferTankTag); - - NBTTagList tagList = tag.getTagList("Inventory", Constants.NBT.TAG_COMPOUND); - - for (int i = 0; i < tagList.tagCount(); i++) - { - NBTTagCompound savedTag = tagList.getCompoundTagAt(i); - - if (savedTag.getBoolean("Empty")) - { - inv[i] = null; - } else - { - inv[i] = ItemStack.loadItemStackFromNBT(savedTag); - } - } - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - super.writeToNBT(tag); - tag.setInteger("bufferTransferRate", bufferTransferRate); - tag.setInteger("progress", progress); - - NBTTagCompound bufferTankTag = new NBTTagCompound(); - - this.bufferTank.writeToNBT(bufferTankTag); - - tag.setTag("bufferTank", bufferTankTag); - - NBTTagList itemList = new NBTTagList(); - - for (int i = 0; i < inv.length; i++) - { - NBTTagCompound savedTag = new NBTTagCompound(); - - if (inv[i] != null) - { - inv[i].writeToNBT(savedTag); - } else - { - savedTag.setBoolean("Empty", true); - } - - itemList.appendTag(savedTag); - } - - tag.setTag("Inventory", itemList); - } - - @Override - public void update() - { - super.update(); - - if (!worldObj.isRemote) - { - moveBufferToMain(); - tickProgress(); - } - } - - public void moveBufferToMain() - { - ReagentStack amountStack = this.bufferTank.drain(bufferTransferRate, false); - int drainAmount = this.fill(EnumFacing.UP, amountStack, false); - - if (drainAmount > 0) - { - ReagentStack drainedStack = this.bufferTank.drain(drainAmount, true); - this.fill(EnumFacing.UP, drainedStack, true); - } - } - - public void tickProgress() - { - int lpPerTick = 10; - int ticksPerReagent = 200; - ItemStack reagentItemStack = this.getStackInSlot(1); - - if (reagentItemStack == null) - { - progress = 0; - return; - } - - ReagentStack possibleReagent = ReagentRegistry.getReagentStackForItem(reagentItemStack); - if (possibleReagent == null || !this.canReagentFitBuffer(possibleReagent)) - { - return; - } - - ItemStack orbStack = this.getStackInSlot(0); - if (orbStack == null || !(orbStack.getItem() instanceof IBloodOrb)) - { - return; - } - - if (!SoulNetworkHandler.canSyphonFromOnlyNetwork(orbStack, lpPerTick)) - { - SoulNetworkHandler.causeNauseaToPlayer(orbStack); - return; - } - - if(!SoulNetworkHandler.syphonFromNetworkWhileInContainer(orbStack, lpPerTick)) - { - return; - } - - progress++; - - if (worldObj.getWorldTime() % 4 == 0) - { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); - } - - if (progress >= ticksPerReagent) - { - progress = 0; - this.bufferTank.fill(possibleReagent, true); - this.decrStackSize(1, 1); - } - } - - public boolean canReagentFitBuffer(ReagentStack stack) - { - int amount = this.bufferTank.fill(stack, false); - - return amount >= stack.amount; - } - - @Override - public void readClientNBT(NBTTagCompound tag) - { - super.readClientNBT(tag); - - NBTTagList tagList = tag.getTagList("reagentTanks", Constants.NBT.TAG_COMPOUND); - - int size = tagList.tagCount(); - this.tanks = new ReagentContainer[size]; - - for (int i = 0; i < size; i++) - { - NBTTagCompound savedTag = tagList.getCompoundTagAt(i); - this.tanks[i] = ReagentContainer.readFromNBT(savedTag); - } - - NBTTagList invTagList = tag.getTagList("Inventory", Constants.NBT.TAG_COMPOUND); - - for (int i = 0; i < invTagList.tagCount(); i++) - { - NBTTagCompound savedTag = invTagList.getCompoundTagAt(i); - - if (savedTag.getBoolean("Empty")) - { - inv[i] = null; - } else - { - inv[i] = ItemStack.loadItemStackFromNBT(savedTag); - } - } - } - - @Override - public void writeClientNBT(NBTTagCompound tag) - { - super.writeClientNBT(tag); - - NBTTagList tagList = new NBTTagList(); - - for (int i = 0; i < this.tanks.length; i++) - { - NBTTagCompound savedTag = new NBTTagCompound(); - if (this.tanks[i] != null) - { - this.tanks[i].writeToNBT(savedTag); - } - tagList.appendTag(savedTag); - } - - tag.setTag("reagentTanks", tagList); - - NBTTagList itemList = new NBTTagList(); - - for (int i = 0; i < inv.length; i++) - { - NBTTagCompound savedTag = new NBTTagCompound(); - - if (inv[i] != null) - { - inv[i].writeToNBT(savedTag); - } else - { - savedTag.setBoolean("Empty", true); - } - - itemList.appendTag(savedTag); - } - - tag.setTag("Inventory", itemList); - } - - @Override - public Packet getDescriptionPacket() - { - NBTTagCompound nbttagcompound = new NBTTagCompound(); - writeClientNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(pos, -999, nbttagcompound); - } - - @Override - public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) - { - super.onDataPacket(net, packet); - readClientNBT(packet.getNbtCompound()); - } - - @Override - public int getSizeInventory() - { - return inv.length; - } - - @Override - public ItemStack getStackInSlot(int slot) - { - return inv[slot]; - } - - @Override - public void setInventorySlotContents(int slot, ItemStack stack) - { - inv[slot] = stack; - - if (stack != null && stack.stackSize > getInventoryStackLimit()) - { - stack.stackSize = getInventoryStackLimit(); - } - - worldObj.markBlockForUpdate(pos); - } - - @Override - public ItemStack decrStackSize(int slot, int amt) - { - ItemStack stack = getStackInSlot(slot); - - if (stack != null) - { - if (stack.stackSize <= amt) - { - setInventorySlotContents(slot, null); - } else - { - stack = stack.splitStack(amt); - - if (stack.stackSize == 0) - { - setInventorySlotContents(slot, null); - } - } - } - - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(int slot) - { - ItemStack stack = getStackInSlot(slot); - - if (stack != null) - { - setInventorySlotContents(slot, null); - } - - return stack; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - @Override - public boolean isUseableByPlayer(EntityPlayer player) - { - return worldObj.getTileEntity(pos) == this && pos.distanceSqToCenter(player.posX, player.posY, player.posZ) < 64; - } - - @Override - public void openInventory(EntityPlayer player) {} - - @Override - public void closeInventory(EntityPlayer player) {} - - @Override - public String getName() - { - return "AlchemicCalcinator"; - } - - @Override - public boolean hasCustomName() - { - return false; - } - - @Override - public boolean isItemValidForSlot(int slot, ItemStack itemStack) - { - return true; - } - - @Override - public int fill(EnumFacing from, ReagentStack resource, boolean doFill) - { - if (doFill && !worldObj.isRemote) - { - worldObj.markBlockForUpdate(pos); - } - - return super.fill(from, resource, doFill); - } - - @Override - public IChatComponent getDisplayName() - { - return null; - } - - @Override - public int getField(int id) - { - return 0; - } - - @Override - public void setField(int id, int value) {} - - @Override - public int getFieldCount() - { - return 0; - } - - @Override - public void clear() {} -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java deleted file mode 100644 index ff3cc550..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java +++ /dev/null @@ -1,954 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.Packet; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.server.gui.IUpdatePlayerListBox; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.ChatComponentTranslation; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.StatCollector; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidEvent; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTank; -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, IUpdatePlayerListBox -{ - public static final int sizeInv = 1; - - private int resultID; - private int resultDamage; - private int upgradeLevel; - protected FluidStack fluid; - public int capacity; - private boolean isActive; - private int liquidRequired; //mB - private boolean canBeFilled; - private int consumptionRate; - private int drainRate; - private float consumptionMultiplier; - private float efficiencyMultiplier; - private float sacrificeEfficiencyMultiplier; - private float selfSacrificeEfficiencyMultiplier; - private float capacityMultiplier; - private float orbCapacityMultiplier; - private float dislocationMultiplier; - private int accelerationUpgrades; - private boolean isUpgraded; - private boolean isResultBlock; - private int bufferCapacity; - protected FluidStack fluidOutput; - protected FluidStack fluidInput; - private int progress; - - private int lockdownDuration; - private int demonBloodDuration; - - private int cooldownAfterCrafting = 500; - - public TEAltar() - { - super(sizeInv); - resultID = 0; - resultDamage = 0; - this.capacity = FluidContainerRegistry.BUCKET_VOLUME * 10; - fluid = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 0); - fluidOutput = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 0); - fluidInput = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 0); - bufferCapacity = FluidContainerRegistry.BUCKET_VOLUME; - isActive = false; - consumptionRate = 0; - drainRate = 0; - consumptionMultiplier = 0; - efficiencyMultiplier = 0; - capacityMultiplier = 1; - isUpgraded = false; - upgradeLevel = 0; - isResultBlock = false; - progress = 0; - this.lockdownDuration = 0; - this.demonBloodDuration = 0; - } - - /** - * - * @return Amount filled - */ - public int fillMainTank(int amount) //TODO - { - int filledAmount = Math.min(capacity - fluid.amount, amount); - fluid.amount += filledAmount; - - return filledAmount; - } - - public void addToDemonBloodDuration(int dur) - { - this.demonBloodDuration += dur; - } - - public boolean hasDemonBlood() - { - return this.demonBloodDuration > 0; - } - - public void decrementDemonBlood() - { - this.demonBloodDuration = Math.max(0, this.demonBloodDuration - 1); - } - - @Override - public void readFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readFromNBT(par1NBTTagCompound); - - resultID = par1NBTTagCompound.getInteger("resultID"); - resultDamage = par1NBTTagCompound.getInteger("resultDamage"); - - if (!par1NBTTagCompound.hasKey("Empty")) - { - FluidStack fluid = this.fluid.loadFluidStackFromNBT(par1NBTTagCompound); - - if (fluid != null) - { - setMainFluid(fluid); - } - - FluidStack fluidOut = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, par1NBTTagCompound.getInteger("outputAmount")); - - if (fluidOut != null) - { - setOutputFluid(fluidOut); - } - - FluidStack fluidIn = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, par1NBTTagCompound.getInteger("inputAmount")); - - if (fluidIn != null) - { - setInputFluid(fluidIn); - } - } - - upgradeLevel = par1NBTTagCompound.getInteger("upgradeLevel"); - isActive = par1NBTTagCompound.getBoolean("isActive"); - liquidRequired = par1NBTTagCompound.getInteger("liquidRequired"); - canBeFilled = par1NBTTagCompound.getBoolean("canBeFilled"); - isUpgraded = par1NBTTagCompound.getBoolean("isUpgraded"); - consumptionRate = par1NBTTagCompound.getInteger("consumptionRate"); - drainRate = par1NBTTagCompound.getInteger("drainRate"); - consumptionMultiplier = par1NBTTagCompound.getFloat("consumptionMultiplier"); - efficiencyMultiplier = par1NBTTagCompound.getFloat("efficiencyMultiplier"); - selfSacrificeEfficiencyMultiplier = par1NBTTagCompound.getFloat("selfSacrificeEfficiencyMultiplier"); - sacrificeEfficiencyMultiplier = par1NBTTagCompound.getFloat("sacrificeEfficiencyMultiplier"); - capacityMultiplier = par1NBTTagCompound.getFloat("capacityMultiplier"); - orbCapacityMultiplier = par1NBTTagCompound.getFloat("orbCapacityMultiplier"); - dislocationMultiplier = par1NBTTagCompound.getFloat("dislocationMultiplier"); - capacity = par1NBTTagCompound.getInteger("capacity"); - bufferCapacity = par1NBTTagCompound.getInteger("bufferCapacity"); - progress = par1NBTTagCompound.getInteger("progress"); - isResultBlock = par1NBTTagCompound.getBoolean("isResultBlock"); - lockdownDuration = par1NBTTagCompound.getInteger("lockdownDuration"); - accelerationUpgrades = par1NBTTagCompound.getInteger("accelerationUpgrades"); - demonBloodDuration = par1NBTTagCompound.getInteger("demonBloodDuration"); - cooldownAfterCrafting = par1NBTTagCompound.getInteger("cooldownAfterCrafting"); - } - - public void setMainFluid(FluidStack fluid) - { - this.fluid = fluid; - } - - public void setOutputFluid(FluidStack fluid) - { - this.fluidOutput = fluid; - } - - public void setInputFluid(FluidStack fluid) - { - this.fluidInput = fluid; - } - - @Override - public void writeToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeToNBT(par1NBTTagCompound); - - par1NBTTagCompound.setInteger("resultID", resultID); - par1NBTTagCompound.setInteger("resultDamage", resultDamage); - - if (fluid != null) - { - fluid.writeToNBT(par1NBTTagCompound); - } else - { - par1NBTTagCompound.setString("Empty", ""); - } - - if (fluidOutput != null) - { - par1NBTTagCompound.setInteger("outputAmount", fluidOutput.amount); - } - - if (fluidInput != null) - { - par1NBTTagCompound.setInteger("inputAmount", fluidInput.amount); - } - - par1NBTTagCompound.setInteger("upgradeLevel", upgradeLevel); - par1NBTTagCompound.setBoolean("isActive", isActive); - par1NBTTagCompound.setInteger("liquidRequired", liquidRequired); - par1NBTTagCompound.setBoolean("canBeFilled", canBeFilled); - par1NBTTagCompound.setBoolean("isUpgraded", isUpgraded); - par1NBTTagCompound.setInteger("consumptionRate", consumptionRate); - par1NBTTagCompound.setInteger("drainRate", drainRate); - par1NBTTagCompound.setFloat("consumptionMultiplier", consumptionMultiplier); - par1NBTTagCompound.setFloat("efficiencyMultiplier", efficiencyMultiplier); - par1NBTTagCompound.setFloat("sacrificeEfficiencyMultiplier", sacrificeEfficiencyMultiplier); - par1NBTTagCompound.setFloat("selfSacrificeEfficiencyMultiplier", selfSacrificeEfficiencyMultiplier); - par1NBTTagCompound.setBoolean("isResultBlock", isResultBlock); - par1NBTTagCompound.setFloat("capacityMultiplier", capacityMultiplier); - par1NBTTagCompound.setFloat("orbCapacityMultiplier", orbCapacityMultiplier); - par1NBTTagCompound.setFloat("dislocationMultiplier", dislocationMultiplier); - par1NBTTagCompound.setInteger("capacity", capacity); - par1NBTTagCompound.setInteger("progress", progress); - par1NBTTagCompound.setInteger("bufferCapacity", bufferCapacity); - par1NBTTagCompound.setInteger("lockdownDuration", lockdownDuration); - par1NBTTagCompound.setInteger("accelerationUpgrades", this.accelerationUpgrades); - par1NBTTagCompound.setInteger("demonBloodDuration", demonBloodDuration); - par1NBTTagCompound.setInteger("cooldownAfterCrafting", cooldownAfterCrafting); - } - - @Override - public String getName() - { - return "TEAltar"; - } - - //IFluidTank methods - @Override - public FluidStack getFluid() - { - return fluid; - } - - @Override - public int getFluidAmount() - { - if (fluid == null) - { - return 0; - } - - return fluid.amount; - } - - @Override - public int getCapacity() - { - return capacity; - } - - @Override - public int getCurrentBlood() - { - return getFluidAmount(); - } - - @Override - public int getTier() - { - return upgradeLevel; - } - - @Override - public int getProgress() - { - return progress; - } - - @Override - public float getSacrificeMultiplier() - { - return sacrificeEfficiencyMultiplier; - } - - @Override - public float getSelfSacrificeMultiplier() - { - return selfSacrificeEfficiencyMultiplier; - } - - @Override - public float getOrbMultiplier() - { - return orbCapacityMultiplier; - } - - @Override - public float getDislocationMultiplier() - { - return dislocationMultiplier; - } - - @Override - public int getBufferCapacity() - { - return bufferCapacity; - } - - @Override - public FluidTankInfo getInfo() - { - return new FluidTankInfo(this); - } - - @Override - public int fill(FluidStack resource, boolean doFill) - { - TileEntity tile = this; - - if (resource == null) - { - return 0; - } - - if (resource.getFluid() != (new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 1)).getFluid()) - { - return 0; - } - - if (!doFill) - { - if (fluidInput == null) - { - return Math.min(bufferCapacity, resource.amount); - } - - if (!fluidInput.isFluidEqual(resource)) - { - return 0; - } - - return Math.min(bufferCapacity - fluidInput.amount, resource.amount); - } - - if (fluidInput == null) - { - fluidInput = new FluidStack(resource, Math.min(bufferCapacity, resource.amount)); - if (tile != null) - { - FluidEvent.fireEvent(new FluidEvent.FluidFillingEvent(fluidInput, tile.getWorld(), tile.getPos(), this, fluidInput.amount)); - } - - return fluidInput.amount; - } - - if (!fluidInput.isFluidEqual(resource)) - { - return 0; - } - - int filled = bufferCapacity - fluidInput.amount; - - if (resource.amount < filled) - { - fluidInput.amount += resource.amount; - filled = resource.amount; - } else - { - fluidInput.amount = bufferCapacity; - } - - if (tile != null) - { - FluidEvent.fireEvent(new FluidEvent.FluidFillingEvent(fluidInput, tile.getWorld(), tile.getPos(), this, fluidInput.amount)); - } - - return filled; - } - - @Override - public FluidStack drain(int maxDrain, boolean doDrain) - { - if (fluidOutput == null) - { - return null; - } - - int drained = maxDrain; - - if (fluidOutput.amount < drained) - { - drained = fluidOutput.amount; - } - - FluidStack stack = new FluidStack(fluidOutput, drained); - - if (doDrain) - { - fluidOutput.amount -= drained; - - if (fluidOutput.amount <= 0) - { - fluidOutput = null; - } - - if (this != null) - { - FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(fluidOutput, this.worldObj, this.pos, this, fluidOutput.amount)); - } - } - - if (fluidOutput == null) - { - fluidOutput = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 0); - } - - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - - return stack; - } - - //Logic for the actual block is under here - @Override - public void update() - { - this.decrementDemonBlood(); - - if(this.hasDemonBlood() && !worldObj.isRemote) - { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); - } - - if (this.lockdownDuration > 0) - { - this.lockdownDuration--; - } - - if(worldObj.isRemote) - { - return; - } - - if (!worldObj.isRemote && worldObj.getWorldTime() % 20 == 0) - { - { - for(EnumFacing facing : EnumFacing.VALUES) - { - BlockPos newPos = pos.offset(facing); - IBlockState state = worldObj.getBlockState(newPos); - Block block = state.getBlock(); - block.onNeighborBlockChange(worldObj, newPos, state, this.getBlockType()); - } - } - - if (AlchemicalWizardry.lockdownAltar) - { - List list = SpellHelper.getPlayersInRange(worldObj, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 15, 15); - for (EntityPlayer player : list) - { - PotionEffect regenEffect = player.getActivePotionEffect(Potion.regeneration); - if (regenEffect != null && regenEffect.getAmplifier() >= 2) - { - this.lockdownDuration += 20; - } - } - } - -// 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 && !player.isPotionActive(Potion.hunger.id)) -// { -// player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("message.altar.hunger"))); -// } -// player.addPotionEffect(new PotionEffect(Potion.hunger.id, 40, regenEffect.getAmplifier() * 2 - 2)); -// } -// } -// } - } - - if(worldObj.getWorldTime() % Math.max(20 - this.accelerationUpgrades, 1) == 0) - { - int syphonMax = (int) (20 * this.dislocationMultiplier); - int fluidInputted; - int fluidOutputted; - fluidInputted = Math.min(syphonMax, -this.fluid.amount + capacity); - fluidInputted = Math.min(this.fluidInput.amount, fluidInputted); - this.fluid.amount += fluidInputted; - this.fluidInput.amount -= fluidInputted; - fluidOutputted = Math.min(syphonMax, this.bufferCapacity - this.fluidOutput.amount); - fluidOutputted = Math.min(this.fluid.amount, fluidOutputted); - this.fluidOutput.amount += fluidOutputted; - this.fluid.amount -= fluidOutputted; - } - - if (worldObj.getWorldTime() % 100 == 0 && (this.isActive || this.cooldownAfterCrafting <= 0)) - { - startCycle(); - } - - if (!isActive) - { - if(cooldownAfterCrafting > 0) - { - cooldownAfterCrafting--; - } - return; - } - - if (getStackInSlot(0) == null) - { - return; - } - - int worldTime = (int) (worldObj.getWorldTime() % 24000); - - if (worldObj.isRemote) - { - return; - } - - if (!canBeFilled) - { - if (fluid != null && fluid.amount >= 1) - { - int stackSize = getStackInSlot(0).stackSize; - int liquidDrained = Math.min((int) (upgradeLevel >= 2 ? consumptionRate * (1 + consumptionMultiplier) : consumptionRate), fluid.amount); - - if (liquidDrained > (liquidRequired * stackSize - progress)) - { - liquidDrained = liquidRequired * stackSize - progress; - } - - fluid.amount = fluid.amount - liquidDrained; - progress += liquidDrained; - - if (worldTime % 4 == 0) - { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); - } - - if (progress >= liquidRequired * stackSize) - { - ItemStack result; - result = AltarRecipeRegistry.getItemForItemAndTier(this.getStackInSlot(0), this.upgradeLevel); - if (result != null) - { - result.stackSize *= stackSize; - } - - setInventorySlotContents(0, result); - progress = 0; - - for (int i = 0; i < 8; i++) - { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos.getX(), pos.getY(), pos.getZ(), 20, worldObj.provider.getDimensionId(), 4, pos.getX() + 0.5f, pos.getY() + 1.0f, pos.getZ() + 0.5f); - } - this.isActive = false; - } - } else if (progress > 0) - { - progress -= (int) (efficiencyMultiplier * drainRate); - - if (worldTime % 2 == 0) - { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 2, pos); - } - } - } else - { - ItemStack returnedItem = getStackInSlot(0); - - if (!(returnedItem.getItem() instanceof IBloodOrb)) - { - return; - } - - IBloodOrb item = (IBloodOrb) (returnedItem.getItem()); - NBTTagCompound itemTag = returnedItem.getTagCompound(); - - if (itemTag == null) - { - return; - } - - String ownerName = itemTag.getString("ownerName"); - - if (ownerName.equals("")) - { - return; - } - - if (fluid != null && fluid.amount >= 1) - { - int liquidDrained = Math.min((int) (upgradeLevel >= 2 ? consumptionRate * (1 + consumptionMultiplier) : consumptionRate), fluid.amount); - - int drain = SoulNetworkHandler.addCurrentEssenceToMaximum(ownerName, liquidDrained, (int) (item.getMaxEssence() * this.orbCapacityMultiplier)); - - fluid.amount = fluid.amount - drain; - - if (worldTime % 4 == 0) - { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 3, pos); - } - } - } - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - } - - public void setActive() - { - isActive = false; - } - - public boolean isActive() - { - return isActive; - } - - public void sacrificialDaggerCall(int amount, boolean isSacrifice) - { - if (!isSacrifice && this.lockdownDuration > 0) - { - int amt = (int) Math.min(bufferCapacity - fluidInput.amount, (isSacrifice ? 1 + sacrificeEfficiencyMultiplier : 1 + selfSacrificeEfficiencyMultiplier) * amount); - fluidInput.amount += amt; - } else - { - fluid.amount += Math.min(capacity - fluid.amount, (isSacrifice ? 1 + sacrificeEfficiencyMultiplier : 1 + selfSacrificeEfficiencyMultiplier) * amount); - } - } - - @Override - public Packet getDescriptionPacket() - { - return NewPacketHandler.getPacket(this); - } - - public void handlePacketData(int[] intData, int[] fluidData, int capacity) - { - if (intData == null) - { - return; - } - - 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]); - inv[i] = is; - } else - { - inv[i] = null; - } - } - } - - FluidStack flMain = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, fluidData[1]); //First parameter was fluidData[0] --Checking to see if this will cause issues or not - FluidStack flIn = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, fluidData[3]); //" " - FluidStack flOut = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, fluidData[5]); //" " - - this.setMainFluid(flMain); - this.setInputFluid(flIn); - this.setOutputFluid(flOut); - - this.capacity = capacity; - } - - public int[] buildIntDataList() - { - int[] sortList = new int[3]; //1 * 3 - int pos = 0; - - for (ItemStack is : inv) - { - if (is != null) - { - sortList[pos++] = Item.getIdFromItem(is.getItem()); - sortList[pos++] = is.getItemDamage(); - sortList[pos++] = is.stackSize; - } else - { - sortList[pos++] = 0; - sortList[pos++] = 0; - sortList[pos++] = 0; - } - } - - return sortList; - } - - public void startCycle() - { - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - - this.checkAndSetAltar(); - - if (fluid == null || fluid.amount <= 0) - { - return; - } - - if (!isActive) - { - progress = 0; - } - - if (AltarRecipeRegistry.isRequiredItemValid(getStackInSlot(0), upgradeLevel)) - { - AltarRecipe recipe = AltarRecipeRegistry.getAltarRecipeForItemAndTier(getStackInSlot(0), upgradeLevel); - this.isActive = true; - this.liquidRequired = recipe.getLiquidRequired(); - this.canBeFilled = recipe.getCanBeFilled(); - this.consumptionRate = recipe.getConsumptionRate(); - this.drainRate = recipe.drainRate; - return; - } - - isActive = false; - } - - public void checkAndSetAltar() - { - boolean checkUpgrade = true; - int upgradeState = UpgradedAltars.isAltarValid(worldObj, pos); - - if (upgradeState <= 1) - { - upgradeLevel = 1; - isUpgraded = false; - this.consumptionMultiplier = 0; - this.efficiencyMultiplier = 1; - this.sacrificeEfficiencyMultiplier = 0; - this.selfSacrificeEfficiencyMultiplier = 0; - this.capacityMultiplier = 1; - this.orbCapacityMultiplier = 1; - this.dislocationMultiplier = 1; - this.accelerationUpgrades = 0; - return; - } - - AltarUpgradeComponent upgrades = UpgradedAltars.getUpgrades(worldObj, pos, upgradeState); - - if (upgrades == null) - { - upgradeLevel = 1; - isUpgraded = false; - this.consumptionMultiplier = 0; - this.efficiencyMultiplier = 1; - this.sacrificeEfficiencyMultiplier = 0; - this.selfSacrificeEfficiencyMultiplier = 0; - this.capacityMultiplier = 1; - this.orbCapacityMultiplier = 1; - this.dislocationMultiplier = 1; - this.upgradeLevel = upgradeState; - this.accelerationUpgrades = 0; - return; - } - - this.isUpgraded = checkUpgrade; - this.upgradeLevel = upgradeState; - this.consumptionMultiplier = (float) (0.20 * upgrades.getSpeedUpgrades()); - this.efficiencyMultiplier = (float) Math.pow(0.85, upgrades.getSpeedUpgrades()); - this.sacrificeEfficiencyMultiplier = (float) (0.10 * upgrades.getSacrificeUpgrades()); - this.selfSacrificeEfficiencyMultiplier = (float) (0.10 * upgrades.getSelfSacrificeUpgrades()); - this.capacityMultiplier = (float) ((1 * Math.pow(1.10, upgrades.getBetterCapacitiveUpgrades()) + 0.20 * upgrades.getAltarCapacitiveUpgrades())); - this.dislocationMultiplier = (float) (Math.pow(1.2, upgrades.getDisplacementUpgrades())); - this.orbCapacityMultiplier = (float) (1 + 0.02 * upgrades.getOrbCapacitiveUpgrades()); - this.capacity = (int) (FluidContainerRegistry.BUCKET_VOLUME * 10 * capacityMultiplier); - this.bufferCapacity = (int) (FluidContainerRegistry.BUCKET_VOLUME * 1 * capacityMultiplier); - this.accelerationUpgrades = upgrades.getAccelerationUpgrades(); - - if (this.fluid.amount > this.capacity) - { - this.fluid.amount = this.capacity; - } - - if (this.fluidOutput.amount > this.bufferCapacity) - { - this.fluidOutput.amount = this.bufferCapacity; - } - - if (this.fluidInput.amount > this.bufferCapacity) - { - this.fluidInput.amount = this.bufferCapacity; - } - - worldObj.markBlockForUpdate(pos); - } - - @Override - public boolean isItemValidForSlot(int slot, ItemStack itemstack) - { - return slot == 0; - } - - @Override - public int fill(EnumFacing from, FluidStack resource, boolean doFill) - { - //TODO - if (resource == null) - { - return 0; - } - - resource = resource.copy(); - int totalUsed = 0; - int used = this.fill(resource, doFill); - resource.amount -= used; - totalUsed += used; - this.startCycle(); - return totalUsed; - } - - @Override - public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain) - { - if (resource == null) - { - return null; - } - - if (!resource.isFluidEqual(fluidOutput)) - { - return null; - } - - return drain(from, resource.amount, doDrain); - } - - @Override - public FluidStack drain(EnumFacing from, int maxEmpty, boolean doDrain) - { - return this.drain(maxEmpty, doDrain); - } - - @Override - public boolean canFill(EnumFacing from, Fluid fluid) - { - //I changed this, since fluidstack != fluid... :p dunno if it was a accident? so you might wanna check this - return this.fluidInput != null && this.fluid.getFluid().equals(fluidInput.getFluid()); - } - - @Override - public boolean canDrain(EnumFacing from, Fluid fluid) - { - return true; - } - - @Override - public FluidTankInfo[] getTankInfo(EnumFacing from) - { - FluidTank compositeTank = new FluidTank(capacity); - compositeTank.setFluid(fluid); - return new FluidTankInfo[]{compositeTank.getInfo()}; - } - - public int[] buildFluidList() - { - int[] sortList = new int[6]; - - if (this.fluid == null) - { - sortList[0] = AlchemicalWizardry.lifeEssenceFluid.getID(); - sortList[1] = 0; - } else - { - sortList[0] = this.fluid.getFluidID(); - sortList[1] = this.fluid.amount; - } - - if (this.fluidInput == null) - { - sortList[2] = AlchemicalWizardry.lifeEssenceFluid.getID(); - sortList[3] = 0; - } else - { - sortList[2] = this.fluidInput.getFluidID(); - sortList[3] = this.fluidInput.amount; - } - - if (this.fluidOutput == null) - { - sortList[4] = AlchemicalWizardry.lifeEssenceFluid.getID(); - sortList[5] = 0; - } else - { - sortList[4] = this.fluidOutput.getFluidID(); - sortList[5] = this.fluidOutput.amount; - } - - return sortList; - } - - 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, pos))); - player.addChatMessage(new ChatComponentTranslation(String.format("message.altar.capacity"), this.getCapacity())); - } - - 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 ChatComponentTranslation(String.format("message.altar.currentessence"), this.fluid.amount)); - player.addChatMessage(new ChatComponentTranslation(String.format("message.altar.inputtank"), this.fluidInput.amount)); - player.addChatMessage(new ChatComponentTranslation(String.format("message.altar.outputtank"), this.fluidOutput.amount)); - } - - @Override - public void requestPauseAfterCrafting(int amount) - { - if(this.isActive) - { - this.cooldownAfterCrafting = amount; - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBelljar.java deleted file mode 100644 index fe0767a0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBelljar.java +++ /dev/null @@ -1,119 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -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; - this.affectedByRedstone = false; - } - - public int getRSPowerOutput() - { - ReagentContainer thisTank = this.tanks[0]; - if (thisTank != null) - { - ReagentStack stack = thisTank.getReagent(); - if (stack != null) - { - return (15 * stack.amount / thisTank.getCapacity()); - } - } - return 0; - } - - public static ReagentContainerInfo[] getContainerInfoFromItem(ItemStack stack) - { - if (stack != null && stack.getItem() instanceof ItemBlock && ModBlocks.blockCrystalBelljar == ((ItemBlock) stack.getItem()).getBlock()) - { - NBTTagCompound tag = stack.getTagCompound(); - if (tag != null) - { - NBTTagList tagList = tag.getTagList("reagentTanks", Constants.NBT.TAG_COMPOUND); - - int size = tagList.tagCount(); - ReagentContainer[] tanks = new ReagentContainer[size]; - - ReagentContainerInfo[] infos = new ReagentContainerInfo[size]; - - for (int i = 0; i < size; i++) - { - NBTTagCompound savedTag = tagList.getCompoundTagAt(i); - tanks[i] = ReagentContainer.readFromNBT(savedTag); - - if (tanks[i] != null) - { - infos[i] = tanks[i].getInfo(); - } - } - - return infos; - } - } - - return new ReagentContainerInfo[0]; - } - - public void readTankNBTOnPlace(NBTTagCompound tag) - { - NBTTagList tagList = tag.getTagList("reagentTanks", Constants.NBT.TAG_COMPOUND); - - int size = tagList.tagCount(); - this.tanks = new ReagentContainer[size]; - - for (int i = 0; i < size; i++) - { - NBTTagCompound savedTag = tagList.getCompoundTagAt(i); - this.tanks[i] = ReagentContainer.readFromNBT(savedTag); - } - } - - public void writeTankNBT(NBTTagCompound tag) - { - NBTTagList tagList = new NBTTagList(); - - for (int i = 0; i < this.tanks.length; i++) - { - NBTTagCompound savedTag = new NBTTagCompound(); - if (this.tanks[i] != null) - { - this.tanks[i].writeToNBT(savedTag); - } - tagList.appendTag(savedTag); - } - - tag.setTag("reagentTanks", tagList); - } - - @Override - public void update() - { - super.update(); - - if (hasChanged == 1) - { - for(EnumFacing facing : EnumFacing.VALUES) - { - BlockPos newPos = pos.offset(facing); - IBlockState state = worldObj.getBlockState(newPos); - Block block = state.getBlock(); - block.onNeighborBlockChange(worldObj, newPos, state, this.getBlockType()); - } - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEChemistrySet.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEChemistrySet.java deleted file mode 100644 index 502c3f75..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEChemistrySet.java +++ /dev/null @@ -1,757 +0,0 @@ -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.minecraft.server.gui.IUpdatePlayerListBox; -import net.minecraft.util.EnumFacing; -import net.minecraftforge.oredict.OreDictionary; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.IBindingAgent; -import WayofTime.alchemicalWizardry.common.ICatalyst; -import WayofTime.alchemicalWizardry.common.IFillingAgent; -import WayofTime.alchemicalWizardry.common.NewPacketHandler; -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; - -public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpdatePlayerListBox -{ - public static final int sizeInv = 7; - - private int progress; - private int amountUsed; - - private int accelerationTime; - - public TEChemistrySet() - { - super(sizeInv); - } - - @Override - public void readFromNBT(NBTTagCompound tagCompound) - { - super.readFromNBT(tagCompound); - - progress = tagCompound.getInteger("progress"); - amountUsed = tagCompound.getInteger("amountUsed"); - - accelerationTime = tagCompound.getInteger("accelerationTime"); - } - - @Override - public void writeToNBT(NBTTagCompound tagCompound) - { - super.writeToNBT(tagCompound); - - tagCompound.setInteger("progress", progress); - tagCompound.setInteger("amountUsed", amountUsed); - - tagCompound.setInteger("accelerationTime", accelerationTime); - } - - @Override - public String getName() - { - return "aw.TEWritingTable"; - } - - @Override - public boolean isItemValidForSlot(int i, ItemStack itemstack) - { - switch(i) - { - case 0: - if(itemstack != null) - { - return itemstack.getItem() instanceof IBloodOrb; - } - } - return i != 6; - } - - @Override - public net.minecraft.network.Packet getDescriptionPacket() - { - return NewPacketHandler.getPacket(this); - } - - public void handlePacketData(int[] intData) - { - if (intData == null) - { - return; - } - - 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]); - inv[i] = is; - } else - { - inv[i] = null; - } - } - } - } - - public int[] buildIntDataList() - { - int[] sortList = new int[7 * 3]; - int pos = 0; - - for (ItemStack is : inv) - { - if (is != null) - { - sortList[pos++] = Item.getIdFromItem(is.getItem()); - sortList[pos++] = is.getItemDamage(); - sortList[pos++] = is.stackSize; - } else - { - sortList[pos++] = 0; - sortList[pos++] = 0; - sortList[pos++] = 0; - } - } - - return sortList; - } - - public ItemStack getResultingItemStack() - { - ItemStack[] composedRecipe = new ItemStack[5]; - - for (int i = 0; i < 5; i++) - { - composedRecipe[i] = inv[i + 1]; - } - - return AlchemyRecipeRegistry.getResult(composedRecipe, inv[0]); - } - - public boolean isRecipeValid() - { - return (getResultingItemStack() != null); - } - - public int getAmountNeeded(ItemStack bloodOrb) - { - ItemStack[] composedRecipe = new ItemStack[5]; - - for (int i = 0; i < 5; i++) - { - composedRecipe[i] = inv[i + 1]; - } - - return AlchemyRecipeRegistry.getAmountNeeded(composedRecipe, bloodOrb); - } - - public boolean containsPotionFlask() - { - return getPotionFlaskPosition() != -1; - } - - public int getPotionFlaskPosition() - { - for (int i = 1; i <= 5; i++) - { - if (inv[i] != null && !(inv[i].getItem() instanceof ItemBlock) && inv[i].getItem() == ModItems.alchemyFlask) - { - return i; - } - } - - return -1; - } - - public boolean containsCombinationCatalyst() - { - return getCombinationCatalystPosition() != -1; - } - - public int getCombinationCatalystPosition() - { - for (int i = 1; i <= 5; i++) - { - if (inv[i] != null && inv[i].getItem() instanceof ICombinationalCatalyst) - { - return i; - } - } - - return -1; - } - - public boolean containsRegisteredPotionIngredient() - { - return getRegisteredPotionIngredientPosition() != -1; - } - - public int getRegisteredPotionIngredientPosition() - { - ItemStack[] composedRecipe = new ItemStack[5]; - - for (int i = 0; i < 5; i++) - { - composedRecipe[i] = inv[i + 1]; - } - - int location = AlchemicalPotionCreationHandler.getRegisteredPotionIngredientPosition(composedRecipe); - - if (location != -1) - { - return location + 1; - } - - return -1; - } - - public boolean containsCatalyst() - { - return getCatalystPosition() != -1; - } - - public int getCatalystPosition() - { - for (int i = 0; i < 5; i++) - { - if (inv[i + 1] != null && inv[i + 1].getItem() instanceof ICatalyst) - { - return i + 1; - } - } - - return -1; - } - - public boolean containsBindingAgent() - { - return getBindingAgentPosition() != -1; - } - - public int getBindingAgentPosition() - { - for (int i = 0; i < 5; i++) - { - if (inv[i + 1] != null && inv[i + 1].getItem() instanceof IBindingAgent) - { - return i + 1; - } - } - - return -1; - } - - public boolean containsFillingAgent() - { - return getFillingAgentPosition() != -1; - } - - public int getFillingAgentPosition() - { - for (int i = 0; i < 5; i++) - { - if (inv[i + 1] != null && inv[i + 1].getItem() instanceof IFillingAgent) - { - return i + 1; - } - } - - return -1; - } - - public boolean containsBlankSlate() - { - return getBlankSlatePosition() != -1; - } - - public int getBlankSlatePosition() - { - for (int i = 0; i < 5; i++) - { - if (inv[i + 1] != null && inv[i + 1].getItem() == ModItems.blankSlate) - { - return i + 1; - } - } - - return -1; - } - - @Override - public void update() - { - int progressNeeded = 100; - long worldTime = worldObj.getWorldTime(); - - if (worldObj.isRemote) - { - return; - } - if (accelerationTime > 0) - { - accelerationTime--; - } - - if (containsPotionFlask() && containsRegisteredPotionIngredient()) - { - if (containsCatalyst()) - { - if (getStackInSlot(6) == null) - { - progress++; - - if (worldTime % 4 == 0) - { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); - } - - if (progress >= progressNeeded) - { - ItemStack flaskStack = inv[this.getPotionFlaskPosition()]; - ItemStack ingredientStack = inv[this.getRegisteredPotionIngredientPosition()]; - ItemStack catalystStack = inv[this.getCatalystPosition()]; - - if (flaskStack == null || ingredientStack == null || catalystStack == null) - { - progress = 0; - - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - - return; - } - - int potionID = AlchemicalPotionCreationHandler.getPotionIDForStack(ingredientStack); - int catalystLevel = ((ICatalyst) catalystStack.getItem()).getCatalystLevel(); - boolean isConcentration = ((ICatalyst) catalystStack.getItem()).isConcentration(); - - if (potionID == -1 || catalystLevel < 0) - { - progress = 0; - - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - - return; - } - - if (isConcentration) - { - ((AlchemyFlask) flaskStack.getItem()).setConcentrationOfPotion(flaskStack, potionID, catalystLevel); - } else - { - ((AlchemyFlask) flaskStack.getItem()).setDurationFactorOfPotion(flaskStack, potionID, catalystLevel); - } - this.setInventorySlotContents(6, flaskStack); - this.decrStackSize(this.getPotionFlaskPosition(), 1); - this.decrStackSize(this.getCatalystPosition(), 1); - this.decrStackSize(this.getRegisteredPotionIngredientPosition(), 1); - progress = 0; - - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - } - } - } else if (containsBindingAgent()) - { - if (getStackInSlot(6) == null) - { - progress++; - - if (worldTime % 4 == 0) - { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); - } - - if (progress >= progressNeeded) - { - ItemStack flaskStack = inv[this.getPotionFlaskPosition()]; - ItemStack ingredientStack = inv[this.getRegisteredPotionIngredientPosition()]; - ItemStack agentStack = inv[this.getBindingAgentPosition()]; - - if (flaskStack == null || ingredientStack == null || agentStack == null) - { - progress = 0; - - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - - return; - } - - int potionEffectNumber = ((AlchemyFlask) flaskStack.getItem()).getNumberOfPotionEffects(flaskStack); - int potionID = AlchemicalPotionCreationHandler.getPotionIDForStack(ingredientStack); - int tickDuration = AlchemicalPotionCreationHandler.getPotionTickDurationForStack(ingredientStack); - float successChance = ((IBindingAgent) agentStack.getItem()).getSuccessRateForPotionNumber(potionEffectNumber); - if (potionID == -1) - { - progress = 0; - - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - - return; - } - - ((AlchemyFlask) flaskStack.getItem()).addPotionEffect(flaskStack, potionID, tickDuration); - if (successChance > worldObj.rand.nextFloat()) - { - this.setInventorySlotContents(6, flaskStack); - } else - { - worldObj.createExplosion(null, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, 2, false); - } - - this.decrStackSize(this.getPotionFlaskPosition(), 1); - this.decrStackSize(this.getBindingAgentPosition(), 1); - this.decrStackSize(this.getRegisteredPotionIngredientPosition(), 1); - progress = 0; - - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - } - } - } - } else if (this.containsBlankSlate() && this.containsPotionFlask()) - { - if (getStackInSlot(6) == null) - { - progress++; - - if (worldTime % 4 == 0) - { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); - } - - if (progress >= progressNeeded) - { - ItemStack flaskStack = inv[this.getPotionFlaskPosition()]; - ItemStack blankSlate = inv[this.getBlankSlatePosition()]; - - if (flaskStack == null || blankSlate == null) - { - progress = 0; - - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - - return; - } - ((AlchemyFlask) flaskStack.getItem()).setIsPotionThrowable(true, flaskStack); - this.setInventorySlotContents(6, flaskStack); - this.decrStackSize(this.getPotionFlaskPosition(), 1); - this.decrStackSize(this.getBlankSlatePosition(), 1); - progress = 0; - - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - } - } - } else if (this.containsFillingAgent() && this.containsPotionFlask()) - { - if (getStackInSlot(6) == null) - { - progress++; - - if (worldTime % 4 == 0) - { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); - } - - if (progress >= progressNeeded) - { - ItemStack flaskStack = inv[this.getPotionFlaskPosition()]; - ItemStack fillingAgent = inv[this.getFillingAgentPosition()]; - - if (flaskStack == null || fillingAgent == null) - { - progress = 0; - - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - - return; - } - int potionEffects = ((AlchemyFlask) flaskStack.getItem()).getNumberOfPotionEffects(flaskStack); - int potionFillAmount = ((IFillingAgent) fillingAgent.getItem()).getFilledAmountForPotionNumber(potionEffects); - flaskStack.setItemDamage(Math.max(0, flaskStack.getItemDamage() - potionFillAmount)); - this.setInventorySlotContents(6, flaskStack); - this.decrStackSize(this.getPotionFlaskPosition(), 1); - this.decrStackSize(this.getFillingAgentPosition(), 1); - progress = 0; - - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - } - } - } else if (this.containsPotionFlask() && this.containsCombinationCatalyst()) - { - //TODO - if (getStackInSlot(6) == null && CombinedPotionRegistry.hasCombinablePotionEffect(inv[this.getPotionFlaskPosition()])) - { - progress++; - - if (worldTime % 4 == 0) - { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); - } - - if (progress >= progressNeeded) - { - ItemStack flaskStack = inv[this.getPotionFlaskPosition()]; - ItemStack combinationCatalyst = inv[this.getCombinationCatalystPosition()]; - - if (flaskStack == null || combinationCatalyst == null) - { - progress = 0; - - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - - return; - } - - ItemStack newFlask = CombinedPotionRegistry.applyPotionEffect(flaskStack); - if (newFlask != null) - { - this.setInventorySlotContents(6, newFlask); - this.decrStackSize(this.getPotionFlaskPosition(), 1); - this.decrStackSize(this.getCombinationCatalystPosition(), 1); - - progress = 0; - - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - } - } - } - } else - { - if (!isRecipeValid()) - { - progress = 0; - return; - } - - if (progress <= 0) - { - progress = 0; - amountUsed = this.getAmountNeeded(getStackInSlot(0)); - - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - } - - int acceleration = this.getSpeedIncrease(); - - if (getStackInSlot(6) == null) - { - if (!SoulNetworkHandler.syphonFromNetworkWhileInContainer(getStackInSlot(0), amountUsed * acceleration)) - { - return; - } - - if (worldTime % 4 == 0) - { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); - } - - progress += acceleration; - - if (progress >= progressNeeded) - { - progress = 0; - this.setInventorySlotContents(6, getResultingItemStack()); - - ItemStack[] composedRecipe = new ItemStack[5]; - - for (int i = 0; i < 5; i++) - { - composedRecipe[i] = inv[i + 1]; - } - - this.decrementSlots(this.getRecipeForItems(composedRecipe, inv[0])); - - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - } - } else if (getStackInSlot(6).getItem() == getResultingItemStack().getItem() && getResultingItemStack().stackSize <= (getStackInSlot(6).getMaxStackSize() - getStackInSlot(6).stackSize)) - { - if (worldTime % 4 == 0) - { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); - } - - if (!SoulNetworkHandler.syphonFromNetworkWhileInContainer(getStackInSlot(0), amountUsed * acceleration)) - { - return; - } - - progress += acceleration; - - if (progress >= progressNeeded) - { - progress = 0; - ItemStack result = getResultingItemStack().copy(); - result.stackSize += getStackInSlot(6).stackSize; - this.setInventorySlotContents(6, result); - - ItemStack[] composedRecipe = new ItemStack[5]; - - for (int i = 0; i < 5; i++) - { - composedRecipe[i] = inv[i + 1]; - } - - this.decrementSlots(this.getRecipeForItems(composedRecipe, inv[0])); - - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - } - } - } - } - - public void decrementSlots(ItemStack[] recipe) //TODO Fix this. This doesn't work. - { - boolean[] decrementedList = new boolean[]{false, false, false, false, false}; - - for (int i = 0; i < (Math.min(recipe.length, 5)); i++) - { - ItemStack decStack = recipe[i]; - - if (decStack == null) - { - continue; - } - - for (int j = 0; j < 5; j++) - { - ItemStack testStack = this.getStackInSlot(j + 1); - - if (testStack != null && (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); - } else - { - this.decrStackSize(j + 1, 1); - } - - decrementedList[j] = true; - break; - } - } - } - } - - public ItemStack[] getRecipeForItems(ItemStack[] recipe, ItemStack bloodOrb) - { - if (bloodOrb == null) - { - return null; - } - - if (!(bloodOrb.getItem() instanceof IBloodOrb)) - { - return null; - } - - int bloodOrbLevel = ((IBloodOrb) bloodOrb.getItem()).getOrbLevel(); - - for (AlchemyRecipe ar : AlchemyRecipeRegistry.recipes) - { - if (ar.doesRecipeMatch(recipe, bloodOrbLevel)) - { - return ar.getRecipe(); - } - } - - return null; - } - - public int getSpeedIncrease() - { - return accelerationTime > 0 ? 5 : 1; - } - - public boolean isWorking() - { - return this.progress > 0; - } - - public void setAccelerationTime(int accelerationTime) - { - this.accelerationTime = accelerationTime; - } - - @Override - public int[] getSlotsForFace(EnumFacing facing) - { - switch(facing) - { - case DOWN: - return new int[]{6}; - default: - return new int[]{0, 1, 2, 3, 4, 5}; - } - } - - @Override - public boolean canInsertItem(int slot, ItemStack stack, EnumFacing facing) - { - return slot != 6; - } - - @Override - public boolean canExtractItem(int slot, ItemStack stack, EnumFacing facing) - { - return slot == 6; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java deleted file mode 100644 index ed90c954..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java +++ /dev/null @@ -1,25 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; -import net.minecraft.nbt.NBTTagCompound; - -public class TEConduit extends TESpellBlock -{ - @Override - public void readFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readFromNBT(par1NBTTagCompound); - } - - @Override - public void writeToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeToNBT(par1NBTTagCompound); - } - - @Override - protected void applySpellChange(SpellParadigm parad) - { - - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java deleted file mode 100644 index 1b4f449c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java +++ /dev/null @@ -1,276 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -import java.util.List; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.network.NetworkManager; -import net.minecraft.network.Packet; -import net.minecraft.network.play.server.S35PacketUpdateTileEntity; -import net.minecraft.server.gui.IUpdatePlayerListBox; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumParticleTypes; -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 implements IUpdatePlayerListBox -{ - private float rColour; - private float gColour; - private float bColour; - - private int ticksRemaining = 0; - private int minValue = 0; - private int maxValue = 0; - private float incrementValue = 0; - - private 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() - { - super(1); - float f = 1.0F; - float f1 = f * 0.6F + 0.4F; - float f2 = f * f * 0.7F - 0.5F; - float f3 = f * f * 0.6F - 0.7F; - rColour = f1; - gColour = f2; - bColour = f3; - } - - @Override - public void update() - { - int radius = 5; - - if (worldObj.isRemote) return; - - boolean stateChanged = false; - - if (ticksRemaining <= 0) - { - ItemStack stack = this.getStackInSlot(0); - if (stack != null && stack.getItem() instanceof IIncense) - { - IIncense incense = (IIncense)stack.getItem(); - - rColour = incense.getRedColour(stack); - gColour = incense.getGreenColour(stack); - bColour = incense.getBlueColour(stack); - ticksRemaining = incense.getIncenseDuration(stack); - - minValue = incense.getMinLevel(stack); - maxValue = incense.getMaxLevel(stack); - - incrementValue = incense.getTickRate(stack); - - stack.stackSize--; - if(stack.stackSize <= 0) - { - this.setInventorySlotContents(0, null); - } - - stateChanged = true; - } - } - - if(ticksRemaining > 0) - { - List playerList = SpellHelper.getPlayersInRange(worldObj, pos.getX(), pos.getY(), pos.getZ(), radius, radius); - - if(playerList != null && !playerList.isEmpty()) - { - boolean allAreGood = true; - - for(EntityPlayer player : playerList) - { - if(ticksRemaining > 0 && PlayerSacrificeHandler.incrementIncense(player, minValue, maxValue, incrementValue)) - { - ticksRemaining--; - if(state != 2) - { - state = 2; - stateChanged = true; - } - - allAreGood = false; - } - } - - if(allAreGood && state != 1) - { - state = 1; - stateChanged = true; - } - - - }else - { - if(state != 0) - { - state = 0; - worldObj.markBlockForUpdate(pos); - updateNeighbors(); - } - } - }else - { - if(state != 0) - { - state = 0; - worldObj.markBlockForUpdate(pos); - updateNeighbors(); - } - } - - if(stateChanged) - { - worldObj.markBlockForUpdate(pos); - - updateNeighbors(); - } - } - - private void updateNeighbors() - { - for(EnumFacing facing : EnumFacing.VALUES) - { - BlockPos newPos = pos.offset(facing); - IBlockState state = worldObj.getBlockState(newPos); - Block block = state.getBlock(); - block.onNeighborBlockChange(worldObj, newPos, state, this.getBlockType()); - } - } - - public void spawnClientParticle(World world, BlockPos blockPos, Random rand) - { - switch(state) - { - case 0: - world.spawnParticle(EnumParticleTypes.REDSTONE, blockPos.getX() + 0.5D + rand.nextGaussian() / 8, blockPos.getY() + 0.7D, blockPos.getZ() + 0.5D + rand.nextGaussian() / 8, 0.15, 0.15, 0.15); - break; - - case 1: - world.spawnParticle(EnumParticleTypes.REDSTONE, blockPos.getX() + 0.5D + rand.nextGaussian() / 8, blockPos.getY() + 0.7D, blockPos.getZ() + 0.5D + rand.nextGaussian() / 8, 1.0, 1.0, 1.0); - break; - - case 2: - world.spawnParticle(EnumParticleTypes.REDSTONE, blockPos.getX() + 0.5D + rand.nextGaussian() / 8, blockPos.getY() + 0.7D, blockPos.getZ() + 0.5D + rand.nextGaussian() / 8, rColour, gColour, bColour); - world.spawnParticle(EnumParticleTypes.FLAME, blockPos.getX() + 0.5D + rand.nextGaussian() / 32, blockPos.getY() + 0.7D, blockPos.getZ() + 0.5D + rand.nextGaussian() / 32, 0, 0.02, 0); - break; - - case 3: - //No particles - it is out - break; - } - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - super.writeToNBT(tag); - - tag.setInteger("ticksRemaining", ticksRemaining); - tag.setInteger("minValue", minValue); - tag.setInteger("maxValue", maxValue); - tag.setFloat("increment", this.incrementValue); - - this.writeClientNBT(tag); - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - super.readFromNBT(tag); - - ticksRemaining = tag.getInteger("ticksRemaining"); - minValue = tag.getInteger("minValue"); - maxValue = tag.getInteger("maxValue"); - incrementValue = tag.getFloat("increment"); - - this.readClientNBT(tag); - } - - public void writeClientNBT(NBTTagCompound tag) - { - tag.setFloat("rColour", rColour); - tag.setFloat("gColour", gColour); - tag.setFloat("bColour", bColour); - tag.setInteger("state", state); - - NBTTagList invList = new NBTTagList(); - for (int i = 0; i < inv.length; i++) - { - if (inv[i] != null) - { - NBTTagCompound stackTag = new NBTTagCompound(); - stackTag.setByte("Slot", (byte) i); - inv[i].writeToNBT(stackTag); - invList.appendTag(stackTag); - } - } - - tag.setTag("Inventory", invList); - } - - public void readClientNBT(NBTTagCompound tag) - { - rColour = tag.getFloat("rColour"); - gColour = tag.getFloat("gColour"); - bColour = tag.getFloat("bColour"); - state = tag.getInteger("state"); - - NBTTagList invList = tag.getTagList("Inventory", - Constants.NBT.TAG_COMPOUND); - for (int i = 0; i < invList.tagCount(); i++) - { - NBTTagCompound stackTag = invList.getCompoundTagAt(i); - int slot = stackTag.getByte("Slot"); - - if (slot >= 0 && slot < inv.length) - inv[slot] = ItemStack.loadItemStackFromNBT(stackTag); - } - } - - - @Override - public Packet getDescriptionPacket() - { - NBTTagCompound nbttagcompound = new NBTTagCompound(); - writeClientNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(pos, 90210, nbttagcompound); - } - - @Override - public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) - { - super.onDataPacket(net, packet); - readClientNBT(packet.getNbtCompound()); - } - - @Override - public String getName() - { - return "TECrucible"; - } - - @Override - public boolean isItemValidForSlot(int slot, ItemStack stack) - { - return stack != null && stack.getItem() instanceof IIncense; - } - - public int getRSPowerOutput() - { - return (state == 1 || state == 0) ? 0 : 15; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEInventory.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEInventory.java deleted file mode 100644 index ec5ccc86..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEInventory.java +++ /dev/null @@ -1,175 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -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 net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IChatComponent; -import net.minecraftforge.common.util.Constants; - -/** - * Base class for tile entities with inventory - * - * @author ljfa-ag - */ -public abstract class TEInventory extends TileEntity implements IInventory -{ - protected ItemStack[] inv; - - public TEInventory(int size) - { - inv = new ItemStack[size]; - } - - @Override - public int getSizeInventory() - { - return inv.length; - } - - @Override - public ItemStack getStackInSlot(int slot) - { - return inv[slot]; - } - - @Override - public ItemStack decrStackSize(int slot, int amt) - { - ItemStack stack = getStackInSlot(slot); - if (stack != null) - { - if (stack.stackSize <= amt) - setInventorySlotContents(slot, null); - else - { - stack = stack.splitStack(amt); - if (stack.stackSize == 0) - setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(int slot) - { - ItemStack stack = getStackInSlot(slot); - if (stack != null) - setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(int slot, ItemStack stack) - { - inv[slot] = stack; - worldObj.markBlockForUpdate(pos); - if (stack != null && stack.stackSize > getInventoryStackLimit()) - stack.stackSize = getInventoryStackLimit(); - } - - @Override - public abstract String getName(); - - @Override - public boolean hasCustomName() - { - return false; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - @Override - public boolean isUseableByPlayer(EntityPlayer player) - { - return worldObj.getTileEntity(this.pos) == this - && player.getDistanceSqToCenter(pos) < 64; - } - - @Override - public void openInventory(EntityPlayer player) - { - } - - @Override - public void closeInventory(EntityPlayer player) - { - } - - @Override - public boolean isItemValidForSlot(int slot, ItemStack stack) - { - return true; - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - super.writeToNBT(tag); - NBTTagList invList = new NBTTagList(); - for (int i = 0; i < inv.length; i++) - { - if (inv[i] != null) - { - NBTTagCompound stackTag = new NBTTagCompound(); - stackTag.setByte("Slot", (byte) i); - inv[i].writeToNBT(stackTag); - invList.appendTag(stackTag); - } - } - - tag.setTag("Inventory", invList); - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - super.readFromNBT(tag); - NBTTagList invList = tag.getTagList("Inventory", - Constants.NBT.TAG_COMPOUND); - for (int i = 0; i < invList.tagCount(); i++) - { - NBTTagCompound stackTag = invList.getCompoundTagAt(i); - int slot = stackTag.getByte("Slot"); - - if (slot >= 0 && slot < inv.length) - inv[slot] = ItemStack.loadItemStackFromNBT(stackTag); - } - } - - public void clear() - { - inv = new ItemStack[inv.length]; - } - - @Override - public int getField(int id) { - // TODO Auto-generated method stub - return 0; - } - - @Override - public void setField(int id, int value) { - // TODO Auto-generated method stub - - } - - @Override - public int getFieldCount() { - // TODO Auto-generated method stub - return 0; - } - - @Override - public IChatComponent getDisplayName() { - // TODO Auto-generated method stub - return null; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java deleted file mode 100644 index 01d78af0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java +++ /dev/null @@ -1,690 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -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; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.network.NetworkManager; -import net.minecraft.network.Packet; -import net.minecraft.network.play.server.S35PacketUpdateTileEntity; -import net.minecraft.server.gui.IUpdatePlayerListBox; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.util.ChatComponentTranslation; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.Constants; -import net.minecraftforge.fml.common.eventhandler.Event; -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; - -public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUpdatePlayerListBox -{ - private String currentRitualString; - private boolean isActive; - private String owner; - private String varString1; - private int cooldown; - private int var1; - private int direction; - public boolean isRunning; - public int runningTime; - - public LocalRitualStorage storage; - - private NBTTagCompound customRitualTag; - - protected ReagentContainer[] tanks; - protected Map attunedTankMap; - - public TEMasterStone() - { - tanks = new ReagentContainer[]{new ReagentContainer(1000), new ReagentContainer(1000), new ReagentContainer(1000)}; - this.attunedTankMap = new HashMap(); - - isActive = false; - owner = ""; - cooldown = 0; - var1 = 0; - direction = 0; - varString1 = ""; - currentRitualString = ""; - isRunning = false; - runningTime = 0; - - this.customRitualTag = new NBTTagCompound(); - } - - public void readClientNBT(NBTTagCompound tag) - { - currentRitualString = tag.getString("currentRitualString"); - isRunning = tag.getBoolean("isRunning"); - runningTime = tag.getInteger("runningTime"); - - NBTTagList tagList = tag.getTagList("reagentTanks", Constants.NBT.TAG_COMPOUND); - - int size = tagList.tagCount(); - this.tanks = new ReagentContainer[size]; - - for (int i = 0; i < size; i++) - { - NBTTagCompound savedTag = tagList.getCompoundTagAt(i); - this.tanks[i] = ReagentContainer.readFromNBT(savedTag); - } - } - - public void writeClientNBT(NBTTagCompound tag) - { - tag.setString("currentRitualString", currentRitualString); - tag.setBoolean("isRunning", isRunning); - tag.setInteger("runningTime", runningTime); - - NBTTagList tagList = new NBTTagList(); - - for (int i = 0; i < this.tanks.length; i++) - { - NBTTagCompound savedTag = new NBTTagCompound(); - if (this.tanks[i] != null) - { - this.tanks[i].writeToNBT(savedTag); - } - tagList.appendTag(savedTag); - } - - tag.setTag("reagentTanks", tagList); - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - super.readFromNBT(tag); - isActive = tag.getBoolean("isActive"); - owner = tag.getString("owner"); - cooldown = tag.getInteger("cooldown"); - var1 = tag.getInteger("var1"); - direction = tag.getInteger("direction"); - currentRitualString = tag.getString("currentRitualString"); - isRunning = tag.getBoolean("isRunning"); - runningTime = tag.getInteger("runningTime"); - - NBTTagList tagList = tag.getTagList("reagentTanks", Constants.NBT.TAG_COMPOUND); - - int size = tagList.tagCount(); - this.tanks = new ReagentContainer[size]; - - for (int i = 0; i < size; i++) - { - NBTTagCompound savedTag = tagList.getCompoundTagAt(i); - this.tanks[i] = ReagentContainer.readFromNBT(savedTag); - } - - NBTTagList attunedTagList = tag.getTagList("attunedTankMap", Constants.NBT.TAG_COMPOUND); - - for (int i = 0; i < attunedTagList.tagCount(); i++) - { - NBTTagCompound savedTag = attunedTagList.getCompoundTagAt(i); - Reagent reagent = ReagentRegistry.getReagentForKey(savedTag.getString("reagent")); - this.attunedTankMap.put(reagent, savedTag.getInteger("amount")); - } - - customRitualTag = tag.getCompoundTag("customRitualTag"); - - LocalRitualStorage newStorage = Rituals.getLocalStorage(currentRitualString); - - NBTTagCompound localStorageTag = tag.getCompoundTag("localStorage"); - if(newStorage != null) - { - newStorage.readFromNBT(localStorageTag); - storage = newStorage; - storage.setLocation(pos); - } - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - super.writeToNBT(tag); - tag.setBoolean("isActive", isActive); - tag.setString("owner", owner); - tag.setInteger("cooldown", cooldown); - tag.setInteger("var1", var1); - tag.setInteger("direction", direction); - tag.setString("currentRitualString", currentRitualString); - tag.setBoolean("isRunning", isRunning); - tag.setInteger("runningTime", runningTime); - - NBTTagList tagList = new NBTTagList(); - - for (int i = 0; i < this.tanks.length; i++) - { - NBTTagCompound savedTag = new NBTTagCompound(); - if (this.tanks[i] != null) - { - this.tanks[i].writeToNBT(savedTag); - } - tagList.appendTag(savedTag); - } - - tag.setTag("reagentTanks", tagList); - - NBTTagList attunedTagList = new NBTTagList(); - - for (Entry entry : this.attunedTankMap.entrySet()) - { - NBTTagCompound savedTag = new NBTTagCompound(); - savedTag.setString("reagent", ReagentRegistry.getKeyForReagent(entry.getKey())); - savedTag.setInteger("amount", entry.getValue()); - attunedTagList.appendTag(savedTag); - } - - tag.setTag("attunedTankMap", attunedTagList); - - tag.setTag("customRitualTag", customRitualTag); - - if(storage != null) - { - NBTTagCompound localStorageTag = new NBTTagCompound(); - - storage.writeToNBT(localStorageTag); - tag.setTag("localStorage", localStorageTag); - } - - } - - public void activateRitual(World world, int crystalLevel, ItemStack activationCrystal, EntityPlayer player, String crystalOwner) - { - if (world.isRemote) - { - return; - } - - String testRitual = Rituals.checkValidRitual(world, pos); - - if (testRitual.equals("")) - { - player.addChatMessage(new ChatComponentTranslation("message.masterstone.nothinghappened")); - return; - } - - //TODO - 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")); - - return; - } - - int eventCrystalTier = event.crystalTier; - String eventRitualKey = event.ritualKey; - String eventOwnerKey = event.ownerKey; - - boolean testLevel = Rituals.canCrystalActivate(eventRitualKey, eventCrystalTier); - - if (!testLevel) - { - player.addChatMessage(new ChatComponentTranslation("message.masterstone.crystalvibrates")); - - return; - } - - int currentEssence = SoulNetworkHandler.getCurrentEssence(eventOwnerKey); - - if (currentEssence < Rituals.getCostForActivation(testRitual)) - { - player.addChatMessage(new ChatComponentTranslation("message.masterstone.youfeelapull")); - - return; - } - - if (!world.isRemote) - { - if (!Rituals.startRitual(this, testRitual, player)) - { - player.addChatMessage(new ChatComponentTranslation("message.masterstone.ritualresistyou")); - - return; - } else - { - int drain = SoulNetworkHandler.syphonFromNetwork(eventOwnerKey, Rituals.getCostForActivation(testRitual)); - - if(drain > 0) - { - player.addChatMessage(new ChatComponentTranslation("message.masterstone.energyflows")); - - for (int i = 0; i < 12; i++) - { - SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, worldObj.provider.getDimensionId(), 1, pos); - } - }else - { - player.addChatMessage(new ChatComponentTranslation("message.masterstone.somethingstoppedyou")); - - return; - } - } - } - - if(!this.currentRitualString.equals("")) - { - Rituals.onRitualBroken(this, this.currentRitualString, RitualBreakMethod.ACTIVATE); - } - this.setOwner(eventOwnerKey); - cooldown = Rituals.getInitialCooldown(testRitual); - var1 = 0; - currentRitualString = testRitual; - storage = Rituals.getLocalStorage(currentRitualString); - storage.setLocation(pos); - isActive = true; - isRunning = true; - direction = Rituals.getDirectionOfRitual(world, pos, testRitual); - worldObj.markBlockForUpdate(pos); - } - - public void setOwner(String owner) - { - this.owner = owner; - } - - public void useOnRitualBroken() - { - Rituals.onRitualBroken(this, this.currentRitualString, RitualBreakMethod.BREAK_MRS); - } - - public void useOnRitualBrokenExplosion() - { - Rituals.onRitualBroken(this, this.currentRitualString, RitualBreakMethod.EXPLOSION); - } - - @Override - public void update() - { - if (isRunning && runningTime < 100) - { - runningTime++; - } else if (!isRunning && runningTime > 0) - { - runningTime--; - } - - if (!isActive) - { - return; - } - - int worldTime = (int) (worldObj.getWorldTime() % 24000); - - if (worldObj.isRemote) - { - return; - } - - if (worldTime % 100 == 0) - { - boolean testRunes = Rituals.checkDirectionOfRitualValid(worldObj, pos, currentRitualString, direction); - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); - - if (!testRunes) - { - Rituals.onRitualBroken(this, currentRitualString, RitualBreakMethod.BREAK_STONE); - isActive = false; - currentRitualString = ""; - worldObj.markBlockForUpdate(pos); - return; - } - } - - if (worldObj.getStrongPower(pos) > 0) - { - if (isRunning) - { - Rituals.onRitualBroken(this, this.currentRitualString, RitualBreakMethod.REDSTONE); - isRunning = false; - worldObj.markBlockForUpdate(pos); - } - - return; - } else - { - if (!isRunning) - { - isRunning = true; - worldObj.markBlockForUpdate(pos); - } - } - - performRitual(worldObj, pos, currentRitualString); - } - - public void performRitual(World world, BlockPos pos, String currentRitualString) - { - Rituals.performEffect(this, currentRitualString); - } - - public String getOwner() - { - return owner; - } - - public void setCooldown(int newCooldown) - { - this.cooldown = newCooldown; - } - - public int getCooldown() - { - return this.cooldown; - } - - public void setVar1(int newVar1) - { - this.var1 = newVar1; - } - - public int getVar1() - { - return this.var1; - } - - public void setActive(boolean active) - { - Rituals.onRitualBroken(this, this.currentRitualString, RitualBreakMethod.DEACTIVATE); - this.isActive = active; - this.isRunning = active; - worldObj.markBlockForUpdate(pos); - } - - public int getDirection() - { - return this.direction; - } - - @Override - public World getWorldObj() - { - return this.getWorld(); - } - - @Override - public BlockPos getPosition() - { - return this.getPos(); - } - - public String getCurrentRitual() - { - return this.currentRitualString; - } - - public void setCurrentRitual(String str) - { - this.currentRitualString = str; - } - - @Override - public Packet getDescriptionPacket() - { - NBTTagCompound nbttagcompound = new NBTTagCompound(); - writeClientNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(pos, -999, nbttagcompound); - } - - @Override - public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) - { - super.onDataPacket(net, packet); - readClientNBT(packet.getNbtCompound()); - } - - public AxisAlignedBB getRenderBoundingBox() - { - double renderExtension = 1.0d; - return new AxisAlignedBB(pos.add(-renderExtension, -renderExtension, -renderExtension), pos.add(1 + renderExtension, 1 + renderExtension, 1 + renderExtension)); - } - - /* ISegmentedReagentHandler */ - @Override - public int fill(EnumFacing from, ReagentStack resource, boolean doFill) - { - if (doFill) - { - worldObj.markBlockForUpdate(pos); - } - - int totalFill = 0; - - boolean useTankLimit = !this.attunedTankMap.isEmpty(); - - if (resource != null) - { - int totalTanksFillable = useTankLimit ? this.getTanksTunedToReagent(resource.reagent) : this.tanks.length; - int tanksFilled = 0; - - int maxFill = resource.amount; - - for (int i = this.tanks.length - 1; i >= 0; i--) - { - ReagentStack remainingStack = resource.copy(); - remainingStack.amount = maxFill - totalFill; - - boolean doesReagentMatch = tanks[i].getReagent() != null && tanks[i].getReagent().isReagentEqual(remainingStack); - - if (doesReagentMatch) - { - totalFill += tanks[i].fill(remainingStack, doFill); - tanksFilled++; - } else - { - continue; - } - - if (totalFill >= maxFill || tanksFilled >= totalTanksFillable) - { - return totalFill; - } - } - - if (tanksFilled >= totalTanksFillable) - { - return totalFill; - } - - for (int i = this.tanks.length - 1; i >= 0; i--) - { - ReagentStack remainingStack = resource.copy(); - remainingStack.amount = maxFill - totalFill; - - boolean isTankEmpty = tanks[i].getReagent() == null; - - if (isTankEmpty) - { - totalFill += tanks[i].fill(remainingStack, doFill); - tanksFilled++; - } else - { - continue; - } - - if (totalFill >= maxFill || tanksFilled >= totalTanksFillable) - { - return totalFill; - } - } - } - return totalFill; - } - - @Override - public ReagentStack drain(EnumFacing from, ReagentStack resource, boolean doDrain) - { - if (resource == null) - { - return null; - } - - if (doDrain) - { - worldObj.markBlockForUpdate(pos); - } - - int maxDrain = resource.amount; - Reagent reagent = resource.reagent; - int drained = 0; - - for (int i = 0; i < tanks.length; i++) - { - if (drained >= maxDrain) - { - break; - } - - if (resource.isReagentEqual(tanks[i].getReagent())) - { - ReagentStack drainStack = tanks[i].drain(maxDrain - drained, doDrain); - if (drainStack != null) - { - drained += drainStack.amount; - } - } - } - - return new ReagentStack(reagent, drained); - } - - /* Only returns the amount from the first available tank */ - @Override - public ReagentStack drain(EnumFacing from, int maxDrain, boolean doDrain) - { - for (int i = 0; i < tanks.length; i++) - { - ReagentStack stack = tanks[i].drain(maxDrain, doDrain); - if (stack != null) - { - if (doDrain) - { - worldObj.markBlockForUpdate(pos); - } - - return stack; - } - } - - return null; - } - - @Override - public boolean canFill(EnumFacing from, Reagent reagent) - { - return true; - } - - @Override - public boolean canDrain(EnumFacing from, Reagent reagent) - { - return true; - } - - @Override - public ReagentContainerInfo[] getContainerInfo(EnumFacing from) - { - ReagentContainerInfo[] info = new ReagentContainerInfo[this.getNumberOfTanks()]; - for (int i = 0; i < this.getNumberOfTanks(); i++) - { - info[i] = tanks[i].getInfo(); - } - return info; - } - - @Override - public int getNumberOfTanks() - { - return tanks.length; - } - - @Override - public int getTanksTunedToReagent(Reagent reagent) - { - if (this.attunedTankMap.containsKey(reagent) && this.attunedTankMap.get(reagent) != null) - { - return this.attunedTankMap.get(reagent); - } - return 0; - } - - @Override - public void setTanksTunedToReagent(Reagent reagent, int total) - { - if (total == 0 && this.attunedTankMap.containsKey(reagent)) - { - this.attunedTankMap.remove(reagent); - return; - } - - this.attunedTankMap.put(reagent, total); - } - - @Override - public Map getAttunedTankMap() - { - return this.attunedTankMap; - } - - public boolean areTanksEmpty() - { - for (int i = 0; i < this.tanks.length; i++) - { - if (tanks[i] != null && tanks[i].getReagent() != null) - { - return false; - } - } - - return true; - } - - @Override - public NBTTagCompound getCustomRitualTag() - { - return this.customRitualTag; - } - - @Override - public void setCustomRitualTag(NBTTagCompound tag) - { - this.customRitualTag = tag; - } - - @Override - public int getRunningTime() - { - return this.runningTime; - } - - @Override - public LocalRitualStorage getLocalStorage() - { - return storage; - } - - @Override - public void setLocalStorage(LocalRitualStorage storage) - { - this.storage = storage; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java deleted file mode 100644 index d059a92e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java +++ /dev/null @@ -1,239 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.network.NetworkManager; -import net.minecraft.network.Packet; -import net.minecraft.network.play.server.S35PacketUpdateTileEntity; -import net.minecraft.server.gui.IUpdatePlayerListBox; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -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 implements IUpdatePlayerListBox -{ - private ItemStack[] inv; - public Reagent reagent; - - private int ticksRemaining; - - public TEMimicBlock() - { - this.inv = new ItemStack[1]; - - ticksRemaining = 0; - } - - @Override - public Packet getDescriptionPacket() - { - NBTTagCompound nbttagcompound = new NBTTagCompound(); - writeToNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(pos, -999, nbttagcompound); - } - - @Override - public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) - { - super.onDataPacket(net, packet); - readFromNBT(packet.getNbtCompound()); - } - - @Override - public void readFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readFromNBT(par1NBTTagCompound); - NBTTagList tagList = par1NBTTagCompound.getTagList("Inventory", Constants.NBT.TAG_COMPOUND); - - for (int i = 0; i < tagList.tagCount(); i++) - { - NBTTagCompound tag = tagList.getCompoundTagAt(i); - int slot = tag.getByte("Slot"); - - if (slot >= 0 && slot < inv.length) - { - inv[slot] = ItemStack.loadItemStackFromNBT(tag); - } - } - - ticksRemaining = par1NBTTagCompound.getInteger("ticksRemaining"); - reagent = ReagentRegistry.getReagentForKey(par1NBTTagCompound.getString("reagent")); - } - - @Override - public void writeToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeToNBT(par1NBTTagCompound); - NBTTagList itemList = new NBTTagList(); - - for (int i = 0; i < inv.length; i++) - { - if (inv[i] != null) - { - NBTTagCompound tag = new NBTTagCompound(); - tag.setByte("Slot", (byte) i); - inv[i].writeToNBT(tag); - itemList.appendTag(tag); - } - } - - par1NBTTagCompound.setTag("Inventory", itemList); - par1NBTTagCompound.setInteger("ticksRemaining", ticksRemaining); - par1NBTTagCompound.setString("reagent", ReagentRegistry.getKeyForReagent(reagent)); - } - - @Override - public void update() - { - this.ticksRemaining--; - - if (this.ticksRemaining <= 0) - { - this.returnContainedBlock(); - } - } - - public static boolean createMimicBlockAtLocation(World world, BlockPos pos, int duration, IBlockState state, Reagent reagent) - { - Block block = state.getBlock(); - if (block == null) - { - return false; - } - - TileEntity tileEntity = world.getTileEntity(pos); - - if (tileEntity == null && world.isAirBlock(pos)) - { - ItemStack item = new ItemStack(block, 1, block.getMetaFromState(state)); - - world.setBlockState(pos, ModBlocks.blockMimic.getDefaultState()); - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TEMimicBlock) - { - ((TEMimicBlock) tile).setContainedItem(item); - ((TEMimicBlock) tile).setDuration(duration); - ((TEMimicBlock) tile).reagent = reagent; - world.markBlockForUpdate(pos); - return true; - } - }else - { - if(tileEntity instanceof TEMimicBlock) - { - if(((TEMimicBlock) tileEntity).getBlock() == block) - { - ((TEMimicBlock) tileEntity).ticksRemaining = Math.max(duration, ((TEMimicBlock) tileEntity).ticksRemaining); - } - } - } - - return false; - } - - 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); - } - - public void setDuration(int dur) - { - this.ticksRemaining = dur; - } - - public void resetDuration(int dur) - { - if (this.ticksRemaining < dur) - { - this.ticksRemaining = dur; - } - } - - public void setContainedItem(ItemStack item) - { - this.inv[0] = item; - } - - 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(); -// -// if (block != null) -// { -// this.worldObj.setBlock(xCoord, yCoord, zCoord, block, meta, 6); -// } -// } -// -// } else - { - this.worldObj.setBlockToAir(pos); - } - } - - public Block getBlock() - { - ItemStack item = this.inv[0]; - if(item != null) - { - if (item.getItem() instanceof ItemBlock) - { - Block block = ((ItemBlock) item.getItem()).getBlock(); - return block; - } - } - return null; - } - - public int getMetaOfMimic() - { - ItemStack item = this.inv[0]; - if(item != null) - { - return item.getItemDamage(); - } - - return 0; - } - - public IBlockState getStateOfMimic() - { - Block block = this.getBlock(); - if(block == null) - { - return null; - } - - return block.getStateFromMeta(getMetaOfMimic()); - } - - public boolean getBlockEffectWhileInside(Entity entity, BlockPos blockPos) - { - if(reagent != null) - { - OmegaParadigm paradigm = OmegaRegistry.getParadigmForReagent(reagent); - if(paradigm != null) - { - return paradigm.getBlockEffectWhileInside(entity, blockPos); - } - } - - return false; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEOrientable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEOrientable.java deleted file mode 100644 index 160bf6a7..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEOrientable.java +++ /dev/null @@ -1,108 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.Packet; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import WayofTime.alchemicalWizardry.common.NewPacketHandler; -import WayofTime.alchemicalWizardry.common.block.IOrientable; - -public class TEOrientable extends TileEntity implements IOrientable -{ - protected EnumFacing inputFace; - protected EnumFacing outputFace; - - public TEOrientable() - { - this.inputFace = EnumFacing.DOWN; - this.outputFace = EnumFacing.UP; - } - - @Override - public void readFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readFromNBT(par1NBTTagCompound); - this.setInputDirection(EnumFacing.getFront(par1NBTTagCompound.getInteger("inputFace"))); - this.setOutputDirection(EnumFacing.getFront(par1NBTTagCompound.getInteger("outputFace"))); - } - - @Override - public void writeToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeToNBT(par1NBTTagCompound); - par1NBTTagCompound.setInteger("inputFace", TEOrientable.getIntForEnumFacing(this.getInputDirection())); - par1NBTTagCompound.setInteger("outputFace", TEOrientable.getIntForEnumFacing(this.getOutputDirection())); - } - - @Override - public EnumFacing getInputDirection() - { - return this.inputFace; - } - - @Override - public EnumFacing getOutputDirection() - { - return this.outputFace; - } - - @Override - public void setInputDirection(EnumFacing direction) - { - this.inputFace = direction; - } - - @Override - public void setOutputDirection(EnumFacing direction) - { - this.outputFace = direction; - } - - public static int getIntForEnumFacing(EnumFacing direction) - { - switch (direction) - { - case DOWN: - return 0; - - case UP: - return 1; - - case NORTH: - return 2; - - case SOUTH: - return 3; - - case WEST: - return 4; - - case EAST: - return 5; - - default: - return 0; - } - } - - @Override - public Packet getDescriptionPacket() - { - return NewPacketHandler.getPacket(this); - } - - - public boolean isSideRendered(EnumFacing side) - { - if (side.equals(this.getInputDirection()) || side.equals(this.getOutputDirection())) - { - return true; - } - return false; - } - - public String getResourceLocationForMeta(int meta) - { - return ""; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java deleted file mode 100644 index 7b664d7f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java +++ /dev/null @@ -1,138 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -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; - private int resultDamage; - - private boolean isActive; - - public TEPedestal() - { - super(sizeInv); - resultID = 0; - resultDamage = 0; - isActive = false; - } - - @Override - public void readFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readFromNBT(par1NBTTagCompound); - - resultID = par1NBTTagCompound.getInteger("resultID"); - resultDamage = par1NBTTagCompound.getInteger("resultDamage"); - isActive = par1NBTTagCompound.getBoolean("isActive"); - } - - @Override - public void writeToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeToNBT(par1NBTTagCompound); - - par1NBTTagCompound.setInteger("resultID", resultID); - par1NBTTagCompound.setInteger("resultDamage", resultDamage); - par1NBTTagCompound.setBoolean("isActive", isActive); - } - - @Override - public String getName() - { - return "TEPedestal"; - } - - @Override - public int getInventoryStackLimit() - { - return 1; - } - - public void setActive() - { - isActive = false; - } - - public boolean isActive() - { - return isActive; - } - - @Override - public Packet getDescriptionPacket() - { - return NewPacketHandler.getPacket(this); - } - - public void handlePacketData(int[] intData) - { - if (intData == null) - { - return; - } - - 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]); - inv[i] = is; - } else - { - inv[i] = null; - } - } - } - } - - public int[] buildIntDataList() - { - int[] sortList = new int[3]; //1 * 3 - int pos = 0; - - for (ItemStack is : inv) - { - if (is != null) - { - sortList[pos++] = Item.getIdFromItem(is.getItem()); - sortList[pos++] = is.getItemDamage(); - sortList[pos++] = is.stackSize; - } else - { - sortList[pos++] = 0; - sortList[pos++] = 0; - sortList[pos++] = 0; - } - } - - return sortList; - } - - @Override - public boolean isItemValidForSlot(int slot, ItemStack itemstack) - { - return slot == 0; - } - - public void onItemDeletion() - { - worldObj.addWeatherEffect(new EntityLightningBolt(worldObj, pos.getX(), pos.getY(), pos.getZ())); - worldObj.markBlockForUpdate(pos); - - for (int i = 0; i < 16; i++) - { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 2, pos); - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java deleted file mode 100644 index 05be629f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java +++ /dev/null @@ -1,568 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.network.Packet; -import net.minecraft.server.gui.IUpdatePlayerListBox; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -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.Orb; - -public class TEPlinth extends TEInventory implements IUpdatePlayerListBox -{ - public static final int sizeInv = 1; - - private boolean isActive; - private boolean paradigm; - - private ItemStack[] ring1Inv; - private ItemStack[] ring2Inv; - private ItemStack[] ring3Inv; - - private int progressInterval; - private int progress; - - public static List pedestalPositions = new ArrayList(); - - public TEPlinth() - { - super(sizeInv); - this.ring1Inv = new ItemStack[6]; - this.ring2Inv = new ItemStack[6]; - this.ring3Inv = new ItemStack[6]; - isActive = false; - progress = 0; - progressInterval = 50; - } - - @Override - public void readFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readFromNBT(par1NBTTagCompound); - - NBTTagList ring1TagList = par1NBTTagCompound.getTagList("ring1Inv", Constants.NBT.TAG_COMPOUND); - - for (int i = 0; i < ring1TagList.tagCount(); i++) - { - NBTTagCompound tag = ring1TagList.getCompoundTagAt(i); - int slot = tag.getByte("Slot"); - - if (slot >= 0 && slot < inv.length) - { - ring1Inv[slot] = ItemStack.loadItemStackFromNBT(tag); - } - } - - NBTTagList ring2TagList = par1NBTTagCompound.getTagList("ring2Inv", Constants.NBT.TAG_COMPOUND); - - for (int i = 0; i < ring2TagList.tagCount(); i++) - { - NBTTagCompound tag = ring2TagList.getCompoundTagAt(i); - int slot = tag.getByte("Slot"); - - if (slot >= 0 && slot < inv.length) - { - ring2Inv[slot] = ItemStack.loadItemStackFromNBT(tag); - } - } - - NBTTagList ring3TagList = par1NBTTagCompound.getTagList("ring3Inv", Constants.NBT.TAG_COMPOUND); - - for (int i = 0; i < ring3TagList.tagCount(); i++) - { - NBTTagCompound tag = ring3TagList.getCompoundTagAt(i); - int slot = tag.getByte("Slot"); - - if (slot >= 0 && slot < inv.length) - { - ring3Inv[slot] = ItemStack.loadItemStackFromNBT(tag); - } - } - - progress = par1NBTTagCompound.getInteger("progress"); - progressInterval = par1NBTTagCompound.getInteger("progressInterval"); - isActive = par1NBTTagCompound.getBoolean("isActive"); - } - - @Override - public void writeToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeToNBT(par1NBTTagCompound); - - NBTTagList ring1ItemList = new NBTTagList(); - - for (int i = 0; i < ring1Inv.length; i++) - { - if (ring1Inv[i] != null) - { - NBTTagCompound tag = new NBTTagCompound(); - tag.setByte("Slot", (byte) i); - ring1Inv[i].writeToNBT(tag); - ring1ItemList.appendTag(tag); - } - } - - par1NBTTagCompound.setTag("ring1Inv", ring1ItemList); - NBTTagList ring2ItemList = new NBTTagList(); - - for (int i = 0; i < ring2Inv.length; i++) - { - if (ring2Inv[i] != null) - { - NBTTagCompound tag = new NBTTagCompound(); - tag.setByte("Slot", (byte) i); - ring2Inv[i].writeToNBT(tag); - ring2ItemList.appendTag(tag); - } - } - - par1NBTTagCompound.setTag("ring2Inv", ring1ItemList); - NBTTagList ring3ItemList = new NBTTagList(); - - for (int i = 0; i < ring3Inv.length; i++) - { - if (ring3Inv[i] != null) - { - NBTTagCompound tag = new NBTTagCompound(); - tag.setByte("Slot", (byte) i); - ring3Inv[i].writeToNBT(tag); - ring3ItemList.appendTag(tag); - } - } - - par1NBTTagCompound.setTag("ring3Inv", ring1ItemList); - par1NBTTagCompound.setInteger("progress", progress); - par1NBTTagCompound.setInteger("progressInterval", progressInterval); - par1NBTTagCompound.setBoolean("isActive", isActive); - } - - @Override - public String getName() - { - return "TEPlinth"; - } - - @Override - public int getInventoryStackLimit() - { - return 1; - } - - //Logic for the actual block is under here - @Override - public void update() - { - if (worldObj.isRemote) - { - return; - } - - if (!isActive()) - { - if (getStackInSlot(0) != null && getStackInSlot(0).getItem() instanceof Orb) - { - int bloodOrbLevel = ((Orb) getStackInSlot(0).getItem()).getOrbLevel(); - - if (SummoningRegistry.isRecipeValid(bloodOrbLevel, composeItemsForRingAndParadigm(1, true), composeItemsForRingAndParadigm(2, true), composeItemsForRingAndParadigm(3, true))) - { - SummoningRegistryComponent src = SummoningRegistry.getRegistryComponent(bloodOrbLevel, composeItemsForRingAndParadigm(1, true), composeItemsForRingAndParadigm(2, true), composeItemsForRingAndParadigm(3, true)); - isActive = true; - paradigm = true; - progress = 0; - ring1Inv = src.getRingRecipeForRing(1); - ring2Inv = src.getRingRecipeForRing(2); - ring3Inv = src.getRingRecipeForRing(3); - } else if (SummoningRegistry.isRecipeValid(bloodOrbLevel, 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; - } - } - } else - { - if (getStackInSlot(0) != null && getStackInSlot(0).getItem() instanceof Orb) - { - if (progress % progressInterval == 0) - { - int ring = (progress / progressInterval) / 6 + 1; - int slot = (progress / progressInterval) % 6; - ItemStack itemStack; - - switch (ring) - { - case 1: - itemStack = this.ring1Inv[slot]; - break; - - case 2: - itemStack = this.ring2Inv[slot]; - break; - - case 3: - itemStack = this.ring3Inv[slot]; - break; - - default: - itemStack = null; - } - - if (itemStack == null) - { - progress += progressInterval; - } else - { - if (this.deleteItemStackInRing(ring, itemStack)) - { - progress++; - } - } - } else - { - progress++; - } - - if (progress >= progressInterval * 18) - { - int bloodOrbLevel = ((Orb) getStackInSlot(0).getItem()).getOrbLevel(); - EntityLivingBase entity = SummoningRegistry.getEntity(worldObj, bloodOrbLevel, ring1Inv, ring2Inv, ring3Inv); - - if (entity != null) - { - entity.setPosition(pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5); - worldObj.spawnEntityInWorld(entity); - - if (entity instanceof IDemon) - { - ((IDemon) entity).setSummonedConditions(); - } - - worldObj.createExplosion(entity, entity.posX, entity.posY, entity.posZ, 3, false); - //deleteItemsInRing(1); - isActive = false; - progress = 0; - - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - } - } - } - } - } - - public void deleteItemsInRing(int ring) - { - if (paradigm) - { - int i = 0; - - for (PlinthComponent pc : pedestalPositions) - { - if (i < 6 && pc.getRing() == ring) - { - BlockPos newPos = pos.add(pc.xOffset, pc.yOffset, pc.zOffset); - TileEntity tileEntity = worldObj.getTileEntity(newPos); - - if (tileEntity instanceof TEPedestal) - { - ((TEPedestal) tileEntity).setInventorySlotContents(0, null); - worldObj.markBlockForUpdate(newPos); - i++; - } - } - } - } else - { - int i = 0; - - for (PlinthComponent pc : pedestalPositions) - { - if (i < 6 && pc.getRing() == ring) - { - BlockPos newPos = pos.add(pc.zOffset, pc.yOffset, pc.xOffset); - TileEntity tileEntity = worldObj.getTileEntity(newPos); - - if (tileEntity instanceof TEPedestal) - { - ((TEPedestal) tileEntity).setInventorySlotContents(0, null); - worldObj.markBlockForUpdate(newPos); - i++; - } - } - } - } - } - - public boolean deleteItemStackInRing(int ring, ItemStack itemStack) - { - if (itemStack == null) - { - return true; - } - - if (paradigm) - { - int i = 0; - - for (PlinthComponent pc : pedestalPositions) - { - if (i < 6 && pc.getRing() == ring) - { - BlockPos newPos = pos.add(pc.xOffset, pc.yOffset, pc.zOffset); - TileEntity tileEntity = worldObj.getTileEntity(newPos); - - if (tileEntity instanceof TEPedestal) - { - ItemStack possibleItem = ((TEPedestal) tileEntity).getStackInSlot(0); - - if (possibleItem == null) - { - i++; - continue; - } - - boolean test = false; - - if (possibleItem.getItem() instanceof ItemBlock) - { - if (itemStack.getItem() instanceof ItemBlock) - { - test = true; - } - } else if (!(itemStack.getItem() instanceof ItemBlock)) - { - test = true; - } - - if (test) - { - if (itemStack.getItem() == possibleItem.getItem() && (itemStack.getItemDamage() == possibleItem.getItemDamage() || itemStack.getItemDamage() == OreDictionary.WILDCARD_VALUE)) - { - ((TEPedestal) tileEntity).decrStackSize(0, 1); - if (((TEPedestal) tileEntity).getStackInSlot(0) != null && ((TEPedestal) tileEntity).getStackInSlot(0).stackSize == 0) - { - ((TEPedestal) tileEntity).setInventorySlotContents(0, null); - } - ((TEPedestal) tileEntity).onItemDeletion(); - worldObj.markBlockForUpdate(newPos); - return true; - } - } - - i++; - } - } - } - } else - { - int i = 0; - - for (PlinthComponent pc : pedestalPositions) - { - if (i < 6 && pc.getRing() == ring) - { - BlockPos newPos = pos.add(pc.zOffset, pc.yOffset, pc.xOffset); - TileEntity tileEntity = worldObj.getTileEntity(newPos); - - if (tileEntity instanceof TEPedestal) - { - ItemStack possibleItem = ((TEPedestal) tileEntity).getStackInSlot(0); - - if (possibleItem == null) - { - i++; - continue; - } - - boolean test = false; - - if (possibleItem.getItem() instanceof ItemBlock) - { - if (itemStack.getItem() instanceof ItemBlock) - { - test = true; - } - } else if (!(itemStack.getItem() instanceof ItemBlock)) - { - test = true; - } - - if (test) - { - if (itemStack.getItem() == possibleItem.getItem() && (itemStack.getItemDamage() == possibleItem.getItemDamage() || itemStack.getItemDamage() == OreDictionary.WILDCARD_VALUE)) - { - ((TEPedestal) tileEntity).decrStackSize(0, 1); - ((TEPedestal) tileEntity).onItemDeletion(); - worldObj.markBlockForUpdate(newPos); - return true; - } - } - - i++; - } - } - } - } - - return false; - } - - public ItemStack[] composeItemsForRingAndParadigm(int ring, boolean paradigm) - { - ItemStack[] composed = new ItemStack[6]; - - if (paradigm) - { - int i = 0; - - for (PlinthComponent pc : pedestalPositions) - { - if (i < 6 && pc.getRing() == ring) - { - BlockPos newPos = pos.add(pc.xOffset, pc.yOffset, pc.zOffset); - TileEntity tileEntity = worldObj.getTileEntity(newPos); - - if (tileEntity instanceof TEPedestal) - { - composed[i] = ((TEPedestal) tileEntity).getStackInSlot(0); - i++; - } - } - } - } else - { - int i = 0; - - for (PlinthComponent pc : pedestalPositions) - { - if (i < 6 && pc.getRing() == ring) - { - BlockPos newPos = pos.add(pc.zOffset, pc.yOffset, pc.xOffset); - TileEntity tileEntity = worldObj.getTileEntity(newPos); - - if (tileEntity instanceof TEPedestal) - { - composed[i] = ((TEPedestal) tileEntity).getStackInSlot(0); - i++; - } - } - } - } - - return composed; - } - - public void setActive() - { - isActive = false; - } - - public boolean isActive() - { - return isActive; - } - - @Override - public Packet getDescriptionPacket() - { - return NewPacketHandler.getPacket(this); - } - - public void handlePacketData(int[] intData) - { - if (intData == null) - { - return; - } - - 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]); - inv[i] = is; - } else - { - inv[i] = null; - } - } - } - } - - public int[] buildIntDataList() - { - int[] sortList = new int[3]; //1 * 3 - int pos = 0; - - for (ItemStack is : inv) - { - if (is != null) - { - sortList[pos++] = Item.getIdFromItem(is.getItem()); - sortList[pos++] = is.getItemDamage(); - sortList[pos++] = is.stackSize; - } else - { - sortList[pos++] = 0; - sortList[pos++] = 0; - sortList[pos++] = 0; - } - } - - return sortList; - } - - @Override - public boolean isItemValidForSlot(int slot, ItemStack itemstack) - { - return slot == 0; - } - - public static void initialize() - { - pedestalPositions.add(new PlinthComponent(1, 0, -2, 1)); - pedestalPositions.add(new PlinthComponent(2, 0, 0, 1)); - pedestalPositions.add(new PlinthComponent(1, 0, +2, 1)); - pedestalPositions.add(new PlinthComponent(-1, 0, -2, 1)); - pedestalPositions.add(new PlinthComponent(-2, 0, 0, 1)); - pedestalPositions.add(new PlinthComponent(-1, 0, +2, 1)); - pedestalPositions.add(new PlinthComponent(3, 1, -5, 2)); - pedestalPositions.add(new PlinthComponent(6, 1, 0, 2)); - pedestalPositions.add(new PlinthComponent(3, 1, +5, 2)); - pedestalPositions.add(new PlinthComponent(-3, 1, -5, 2)); - pedestalPositions.add(new PlinthComponent(-6, 1, 0, 2)); - pedestalPositions.add(new PlinthComponent(-3, 1, +5, 2)); - pedestalPositions.add(new PlinthComponent(0, 2, -9, 3)); - pedestalPositions.add(new PlinthComponent(7, 2, -4, 3)); - pedestalPositions.add(new PlinthComponent(7, 2, +4, 3)); - pedestalPositions.add(new PlinthComponent(0, 2, +9, 3)); - pedestalPositions.add(new PlinthComponent(-7, 2, -4, 3)); - pedestalPositions.add(new PlinthComponent(-7, 2, 4, 3)); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java deleted file mode 100644 index fc59f70b..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java +++ /dev/null @@ -1,551 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -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; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.network.NetworkManager; -import net.minecraft.network.Packet; -import net.minecraft.network.play.server.S35PacketUpdateTileEntity; -import net.minecraft.server.gui.IUpdatePlayerListBox; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraftforge.common.util.Constants; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.api.ColourAndCoords; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler; -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.alchemy.energy.TileSegmentedReagentHandler; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityParticleBeam; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -public class TEReagentConduit extends TileSegmentedReagentHandler implements IUpdatePlayerListBox -{ - public List destinationList; //These are offsets - public Map> reagentTargetList; - public Map reagentTankDesignationList; - public int tickRate = 20; //Rate that the reagents are sent - - int hasChanged = 0; - public boolean affectedByRedstone = true; - - public int maxConnextions = 5; - - public int renderCount = 0; - - public TEReagentConduit() - { - this(2, 2000); - } - - public TEReagentConduit(int numberOfTanks, int size) - { - super(numberOfTanks, size); - - destinationList = new LinkedList(); - reagentTargetList = new HashMap>(); - reagentTankDesignationList = new HashMap(); - } - - public Int3 getColour() - { - int[] redMap = new int[this.tanks.length]; - int[] greenMap = new int[this.tanks.length]; - int[] blueMap = new int[this.tanks.length]; - - for (int i = 0; i < this.tanks.length; i++) - { - ReagentContainer container = this.tanks[i]; - if (container != null && container.getReagent() != null) - { - Reagent reagent = container.getReagent().reagent; - - redMap[i] = reagent.getColourRed(); - greenMap[i] = reagent.getColourGreen(); - blueMap[i] = reagent.getColourBlue(); - } - } - - int red = 0; - int green = 0; - int blue = 0; - - for (int i = 0; i < this.tanks.length; i++) - { - red += redMap[i]; - green += greenMap[i]; - blue += blueMap[i]; - } - - red /= this.tanks.length; - green /= this.tanks.length; - blue /= this.tanks.length; - - return new Int3(red, green, blue); - } - - @Override - public void writeToNBT(NBTTagCompound tag) - { - super.writeToNBT(tag); - - tag.setInteger("hasChanged", hasChanged); - - NBTTagList tagList = new NBTTagList(); - - for (int i = 0; i < destinationList.size(); i++) - { - NBTTagCompound savedTag = new NBTTagCompound(); - tagList.appendTag(destinationList.get(i).writeToNBT(savedTag)); - } - - tag.setTag("destinationList", tagList); - - NBTTagList reagentTagList = new NBTTagList(); //TODO - - for (Entry> entry : reagentTargetList.entrySet()) - { - NBTTagCompound savedTag = new NBTTagCompound(); - savedTag.setString("reagent", ReagentRegistry.getKeyForReagent(entry.getKey())); - - NBTTagList coordinateTagList = new NBTTagList(); - - for (Int3 coord : entry.getValue()) - { - NBTTagCompound coordinateTag = new NBTTagCompound(); - - coord.writeToNBT(coordinateTag); - - coordinateTagList.appendTag(coordinateTag); - } - - savedTag.setTag("coordinateList", coordinateTagList); - - reagentTagList.appendTag(savedTag); - } - - tag.setTag("reagentTargetList", reagentTagList); - - NBTTagList tankDesignationList = new NBTTagList(); - - for (Entry entry : this.reagentTankDesignationList.entrySet()) - { - NBTTagCompound savedTag = new NBTTagCompound(); - - savedTag.setString("reagent", ReagentRegistry.getKeyForReagent(entry.getKey())); - savedTag.setInteger("integer", entry.getValue()); - - tankDesignationList.appendTag(savedTag); - } - - tag.setTag("tankDesignationList", tankDesignationList); - - } - - @Override - public void readFromNBT(NBTTagCompound tag) - { - super.readFromNBT(tag); - - hasChanged = tag.getInteger("hasChanged"); - - NBTTagList tagList = tag.getTagList("destinationList", Constants.NBT.TAG_COMPOUND); - - destinationList = new LinkedList(); - - for (int i = 0; i < tagList.tagCount(); i++) - { - NBTTagCompound savedTag = tagList.getCompoundTagAt(i); - - destinationList.add(ColourAndCoords.readFromNBT(savedTag)); - } - - reagentTargetList = new HashMap>(); - - NBTTagList reagentTagList = tag.getTagList("reagentTargetList", Constants.NBT.TAG_COMPOUND); - - for (int i = 0; i < reagentTagList.tagCount(); i++) - { - NBTTagCompound savedTag = reagentTagList.getCompoundTagAt(i); - - Reagent reagent = ReagentRegistry.getReagentForKey(savedTag.getString("reagent")); - - List coordList = new LinkedList(); - - NBTTagList coordinateList = savedTag.getTagList("coordinateList", Constants.NBT.TAG_COMPOUND); - - for (int j = 0; j < coordinateList.tagCount(); j++) - { - coordList.add(Int3.readFromNBT(coordinateList.getCompoundTagAt(j))); - } - - reagentTargetList.put(reagent, coordList); - } - - reagentTankDesignationList = new HashMap(); - - NBTTagList tankDesignationList = tag.getTagList("tankDesignationList", Constants.NBT.TAG_COMPOUND); - - for (int i = 0; i < tankDesignationList.tagCount(); i++) - { - NBTTagCompound savedTag = tankDesignationList.getCompoundTagAt(i); - - this.reagentTankDesignationList.put(ReagentRegistry.getReagentForKey(savedTag.getString("reagent")), savedTag.getInteger("integer")); - } - } - - public void readClientNBT(NBTTagCompound tag) - { - NBTTagList tagList = tag.getTagList("destinationList", Constants.NBT.TAG_COMPOUND); - - destinationList = new LinkedList(); - - for (int i = 0; i < tagList.tagCount(); i++) - { - NBTTagCompound savedTag = tagList.getCompoundTagAt(i); - - destinationList.add(ColourAndCoords.readFromNBT(savedTag)); - } - - NBTTagList reagentTagList = tag.getTagList("reagentTanks", Constants.NBT.TAG_COMPOUND); - - int size = reagentTagList.tagCount(); - this.tanks = new ReagentContainer[size]; - - for (int i = 0; i < size; i++) - { - NBTTagCompound savedTag = reagentTagList.getCompoundTagAt(i); - this.tanks[i] = ReagentContainer.readFromNBT(savedTag); - } - } - - public void writeClientNBT(NBTTagCompound tag) - { - NBTTagList tagList = new NBTTagList(); - - for (int i = 0; i < destinationList.size(); i++) - { - NBTTagCompound savedTag = new NBTTagCompound(); - tagList.appendTag(destinationList.get(i).writeToNBT(savedTag)); - } - - tag.setTag("destinationList", tagList); - - NBTTagList reagentTagList = new NBTTagList(); - - for (int i = 0; i < this.tanks.length; i++) - { - NBTTagCompound savedTag = new NBTTagCompound(); - if (this.tanks[i] != null) - { - this.tanks[i].writeToNBT(savedTag); - } - reagentTagList.appendTag(savedTag); - } - - tag.setTag("reagentTanks", reagentTagList); - } - - @Override - public void update() - { - if (!worldObj.isRemote) - { - if (hasChanged > 1) - { - hasChanged = 1; - } else if (hasChanged == 1) - { - hasChanged = 0; - } - - if (worldObj.getWorldTime() % 100 == 99) - { - this.updateColourList(); - } - - if (affectedByRedstone && worldObj.isBlockPowered(pos)) //isBlockBeingIndirectlyPowered() - { - return; - } - - int totalTransfered = 0; - - for (Entry> entry : this.reagentTargetList.entrySet()) - { - for (Int3 coord : entry.getValue()) - { - if (totalTransfered >= this.tickRate) - { - break; - } - - ReagentStack maxDrainAmount = this.drain(EnumFacing.UP, new ReagentStack(entry.getKey(), this.tickRate - totalTransfered), false); - - if (maxDrainAmount == null) - { - continue; - } - - int amountLeft = maxDrainAmount.amount; - - if (amountLeft <= 0) - { - continue; - } - - BlockPos newPos = pos.add(coord.xCoord, coord.yCoord, coord.zCoord); - - TileEntity tile = worldObj.getTileEntity(newPos); - if (tile instanceof IReagentHandler) - { - int amount = Math.min(((IReagentHandler) tile).fill(EnumFacing.UP, maxDrainAmount, false), amountLeft); - if (amount > 0) - { - totalTransfered += amount; - - ReagentStack stack = this.drain(EnumFacing.UP, new ReagentStack(entry.getKey(), amount), true); - ((IReagentHandler) tile).fill(EnumFacing.UP, stack, true); - } - } - } - } - } else - { - if (affectedByRedstone && worldObj.isBlockPowered(pos)) - { - return; - } - - renderCount++; - - if (worldObj.getWorldTime() % 100 != 0) - { - return; - } - - this.sendPlayerStuffs(); - } - } - - @SideOnly(Side.CLIENT) - public void sendPlayerStuffs() - { - Minecraft mc = Minecraft.getMinecraft(); - EntityPlayer player = mc.thePlayer; - if (SpellHelper.canPlayerSeeAlchemy(player)) - { - for (ColourAndCoords colourSet : this.destinationList) - { - BlockPos newPos = pos.add(colourSet.xCoord, colourSet.yCoord, colourSet.zCoord); - if (!(worldObj.getTileEntity(newPos) instanceof IReagentHandler)) - { - continue; - } - EntityParticleBeam beam = new EntityParticleBeam(worldObj, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5); - double velocity = Math.sqrt(Math.pow(colourSet.xCoord, 2) + Math.pow(colourSet.yCoord, 2) + Math.pow(colourSet.zCoord, 2)); - double wantedVel = 0.3d; - beam.setVelocity(wantedVel * colourSet.xCoord / velocity, wantedVel * colourSet.yCoord / velocity, wantedVel * colourSet.zCoord / velocity); - beam.setColour(colourSet.colourRed / 255f, colourSet.colourGreen / 255f, colourSet.colourBlue / 255f); - beam.setDestination(pos.getX() + colourSet.xCoord, pos.getY() + colourSet.yCoord, pos.getZ() + colourSet.zCoord); - worldObj.spawnEntityInWorld(beam); - } - } - } - - public void updateColourList() - { - if (worldObj.isRemote) - { - return; - } - - List newList = this.compileListForReagentTargets(this.reagentTargetList); - - if (newList != null && !newList.equals(destinationList)) - { - this.destinationList = newList; - worldObj.markBlockForUpdate(pos); - } - } - - public List compileListForReagentTargets(Map> map) - { - List list = new LinkedList(); - - for (Entry> entry : map.entrySet()) - { - if (entry.getValue() != null) - { - Reagent reagent = entry.getKey(); - if (reagent == null) - { - continue; - } - List coords = entry.getValue(); - for (Int3 coord : coords) - { - if (coord == null) - { - continue; - } - list.add(new ColourAndCoords(reagent.getColourRed(), reagent.getColourGreen(), reagent.getColourBlue(), reagent.getColourIntensity(), coord.xCoord, coord.yCoord, coord.zCoord)); - } - } - } - - return list; - } - - 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; - } - - this.destinationList.add(new ColourAndCoords(red, green, blue, intensity, xOffset, yOffset, zOffset)); - - return true; - } - - 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 - pos.getX(), y - pos.getY(), z - pos.getZ()); - } - - @Override - public Packet getDescriptionPacket() - { - NBTTagCompound nbttagcompound = new NBTTagCompound(); - writeClientNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(pos, 90210, nbttagcompound); - } - - @Override - public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) - { - super.onDataPacket(net, packet); - readClientNBT(packet.getNbtCompound()); - } - - public boolean addReagentDestinationViaOffset(Reagent reagent, int xOffset, int yOffset, int zOffset) - { - int totalConnections = 0; - - for (Entry> entry : this.reagentTargetList.entrySet()) - { - if (entry.getValue() != null) - { - totalConnections += entry.getValue().size(); - } - } - - if (totalConnections >= this.maxConnextions) - { - //Send message that it cannot be done? Maybe add a Player instance - return false; - } - - if (xOffset == 0 && yOffset == 0 && zOffset == 0) - { - return false; - } - - Int3 newCoord = new Int3(xOffset, yOffset, zOffset); - - if (this.reagentTargetList.containsKey(reagent)) - { - List coordList = this.reagentTargetList.get(reagent); - if (coordList == null) - { - List newCoordList = new LinkedList(); - newCoordList.add(newCoord); - this.reagentTargetList.put(reagent, newCoordList); - } else - { - coordList.add(newCoord); - } - - return true; - } else - { - List newCoordList = new LinkedList(); - newCoordList.add(newCoord); - this.reagentTargetList.put(reagent, newCoordList); - - return true; - } - } - - public boolean addReagentDestinationViaActual(Reagent reagent, int x, int y, int z) - { - return (this.addReagentDestinationViaOffset(reagent, x - pos.getX(), y - pos.getY(), z - pos.getZ())); - } - - public boolean removeReagentDestinationViaOffset(Reagent reagent, int xOffset, int yOffset, int zOffset) - { - if (this.reagentTargetList.containsKey(reagent)) - { - List coords = this.reagentTargetList.get(reagent); - if (coords != null) - { - Int3 reference = new Int3(xOffset, yOffset, zOffset); - - return coords.remove(reference); - } - } - return false; - } - - public boolean removeReagentDestinationViaActual(Reagent reagent, int x, int y, int z) - { - return this.removeReagentDestinationViaOffset(reagent, x - pos.getX(), y - pos.getY(), z - pos.getZ()); - } - - @Override - public int fill(EnumFacing from, ReagentStack resource, boolean doFill) - { - if (doFill && !worldObj.isRemote) - { - worldObj.markBlockForUpdate(pos); - hasChanged = 2; - } - - return super.fill(from, resource, doFill); - } - - @Override - public ReagentStack drain(EnumFacing from, ReagentStack resource, boolean doDrain) - { - if (doDrain && !worldObj.isRemote) - { - worldObj.markBlockForUpdate(pos); - hasChanged = 2; - } - - return super.drain(from, resource, doDrain); - } - - public void removeReagentDestinationViaActual(Reagent reagent, BlockPos pos) - { - this.removeReagentDestinationViaActual(reagent, pos.getX(), pos.getY(), pos.getZ()); - } - - public boolean addReagentDestinationViaActual(Reagent reagent, BlockPos pos) - { - return addReagentDestinationViaActual(reagent, pos.getX(), pos.getY(), pos.getZ()); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java deleted file mode 100644 index 82cd940e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java +++ /dev/null @@ -1,160 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -import java.io.FileWriter; -import java.io.IOException; -import java.io.Writer; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -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() - { - BuildingSchematic schematic = new BuildingSchematic(); - - int negX = this.getNegXLimit(); - int negY = this.getNegYLimit(); - int negZ = this.getNegZLimit(); - int posX = this.getPosXLimit(); - int posY = this.getPosYLimit(); - int posZ = this.getPosZLimit(); - - for (int i = -negX + 1; i <= posX - 1; i++) - { - for (int j = -negY + 1; j <= posY - 1; j++) - { - for (int k = -negZ + 1; k <= posZ - 1; k++) - { - BlockPos newPos = pos.add(i, j, k); - IBlockState state = worldObj.getBlockState(newPos); - Block block = state.getBlock(); - int meta = block.getMetaFromState(state); - - if (!block.isAir(worldObj, newPos)) - { - schematic.addBlockWithMeta(block, meta, i, j, k); - } - } - } - - AlchemicalWizardry.logger.info("" + i); - } - - AlchemicalWizardry.logger.info("I got here!"); - Gson gson = new GsonBuilder().setPrettyPrinting().create(); - String json = gson.toJson(schematic); - AlchemicalWizardry.logger.info("Here, too!"); - Writer writer; - try - { - writer = new FileWriter("config/BloodMagic/schematics/" + new Random().nextInt() + ".json"); - writer.write(json); - writer.close(); - } catch (IOException e) - { - e.printStackTrace(); - } - } - - public int getPosYLimit() - { - int i = 1; - while (i < 100) - { - if (targetBlock == (worldObj.getBlockState(pos.add(0, i, 0)).getBlock())) - { - return i; - } - - i++; - } - return 1; - } - - public int getNegYLimit() - { - int i = 1; - while (i < 100) - { - if (targetBlock == (worldObj.getBlockState(pos.add(0, -i, 0)).getBlock())) - { - return i; - } - - i++; - } - return 1; - } - - public int getPosXLimit() - { - int i = 1; - while (i < 100) - { - if (targetBlock == (worldObj.getBlockState(pos.add(i, 0, 0)).getBlock())) - { - return i; - } - - i++; - } - return 1; - } - - public int getNegXLimit() - { - int i = 1; - while (i < 100) - { - if (targetBlock == (worldObj.getBlockState(pos.add(-i, 0, 0)).getBlock())) - { - return i; - } - - i++; - } - return 1; - } - - public int getPosZLimit() - { - int i = 1; - while (i < 100) - { - if (targetBlock == (worldObj.getBlockState(pos.add(0, 0, i)).getBlock())) - { - return i; - } - - i++; - } - return 1; - } - - public int getNegZLimit() - { - int i = 1; - while (i < 100) - { - if (targetBlock == (worldObj.getBlockState(pos.add(0, 0, -i)).getBlock())) - { - return i; - } - - i++; - } - return 1; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java deleted file mode 100644 index 2dab8da8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java +++ /dev/null @@ -1,126 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -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; - private int resultDamage; - - private boolean isActive; - - public TESocket() - { - super(sizeInv); - resultID = 0; - resultDamage = 0; - isActive = false; - } - - @Override - public void readFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readFromNBT(par1NBTTagCompound); - - resultID = par1NBTTagCompound.getInteger("resultID"); - resultDamage = par1NBTTagCompound.getInteger("resultDamage"); - isActive = par1NBTTagCompound.getBoolean("isActive"); - } - - @Override - public void writeToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeToNBT(par1NBTTagCompound); - - par1NBTTagCompound.setInteger("resultID", resultID); - par1NBTTagCompound.setInteger("resultDamage", resultDamage); - par1NBTTagCompound.setBoolean("isActive", isActive); - } - - @Override - public String getName() - { - return "TESocket"; - } - - @Override - public int getInventoryStackLimit() - { - return 1; - } - - public void setActive() - { - isActive = false; - } - - public boolean isActive() - { - return isActive; - } - - @Override - public Packet getDescriptionPacket() - { - return NewPacketHandler.getPacket(this); - } - - public void handlePacketData(int[] intData) - { - if (intData == null) - { - return; - } - - 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]); - inv[i] = is; - } else - { - inv[i] = null; - } - } - } - } - - public int[] buildIntDataList() - { - int[] sortList = new int[3]; //1 * 3 - int pos = 0; - - for (ItemStack is : inv) - { - if (is != null) - { - sortList[pos++] = Item.getIdFromItem(is.getItem()); - sortList[pos++] = is.getItemDamage(); - sortList[pos++] = is.stackSize; - } else - { - sortList[pos++] = 0; - sortList[pos++] = 0; - sortList[pos++] = 0; - } - } - - return sortList; - } - - @Override - public boolean isItemValidForSlot(int slot, ItemStack itemstack) - { - return itemstack.getItem() instanceof ArmourUpgrade; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java deleted file mode 100644 index 527369df..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java +++ /dev/null @@ -1,76 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.server.gui.IUpdatePlayerListBox; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.ModBlocks; - -public class TESpectralBlock extends TileEntity implements IUpdatePlayerListBox -{ - private int ticksRemaining; - - public TESpectralBlock() - { - ticksRemaining = 0; - } - - @Override - public void readFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readFromNBT(par1NBTTagCompound); - - ticksRemaining = par1NBTTagCompound.getInteger("ticksRemaining"); - } - - @Override - public void writeToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeToNBT(par1NBTTagCompound); - - par1NBTTagCompound.setInteger("ticksRemaining", ticksRemaining); - } - - @Override - public void update() - { - this.ticksRemaining--; - - if (this.ticksRemaining <= 0) - { - worldObj.setBlockToAir(pos); - } - } - - public static boolean createSpectralBlockAtLocation(World world, BlockPos pos, int duration) - { - if (!world.isAirBlock(pos)) - { - return false; - } - - world.setBlockState(pos, ModBlocks.spectralBlock.getDefaultState()); - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TESpectralBlock) - { - ((TESpectralBlock) tile).setDuration(duration); - return true; - } - - return false; - } - - public void setDuration(int dur) - { - this.ticksRemaining = dur; - } - - public void resetDuration(int dur) - { - if (this.ticksRemaining < dur) - { - this.ticksRemaining = dur; - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralContainer.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralContainer.java deleted file mode 100644 index 5936d83f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralContainer.java +++ /dev/null @@ -1,149 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.server.gui.IUpdatePlayerListBox; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -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 implements IUpdatePlayerListBox -{ - private ItemStack[] inv; - - private int ticksRemaining; - - public TESpectralContainer() - { - this.inv = new ItemStack[1]; - - ticksRemaining = 0; - } - - @Override - public void readFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readFromNBT(par1NBTTagCompound); - NBTTagList tagList = par1NBTTagCompound.getTagList("Inventory", Constants.NBT.TAG_COMPOUND); - - for (int i = 0; i < tagList.tagCount(); i++) - { - NBTTagCompound tag = tagList.getCompoundTagAt(i); - int slot = tag.getByte("Slot"); - - if (slot >= 0 && slot < inv.length) - { - inv[slot] = ItemStack.loadItemStackFromNBT(tag); - } - } - - ticksRemaining = par1NBTTagCompound.getInteger("ticksRemaining"); - } - - @Override - public void writeToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeToNBT(par1NBTTagCompound); - NBTTagList itemList = new NBTTagList(); - - for (int i = 0; i < inv.length; i++) - { - if (inv[i] != null) - { - NBTTagCompound tag = new NBTTagCompound(); - tag.setByte("Slot", (byte) i); - inv[i].writeToNBT(tag); - itemList.appendTag(tag); - } - } - - par1NBTTagCompound.setTag("Inventory", itemList); - par1NBTTagCompound.setInteger("ticksRemaining", ticksRemaining); - } - - @Override - public void update() - { - this.ticksRemaining--; - - if (this.ticksRemaining <= 0) - { - this.returnContainedBlock(); - } - } - - public static boolean createSpectralBlockAtLocation(World world, BlockPos pos, int duration) - { - IBlockState state = world.getBlockState(pos); - Block block = state.getBlock(); - - if (block == null) - { - return false; - } - - if (world.getTileEntity(pos) == null || block instanceof IFluidBlock) - { - int meta = block.getMetaFromState(state); - ItemStack item = new ItemStack(block, 1, meta); - - world.setBlockState(pos, ModBlocks.blockSpectralContainer.getDefaultState()); - TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TESpectralContainer) - { - ((TESpectralContainer) tile).setContainedItem(item); - ((TESpectralContainer) tile).setDuration(duration); - return true; - } - } - - return false; - } - - public void setDuration(int dur) - { - this.ticksRemaining = dur; - } - - public void resetDuration(int dur) - { - if (this.ticksRemaining < dur) - { - this.ticksRemaining = dur; - } - } - - public void setContainedItem(ItemStack item) - { - this.inv[0] = item; - } - - public void returnContainedBlock() - { - ItemStack item = this.inv[0]; - if (item != null) - { - if (item.getItem() instanceof ItemBlock) - { - Block block = ((ItemBlock) item.getItem()).getBlock(); - int meta = item.getItemDamage(); - - if (block != null) - { - this.worldObj.setBlockState(pos, block.getStateFromMeta(meta), 6); - } - } - - } else - { - this.worldObj.setBlockToAir(pos); - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java deleted file mode 100644 index 278c943a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java +++ /dev/null @@ -1,48 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -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); - TileEntity tile = this.getTileAtOutput(); - if (tile instanceof TESpellBlock) - { - TESpellBlock outputBlock = (TESpellBlock) tile; - outputBlock.modifySpellParadigm(parad); - } - } - - protected abstract void applySpellChange(SpellParadigm parad); - - public TESpellBlock getTileAtOutput() - { - EnumFacing output = this.getOutputDirection(); - - TileEntity tile = worldObj.getTileEntity(pos.add(output.getDirectionVec())); - - if (tile instanceof TESpellBlock && ((TESpellBlock) tile).canInputRecieveOutput(output)) - { - return (TESpellBlock) tile; - } - - return null; - } - - public boolean canInputRecieve() - { - return true; - } - - @Override - public boolean canInputRecieveOutput(EnumFacing output) - { - return this.canInputRecieve() && this.getInputDirection().getOpposite() == output; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java deleted file mode 100644 index da988b1a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java +++ /dev/null @@ -1,48 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -import WayofTime.alchemicalWizardry.api.spell.ComplexSpellType; -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()); - } - - public SpellEffect getSpellEffect() - { - int meta = this.getBlockMetadata(); - switch (meta) - { - case 0: - return new SpellEffect(ComplexSpellType.FIRE); - case 1: - return new SpellEffect(ComplexSpellType.ICE); - case 2: - return new SpellEffect(ComplexSpellType.WIND); - case 3: - return new SpellEffect(ComplexSpellType.EARTH); - } - return new SpellEffect(ComplexSpellType.FIRE); - } - - @Override - public String getResourceLocationForMeta(int meta) - { - switch (meta) - { - case 0: - return "alchemicalwizardry:textures/models/SpellEffectFire.png"; - case 1: - return "alchemicalwizardry:textures/models/SpellEffectIce.png"; - case 2: - return "alchemicalwizardry:textures/models/SpellEffectWind.png"; - case 3: - return "alchemicalwizardry:textures/models/SpellEffectEarth.png"; - } - return ""; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java deleted file mode 100644 index 13aaf122..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java +++ /dev/null @@ -1,169 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -import WayofTime.alchemicalWizardry.api.spell.SpellEnhancement; -import WayofTime.alchemicalWizardry.api.spell.SpellEnhancementCost; -import WayofTime.alchemicalWizardry.api.spell.SpellEnhancementPotency; -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; - - switch (this.enhancementType()) - { - case 0: - i = parad.getBufferedEffectPower(); - break; - case 1: - i = parad.getBufferedEffectCost(); - break; - case 2: - i = parad.getBufferedEffectPotency(); - break; - } - - if (i != -1 && i < this.getLimit()) - { - parad.applyEnhancement(getSpellEnhancement()); - } else if (i < this.getLimit()) - { - this.doBadStuff(); - } - } - - public SpellEnhancement getSpellEnhancement() - { - int meta = this.getBlockMetadata(); - switch (meta) - { - case 0: - case 1: - case 2: - case 3: - case 4: - return new SpellEnhancementPower(); - case 5: - case 6: - case 7: - case 8: - case 9: - return new SpellEnhancementCost(); - case 10: - case 11: - case 12: - case 13: - case 14: - return new SpellEnhancementPotency(); - } - return new SpellEnhancementCost(); - } - - public int getLimit() - { - int meta = this.getBlockMetadata(); - switch (meta) - { - case 0: - return 1; - case 1: - return 2; - case 2: - return 3; - case 3: - return 4; - case 4: - return 5; - case 5: - return 1; - case 6: - return 2; - case 7: - return 3; - case 8: - return 4; - case 9: - return 5; - case 10: - return 1; - case 11: - return 2; - case 12: - return 3; - case 13: - return 4; - case 14: - return 5; - } - return 0; - } - - public int enhancementType() //0 is power, 1 is cost, 2 is potency - { - int meta = this.getBlockMetadata(); - switch (meta) - { - case 0: - case 1: - case 2: - case 3: - case 4: - return 0; - case 5: - case 6: - case 7: - case 8: - case 9: - return 1; - case 10: - case 11: - case 12: - case 13: - case 14: - return 2; - } - return 1; - } - - public void doBadStuff() - { - - } - - @Override - public String getResourceLocationForMeta(int meta) - { - switch (meta) - { - case 0: - return "alchemicalwizardry:textures/models/SpellEnhancementPower1.png"; - case 1: - return "alchemicalwizardry:textures/models/SpellEnhancementPower2.png"; - case 2: - return "alchemicalwizardry:textures/models/SpellEnhancementPower3.png"; - case 3: - return "alchemicalwizardry:textures/models/SpellEnhancementPower4.png"; - case 5: - return "alchemicalwizardry:textures/models/SpellEnhancementCost1.png"; - case 6: - return "alchemicalwizardry:textures/models/SpellEnhancementCost2.png"; - case 7: - return "alchemicalwizardry:textures/models/SpellEnhancementCost3.png"; - case 8: - return "alchemicalwizardry:textures/models/SpellEnhancementCost4.png"; - case 10: - return "alchemicalwizardry:textures/models/SpellEnhancementPotency1.png"; - case 11: - return "alchemicalwizardry:textures/models/SpellEnhancementPotency2.png"; - case 12: - return "alchemicalwizardry:textures/models/SpellEnhancementPotency3.png"; - case 13: - return "alchemicalwizardry:textures/models/SpellEnhancementPotency4.png"; - - } - return "alchemicalwizardry:textures/models/SpellEnhancementPower1.png"; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java deleted file mode 100644 index b1a3e1fa..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java +++ /dev/null @@ -1,47 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -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()); - } - - public ComplexSpellModifier getSpellModifier() - { - int meta = this.getBlockMetadata(); - switch (meta) - { - case 0: - return ComplexSpellModifier.DEFAULT; - case 1: - return ComplexSpellModifier.OFFENSIVE; - case 2: - return ComplexSpellModifier.DEFENSIVE; - case 3: - return ComplexSpellModifier.ENVIRONMENTAL; - } - return ComplexSpellModifier.DEFAULT; - } - - @Override - public String getResourceLocationForMeta(int meta) - { - switch (meta) - { - case 0: - return "alchemicalwizardry:textures/models/SpellModifierDefault.png"; - case 1: - return "alchemicalwizardry:textures/models/SpellModifierOffensive.png"; - case 2: - return "alchemicalwizardry:textures/models/SpellModifierDefensive.png"; - case 3: - return "alchemicalwizardry:textures/models/SpellModifierEnvironmental.png"; - } - return "alchemicalwizardry:textures/models/SpellModifierDefault.png"; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java deleted file mode 100644 index c60c5ebc..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java +++ /dev/null @@ -1,75 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -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; - -public class TESpellParadigmBlock extends TESpellBlock implements ISpellParadigmTile -{ - public SpellParadigm getSpellParadigm() - { - int meta = this.getBlockMetadata(); - switch (meta) - { - case 0: - return new SpellParadigmProjectile(); - case 1: - return new SpellParadigmSelf(); - case 2: - return new SpellParadigmMelee(); - case 3: - return new SpellParadigmTool(); - } - return new SpellParadigmSelf(); - } - - @Override - protected void applySpellChange(SpellParadigm parad) {} - - public boolean canInputRecieve() - { - return false; - } - - @Override - public void castSpell(World world, EntityPlayer entity, ItemStack spellCasterStack) - { - SpellParadigm parad = this.getSpellParadigm(); - this.modifySpellParadigm(parad); - parad.applyAllSpellEffects(); - parad.castSpell(world, entity, spellCasterStack); - } - - @Override - public String getResourceLocationForMeta(int meta) - { - switch (meta) - { - case 0: - return "alchemicalwizardry:textures/models/SpellParadigmProjectile.png"; - case 1: - return "alchemicalwizardry:textures/models/SpellParadigmSelf.png"; - case 2: - return "alchemicalwizardry:textures/models/SpellParadigmMelee.png"; - case 3: - return "alchemicalwizardry:textures/models/SpellParadigmTool.png"; - } - return "alchemicalwizardry:textures/models/SpellParadigmProjectile.png"; - } - - @Override - public void setInputDirection(EnumFacing direction) {} - - @Override - public EnumFacing getInputDirection() - { - return EnumFacing.WEST; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellTable.java deleted file mode 100644 index d90314d9..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellTable.java +++ /dev/null @@ -1,126 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntitySkull; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.spell.simple.HomSpell; -import WayofTime.alchemicalWizardry.common.spell.simple.HomSpellRegistry; - -public class TESpellTable extends TileEntity -{ - public boolean canCastSpell() - { - return true; - } - - public int getCostForSpell() - { - HomSpell spell = getSpell(); - - if (spell != null) - { - switch (getModifiedParadigm()) - { - case 0: - return spell.getOffensiveRangedEnergy(); - - case 1: - return spell.getOffensiveMeleeEnergy(); - - case 2: - return spell.getDefensiveEnergy(); - - case 3: - return spell.getEnvironmentalEnergy(); - } - } - - return 0; - } - - public int castSpell(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - HomSpell spell = getSpell(); - - if (spell != null) - { - switch (getModifiedParadigm()) - { - case 0: - spell.onOffensiveRangedRightClick(par1ItemStack, par2World, par3EntityPlayer); - return spell.getOffensiveRangedEnergy(); - - case 1: - spell.onOffensiveMeleeRightClick(par1ItemStack, par2World, par3EntityPlayer); - return spell.getOffensiveMeleeEnergy(); - - case 2: - spell.onDefensiveRightClick(par1ItemStack, par2World, par3EntityPlayer); - return spell.getDefensiveEnergy(); - - case 3: - spell.onEnvironmentalRightClick(par1ItemStack, par2World, par3EntityPlayer); - return spell.getEnvironmentalEnergy(); - } - } - - return 0; - } - - public HomSpell getSpell() - { - for(EnumFacing face : EnumFacing.HORIZONTALS) - { - TileEntity tileEntity = worldObj.getTileEntity(pos.offset(face)); - - if (tileEntity instanceof TEAltar) - { - ItemStack itemStack = ((TEAltar) tileEntity).getStackInSlot(0); - - if (itemStack != null) - { - HomSpell spell = HomSpellRegistry.getSpellForItemStack(itemStack); - - if (spell != null) - { - return spell; - } - } - } - } - - return null; - } - - public int getModifiedParadigm() - { - //TODO change so that it works with a Tile Entity for a custom head or whatnot - - TileEntity tileEntity = worldObj.getTileEntity(pos.offsetUp()); - - if (tileEntity instanceof TileEntitySkull) - { - int skullType = ((TileEntitySkull) tileEntity).getSkullType(); - - switch (skullType) - { - case 0: - return 0; - - case 1: - return 1; - - case 2: - return 2; - - case 4: - return 3; - } - } - - return -1; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java deleted file mode 100644 index 018f3244..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java +++ /dev/null @@ -1,268 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity; - -import java.util.Iterator; -import java.util.List; - -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.Packet; -import net.minecraft.server.gui.IUpdatePlayerListBox; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.NewPacketHandler; -import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; -import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -public class TETeleposer extends TEInventory implements IUpdatePlayerListBox -{ - public static final int sizeInv = 1; - - private int resultID; - private int resultDamage; - private int previousInput; - - private boolean isActive; - - public TETeleposer() - { - super(sizeInv); - resultID = 0; - resultDamage = 0; - isActive = false; - previousInput = 0; - } - - @Override - public void readFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readFromNBT(par1NBTTagCompound); - - resultID = par1NBTTagCompound.getInteger("resultID"); - resultDamage = par1NBTTagCompound.getInteger("resultDamage"); - isActive = par1NBTTagCompound.getBoolean("isActive"); - previousInput = par1NBTTagCompound.getInteger("previousInput"); - } - - @Override - public void writeToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeToNBT(par1NBTTagCompound); - - par1NBTTagCompound.setInteger("resultID", resultID); - par1NBTTagCompound.setInteger("resultDamage", resultDamage); - par1NBTTagCompound.setBoolean("isActive", isActive); - par1NBTTagCompound.setInteger("previousInput", previousInput); - } - - @Override - public String getName() - { - return "TETeleposer"; - } - - @Override - public int getInventoryStackLimit() - { - return 1; - } - - //Logic for the actual block is under here - @Override - public void update() - { - if (worldObj.isRemote) - { - return; - } - - int currentInput = worldObj.getStrongPower(pos); - - if (previousInput == 0 && currentInput != 0) - { - ItemStack focus = this.getStackInSlot(0); - - if (focus != null && focus.getItem() instanceof TelepositionFocus) - { - TelepositionFocus focusItem = (TelepositionFocus) (focus.getItem()); - int xf = focusItem.xCoord(focus); - int yf = focusItem.yCoord(focus); - int zf = focusItem.zCoord(focus); - BlockPos posF = focusItem.getBlockPos(focus); - - World worldF = focusItem.getWorld(focus); - int damage = (int) (0.5f * Math.sqrt(pos.distanceSq(posF))); - int focusLevel = focusItem.getFocusLevel(); - int transportCount = 0; - int entityCount = 0; - - if (worldF != null && worldF.getTileEntity(posF) instanceof TETeleposer && !worldF.getTileEntity(posF).equals(this)) - { - //Prime the teleportation - int d0 = focusLevel - 1; - AxisAlignedBB axisalignedbb1 = new AxisAlignedBB(pos.add(0, 1, 0), pos.add(1, 2, 1)).expand(d0, d0, d0); -// axisalignedbb1.maxY = Math.min((double) this.worldObj.getHeight(), pos.getY() + 2 + d0 + d0); - List list1 = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb1); - Iterator iterator1 = list1.iterator(); - EntityLivingBase entityplayer1; - - while (iterator1.hasNext()) - { - entityplayer1 = (EntityLivingBase) iterator1.next(); - entityCount++; - } - - AxisAlignedBB axisalignedbb2 = new AxisAlignedBB(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(); - EntityLivingBase entityplayer2; - - while (iterator2.hasNext()) - { - entityplayer2 = (EntityLivingBase) iterator2.next(); - entityCount++; - } - - if (SoulNetworkHandler.canSyphonInContainer(focus, damage * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) + damage * entityCount)) - { - for (int k = 0; k <= (focusLevel * 2 - 2); k++) - for (int i = -(focusLevel - 1); i <= (focusLevel - 1); i++) - { - for (int j = -(focusLevel - 1); j <= (focusLevel - 1); j++) - { - { - if (BlockTeleposer.swapBlocks(this, worldObj, worldF, pos.add(i, 1 + k, j), posF.add(i, 1 + k, j))) - { - transportCount++; - } - } - } - } - - if (!worldF.equals(worldObj)) - { - entityCount = 0; - } - - SoulNetworkHandler.syphonFromNetworkWhileInContainer(focus, damage * transportCount + damage * entityCount); - //Teleport - - if (worldF.equals(worldObj)) - { - iterator1 = list1.iterator(); - iterator2 = list2.iterator(); - - while (iterator1.hasNext()) - { - entityplayer1 = (EntityLivingBase) iterator1.next(); - entityplayer1.worldObj = worldF; - entityplayer1.setPositionAndUpdate(entityplayer1.posX - pos.getX() + xf, entityplayer1.posY - pos.getY() + yf, entityplayer1.posZ - pos.getZ() + zf); - } - - while (iterator2.hasNext()) - { - entityplayer2 = (EntityLivingBase) iterator2.next(); - entityplayer2.worldObj = worldF; - entityplayer2.setPositionAndUpdate(entityplayer2.posX + pos.getX() - xf, entityplayer2.posY + pos.getY() - yf, entityplayer2.posZ + pos.getZ() - zf); - } - }else - { - iterator1 = list1.iterator(); - iterator2 = list2.iterator(); - - while (iterator1.hasNext()) - { - entityplayer1 = (EntityLivingBase) iterator1.next(); - SpellHelper.teleportEntityToDim(worldObj, worldF.provider.getDimensionId(), entityplayer1.posX - pos.getX() + xf, entityplayer1.posY - pos.getY() + yf, entityplayer1.posZ - pos.getZ() + zf, entityplayer1); -// entityplayer1.worldObj = worldF; -// entityplayer1.setPositionAndUpdate(entityplayer1.posX - pos.getX() + xf, entityplayer1.posY - pos.getY() + yf, entityplayer1.posZ - pos.getZ() + zf); - } - - while (iterator2.hasNext()) - { - entityplayer2 = (EntityLivingBase) iterator2.next(); - SpellHelper.teleportEntityToDim(worldF, worldObj.provider.getDimensionId(), entityplayer2.posX + pos.getX() - xf, entityplayer2.posY + pos.getY() - yf, entityplayer2.posZ + pos.getZ() - zf, entityplayer2); -// entityplayer2.worldObj = worldF; -// entityplayer2.setPositionAndUpdate(entityplayer2.posX + pos.getX() - xf, entityplayer2.posY + pos.getY() - yf, entityplayer2.posZ + pos.getZ() - zf); - } - } - } - } - } - } - - previousInput = currentInput; - } - - public void setActive() - { - isActive = false; - } - - public boolean isActive() - { - return isActive; - } - - @Override - public Packet getDescriptionPacket() - { - return NewPacketHandler.getPacket(this); - } - - public void handlePacketData(int[] intData) - { - if (intData == null) - { - return; - } - - 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]); - inv[i] = is; - } else - { - inv[i] = null; - } - } - } - } - - public int[] buildIntDataList() - { - int[] sortList = new int[3]; //1 * 3 - int pos = 0; - - for (ItemStack is : inv) - { - if (is != null) - { - sortList[pos++] = Item.getIdFromItem(is.getItem()); - sortList[pos++] = is.getItemDamage(); - sortList[pos++] = is.stackSize; - } else - { - sortList[pos++] = 0; - sortList[pos++] = 0; - sortList[pos++] = 0; - } - } - - return sortList; - } - - @Override - public boolean isItemValidForSlot(int slot, ItemStack itemstack) - { - return itemstack.getItem() instanceof TelepositionFocus; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerAltar.java deleted file mode 100644 index ebb64d8e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerAltar.java +++ /dev/null @@ -1,91 +0,0 @@ -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; - -public class ContainerAltar extends Container -{ - protected TEAltar tileEntity; - - public ContainerAltar(InventoryPlayer inventoryPlayer, TEAltar te) - { - tileEntity = te; - - for (int i = 0; i < 3; i++) - { - for (int j = 0; j < 3; j++) - { - addSlotToContainer(new Slot(tileEntity, j + i * 3, 62 + j * 18, 17 + i * 18)); - } - } - - bindPlayerInventory(inventoryPlayer); - } - - @Override - public boolean canInteractWith(EntityPlayer entityplayer) - { - return tileEntity.isUseableByPlayer(entityplayer); - } - - protected void bindPlayerInventory(InventoryPlayer inventoryPlayer) - { - for (int i = 0; i < 3; i++) - { - for (int j = 0; j < 9; j++) - { - addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9, - 8 + j * 18, 84 + i * 18)); - } - } - - for (int i = 0; i < 9; i++) - { - addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 142)); - } - } - - @Override - public ItemStack transferStackInSlot(EntityPlayer player, int slot) - { - ItemStack stack = null; - Slot slotObject = (Slot) inventorySlots.get(slot); - if (slotObject != null && slotObject.getHasStack()) - { - ItemStack stackInSlot = slotObject.getStack(); - stack = stackInSlot.copy(); - if (slot < 9) - { - if (!this.mergeItemStack(stackInSlot, 0, 35, true)) - { - return null; - } - } - else if (!this.mergeItemStack(stackInSlot, 0, 9, false)) - { - return null; - } - - if (stackInSlot.stackSize == 0) - { - slotObject.putStack(null); - } else - { - slotObject.onSlotChanged(); - } - - if (stackInSlot.stackSize == stack.stackSize) - { - return null; - } - - slotObject.onPickupFromSlot(player, stackInSlot); - } - - return stack; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerTeleposer.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerTeleposer.java deleted file mode 100644 index aa677304..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerTeleposer.java +++ /dev/null @@ -1,104 +0,0 @@ -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; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class ContainerTeleposer extends Container -{ - protected TETeleposer tileEntity; - - public ContainerTeleposer(InventoryPlayer inventoryPlayer, TETeleposer te) - { - tileEntity = te; - addSlotToContainer(new SlotTeleposer(te, 0, 80, 15)); - bindPlayerInventory(inventoryPlayer); - } - - @Override - public boolean canInteractWith(EntityPlayer player) - { - return tileEntity.isUseableByPlayer(player); - } - - protected void bindPlayerInventory(InventoryPlayer inventoryPlayer) - { - for (int i = 0; i < 3; i++) - { - for (int j = 0; j < 9; j++) - { - addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9, 8 + j * 18, 39 + i * 18)); - } - } - - for (int i = 0; i < 9; i++) - { - addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 97)); - } - } - - @Override - public ItemStack transferStackInSlot(EntityPlayer player, int slot) - { - ItemStack stack = null; - Slot slotObject = (Slot) inventorySlots.get(slot); - int slots = inventorySlots.size(); - - if (slotObject != null && slotObject.getHasStack()) - { - ItemStack stackInSlot = slotObject.getStack(); - stack = stackInSlot.copy(); - - if (stack.getItem() instanceof TelepositionFocus) - { - if (slot <= slots) - { - if (!this.mergeItemStack(stackInSlot, 0, slots, false)) - { - return null; - } - } - else if (!this.mergeItemStack(stackInSlot, slots, 36 + slots, false)) - { - return null; - } - } - - if (stackInSlot.stackSize == 0) - { - slotObject.putStack(null); - } else - { - slotObject.onSlotChanged(); - } - - if (stackInSlot.stackSize == stack.stackSize) - { - return null; - } - - slotObject.onPickupFromSlot(player, stackInSlot); - } - - return stack; - } - - private class SlotTeleposer extends Slot - { - public SlotTeleposer(IInventory inventory, int slotIndex, int x, int y) - { - super(inventory, slotIndex, x, y); - } - - @Override - public boolean isItemValid(ItemStack itemStack) - { - return itemStack.getItem() instanceof TelepositionFocus; - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java deleted file mode 100644 index 23bc01cc..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java +++ /dev/null @@ -1,94 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity.container; - -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; -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; - -public class ContainerWritingTable extends Container -{ - protected TEChemistrySet tileEntity; - - public ContainerWritingTable(InventoryPlayer inventoryPlayer, TEChemistrySet te) - { - tileEntity = te; - addSlotToContainer(new Slot(tileEntity, 0, 152, 110)); - addSlotToContainer(new Slot(tileEntity, 1, 80, 18)); - addSlotToContainer(new Slot(tileEntity, 2, 33, 52)); - addSlotToContainer(new Slot(tileEntity, 3, 51, 110)); - addSlotToContainer(new Slot(tileEntity, 4, 109, 110)); - addSlotToContainer(new Slot(tileEntity, 5, 127, 52)); - addSlotToContainer(new Slot(tileEntity, 6, 80, 67)); - bindPlayerInventory(inventoryPlayer); - } - - @Override - public boolean canInteractWith(EntityPlayer player) - { - return tileEntity.isUseableByPlayer(player); - } - - protected void bindPlayerInventory(InventoryPlayer inventoryPlayer) - { - for (int i = 0; i < 3; i++) - { - for (int j = 0; j < 9; j++) - { - addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9, 8 + j * 18, 140 + i * 18)); - } - } - - for (int i = 0; i < 9; i++) - { - addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 198)); - } - } - - @Override - public ItemStack transferStackInSlot(EntityPlayer player, int slot) - { - ItemStack stack = null; - Slot slotObject = (Slot) inventorySlots.get(slot); - if (slotObject != null && slotObject.getHasStack()) - { - ItemStack stackInSlot = slotObject.getStack(); - stack = stackInSlot.copy(); - if (slot <= 6) - { - if (!this.mergeItemStack(stackInSlot, 7, 43, true)) - { - return null; - } - } else if (stack.getItem() instanceof IBloodOrb) - { - if (!this.mergeItemStack(stackInSlot, 0, 1, false)) - { - return null; - } - } else if (!this.mergeItemStack(stackInSlot, 1, 6, false)) - { - return null; - } - - if (stackInSlot.stackSize == 0) - { - slotObject.putStack(null); - } else - { - slotObject.onSlotChanged(); - } - - if (stackInSlot.stackSize == stack.stackSize) - { - return null; - } - - slotObject.onPickupFromSlot(player, stackInSlot); - } - - return stack; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiChemistrySet.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiChemistrySet.java deleted file mode 100644 index e1a05602..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiChemistrySet.java +++ /dev/null @@ -1,43 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity.gui; - -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.TEChemistrySet; -import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable; - -public class GuiChemistrySet extends GuiContainer -{ - public GuiChemistrySet(InventoryPlayer inventoryPlayer, TEChemistrySet tileEntity) - { - super(new ContainerWritingTable(inventoryPlayer, tileEntity)); - xSize = 176; - ySize = 222; - } - - @Override - protected void drawGuiContainerForegroundLayer(int param1, int param2) - { - //draw text and stuff here - //the parameters for drawString are: string, x, y, color - fontRendererObj.drawString("Alchemic Chemistry Set", 8, 6, 4210752); - //draws "Inventory" or your regional equivalent - fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, 130, 4210752); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) - { - //draw your Gui here, only thing you need to change is the path - ResourceLocation test = new ResourceLocation("alchemicalwizardry", "gui/WritingTable.png"); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.mc.getTextureManager().bindTexture(test); - int x = (width - xSize) / 2; - int y = (height - ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java deleted file mode 100644 index 8245881e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java +++ /dev/null @@ -1,88 +0,0 @@ -package WayofTime.alchemicalWizardry.common.tileEntity.gui; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.common.network.IGuiHandler; -import WayofTime.alchemicalWizardry.common.items.sigil.holding.ContainerHolding; -import WayofTime.alchemicalWizardry.common.items.sigil.holding.GuiHolding; -import WayofTime.alchemicalWizardry.common.items.sigil.holding.InventoryHolding; -import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; -import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerTeleposer; -import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable; - -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) - { - TileEntity tileEntity; - BlockPos pos = new BlockPos(x, y, z); - - switch (id) - { - case 0: - tileEntity = world.getTileEntity(pos); - - if (tileEntity instanceof TEChemistrySet) - { - return new ContainerWritingTable(player.inventory, (TEChemistrySet) tileEntity); - } - - case 1: - tileEntity = world.getTileEntity(pos); - - if (tileEntity instanceof TETeleposer) - { - return new ContainerTeleposer(player.inventory, (TETeleposer) tileEntity); - } - - case 3: - return new ContainerHolding(player, new InventoryHolding(player.getHeldItem())); - } - - return null; - } - - //returns an instance of the Gui you made earlier - @Override - public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) - { - TileEntity tileEntity; - BlockPos pos = new BlockPos(x, y, z); - - switch (id) - { - case 0: - tileEntity = world.getTileEntity(pos); - - if (tileEntity instanceof TEChemistrySet) - { - return new GuiChemistrySet(player.inventory, (TEChemistrySet) tileEntity); - } - - break; - - case 1: - tileEntity = world.getTileEntity(pos); - - if (tileEntity instanceof TETeleposer) - { - return new GuiTeleposer(player.inventory, (TETeleposer) tileEntity); - } - - break; - - case 2: - - - case 3: - return new GuiHolding(player, new InventoryHolding(player.getHeldItem())); - } - - return null; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java deleted file mode 100644 index 050849d6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java +++ /dev/null @@ -1,40 +0,0 @@ -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; - -public class GuiTeleposer extends GuiContainer -{ - public GuiTeleposer(InventoryPlayer inventoryPlayer, TETeleposer tileEntity) - { - super(new ContainerTeleposer(inventoryPlayer, tileEntity)); - xSize = 176; - ySize = 121; - } - - @Override - protected void drawGuiContainerForegroundLayer(int param1, int param2) - { - //the parameters for drawString are: string, x, y, color - fontRendererObj.drawString("Teleposer", 64, 5, 4210752); - //draws "Inventory" or your regional equivalent - fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, 29, 4210752); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) - { - //draw your Gui here, only thing you need to change is the path - ResourceLocation test = new ResourceLocation("alchemicalwizardry", "gui/Teleposer.png"); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.mc.getTextureManager().bindTexture(test); - int x = (width - xSize) / 2; - int y = (height - ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize); - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java deleted file mode 100644 index 1cf2a2a3..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java +++ /dev/null @@ -1,126 +0,0 @@ -//package WayofTime.alchemicalWizardry.common.tweaker; -// -//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; -//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStacks; -//import net.minecraft.item.ItemStack; -//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))); -// } -// -// private static class Add implements IUndoableAction -// { -// private final AlchemyRecipe recipe; -// -// public Add(AlchemyRecipe recipe) -// { -// this.recipe = recipe; -// } -// -// @Override -// public void apply() -// { -// AlchemyRecipeRegistry.recipes.add(recipe); -// } -// -// @Override -// public boolean canUndo() -// { -// return AlchemyRecipeRegistry.recipes != null; -// } -// -// @Override -// public void undo() -// { -// AlchemyRecipeRegistry.recipes.remove(recipe); -// } -// -// @Override -// public String describe() -// { -// return "Adding Alchemy Recipe for " + ((AlchemyRecipe) recipe).getResult().getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Removing Alchemy Recipe for " + ((AlchemyRecipe) recipe).getResult().getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -// -// @ZenMethod -// public static void removeRecipe(IItemStack output) { -// MineTweakerAPI.apply(new Remove(toStack(output))); -// } -// -// private static class Remove implements IUndoableAction -// { -// private final ItemStack output; -// private AlchemyRecipe recipe; -// -// public Remove(ItemStack output) -// { -// this.output = output; -// } -// -// @Override -// public void apply() -// { -// for (AlchemyRecipe r : AlchemyRecipeRegistry.recipes) -// { -// if (r.getResult() != null && r.getResult().isItemEqual(output)) -// { -// recipe = r; -// break; -// } -// } -// -// AlchemyRecipeRegistry.recipes.remove(recipe); -// } -// -// @Override -// public boolean canUndo() -// { -// return AlchemyRecipeRegistry.recipes != null && recipe != null; -// } -// -// @Override -// public void undo() -// { -// AlchemyRecipeRegistry.recipes.add(recipe); -// } -// -// @Override -// public String describe() -// { -// return "Removing Alchemy Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Restoring Alchemy Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java deleted file mode 100644 index 01384dc6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java +++ /dev/null @@ -1,130 +0,0 @@ -//package WayofTime.alchemicalWizardry.common.tweaker; -// -//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; -//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) -// { -// this.recipe = recipe; -// } -// -// @Override -// public void apply() -// { -// BindingRegistry.bindingRecipes.add(recipe); -// } -// -// @Override -// public boolean canUndo() -// { -// return BindingRegistry.bindingRecipes != null; -// } -// -// @Override -// public void undo() -// { -// BindingRegistry.bindingRecipes.remove(recipe); -// } -// -// @Override -// public String describe() -// { -// return "Adding Binding Recipe for " + ((BindingRecipe) recipe).getResult().getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Removing Binding Recipe for " + ((BindingRecipe) recipe).getResult().getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -// -// @ZenMethod -// public static void removeRecipe(IItemStack output) { -// MineTweakerAPI.apply(new Remove(toStack(output))); -// } -// -// private static class Remove implements IUndoableAction -// { -// private final ItemStack output; -// private BindingRecipe recipe; -// -// public Remove(ItemStack output) -// { -// this.output = output; -// } -// -// @Override -// public void apply() -// { -// for (BindingRecipe r : BindingRegistry.bindingRecipes) -// { -// if (r.getResult() != null && r.getResult().isItemEqual(output)) -// { -// recipe = r; -// break; -// } -// } -// -// BindingRegistry.bindingRecipes.remove(recipe); -// } -// -// @Override -// public boolean canUndo() -// { -// return BindingRegistry.bindingRecipes != null && recipe != null; -// } -// -// @Override -// public void undo() -// { -// BindingRegistry.bindingRecipes.add(recipe); -// } -// -// @Override -// public String describe() -// { -// return "Removing Binding Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Restoring Binding Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java deleted file mode 100644 index 9ca40713..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java +++ /dev/null @@ -1,133 +0,0 @@ -//package WayofTime.alchemicalWizardry.common.tweaker; -// -//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; -//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) { -// 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))); -// } -// -// private static class Add implements IUndoableAction -// { -// private final AltarRecipe recipe; -// -// public Add(AltarRecipe recipe) -// { -// this.recipe = recipe; -// } -// -// @Override -// public void apply() -// { -// AltarRecipeRegistry.altarRecipes.add(recipe); -// } -// -// @Override -// public boolean canUndo() -// { -// return AltarRecipeRegistry.altarRecipes != null; -// } -// -// @Override -// public void undo() -// { -// AltarRecipeRegistry.altarRecipes.remove(recipe); -// } -// -// @Override -// public String describe() -// { -// return "Adding Blood Altar Recipe for " + ((AltarRecipe) recipe).getResult().getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Removing Blood Altar Recipe for " + ((AltarRecipe) recipe).getResult().getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -// -// @ZenMethod -// public static void removeRecipe(IItemStack output) { -// MineTweakerAPI.apply(new Remove(toStack(output))); -// } -// -// private static class Remove implements IUndoableAction -// { -// private final ItemStack output; -// private AltarRecipe recipe; -// -// public Remove(ItemStack output) -// { -// this.output = output; -// } -// -// @Override -// public void apply() -// { -// for (AltarRecipe r : AltarRecipeRegistry.altarRecipes) -// { -// if (r.getResult() != null && r.getResult().isItemEqual(output)) -// { -// recipe = r; -// break; -// } -// } -// -// AltarRecipeRegistry.altarRecipes.remove(recipe); -// } -// -// @Override -// public boolean canUndo() -// { -// return AltarRecipeRegistry.altarRecipes != null && recipe != null; -// } -// -// @Override -// public void undo() -// { -// AltarRecipeRegistry.altarRecipes.add(recipe); -// } -// -// @Override -// public String describe() -// { -// return "Removing Blood Altar Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Restoring Blood Altar Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java deleted file mode 100644 index b3af37db..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java +++ /dev/null @@ -1,147 +0,0 @@ -//package WayofTime.alchemicalWizardry.common.tweaker; -// -//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 java.util.List; -// -//import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; -//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; -// -///** -// * MineTweaker3 Blood Orb Recipe Handler by joshie * -// */ -//@ZenClass("mods.bloodmagic.BloodOrb") -//public class BloodOrb -//{ -// @ZenMethod -// public static void addShaped(IItemStack output, IIngredient[][] ingredients) -// { -// MineTweakerAPI.apply(new Add(false, toStack(output), toShapedObjects(ingredients))); -// } -// -// @ZenMethod -// public static void addShapeless(IItemStack output, IIngredient[] ingredients) -// { -// MineTweakerAPI.apply(new Add(true, toStack(output), toObjects(ingredients))); -// } -// -// private static class Add implements IUndoableAction { -// private IRecipe iRecipe; -// private final boolean isShapeless; -// private final ItemStack output; -// private final Object[] recipe; -// -// public Add(boolean isShapeless, ItemStack output, Object... recipe) -// { -// this.isShapeless = isShapeless; -// this.output = output; -// this.recipe = recipe; -// } -// -// @Override -// public void apply() -// { -// if (isShapeless) iRecipe = new ShapelessBloodOrbRecipe(output, recipe); -// else iRecipe = new ShapedBloodOrbRecipe(output, recipe); -// CraftingManager.getInstance().getRecipeList().add(iRecipe); -// } -// -// @Override -// public boolean canUndo() -// { -// return CraftingManager.getInstance().getRecipeList() != null; -// } -// -// @Override -// public void undo() -// { -// CraftingManager.getInstance().getRecipeList().remove(iRecipe); -// } -// -// @Override -// public String describe() { -// return "Adding Blood Orb Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Removing Blood Orb Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -// -// @ZenMethod -// public static void removeRecipe(IItemStack output) { -// MineTweakerAPI.apply(new Remove(toStack(output))); -// } -// -// private static class Remove implements IUndoableAction { -// private final ItemStack output; -// private IRecipe iRecipe; -// -// public Remove(ItemStack output) -// { -// this.output = output; -// } -// -// @Override -// public void apply() -// { -// for (IRecipe r : (List) CraftingManager.getInstance().getRecipeList()) -// { -// if((r instanceof ShapedBloodOrbRecipe || r instanceof ShapelessBloodOrbRecipe) && r.getRecipeOutput() != null && r.getRecipeOutput().isItemEqual(output)) { -// iRecipe = r; -// break; -// } -// } -// -// CraftingManager.getInstance().getRecipeList().remove(iRecipe); -// } -// -// @Override -// public boolean canUndo() -// { -// return CraftingManager.getInstance().getRecipeList() != null && iRecipe != null; -// } -// -// @Override -// public void undo() -// { -// CraftingManager.getInstance().getRecipeList().add(iRecipe); -// } -// -// @Override -// public String describe() { -// return "Removing Blood Orb Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Restoring Blood Orb Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java deleted file mode 100644 index 68a52b6a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java +++ /dev/null @@ -1,139 +0,0 @@ -//package WayofTime.alchemicalWizardry.common.tweaker; -// -//import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm; -//import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; -//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 java.util.Iterator; -// -//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; -// -///** -// * 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, components)); -// } -// -// @ZenMethod -// public static void addFocus(IItemStack stack, int radius, String components) -// { -// MineTweakerAPI.apply(new Add(toStack(stack),radius, components.split("\\s*,\\s*"))); -// } -// -// @ZenMethod -// public static void removeFocus(IItemStack output) { -// MineTweakerAPI.apply(new Remove(toStack(output))); -// } -// -// private static class Add implements IUndoableAction -// { -// private MeteorParadigm paradigm; -// -// public Add(ItemStack stack, int radius, String[] components) -// { -// paradigm = new MeteorParadigm(stack,radius); -// paradigm.parseStringArray(components); -// } -// -// @Override -// public void apply() -// { -// MeteorRegistry.registerMeteorParadigm(paradigm); -// } -// -// @Override -// public boolean canUndo() -// { -// return MeteorRegistry.paradigmList!= null; -// } -// -// @Override -// public void undo() -// { -// MeteorRegistry.paradigmList.remove(paradigm); -// } -// -// @Override -// public String describe() { -// return "Adding Falling Tower Focus for " + paradigm.focusStack.getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Removing Falling Tower Focus for " + paradigm.focusStack.getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -// -// private static class Remove implements IUndoableAction { -// private final ItemStack focus; -// private MeteorParadigm paradigm; -// -// public Remove(ItemStack focus) -// { -// this.focus = focus; -// } -// -// @Override -// public void apply() -// { -// for (Iterator itr = MeteorRegistry.paradigmList.iterator(); itr.hasNext();) -// { -// MeteorParadigm paradigm = itr.next(); -// if (OreDictionary.itemMatches(paradigm.focusStack,focus,false)) -// { -// this.paradigm = paradigm; -// itr.remove(); -// break; -// } -// } -// } -// -// @Override -// public boolean canUndo() -// { -// return MeteorRegistry.paradigmList!= null && paradigm != null; -// } -// -// @Override -// public void undo() -// { -// MeteorRegistry.paradigmList.add(paradigm); -// } -// -// @Override -// public String describe() { -// return "Removing Falling Tower Focus for " + focus.getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Restoring Falling Tower Focus for " + focus.getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java deleted file mode 100644 index 222f8acf..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java +++ /dev/null @@ -1,90 +0,0 @@ -//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; -// -///** -// * MineTweaker3 Harvest Moon Handler by hilburn * -// */ -//@ZenClass("mods.bloodmagic.HarvestMoon") -//public class HarvestMoon -//{ -// -// @ZenMethod -// public static void addHarvestable(IItemStack block, IItemStack seed) -// { -// addHarvestable(block,block.getDamage(),seed); -// } -// -// @ZenMethod -// 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 || seedStack==null || !(seedStack.getItem() instanceof IPlantable))) -// { -// MineTweakerAPI.apply(new Add(plantBlock, meta, seedStack)); -// } -// else -// { -// throw new IllegalArgumentException("Invalid Harvest Block or Seed"); -// } -// } -// -// private static class Add implements IUndoableAction -// { -// private IHarvestHandler handler; -// private String name; -// -// public Add(Block block, int meta, ItemStack seed) -// { -// handler = new GenericItemStackHarvestHandler(block,meta,seed); -// name = seed.getDisplayName(); -// } -// -// @Override -// public void apply() -// { -// HarvestRegistry.registerHarvestHandler(handler); -// } -// -// @Override -// public boolean canUndo() -// { -// return HarvestRegistry.handlerList!=null; -// } -// -// @Override -// public void undo() -// { -// HarvestRegistry.handlerList.remove(handler); -// } -// -// @Override -// public String describe() { -// return "Adding Harvest Moon Support for " + name; -// } -// -// @Override -// public String describeUndo() -// { -// return "Removing Harvest Moon Support for " + name; -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java deleted file mode 100644 index d16df05e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java +++ /dev/null @@ -1,82 +0,0 @@ -//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); -// } -// -// public static ItemStack[] toStacks(IItemStack[] iStack) { -// if (iStack == null) return null; -// else { -// ItemStack[] output = new ItemStack[iStack.length]; -// for (int i = 0; i < iStack.length; i++) { -// output[i] = toStack(iStack[i]); -// } -// -// return output; -// } -// } -// -// public static Object toObject(IIngredient iStack) { -// if (iStack == null) return null; -// else { -// if (iStack instanceof IOreDictEntry) { -// return toString((IOreDictEntry) iStack); -// } else if (iStack instanceof IItemStack) { -// return getItemStack((IItemStack) iStack); -// } else return null; -// } -// } -// -// public static Object[] toObjects(IIngredient[] ingredient) { -// if (ingredient == null) return null; -// else { -// Object[] output = new Object[ingredient.length]; -// for (int i = 0; i < ingredient.length; i++) { -// if (ingredient[i] != null) { -// output[i] = toObject(ingredient[i]); -// } else output[i] = ""; -// } -// -// return output; -// } -// } -// -// public static Object[] toShapedObjects(IIngredient[][] ingredients) { -// if (ingredients == null) return null; -// else { -// ArrayList prep = new ArrayList(); -// prep.add("abc"); -// prep.add("def"); -// prep.add("ghi"); -// 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++) { -// if (ingredients[x][y] != null && x < map.length && y < map[x].length) { -// prep.add(map[x][y]); -// prep.add(toObject(ingredients[x][y])); -// } -// } -// } -// } -// return prep.toArray(); -// } -// } -// -// public static String toString(IOreDictEntry entry) { -// return ((IOreDictEntry) entry).getName(); -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MineTweakerIntegration.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MineTweakerIntegration.java deleted file mode 100644 index ae6d45ab..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MineTweakerIntegration.java +++ /dev/null @@ -1,19 +0,0 @@ -//package WayofTime.alchemicalWizardry.common.tweaker; -// -//import minetweaker.MineTweakerAPI; -// -///** -// * MineTweaker3 Integration by joshie * -// */ -//public class MineTweakerIntegration -//{ -// public static void register() -// { -// MineTweakerAPI.registerClass(Alchemy.class); -// MineTweakerAPI.registerClass(Binding.class); -// MineTweakerAPI.registerClass(BloodAltar.class); -// MineTweakerAPI.registerClass(BloodOrb.class); -// MineTweakerAPI.registerClass(FallingTower.class); -// MineTweakerAPI.registerClass(HarvestMoon.class); -// } -//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/item/ItemBindable.java b/src/main/java/WayofTime/alchemicalWizardry/item/ItemBindable.java new file mode 100644 index 00000000..28ea8c76 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/item/ItemBindable.java @@ -0,0 +1,131 @@ +package WayofTime.alchemicalWizardry.item; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.AlchemicalWizardryAPI; +import WayofTime.alchemicalWizardry.api.NBTHolder; +import WayofTime.alchemicalWizardry.api.iface.IBindable; +import WayofTime.alchemicalWizardry.api.util.helper.BindableHelper; +import WayofTime.alchemicalWizardry.api.util.helper.TextHelper; +import com.google.common.base.Strings; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumParticleTypes; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +import java.util.List; + +public class ItemBindable extends Item implements IBindable { + + private int energyUsed; + + public ItemBindable() { + super(); + + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + setMaxStackSize(1); + } + + @Override + @SideOnly(Side.CLIENT) + @SuppressWarnings("unchecked") + public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) { + NBTHolder.checkNBT(stack); + + if (!Strings.isNullOrEmpty(stack.getTagCompound().getString(NBTHolder.NBT_OWNER))) + tooltip.add(TextHelper.getFormattedText(String.format(StatCollector.translateToLocal("tooltip.AlchemicalWizardry.currentOwner"), stack.getTagCompound().getString(NBTHolder.NBT_OWNER)))); + } + + @Override + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { + BindableHelper.checkAndSetItemOwner(stack, player); + + return stack; + } + + public static boolean syphonBatteries(ItemStack ist, EntityPlayer player, int damageToBeDone) { + if (!player.worldObj.isRemote) { +// return SoulNetworkHandler.syphonAndDamageFromNetwork(ist, player, damageToBeDone); + } else { + double posX = player.posX; + double posY = player.posY; + double posZ = player.posZ; + +// SpellHelper.sendIndexedParticleToAllAround(player.worldObj, posX, posY, posZ, 20, player.worldObj.provider.getDimensionId(), 4, posX, posY, posZ); + player.worldObj.playSoundEffect((double) ((float) player.posX + 0.5F), (double) ((float) player.posY + 0.5F), (double) ((float) player.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (player.worldObj.rand.nextFloat() - player.worldObj.rand.nextFloat()) * 0.8F); + } + return true; + } + + public static void hurtPlayer(EntityPlayer user, int energySyphoned) { + if (energySyphoned < 100 && energySyphoned > 0) { + if (!user.capabilities.isCreativeMode) { + user.attackEntityFrom(AlchemicalWizardryAPI.getDamageSource(), 0F); // Emulate an attack + user.setHealth(user.getHealth() - 1); + + if (user.getHealth() <= 0.0005f) + user.onDeath(AlchemicalWizardryAPI.getDamageSource()); + } + } else if (energySyphoned >= 100) { + if (!user.capabilities.isCreativeMode) { + for (int i = 0; i < ((energySyphoned + 99) / 100); i++) { + user.attackEntityFrom(AlchemicalWizardryAPI.getDamageSource(), 0F); // Emulate an attack + user.setHealth(user.getHealth() - 1); + + if (user.getHealth() <= 0.0005f) { + user.onDeath(AlchemicalWizardryAPI.getDamageSource()); + break; + } + } + } + } + } + + protected void damagePlayer(World world, EntityPlayer player, int damage) { + if (world != null) { + double posX = player.posX; + double posY = player.posY; + double posZ = player.posZ; + world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); + float f = 1.0F; + float f1 = f * 0.6F + 0.4F; + float f2 = f * f * 0.7F - 0.5F; + float f3 = f * f * 0.6F - 0.7F; + for (int l = 0; l < 8; ++l) + world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); + } + for (int i = 0; i < damage; i++) { + player.attackEntityFrom(AlchemicalWizardryAPI.getDamageSource(), 0F); // Emulate an attack + player.setHealth(player.getHealth() - 1); + + if (player.getHealth() <= 0.0005) { + player.inventory.dropAllItems(); + break; + } + } + } + + public int getEnergyUsed() { + return this.energyUsed; + } + + protected void setEnergyUsed(int energyUsed) { + this.energyUsed = energyUsed; + } + + public String getBindableOwner(ItemStack stack) { + stack = NBTHolder.checkNBT(stack); + + return stack.getTagCompound().getString(NBTHolder.NBT_OWNER); + } + + // IBindable + + @Override + public boolean onBind(EntityPlayer player, ItemStack stack) { + return true; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/item/ItemBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/item/ItemBloodOrb.java new file mode 100644 index 00000000..afa46073 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/item/ItemBloodOrb.java @@ -0,0 +1,118 @@ +package WayofTime.alchemicalWizardry.item; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.NBTHolder; +import WayofTime.alchemicalWizardry.api.iface.IBindable; +import WayofTime.alchemicalWizardry.api.orb.BloodOrb; +import WayofTime.alchemicalWizardry.api.orb.IBloodOrb; +import WayofTime.alchemicalWizardry.api.registry.OrbRegistry; +import WayofTime.alchemicalWizardry.api.util.helper.NetworkHelper; +import WayofTime.alchemicalWizardry.api.util.helper.PlayerHelper; +import com.google.common.base.Strings; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +import java.util.List; + +public class ItemBloodOrb extends ItemBindable implements IBloodOrb, IBindable { + + public ItemBloodOrb() { + setUnlocalizedName(AlchemicalWizardry.MODID + ".orb."); + setHasSubtypes(true); + } + + @Override + public String getUnlocalizedName(ItemStack stack) { + return super.getUnlocalizedName(stack) + OrbRegistry.getOrb(stack.getItemDamage()).getName(); + } + + @Override + @SideOnly(Side.CLIENT) + @SuppressWarnings("unchecked") + public void getSubItems(Item id, CreativeTabs creativeTab, List list) { + for (int i = 0; i < OrbRegistry.getSize(); i++) + list.add(new ItemStack(id, 1, i)); + } + + @Override + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { + super.onItemRightClick(stack, world, player); + + if (world == null) + return stack; + + double posX = player.posX; + double posY = player.posY; + double posZ = player.posZ; + world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); +// SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.getDimensionId(), 4, posX, posY, posZ); + + if(PlayerHelper.isFakePlayer(player)) + return stack; + + if (Strings.isNullOrEmpty(stack.getTagCompound().getString(NBTHolder.NBT_OWNER))) + return stack; + + if (world.isRemote) + return stack; + + if(stack.getTagCompound().getString(NBTHolder.NBT_OWNER).equals(PlayerHelper.getUsernameFromPlayer(player))) + NetworkHelper.setMaxOrbToMax(stack.getTagCompound().getString(NBTHolder.NBT_OWNER), getOrbLevel(stack.getItemDamage())); + + NetworkHelper.addCurrentEssenceToMaximum(stack.getTagCompound().getString(NBTHolder.NBT_OWNER), 200, getMaxEssence(stack.getItemDamage())); + hurtPlayer(player, 200); + return stack; + } + + @Override + @SideOnly(Side.CLIENT) + @SuppressWarnings("unchecked") + public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) { + tooltip.add(StatCollector.translateToLocal("tooltip.AlchemicalWizardry.orb.desc")); + + if (advanced) + tooltip.add(String.format(StatCollector.translateToLocal("tooltip.AlchemicalWizardry.orb.owner"), getOrb(stack.getItemDamage()).getOwner())); + + super.addInformation(stack, player, tooltip, advanced); + } + + @Override + public ItemStack getContainerItem(ItemStack stack) { + return stack; + } + + @Override + public boolean hasContainerItem(ItemStack stack) { + return true; + } + + // IBindable + + @Override + public boolean onBind(EntityPlayer player, ItemStack stack) { + return true; + } + + // IBloodOrb + + @Override + public BloodOrb getOrb(int meta) { + return OrbRegistry.getOrb(meta); + } + + @Override + public int getMaxEssence(int meta) { + return OrbRegistry.getOrb(meta).getCapacity(); + } + + @Override + public int getOrbLevel(int meta) { + return OrbRegistry.getOrb(meta).getTier(); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/proxy/ClientProxy.java b/src/main/java/WayofTime/alchemicalWizardry/proxy/ClientProxy.java new file mode 100644 index 00000000..08a1f08c --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/proxy/ClientProxy.java @@ -0,0 +1,23 @@ +package WayofTime.alchemicalWizardry.proxy; + +import WayofTime.alchemicalWizardry.registry.ModBlocks; +import WayofTime.alchemicalWizardry.registry.ModItems; + +public class ClientProxy extends CommonProxy { + + @Override + public void preInit() { + + } + + @Override + public void init() { + + } + + @Override + public void postInit() { + ModItems.initRenders(); + ModBlocks.initRenders(); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/proxy/CommonProxy.java b/src/main/java/WayofTime/alchemicalWizardry/proxy/CommonProxy.java new file mode 100644 index 00000000..10d0ea3c --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/proxy/CommonProxy.java @@ -0,0 +1,16 @@ +package WayofTime.alchemicalWizardry.proxy; + +public class CommonProxy { + + public void preInit() { + + } + + public void init() { + + } + + public void postInit() { + + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/registry/ModBlocks.java b/src/main/java/WayofTime/alchemicalWizardry/registry/ModBlocks.java new file mode 100644 index 00000000..660763d0 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/registry/ModBlocks.java @@ -0,0 +1,56 @@ +package WayofTime.alchemicalWizardry.registry; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ConfigHandler; +import WayofTime.alchemicalWizardry.block.BlockAltar; +import WayofTime.alchemicalWizardry.block.BlockLifeEssence; +import WayofTime.alchemicalWizardry.util.helper.InventoryRenderHelper; +import net.minecraft.block.Block; +import net.minecraft.item.ItemBlock; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fml.common.registry.GameRegistry; + +public class ModBlocks { + + public static Block altar; + + public static Block lifeEssence; + + public static Block crystal; + public static Block rune; + public static Block bloodStone; + + public static void init() { + FluidRegistry.registerFluid(BlockLifeEssence.getLifeEssence()); + lifeEssence = registerBlock(new BlockLifeEssence()); + altar = registerBlock(new BlockAltar()); + + initTiles(); + } + + public static void initTiles() { + + } + + public static void initRenders() { + InventoryRenderHelper renderHelper = AlchemicalWizardry.instance.getRenderHelper(); + } + + private static Block registerBlock(Block block, Class itemBlock, String name) { + if (!ConfigHandler.blockBlacklist.contains(name)) + GameRegistry.registerBlock(block, itemBlock, name); + + return block; + } + + private static Block registerBlock(Block block, String name) { + if (!ConfigHandler.blockBlacklist.contains(name)) + GameRegistry.registerBlock(block, name); + + return block; + } + + private static Block registerBlock(Block block) { + return registerBlock(block, block.getClass().getSimpleName()); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/registry/ModEntities.java b/src/main/java/WayofTime/alchemicalWizardry/registry/ModEntities.java new file mode 100644 index 00000000..4e5bf166 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/registry/ModEntities.java @@ -0,0 +1,8 @@ +package WayofTime.alchemicalWizardry.registry; + +public class ModEntities { + + public static void init() { + + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/registry/ModItems.java b/src/main/java/WayofTime/alchemicalWizardry/registry/ModItems.java new file mode 100644 index 00000000..5ec95aa3 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/registry/ModItems.java @@ -0,0 +1,63 @@ +package WayofTime.alchemicalWizardry.registry; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ConfigHandler; +import WayofTime.alchemicalWizardry.api.AlchemicalWizardryAPI; +import WayofTime.alchemicalWizardry.api.orb.BloodOrb; +import WayofTime.alchemicalWizardry.api.registry.OrbRegistry; +import WayofTime.alchemicalWizardry.item.ItemBloodOrb; +import WayofTime.alchemicalWizardry.util.helper.InventoryRenderHelper; +import net.minecraft.item.Item; +import net.minecraftforge.fml.common.registry.GameRegistry; + +public class ModItems { + + public static Item bloodOrb; + public static BloodOrb orbWeak; + public static BloodOrb orbApprentice; + public static BloodOrb orbMagician; + public static BloodOrb orbMaster; + public static BloodOrb orbArchmage; + public static BloodOrb orbTranscendent; + + + public static void init() { + bloodOrb = registerItem(new ItemBloodOrb()); + AlchemicalWizardryAPI.setOrbItem(bloodOrb); + orbWeak = new BloodOrb("weak", 1, 5000); + OrbRegistry.registerOrb(orbWeak); + orbApprentice = new BloodOrb("apprentice", 2, 25000); + OrbRegistry.registerOrb(orbApprentice); + orbMagician = new BloodOrb("magician", 3, 150000); + OrbRegistry.registerOrb(orbMagician); + orbMaster = new BloodOrb("master", 4, 1000000); + OrbRegistry.registerOrb(orbMaster); + orbArchmage = new BloodOrb("archmage", 5, 10000000); + OrbRegistry.registerOrb(orbArchmage); + orbTranscendent = new BloodOrb("transcendent", 6, 30000000); + OrbRegistry.registerOrb(orbTranscendent); + } + + public static void initRenders() { + InventoryRenderHelper renderHelper = AlchemicalWizardry.instance.getRenderHelper(); + + renderHelper.itemRenderAll(bloodOrb); + OrbRegistry.registerOrbTexture(orbWeak, AlchemicalWizardry.DOMAIN + "ItemBloodOrbWeak"); + OrbRegistry.registerOrbTexture(orbApprentice, AlchemicalWizardry.DOMAIN + "ItemBloodOrbApprentice"); + OrbRegistry.registerOrbTexture(orbMagician, AlchemicalWizardry.DOMAIN + "ItemBloodOrbMagician"); + OrbRegistry.registerOrbTexture(orbMaster, AlchemicalWizardry.DOMAIN + "ItemBloodOrbMaster"); + OrbRegistry.registerOrbTexture(orbArchmage, AlchemicalWizardry.DOMAIN + "ItemBloodOrbArchmage"); + OrbRegistry.registerOrbTexture(orbTranscendent, AlchemicalWizardry.DOMAIN + "ItemBloodOrbTranscendent"); + } + + private static Item registerItem(Item item, String name) { + if (!ConfigHandler.itemBlacklist.contains(name)) + GameRegistry.registerItem(item, name); + + return item; + } + + private static Item registerItem(Item item) { + return registerItem(item, item.getClass().getSimpleName()); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/registry/ModPotions.java b/src/main/java/WayofTime/alchemicalWizardry/registry/ModPotions.java new file mode 100644 index 00000000..fa0f5c95 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/registry/ModPotions.java @@ -0,0 +1,14 @@ +package WayofTime.alchemicalWizardry.registry; + +public class ModPotions { + + private static int POTION_ARRAY_SIZE = 256; + + public static void init() { + + } + + public static int getArraySize() { + return POTION_ARRAY_SIZE; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/tile/TileAltar.java b/src/main/java/WayofTime/alchemicalWizardry/tile/TileAltar.java new file mode 100644 index 00000000..c53fd526 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/tile/TileAltar.java @@ -0,0 +1,143 @@ +package WayofTime.alchemicalWizardry.tile; + +import WayofTime.alchemicalWizardry.api.AlchemicalWizardryAPI; +import WayofTime.alchemicalWizardry.api.altar.AltarUpgrade; +import net.minecraft.server.gui.IUpdatePlayerListBox; +import net.minecraft.util.EnumFacing; +import net.minecraftforge.fluids.*; + +public class TileAltar extends TileInventory implements IUpdatePlayerListBox, IFluidTank, IFluidHandler { + + private int tier; + private AltarUpgrade upgrade = new AltarUpgrade(); + private FluidStack fluid = new FluidStack(AlchemicalWizardryAPI.getLifeEssence(), 0); + private int capacity; + + public TileAltar() { + super(1, "altar"); + + this.capacity = 10000; + } + + + + @Override + public void update() {} + +// @Override +// public void update() { +// if (getWorld().isRemote) +// return; +// +// if (getWorld().getTotalWorldTime() % (Math.max(20 - getUpgrade().getSpeedCount(), 1)) == 0) { +// everySecond(); +// } +// +// if (getWorld().getTotalWorldTime() % 100 == 0) { +// everyFiveSeconds(); +// } +// } +// +// private void everySecond() { +// +// // Do recipes +// if (AltarRecipeRegistry.getRecipes().containsKey(getStackInSlot(0))) { +// AltarRecipe recipe = AltarRecipeRegistry.getRecipeForInput(getStackInSlot(0)); +// +// if (!(tier >= recipe.minTier)) +// return; +// +// +// } +// } +// +// private void everyFiveSeconds() { +// checkTier(); +// } +// +// private void checkTier() { +// // TODO - Write checking for tier stuff +// } + + public TileAltar setUpgrade(AltarUpgrade upgrade) { + this.upgrade = upgrade; + return this; + } + + public AltarUpgrade getUpgrade() { + return upgrade; + } + + public TileAltar setTier(int tier) { + this.tier = tier; + return this; + } + + public int getTier() { + return tier; + } + + // IFluidHandler + + @Override + public FluidTankInfo[] getTankInfo(EnumFacing from) { + return new FluidTankInfo[0]; + } + + @Override + public int fill(EnumFacing from, FluidStack resource, boolean doFill) { + return 0; + } + + @Override + public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain) { + return null; + } + + @Override + public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain) { + return null; + } + + @Override + public boolean canFill(EnumFacing from, Fluid fluid) { + return false; + } + + @Override + public boolean canDrain(EnumFacing from, Fluid fluid) { + return false; + } + + // IFluidTank + + @Override + public FluidStack getFluid() { + return fluid; + } + + @Override + public int getFluidAmount() { + return fluid.amount; + } + + @Override + public int getCapacity() { + return capacity; + } + + @Override + public FluidTankInfo getInfo() { + return new FluidTankInfo(this); + } + + @Override + public int fill(FluidStack resource, boolean doFill) { + return 0; + } + + @Override + public FluidStack drain(int maxDrain, boolean doDrain) { + return null; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/tile/TileInventory.java b/src/main/java/WayofTime/alchemicalWizardry/tile/TileInventory.java new file mode 100644 index 00000000..d6c17909 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/tile/TileInventory.java @@ -0,0 +1,124 @@ +package WayofTime.alchemicalWizardry.tile; + +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChatComponentTranslation; +import net.minecraft.util.IChatComponent; +import net.minecraft.util.StatCollector; + +public class TileInventory extends TileEntity implements IInventory { + + private ItemStack[] inventory; + private int size; + private String name; + + public TileInventory(int size, String name) { + this.inventory = new ItemStack[size]; + this.size = size; + this.name = name; + } + + public void dropItems() { + for (ItemStack stack : inventory) + getWorld().spawnEntityInWorld(new EntityItem(getWorld(), getPos().getX(), pos.getY(), pos.getZ(), stack)); + } + + // IInventory + + @Override + public int getSizeInventory() { + return size; + } + + @Override + public ItemStack getStackInSlot(int index) { + return inventory[index]; + } + + @Override + public ItemStack decrStackSize(int index, int count) { + ItemStack slotStack = getStackInSlot(index); + + if (slotStack.stackSize > count) + slotStack.stackSize -= count; + else if (slotStack.stackSize <= count) + return null; + + return slotStack; + } + + @Override + public ItemStack getStackInSlotOnClosing(int index) { + return inventory[index]; + } + + @Override + public void setInventorySlotContents(int index, ItemStack stack) { + + } + + @Override + public int getInventoryStackLimit() { + return 64; + } + + @Override + public boolean isUseableByPlayer(EntityPlayer player) { + return true; + } + + @Override + public void openInventory(EntityPlayer player) { + + } + + @Override + public void closeInventory(EntityPlayer player) { + + } + + @Override + public boolean isItemValidForSlot(int index, ItemStack stack) { + return true; + } + + @Override + public int getField(int id) { + return 0; + } + + @Override + public void setField(int id, int value) { + + } + + @Override + public int getFieldCount() { + return 0; + } + + @Override + public void clear() { + this.inventory = new ItemStack[size]; + } + + // IWorldNameable + + @Override + public String getName() { + return StatCollector.translateToLocal("tile.AlchemicalWizardry." + name + ".name"); + } + + @Override + public boolean hasCustomName() { + return true; + } + + @Override + public IChatComponent getDisplayName() { + return new ChatComponentTranslation("tile.AlchemicalWizardry." + name + ".name"); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/util/Utils.java b/src/main/java/WayofTime/alchemicalWizardry/util/Utils.java new file mode 100644 index 00000000..6d51ca11 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/util/Utils.java @@ -0,0 +1,16 @@ +package WayofTime.alchemicalWizardry.util; + +public class Utils { + + public static boolean isInteger(String integer) { + try { + Integer.parseInt(integer); + } catch(NumberFormatException e) { + return false; + } catch(NullPointerException e) { + return false; + } + // only got here if we didn't return false + return true; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/util/helper/InventoryRenderHelper.java b/src/main/java/WayofTime/alchemicalWizardry/util/helper/InventoryRenderHelper.java new file mode 100644 index 00000000..c5fad2b0 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/util/helper/InventoryRenderHelper.java @@ -0,0 +1,96 @@ +package WayofTime.alchemicalWizardry.util.helper; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.ItemMeshDefinition; +import net.minecraft.client.resources.model.ModelBakery; +import net.minecraft.client.resources.model.ModelResourceLocation; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.model.ModelLoader; + +/** + * @author TehNut + * + * The goal of this class is to make registering the inventory renders + * for your Items/Blocks a much simpler and easier process. + * + * You must call this at the post initialization stage on + * the clientside only. + * + * If you pass a Block through here that uses the default + * ItemBlock, you should specify a custom name. + */ +public class InventoryRenderHelper { + + /** + * This is the base string for your resources. It will usually be + * your modid in all lowercase with a colon at the end. + */ + private final String domain; + + public InventoryRenderHelper(String domain) { + this.domain = domain; + } + + /** + * Registers a Model for the given Item and meta. + * + * @param item - Item to register Model for + * @param meta - Meta of Item + * @param name - Name of the model JSON + */ + public void itemRender(Item item, int meta, String name) { + if (item instanceof ItemBlock && name.startsWith("ItemBlock")) + name = name.replace("Item", ""); + + String resName = domain + name; + + ModelBakery.addVariantName(item, resName); + ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(resName, "inventory")); + } + + /** + * Shorthand of {@code itemRender(Item, int, String)} + * + * @param item - Item to register Model for + * @param meta - Meta of Item + */ + public void itemRender(Item item, int meta) { + itemRender(item, meta, item.getClass().getSimpleName() + meta); + } + + /** + * Shorthand of {@code itemRender(Item, int)} + * + * @param item - Item to register Model for + */ + public void itemRender(Item item) { + itemRender(item, 0, item.getClass().getSimpleName()); + } + + /** + * Registers a model for the item across all Meta's that get used for the item + * + * @param item - Item to register Model for + */ + public void itemRenderAll(Item item) { + final Item toRender = item; + + ModelLoader.setCustomMeshDefinition(item, new ItemMeshDefinition() { + @Override + public ModelResourceLocation getModelLocation(ItemStack stack) { + return new ModelResourceLocation(domain + toRender.getClass().getSimpleName(), "inventory"); + } + }); + } + + /** + * + * @param block - Block to get Item of + * @return - The ItemBlock that corresponds to the Block. + */ + public static Item getItemFromBlock(Block block) { + return Item.getItemFromBlock(block); + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang index d8485d0e..a31a4cc1 100644 --- a/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang +++ b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang @@ -1,482 +1,64 @@ -#Block Localization -tile.altar.name=Blood Altar -tile.blood_rune.blank.name=Blood Rune -tile.blood_rune.fill.name=Rune of Augmented Capacity -tile.blood_rune.empty.name=Rune of Dislocation -tile.blood_rune.orb.name=Rune of the Orb -tile.blood_rune.betterCapacity.name=Rune of Superior Capacity -tile.blood_rune.acceleration.name=Rune of Acceleration -tile.speed_rune.name=Speed Rune -tile.efficiency_rune.name=Efficiency Rune -tile.sacrifice_rune.name=Rune of Sacrifice -tile.self_sacrifice_rune.name=Rune of Self-Sacrifice -tile.ritual_stone.name=Ritual Stone -tile.master_ritual_stone.name=Master Ritual Stone -tile.filled_socket.name=Filled Socket -tile.imperfect_ritual_stone.name=Imperfect Ritual Stone -tile.soul_armour_forge.name=Soul Armour Forge -tile.empty_socket.name=Empty Socket -tile.bloodstone_brick.name=Bloodstone Brick -tile.large_bloodstone_brick.name=Large Bloodstone Brick -tile.chemistry_set.name=Alchemical Chemistry Set -tile.spell_table.name=Spell Table -tile.pedestal.name=Arcane Pedestal -tile.plinth.name=Arcane Plinth -tile.teleposer.name=Teleposer -tile.spell_conduit.name=Spell Conduit -tile.spell_paradigm.projectile.name=Particle Generator -tile.spell_paradigm.self.name=Self Augmentator -tile.spell_paradigm.melee.name=Melee Aggregator -tile.spell_paradigm.tool.name=Tool Forger -tile.spell_enhancement.power1.name=Unstable Spell Empowerer -tile.spell_enhancement.power2.name=Standard Spell Empowerer -tile.spell_enhancement.power3.name=Reinforced Spell Empowerer -tile.spell_enhancement.power4.name=Imbued Spell Empowerer -tile.spell_enhancement.power5.name=Demonic Spell Empowerer -tile.spell_enhancement.cost1.name=Unstable Spell Dampener -tile.spell_enhancement.cost2.name=Standard Spell Dampener -tile.spell_enhancement.cost3.name=Reinforced Spell Dampener -tile.spell_enhancement.cost4.name=Imbued Spell Dampener -tile.spell_enhancement.cost5.name=Demonic Spell Dampener -tile.spell_enhancement.potency1.name=Unstable Spell Augmentor -tile.spell_enhancement.potency2.name=Standard Spell Augmentor -tile.spell_enhancement.potency3.name=Reinforced Spell Augmentor -tile.spell_enhancement.potency4.name=Imbued Spell Augmentor -tile.spell_enhancement.potency5.name=Demonic Spell Augmentor -tile.spell_modifier.default.name=Default Spell Modifier -tile.spell_modifier.offensive.name=Offensive Spell Modifier -tile.spell_modifier.defensive.name=Defensive Spell Modifier -tile.spell_modifier.environmental.name=Environmental Spell Modifier -tile.spell_effect.fire.name=Crucible of Fire -tile.spell_effect.ice.name=Ice Maker -tile.spell_effect.wind.name=Wind Generator -tile.spell_effect.earth.name=Earth Former -tile.alchemical_calcinator.name=Alchemical Calcinator -tile.crystal_belljar.name=Crystal Belljar -tile.reagent_conduit.name=Alchemy Relay -tile.life_essence.name=Life Essence -tile.crystal_block.fullCrystal.name=Crystal Cluster -tile.crystal_block.crystalBrick.name=Crystal Cluster Brick -tile.demon_portal.name=Demon Portal -tile.demon_chest.name=Demon's Chest -tile.enchantment_glyph.enchantability.name=Glyph of the Adept Enchanter -tile.enchantment_glyph.enchantmentLevel.name=Glyph of Arcane Potential -tile.stability_glyph.stability1.name=Glyph of Rigid Stability -tile.schematic_saver.name=Schematic Saver -tile.mimic_block.name=Mimic Block -tile.spectral_container.name=Spectral Container -tile.blood_light.name=Blood Light -tile.spectral_block.name=Spectral Block -tile.incense_crucible.name=Incense Crucible - -#Item Localization -item.weak_blood_orb.name=Weak Blood Orb -item.apprentice_blood_orb.name=Apprentice Blood Orb -item.magician_blood_orb.name=Magician's Blood Orb -item.master_blood_orb.name=Master Blood Orb -item.archmage_blood_orb.name=Archmage's Blood Orb -item.energy_blast.name=Energy Blaster -item.energy_sword.name=Bound Blade -item.lava_crystal.name=Lava Crystal -item.water_sigil.name=Water Sigil -item.lava_sigil.name=Lava Sigil -item.void_sigil.name=Void Sigil -item.blank_slate.name=Blank Slate -item.reinforced_slate.name=Reinforced Slate -item.sacrificial_dagger.name=Sacrificial Knife -item.dagger_of_sacrifice.name=Dagger of Sacrifice -item.air_sigil.name=Air Sigil -item.sigil_of_the_fast_miner.name=Sigil of the Fast Miner -item.sigil_of_elemental_affinity.name=Sigil of Elemental Affinity -item.sigil_of_haste.name=Sigil of Haste -item.sigil_of_holding.name=Sigil of Holding -item.divination_sigil.name=Divination Sigil -item.water_scribe_tool.name=Elemental Inscription Tool: Water -item.fire_scribe_tool.name=Elemental Inscription Tool: Fire -item.earth_scribe_tool.name=Elemental Inscription Tool: Earth -item.air_scribe_tool.name=Elemental Inscription Tool: Air -item.dusk_scribe_tool.name=Elemental Inscription Tool: Dusk -item.activation_crystal_weak.name=Weak Activation Crystal -item.activation_crystal_awakened.name=Awakened Activation Crystal -item.activation_crystal_creative.name=Creative Activation Crystal -item.bound_pickaxe.name=Bound Pickaxe -item.bound_axe.name=Bound Axe -item.bound_shovel.name=Bound Shovel -item.bound_helmet.name=Bound Helmet -item.bound_chestplate.name=Bound Chestplate -item.bound_leggings.name=Bound Leggings -item.bound_boots.name=Bound Boots -item.weak_blood_shard.name=Weak Blood Shard -item.growth_sigil.name=Sigil of the Green Grove -item.blank_spell.name=Unbound Crystal -item.alchemy_flask.name=Potion Flask -item.standard_binding_agent.name=Standard Binding Agent -item.mundane_power_catalyst.name=Mundane Power Catalyst -item.average_power_catalyst.name=Average Power Catalyst -item.greater_power_catalyst.name=Greater Power Catalyst -item.mundane_lengthening_catalyst.name=Mundane Lengthening Catalyst -item.average_lengthening_catalyst.name=Average Lengthening Catalyst -item.greater_lengthening_catalyst.name=Greater Lengthening Catalyst -item.incendium.name=Incendium -item.magicales.name=Magicales -item.sanctus.name=Sanctus -item.aether.name=Aether -item.simple_catalyst.name=Simple Catalyst -item.crepitous.name=Crepitous -item.crystallos.name=Crystallos -item.terrae.name=Terrae -item.aquasalus.name=Aquasalus -item.tennebrae.name=Tenebrae -item.demon_blood_shard.name=Demon Blood Shard -item.sigil_of_wind.name=Sigil of the Whirlwind -item.teleposition_focus.name=Teleposition Focus -item.enhanced_teleposition_focus.name=Enhanced Teleposition Focus -item.reinforced_teleposition_focus.name=Reinforced Teleposition Focus -item.demonic_teleposition_focus.name=Demonic Teleposition Focus -item.imbued_slate.name=Imbued Slate -item.demonic_slate.name=Demonic Slate -item.sigil_of_the_bridge.name=Sigil of the Phantom Bridge -item.armour_inhibitor.name=Armour Inhibitor -item.creative_orb.name=Orb of Testing -item.weak_filling_agent.name=Weak Filling Agent -item.standard_filling_agent.name=Standard Filling Agent -item.enhanced_filling_agent.name=Enhanced Filling Agent -item.weak_binding_agent.name=Weak Binding Agent -item.ritual_diviner.name=Ritual Diviner -item.ritual_dismantler.name=Ritual Dismantler -item.sigil_of_magnetism.name=Sigil of Magnetism -item.key_of_binding.name=Key of Binding -item.energy_bazooka.name=Energy Bazooka -item.blood_light_sigil.name=Sigil of the Blood Lamp -item.complex_spell_crystal.name=Complex Spell Crystal -item.sigil_of_supression.name=Sigil of Supression -item.sigil_of_ender_severance.name=Sigil of Ender Severance -item.bucket_life.name=Bucket of Life -item.base_items.quartz_rod.name=Quartz Rod -item.base_items.empty_core.name=Empty Core -item.base_items.magicales_cable.name=Magicales Cable -item.base_items.wood_brace.name=Wooden Brace -item.base_items.stone_brace.name=Stone Brace -item.base_items.projectile_core.name=Projectile Core -item.base_items.self_core.name=Self Core -item.base_items.melee_core.name=Melee Core -item.base_items.tool_core.name=Tool Core -item.base_items.paradigm_back_plate.name=Paradigm Plate -item.base_items.output_cable.name=Output Spell Cable -item.base_items.input_cable.name=Input Spell Cable -item.base_items.flame_core.name=Fire Core -item.base_items.icy_core.name=Icy Core -item.base_items.gust_core.name=Gusty Core -item.base_items.earthen_core.name=Earthen Core -item.base_items.cracked_runic_plate.name=Cracked Runic Plate -item.base_items.runic_plate.name=Runic Plate -item.base_items.scribed_runic_plate.name=Imbued Runic Plate -item.base_items.default_core.name=Unattuned Core -item.base_items.offensive_core.name=Offensive Core -item.base_items.defensive_core.name=Defensive Core -item.base_items.environmental_core.name=Environmental Core -item.base_items.power_core.name=Power Core -item.base_items.cost_core.name=Reduction Core -item.base_items.potency_core.name=Potency Core -item.base_items.obsidian_brace.name=Obsidian Brace -item.base_items.ethereal_slate.name=Ethereal Slate -item.base_items.life_shard.name=Life Shard -item.base_items.soul_shard.name=Soul Shard -item.base_items.life_brace.name=Living Brace -item.base_items.soul_runic_plate.name=Soul Runic Plate -item.base_items.ender_shard.name=Ender Shard -item.base_alchemy_items.offensa.name=Offensa -item.base_alchemy_items.praesidium.name=Praesidium -item.base_alchemy_items.orbis_terrae.name=Orbis Terrae -item.base_alchemy_items.strengthened_catalyst.name=Strengthened Catalyst -item.base_alchemy_items.concentrated_catalyst.name=Concentrated Catalyst -item.base_alchemy_items.fractured_bone.name=Fractured Bone -item.base_alchemy_items.virtus.name=Virtus -item.base_alchemy_items.reductus.name=Reductus -item.base_alchemy_items.potentia.name=Potentia -item.sanguine_helmet.name=Sanguine Helmet -item.seer_sigil.name=Sigil of Sight -item.fluid_sigil.name=Sigil of Fluidity -item.multi_tool.name=Dynamic Mace -item.combinational_catalyst.name=Combinational Catalyst -item.sanguine_robe.name=Sanguine Robes -item.sanguine_pants.name=Sanguine Leggings -item.sanguine_boots.name=Sanguine Boots -item.alchemical_router.name=Alchemic Router -item.alchemical_segmenter.name=Alchemic Segmenter -item.alchemical_cleanser.name=Alchemic Cleanser -item.demon_crystal.name=Demon Crystal -item.creative_dagger.name=Creative Sacrificial Knife -item.blood_pack.name=Blood Letter's Pack -item.harvest_sigil.name=Harvest Goddess Sigil -item.compression_sigil.name=Sigil of Compression -item.assassin_sigil.name=Sigil of the Assassin -item.transcendent_blood_orb.name=Transcendent Blood Orb -item.mail_catalogue.name=Mail Order Catalogue -item.input_routing_focus.name=Input Routing Focus -item.output_routing_focus.default.name=Default Output Routing Focus -item.output_routing_focus.modItem.name=Output Routing Focus (ModItem) -item.output_routing_focus.ignMeta.name=Output Routing Focus (Ignore Meta) -item.output_routing_focus.matchNBT.name=Output Routing Focus (MatchNBT) -item.output_routing_focus.global.name=Output Routing Focus (Global) -item.dawn_scribe_tool.name=Elemental Inscription Tool: Dawn -item.bound_helmet_earth.name=Earth Omega Helmet -item.bound_chestplate_earth.name=Earth Omega Chestplate -item.bound_leggings_earth.name=Earth Omega Leggings -item.bound_boots_earth.name=Earth Omega Boots -item.bound_helmet_wind.name=Wind Omega Helmet -item.bound_chestplate_wind.name=Wind Omega Chestplate -item.bound_leggings_wind.name=Wind Omega Leggings -item.bound_boots_wind.name=Wind Omega Boots -item.bound_helmet_fire.name=Fire Omega Helmet -item.bound_chestplate_fire.name=Fire Omega Chestplate -item.bound_leggings_fire.name=Fire Omega Leggings -item.bound_boots_fire.name=Fire Omega Boots -item.bound_helmet_water.name=Water Omega Helmet -item.bound_chestplate_water.name=Water Omega Chestplate -item.bound_leggings_water.name=Water Omega Leggings -item.bound_boots_water.name=Water Omega Boots - -item.incense.wood_ash.name=Wood Ash -item.incense.byrrus.name=Byrrus -item.incense.livens.name=Livens -item.incense.viridis.name=Viridis -item.incense.purpura.name=Purpura - #Creative Tab -itemGroup.tabBloodMagic=Blood Magic +itemGroup.AlchemicalWizardry.creativeTab=Blood Magic -#Extra Strings -bm.string.consume=Usage -bm.string.drain=Drain -bm.string.tier=Tier -bm.string.crafting.orb.shaped=Shaped Orb Crafting -bm.string.crafting.orb.shapeless=Shapeless Orb Crafting -text.recipe.altar=Blood Altar -text.recipe.altar.tier=Tier: %s -text.recipe.altar.bloodRequired=LP: %s -text.recipe.shapedOrb=Shaped Orb Recipe +#Items +item.AlchemicalWizardry.bindable.activationCrystal.weak.name=Weak Activation Crystal +item.AlchemicalWizardry.bindable.activationCrystal.awakened.name=Awakened Activation Crystal +item.AlchemicalWizardry.bindable.activationCrystal.creative.name=Creative Activation Crystal -#Entities -entity.AWWayofTime.EarthElemental.name=Earth Elemental -entity.AWWayofTime.FireElemental.name=Fire Elemental -entity.AWWayofTime.HolyElemental.name=Holy Elemental -entity.AWWayofTime.ShadeElemental.name=Shade Elemental -entity.AWWayofTime.WaterElemental.name=Water Elemental -entity.AWWayofTime.AirElemental.name=Air Elemental -entity.AWWayofTime.Shade.name=Shade -entity.AWWayofTime.BoulderFist.name=Boulder Fist -entity.AWWayofTime.IceDemon.name=Ice Demon -entity.AWWayofTime.SmallEarthGolem.name=Small Earth Golem -entity.AWWayofTime.WingedFireDemon.name=Winged Fire Demon -entity.AWWayofTime.BileDemon.name=Bile Demon -entity.AWWayofTime.LowerGuardian.name=Lower Guardian -entity.AWWayofTime.FallenAngel.name=Fallen Angel -entity.AWWayofTime.MinorDemonGruntGuardian.name=Demon Grunt Guardian -entity.AWWayofTime.MinorDemonGruntGuardianWind.name=Wind Demon Grunt Guardian -entity.AWWayofTime.MinorDemonGruntGuardianFire.name=Fire Demon Grunt Guardian -entity.AWWayofTime.MinorDemonGruntGuardianIce.name=Ice Demon Grunt Guardian -entity.AWWayofTime.MinorDemonGruntGuardianEarth.name=Earth Demon Grunt Guardian -entity.AWWayofTime.MinorDemonGruntWind.name=Wind Demon Grunt -entity.AWWayofTime.MinorDemonGruntFire.name=Fire Demon Grunt -entity.AWWayofTime.MinorDemonGruntIce.name=Ice Demon Grunt -entity.AWWayofTime.MinorDemonGruntEarth.name=Earth Demon Grunt -entity.AWWayofTime.MinorDemonGrunt.name=Demon Grunt +item.AlchemicalWizardry.dagger.name=Sacrificial Dagger +item.AlchemicalWizardry.dagger.creative.name=Creative Sacrificial Dagger -#Commands -commands.soulnetwork.usage=/soulnetwork -commands.bind.usage=/bind -commands.bind.success=Item successfully bound! -commands.bind.failed.noPlayer=There is no player specified -commands.bind.failed.alreadyBound=Item is already bound; use /unbind to unbind it -commands.bind.failed.notBindable=Item cannot be bound -commands.unbind.usage=/unbind -commands.unbind.success=Item successfully unbound! -commands.unbind.failed.notBindable=Item cannot be unbound -commands.soulnetwork.usage=/soulnetwork [amount] -commands.soulnetwork.add.success=Successfully added %dLP to %s's Soul Network! -commands.soulnetwork.subtract.success=Successfully subtracted %dLP from %s's Soul Network! -commands.soulnetwork.fill.success=Successfully filled %s's Soul Network! -commands.soulnetwork.empty.success=Successfully emptied %s's Soul Network! -commands.soulnetwork.get.success=There is %dLP in %s's Soul Network! -commands.soulnetwork.noPlayer=There is no player specified -commands.soulnetwork.noCommand=There is no command specified -commands.soulnetwork.notACommand=That is not a valid command -commands.soulnetwork.fillMax.success=Successfully filled %s's Soul Network to their orb max! -commands.soulnetwork.create.success=Successfully created %s's Soul Network (Orb tier: %d) +item.AlchemicalWizardry.scribe.water.name=Water Scribing Tools +item.AlchemicalWizardry.scribe.fire.name=Fire Scribing Tools +item.AlchemicalWizardry.scribe.earth.name=Earth Scribing Tools +item.AlchemicalWizardry.scribe.air.name=Air Scribing Tools +item.AlchemicalWizardry.scribe.dusk.name=Dusk Scribing Tools +item.AlchemicalWizardry.scribe.dawn.name=Dawn Scribing Tools -#Tooltips -tooltip.activationcrystal.creativeonly=Creative Only - activates any ritual -tooltip.activationcrystal.lowlevelrituals=Activates low-level rituals -tooltip.activationcrystal.powerfulrituals=Activates more powerful rituals -tooltip.airsigil.desc=I feel lighter already... -tooltip.alchemy.coords=Coords: -tooltip.alchemy.damage=Damage: -tooltip.alchemy.dimension=Bound Dimension: -tooltip.alchemy.direction=Direction: -tooltip.alchemy.forrecipe=for Recipe -tooltip.alchemy.press=Press -tooltip.alchemy.recipe=Recipe: -tooltip.alchemy.ritualid=RitualID: -tooltip.alchemy.shift=shift -tooltip.alchemy.usedinalchemy=Used in Alchemy -tooltip.alchemyflask.caution=CAUTION: Contents are throwable -tooltip.alchemyflask.swigsleft=Swigs Left: -tooltip.armorinhibitor.desc1=Used to suppress a soul's -tooltip.armorinhibitor.desc2=unnatural abilities. -tooltip.attunedcrystal.desc1=A tool to tune alchemy -tooltip.attunedcrystal.desc2=reagent transmission -tooltip.blankspell.desc=Crystal of infinite possibilities. -tooltip.bloodframe.desc=Stirs bees into a frenzy. -tooltip.bloodletterpack.desc=This pack really chaffes... -tooltip.bloodlightsigil.desc=I see a light! -tooltip.boundarmor.devprotect=Devilish Protection -tooltip.boundaxe.desc=Axe me about my puns! -tooltip.boundpickaxe.desc1=The Souls of the Damned -tooltip.boundpickaxe.desc2=do not like stone... -tooltip.boundshovel.desc=No, not that type of spade. -tooltip.caution.desc1=Caution: may cause -tooltip.caution.desc2=a bad day... -tooltip.cheatyitem.desc1=Right-click to fill network, -tooltip.cheatyitem.desc2=shift-right to empty. -tooltip.complexspellcrystal.desc=Crystal of unimaginable power -tooltip.crystalbelljar.contents=Current Contents: -tooltip.crystalbelljar.empty=- Empty -tooltip.demonictelepfocus.desc1=A stronger version of the focus, -tooltip.demonictelepfocus.desc2=using a demonic shard -tooltip.demonplacer.desc=Used to spawn demons. -tooltip.destclearer.desc1=Used to clear the destination -tooltip.destclearer.desc2=list for an alchemy container -tooltip.diablokey.desc=Binds other items to the owner's network -tooltip.divinationsigil.desc1=Peer into the soul to -tooltip.divinationsigil.desc2=get the current essence -tooltip.energybazooka.desc=Boom. -tooltip.energybattery.desc=Stores raw Life Essence -tooltip.energyblast.desc1=Used to fire devastating -tooltip.energyblast.desc2=projectiles. -tooltip.enhancedtelepfocus.desc=A focus further enhanced in an altar -tooltip.fluidsigil.beastmode=Beast Mode -tooltip.fluidsigil.desc=A sigil with a lovely affinity for fluids -tooltip.fluidsigil.draintankmode=Drain Tank Mode -tooltip.fluidsigil.filltankmode=Fill Tank Mode -tooltip.fluidsigil.fluidplacementmode=Fluid Placement Mode -tooltip.fluidsigil.forcesyphonmode=Force-syphon Mode -tooltip.fluidsigil.syphoningmode=Syphoning Mode -tooltip.harvestsigil.desc=You sow what you reap -tooltip.infusedstone.desc1=Infused stone inside of -tooltip.infusedstone.desc2=a blood altar -tooltip.item.iteminslot=Item in slot -tooltip.item.currentitem=Current Item: -tooltip.lavacrystal.desc1=Store life to smelt -tooltip.lavacrystal.desc2=stuff in the furnace. -tooltip.lavasigil.desc1=Contact with liquid is -tooltip.lavasigil.desc2=highly unrecommended. -tooltip.lp.storedlp=Stored LP: -tooltip.mode.creative=Creative Only -tooltip.owner.currentowner=Current Owner: -tooltip.owner.demonsowner=Demon's Owner: -tooltip.packratsigil.desc=Hands of Diamonds -tooltip.reagent.selectedreagent=Currently selected reagent: -tooltip.reinforcedtelepfocus.desc1=A stronger version of the focus, -tooltip.reinforcedtelepfocus.desc2=using a weak shard -tooltip.ritualdiviner.airstones=Air Stones: -tooltip.ritualdiviner.blankstones=Blank Stones: -tooltip.ritualdiviner.cannotplace=Can not place Dusk runes -tooltip.ritualdiviner.canplace=Can place Dusk runes -tooltip.ritualdiviner.canplacedawn=Can place Dusk and Dawn runes -tooltip.ritualdiviner.desc=Used to explore new types of rituals -tooltip.ritualdiviner.duskstones=Dusk Stones: -tooltip.ritualdiviner.earthstones=Earth Stones: -tooltip.ritualdiviner.firestones=Fire Stones: -tooltip.ritualdiviner.moreinfo=Press shift for extended information -tooltip.ritualdiviner.ritualtunedto=Ritual tuned to face: -tooltip.ritualdiviner.waterstones=Water Stones: -tooltip.ritualdiviner.dawnstones=Dawn Stones: -tooltip.ritualdiviner.totalStones=Total Stones: -tooltip.dismatler.desc=You could turn this upside down? -tooltip.sacrificialdagger.desc1=A slight draining feeling tickles your fingers -tooltip.sacrificialdagger.desc2=Just a prick of the -tooltip.sacrificialdagger.desc3=finger will suffice... -tooltip.sanguinearmor.desc1=A pair of goggles imbued with power -tooltip.sanguinearmor.desc2=Robes imbued with forbidden power -tooltip.sanguinearmor.visdisc=Vis discount: -tooltip._scribe_tool.desc=The writing is on the wall... -tooltip.seersigil.desc=When seeing all is not enough -tooltip.sigil_ofelementalaffinity.desc1=Perfect for a fire-breathing fish -tooltip.sigil_ofelementalaffinity.desc2=who is afraid of heights! -tooltip.sigil_ofenderseverance.desc=Put those endermen in a Dire situation! -tooltip.sigil_ofgrowth.desc1=Who needs a green thumb when -tooltip.sigil_ofgrowth.desc2=you have a green slate? -tooltip.sigil_ofhaste.desc=One dose of caffeine later... -tooltip.sigil_ofholding.desc=Used to hold several Sigils! -tooltip.sigil_ofmagnetism.desc=I have a very magnetic personality! -tooltip.sigil_ofsupression.desc=Better than telekinesis -tooltip.sigil_oftheassassin.desc=Time to stay stealthy... -tooltip.sigil_ofthebridge.desc1=Activate to create a bridge -tooltip.sigil_ofthebridge.desc2=beneath your feet. -tooltip.sigil_ofthefastminer.desc=Keep going and going and going... -tooltip.sigil_ofwind.desc=Best not to wear a skirt. -tooltip.sigil.state.activated=Activated -tooltip.sigil.state.deactivated=Deactivated -tooltip.tanksegmenter.desc1=Used to designate which -tooltip.tanksegmenter.desc2=reagents can go into a container -tooltip._teleposition_focus.desc=An Enderpearl imbued with blood -tooltip.voidsigil.desc=Better than a Swiffer! -tooltip.watersigil.desc=Infinite water, anyone? -tooltip.routingFocus.limit=Limit: -tooltip.routingFocus.desc=A focus used to route items -tooltip.alchemy.usedinincense=Purifying incense used in a crucible +item.AlchemicalWizardry.slate.blank.name=Blank Slate +item.AlchemicalWizardry.slate.reinforced.name=Reinforced Slate +item.AlchemicalWizardry.slate.imbued.name=Imbued Slate +item.AlchemicalWizardry.slate.demonic.name=Demonic Slate -#Messages -message.altar.capacity=Capacity: %s LP -message.altar.consumptionrate=Consumption Rate: -message.altar.currentessence=Altar's Current Essence: %s LP -message.altar.currenttier=Altar's Current Tier: %s -message.altar.progress=Altar's Progress: -message.altar.inputtank= Input Tank: %s LP -message.altar.outputtank= Output Tank: %s LP -message.altar.hunger=[BM] Your high regeneration rate has caused you to become hungry... -message.attunedcrystal.clearing=Clearing saved container... -message.attunedcrystal.error.cannotfind=Can no longer find linked container. -message.attunedcrystal.error.noconnections=Linked container has no connections remaining! -message.attunedcrystal.error.toofar=Linked container is either too far or is in a different dimension. -message.attunedcrystal.linked=Container is now linked. Transmitting: -message.attunedcrystal.linking=Linking to selected container. -message.attunedcrystal.setto=Attuned Crystal now set to: -message.demon.shallfollow=I shall follow and protect you! -message.demon.willstay=I will stay here for now, Master. -message.destinationclearer.cleared=Destination list now cleared. -message.divinationsigil.amount=Amount: -message.divinationsigil.currentessence=Current Essence: -message.divinationsigil.reagent=Reagent: -message.masterstone.crystalvibrates=Your crystal vibrates pathetically. -message.masterstone.energyflows=A rush of energy flows through the ritual! -message.masterstone.nothinghappened=Nothing appears to have happened... -message.masterstone.ritualresistyou=The ritual appears to actively resist you! -message.masterstone.somethingstoppedyou=Something stopped you in your tracks... -message.masterstone.youfeelapull=You feel a pull, but you are too weak to push any further. -message.ritual.currentritual=Current Ritual: -message.ritual.side.east=EAST -message.ritual.side.north=NORTH -message.ritual.side.south=SOUTH -message.ritual.side.west=WEST -message.ritualdemonportal.missingjar=A jar on one of the pillars appears to be missing... -message.tanksegmenter.nowhas=Tank now has -message.tanksegmenter.setto=Tank Segmenter now set to: -message.tanksegmenter.tankssetto=tank(s) set to: -message.routerfocus.limit=Focus' Item Limit set to: +item.AlchemicalWizardry.focus.weak.name=Teleposition Focus +item.AlchemicalWizardry.focus.enhanced.name=Enhanced Teleposition Focus +item.AlchemicalWizardry.focus.reinforced.name=Reinforced Teleposition Focus +item.AlchemicalWizardry.focus.demonic.name=Demonic Teleposition Focus -#Achievements -achievement.alchemicalwizardry:firstPrick=Your First Prick! -achievement.alchemicalwizardry:firstPrick.desc=The first drop of life into the Altar... -achievement.alchemicalwizardry:weakOrb=Faintly Glowing Red... -achievement.alchemicalwizardry:weakOrb.desc=This orb will suffice...for now... +item.AlchemicalWizardry.orb.weak.name=Weak Blood Orb +item.AlchemicalWizardry.orb.apprentice.name=Apprentice Blood Orb +item.AlchemicalWizardry.orb.magician.name=Magician Blood Orb +item.AlchemicalWizardry.orb.master.name=Master Blood Orb +item.AlchemicalWizardry.orb.archmage.name=Archmage Blood Orb +item.AlchemicalWizardry.orb.transcendent.name=Transcendent Blood Orb -#G-API Downloading -bm.versioning.getGAPI=["[BM] You don't have Guide-API installed! Install it to get it to unlock the book! [",{"text":"Download","color":"red","hoverEvent":{"action":"show_text","value":{"text":"Click this to auto-magically download the latest version","color":"red"}},"clickEvent":{"action":"run_command","value":"/bloodmagic-download-g-api"}},"]"] -bm.versioning.startingDownload=[{"text":"Starting download of %s Please do not remove your hard disk.", "color":"orange"}] -bm.versioning.doneDownloading=Finished downloading %s Reload your game to update. -bm.versioning.error=An error has occurred while downloading the mod! -bm.versioning.downloadedAlready=You have the latest version already, reload your game to update! -bm.versioning.downloadingAlready=It's downloading! Be patient! -bm.versioning.disabled=This feature is disabled. +item.AlchemicalWizardry.reagent.incendium.name=Incendium +item.AlchemicalWizardry.reagent.magicales.name=Magicales +item.AlchemicalWizardry.reagent.sanctus.name=Sanctus +item.AlchemicalWizardry.reagent.aether.name=Aether +item.AlchemicalWizardry.reagent.crepitous.name=Crepitous +item.AlchemicalWizardry.reagent.crystallos.name=Crystallos +item.AlchemicalWizardry.reagent.terrae.name=Terrae +item.AlchemicalWizardry.reagent.aquasalus.name=Aquasalus +item.AlchemicalWizardry.reagent.tennebrae.name=Tennebrae +item.AlchemicalWizardry.reagent.offensa.name=Offensa +item.AlchemicalWizardry.reagent.praesidium.name=Praesidium +item.AlchemicalWizardry.reagent.orbisterrae.name=Orbis Terrae +item.AlchemicalWizardry.reagent.virtus.name=Virtus +item.AlchemicalWizardry.reagent.reductus.name=Reductus +item.AlchemicalWizardry.reagent.potentia.name=Potentia + +item.AlchemicalWizardry.sigil.air.name=Air Sigil +item.AlchemicalWizardry.sigil.bloodLight.name=Sigil of the Blood Lamp +item.AlchemicalWizardry.sigil.compression.name=Sigil of Compression +item.AlchemicalWizardry.sigil.divination.name=Divination Sigil + +# Tooltips +tooltip.AlchemicalWizardry.orb.desc=Stores raw Life Essence +tooltip.AlchemicalWizardry.orb.owner=Added by: %s +tooltip.AlchemicalWizardry.currentOwner=&oOwner: %s +tooltip.sigil.air.desc=I feel lighter already... +tooltip.sigil.bloodLight.desc=I see a light! +tooltip.sigil.compression.desc=Hands of Diamonds +tooltip.sigil.divination.desc=Peer into the soul \ No newline at end of file diff --git a/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang_old b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang_old new file mode 100644 index 00000000..2d74a6ce --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang_old @@ -0,0 +1,542 @@ +#Items +item.AlchemicalWizardry.bindable.activationCrystal.weak.name=Weak Activation Crystal +item.AlchemicalWizardry.bindable.activationCrystal.awakened.name=Awakened Activation Crystal +item.AlchemicalWizardry.bindable.activationCrystal.creative.name=Creative Activation Crystal + +item.AlchemicalWizardry.dagger.name=Sacrificial Dagger +item.AlchemicalWizardry.dagger.creative.name=Creative Sacrificial Dagger + +item.AlchemicalWizardry.scribe.water.name=Water Scribing Tools +item.AlchemicalWizardry.scribe.fire.name=Fire Scribing Tools +item.AlchemicalWizardry.scribe.earth.name=Earth Scribing Tools +item.AlchemicalWizardry.scribe.air.name=Air Scribing Tools +item.AlchemicalWizardry.scribe.dusk.name=Dusk Scribing Tools +item.AlchemicalWizardry.scribe.dawn.name=Dawn Scribing Tools + +item.AlchemicalWizardry.slate.blank.name=Blank Slate +item.AlchemicalWizardry.slate.reinforced.name=Reinforced Slate +item.AlchemicalWizardry.slate.imbued.name=Imbued Slate +item.AlchemicalWizardry.slate.demonic.name=Demonic Slate + +item.AlchemicalWizardry.focus.weak.name=Teleposition Focus +item.AlchemicalWizardry.focus.enhanced.name=Enhanced Teleposition Focus +item.AlchemicalWizardry.focus.reinforced.name=Reinforced Teleposition Focus +item.AlchemicalWizardry.focus.demonic.name=Demonic Teleposition Focus + +item.AlchemicalWizardry.orb.weak.name=Weak Blood Orb +item.AlchemicalWizardry.orb.apprentice.name=Apprentice Blood Orb +item.AlchemicalWizardry.orb.magician.name=Magician Blood Orb +item.AlchemicalWizardry.orb.master.name=Master Blood Orb +item.AlchemicalWizardry.orb.archmage.name=Archmage Blood Orb +item.AlchemicalWizardry.orb.transcendent.name=Transcendent Blood Orb + +item.AlchemicalWizardry.reagent.incendium.name=Incendium +item.AlchemicalWizardry.reagent.magicales.name=Magicales +item.AlchemicalWizardry.reagent.sanctus.name=Sanctus +item.AlchemicalWizardry.reagent.aether.name=Aether +item.AlchemicalWizardry.reagent.crepitous.name=Crepitous +item.AlchemicalWizardry.reagent.crystallos.name=Crystallos +item.AlchemicalWizardry.reagent.terrae.name=Terrae +item.AlchemicalWizardry.reagent.aquasalus.name=Aquasalus +item.AlchemicalWizardry.reagent.tennebrae.name=Tennebrae +item.AlchemicalWizardry.reagent.offensa.name=Offensa +item.AlchemicalWizardry.reagent.praesidium.name=Praesidium +item.AlchemicalWizardry.reagent.orbisterrae.name=Orbis Terrae +item.AlchemicalWizardry.reagent.virtus.name=Virtus +item.AlchemicalWizardry.reagent.reductus.name=Reductus +item.AlchemicalWizardry.reagent.potentia.name=Potentia + +item.AlchemicalWizardry.sigil.air.name=Air Sigil +item.AlchemicalWizardry.sigil.bloodLight.name=Sigil of the Blood Lamp +item.AlchemicalWizardry.sigil.compression.name=Sigil of Compression +item.AlchemicalWizardry.sigil.divination.name=Divination Sigil + +# Tooltips +tooltip.sigil.air.desc=I feel lighter already... +tooltip.sigil.bloodLight.desc=I see a light! +tooltip.sigil.compression.desc=Hands of Diamonds +tooltip.sigil.divination.desc=Peer into the soul + +#Block Localization +tile.altar.name=Blood Altar +tile.blood_rune.blank.name=Blood Rune +tile.blood_rune.fill.name=Rune of Augmented Capacity +tile.blood_rune.empty.name=Rune of Dislocation +tile.blood_rune.orb.name=Rune of the Orb +tile.blood_rune.betterCapacity.name=Rune of Superior Capacity +tile.blood_rune.acceleration.name=Rune of Acceleration +tile.speed_rune.name=Speed Rune +tile.efficiency_rune.name=Efficiency Rune +tile.sacrifice_rune.name=Rune of Sacrifice +tile.self_sacrifice_rune.name=Rune of Self-Sacrifice +tile.ritual_stone.name=Ritual Stone +tile.master_ritual_stone.name=Master Ritual Stone +tile.filled_socket.name=Filled Socket +tile.imperfect_ritual_stone.name=Imperfect Ritual Stone +tile.soul_armour_forge.name=Soul Armour Forge +tile.empty_socket.name=Empty Socket +tile.bloodstone_brick.name=Bloodstone Brick +tile.large_bloodstone_brick.name=Large Bloodstone Brick +tile.chemistry_set.name=Alchemical Chemistry Set +tile.spell_table.name=Spell Table +tile.pedestal.name=Arcane Pedestal +tile.plinth.name=Arcane Plinth +tile.teleposer.name=Teleposer +tile.spell_conduit.name=Spell Conduit +tile.spell_paradigm.projectile.name=Particle Generator +tile.spell_paradigm.self.name=Self Augmentator +tile.spell_paradigm.melee.name=Melee Aggregator +tile.spell_paradigm.tool.name=Tool Forger +tile.spell_enhancement.power1.name=Unstable Spell Empowerer +tile.spell_enhancement.power2.name=Standard Spell Empowerer +tile.spell_enhancement.power3.name=Reinforced Spell Empowerer +tile.spell_enhancement.power4.name=Imbued Spell Empowerer +tile.spell_enhancement.power5.name=Demonic Spell Empowerer +tile.spell_enhancement.cost1.name=Unstable Spell Dampener +tile.spell_enhancement.cost2.name=Standard Spell Dampener +tile.spell_enhancement.cost3.name=Reinforced Spell Dampener +tile.spell_enhancement.cost4.name=Imbued Spell Dampener +tile.spell_enhancement.cost5.name=Demonic Spell Dampener +tile.spell_enhancement.potency1.name=Unstable Spell Augmentor +tile.spell_enhancement.potency2.name=Standard Spell Augmentor +tile.spell_enhancement.potency3.name=Reinforced Spell Augmentor +tile.spell_enhancement.potency4.name=Imbued Spell Augmentor +tile.spell_enhancement.potency5.name=Demonic Spell Augmentor +tile.spell_modifier.default.name=Default Spell Modifier +tile.spell_modifier.offensive.name=Offensive Spell Modifier +tile.spell_modifier.defensive.name=Defensive Spell Modifier +tile.spell_modifier.environmental.name=Environmental Spell Modifier +tile.spell_effect.fire.name=Crucible of Fire +tile.spell_effect.ice.name=Ice Maker +tile.spell_effect.wind.name=Wind Generator +tile.spell_effect.earth.name=Earth Former +tile.alchemical_calcinator.name=Alchemical Calcinator +tile.crystal_belljar.name=Crystal Belljar +tile.reagent_conduit.name=Alchemy Relay +tile.life_essence.name=Life Essence +tile.crystal_block.fullCrystal.name=Crystal Cluster +tile.crystal_block.crystalBrick.name=Crystal Cluster Brick +tile.demon_portal.name=Demon Portal +tile.demon_chest.name=Demon's Chest +tile.enchantment_glyph.enchantability.name=Glyph of the Adept Enchanter +tile.enchantment_glyph.enchantmentLevel.name=Glyph of Arcane Potential +tile.stability_glyph.stability1.name=Glyph of Rigid Stability +tile.schematic_saver.name=Schematic Saver +tile.mimic_block.name=Mimic Block +tile.spectral_container.name=Spectral Container +tile.blood_light.name=Blood Light +tile.spectral_block.name=Spectral Block +tile.incense_crucible.name=Incense Crucible + +#Item Localization +item.weak_blood_orb.name=Weak Blood Orb +item.apprentice_blood_orb.name=Apprentice Blood Orb +item.magician_blood_orb.name=Magician's Blood Orb +item.master_blood_orb.name=Master Blood Orb +item.archmage_blood_orb.name=Archmage's Blood Orb +item.energy_blast.name=Energy Blaster +item.energy_sword.name=Bound Blade +item.lava_crystal.name=Lava Crystal +item.water_sigil.name=Water Sigil +item.lava_sigil.name=Lava Sigil +item.void_sigil.name=Void Sigil +item.blank_slate.name=Blank Slate +item.reinforced_slate.name=Reinforced Slate +item.sacrificial_dagger.name=Sacrificial Knife +item.dagger_of_sacrifice.name=Dagger of Sacrifice +item.air_sigil.name=Air Sigil +item.sigil_of_the_fast_miner.name=Sigil of the Fast Miner +item.sigil_of_elemental_affinity.name=Sigil of Elemental Affinity +item.sigil_of_haste.name=Sigil of Haste +item.sigil_of_holding.name=Sigil of Holding +item.divination_sigil.name=Divination Sigil +item.water_scribe_tool.name=Elemental Inscription Tool: Water +item.fire_scribe_tool.name=Elemental Inscription Tool: Fire +item.earth_scribe_tool.name=Elemental Inscription Tool: Earth +item.air_scribe_tool.name=Elemental Inscription Tool: Air +item.dusk_scribe_tool.name=Elemental Inscription Tool: Dusk +item.activation_crystal_weak.name=Weak Activation Crystal +item.activation_crystal_awakened.name=Awakened Activation Crystal +item.activation_crystal_creative.name=Creative Activation Crystal +item.bound_pickaxe.name=Bound Pickaxe +item.bound_axe.name=Bound Axe +item.bound_shovel.name=Bound Shovel +item.bound_helmet.name=Bound Helmet +item.bound_chestplate.name=Bound Chestplate +item.bound_leggings.name=Bound Leggings +item.bound_boots.name=Bound Boots +item.weak_blood_shard.name=Weak Blood Shard +item.growth_sigil.name=Sigil of the Green Grove +item.blank_spell.name=Unbound Crystal +item.alchemy_flask.name=Potion Flask +item.standard_binding_agent.name=Standard Binding Agent +item.mundane_power_catalyst.name=Mundane Power Catalyst +item.average_power_catalyst.name=Average Power Catalyst +item.greater_power_catalyst.name=Greater Power Catalyst +item.mundane_lengthening_catalyst.name=Mundane Lengthening Catalyst +item.average_lengthening_catalyst.name=Average Lengthening Catalyst +item.greater_lengthening_catalyst.name=Greater Lengthening Catalyst +item.incendium.name=Incendium +item.magicales.name=Magicales +item.sanctus.name=Sanctus +item.aether.name=Aether +item.simple_catalyst.name=Simple Catalyst +item.crepitous.name=Crepitous +item.crystallos.name=Crystallos +item.terrae.name=Terrae +item.aquasalus.name=Aquasalus +item.tennebrae.name=Tenebrae +item.demon_blood_shard.name=Demon Blood Shard +item.sigil_of_wind.name=Sigil of the Whirlwind +item.teleposition_focus.name=Teleposition Focus +item.enhanced_teleposition_focus.name=Enhanced Teleposition Focus +item.reinforced_teleposition_focus.name=Reinforced Teleposition Focus +item.demonic_teleposition_focus.name=Demonic Teleposition Focus +item.imbued_slate.name=Imbued Slate +item.demonic_slate.name=Demonic Slate +item.sigil_of_the_bridge.name=Sigil of the Phantom Bridge +item.armour_inhibitor.name=Armour Inhibitor +item.creative_orb.name=Orb of Testing +item.weak_filling_agent.name=Weak Filling Agent +item.standard_filling_agent.name=Standard Filling Agent +item.enhanced_filling_agent.name=Enhanced Filling Agent +item.weak_binding_agent.name=Weak Binding Agent +item.ritual_diviner.name=Ritual Diviner +item.ritual_dismantler.name=Ritual Dismantler +item.sigil_of_magnetism.name=Sigil of Magnetism +item.key_of_binding.name=Key of Binding +item.energy_bazooka.name=Energy Bazooka +item.blood_light_sigil.name=Sigil of the Blood Lamp +item.complex_spell_crystal.name=Complex Spell Crystal +item.sigil_of_supression.name=Sigil of Supression +item.sigil_of_ender_severance.name=Sigil of Ender Severance +item.bucket_life.name=Bucket of Life +item.base_items.quartz_rod.name=Quartz Rod +item.base_items.empty_core.name=Empty Core +item.base_items.magicales_cable.name=Magicales Cable +item.base_items.wood_brace.name=Wooden Brace +item.base_items.stone_brace.name=Stone Brace +item.base_items.projectile_core.name=Projectile Core +item.base_items.self_core.name=Self Core +item.base_items.melee_core.name=Melee Core +item.base_items.tool_core.name=Tool Core +item.base_items.paradigm_back_plate.name=Paradigm Plate +item.base_items.output_cable.name=Output Spell Cable +item.base_items.input_cable.name=Input Spell Cable +item.base_items.flame_core.name=Fire Core +item.base_items.icy_core.name=Icy Core +item.base_items.gust_core.name=Gusty Core +item.base_items.earthen_core.name=Earthen Core +item.base_items.cracked_runic_plate.name=Cracked Runic Plate +item.base_items.runic_plate.name=Runic Plate +item.base_items.scribed_runic_plate.name=Imbued Runic Plate +item.base_items.default_core.name=Unattuned Core +item.base_items.offensive_core.name=Offensive Core +item.base_items.defensive_core.name=Defensive Core +item.base_items.environmental_core.name=Environmental Core +item.base_items.power_core.name=Power Core +item.base_items.cost_core.name=Reduction Core +item.base_items.potency_core.name=Potency Core +item.base_items.obsidian_brace.name=Obsidian Brace +item.base_items.ethereal_slate.name=Ethereal Slate +item.base_items.life_shard.name=Life Shard +item.base_items.soul_shard.name=Soul Shard +item.base_items.life_brace.name=Living Brace +item.base_items.soul_runic_plate.name=Soul Runic Plate +item.base_items.ender_shard.name=Ender Shard +item.base_alchemy_items.offensa.name=Offensa +item.base_alchemy_items.praesidium.name=Praesidium +item.base_alchemy_items.orbis_terrae.name=Orbis Terrae +item.base_alchemy_items.strengthened_catalyst.name=Strengthened Catalyst +item.base_alchemy_items.concentrated_catalyst.name=Concentrated Catalyst +item.base_alchemy_items.fractured_bone.name=Fractured Bone +item.base_alchemy_items.virtus.name=Virtus +item.base_alchemy_items.reductus.name=Reductus +item.base_alchemy_items.potentia.name=Potentia +item.sanguine_helmet.name=Sanguine Helmet +item.seer_sigil.name=Sigil of Sight +item.fluid_sigil.name=Sigil of Fluidity +item.multi_tool.name=Dynamic Mace +item.combinational_catalyst.name=Combinational Catalyst +item.sanguine_robe.name=Sanguine Robes +item.sanguine_pants.name=Sanguine Leggings +item.sanguine_boots.name=Sanguine Boots +item.alchemical_router.name=Alchemic Router +item.alchemical_segmenter.name=Alchemic Segmenter +item.alchemical_cleanser.name=Alchemic Cleanser +item.demon_crystal.name=Demon Crystal +item.creative_dagger.name=Creative Sacrificial Knife +item.blood_pack.name=Blood Letter's Pack +item.harvest_sigil.name=Harvest Goddess Sigil +item.compression_sigil.name=Sigil of Compression +item.assassin_sigil.name=Sigil of the Assassin +item.transcendent_blood_orb.name=Transcendent Blood Orb +item.mail_catalogue.name=Mail Order Catalogue +item.input_routing_focus.name=Input Routing Focus +item.output_routing_focus.default.name=Default Output Routing Focus +item.output_routing_focus.modItem.name=Output Routing Focus (ModItem) +item.output_routing_focus.ignMeta.name=Output Routing Focus (Ignore Meta) +item.output_routing_focus.matchNBT.name=Output Routing Focus (MatchNBT) +item.output_routing_focus.global.name=Output Routing Focus (Global) +item.dawn_scribe_tool.name=Elemental Inscription Tool: Dawn +item.bound_helmet_earth.name=Earth Omega Helmet +item.bound_chestplate_earth.name=Earth Omega Chestplate +item.bound_leggings_earth.name=Earth Omega Leggings +item.bound_boots_earth.name=Earth Omega Boots +item.bound_helmet_wind.name=Wind Omega Helmet +item.bound_chestplate_wind.name=Wind Omega Chestplate +item.bound_leggings_wind.name=Wind Omega Leggings +item.bound_boots_wind.name=Wind Omega Boots +item.bound_helmet_fire.name=Fire Omega Helmet +item.bound_chestplate_fire.name=Fire Omega Chestplate +item.bound_leggings_fire.name=Fire Omega Leggings +item.bound_boots_fire.name=Fire Omega Boots +item.bound_helmet_water.name=Water Omega Helmet +item.bound_chestplate_water.name=Water Omega Chestplate +item.bound_leggings_water.name=Water Omega Leggings +item.bound_boots_water.name=Water Omega Boots + +item.incense.wood_ash.name=Wood Ash +item.incense.byrrus.name=Byrrus +item.incense.livens.name=Livens +item.incense.viridis.name=Viridis +item.incense.purpura.name=Purpura + +#Creative Tab +itemGroup.tabBloodMagic=Blood Magic + +#Extra Strings +bm.string.consume=Usage +bm.string.drain=Drain +bm.string.tier=Tier +bm.string.crafting.orb.shaped=Shaped Orb Crafting +bm.string.crafting.orb.shapeless=Shapeless Orb Crafting +text.recipe.altar=Blood Altar +text.recipe.altar.tier=Tier: %s +text.recipe.altar.bloodRequired=LP: %s +text.recipe.shapedOrb=Shaped Orb Recipe + +#Entities +entity.AWWayofTime.EarthElemental.name=Earth Elemental +entity.AWWayofTime.FireElemental.name=Fire Elemental +entity.AWWayofTime.HolyElemental.name=Holy Elemental +entity.AWWayofTime.ShadeElemental.name=Shade Elemental +entity.AWWayofTime.WaterElemental.name=Water Elemental +entity.AWWayofTime.AirElemental.name=Air Elemental +entity.AWWayofTime.Shade.name=Shade +entity.AWWayofTime.BoulderFist.name=Boulder Fist +entity.AWWayofTime.IceDemon.name=Ice Demon +entity.AWWayofTime.SmallEarthGolem.name=Small Earth Golem +entity.AWWayofTime.WingedFireDemon.name=Winged Fire Demon +entity.AWWayofTime.BileDemon.name=Bile Demon +entity.AWWayofTime.LowerGuardian.name=Lower Guardian +entity.AWWayofTime.FallenAngel.name=Fallen Angel +entity.AWWayofTime.MinorDemonGruntGuardian.name=Demon Grunt Guardian +entity.AWWayofTime.MinorDemonGruntGuardianWind.name=Wind Demon Grunt Guardian +entity.AWWayofTime.MinorDemonGruntGuardianFire.name=Fire Demon Grunt Guardian +entity.AWWayofTime.MinorDemonGruntGuardianIce.name=Ice Demon Grunt Guardian +entity.AWWayofTime.MinorDemonGruntGuardianEarth.name=Earth Demon Grunt Guardian +entity.AWWayofTime.MinorDemonGruntWind.name=Wind Demon Grunt +entity.AWWayofTime.MinorDemonGruntFire.name=Fire Demon Grunt +entity.AWWayofTime.MinorDemonGruntIce.name=Ice Demon Grunt +entity.AWWayofTime.MinorDemonGruntEarth.name=Earth Demon Grunt +entity.AWWayofTime.MinorDemonGrunt.name=Demon Grunt + +#Commands +commands.soulnetwork.usage=/soulnetwork +commands.bind.usage=/bind +commands.bind.success=Item successfully bound! +commands.bind.failed.noPlayer=There is no player specified +commands.bind.failed.alreadyBound=Item is already bound; use /unbind to unbind it +commands.bind.failed.notBindable=Item cannot be bound +commands.unbind.usage=/unbind +commands.unbind.success=Item successfully unbound! +commands.unbind.failed.notBindable=Item cannot be unbound +commands.soulnetwork.usage=/soulnetwork [amount] +commands.soulnetwork.add.success=Successfully added %dLP to %s's Soul Network! +commands.soulnetwork.subtract.success=Successfully subtracted %dLP from %s's Soul Network! +commands.soulnetwork.fill.success=Successfully filled %s's Soul Network! +commands.soulnetwork.empty.success=Successfully emptied %s's Soul Network! +commands.soulnetwork.get.success=There is %dLP in %s's Soul Network! +commands.soulnetwork.noPlayer=There is no player specified +commands.soulnetwork.noCommand=There is no command specified +commands.soulnetwork.notACommand=That is not a valid command +commands.soulnetwork.fillMax.success=Successfully filled %s's Soul Network to their orb max! +commands.soulnetwork.create.success=Successfully created %s's Soul Network (Orb tier: %d) + +#Tooltips +tooltip.activationcrystal.weak=Activates low-level rituals +tooltip.activationcrystal.awakened=Activates more powerful rituals +tooltip.activationcrystal.creative=Creative Only - activates any ritual +tooltip.airsigil.desc=I feel lighter already... +tooltip.alchemy.coords=Coords: %d, %d, %d +tooltip.alchemy.damage=Damage: +tooltip.alchemy.dimension=Bound Dimension: %d +tooltip.alchemy.direction=Direction: +tooltip.alchemy.forrecipe=for Recipe +tooltip.alchemy.press=Press +tooltip.alchemy.recipe=&9Recipe: +tooltip.alchemy.ritualid=RitualID: +tooltip.alchemy.shift=shift +tooltip.alchemy.pressShift=-Press &l&9shift &7for Recipe- +tooltip.alchemy.usedinalchemy=Used in Alchemy +tooltip.alchemyflask.caution=CAUTION: Contents are throwable +tooltip.alchemyflask.swigsleft=Swigs Left: +tooltip.armorinhibitor.desc1=Used to suppress a soul's +tooltip.armorinhibitor.desc2=unnatural abilities. +tooltip.attunedcrystal.desc1=A tool to tune alchemy +tooltip.attunedcrystal.desc2=reagent transmission +tooltip.blankspell.desc=Crystal of infinite possibilities. +tooltip.bloodframe.desc=Stirs bees into a frenzy. +tooltip.bloodletterpack.desc=This pack really chaffes... +tooltip.bloodlightsigil.desc=I see a light! +tooltip.boundarmor.devprotect=Devilish Protection +tooltip.boundaxe.desc=Axe me about my puns! +tooltip.boundpickaxe.desc1=The Souls of the Damned +tooltip.boundpickaxe.desc2=do not like stone... +tooltip.boundshovel.desc=No, not that type of spade. +tooltip.caution.desc1=Caution: may cause +tooltip.caution.desc2=a bad day... +tooltip.cheatyitem.desc1=Right-click to fill network, +tooltip.cheatyitem.desc2=shift-right to empty. +tooltip.complexspellcrystal.desc=Crystal of unimaginable power +tooltip.crystalbelljar.contents=Current Contents: +tooltip.crystalbelljar.empty=- Empty +tooltip.telepositionfocus.demonic.desc1=A stronger version of the focus, +tooltip.telepositionfocus.demonic.desc2=using a demonic shard +tooltip.demonplacer.desc=Used to spawn demons. +tooltip.destclearer.desc1=Used to clear the destination +tooltip.destclearer.desc2=list for an alchemy container +tooltip.diablokey.desc=Binds other items to the owner's network +tooltip.divinationsigil.desc1=Peer into the soul to +tooltip.divinationsigil.desc2=get the current essence +tooltip.energybazooka.desc=Boom. +tooltip.energybattery.desc=Stores raw Life Essence +tooltip.energyblast.desc1=Used to fire devastating +tooltip.energyblast.desc2=projectiles. +tooltip.telepositionfocus.enhanced.desc1=A focus further enhanced in an altar +tooltip.fluidsigil.beastmode=Beast Mode +tooltip.fluidsigil.desc=A sigil with a lovely affinity for fluids +tooltip.fluidsigil.draintankmode=Drain Tank Mode +tooltip.fluidsigil.filltankmode=Fill Tank Mode +tooltip.fluidsigil.fluidplacementmode=Fluid Placement Mode +tooltip.fluidsigil.forcesyphonmode=Force-syphon Mode +tooltip.fluidsigil.syphoningmode=Syphoning Mode +tooltip.harvestsigil.desc=You sow what you reap +tooltip.infusedstone.desc1=Infused stone inside of +tooltip.infusedstone.desc2=a blood altar +tooltip.item.iteminslot=Item in slot +tooltip.item.currentitem=Current Item: +tooltip.lavacrystal.desc1=Store life to smelt +tooltip.lavacrystal.desc2=stuff in the furnace. +tooltip.lavasigil.desc1=Contact with liquid is +tooltip.lavasigil.desc2=highly unrecommended. +tooltip.lp.storedlp=Stored LP: +tooltip.mode.creative=Creative Only +tooltip.owner.currentowner=Current Owner: %s +tooltip.owner.demonsowner=Demon's Owner: +tooltip.packratsigil.desc=Hands of Diamonds +tooltip.reagent.selectedreagent=Currently selected reagent: +tooltip.telepositionfocus.reinforced.desc1=A stronger version of the focus, +tooltip.telepositionfocus.reinforced.desc2=using a weak shard +tooltip.ritualdiviner.airstones=Air Stones: +tooltip.ritualdiviner.blankstones=Blank Stones: +tooltip.ritualdiviner.cannotplace=Can not place Dusk runes +tooltip.ritualdiviner.canplace=Can place Dusk runes +tooltip.ritualdiviner.canplacedawn=Can place Dusk and Dawn runes +tooltip.ritualdiviner.desc=Used to explore new types of rituals +tooltip.ritualdiviner.duskstones=Dusk Stones: +tooltip.ritualdiviner.earthstones=Earth Stones: +tooltip.ritualdiviner.firestones=Fire Stones: +tooltip.ritualdiviner.moreinfo=Press shift for extended information +tooltip.ritualdiviner.ritualtunedto=Ritual tuned to face: +tooltip.ritualdiviner.waterstones=Water Stones: +tooltip.ritualdiviner.dawnstones=Dawn Stones: +tooltip.ritualdiviner.totalStones=Total Stones: +tooltip.dismatler.desc=You could turn this upside down? +tooltip.sacrificialdagger.desc1=A slight draining feeling tickles your fingers +tooltip.sacrificialdagger.desc2=Just a prick of the +tooltip.sacrificialdagger.desc3=finger will suffice... +tooltip.sanguinearmor.desc1=A pair of goggles imbued with power +tooltip.sanguinearmor.desc2=Robes imbued with forbidden power +tooltip.sanguinearmor.visdisc=Vis discount: +tooltip._scribe_tool.desc=The writing is on the wall... +tooltip.seersigil.desc=When seeing all is not enough +tooltip.sigil_ofelementalaffinity.desc1=Perfect for a fire-breathing fish +tooltip.sigil_ofelementalaffinity.desc2=who is afraid of heights! +tooltip.sigil_ofenderseverance.desc=Put those endermen in a Dire situation! +tooltip.sigil_ofgrowth.desc1=Who needs a green thumb when +tooltip.sigil_ofgrowth.desc2=you have a green slate? +tooltip.sigil_ofhaste.desc=One dose of caffeine later... +tooltip.sigil_ofholding.desc=Used to hold several Sigils! +tooltip.sigil_ofmagnetism.desc=I have a very magnetic personality! +tooltip.sigil_ofsupression.desc=Better than telekinesis +tooltip.sigil_oftheassassin.desc=Time to stay stealthy... +tooltip.sigil_ofthebridge.desc1=Activate to create a bridge +tooltip.sigil_ofthebridge.desc2=beneath your feet. +tooltip.sigil_ofthefastminer.desc=Keep going and going and going... +tooltip.sigil_ofwind.desc=Best not to wear a skirt. +tooltip.sigil.state.activated=Activated +tooltip.sigil.state.deactivated=Deactivated +tooltip.tanksegmenter.desc1=Used to designate which +tooltip.tanksegmenter.desc2=reagents can go into a container +tooltip.telepositionfocus.weak.desc1=An Enderpearl imbued with blood +tooltip.voidsigil.desc=Better than a Swiffer! +tooltip.watersigil.desc=Infinite water, anyone? +tooltip.routingFocus.limit=Limit: +tooltip.routingFocus.desc=A focus used to route items +tooltip.alchemy.usedinincense=Purifying incense used in a crucible + +#Messages +message.altar.capacity=Capacity: %s LP +message.altar.consumptionrate=Consumption Rate: +message.altar.currentessence=Altar's Current Essence: %s LP +message.altar.currenttier=Altar's Current Tier: %s +message.altar.progress=Altar's Progress: +message.altar.inputtank= Input Tank: %s LP +message.altar.outputtank= Output Tank: %s LP +message.altar.hunger=[BM] Your high regeneration rate has caused you to become hungry... +message.attunedcrystal.clearing=Clearing saved container... +message.attunedcrystal.error.cannotfind=Can no longer find linked container. +message.attunedcrystal.error.noconnections=Linked container has no connections remaining! +message.attunedcrystal.error.toofar=Linked container is either too far or is in a different dimension. +message.attunedcrystal.linked=Container is now linked. Transmitting: +message.attunedcrystal.linking=Linking to selected container. +message.attunedcrystal.setto=Attuned Crystal now set to: +message.demon.shallfollow=I shall follow and protect you! +message.demon.willstay=I will stay here for now, Master. +message.destinationclearer.cleared=Destination list now cleared. +message.divinationsigil.amount=Amount: +message.divinationsigil.currentessence=Current Essence: %d LP +message.divinationsigil.reagent=Reagent: %s, Amount: %d +message.masterstone.crystalvibrates=Your crystal vibrates pathetically. +message.masterstone.energyflows=A rush of energy flows through the ritual! +message.masterstone.nothinghappened=Nothing appears to have happened... +message.masterstone.ritualresistyou=The ritual appears to actively resist you! +message.masterstone.somethingstoppedyou=Something stopped you in your tracks... +message.masterstone.youfeelapull=You feel a pull, but you are too weak to push any further. +message.ritual.currentritual=Current Ritual: +message.ritual.side.east=EAST +message.ritual.side.north=NORTH +message.ritual.side.south=SOUTH +message.ritual.side.west=WEST +message.ritualdemonportal.missingjar=A jar on one of the pillars appears to be missing... +message.tanksegmenter.nowhas=Tank now has +message.tanksegmenter.setto=Tank Segmenter now set to: +message.tanksegmenter.tankssetto=tank(s) set to: +message.routerfocus.limit=Focus' Item Limit set to: + +#Achievements +achievement.alchemicalwizardry:firstPrick=Your First Prick! +achievement.alchemicalwizardry:firstPrick.desc=The first drop of life into the Altar... +achievement.alchemicalwizardry:weakOrb=Faintly Glowing Red... +achievement.alchemicalwizardry:weakOrb.desc=This orb will suffice...for now... + +#G-API Downloading +bm.versioning.getGAPI=["[BM] You don't have Guide-API installed! Install it to get it to unlock the book! [",{"text":"Download","color":"red","hoverEvent":{"action":"show_text","value":{"text":"Click this to auto-magically download the latest version","color":"red"}},"clickEvent":{"action":"run_command","value":"/bloodmagic-download-g-api"}},"]"] +bm.versioning.startingDownload=[{"text":"Starting download of %s Please do not remove your hard disk.", "color":"orange"}] +bm.versioning.doneDownloading=Finished downloading %s Reload your game to update. +bm.versioning.error=An error has occurred while downloading the mod! +bm.versioning.downloadedAlready=You have the latest version already, reload your game to update! +bm.versioning.downloadingAlready=It's downloading! Be patient! +bm.versioning.disabled=This feature is disabled. diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/COPY THIS - Copy (18).json b/src/main/resources/assets/alchemicalwizardry/models/block/old/COPY THIS - Copy (18).json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/COPY THIS - Copy (18).json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/COPY THIS - Copy (18).json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/COPY THIS - Copy.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/COPY THIS - Copy.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/COPY THIS - Copy.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/COPY THIS - Copy.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/COPY THIS.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/COPY THIS.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/COPY THIS.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/COPY THIS.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/base_rune.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/base_rune.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/base_rune.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/base_rune.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/base_rune_capacity.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/base_rune_capacity.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/base_rune_capacity.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/base_rune_capacity.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/bloodstone_brick.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/bloodstone_brick.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/bloodstone_brick.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/bloodstone_brick.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/efficiency_rune.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/efficiency_rune.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/efficiency_rune.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/efficiency_rune.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/empty_socket.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/empty_socket.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/empty_socket.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/empty_socket.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/enchantment_glyph.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/enchantment_glyph.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/enchantment_glyph.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/enchantment_glyph.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/filled_socket.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/filled_socket.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/filled_socket.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/filled_socket.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/imperfect_ritual_stone.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/imperfect_ritual_stone.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/imperfect_ritual_stone.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/imperfect_ritual_stone.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/large_bloodstone_brick.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/large_bloodstone_brick.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/large_bloodstone_brick.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/large_bloodstone_brick.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/master_ritual_stone.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/master_ritual_stone.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/master_ritual_stone.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/master_ritual_stone.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/sacrifice_rune.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/sacrifice_rune.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/sacrifice_rune.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/sacrifice_rune.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/self_sacrifice_rune.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/self_sacrifice_rune.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/self_sacrifice_rune.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/self_sacrifice_rune.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/soul_armour_forge.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/soul_armour_forge.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/soul_armour_forge.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/soul_armour_forge.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/spectral_block.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/spectral_block.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/spectral_block.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/spectral_block.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/speed_rune.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/speed_rune.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/speed_rune.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/speed_rune.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/spell_table.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/spell_table.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/spell_table.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/spell_table.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/stability_glyph.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/stability_glyph.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/stability_glyph.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/stability_glyph.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/teleposer.json b/src/main/resources/assets/alchemicalwizardry/models/block/old/teleposer.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/block/teleposer.json rename to src/main/resources/assets/alchemicalwizardry/models/block/old/teleposer.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemActivationCrystal0.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemActivationCrystal0.json new file mode 100644 index 00000000..462af689 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemActivationCrystal0.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/activationCrystalWeak" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemActivationCrystal1.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemActivationCrystal1.json new file mode 100644 index 00000000..5a9b053f --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemActivationCrystal1.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/activationCrystalAwakened" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemActivationCrystal2.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemActivationCrystal2.json new file mode 100644 index 00000000..462af689 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemActivationCrystal2.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/activationCrystalWeak" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbApprentice.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbApprentice.json new file mode 100644 index 00000000..23c4fc3e --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbApprentice.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/ApprenticeBloodOrb" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbArchmage.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbArchmage.json new file mode 100644 index 00000000..9bbec825 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbArchmage.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/ArchmageBloodOrb" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbMagician.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbMagician.json new file mode 100644 index 00000000..165d2e7d --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbMagician.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/MagicianBloodOrb" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbMaster.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbMaster.json new file mode 100644 index 00000000..ec7c1db5 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbMaster.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/MasterBloodOrb" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbTranscendent.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbTranscendent.json new file mode 100644 index 00000000..514752b8 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbTranscendent.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/TranscendentBloodOrb" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbWeak.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbWeak.json new file mode 100644 index 00000000..e5edb788 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemBloodOrbWeak.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/WeakBloodOrb" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemModelBase.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemModelBase.json new file mode 100644 index 00000000..28b35fce --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemModelBase.json @@ -0,0 +1,15 @@ +{ + "parent":"builtin/generated", + "display": { + "thirdperson": { + "rotation": [ -90, 0, 0 ], + "translation": [ 0, 1, -3 ], + "scale": [ 0.55, 0.55, 0.55 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemSacrificialDagger.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSacrificialDagger.json new file mode 100644 index 00000000..caa1e9f3 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSacrificialDagger.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/SacrificialDagger" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool1.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool1.json new file mode 100644 index 00000000..42e76e94 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool1.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/WaterScribeTool" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool2.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool2.json new file mode 100644 index 00000000..b220c8c6 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool2.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/FireScribeTool" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool3.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool3.json new file mode 100644 index 00000000..804b97c4 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool3.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/EarthScribeTool" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool4.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool4.json new file mode 100644 index 00000000..35c7cac1 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool4.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/AirScribeTool" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool5.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool5.json new file mode 100644 index 00000000..7b20460b --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool5.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/DuskScribeTool" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool6.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool6.json new file mode 100644 index 00000000..c0ff36e2 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemScribeTool6.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/DawnScribeTool" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilAir.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilAir.json new file mode 100644 index 00000000..162b2d91 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilAir.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/AirSigil" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilBloodLight.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilBloodLight.json new file mode 100644 index 00000000..6ab9c74c --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilBloodLight.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/BloodLightSigil" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilCompression_activated.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilCompression_activated.json new file mode 100644 index 00000000..64fdda94 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilCompression_activated.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/CompressionSigil_activated" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilCompression_deactivated.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilCompression_deactivated.json new file mode 100644 index 00000000..fcb28bfa --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilCompression_deactivated.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/CompressionSigil_deactivated" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilDivination.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilDivination.json new file mode 100644 index 00000000..320fff2d --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSigilDivination.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/DivinationSigil" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemSlate0.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSlate0.json new file mode 100644 index 00000000..cf8e9b59 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSlate0.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/BlankSlate" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemSlate1.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSlate1.json new file mode 100644 index 00000000..f9a9bfac --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSlate1.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/ReinforcedSlate" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemSlate2.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSlate2.json new file mode 100644 index 00000000..6047478b --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSlate2.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/InfusedSlate" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemSlate3.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSlate3.json new file mode 100644 index 00000000..cceb6f3a --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemSlate3.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/DemonSlate" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemTelepositionFocus0.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemTelepositionFocus0.json new file mode 100644 index 00000000..8c058658 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemTelepositionFocus0.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/TeleposerFocus" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemTelepositionFocus1.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemTelepositionFocus1.json new file mode 100644 index 00000000..2bad26b4 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemTelepositionFocus1.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/EnhancedTeleposerFocus" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemTelepositionFocus2.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemTelepositionFocus2.json new file mode 100644 index 00000000..18cdbf86 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemTelepositionFocus2.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/ReinforcedTeleposerFocus" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ItemTelepositionFocus3.json b/src/main/resources/assets/alchemicalwizardry/models/item/ItemTelepositionFocus3.json new file mode 100644 index 00000000..68b5ff5e --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/ItemTelepositionFocus3.json @@ -0,0 +1,6 @@ +{ + "parent":"alchemicalwizardry:item/ItemModelBase", + "textures": { + "layer0":"alchemicalwizardry:items/DemonicTeleposerFocus" + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/COPY THIS - Copy (15).json b/src/main/resources/assets/alchemicalwizardry/models/item/old/COPY THIS - Copy (15).json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/COPY THIS - Copy (15).json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/COPY THIS - Copy (15).json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/COPY THIS - Copy (16).json b/src/main/resources/assets/alchemicalwizardry/models/item/old/COPY THIS - Copy (16).json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/COPY THIS - Copy (16).json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/COPY THIS - Copy (16).json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/COPY THIS - Copy.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/COPY THIS - Copy.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/COPY THIS - Copy.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/COPY THIS - Copy.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/COPY THIS.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/COPY THIS.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/COPY THIS.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/COPY THIS.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/aether.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/aether.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/aether.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/aether.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/air_scribe_tool.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/air_scribe_tool.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/air_scribe_tool.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/air_scribe_tool.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/air_sigil.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/air_sigil.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/air_sigil.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/air_sigil.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/alchemy_flask.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/alchemy_flask.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/alchemy_flask.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/alchemy_flask.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/apprentice_blood_orb.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/apprentice_blood_orb.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/apprentice_blood_orb.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/apprentice_blood_orb.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/aquasalus.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/aquasalus.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/aquasalus.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/aquasalus.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/archmage_blood_orb.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/archmage_blood_orb.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/archmage_blood_orb.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/archmage_blood_orb.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/armour_inhibitor_activated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/armour_inhibitor_activated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/armour_inhibitor_activated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/armour_inhibitor_activated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/armour_inhibitor_deactivated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/armour_inhibitor_deactivated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/armour_inhibitor_deactivated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/armour_inhibitor_deactivated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/average_lengthening_catalyst.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/average_lengthening_catalyst.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/average_lengthening_catalyst.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/average_lengthening_catalyst.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/average_power_catalyst.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/average_power_catalyst.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/average_power_catalyst.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/average_power_catalyst.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_alchemy_items_concentrated_catalyst.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_alchemy_items_concentrated_catalyst.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_alchemy_items_concentrated_catalyst.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_alchemy_items_concentrated_catalyst.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_alchemy_items_fractured_bone.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_alchemy_items_fractured_bone.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_alchemy_items_fractured_bone.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_alchemy_items_fractured_bone.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_alchemy_items_offensa.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_alchemy_items_offensa.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_alchemy_items_offensa.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_alchemy_items_offensa.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_alchemy_items_orbis_terrae.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_alchemy_items_orbis_terrae.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_alchemy_items_orbis_terrae.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_alchemy_items_orbis_terrae.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_alchemy_items_potentia.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_alchemy_items_potentia.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_alchemy_items_potentia.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_alchemy_items_potentia.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_alchemy_items_praesidium.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_alchemy_items_praesidium.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_alchemy_items_praesidium.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_alchemy_items_praesidium.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_alchemy_items_reductus.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_alchemy_items_reductus.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_alchemy_items_reductus.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_alchemy_items_reductus.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_alchemy_items_strengthened_catalyst.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_alchemy_items_strengthened_catalyst.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_alchemy_items_strengthened_catalyst.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_alchemy_items_strengthened_catalyst.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_alchemy_items_virtus.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_alchemy_items_virtus.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_alchemy_items_virtus.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_alchemy_items_virtus.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_cost_core.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_cost_core.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_cost_core.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_cost_core.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_cracked_runic_plate.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_cracked_runic_plate.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_cracked_runic_plate.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_cracked_runic_plate.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_default_core.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_default_core.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_default_core.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_default_core.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_defensive_core.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_defensive_core.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_defensive_core.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_defensive_core.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_earthen_core.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_earthen_core.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_earthen_core.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_earthen_core.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_empty_core.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_empty_core.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_empty_core.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_empty_core.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_ender_shard.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_ender_shard.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_ender_shard.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_ender_shard.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_environmental_core.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_environmental_core.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_environmental_core.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_environmental_core.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_ethereal_slate.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_ethereal_slate.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_ethereal_slate.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_ethereal_slate.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_flame_core.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_flame_core.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_flame_core.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_flame_core.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_gust_core.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_gust_core.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_gust_core.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_gust_core.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_icy_core.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_icy_core.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_icy_core.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_icy_core.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_input_cable.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_input_cable.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_input_cable.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_input_cable.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_life_brace.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_life_brace.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_life_brace.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_life_brace.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_life_shard.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_life_shard.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_life_shard.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_life_shard.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_magicales_cable.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_magicales_cable.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_magicales_cable.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_magicales_cable.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_melee_core.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_melee_core.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_melee_core.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_melee_core.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_obsidian_brace.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_obsidian_brace.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_obsidian_brace.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_obsidian_brace.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_offensive_core.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_offensive_core.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_offensive_core.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_offensive_core.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_output_cable.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_output_cable.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_output_cable.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_output_cable.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_paradigm_back_plate.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_paradigm_back_plate.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_paradigm_back_plate.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_paradigm_back_plate.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_potency_core.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_potency_core.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_potency_core.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_potency_core.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_power_core.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_power_core.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_power_core.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_power_core.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_projectile_core.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_projectile_core.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_projectile_core.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_projectile_core.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_quartz_rod.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_quartz_rod.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_quartz_rod.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_quartz_rod.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_runic_plate.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_runic_plate.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_runic_plate.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_runic_plate.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_scribed_runic_plate.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_scribed_runic_plate.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_scribed_runic_plate.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_scribed_runic_plate.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_self_core.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_self_core.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_self_core.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_self_core.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_soul_runic_plate.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_soul_runic_plate.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_soul_runic_plate.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_soul_runic_plate.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_soul_shard.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_soul_shard.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_soul_shard.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_soul_shard.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_stone_brace.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_stone_brace.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_stone_brace.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_stone_brace.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_tool_core.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_tool_core.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_tool_core.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_tool_core.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/base_items_wood_brace.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_wood_brace.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/base_items_wood_brace.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/base_items_wood_brace.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/blank_slate.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/blank_slate.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/blank_slate.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/blank_slate.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/blank_spell.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/blank_spell.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/blank_spell.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/blank_spell.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/blood_light_sigil.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/blood_light_sigil.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/blood_light_sigil.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/blood_light_sigil.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/bloodstone_brick.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/bloodstone_brick.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/bloodstone_brick.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/bloodstone_brick.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/bound_boots.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/bound_boots.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/bound_boots.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/bound_boots.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/bound_chestplate.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/bound_chestplate.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/bound_chestplate.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/bound_chestplate.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/bound_helmet.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/bound_helmet.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/bound_helmet.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/bound_helmet.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/bound_leggings.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/bound_leggings.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/bound_leggings.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/bound_leggings.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/bucket_life.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/bucket_life.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/bucket_life.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/bucket_life.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/complex_spell_crystal.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/complex_spell_crystal.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/complex_spell_crystal.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/complex_spell_crystal.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/compression_sigil_activated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/compression_sigil_activated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/compression_sigil_activated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/compression_sigil_activated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/compression_sigil_deactivated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/compression_sigil_deactivated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/compression_sigil_deactivated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/compression_sigil_deactivated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/creative_dagger.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/creative_dagger.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/creative_dagger.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/creative_dagger.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/creative_orb.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/creative_orb.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/creative_orb.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/creative_orb.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/crepitous.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/crepitous.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/crepitous.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/crepitous.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/crystallos.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/crystallos.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/crystallos.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/crystallos.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/dagger_of_sacrifice.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/dagger_of_sacrifice.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/dagger_of_sacrifice.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/dagger_of_sacrifice.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/demon_blood_shard.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/demon_blood_shard.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/demon_blood_shard.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/demon_blood_shard.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/demon_crystal.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/demon_crystal.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/demon_crystal.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/demon_crystal.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/demonic_slate.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/demonic_slate.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/demonic_slate.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/demonic_slate.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/demonic_teleposition_focus.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/demonic_teleposition_focus.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/demonic_teleposition_focus.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/demonic_teleposition_focus.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/divination_sigil.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/divination_sigil.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/divination_sigil.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/divination_sigil.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/dusk_scribe_tool.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/dusk_scribe_tool.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/dusk_scribe_tool.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/dusk_scribe_tool.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/earth_scribe_tool.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/earth_scribe_tool.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/earth_scribe_tool.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/earth_scribe_tool.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/efficiency_rune.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/efficiency_rune.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/efficiency_rune.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/efficiency_rune.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/empty_socket.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/empty_socket.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/empty_socket.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/empty_socket.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/enchantment_glyph.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/enchantment_glyph.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/enchantment_glyph.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/enchantment_glyph.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/energy_blaster_activated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/energy_blaster_activated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/energy_blaster_activated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/energy_blaster_activated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/enhanced_filling_agent.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/enhanced_filling_agent.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/enhanced_filling_agent.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/enhanced_filling_agent.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/enhanced_teleposition_focus.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/enhanced_teleposition_focus.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/enhanced_teleposition_focus.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/enhanced_teleposition_focus.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/filled_socket.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/filled_socket.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/filled_socket.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/filled_socket.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/fire_scribe_tool.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/fire_scribe_tool.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/fire_scribe_tool.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/fire_scribe_tool.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/greater_lengthening_catalyst.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/greater_lengthening_catalyst.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/greater_lengthening_catalyst.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/greater_lengthening_catalyst.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/greater_power_catalyst.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/greater_power_catalyst.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/greater_power_catalyst.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/greater_power_catalyst.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/growth_sigil_activated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/growth_sigil_activated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/growth_sigil_activated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/growth_sigil_activated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/growth_sigil_deactivated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/growth_sigil_deactivated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/growth_sigil_deactivated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/growth_sigil_deactivated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/harvest_sigil_activated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/harvest_sigil_activated.json similarity index 94% rename from src/main/resources/assets/alchemicalwizardry/models/item/harvest_sigil_activated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/harvest_sigil_activated.json index 4d287ad8..ce81f1de 100644 --- a/src/main/resources/assets/alchemicalwizardry/models/item/harvest_sigil_activated.json +++ b/src/main/resources/assets/alchemicalwizardry/models/item/old/harvest_sigil_activated.json @@ -3,5 +3,4 @@ "textures": { "layer0":"alchemicalwizardry:items/HarvestSigil_activated" } -} -Goddess \ No newline at end of file +} \ No newline at end of file diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/harvest_sigil_deactivated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/harvest_sigil_deactivated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/harvest_sigil_deactivated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/harvest_sigil_deactivated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/imbued_slate.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/imbued_slate.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/imbued_slate.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/imbued_slate.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/imperfect_ritual_stone.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/imperfect_ritual_stone.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/imperfect_ritual_stone.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/imperfect_ritual_stone.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/incendium.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/incendium.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/incendium.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/incendium.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/key_of_binding.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/key_of_binding.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/key_of_binding.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/key_of_binding.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/large_bloodstone_brick.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/large_bloodstone_brick.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/large_bloodstone_brick.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/large_bloodstone_brick.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/lava_crystal.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/lava_crystal.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/lava_crystal.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/lava_crystal.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/lava_sigil.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/lava_sigil.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/lava_sigil.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/lava_sigil.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/magicales.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/magicales.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/magicales.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/magicales.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/magician_blood_orb.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/magician_blood_orb.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/magician_blood_orb.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/magician_blood_orb.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/master_blood_orb.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/master_blood_orb.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/master_blood_orb.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/master_blood_orb.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/master_ritual_stone.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/master_ritual_stone.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/master_ritual_stone.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/master_ritual_stone.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/multi_tool.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/multi_tool.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/multi_tool.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/multi_tool.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/mundane_lengthening_catalyst.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/mundane_lengthening_catalyst.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/mundane_lengthening_catalyst.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/mundane_lengthening_catalyst.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/mundane_power_catalyst.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/mundane_power_catalyst.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/mundane_power_catalyst.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/mundane_power_catalyst.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/reinforced_slate.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/reinforced_slate.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/reinforced_slate.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/reinforced_slate.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/reinforced_teleposition_focus.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/reinforced_teleposition_focus.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/reinforced_teleposition_focus.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/reinforced_teleposition_focus.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/ritual_diviner.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/ritual_diviner.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/ritual_diviner.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/ritual_diviner.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/sacrifice_rune.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/sacrifice_rune.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/sacrifice_rune.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/sacrifice_rune.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/sacrificial_dagger.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/sacrificial_dagger.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/sacrificial_dagger.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/sacrificial_dagger.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/sanctus.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/sanctus.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/sanctus.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/sanctus.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/self_sacrifice_rune.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/self_sacrifice_rune.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/self_sacrifice_rune.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/self_sacrifice_rune.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_elemental_affinity_activated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_elemental_affinity_activated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_elemental_affinity_activated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_elemental_affinity_activated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_elemental_affinity_deactivated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_elemental_affinity_deactivated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_elemental_affinity_deactivated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_elemental_affinity_deactivated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_ender_severance_activated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_ender_severance_activated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_ender_severance_activated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_ender_severance_activated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_ender_severance_deactivated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_ender_severance_deactivated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_ender_severance_deactivated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_ender_severance_deactivated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_haste_activated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_haste_activated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_haste_activated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_haste_activated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_haste_deactivated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_haste_deactivated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_haste_deactivated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_haste_deactivated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_sight.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_sight.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_sight.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_sight.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_the_bridge_activated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_the_bridge_activated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_the_bridge_activated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_the_bridge_activated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_the_bridge_deactivated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_the_bridge_deactivated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_the_bridge_deactivated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_the_bridge_deactivated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_the_fast_miner_activated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_the_fast_miner_activated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_the_fast_miner_activated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_the_fast_miner_activated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_the_fast_miner_deactivated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_the_fast_miner_deactivated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_the_fast_miner_deactivated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_the_fast_miner_deactivated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_wind_activated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_wind_activated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_wind_activated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_wind_activated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_wind_deactivated.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_wind_deactivated.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/sigil_of_wind_deactivated.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/sigil_of_wind_deactivated.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/simple_catalyst.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/simple_catalyst.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/simple_catalyst.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/simple_catalyst.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/soul_armour_forge.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/soul_armour_forge.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/soul_armour_forge.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/soul_armour_forge.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/spectral_block.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/spectral_block.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/spectral_block.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/spectral_block.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/speed_rune.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/speed_rune.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/speed_rune.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/speed_rune.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/spell_table.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/spell_table.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/spell_table.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/spell_table.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/stability_glyph.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/stability_glyph.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/stability_glyph.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/stability_glyph.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/standard_binding_agent.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/standard_binding_agent.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/standard_binding_agent.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/standard_binding_agent.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/standard_filling_agent.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/standard_filling_agent.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/standard_filling_agent.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/standard_filling_agent.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/standard_item.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/standard_item.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/standard_item.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/standard_item.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/teleposer.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/teleposer.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/teleposer.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/teleposer.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/teleposition_focus.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/teleposition_focus.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/teleposition_focus.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/teleposition_focus.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/tennebrae.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/tennebrae.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/tennebrae.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/tennebrae.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/terrae.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/terrae.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/terrae.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/terrae.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/transcendent_blood_orb.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/transcendent_blood_orb.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/transcendent_blood_orb.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/transcendent_blood_orb.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/void_sigil.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/void_sigil.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/void_sigil.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/void_sigil.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/water_scribe_tool.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/water_scribe_tool.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/water_scribe_tool.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/water_scribe_tool.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/water_sigil.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/water_sigil.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/water_sigil.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/water_sigil.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/weak_binding_agent.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/weak_binding_agent.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/weak_binding_agent.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/weak_binding_agent.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/weak_blood_orb.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/weak_blood_orb.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/weak_blood_orb.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/weak_blood_orb.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/weak_blood_shard.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/weak_blood_shard.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/weak_blood_shard.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/weak_blood_shard.json diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/weak_filling_agent.json b/src/main/resources/assets/alchemicalwizardry/models/item/old/weak_filling_agent.json similarity index 100% rename from src/main/resources/assets/alchemicalwizardry/models/item/weak_filling_agent.json rename to src/main/resources/assets/alchemicalwizardry/models/item/old/weak_filling_agent.json diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 20a2c3ce..c56bc36a 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -1,13 +1,13 @@ [ { - "modid": "AWWayofTime", + "modid": "AlchemicalWizardry", "name": "Blood Magic: Alchemical Wizardry", "description": "Rituals, spells, and more!", - "version": "v1.3.0Beta(1.7.10)", + "version": "${version}", "mcversion": "1.7.10", - "url": "http://www.minecraftforum.net/topic/1899223-", + "url": "http://www.minecraftforum.net/topic/1899223-bloodmagic", "updateUrl": "", - "authorList": ["WayofTime"], + "authorList": [ "WayofTime" ], "credits": "", "logoFile": "", "screenshots": [],