From f9ee04c99ee22b8842027dde073511e61fe1e8ae Mon Sep 17 00:00:00 2001 From: koolkrafter5 Date: Tue, 14 Jan 2025 16:20:03 -0500 Subject: [PATCH 1/5] Make meteor reagents completely configurable and add some new options to their functionality. Config files are placed in /config/BloodMagic/meteors/reagents/. Default configs will be generated if the folder is not present. Defaults will not be generated if the folder is present AND empty if you want to remove every reagent's effects. Create a file named reagentName.json to configure that reagent (orbisTerrae.json, potentia.json, ...). Reagent names may most easily be found by looking at the tooltips of belljars in NEI. Available reagent configuration options are: For the following three configs, the single largest increase (largest positive config) and single largest decrease (largest negative config) values are used, just like how Orbis Terrae completely overshadows Terrae in the old system. Default values for these three configs are all 0: radiusChange: int (change the radius of the meteor. Minimum radius is 1) fillerChanceChange: int (change the filler chance similar to how it was done with the old weight system, except the max chance is now 100 instead of 1000. For example, terrae with a fillerChanceChange of 10 is equivalent to how it increased the total weight by 100 previously. Full formula is fillerChance = (fillerChance + fillerChanceChange) * 100 / (100 + fillerChanceChange). For example, a fillerChance of 50 with Orbis Terrae's default fillerChanceChange of 20 gives a new fillerChance of about 58%. This fixes meteors with very high fillerChance values (90+) from being entirely made of filler when supplied with (Orbis) Terrae like how they were in my last commit) rawFillerChanceChange: int (directly change the filler chance by the supplied amount. fillerChance += rawFillerChanceChange. For example, a fillerChance of 50 with a rawFillerChanceChange of -20 gives a new fillerChance of 30) The final value for fillerChance will always be between 0 and 100 inclusive. Reagents will not add filler to meteors with a fillerChance of 0. rawFillerChanceChange is applied before fillerChanceChange. A reagent with fillerChanceChange of -100 will always set the fillerChance of a meteor to 0. For the following two configs, any reagent with these options set to true will apply this change to the whole meteor. Default value for both of these is false: disableExplosions: boolean (if set to true, this reagent entirely disables explosions caused by the meteor) invertExplosionBlockDamage: boolean (if set to true, this reagent inverts the setting B:doMeteorsDestroyBlocks in config/AWWayofTime.cfg for this meteor. May be used to make normally dangerous meteors safe, or can be used as a tradeoff to unlock a powerful effect when meteors are normally safe) This config's format is the same as the meteor ore and filler configs: filler: array of strings that define blocks (For example, incendium's default filler array is "minecraft:netherrack:0:60", minecraft:glowstone:0:60", minecraft:soul_sand:0:60") For best results when combining reagents, try to ensure that all reagent filler arrays you define have the same total weight. Default configs use a total of 180 because it is highly composite, but that exact number is not required to be used. The formats for blocks in the meteor and reagent configs has been slightly altered to allow certain blocks to be placed only when a specified reagent is present. The block formats are now: modId:itemName:meta:weight(:reagent1, reagent2, ... optional) OREDICT:oreDictName:weight(:reagent1, reagent2, ... optional) Don't include the () in any configs, they just show what the optional section. Spaces after the commas used to separate reagents are optional. The colon is required if any reagents are specified, and commas are required to separate multiple reagents. Any one reagent in the list must be present for that block to be present, for example: "minecraft:diamond_ore:0:100:terrae,orbisTerrae" will only allow diamond ore to be placed when either Terrae OR Orbis Terrae are present. Block lists in reagent configs CAN depend on other reagents being present! Changing tenebrae's default filler entry to "minecraft:obsidian:0:180:magicales" will make it only change the filler out for obsidian if magicales is also present. Reagents required for blocks in ore/filler lists do NOT require a config file to be present in /config/BloodMagic/meteors/reagents/, but creating an empty config file for it will not cause problems. NEI will show the tooltip "Required reagent: x, y, ..." for any meteor ores or filler blocks that require a reagent. The legacy config format [block, weight, block, weight ...] has been REMOVED. All of the meteor configs in GTNH have already been rewritten in one of the two newer formats. --- .../AlchemicalWizardry.java | 227 ++---------------- .../client/nei/NEIMeteorRecipeHandler.java | 30 ++- .../entity/projectile/EntityMeteor.java | 47 ++-- .../rituals/RitualEffectSummonMeteor.java | 19 +- .../common/summoning/meteor/Meteor.java | 15 +- .../summoning/meteor/MeteorParadigm.java | 176 ++++++++------ .../meteor/MeteorParadigmComponent.java | 31 ++- .../summoning/meteor/MeteorReagent.java | 16 ++ .../meteor/MeteorReagentRegistry.java | 213 ++++++++++++++++ .../summoning/meteor/MeteorRegistry.java | 12 +- .../common/tweaker/FallingTower.java | 3 +- .../assets/alchemicalwizardry/lang/en_US.lang | 1 + 12 files changed, 445 insertions(+), 345 deletions(-) create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorReagent.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorReagentRegistry.java diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index 6015dcb78..10318ad5d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -51,21 +51,10 @@ import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; 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.spell.*; import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; import WayofTime.alchemicalWizardry.client.nei.IMCForNEI; -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.*; import WayofTime.alchemicalWizardry.common.achievements.ModAchievements; import WayofTime.alchemicalWizardry.common.alchemy.CombinedPotionRegistry; import WayofTime.alchemicalWizardry.common.block.ArmourForge; @@ -77,218 +66,39 @@ 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.demonHoard.demon.*; 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.entity.mob.*; import WayofTime.alchemicalWizardry.common.guide.RecipeHolder; -import WayofTime.alchemicalWizardry.common.harvest.AgriCraftCropHarvestHandler; -import WayofTime.alchemicalWizardry.common.harvest.BloodMagicHarvestHandler; -import WayofTime.alchemicalWizardry.common.harvest.CactusReedHarvestHandler; -import WayofTime.alchemicalWizardry.common.harvest.GourdHarvestHandler; -import WayofTime.alchemicalWizardry.common.harvest.PamHarvestCompatRegistry; +import WayofTime.alchemicalWizardry.common.harvest.*; import WayofTime.alchemicalWizardry.common.items.ItemIncense; import WayofTime.alchemicalWizardry.common.items.ItemMailOrderCatalogue; import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; import WayofTime.alchemicalWizardry.common.items.sigil.holding.HoldingPacketHandler; import WayofTime.alchemicalWizardry.common.items.thaumcraft.ItemSanguineArmour; -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.PotionAmphibian; -import WayofTime.alchemicalWizardry.common.potion.PotionBoost; -import WayofTime.alchemicalWizardry.common.potion.PotionDeaf; -import WayofTime.alchemicalWizardry.common.potion.PotionDemonCloak; -import WayofTime.alchemicalWizardry.common.potion.PotionDrowning; -import WayofTime.alchemicalWizardry.common.potion.PotionFeatherFall; -import WayofTime.alchemicalWizardry.common.potion.PotionFireFuse; -import WayofTime.alchemicalWizardry.common.potion.PotionFlameCloak; -import WayofTime.alchemicalWizardry.common.potion.PotionFlight; -import WayofTime.alchemicalWizardry.common.potion.PotionHeavyHeart; -import WayofTime.alchemicalWizardry.common.potion.PotionIceCloak; -import WayofTime.alchemicalWizardry.common.potion.PotionInhibit; -import WayofTime.alchemicalWizardry.common.potion.PotionPlanarBinding; -import WayofTime.alchemicalWizardry.common.potion.PotionProjectileProtect; -import WayofTime.alchemicalWizardry.common.potion.PotionReciprocation; -import WayofTime.alchemicalWizardry.common.potion.PotionSoulFray; -import WayofTime.alchemicalWizardry.common.potion.PotionSoulHarden; +import WayofTime.alchemicalWizardry.common.omega.*; +import WayofTime.alchemicalWizardry.common.potion.*; 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.rituals.*; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.*; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.*; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.*; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.*; +import WayofTime.alchemicalWizardry.common.spell.simple.*; import WayofTime.alchemicalWizardry.common.summoning.SummoningHelperAW; import WayofTime.alchemicalWizardry.common.summoning.meteor.Meteor; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; -import WayofTime.alchemicalWizardry.common.tileEntity.TECrucible; -import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; -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.TETeleposer; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorReagentRegistry; +import WayofTime.alchemicalWizardry.common.tileEntity.*; import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiHandler; import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration; import WayofTime.alchemicalWizardry.compat.BloodMagicWailaPlugin; -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.*; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; -import cpw.mods.fml.common.ModContainer; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.SidedProxy; -import cpw.mods.fml.common.event.FMLInitializationEvent; -import cpw.mods.fml.common.event.FMLInterModComms; -import cpw.mods.fml.common.event.FMLPostInitializationEvent; -import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import cpw.mods.fml.common.event.FMLServerStartingEvent; +import cpw.mods.fml.common.event.*; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; @@ -3321,6 +3131,7 @@ public void postInit(FMLPostInitializationEvent event) { DemonVillageLootRegistry.init(); Meteor.loadConfig(); + MeteorReagentRegistry.loadConfig(); this.initCompressionHandlers(); } @@ -4504,7 +4315,7 @@ public String[] getGeneratedStrings(String itemName) { return strings; } - @Mod.EventHandler + @EventHandler public void initCommands(FMLServerStartingEvent event) { event.registerServerCommand(new CommandBloodMagic()); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java index 536f16029..ab6cc4a9e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.client.nei; -import java.awt.Point; -import java.awt.Rectangle; +import java.awt.*; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Arrays; @@ -16,6 +15,9 @@ import org.lwjgl.opengl.GL11; +import com.google.common.base.Joiner; + +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigmComponent; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; @@ -31,7 +33,6 @@ public class CachedMeteorRecipe extends CachedRecipe { private final List input = new ArrayList<>(); private final List outputs = new ArrayList<>(); - private final List filler = new ArrayList<>(); private final int cost; private final int radius; private Point focus; @@ -50,7 +51,7 @@ public CachedMeteorRecipe(MeteorParadigm meteor, ItemStack focusStack) { float componentRatio = 1 - fillerRatio; for (MeteorParadigmComponent component : sortedComponents) { - ItemStack stack = component.getValidBlockParadigm(); + ItemStack stack = component.getBlock(); int xPos = 3 + 18 * col; int yPos = 37 + 18 * row; @@ -58,6 +59,9 @@ public CachedMeteorRecipe(MeteorParadigm meteor, ItemStack focusStack) { float chance = component.getWeight() / totalComponentWeight * componentRatio; tooltips.add(I18n.format("nei.recipe.meteor.chance", getFormattedChance(chance))); tooltips.add(I18n.format("nei.recipe.meteor.amount", getEstimatedAmount(chance, meteor.radius))); + if (!component.getRequiredReagents().isEmpty()) { + tooltips.add(I18n.format("nei.recipe.meteor.reagent", getReagentStrings(component))); + } this.outputs.add(new TooltipStack(stack, xPos, yPos, tooltips)); col++; @@ -82,7 +86,7 @@ public CachedMeteorRecipe(MeteorParadigm meteor, ItemStack focusStack) { float totalFillerWeight = meteor.getTotalListWeight(meteor.fillerList); for (MeteorParadigmComponent filler : sortedFiller) { - ItemStack stack = filler.getValidBlockParadigm(); + ItemStack stack = filler.getBlock(); int xPos = 3 + 18 * col; int yPos = 37 + 18 * row; @@ -91,6 +95,9 @@ public CachedMeteorRecipe(MeteorParadigm meteor, ItemStack focusStack) { tooltips.add(I18n.format("nei.recipe.meteor.chance", getFormattedChance(chance))); tooltips.add(I18n.format("nei.recipe.meteor.amount", getEstimatedAmount(chance, meteor.radius))); tooltips.add(I18n.format("nei.recipe.meteor.filler")); + if (!filler.getRequiredReagents().isEmpty()) { + tooltips.add(I18n.format("nei.recipe.meteor.reagent", getReagentStrings(filler))); + } this.outputs.add(new TooltipStack(stack, xPos, yPos, tooltips)); col++; @@ -109,6 +116,15 @@ public CachedMeteorRecipe(MeteorParadigm meteor, ItemStack focusStack) { this.cost = meteor.cost; } + private String getReagentStrings(MeteorParadigmComponent component) { + ArrayList reagents = component.getRequiredReagents(); + ArrayList reagentNames = new ArrayList<>(); + for (Reagent r : reagents) { + reagentNames.add(r.name); + } + return Joiner.on(", ").join(reagentNames); + } + @Override public List getIngredients() { return this.input; @@ -152,10 +168,10 @@ public void loadCraftingRecipes(String outputId, Object... results) { @Override public void loadCraftingRecipes(ItemStack result) { for (MeteorParadigm meteor : getSortedMeteors()) { - if (meteor.componentList.stream().anyMatch(m -> matchItem(result, m.getValidBlockParadigm()))) { + if (meteor.componentList.stream().anyMatch(m -> matchItem(result, m.getBlock()))) { arecipes.add(new CachedMeteorRecipe(meteor, result)); } - if (meteor.fillerList.stream().anyMatch(m -> matchItem(result, m.getValidBlockParadigm()))) { + if (meteor.fillerList.stream().anyMatch(m -> matchItem(result, m.getBlock()))) { arecipes.add(new CachedMeteorRecipe(meteor, result)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java index 72c9759d4..27948564c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java @@ -1,22 +1,22 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; +import java.util.ArrayList; + import net.minecraft.entity.Entity; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; public class EntityMeteor extends EnergyBlastProjectile { private int meteorID; - public boolean hasTerrae; - public boolean hasOrbisTerrae; - public boolean hasCrystallos; - public boolean hasIncendium; - public boolean hasTennebrae; + public ArrayList reagentList = new ArrayList<>(); public EntityMeteor(World par1World) { super(par1World); @@ -33,11 +33,11 @@ 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); + + for (Reagent r : reagentList) { + par1NBTTagCompound.setBoolean("reagent." + r.name, true); + } + } @Override @@ -45,11 +45,11 @@ 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"); + for (Reagent r : ReagentRegistry.reagentList.values()) { + if (par1NBTTagCompound.getBoolean("reagent." + r.name)) { + reagentList.add(r); + } + } } @Override @@ -66,13 +66,7 @@ public void onImpact(MovingObjectPosition mop) { if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) { this.onImpact(mop.entityHit); } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - MeteorRegistry.createMeteorImpact( - worldObj, - mop.blockX, - mop.blockY, - mop.blockZ, - this.meteorID, - new boolean[] { hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae }); + MeteorRegistry.createMeteorImpact(worldObj, mop.blockX, mop.blockY, mop.blockZ, this.meteorID, reagentList); } this.setDead(); @@ -80,13 +74,8 @@ public void onImpact(MovingObjectPosition mop) { @Override public void onImpact(Entity mop) { - MeteorRegistry.createMeteorImpact( - worldObj, - (int) this.posX, - (int) this.posY, - (int) this.posZ, - meteorID, - new boolean[] { hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae }); + MeteorRegistry + .createMeteorImpact(worldObj, (int) this.posX, (int) this.posY, (int) this.posZ, meteorID, reagentList); this.setDead(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java index 2d5138b97..ba888b3a6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java @@ -11,6 +11,7 @@ import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; +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; @@ -56,20 +57,10 @@ public void performEffect(IMasterRitualStone ritualStone) { EntityMeteor meteor = new EntityMeteor(world, x + 0.5f, 257, z + 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; + for (Reagent r : ReagentRegistry.reagentList.values()) { + if (this.canDrainReagent(ritualStone, r, 1000, true)) { + meteor.reagentList.add(r); + } } entityItem.setDead(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/Meteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/Meteor.java index e251acf85..6f298e0e2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/Meteor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/Meteor.java @@ -16,12 +16,12 @@ public class Meteor { - private String[] ores; - private int radius; - private int cost; - private String focusModId; - private String focusName; - private int focusMeta; + public String[] ores; + public int radius; + public int cost; + public String focusModId; + public String focusName; + public int focusMeta; private String[] filler; private int fillerChance; @@ -32,6 +32,9 @@ public static void loadConfig() { if (files != null) { try { for (File f : files) { + if (f.isDirectory()) { + continue; + } BufferedReader br = new BufferedReader(new FileReader(f)); Meteor m = gson.fromJson(br, Meteor.class); MeteorRegistry.registerMeteorParadigm( diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java index d837f2791..dbe9178a3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.summoning.meteor; +import static WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorReagentRegistry.getFillerList; + import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.regex.Matcher; import java.util.regex.Pattern; -import net.minecraft.init.Blocks; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -14,6 +15,8 @@ import net.minecraftforge.oredict.OreDictionary; import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import cpw.mods.fml.common.Optional; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.common.blocks.TileEntityOres; @@ -29,10 +32,6 @@ public class MeteorParadigm { public static Random rand = new Random(); - public MeteorParadigm(ItemStack focusStack, int radius, int cost) { - new MeteorParadigm(focusStack, radius, cost, 0); - } - public MeteorParadigm(ItemStack focusStack, int radius, int cost, int fillerChance) { this.focusStack = focusStack; this.radius = radius; @@ -40,10 +39,10 @@ public MeteorParadigm(ItemStack focusStack, int radius, int cost, int fillerChan this.fillerChance = fillerChance; } - // modId:itemName:meta:weight - private static final Pattern itemNamePattern = Pattern.compile("(.*):(.*):(\\d+):(\\d+)"); - // OREDICT:oreDictName:weight - private static final Pattern oredictPattern = Pattern.compile("OREDICT:(.*):(\\d+)"); + // modId:itemName:meta:weight(:reagent1, reagent2, ... optional) + private static final Pattern itemNamePattern = Pattern.compile("(.*):(.*):(\\d+):(\\d+)(:.*)?"); + // OREDICT:oreDictName:weight(:reagent1, reagent2, ... optional) + private static final Pattern oredictPattern = Pattern.compile("OREDICT:(.*):(\\d+)(:.*)?"); public static List parseStringArray(String[] blockArray) { List addList = new ArrayList<>(); @@ -57,49 +56,60 @@ public static List parseStringArray(String[] blockArray String itemName = matcher.group(2); int meta = Integer.parseInt(matcher.group(3)); int weight = Integer.parseInt(matcher.group(4)); + String reagent = matcher.group(5); + + ArrayList reagentList = getReagents(reagent, blockName); ItemStack stack = GameRegistry.findItemStack(modID, itemName, 1); if (stack != null && stack.getItem() instanceof ItemBlock) { stack.setItemDamage(meta); - addList.add(new MeteorParadigmComponent(stack, weight)); + addList.add(new MeteorParadigmComponent(stack, weight, reagentList)); success = true; } } else if ((matcher = oredictPattern.matcher(blockName)).matches()) { String oreDict = matcher.group(1); int weight = Integer.parseInt(matcher.group(2)); + String reagent = matcher.group(3); - List list = OreDictionary.getOres(oreDict); - for (ItemStack stack : list) { - if (stack != null && stack.getItem() instanceof ItemBlock) { - addList.add(new MeteorParadigmComponent(stack, weight)); - success = true; - break; - } - } - - } else { - // Legacy config - String oreDict = blockName; - int weight = Integer.parseInt(blockArray[++i]); + ArrayList reagentList = getReagents(reagent, blockName); List list = OreDictionary.getOres(oreDict); for (ItemStack stack : list) { if (stack != null && stack.getItem() instanceof ItemBlock) { - addList.add(new MeteorParadigmComponent(stack, weight)); + addList.add(new MeteorParadigmComponent(stack, weight, reagentList)); success = true; break; } } + } if (!success) { - AlchemicalWizardry.logger.warn("Unable to add Meteor Paradigm \"" + blockName + "\""); + AlchemicalWizardry.logger.warn("Unable to add Meteor Paradigm \"{}\"", blockName); + AlchemicalWizardry.logger.warn( + "Valid formats are \"modId:itemName:meta:weight(:reagent1, reagent2, ... optional)\" and \"OREDICT:oreDictName:weight(:reagent1, reagent2, ... optional)\"."); } } return addList; } + private static ArrayList getReagents(String reagent, String blockName) { + ArrayList reagentList = new ArrayList<>(); + if (reagent != null) { + String[] reagents = reagent.substring(1).split(", ?"); + for (String str : reagents) { + Reagent r = ReagentRegistry.getReagentForKey(str); + if (r == null) { + AlchemicalWizardry.logger.warn("Unable to add reagent \"{}\" for {}.", str, blockName); + continue; + } + reagentList.add(r); + } + } + return reagentList; + } + public int getTotalListWeight(List blockList) { int totalWeight = 0; for (MeteorParadigmComponent mpc : blockList) { @@ -108,62 +118,24 @@ public int getTotalListWeight(List blockList) { return totalWeight; } - public void createMeteorImpact(World world, int x, int y, int z, 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]; - } + public void createMeteorImpact(World world, int x, int y, int z, List reagents) { + int radius = getNewRadius(this.radius, reagents); + int fillerChance = getNewFillerChance(this.fillerChance, reagents); - int newRadius = radius; - int fillerChance = this.fillerChance; - if (hasOrbisTerrae) { - newRadius += 2; - fillerChance *= 1.12; - } else if (hasTerrae) { - newRadius += 1; - fillerChance *= 1.06; - } - if (fillerChance > 100) { - fillerChance = 100; + if (MeteorReagentRegistry.doExplosions(reagents)) { + world.createExplosion(null, x, y, z, radius * 4, MeteorReagentRegistry.doMeteorsDestroyBlocks(reagents)); } - world.createExplosion(null, x, y, z, newRadius * 4, AlchemicalWizardry.doMeteorsDestroyBlocks); - - List fillerList; - - if (hasCrystallos || hasIncendium || hasTennebrae) { - fillerList = new ArrayList<>(); - if (hasCrystallos) { - fillerList.add(new MeteorParadigmComponent(new ItemStack(Blocks.ice), 180)); // 180 = 2^2 * 3^2 * 5 - } - if (hasIncendium) { - fillerList.add(new MeteorParadigmComponent(new ItemStack(Blocks.netherrack), 60)); - fillerList.add(new MeteorParadigmComponent(new ItemStack(Blocks.soul_sand), 60)); - fillerList.add(new MeteorParadigmComponent(new ItemStack(Blocks.glowstone), 60)); - } - if (hasTennebrae) { - fillerList.add(new MeteorParadigmComponent(new ItemStack(Blocks.obsidian), 180)); - } - } else { - fillerList = this.fillerList; - } + List componentList = removeBlocksMissingRequiredReagents(this.componentList, reagents); + List fillerList = getNewFillerList(this.fillerList, reagents); int totalComponentWeight = getTotalListWeight(componentList); int totalFillerWeight = getTotalListWeight(fillerList); - 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)) { + 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; } @@ -181,6 +153,60 @@ public void createMeteorImpact(World world, int x, int y, int z, boolean[] flags } } + private int getNewRadius(int radius, List reagents) { + radius += MeteorReagentRegistry.getLargestRadiusIncrease(reagents); + radius += MeteorReagentRegistry.getLargestRadiusDecrease(reagents); + return Math.max(radius, 1); + } + + private int getNewFillerChance(int fillerChance, List reagents) { + // Don't add filler to meteors with none + if (fillerChance <= 0) { + return 0; + } + + int increase = MeteorReagentRegistry.getLargestFillerChanceIncrease(reagents); + int decrease = MeteorReagentRegistry.getLargestFillerChanceDecrease(reagents); + // Avoid division by zero + if (decrease == -100) { + return 0; + } + + fillerChance += MeteorReagentRegistry.getLargestRawFillerChanceIncrease(reagents); + fillerChance += MeteorReagentRegistry.getLargestRawFillerChanceDecrease(reagents); + if (increase > 0) { + fillerChance = (fillerChance + increase) * 100 / (100 + increase); + } else if (decrease < 0) { + fillerChance = (fillerChance + decrease) * 100 / (100 + decrease); + } + return Math.max(0, Math.min(fillerChance, 100)); + } + + private List getNewFillerList(List fillerList, + List reagents) { + List reagentFillers = getFillerList(reagents); + reagentFillers = removeBlocksMissingRequiredReagents(reagentFillers, reagents); + if (!reagentFillers.isEmpty()) { + return reagentFillers; + } + List newFillers = removeBlocksMissingRequiredReagents(fillerList, reagents); + if (newFillers.isEmpty()) { // Use the default if every filler requires a reagent + newFillers.add(MeteorRegistry.getDefaultMeteorParadigmComponent()); + } + return newFillers; + } + + private List removeBlocksMissingRequiredReagents(List blockList, + List reagents) { + ArrayList newList = new ArrayList<>(); + for (MeteorParadigmComponent mpc : blockList) { + if (mpc.checkForReagent(reagents)) { + newList.add(mpc); + } + } + return newList; + } + private void setMeteorBlock(int x, int y, int z, World world, List blockList, int totalListWeight) { int randNum = world.rand.nextInt(totalListWeight); @@ -188,7 +214,7 @@ private void setMeteorBlock(int x, int y, int z, World world, List reagent = new ArrayList<>(); public MeteorParadigmComponent(ItemStack stack, int weight) { + this(stack, weight, new ArrayList<>()); + } + + public MeteorParadigmComponent(ItemStack stack, int weight, ArrayList reagent) { this.itemStack = stack; this.weight = weight; + this.reagent = reagent; } public int getWeight() { return this.weight; } - public ItemStack getValidBlockParadigm() { + public ItemStack getBlock() { return itemStack; } + + public ArrayList getRequiredReagents() { + return reagent; + } + + public boolean checkForReagent(List reagentList) { + if (reagent.isEmpty()) { + return true; + } + for (Reagent r1 : reagentList) { + for (Reagent r2 : reagent) { + if (r1.equals(r2)) { + return true; + } + } + } + return false; + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorReagent.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorReagent.java new file mode 100644 index 000000000..f1547ad98 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorReagent.java @@ -0,0 +1,16 @@ +package WayofTime.alchemicalWizardry.common.summoning.meteor; + +import java.util.ArrayList; +import java.util.List; + +public class MeteorReagent { + + public boolean disableExplosions = false; + public boolean invertExplosionBlockDamage = false; + public int radiusChange = 0; + public int fillerChanceChange = 0; + public int rawFillerChanceChange = 0; + public String[] filler = {}; + public List parsedFiller = new ArrayList<>(); + +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorReagentRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorReagentRegistry.java new file mode 100644 index 000000000..6c577ca6d --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorReagentRegistry.java @@ -0,0 +1,213 @@ +package WayofTime.alchemicalWizardry.common.summoning.meteor; + +import static WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry.reagentList; + +import java.io.*; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; +import java.util.*; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonSyntaxException; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; + +public class MeteorReagentRegistry { + + public static Map reagents = new HashMap<>(); + + public static void loadConfig() { + Gson gson = new GsonBuilder().setPrettyPrinting().create(); + File file = new File("config/BloodMagic/meteors/reagents/"); + if (!file.isDirectory()) { + MeteorReagentRegistry.generateDefaultConfig(); + } + File[] files = file.listFiles(); + if (files != null) { + try { + for (String reagent : reagentList.keySet()) { + File f = new File("config/BloodMagic/meteors/reagents/" + reagent + ".json"); + if (!f.isFile()) { + continue; + } + BufferedReader br = new BufferedReader(new FileReader(f)); + MeteorReagent r = gson.fromJson(br, MeteorReagent.class); + if (r == null) { + continue; + } + if (r.filler.length > 0) { + r.parsedFiller = MeteorParadigm.parseStringArray(r.filler); + } + reagents.put(ReagentRegistry.getReagentForKey(reagent), r); + } + } catch (FileNotFoundException | JsonSyntaxException e) { + e.printStackTrace(); + } + } + } + + // Returns the one largest radius increase (positive config). + public static int getLargestRadiusIncrease(List reagentList) { + int increase = 0; + for (Reagent r : reagentList) { + if (!reagents.containsKey(r)) { + continue; + } + int change = reagents.get(r).radiusChange; + if (change > increase) { + increase = change; + } + } + return increase; + } + + // Returns the one largest radius decrease (negative config). + public static int getLargestRadiusDecrease(List reagentList) { + int decrease = 0; + for (Reagent r : reagentList) { + if (!reagents.containsKey(r)) { + continue; + } + int change = reagents.get(r).radiusChange; + if (change < decrease) { + decrease = change; + } + } + return decrease; + } + + // Returns the one largest filler chance increase (positive config). + public static int getLargestFillerChanceIncrease(List reagentList) { + int increase = 0; + for (Reagent r : reagentList) { + if (!reagents.containsKey(r)) { + continue; + } + int change = reagents.get(r).fillerChanceChange; + if (change > increase) { + increase = change; + } + } + return increase; + } + + // Returns the one largest filler chance decrease (negative config). + public static int getLargestFillerChanceDecrease(List reagentList) { + int decrease = 0; + for (Reagent r : reagentList) { + if (!reagents.containsKey(r)) { + continue; + } + int change = reagents.get(r).fillerChanceChange; + if (change < decrease) { + decrease = change; + } + } + return decrease; + } + + // Returns the one largest raw filler chance increase (positive config). + public static int getLargestRawFillerChanceIncrease(List reagentList) { + int increase = 0; + for (Reagent r : reagentList) { + if (!reagents.containsKey(r)) { + continue; + } + int change = reagents.get(r).rawFillerChanceChange; + if (change > increase) { + increase = change; + } + } + return increase; + } + + // Returns the one largest raw filler chance decrease (negative config). + public static int getLargestRawFillerChanceDecrease(List reagentList) { + int decrease = 0; + for (Reagent r : reagentList) { + if (!reagents.containsKey(r)) { + continue; + } + int change = reagents.get(r).rawFillerChanceChange; + if (change < decrease) { + decrease = change; + } + } + return decrease; + } + + // Returns a list of the blocks that the given reagents will use to replace filler. + public static List getFillerList(List reagentList) { + List fillerList = new ArrayList<>(); + for (Reagent r : reagentList) { + if (!reagents.containsKey(r)) { + continue; + } + List filler = reagents.get(r).parsedFiller; + if (filler != null && !filler.isEmpty()) { + fillerList.addAll(filler); + } + } + return fillerList; + } + + // Returns false if any of the given reagents disable explosions, otherwise true + public static boolean doExplosions(List reagentList) { + for (Reagent r : reagentList) { + if (!reagents.containsKey(r)) { + continue; + } + if (reagents.get(r).disableExplosions) { + return false; + } + } + return true; + } + + /** + * Returns the value of the config AlchemicalWizardry.doMeteorsDestroyBlocks if no reagent inverts explosion block + * damage Returns the inverse of the value of AlchemicalWizardry.doMeteorsDestroyBlocks if any reagent inverts + * explosion block damage + */ + public static boolean doMeteorsDestroyBlocks(List reagentList) { + for (Reagent r : reagentList) { + if (!reagents.containsKey(r)) { + continue; + } + if (reagents.get(r).invertExplosionBlockDamage) { + return !AlchemicalWizardry.doMeteorsDestroyBlocks; + } + } + return AlchemicalWizardry.doMeteorsDestroyBlocks; + } + + public static void generateDefaultConfig() { + Map lineMap = new HashMap<>(); + lineMap.put("terrae", new String[] { "{", " \"radiusChange\": 1,", " \"fillerChanceChange\": 10", "}", }); + lineMap.put( + "orbisTerrae", + new String[] { "{", " \"radiusChange\": 2,", " \"fillerChanceChange\": 20", "}", }); + lineMap.put("tenebrae", new String[] { "{", " \"filler\": [\"minecraft:obsidian:0:180\"]", "}", }); + lineMap.put( + "incendium", + new String[] { "{", " \"filler\": [", " \"minecraft:netherrack:0:60\",", + " \"minecraft:glowstone:0:60\",", " \"minecraft:soul_sand:0:60\"", " ]", "}", }); + lineMap.put("crystallos", new String[] { "{", " \"filler\": [\"minecraft:ice:0:180\"]", "}", }); + try { + Files.createDirectories(Paths.get("config/BloodMagic/meteors/reagents/")); + String[] reagents = { "terrae", "orbisTerrae", "tenebrae", "incendium", "crystallos" }; + for (String reagent : reagents) { + Path path = Paths.get("config/BloodMagic/meteors/reagents/" + reagent + ".json"); + Files.createFile(path); + Files.write(path, Arrays.asList(lineMap.get(reagent)), StandardOpenOption.WRITE); + } + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java index fc63bc4fc..1bfb36482 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java @@ -8,6 +8,8 @@ import net.minecraft.world.World; import net.minecraftforge.oredict.OreDictionary; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; + public class MeteorRegistry { public static List paradigmList = new ArrayList<>(); @@ -28,15 +30,19 @@ public static void registerMeteorParadigm(ItemStack stack, String[] componentLis if (fillerList != null && fillerList.length > 0) { meteor.fillerList = MeteorParadigm.parseStringArray(fillerList); } else { - meteor.fillerList.add(new MeteorParadigmComponent(new ItemStack(Blocks.stone), 1)); + meteor.fillerList.add(getDefaultMeteorParadigmComponent()); } paradigmList.add(meteor); } } - public static void createMeteorImpact(World world, int x, int y, int z, int paradigmID, boolean[] flags) { + public static MeteorParadigmComponent getDefaultMeteorParadigmComponent() { + return new MeteorParadigmComponent(new ItemStack(Blocks.stone), 1); + } + + public static void createMeteorImpact(World world, int x, int y, int z, int paradigmID, List reagents) { if (paradigmID < paradigmList.size()) { - paradigmList.get(paradigmID).createMeteorImpact(world, x, y, z, flags); + paradigmList.get(paradigmID).createMeteorImpact(world, x, y, z, reagents); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java index 677d5c8cc..2c2ddcd15 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java @@ -68,12 +68,11 @@ public Add(ItemStack stack, int radius, int cost, String[] components) { } public Add(ItemStack stack, int radius, int cost, String[] components, String[] filler, int fillerChance) { - paradigm = new MeteorParadigm(stack, radius, cost); + paradigm = new MeteorParadigm(stack, radius, cost, fillerChance); paradigm.componentList = MeteorParadigm.parseStringArray(components); if (filler != null) { paradigm.fillerList = MeteorParadigm.parseStringArray(filler); } - paradigm.fillerChance = fillerChance; } @Override diff --git a/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang index f87966289..541df9e79 100644 --- a/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang +++ b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang @@ -268,6 +268,7 @@ nei.recipe.meteor.radius=Radius: %s nei.recipe.meteor.chance=Chance: %s%% nei.recipe.meteor.amount=Estimated amount: %s nei.recipe.meteor.filler=§7Filler block +nei.recipe.meteor.reagent=§nRequired reagent§r: %s #Rituals ritual.AW001Water.name=Ritual of the Full Spring From d9b642aa771b2d117a0f9472e01744a88672c953 Mon Sep 17 00:00:00 2001 From: koolkrafter5 Date: Wed, 15 Jan 2025 18:54:12 -0500 Subject: [PATCH 2/5] Reverse star import --- .../alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java index ab6cc4a9e..caacb45a4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.client.nei; -import java.awt.*; +import java.awt.Point; +import java.awt.Rectangle; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Arrays; From 54f1c0eeb6ede219e3cbcb493d51aea5bf429a0e Mon Sep 17 00:00:00 2001 From: koolkrafter5 Date: Fri, 17 Jan 2025 15:12:50 -0500 Subject: [PATCH 3/5] Fix more star imports. --- .../AlchemicalWizardry.java | 47 +++++++++++++++++-- .../meteor/MeteorReagentRegistry.java | 12 ++++- 2 files changed, 52 insertions(+), 7 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index 10318ad5d..01831d38b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -51,10 +51,21 @@ import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; import WayofTime.alchemicalWizardry.api.soulNetwork.ComplexNetworkHandler; -import WayofTime.alchemicalWizardry.api.spell.*; +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.client.nei.IMCForNEI; -import WayofTime.alchemicalWizardry.common.*; +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.ArmourForge; @@ -66,13 +77,39 @@ 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.*; +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.*; +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.guide.RecipeHolder; -import WayofTime.alchemicalWizardry.common.harvest.*; +import WayofTime.alchemicalWizardry.common.harvest.AgriCraftCropHarvestHandler; +import WayofTime.alchemicalWizardry.common.harvest.BloodMagicHarvestHandler; +import WayofTime.alchemicalWizardry.common.harvest.CactusReedHarvestHandler; +import WayofTime.alchemicalWizardry.common.harvest.GourdHarvestHandler; +import WayofTime.alchemicalWizardry.common.harvest.PamHarvestCompatRegistry; import WayofTime.alchemicalWizardry.common.items.ItemIncense; import WayofTime.alchemicalWizardry.common.items.ItemMailOrderCatalogue; import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorReagentRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorReagentRegistry.java index 6c577ca6d..41d97f5fc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorReagentRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorReagentRegistry.java @@ -2,12 +2,20 @@ import static WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry.reagentList; -import java.io.*; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardOpenOption; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import com.google.gson.Gson; import com.google.gson.GsonBuilder; From 322d5685fbfc7bd3c11f1b58d9f41715354aff4c Mon Sep 17 00:00:00 2001 From: koolkrafter5 Date: Fri, 17 Jan 2025 15:31:35 -0500 Subject: [PATCH 4/5] Fix even more star imports. --- .../AlchemicalWizardry.java | 176 ++++++++++++++++-- 1 file changed, 165 insertions(+), 11 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index 01831d38b..fd11994e6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -12,6 +12,171 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; +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.PotionAmphibian; +import WayofTime.alchemicalWizardry.common.potion.PotionBoost; +import WayofTime.alchemicalWizardry.common.potion.PotionDeaf; +import WayofTime.alchemicalWizardry.common.potion.PotionDemonCloak; +import WayofTime.alchemicalWizardry.common.potion.PotionDrowning; +import WayofTime.alchemicalWizardry.common.potion.PotionFeatherFall; +import WayofTime.alchemicalWizardry.common.potion.PotionFireFuse; +import WayofTime.alchemicalWizardry.common.potion.PotionFlameCloak; +import WayofTime.alchemicalWizardry.common.potion.PotionFlight; +import WayofTime.alchemicalWizardry.common.potion.PotionHeavyHeart; +import WayofTime.alchemicalWizardry.common.potion.PotionIceCloak; +import WayofTime.alchemicalWizardry.common.potion.PotionInhibit; +import WayofTime.alchemicalWizardry.common.potion.PotionPlanarBinding; +import WayofTime.alchemicalWizardry.common.potion.PotionProjectileProtect; +import WayofTime.alchemicalWizardry.common.potion.PotionReciprocation; +import WayofTime.alchemicalWizardry.common.potion.PotionSoulFray; +import WayofTime.alchemicalWizardry.common.potion.PotionSoulHarden; +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.tileEntity.TEAlchemicCalcinator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; +import WayofTime.alchemicalWizardry.common.tileEntity.TECrucible; +import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; +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.TETeleposer; +import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.ModContainer; +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.SidedProxy; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLInterModComms; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.event.FMLServerStartingEvent; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -116,26 +281,15 @@ import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; import WayofTime.alchemicalWizardry.common.items.sigil.holding.HoldingPacketHandler; import WayofTime.alchemicalWizardry.common.items.thaumcraft.ItemSanguineArmour; -import WayofTime.alchemicalWizardry.common.omega.*; -import WayofTime.alchemicalWizardry.common.potion.*; import WayofTime.alchemicalWizardry.common.renderer.AlchemyCircleRenderer; -import WayofTime.alchemicalWizardry.common.rituals.*; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.*; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.*; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.*; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.*; -import WayofTime.alchemicalWizardry.common.spell.simple.*; import WayofTime.alchemicalWizardry.common.summoning.SummoningHelperAW; import WayofTime.alchemicalWizardry.common.summoning.meteor.Meteor; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorReagentRegistry; -import WayofTime.alchemicalWizardry.common.tileEntity.*; import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiHandler; import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration; import WayofTime.alchemicalWizardry.compat.BloodMagicWailaPlugin; -import cpw.mods.fml.common.*; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; -import cpw.mods.fml.common.event.*; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; From 3e3a598c9c7b7a5af3d3b5d57f938ad350bc48c7 Mon Sep 17 00:00:00 2001 From: koolkrafter5 Date: Fri, 17 Jan 2025 15:32:30 -0500 Subject: [PATCH 5/5] Spotless --- .../AlchemicalWizardry.java | 226 +++++++++--------- 1 file changed, 113 insertions(+), 113 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index fd11994e6..430e5ef3b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -12,6 +12,110 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.Item.ToolMaterial; +import net.minecraft.item.ItemArmor.ArmorMaterial; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.WeightedRandomChestContent; +import net.minecraftforge.common.ChestGenHooks; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.util.EnumHelper; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.oredict.OreDictionary; +import net.minecraftforge.oredict.RecipeSorter; +import net.minecraftforge.oredict.RecipeSorter.Category; + +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import WayofTime.alchemicalWizardry.api.BlockStack; +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.sacrifice.PlayerSacrificeHandler; +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.client.nei.IMCForNEI; +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.ArmourForge; +import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars; +import WayofTime.alchemicalWizardry.common.book.BloodMagicGuide; +import WayofTime.alchemicalWizardry.common.commands.CommandBloodMagic; +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.guide.RecipeHolder; +import WayofTime.alchemicalWizardry.common.harvest.AgriCraftCropHarvestHandler; +import WayofTime.alchemicalWizardry.common.harvest.BloodMagicHarvestHandler; +import WayofTime.alchemicalWizardry.common.harvest.CactusReedHarvestHandler; +import WayofTime.alchemicalWizardry.common.harvest.GourdHarvestHandler; +import WayofTime.alchemicalWizardry.common.harvest.PamHarvestCompatRegistry; +import WayofTime.alchemicalWizardry.common.items.ItemIncense; +import WayofTime.alchemicalWizardry.common.items.ItemMailOrderCatalogue; +import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; +import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; +import WayofTime.alchemicalWizardry.common.items.sigil.holding.HoldingPacketHandler; +import WayofTime.alchemicalWizardry.common.items.thaumcraft.ItemSanguineArmour; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmEarth; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmFire; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmWater; @@ -34,6 +138,7 @@ import WayofTime.alchemicalWizardry.common.potion.PotionReciprocation; import WayofTime.alchemicalWizardry.common.potion.PotionSoulFray; import WayofTime.alchemicalWizardry.common.potion.PotionSoulHarden; +import WayofTime.alchemicalWizardry.common.renderer.AlchemyCircleRenderer; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAnimalGrowth; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAutoAlchemy; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectBinding; @@ -144,6 +249,9 @@ 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.Meteor; +import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorReagentRegistry; import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; @@ -166,9 +274,14 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiHandler; +import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration; +import WayofTime.alchemicalWizardry.compat.BloodMagicWailaPlugin; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.ModContainer; import cpw.mods.fml.common.Optional; import cpw.mods.fml.common.SidedProxy; @@ -177,119 +290,6 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLServerStartingEvent; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.Item.ToolMaterial; -import net.minecraft.item.ItemArmor.ArmorMaterial; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.WeightedRandomChestContent; -import net.minecraftforge.common.ChestGenHooks; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.EnumHelper; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.oredict.OreDictionary; -import net.minecraftforge.oredict.RecipeSorter; -import net.minecraftforge.oredict.RecipeSorter.Category; - -import org.apache.logging.log4j.Level; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -import WayofTime.alchemicalWizardry.api.BlockStack; -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.sacrifice.PlayerSacrificeHandler; -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.client.nei.IMCForNEI; -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.ArmourForge; -import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars; -import WayofTime.alchemicalWizardry.common.book.BloodMagicGuide; -import WayofTime.alchemicalWizardry.common.commands.CommandBloodMagic; -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.guide.RecipeHolder; -import WayofTime.alchemicalWizardry.common.harvest.AgriCraftCropHarvestHandler; -import WayofTime.alchemicalWizardry.common.harvest.BloodMagicHarvestHandler; -import WayofTime.alchemicalWizardry.common.harvest.CactusReedHarvestHandler; -import WayofTime.alchemicalWizardry.common.harvest.GourdHarvestHandler; -import WayofTime.alchemicalWizardry.common.harvest.PamHarvestCompatRegistry; -import WayofTime.alchemicalWizardry.common.items.ItemIncense; -import WayofTime.alchemicalWizardry.common.items.ItemMailOrderCatalogue; -import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; -import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; -import WayofTime.alchemicalWizardry.common.items.sigil.holding.HoldingPacketHandler; -import WayofTime.alchemicalWizardry.common.items.thaumcraft.ItemSanguineArmour; -import WayofTime.alchemicalWizardry.common.renderer.AlchemyCircleRenderer; -import WayofTime.alchemicalWizardry.common.summoning.SummoningHelperAW; -import WayofTime.alchemicalWizardry.common.summoning.meteor.Meteor; -import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorReagentRegistry; -import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiHandler; -import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration; -import WayofTime.alchemicalWizardry.compat.BloodMagicWailaPlugin; -import cpw.mods.fml.common.Mod.EventHandler; -import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry;