diff --git a/.gitignore b/.gitignore index dfdeee2..d861202 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,22 @@ *.jar *.war *.ear + +#Forge Stuffs +/LICENSE-fml.txt +/MinecraftForge-Credits.txt +/MinecraftForge-License.txt +/README.txt +/CREDITS-fml.txt +/forge-1.7.2* +/.gradle +/build +/common +/eclipse/* +/lib/ +/src/api/* +/bin/* + +.classpath +.project +.settings/* \ No newline at end of file diff --git a/LICENSE b/LICENSE index a1b7448..dc07dfb 100644 --- a/LICENSE +++ b/LICENSE @@ -1,13 +1,18 @@ -DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 +TERMS AND CONDITIONS +0. USED TERMS +MOD - modification, plugin, a piece of software that interfaces with the Minecraft client to extend, add, change or remove original capabilities. +MOJANG - Mojang AB +OWNER - , Original author(s) of the MOD. Under the copyright terms accepted when purchasing Minecraft (http://www.minecraft.net/copyright.jsp) the OWNER has full rights over their MOD despite use of MOJANG code. +USER - End user of the mod, person installing the mod. - Copyright (C) 2004 Sam Hocevar +1. LIABILITY +THIS MOD IS PROVIDED 'AS IS' WITH NO WARRANTIES, IMPLIED OR OTHERWISE. THE OWNER OF THIS MOD TAKES NO RESPONSIBILITY FOR ANY DAMAGES INCURRED FROM THE USE OF THIS MOD. THIS MOD ALTERS FUNDAMENTAL PARTS OF THE MINECRAFT GAME, PARTS OF MINECRAFT MAY NOT WORK WITH THIS MOD INSTALLED. ALL DAMAGES CAUSED FROM THE USE OR MISUSE OF THIS MOD FALL ON THE USER. - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. +2. USE +Use of this MOD to be installed, manually or automatically, is given to the USER without restriction. - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +3. REDISTRIBUTION +This MOD may only be distributed where uploaded, mirrored, or otherwise linked to by the OWNER solely. All mirrors of this mod must have advance written permission from the OWNER. ANY attempts to make money off of this MOD (selling, selling modified versions, adfly, sharecash, etc.) are STRICTLY FORBIDDEN, and the OWNER may claim damages or take other action to rectify the situation. - 0. You just DO WHAT THE FUCK YOU WANT TO. +4. DERIVATIVE WORKS/MODIFICATION +This mod is provided freely and may be decompiled and modified for private use, either with a decompiler or a bytecode editor. Public distribution of modified versions of this MOD require advance written permission of the OWNER and may be subject to certain terms. diff --git a/README.md b/README.md index cfe1973..2c89f85 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ ForbiddenMagic ============== -Forbidden Magic is a small Minecraft mod written as an add-on for the mod [Thaumcraft](http://www.minecraftforum.net/topic/2011841-). It adds a few magical artifacts of a more sinister bent to the game as well as several interactions between Thaumcraft and other magic-themed mods such as [Blood Magic](http://www.minecraftforum.net/topic/1899223-) or [Ars Magica 2](http://www.minecraftforum.net/topic/2028696-/). - -Forbidden Magic's source and binary are subject to the terms of the WTF Public License. +Halp. How do I computer? diff --git a/assets/forbidden/lang/ru_RU.lang b/assets/forbidden/lang/ru_RU.lang deleted file mode 100644 index 2f6c8f4..0000000 --- a/assets/forbidden/lang/ru_RU.lang +++ /dev/null @@ -1,253 +0,0 @@ -# -# Aspects -tc.aspect.infernus=The Nether, Demons, Hellfire -tc.aspect.ira=Wrath, Anger, Rage -tc.aspect.gula=Gluttony, Consumption, Indulgence -tc.aspect.invidia=Envy, Jealousy, Insecurity -tc.aspect.superbia=Pride, Arrogance, Disdain -tc.aspect.desidia=Sloth, Laziness, Procrastination -tc.aspect.luxuria=Lust, Desire, Excess -# -# Items -item.NetherShard.wrath.name=Осколок гнева -item.NetherShard.envy.name=Осколок зависти -item.NetherShard.gluttony.name=Осколок прожорливости -item.NetherShard.pride.name=Осколок гордости -item.NetherShard.lust.name=Осколок страсти -item.NetherShard.sloth.name=Осколок лени -item.NetherShard.greed.name=Осколок жадности -item.NetherShard.taint.name=Осколок заразы -item.NetherShard.despair.name=Осколок отчаяния -item.SkullAxe.name=Топор палача -item.ArcaneCake.name=Таум торт -item.TaintShovel.name=Лопата очистителя -item.TaintPickaxe.name=Кирка искажения -item.MorphPickaxe.name=Хамелеоновая кирка -item.MorphSword.name=Хамелеоновый меч -item.MorphShovel.name=Хамелеоновая лопата -item.MorphAxe.name=Хамелеоновый топор -item.FMResource.0.name=Эмеральдовый фрагмент -item.FMResource.1.name=Темные чернила -item.FMResource.2.name=Самородок манастали -item.MobCrystalEmpty.name=Пустой отпечатывающийся кристалл -item.MobCrystal.name=Отпечатанный кристалл -item.DiabolistFork.name=Адская вила -item.DiabolistSpork.name=Spork of Doom -item.GluttonyShard.name=Осколок прожорливости -item.Bloodwell.name=Инструменты кровавого писца -item.DivineOrb.name=Трансцендентная сфера крови -item.Crystalwell.name=Crystal Scribing Tools -item.RidingCrop.name=Хлыст -item.Divinewell.name=Scribing Tools of Thoth -item.BoundShears.name=Связанные ножницы -# -# Wand components -item.Wand.tainted.rod=Испорченный -item.Wand.infernal.rod=Адский -item.Wand.neutronium.rod=Космически нейтронный -item.Wand.soul.rod=Жуткий -item.Wand.blood.rod=Кровавый -item.Wand.witchwood.rod=Ведьмин -item.Wand.totem.rod=Тотемов -item.Wand.livingwood.rod=Живой -item.Wand.orichalcum.cap=Обитый орихалком -item.Wand.alchemical.cap=Алхимически коронованный -item.Wand.vinteum.cap=Vinteum Bossed -item.Wand.soul.cap=Ender Shielded -item.Wand.manasteel.cap=Manasteel Entwined -item.WandCores.tainted.name=Испорченная стержень -item.WandCores.infernal.name=Адский стержень -item.WandCores.soul.name=Жуткий стержень -item.WandCores.blood.name=Кровавый стержень -item.WandCores.witchwood.name=Ведьмин стержень -item.WandCores.totem.name=Тотемный стержень -item.WandCores.blood_inert.name=Инертный кровавый стержень -item.WandCores.livingwood.name=Живой стержень -item.WandCores.livingwood_inert.name=Бездействующий живой стержень -item.WandCores.blood_staff.name=Кровавое ядро посуха -item.WandCores.witchwood_staff.name=Ведьмино ядро посуха -item.WandCaps.alchemical.name=Алхимический наконечник -item.WandCaps.vinteum.name=Винтеум наконечник -item.WandCaps.soul.name=Эндер наконечник -item.WandCaps.manasteel.name=Манастальной наконечник -item.WandCaps.manasteel_inert.name=Инертный манастальной наконечник -# -# Blocks -tile.ArcaneCake.name=Таум торт -tile.InkFlower.name=Мрачная роза -tile.WrathCage.name=Клетка гнева -tile.StarBlock.name=Блок звезды ада -# -# Enchantments -enchantment.cluster=Огненное ядро -enchantment.pigbane=Porcivore -enchantment.greedy=Capitalist -enchantment.consuming=Потребление -enchantment.educational=Образование -enchantment.corrupting=Искажение -enchantment.eternal=Вечность -# -# Misc -itemGroup.forbidden=Запретная магия -itemGroup.mobcrystal=Впечатанные кристаллы -tc.research_category.FORBIDDEN=Апокрифы -# -# Research -forbidden.research_name.NETHERSHARDS=Адские осколки -forbidden.research_text.NETHERSHARDS=Чтобы нарушать закон. -forbidden.research_page.NETHERSHARDS.1=Strange energies swirl through the Nether. On occasion, they have been known to solidify into crystal shards when certain sympathetic events occur. -forbidden.research_page.NETHERSHARDS.2=These crystals are imbued with different vices and have many uses for more unscrupulous Thaumaturges.
There are seven documented types of nether shard, each attuned to a different "deadly sin."

forbidden:textures/misc/research.png:0:0:111:16:1
-forbidden.research_page.NETHERSHARDS.2b=These crystals are imbued with different vices and have many uses for more unscrupulous Thaumaturges.
There are six documented types of nether shard, each attuned to a different "deadly sin."

forbidden:textures/misc/research.png:0:16:95:16:1
-forbidden.research_page.NETHERSHARDS.3=Wrath Shards crystallize around acts of violence. The more excessive the physical force used, the more likely it is for a Wrath Shard to appear.

Sloth Shards congeal when proxies and accidents are used to collect resources without effort.

Envy Shards are taken from those who have them by those that covet them.

Pride Shards materialize when a creature of truly great power is cut down to size.

More sympathetic events may reveal themselves as time goes on. -# -forbidden.research_name.SKULLAXE=Axe of the Skulltaker -forbidden.research_text.SKULLAXE=Off with their heads! -forbidden.research_page.SKULLAXE.1=Some monsters just really boil your blood. Skeletons! Always clacking around and using you for target practice. Or those Creepers! They just creep around blowing things up like they own the place! You wish you could just chop all their smug heads off and place them on pikes.

Fortunately, you've discovered an item that will let you do just that. The Axe of the Skulltaker has a chance to remove the heads of monsters it slays. It might even work on other humans! Unfortunately, the infusion leaves the axe far too bloodthirsty to effectively cleave through boring plant matter. -# -forbidden.research_name.ARCANECAKE=Thaumic Cake -forbidden.research_text.ARCANECAKE=Let them eat cake. -forbidden.research_page.ARCANECAKE.1=If there's one thing you love, it's cake. You would eat its delicious goodness all day if you could, but it always runs out in the end.

To remedy this, you have devised a recipe to infuse a cake with longevity-enhancing magic. The Thaumic Cake lasts significantly longer than a mundane one and will slowly repair itself as long as there's at least a sliver left. The enchantments are unstable, however, and the cake cannot be moved again through conventional means once placed down. -# -forbidden.research_name.TAINTSHOVEL=Shovel of the Purifier -forbidden.research_text.TAINTSHOVEL=Like a hot knife through really gross butter -forbidden.research_page.TAINTSHOVEL.1=Sometimes, the easiest way to remove patches of taint is to just physically remove them.

By reinforcing a thaumium shovel with Silverwood and Order Shards, you have created a tool capable of combating Taint. The Shovel of the Purifier can dig through pulpy tainted lands as effectively as it can through normal earth. If held in your hand and right-clicked, the shovel cures you of Flux Taint at the cost of durability. -forbidden.research_page.TAINTSHOVEL.2=When digging through taint with the shovel, there's a chance that the twisted energies released will crystallize into Taint Shards. Unlike other tainted materials, the crystalline pattern keeps these shards stable enough to carry around. -# -forbidden.research_name.TAINTPICK=Pickaxe of Distortion -forbidden.research_text.TAINTPICK=Obsidian Buster -forbidden.research_page.TAINTPICK.1=By infusing a thaumium pickaxe with taint, you create a tool capable of cutting through difficult materials.

The Pickaxe of Distortion infects hard materials with taint, weakening them. The harder the material, the more effective the pickaxe is at removing it. Unfortunately, the effects of the taint have an inverse effect when mining softer materials, rendering the pickaxe less effective than just pawing at the block with your bare hands. -# -forbidden.research_name.ROD_tainted=Tainted Wand Core -forbidden.research_text.ROD_tainted=Squiggly vis storage -forbidden.research_page.ROD_tainted.1=Tainted Lands are places of great and terrible power for those Thaumaturges who know how to tap into them.

The Tainted Wand Core can store up to 150 vis of each type and slowly replenishes itself up to 10% in every aspect as long as it is being held inside of a Tainted Land. While the wand is held in your hand, it can also feed off of taint coursing through your veins, randomly restoring vis every time you take damage from flux taint. -# -forbidden.research_name.ROD_infernal=Infernal Wand Core -forbidden.research_text.ROD_infernal=Devilish vis storage -forbidden.research_page.ROD_infernal.1=A great and powerful thaumaturge like you deserves a powerful and imposing wand befitting your station. Some hippy silverwood wand just won't cut it. You need a wand that will serve as your scepter of authority.

You've discovered a way to create a wand infused with the power of the Nether. The Infernal Wand Core can hold up to 150 vis and will slowly replenish its supply of Ignis up to 20%. While within the Nether, the wand will also replenish its other aspects to 10%. -forbidden.research_page.ROD_infernal.2=The wand also imbues you with some protection from the Nether's hazards, extinguishing you if you are on fire or protecting you from the effects of Withering as long as it is in your inventory. While the wand is held in your hand, it will completely protect you from all fire damage. -# -forbidden.research_name.ROD_soul=Eldritch Wand Core -forbidden.research_text.ROD_soul=Corrupting vis storage -forbidden.research_page.ROD_soul.1=You've discovered a way to tap the energy flowing through a Player Beacon and turn it into vis. As long as you're in a dimension with an active Player Beacon attuned to yourself, the Eldritch Wand Core will slowly charge all its internal reserves, which can hold up to 100 vis.

Channeling such great amounts of energy through your soul comes at a price, however. Each point of vis creates large amounts of corruption in your soul. It's best not to rely on its recharge abilities too greatly... -# -forbidden.research_name.ROD_blood=Blood Wand Core -forbidden.research_text.ROD_blood=Alchemical vis storage -forbidden.research_page.ROD_blood.1=You've created a bridge between Thaumaturgy and Alchemical Wizardry. The Blood Wand can store up to 100 vis and will gradually fill itself using Life Points.

The wand will bind itself to the first person to pick it up. As long as the rod is empty, it will try to fill itself using LP from its owner's network. If there are not enough Life Points to fuel it, it will resort to drawing health from whoever is carrying it, but this conversion is less efficient. If it has no LP to draw from and its holder falls below three hearts, the wand stops charging itself. -forbidden.research_page.ROD_blood.2=The infusion process alone isn't enough to complete a Blood Wand. Once the Inert Blood Rod has been infused, it must be imbued with life essence in a Blood Altar to be completed. -# -forbidden.research_name.ROD_blood_staff=Blood Staff Core -forbidden.research_text.ROD_blood_staff=Staff of the Blood Magus -forbidden.research_page.ROD_blood_staff.1=The Blood Wand is useful, but it just charges so slowly. It's time to create a magical implement that can hold up in sustained combat.

Unlike most staves, the Blood Staff holds only 50 vis instead of the 100 its wand form can. Where it truly shines is its ability to recharge vis at a rapid rate. As long as the Blood Staff is held in your hotbar, it will recharge its vis from its owner's LP network four times as quickly as a normal Blood Wand. This voraciousness comes at a price, however. Unlike the wand, the Blood Staff can and will kill whoever's holding it if it doesn't recieve enough LP. -# -forbidden.research_name.ROD_witchwood=Witchwood Wand Core -forbidden.research_text.ROD_witchwood=Mana converter -forbidden.research_page.ROD_witchwood.1=By creating a wand core out of Witchwood, you've discovered a way to convert mana into Vis. The Witchwood Wand Core holds up to 100 vis and will gradually charge itself at the cost of 140 mana per point of vis.

Further research may reveal ways to lower this price. -# -forbidden.research_name.ROD_witchwood_staff=Witchwood Staff Core -forbidden.research_text.ROD_witchwood_staff=Staff of the Arcanist -forbidden.research_page.ROD_witchwood_staff.1=The Witchwood Wand eats far too much magical power and charges far too slowly to stand up in sustained combat. It's time for something a little more efficient at channeling arcane power.

Unlike most staves, the Witchwood Staff can only hold 50 vis. Its true strength lies in how quickly it recharges itself. The staff regains vis at over twice the rate of the Witchwood Wand. Furthermore, the staff uses considerably less magical power than the Witchwood Wand, only needing 100 mana per point of vis, if used without the appropriate cap. -# -forbidden.research_name.ROD_totem=Totemic Wand Core -forbidden.research_text.ROD_totem=Verdant vis storage -forbidden.research_page.ROD_totem.1=Hunting down nodes for their power can be quite a pain sometimes. Perhaps there is another discipline you can tap for power...

By carving a wand core from Infused Wood, you create a wand that can draw power from plant life. The Totemic Wand Core holds 50 vis and can draw energy from Chlorophyll Crystals in your inventory to recharge its own vis. -# -forbidden.research_name.ROD_livingwood=Livingwood Wand Core -forbidden.research_text.ROD_livingwood=Botanical vis storage -forbidden.research_page.ROD_livingwood.1=Livingwood has the fantastic ability to manipulate mana. When combined with the right reagents, it can even convert mana into vis.

The Livingwood Wand will quickly draw mana from storage items in your inventory in order to charge itself.

The infusion process burns the livingwood out, unfortunately. Once infused, the wand rod must be charged in a mana pool in order to be re-awakened. -# -forbidden.research_name.CAP_alchemical=Alchemical Caps -forbidden.research_text.CAP_alchemical=When Thaumium isn't bloody enough -forbidden.research_page.CAP_alchemical.1=You've developed a wand cap that merges Thaumaturgy and Alchemical Wizardry. Alchemical Caps are very effective at channeling Aqua, only using 80% of the normal vis cost. For everything else, they offer only a 90% rate.

If combined with a Bloody Wand Core, Alchemical Caps discount the amount of LP consumed by the wand, costing only 900 LP per vis. The caps also cause all attacks from a blood wand to inflict Weakness. -# -forbidden.research_name.CAP_vinteum=Vinteum Caps -forbidden.research_text.CAP_vinteum=Magical wand caps -forbidden.research_page.CAP_vinteum.1=By infusing a Thaumium cap with Vinteum, you create a cap that, when combined with a Witchwood Wand Core, lowers its mana cost to only 80 per point of vis.

The Thaumium cap seems to meld well with Vinteum, offering the same 90% vis rate. -# -forbidden.research_name.CAP_soul=Ender Caps -forbidden.research_text.CAP_soul=Protection for your soul -forbidden.research_page.CAP_soul.1=You've created a wand cap that can safely channel the destructive energy of The End. Ender Caps have an 80% vis rate on Perditio, but only 90% for other aspects.

When combined with an Eldritch Wand Core, Ender Caps also reduce the amount of corruption your soul suffers from channeling vis out of the End. -# -forbidden.research_name.CAP_manasteel=Manasteel Caps -forbidden.research_text.CAP_manasteel=The secret of mana -forbidden.research_page.CAP_manasteel.1=Manasteel has very useful properties when it comes to mana manipulation. When crafted into a wand cap, it offers a 90% vis rate. If combined with a Livingwood Wand, it also makes the mana conversion process more efficient.

In order to be used in the creation of a wand, the Inert Manasteel Caps must be infused in a Mana Pool. -# -forbidden.research_name.TRANSEMERALD=Emerald Transmutation -forbidden.research_text.TRANSEMERALD=Transformation of valuables into emerald -forbidden.research_page.TRANSEMERALD.1=You have discovered a way to multiply emeralds by steeping emerald fragments in lucrum harvested from other substances. -# -forbidden.research_name.BLACKFLOWER=Umbral Rose -forbidden.research_text.BLACKFLOWER=Save the squid! -forbidden.research_page.BLACKFLOWER.1=There's no sight more pathetic than a soggy Thaumaturge. For all your great and miraculous powers, you still have to go jump in the nearest lake and hunt for squids every time you want to refill your inkwell.

You're done squid hunting. By infusing a rose with tenebrae and victus, you create a flower that spreads like a weed and whose petals can be crushed for ink. -# -forbidden.research_name.WRATHCAGE=Wrath Cage -forbidden.research_text.WRATHCAGE=Neverending battle -forbidden.research_page.WRATHCAGE.1=Sometimes, it's not enough to just kill something. Sure, slaying a single monster may be rather cathartic, but imagine just mowing down a crowd of the obnoxious little jerks.

To that end, you've discovered a way to recreate the monster spawners found in the ancient ruins. Unlike the original monster spawners, the Wrath Cage responds to redstone controls instead of the presence of human beings and can run much faster than the ancient devices. -forbidden.research_page.WRATHCAGE.2=However, you haven't been able to duplicate the original method of infinite creation. For every creature spawned, the Wrath Cage requires a bit of essentia piped into its internal reserves. The device will accept different types of essentia depending on the creature it is attuned to. Alternatively, piping Ira into the cage can serve as a fuel. The cage can also accept Desidia for some reason.

Right-clicking the Wrath Cage with a Diabolist Fork will cycle the cage between the different fuel types, changing which essentia it applies suction to. -forbidden.research_page.WRATHCAGE.3=To attune a wrath cage to a specific creature, right click on it with an imprinted crystal. Slaying a compatible creature with a Diabolist Fork while carrying a blank imprinting crystal will attune the crystal to that monster. -# -forbidden.research_name.FORK=Diabolist Fork -forbidden.research_text.FORK=Arcane tinkering tool -forbidden.research_page.FORK.1=You've created a tool to help you tinker with various infernal contraptions. The quartz prongs on the Diabolist Fork allow it to attune itself to arcane energies.

Along with being used to tune devices, the fork also makes for a functional weapon.

More information should appear in the following pages as you uncover more research. -forbidden.research_page.FORK.wc=If the Diabolist Fork is used to slay a compatible creature with a Blank Imprinting Crystal in your inventory, it will imprint on the crystal. The Imprinted Crystal can then be used to attune a Wrath Cage to that monster.

The fork can also be used to adjust which essentia type a Wrath Cage is using for fuel. Simply right click on the Wrath Cage with the Diabolist Fork to cycle between the three different fuel types. -# -forbidden.research_name.MORPHTOOLS=Chameleon Tools -forbidden.research_text.MORPHTOOLS=There's an enchantment for that... -forbidden.research_page.MORPHTOOLS.1=Chameleon Tools are like three tools in one. When first enchanted, right-clicking while sneaking with the tool in your hand changes it to a blank new enchanting slate, allowing you to enchant it with a completely different set of enchantments. Each tool can hold up to three separate enchantment sets which can be alternated between by right-clicking while sneaking.

The tools have no innate way to remove enchantments once fully enchanted, so make each enchantment count! -# -forbidden.research_name.CLUSTER=Enchantment: Fiery Core -forbidden.research_text.CLUSTER=Chameleon of the Core -forbidden.research_page.CLUSTER.1=You've discovered an enchantment to allow the Chameleon Pickaxe to imitate the effects of the Pickaxe of the Core. A Chameleon Pickaxe with the Fiery Core enchantment has a chance of dropping clusters when mining certain ores. Clusters are a lot purer than raw ore and can be smelted for two of the ore's normal smelting result. Higher levels of Fiery Core increase the chance of dropping clusters. -# -forbidden.research_name.GREEDY=Enchantment: Capitalist -forbidden.research_text.GREEDY=Unregulated enchanting -forbidden.research_page.GREEDY.1=You've discovered a weapon enchantment that allows you to profit from taking lives. Every time a Capitalist weapon slays a hostile creature, there's a chance to drop an Emerald Fragment. If a Capitalist Weapon is used to kill a villager, it will instead drop one of the villager's emeralds. -# -forbidden.research_name.CONSUMING=Enchantment: Consuming -forbidden.research_text.CONSUMING=Garbage Disposal -forbidden.research_page.CONSUMING.1=Sick of having to empty your pack of worthless junk, you've devised an enchantment that will automatically destroy common, unwanted materials. Any Cobblestone, Dirt, Gravel, or Netherrack mined by a Consuming tool will be destroyed instead of falling to the ground. -# -forbidden.research_name.PIGBANE=Enchantment: Porcivore -forbidden.research_text.PIGBANE=Show those Zombie Pigmen who's at the top of the food chain! -forbidden.research_page.PIGBANE.1=Zombie Pigmen think they're so great. They're always stomping around the Nether ganging up on innocent travelers. It's time someone put a stop to them.

Weapons with the Porcivore enchantment will do excessive amounts of damage to Pigs and Zombie Pigmen. -# -forbidden.research_name.EDUCATIONAL=Enchantment: Educational -forbidden.research_text.EDUCATIONAL=You will LEARN! -forbidden.research_page.EDUCATIONAL.1=You've created an enchantment to infuse a weapon with the very essence of knowledge and learning. Hammering such learning into monsters' heads will result in them dropping more experience than normal, depending on the level of enchantment. -# -forbidden.research_name.CORRUPTING=Enchantment: Corrupting -forbidden.research_text.CORRUPTING=A bad influence on shards -forbidden.research_page.CORRUPTING.1=The Nether is great and all, but it's also kind of a... Hell Hole.

The Corrupting enchant allows you to harvest Nether Shards without having to be in the Nether. A pickaxe enchanted with Corrupting will randomly corrupt harvested elemental shards, changing them into nether shards. The shards only seem susceptible while they are encased in infused stone, so corrupting a shard cluster will have no effect. -# -forbidden.research_name.ETERNAL=Enchantment: Eternal -forbidden.research_text.ETERNAL=Chameleon Gods -forbidden.research_page.ETERNAL.1=Ichorium Tools are really great. You sure wish your Chameleon Tools could be more like them. Maybe they can...

The Eternal enchant gives a Chameleon Tool the same unbreakable quality as Ichorium Tools. -# -forbidden.research_name.TAINTBASICS=Tainted Lands -forbidden.research_text.TAINTBASICS=Deep Purple -forbidden.research_page.TAINTBASICS.1=Sometimes, Thaumaturgy goes horribly wrong. Miracles become twisted calamities and the very landscape twists into hideous forms. Tainted Lands are places infected by the sick runoff of magical workings, flux. Local flora and fauna become warped and mutated into forms hostile to normal life and the very ground of a tainted land infects those who tread upon its pulsing fibres. -forbidden.research_page.TAINTBASICS.2=Tainted Lands can be found naturally in the world, but can also form when a careless Thaumaturge allows flux goo to stagnate for too long. They are recognizable by their telltale purple fibres and bright violet stalks. Left alone, the tainted land will gradually extend its tendrils outwards, infecting more and more of the surrounding land. Dirt becomes thick, pulpy Tainted Soil while trees and other natural materials are slowly covered in fibres and converted into structurally unsound crust which can collapse or melt into flux goo at any moment. -# -forbidden.research_name.BLOODWELL=Bloody Scrivener's Tools -forbidden.research_text.BLOODWELL="I'll complete this research if it kills me!" -forbidden.research_page.BLOODWELL.1=There's nothing more frustrating than having to pause your research to refill your inkwell. Sometimes, you're just so desperate to complete a research you'd rather use your own blood as ink than stop to go find a refill.

The Bloody Scrivener's Tools will refill using Life Points from their owner's network, at a rate of 25 LP per point. This ability requires human warmth to activate, requiring you to remove the tools from the research table, but without having to actually leave the research area. -# -forbidden.research_name.DIVINEORB=Transcendent Blood Orb -forbidden.research_text.DIVINEORB=Orb of Armok -forbidden.research_page.DIVINEORB.1=It is whispered among some Thaumaturgic circles that Ichor is actually the blood of the divine. You don't know whether this is true or not, but Ichor does seem to have an affinity with more advanced alchemical devices.

The Transcendent Blood Orb is what happens when you combine the most advanced Thaumaturgy and Alchemical Wizardry available. The infusion vastly increases the orb's carrying capacity, allowing it to hold a whopping 70,000,000 LP. What would you ever need that much LP for? -# -forbidden.research_name.CRYSTALWELL=Crystal Scribing Tools -forbidden.research_text.CRYSTALWELL=Arcane Research Grant -forbidden.research_page.CRYSTALWELL.1=Combining elemental shards with your inkwell results in some interesting effects. The Crystal Scribing Tools seem to absorb knowledge as you use them to write. Once the well is empty of ink, you can absorb this knowledge for a small burst of research points by holding the tools in your hand and right clicking. Unfortunately, this burns the tool out and turns it back into a mundane Scribing Tool again. -# -forbidden.research_name.RIDINGCROP=Riding Crop -forbidden.research_text.RIDINGCROP=Motivating Pain -forbidden.research_page.RIDINGCROP.1=A riding crop is, as its name suggests, a tool used to motivate mounts to move faster. Right clicking with it in your hand while riding a horse or other mount will give the mount a quick lash of pain and cause it to move faster for a little while.

You could hit other creatures with the crop too, but what would possess you to do something like that? -# -forbidden.research_name.HELLFIRE=Lord of Hellfire -forbidden.research_text.HELLFIRE=Never get stranded again -forbidden.research_page.HELLFIRE.1=Getting stranded in the Nether is the worst. You go through all the trouble of grabbing what you need, but before you can go home, some stupid ghast decides to rain on your parade by blasting the portal shut. Sure, this can be amended by carrying a flint and steel around, but who actually walks around with those things?

You've discovered a way to use vis in your wand to light fires on certain materials. Right click with a focus-less wand in your hand on the top of netherrack or obsidian to light a flame using some Ignis from your wand. -# -forbidden.research_name.DIVINEWELL=Scribing Tools of Thoth -forbidden.research_text.DIVINEWELL=Mightier Than The Sword -forbidden.research_page.DIVINEWELL.1=After researching every last shred of knowledge in the entire cosmos, you've finally uncovered the secret to never refilling your inkwell.

The Scribing Tools of Thoth will never run out of ink.

You sure wish you could've discovered this earlier... -# diff --git a/assets/forbidden/textures/items/wand_rod_witchwood.png b/assets/forbidden/textures/items/wand_rod_witchwood.png deleted file mode 100644 index a9b5b14..0000000 Binary files a/assets/forbidden/textures/items/wand_rod_witchwood.png and /dev/null differ diff --git a/assets/forbidden/textures/items/wand_rod_witchwood_staff.png b/assets/forbidden/textures/items/wand_rod_witchwood_staff.png deleted file mode 100644 index 2ec4453..0000000 Binary files a/assets/forbidden/textures/items/wand_rod_witchwood_staff.png and /dev/null differ diff --git a/assets/forbidden/textures/models/wand_rod_witchwood.png b/assets/forbidden/textures/models/wand_rod_witchwood.png deleted file mode 100644 index 171e9c1..0000000 Binary files a/assets/forbidden/textures/models/wand_rod_witchwood.png and /dev/null differ diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..adfbb6f --- /dev/null +++ b/build.gradle @@ -0,0 +1,61 @@ +buildscript { + repositories { + mavenCentral() + maven { + name = "forge" + url = "http://files.minecraftforge.net/maven" + } + maven { + name = "sonatype" + url = "https://oss.sonatype.org/content/repositories/snapshots/" + } + } + dependencies { + classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' + } +} + +apply plugin: 'forge' + +// define the properties file +ext.configFile = file "build.properties" + +configFile.withReader { + // read config. it shall from now on be referenced as simply config or as project.config + def prop = new Properties() + prop.load(it) + project.ext.config = new ConfigSlurper().parse prop +} + +version = config.minecraft_version + "-" + config.mod_version +group= "com.github.spitefulfox.forbiddenmagic" // http://maven.apache.org/guides/mini/guide-naming-conventions.html +archivesBaseName = "Forbidden Magic" + +dependencies { + compile files("lib/Thaumcraft-deobf-1.7.2-4.1.1.12.jar") +} + +minecraft { + version = config.minecraft_version + "-" + config.forge_version + assetDir = "eclipse/assets" +} + +processResources { + // replace stuff in mcmod.info, nothing else + from(sourceSets.main.resources.srcDirs) { + include '**/*.info' + include '**/*.properties' + + expand ([ + 'modid': project.archivesBaseName, + 'mod_version': project.config.mod_version, + 'minecraft_version': project.config.minecraft_version + ]) + } + + // copy everything else, thats not the mcmod.info + from(sourceSets.main.resources.srcDirs) { + exclude '**/*.info' + exclude '**/*.properties' + } +} \ No newline at end of file diff --git a/build.properties b/build.properties new file mode 100644 index 0000000..6dc18b9 --- /dev/null +++ b/build.properties @@ -0,0 +1,3 @@ +minecraft_version=1.7.2 +forge_version=10.12.1.1103 +mod_version=0.4b \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..662430a --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Tue May 06 21:57:37 CEST 2014 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-1.12-bin.zip diff --git a/gradlew b/gradlew new file mode 100644 index 0000000..91a7e26 --- /dev/null +++ b/gradlew @@ -0,0 +1,164 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# For Cygwin, ensure paths are in UNIX format before anything is touched. +if $cygwin ; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` +fi + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >&- +APP_HOME="`pwd -P`" +cd "$SAVED" >&- + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..8a0b282 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/src/com/spiteful/forbidden/Compat.java b/src/com/spiteful/forbidden/Compat.java deleted file mode 100644 index fc5bc0e..0000000 --- a/src/com/spiteful/forbidden/Compat.java +++ /dev/null @@ -1,420 +0,0 @@ -package com.spiteful.forbidden; - -import com.spiteful.forbidden.items.ForbiddenItems; -import com.spiteful.forbidden.enchantments.DarkEnchantments; - -import java.util.logging.Level; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import cpw.mods.fml.common.FMLLog; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.registry.GameRegistry; -import net.minecraft.util.ResourceLocation; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.AspectList; -import thaumcraft.api.ThaumcraftApi; -import thaumcraft.api.ThaumcraftApiHelper; -import thaumcraft.api.ItemApi; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.AspectList; -import thaumcraft.api.aspects.IEssentiaContainerItem; -import thaumcraft.api.wands.WandCap; -import thaumcraft.api.wands.WandRod; -import thaumcraft.api.wands.WandTriggerRegistry; -import thaumcraft.api.crafting.IArcaneRecipe; -import thaumcraft.api.crafting.InfusionRecipe; -import thaumcraft.api.crafting.InfusionEnchantmentRecipe; -import thaumcraft.api.research.ResearchCategories; -import thaumcraft.api.research.ResearchCategoryList; -import thaumcraft.api.research.ResearchItem; -import thaumcraft.api.research.ResearchPage; -import kihira.playerbeacons.common.PlayerBeacons; -import vazkii.botania.api.BotaniaAPI; -import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; - -public class Compat { - - public static boolean tt = false; - public static boolean kami = false; - public static boolean tx = false; - public static boolean natura = false; - public static boolean pb = false; - public static boolean bm = false; - public static boolean am2 = false; - public static boolean totes = false; - public static boolean botan = false; - - public static Item fennCrystal; - - public static void initiate() - { - if(Loader.isModLoaded("ThaumicTinkerer")) - tt = true; - if(tt && Loader.isModLoaded("ThaumicTinkererKami")) - kami = true; - if(Loader.isModLoaded("ThaumicExploration")) - tx = true; - if(Loader.isModLoaded("Natura")) - natura = true; - if(Loader.isModLoaded("PlayerBeacons")) - pb = true; - if(Loader.isModLoaded("AWWayofTime")) - bm = true; - if(Loader.isModLoaded("arsmagica2")) - am2 = true; - if(Loader.isModLoaded("totemic")) - totes = true; - if(Loader.isModLoaded("Botania")) - botan = true; - } - - public static void compatify() - { - ItemStack i; - AspectList list; - - if(tt) - { - if(!kami) - { - try - { - kami = Class.forName("vazkii.tinkerer.common.core.handler.ConfigHandler").getField("enableKami").getBoolean(null); - } - catch(Exception e){} - } - - if(kami) - { - - try { - - Item kamiResource = (Item)(Class.forName("vazkii.tinkerer.common.item.ModItems").getField("kamiResource").get(null)); - list = new AspectList().add(DarkAspects.NETHER, 2).add(Aspect.MAGIC, 1).add(Aspect.CRYSTAL, 1); - ThaumcraftApi.registerObjectTag(kamiResource.itemID, 6, list); - list = new AspectList().add(Aspect.ELDRITCH, 2).add(Aspect.MAGIC, 1).add(Aspect.CRYSTAL, 1); - ThaumcraftApi.registerObjectTag(kamiResource.itemID, 7, list); - - InfusionEnchantmentRecipe eternal = ThaumcraftApi.addInfusionEnchantmentRecipe("ETERNAL", DarkEnchantments.eternal, 12, (new AspectList()).add(Aspect.CRAFT, 32).add(Aspect.TOOL, 64).add(DarkAspects.ENVY, 76).add(Aspect.MAGIC, 64), new ItemStack[]{new ItemStack(kamiResource.itemID, 1, 0), new ItemStack(kamiResource.itemID, 1, 2), new ItemStack(kamiResource.itemID, 1, 2), new ItemStack(kamiResource.itemID, 1, 2), new ItemStack(kamiResource.itemID, 1, 6), new ItemStack(ForbiddenItems.deadlyShards.itemID, 1, 1), new ItemStack(ForbiddenItems.deadlyShards.itemID, 1, 1), new ItemStack(ForbiddenItems.deadlyShards.itemID, 1, 1)}); - (new DarkResearchItem("ETERNAL", "FORBIDDEN", "[TTKami]", (new AspectList()).add(Aspect.MAGIC, 16).add(Aspect.TOOL, 10).add(Aspect.CRAFT, 8).add(DarkAspects.ENVY, 32), -5, 7, 6, new ResourceLocation("forbidden", "textures/misc/eternal.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.ETERNAL.1"), new ResearchPage(eternal)}).setParents(new String[]{"MORPHTOOLS", "ICHOR_TOOLS"}).setConcealed().registerResearchItem(); - - InfusionRecipe thoth = ThaumcraftApi.addInfusionCraftingRecipe("DIVINEWELL", new ItemStack(ForbiddenItems.divinewell, 1, 0), 5, (new AspectList()).add(Aspect.MIND, 32).add(Aspect.BEAST, 12).add(Aspect.EARTH, 16), ItemApi.getItem("itemInkwell", 0), new ItemStack[]{new ItemStack(kamiResource.itemID, 1, 2), new ItemStack(kamiResource.itemID, 1, 0), new ItemStack(kamiResource.itemID, 1, 0), new ItemStack(Block.bookShelf), new ItemStack(Block.bookShelf), new ItemStack(Block.bookShelf), ItemApi.getItem("itemResource", 5), ItemApi.getItem("itemResource", 5), ItemApi.getItem("itemResource", 5)}); - (new DarkResearchItem("DIVINEWELL", "FORBIDDEN", "[TTKami]", (new AspectList()).add(Aspect.MIND, 6).add(Aspect.EARTH, 3).add(Aspect.MAGIC, 5), -11, 4, 3, new ItemStack(ForbiddenItems.divinewell, 1, 0))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.DIVINEWELL.1"), new ResearchPage(thoth)}).setParents(new String[]{"ICHORIUM"}).setConcealed().registerResearchItem(); - - } - catch(Exception e) - { - FMLLog.log(Level.INFO, e, "Forbidden Magic doesn't have Thaumic Tinkerer's nose."); - e.printStackTrace(); - } - - } - } - - if(natura) - { - try - { - list = (new AspectList()).add(Aspect.BEAST, 2).add(DarkAspects.NETHER, 4).add(DarkAspects.SLOTH, 2); - ThaumcraftApi.registerEntityTag("Natura.Imp", list); - list = (new AspectList()).add(Aspect.BEAST, 3).add(Aspect.FIRE, 3).add(DarkAspects.NETHER, 2); - ThaumcraftApi.registerEntityTag("Natura.HeatscarSpider", list); - ThaumcraftApi.registerEntityTag("Natura.FlameSpider", list); - list = (new AspectList()).add(Aspect.BEAST, 1).add(Aspect.FIRE, 2).add(DarkAspects.NETHER, 1); - ThaumcraftApi.registerEntityTag("Natura.BabyHeatscarSpider", list); - ThaumcraftApi.registerEntityTag("Natura.FlameSpiderBaby", list); - list = (new AspectList()).add(Aspect.BEAST, 2).add(Aspect.FIRE, 4).add(DarkAspects.NETHER, 2).add(Aspect.ENTROPY, 4); - ThaumcraftApi.registerEntityTag("Natura.NitroCreeper", list); - - i = GameRegistry.findItemStack("Natura", "Dark Tree", 1); - if(i != null){ - list = (new AspectList()).add(Aspect.TREE, 3).add(DarkAspects.WRATH, 2); - ThaumcraftApi.registerObjectTag(i.itemID, 1, list); - list = (new AspectList()).add(Aspect.TREE, 3).add(Aspect.DARKNESS, 2); - ThaumcraftApi.registerObjectTag(i.itemID, 0, list); - } - i = GameRegistry.findItemStack("Natura", "soil.tainted", 1); - if(i != null){ - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(i.itemID, 1, 0)); - list.add(DarkAspects.NETHER, 1); - ThaumcraftApi.registerObjectTag(i.itemID, -1, list); - } - i = GameRegistry.findItemStack("Natura", "heatsand", 1); - if(i != null){ - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(i.itemID, 1, 0)); - list.add(DarkAspects.NETHER, 1); - ThaumcraftApi.registerObjectTag(i.itemID, -1, list); - } - i = GameRegistry.findItemStack("Natura", "rawImphide", 1); - if(i != null){ - list = (new AspectList()).add(Aspect.FLESH, 4).add(Aspect.HUNGER, 1).add(DarkAspects.NETHER, 1); - ThaumcraftApi.registerObjectTag(i.itemID, 0, list); - list = (new AspectList()).add(Aspect.FLESH, 4).add(Aspect.POISON, 2).add(Aspect.FIRE, 2).add(DarkAspects.NETHER, 1); - ThaumcraftApi.registerObjectTag(i.itemID, 1, list); - } - } - catch(Exception e) - { - FMLLog.log(Level.INFO, e, "Forbidden Magic had an allergic reaction to Natura."); - e.printStackTrace(); - } - } - if(pb) - { - try - { - if(PlayerBeacons.config.enableThaumcraft) - { - - InfusionRecipe soul_recipe = ThaumcraftApi.addInfusionCraftingRecipe("ROD_soul", new ItemStack(ForbiddenItems.wandCore, 1, 2), 5, (new AspectList()).add(Aspect.ELDRITCH, 32).add(Aspect.MAGIC, 12).add(Aspect.SOUL, 16), new ItemStack(PlayerBeacons.defiledSoulPylonBlock), new ItemStack[]{ItemApi.getItem("itemResource", 14), new ItemStack(PlayerBeacons.defiledSoulConductorBlock), new ItemStack(PlayerBeacons.defiledSoulConductorBlock), new ItemStack(PlayerBeacons.defiledSoulConductorBlock), new ItemStack(PlayerBeacons.defiledSoulConductorBlock), new ItemStack(Item.eyeOfEnder), new ItemStack(Item.eyeOfEnder)}); - (new DarkResearchItem("ROD_soul", "FORBIDDEN", "[PB]", (new AspectList()).add(Aspect.ELDRITCH, 4).add(Aspect.SOUL, 3).add(Aspect.TOOL, 2), -3, -3, 5, new ItemStack(ForbiddenItems.wandCore, 1, 2))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.ROD_soul.1"), new ResearchPage(soul_recipe)}).setParents(new String[]{"ROD_silverwood", "PB_CRYSTAL", "INFAUXSION"}).setConcealed().registerResearchItem(); - - IArcaneRecipe soul_cap = ThaumcraftApi.addArcaneCraftingRecipe("CAP_soul", new ItemStack(ForbiddenItems.wandCap, 1, 2), (new AspectList()).add(Aspect.ENTROPY, 20).add(Aspect.FIRE, 5).add(Aspect.WATER, 5).add(Aspect.AIR, 5).add(Aspect.EARTH, 5), new Object[]{"NXN", "N N", Character.valueOf('N'), Item.enderPearl, Character.valueOf('X'), PlayerBeacons.crystalItem}); - (new DarkResearchItem("CAP_soul", "FORBIDDEN", "[PB]", (new AspectList()).add(Aspect.ELDRITCH, 3).add(Aspect.MAGIC, 2).add(Aspect.ENTROPY, 4), -3, -5, 3, new ItemStack(ForbiddenItems.wandCap, 1, 2))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.CAP_soul.1"), new ResearchPage(soul_cap)}).setParents(new String[]{"ROD_soul"}).setSecondary().setConcealed().registerResearchItem(); - - } - - } - catch(Throwable e) - { - FMLLog.log(Level.INFO, e, "Player Beacons showed Forbidden Magic who the Alpha Fox is."); - //e.printStackTrace(); - pb = false; - } - } - if(bm) - { - try - { - Class bloodItems; - bloodItems = Class.forName("WayofTime.alchemicalWizardry.ModItems"); - - Item masterOrb = (Item)(bloodItems.getField("masterBloodOrb").get(null)); - Item archmasterOrb = (Item)(bloodItems.getField("archmageBloodOrb").get(null)); - Item imbuedSlate = (Item)(bloodItems.getField("imbuedSlate").get(null)); - Item magicales = (Item)(bloodItems.getField("magicales").get(null)); - Item aether = (Item)(bloodItems.getField("aether").get(null)); - Item terrae = (Item)(bloodItems.getField("terrae").get(null)); - Item aquasalus = (Item)(bloodItems.getField("aquasalus").get(null)); - Item incendium = (Item)(bloodItems.getField("incendium").get(null)); - Item sanctus = (Item)(bloodItems.getField("sanctus").get(null)); - Item tennebrae = (Item)(bloodItems.getField("tennebrae").get(null)); - Item crapOrb = (Item)(bloodItems.getField("weakBloodOrb").get(null)); - Item demonShard = (Item)(bloodItems.getField("demonBloodShard").get(null)); - - bloodItems = Class.forName("WayofTime.alchemicalWizardry.AlchemicalWizardry"); - Item bloodBucket = (Item)(bloodItems.getField("bucketLife").get(null)); - - AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ForbiddenItems.wandCore, 1, 3), new ItemStack(ForbiddenItems.wandCore, 1, 6), 4, 20000, 15, 20, false); - - InfusionRecipe blood_recipe = ThaumcraftApi.addInfusionCraftingRecipe("ROD_blood", new ItemStack(ForbiddenItems.wandCore, 1, 6), 2, (new AspectList()).add(Aspect.LIFE, 32).add(Aspect.MAGIC, 12).add(Aspect.WATER, 16), new ItemStack(masterOrb), new ItemStack[]{new ItemStack(magicales), new ItemStack(imbuedSlate), new ItemStack(imbuedSlate), new ItemStack(tennebrae), new ItemStack(sanctus), new ItemStack(aquasalus), new ItemStack(incendium), new ItemStack(terrae), new ItemStack(aether)}); - (new DarkResearchItem("ROD_blood", "FORBIDDEN", "[BM]", (new AspectList()).add(Aspect.LIFE, 5).add(Aspect.WATER, 4).add(Aspect.WEAPON, 3), -5, -3, 3, new ItemStack(ForbiddenItems.wandCore, 1, 3))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.ROD_blood.1"), new ResearchPage(blood_recipe), new ResearchPage("forbidden.research_page.ROD_blood.2")}).setParents(new String[]{"ROD_silverwood", "INFAUXSION"}).setAspectTriggers(new Aspect[]{Aspect.LIFE}).setConcealed().registerResearchItem(); - - InfusionRecipe alchemical_recipe = ThaumcraftApi.addInfusionCraftingRecipe("CAP_alchemical", new ItemStack(ForbiddenItems.wandCap, 1, 0), 3, (new AspectList()).add(Aspect.LIFE, 12).add(Aspect.WATER, 6), ItemApi.getItem("itemWandCap", 1), new ItemStack[]{new ItemStack(magicales), new ItemStack(magicales), new ItemStack(magicales)}); - (new DarkResearchItem("CAP_alchemical", "FORBIDDEN", "[BM]", (new AspectList()).add(Aspect.LIFE, 4).add(Aspect.TOOL, 1).add(Aspect.WATER, 3), -5, -5, 2, new ItemStack(ForbiddenItems.wandCap, 1, 0))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.CAP_alchemical.1"), new ResearchPage(alchemical_recipe)}).setParents(new String[]{"ROD_blood", "CAP_gold"}).setSecondary().setConcealed().registerResearchItem(); - - IArcaneRecipe bloodwell_recipe = ThaumcraftApi.addShapelessArcaneCraftingRecipe("BLOODWELL", new ItemStack(ForbiddenItems.bloodwell, 1, 0), (new AspectList()).add(Aspect.WATER, 10).add(Aspect.EARTH, 10), new Object[]{new ItemStack(Item.feather, 1, 0), new ItemStack(bloodBucket, 1, 0), new ItemStack(Item.glassBottle, 1, 0), new ItemStack(crapOrb, 1, 0)}); - (new DarkResearchItem("BLOODWELL", "FORBIDDEN", "[BM]", (new AspectList()).add(Aspect.LIFE, 5).add(Aspect.MIND, 4).add(Aspect.SENSES, 3), -10, 4, 1, new ItemStack(ForbiddenItems.bloodwell, 1, 0))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.BLOODWELL.1"), new ResearchPage(bloodwell_recipe)}).setParents(new String[]{"RESEARCH"}).setAspectTriggers(new Aspect[]{Aspect.LIFE}).setConcealed().registerResearchItem(); - - IArcaneRecipe blood_staff = ThaumcraftApi.addArcaneCraftingRecipe("ROD_blood_staff", new ItemStack(ForbiddenItems.wandCore, 1, 9), (new AspectList()).add(Aspect.ENTROPY, 26).add(Aspect.FIRE, 26).add(Aspect.WATER, 26).add(Aspect.AIR, 26).add(Aspect.EARTH, 26).add(Aspect.ORDER, 26), new Object[]{"__D", "_B_", "B__", Character.valueOf('B'), new ItemStack(ForbiddenItems.wandCore, 1, 3), Character.valueOf('D'), new ItemStack(demonShard)}); - (new DarkResearchItem("ROD_blood_staff", "FORBIDDEN", "[BM]", (new AspectList()).add(Aspect.LIFE, 8).add(Aspect.WATER, 7).add(Aspect.WEAPON, 6), -5, -7, 5, new ItemStack(ForbiddenItems.wandCore, 1, 9))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.ROD_blood_staff.1"), new ResearchPage(blood_staff)}).setParents(new String[]{"ROD_silverwood_staff", "ROD_blood"}).setSpecial().setConcealed().registerResearchItem(); - - if(kami) - { - try { - - Item kamiResource = (Item)(Class.forName("vazkii.tinkerer.common.item.ModItems").getField("kamiResource").get(null)); - - InfusionRecipe divine_orb = ThaumcraftApi.addInfusionCraftingRecipe("DIVINEORB", new ItemStack(ForbiddenItems.bloodOrb, 1, 0), 12, (new AspectList()).add(Aspect.LIFE, 64).add(Aspect.MAGIC, 48).add(Aspect.WATER, 32).add(Aspect.VOID, 64), new ItemStack(archmasterOrb), new ItemStack[]{new ItemStack(kamiResource.itemID, 1, 0), new ItemStack(kamiResource.itemID, 1, 0), new ItemStack(kamiResource.itemID, 1, 0), new ItemStack(kamiResource.itemID, 1, 2), new ItemStack(kamiResource.itemID, 1, 2), new ItemStack(kamiResource.itemID, 1, 1), new ItemStack(kamiResource.itemID, 1, 6), new ItemStack(kamiResource.itemID, 1, 7), new ItemStack(ForbiddenItems.gluttonyShard)}); - (new DarkResearchItem("DIVINEORB", "FORBIDDEN", "[BM] [TTKami]", (new AspectList()).add(Aspect.LIFE, 32).add(Aspect.VOID, 24).add(Aspect.CRYSTAL, 24).add(Aspect.MAGIC, 12), -9, 6, 6, new ItemStack(ForbiddenItems.bloodOrb, 1, 0))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.DIVINEORB.1"), new ResearchPage(divine_orb)}).setParents(new String[]{"ICHOR", "INFAUXSION", "ICHOR_CLOTH", "ICHORIUM"}).setAspectTriggers(new Aspect[]{Aspect.LIFE}).setConcealed().setSpecial().registerResearchItem(); - - } - catch(Exception e) - { - FMLLog.log(Level.INFO, e, "Forbidden Magic doesn't have Thaumic Tinkerer's nose."); - e.printStackTrace(); - } - - } - - list = (new AspectList()).add(Aspect.LIFE, 2).add(Aspect.MAGIC, 2).add(Aspect.CRYSTAL, 4); - ThaumcraftApi.registerObjectTag(crapOrb.itemID, -1, list); - - list = (new AspectList()).add(Aspect.LIFE, 4).add(Aspect.MAGIC, 4).add(Aspect.CRYSTAL, 4); - aspectBloodItem("apprenticeBloodOrb", -1, list); - - list = (new AspectList()).add(Aspect.LIFE, 6).add(Aspect.MAGIC, 6).add(Aspect.CRYSTAL, 4); - aspectBloodItem("magicianBloodOrb", -1, list); - - list = (new AspectList()).add(Aspect.LIFE, 16).add(Aspect.MAGIC, 8).add(Aspect.CRYSTAL, 4); - ThaumcraftApi.registerObjectTag(masterOrb.itemID, -1, list); - - list = (new AspectList()).add(Aspect.LIFE, 16).add(DarkAspects.NETHER, 8).add(Aspect.CRYSTAL, 4).add(Aspect.FIRE, 1).add(Aspect.WATER, 1).add(Aspect.AIR, 1).add(Aspect.EARTH, 1).add(Aspect.LIGHT, 1).add(Aspect.DARKNESS, 1); - ThaumcraftApi.registerObjectTag(demonShard.itemID, -1, list); - - list = (new AspectList()).add(Aspect.LIFE, 32).add(DarkAspects.NETHER, 4).add(Aspect.MAGIC, 8).add(Aspect.CRYSTAL, 4); - aspectBloodItem("archmageBloodOrb", -1, list); - - list = (new AspectList()).add(Aspect.ELDRITCH, 5).add(Aspect.WEAPON, 5).add(DarkAspects.WRATH, 5).add(Aspect.POISON, 1); - aspectBloodItem("energySword", -1, list); - - list = (new AspectList()).add(Aspect.ELDRITCH, 5).add(Aspect.WEAPON, 6).add(DarkAspects.WRATH, 6).add(Aspect.POISON, 1); - aspectBloodItem("energyBlaster", -1, list); - - list = (new AspectList()).add(Aspect.ELDRITCH, 6).add(Aspect.MINE, 5).add(DarkAspects.WRATH, 4).add(Aspect.TRAP, 4); - aspectBloodItem("boundPickaxe", -1, list); - - list = (new AspectList()).add(Aspect.ELDRITCH, 4).add(Aspect.TOOL, 5).add(DarkAspects.WRATH, 2).add(Aspect.TRAP, 2); - aspectBloodItem("boundShovel", -1, list); - - list = (new AspectList()).add(Aspect.ELDRITCH, 6).add(Aspect.TOOL, 5).add(DarkAspects.WRATH, 4).add(Aspect.TRAP, 4); - aspectBloodItem("boundAxe", -1, list); - - list = (new AspectList()).add(Aspect.METAL, 8).add(Aspect.VOID, 1).add(Aspect.LIFE, 4); - ThaumcraftApi.registerObjectTag(bloodBucket.itemID, -1, list); - - list = (new AspectList()).add(Aspect.LIGHT, 6).add(Aspect.ENERGY, 3); - ThaumcraftApi.registerObjectTag(sanctus.itemID, -1, list); - - list = (new AspectList()).add(Aspect.DARKNESS, 6).add(Aspect.ENERGY, 3); - ThaumcraftApi.registerObjectTag(tennebrae.itemID, -1, list); - - list = (new AspectList()).add(Aspect.MAGIC, 6).add(Aspect.ENERGY, 3); - ThaumcraftApi.registerObjectTag(magicales.itemID, -1, list); - - list = (new AspectList()).add(Aspect.AIR, 6).add(Aspect.ENERGY, 3); - ThaumcraftApi.registerObjectTag(aether.itemID, -1, list); - - list = (new AspectList()).add(Aspect.EARTH, 6).add(Aspect.ENERGY, 3); - ThaumcraftApi.registerObjectTag(terrae.itemID, -1, list); - - list = (new AspectList()).add(Aspect.WATER, 6).add(Aspect.ENERGY, 3); - ThaumcraftApi.registerObjectTag(aquasalus.itemID, -1, list); - - list = (new AspectList()).add(Aspect.FIRE, 6).add(Aspect.ENERGY, 3); - ThaumcraftApi.registerObjectTag(incendium.itemID, -1, list); - - list = (new AspectList()).add(Aspect.ICE, 6).add(Aspect.ENERGY, 3); - aspectBloodItem("crystallos", -1, list); - - list = (new AspectList()).add(Aspect.ENTROPY, 6).add(Aspect.ENERGY, 3); - aspectBloodItem("crepitous", -1, list); - } - catch(Throwable e) - { - FMLLog.log(Level.INFO, e, "Forbidden Magic tried to do some Blood Magic, but bled out."); - e.printStackTrace(); - bm = false; - } - } - if(am2) - { - try - { - Class amItems = Class.forName("am2.items.ItemsCommonProxy"); - Class amBlocks = Class.forName("am2.blocks.BlocksCommonProxy"); - Item essence = (Item)(amItems.getField("essence").get(null)); - Item amOre = (Item)(amItems.getField("itemOre").get(null)); - Block witchwood = (Block)(amBlocks.getField("witchwoodLog").get(null)); - - InfusionRecipe witchwood_recipe = ThaumcraftApi.addInfusionCraftingRecipe("ROD_witchwood", new ItemStack(ForbiddenItems.wandCore, 1, 4), 5, (new AspectList()).add(Aspect.MAGIC, 16).add(Aspect.EARTH, 9).add(Aspect.WATER, 9).add(Aspect.FIRE, 9).add(Aspect.AIR, 9), new ItemStack(witchwood), new ItemStack[]{new ItemStack(essence.itemID, 1, 0), new ItemStack(amOre.itemID, 1, 3), new ItemStack(essence.itemID, 1, 1), new ItemStack(essence.itemID, 1, 2), new ItemStack(essence.itemID, 1, 3), new ItemStack(essence.itemID, 1, 4), new ItemStack(amOre.itemID, 1, 6), new ItemStack(amOre.itemID, 1, 7), new ItemStack(amOre.itemID, 1, 2)}); - (new DarkResearchItem("ROD_witchwood", "FORBIDDEN", "[AM2]", (new AspectList()).add(Aspect.MAGIC, 6).add(Aspect.TREE, 5).add(Aspect.MIND, 4), -4, -3, 3, new ItemStack(ForbiddenItems.wandCore, 1, 4))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.ROD_witchwood.1"), new ResearchPage(witchwood_recipe)}).setParents(new String[]{"ROD_silverwood", "INFAUXSION"}).setConcealed().registerResearchItem(); - - InfusionRecipe vinteum_recipe = ThaumcraftApi.addInfusionCraftingRecipe("CAP_vinteum", new ItemStack(ForbiddenItems.wandCap, 1, 1), 5, (new AspectList()).add(Aspect.ENERGY, 12).add(Aspect.MAGIC, 6), ItemApi.getItem("itemWandCap", 6), new ItemStack[]{new ItemStack(amOre.itemID, 1, 0), new ItemStack(amOre.itemID, 1, 0), new ItemStack(amOre.itemID, 1, 0)}); - (new DarkResearchItem("CAP_vinteum", "FORBIDDEN", "[AM2]", (new AspectList()).add(Aspect.MAGIC, 4).add(Aspect.TOOL, 1).add(Aspect.ENERGY, 2), -4, -5, 1, new ItemStack(ForbiddenItems.wandCap, 1, 1))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.CAP_vinteum.1"), new ResearchPage(vinteum_recipe)}).setParents(new String[]{"ROD_witchwood", "CAP_thaumium"}).setSecondary().setConcealed().registerResearchItem(); - - IArcaneRecipe witchwood_staff = ThaumcraftApi.addArcaneCraftingRecipe("ROD_witchwood_staff", new ItemStack(ForbiddenItems.wandCore, 1, 10), (new AspectList()).add(Aspect.ENTROPY, 26).add(Aspect.FIRE, 26).add(Aspect.WATER, 26).add(Aspect.AIR, 26).add(Aspect.EARTH, 26).add(Aspect.ORDER, 26), new Object[]{"__D", "_B_", "B__", Character.valueOf('B'), new ItemStack(ForbiddenItems.wandCore, 1, 4), Character.valueOf('D'), new ItemStack(essence.itemID, 1, 10)}); - (new DarkResearchItem("ROD_witchwood_staff", "FORBIDDEN", "[AM2]", (new AspectList()).add(Aspect.MAGIC, 8).add(Aspect.MIND, 7).add(Aspect.TOOL, 6), -4, -7, 5, new ItemStack(ForbiddenItems.wandCore, 1, 10))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.ROD_witchwood_staff.1"), new ResearchPage(witchwood_staff)}).setParents(new String[]{"ROD_silverwood_staff", "ROD_witchwood"}).setSpecial().setConcealed().registerResearchItem(); - } - catch(Exception e) - { - FMLLog.log(Level.INFO, e, "Forbidden Magic was slain by a Hecate."); - e.printStackTrace(); - am2 = false; - } - } - if(totes) - { - try - { - Class totems = Class.forName("totemic_commons.pokefenn.ModItems"); - fennCrystal = (Item)(totems.getField("chlorophyllCrystal").get(null)); - Item subItems = (Item)(totems.getField("subItems").get(null)); - - IArcaneRecipe totem_rod = ThaumcraftApi.addArcaneCraftingRecipe("ROD_totem", new ItemStack(ForbiddenItems.wandCore, 1, 5), (new AspectList()).add(Aspect.ENTROPY, 12).add(Aspect.FIRE, 12).add(Aspect.WATER, 12).add(Aspect.AIR, 12).add(Aspect.EARTH, 12).add(Aspect.ORDER, 12), new Object[]{"PF", "FP", Character.valueOf('F'), new ItemStack(subItems.itemID, 1, 2)}); - (new DarkResearchItem("ROD_totem", "FORBIDDEN", "[T]", (new AspectList()).add(Aspect.TREE, 8).add(Aspect.MAGIC, 3).add(Aspect.PLANT, 6), -2, -3, 1, new ItemStack(ForbiddenItems.wandCore, 1, 5))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.ROD_totem.1"), new ResearchPage(totem_rod)}).setParents(new String[]{"ROD_greatwood"}).setConcealed().registerResearchItem(); - - - } - catch(Exception e) - { - FMLLog.log(Level.INFO, e, "Forbidden Magic tried to catch Totemic with a pokeball, but didn't weaken it enough."); - e.printStackTrace(); - totes = false; - } - } - if(botan) - { - try - { - Class botanItems = Class.forName("vazkii.botania.common.item.ModItems"); - Item rune = (Item)(botanItems.getField("rune").get(null)); - Item resource = (Item)(botanItems.getField("manaResource").get(null)); - Class blocktania = Class.forName("vazkii.botania.common.block.ModBlocks"); - Block livingLog = (Block)(blocktania.getField("livingwood").get(null)); - - CraftingManager.getInstance().addRecipe(new ItemStack(resource, 1, 0), new Object[]{"###", "###", "###", Character.valueOf('#'), new ItemStack(ForbiddenItems.resource, 1, 2)}); - CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.resource, 9, 2), new Object[]{"#", Character.valueOf('#'), new ItemStack(resource, 1, 0)}); - - InfusionRecipe livingwood_rod = ThaumcraftApi.addInfusionCraftingRecipe("ROD_livingwood", new ItemStack(ForbiddenItems.wandCore, 1, 8), 3, (new AspectList()).add(Aspect.MAGIC, 16).add(Aspect.TREE, 32).add(Aspect.LIFE, 16).add(Aspect.SENSES, 8).add(Aspect.PLANT, 8), new ItemStack(livingLog), new ItemStack[]{new ItemStack(resource, 1, 2), new ItemStack(rune, 1, 8), new ItemStack(rune, 1, 0), new ItemStack(rune, 1, 1), new ItemStack(rune, 1, 2), new ItemStack(rune, 1, 3), new ItemStack(rune, 1, 4), new ItemStack(rune, 1, 5), new ItemStack(rune, 1, 6), new ItemStack(rune, 1, 7)}); - (new DarkResearchItem("ROD_livingwood", "FORBIDDEN", "[B]", (new AspectList()).add(Aspect.TREE, 8).add(Aspect.MAGIC, 4).add(Aspect.PLANT, 6), -1, -3, 3, new ItemStack(ForbiddenItems.wandCore, 1, 7))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.ROD_livingwood.1"), new ResearchPage(livingwood_rod)}).setParents(new String[]{"ROD_silverwood", "INFAUXSION"}).setConcealed().registerResearchItem(); - BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ForbiddenItems.wandCore, 1, 7), new ItemStack(ForbiddenItems.wandCore, 1, 8), 10000); - - IArcaneRecipe manasteel_cap = ThaumcraftApi.addArcaneCraftingRecipe("CAP_manasteel", new ItemStack(ForbiddenItems.wandCap, 1, 4), (new AspectList()).add(Aspect.ENTROPY, 6).add(Aspect.FIRE, 6).add(Aspect.WATER, 6).add(Aspect.AIR, 6).add(Aspect.EARTH, 6).add(Aspect.ORDER, 6), new Object[]{"NNN", "N N", Character.valueOf('N'), new ItemStack(ForbiddenItems.resource, 1, 2)}); - (new DarkResearchItem("CAP_manasteel", "FORBIDDEN", "[B]", (new AspectList()).add(Aspect.ELDRITCH, 3).add(Aspect.MAGIC, 2).add(Aspect.ENTROPY, 4), -1, -5, 2, new ItemStack(ForbiddenItems.wandCap, 1, 3))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.CAP_manasteel.1"), new ResearchPage(manasteel_cap)}).setParents(new String[]{"ROD_livingwood"}).setSecondary().setConcealed().registerResearchItem(); - BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ForbiddenItems.wandCap, 1, 3), new ItemStack(ForbiddenItems.wandCap, 1, 4), 1000); - } - catch(Throwable e) - { - FMLLog.log(Level.INFO, e, "Forbidden Magic: Botania? Do you wanna build a snowman?"); - e.printStackTrace(); - botan = false; - } - } - - } - - private static void aspectBloodItem(String target, int damage, AspectList list) - { - try - { - Class bloodItems = Class.forName("WayofTime.alchemicalWizardry.ModItems"); - Item item = (Item)(bloodItems.getField(target).get(null)); - - ThaumcraftApi.registerObjectTag(item.itemID, damage, list); - } - catch(Exception e) - { - FMLLog.log(Level.INFO, e, "Forbidden Magic was unable to add aspects to " + target); - } - } - - private static void aspectBloodBlock(String target, int damage, AspectList list) - { - try - { - Class bloodItems = Class.forName("WayofTime.alchemicalWizardry.ModBlocks"); - Block block = (Block)(bloodItems.getField(target).get(null)); - - ThaumcraftApi.registerObjectTag(block.blockID, damage, list); - } - catch(Exception e) - { - FMLLog.log(Level.INFO, e, "Forbidden Magic was unable to add aspects to " + target); - } - } -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/Config.java b/src/com/spiteful/forbidden/Config.java deleted file mode 100644 index f82f0c2..0000000 --- a/src/com/spiteful/forbidden/Config.java +++ /dev/null @@ -1,236 +0,0 @@ -package com.spiteful.forbidden; - -import java.io.File; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Iterator; -import java.util.logging.Level; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.util.WeightedRandomChestContent; -import net.minecraftforge.common.BiomeDictionary; -import net.minecraftforge.common.ChestGenHooks; -import net.minecraftforge.common.Configuration; -import net.minecraftforge.common.Property; -import net.minecraftforge.common.BiomeDictionary.Type; -import net.minecraftforge.oredict.OreDictionary; -import cpw.mods.fml.common.FMLLog; -import thaumcraft.api.ThaumcraftApi; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.ItemApi; - -public class Config -{ - public static HashMap spawnerMobs = new HashMap(); - - public static int shardID; - public static int skullAxeID; - public static int arcaneCakeItemID; - public static int taintShovelID; - public static int wandCoreID; - public static int resourceID; - public static int taintPickaxeID; - public static int mobCrystalID; - public static int forkID; - public static int morphPickaxeID; - public static int morphSwordID; - public static int morphShovelID; - public static int morphAxeID; - public static int wandCapID; - public static int gluttonyShardID; - public static int bloodwellID; - public static int crystalwellID; - public static int ridingCropID; - public static int bloodOrbID; - public static int divinewellID; - public static int boundShearsID; - - public static int arcaneCakeBlockID; - public static int blackFlowerBlockID; - public static int wrathCageID; - public static int starBlockID; - - public static int clusterEnchID; - public static int pigBaneEnchID; - public static int greedyEnchID; - public static int consumingEnchID; - public static int educationalEnchID; - public static int corruptingEnchID; - public static int eternalEnchID; - - public static int thaumcraftResourceID; - public static int thaumcraftTaintBlockID; - public static int thaumcraftTaintPotionID; - public static int thaumcraftTaintBiomeID; - public static int thaumcraftOreID; - public static int thaumcraftShardID; - - public static boolean noLust = false; - public static boolean silverfishEmeralds = true; - public static boolean tagResearch = true; - public static boolean wrathCage = true; - public static boolean spork = false; - public static boolean greedyEnch = true; - public static boolean emeraldTrans = true; - public static boolean wrathCrazy = false; - - public static int wrathCost = 5; - public static int wrathEff = 4; - - public static Material taintMaterial; - - public static void configurate(File targ) - { - Configuration conf = new Configuration(targ); - - try - { - conf.load(); - int idCount = 9342; - shardID = conf.getItem("Nether Shards", idCount++).getInt(); - skullAxeID = conf.getItem("Axe of the Skulltaker", idCount++).getInt(); - arcaneCakeItemID = conf.getItem("Thaumic Cake", idCount++).getInt(); - taintShovelID = conf.getItem("Shovel of the Purifier", idCount++).getInt(); - wandCoreID = conf.getItem("Wand Cores", idCount++).getInt(); - resourceID = conf.getItem("Various Resources", idCount++).getInt(); - taintPickaxeID = conf.getItem("Pickaxe of Distortion", idCount++).getInt(); - mobCrystalID = conf.getItem("Imprinting Crystal", idCount++).getInt(); - forkID = conf.getItem("Diabolist Fork", idCount++).getInt(); - morphPickaxeID = conf.getItem("Chameleon Pickaxe", idCount++).getInt(); - morphSwordID = conf.getItem("Chameleon Sword", idCount++).getInt(); - morphShovelID = conf.getItem("Chameleon Shovel", idCount++).getInt(); - morphAxeID = conf.getItem("Chameleon Axe", idCount++).getInt(); - wandCapID = conf.getItem("Wand Caps", idCount++).getInt(); - gluttonyShardID = conf.getItem("Gluttony Shard", idCount++).getInt(); - bloodwellID = conf.getItem("Bloody Scrivener's Tools", idCount++).getInt(); - crystalwellID = conf.getItem("Crystal Scribing Tools", idCount++).getInt(); - ridingCropID = conf.getItem("Riding Crop", idCount++).getInt(); - bloodOrbID = conf.getItem("Thaumic Blood Orbs", idCount++).getInt(); - divinewellID = conf.getItem("Scribing Tool of Thoth", idCount++).getInt(); - //boundShearsID = conf.getItem("Bound Shears", idCount++).getInt(); - - int blockCount = 3000; - arcaneCakeBlockID = conf.getBlock("Thaumic Cake", blockCount++).getInt(); - blackFlowerBlockID = conf.getBlock("Umbral Rose", blockCount++).getInt(); - wrathCageID = conf.getBlock("Wrath Cage", blockCount++).getInt(); - starBlockID = conf.getBlock("Nether Star Block", blockCount++).getInt(); - - int enchCount = 66; - clusterEnchID = conf.get("enchantments", "Fiery Core", enchCount++).getInt(); - pigBaneEnchID = conf.get("enchantments", "Porcivore", enchCount++).getInt(); - greedyEnchID = conf.get("enchantments", "Capitalist", enchCount++).getInt(); - consumingEnchID = conf.get("enchantments", "Consuming", enchCount++).getInt(); - educationalEnchID = conf.get("enchantments", "Educational", enchCount++).getInt(); - corruptingEnchID = conf.get("enchantments", "Corrupting", enchCount++).getInt(); - eternalEnchID = conf.get("enchantments", "Eternal", enchCount++).getInt(); - - Property nl = conf.get("general", "No Lust", noLust); - nl.comment = "Enable to remove Luxuria aspect and related items."; - noLust = nl.getBoolean(false); - Property sf = conf.get("general", "Silverfish Drop Emerald Nuggets", silverfishEmeralds); - sf.comment = "Disable to prevent Silverfish from dropping emerald nuggets."; - silverfishEmeralds = sf.getBoolean(true); - Property ge = conf.get("general", "Capitalist Enchantment", greedyEnch); - ge.comment = "Disable to remove the recipe and effects of the Capitalist enchantment."; - greedyEnch = ge.getBoolean(true); - Property et = conf.get("general", "Emerald Transmutation", emeraldTrans); - et.comment = "Disable to remove the Emerald Transmutation research and recipe."; - emeraldTrans = et.getBoolean(true); - Property tr = conf.get("general", "Tag Research Items", tagResearch); - tr.comment = "Disable to get rid of the [FM] tags in the Thaumonomicon."; - tagResearch = tr.getBoolean(true); - Property wc = conf.get("general", "Wrath Cage Enabled", wrathCage); - wc.comment = "Disable if you don't want players using the Wrath Cage."; - wrathCage = wc.getBoolean(true); - Property wf = conf.get("general", "Wrath Cage Fuel Cost", wrathCost); - wf.comment = "Cost of essentia per round of spawns in the Wrath Cage. Raise to increase essentia costs. Defaults to 5. Set to 0 to remove the need to fuel the Wrath Cage. Setting the cost above 64 is not recommended."; - wrathCost = wf.getInt(5); - Property we = conf.get("general", "Wrath Cage Fuel Efficiency", wrathEff); - we.comment = "Number of spawns a Wrath Cage can get per fuel cost. Defaults to 4. Lower to make the cage less efficient and raise to make it more efficient."; - wrathEff = we.getInt(4); - if(wrathEff < 0) - wrathEff = 4; - Property cw = conf.get("general", "Wrath Cage Cries Havoc", wrathCrazy); - cw.comment = "Enable to let the Wrath Cage imprint on ANY non-boss mob. May break your game or make your game Awesome."; - wrathCrazy = cw.getBoolean(false); - - Property sd = conf.get("silly", "Spork of Doom", spork); - sd.comment = "What is this? I don't even..."; - spork = sd.getBoolean(false); - } - catch (Exception e) - { - FMLLog.log(Level.SEVERE, e, "Forbidden Magic has a problem loading its configuration."); - } - finally - { - conf.save(); - } - - try { - - thaumcraftResourceID = ItemApi.getItem("itemResource", 0).itemID; - thaumcraftShardID = ItemApi.getItem("itemShard", 0).itemID; - thaumcraftTaintBlockID = ItemApi.getBlock("blockTaint", 0).itemID; - thaumcraftOreID = ItemApi.getBlock("blockCustomOre", 0).itemID; - taintMaterial = Block.blocksList[thaumcraftTaintBlockID].blockMaterial; - - thaumcraftTaintPotionID = Class.forName("thaumcraft.common.config.Config").getField("potionFluxTaintID").getInt(null); - thaumcraftTaintBiomeID = Class.forName("thaumcraft.common.config.Config").getField("biomeTaintID").getInt(null); - } - catch(Exception e) - { - FMLLog.log(Level.SEVERE, e, "Forbidden Magic is having a problem retrieving information from Thaumcraft."); - e.printStackTrace(); - } - - } - - public static void spawnilify() - { - if(wrathCage){ - spawnerMobs.put("Zombie", Aspect.FLESH); - spawnerMobs.put("Skeleton", Aspect.DEATH); - spawnerMobs.put("Creeper", Aspect.FIRE); - spawnerMobs.put("EntityHorse", Aspect.BEAST); - spawnerMobs.put("Pig", Aspect.BEAST); - spawnerMobs.put("Sheep", Aspect.CLOTH); - spawnerMobs.put("Cow", Aspect.BEAST); - spawnerMobs.put("MushroomCow", Aspect.PLANT); - spawnerMobs.put("Ozelot", Aspect.BEAST); - spawnerMobs.put("Chicken", Aspect.FLIGHT); - spawnerMobs.put("Squid", Aspect.SENSES); - spawnerMobs.put("Wolf", Aspect.BEAST); - spawnerMobs.put("Bat", Aspect.FLIGHT); - spawnerMobs.put("Spider", Aspect.CLOTH); - spawnerMobs.put("Slime", Aspect.SLIME); - spawnerMobs.put("Ghast", DarkAspects.NETHER); - spawnerMobs.put("PigZombie", Aspect.GREED); - spawnerMobs.put("Enderman", Aspect.ELDRITCH); - spawnerMobs.put("CaveSpider", Aspect.POISON); - if(silverfishEmeralds) - spawnerMobs.put("Silverfish", Aspect.GREED); - else - spawnerMobs.put("Silverfish", Aspect.STONE); - spawnerMobs.put("Blaze", Aspect.FIRE); - spawnerMobs.put("LavaSlime", Aspect.FIRE); - spawnerMobs.put("Witch", Aspect.MAGIC); - spawnerMobs.put("Thaumcraft.Firebat", Aspect.FIRE); - spawnerMobs.put("Thaumcraft.Wisp", Aspect.AURA); - spawnerMobs.put("Thaumcraft.ThaumSlime", Aspect.TAINT); - spawnerMobs.put("Thaumcraft.BrainyZombie", Aspect.MIND); - spawnerMobs.put("Thaumcraft.TaintSpider", Aspect.TAINT); - spawnerMobs.put("Thaumcraft.TaintSwarm", Aspect.TAINT); - spawnerMobs.put("Thaumcraft.TaintedPig", Aspect.TAINT); - spawnerMobs.put("Thaumcraft.TaintedSheep", Aspect.TAINT); - spawnerMobs.put("Thaumcraft.TaintedCow", Aspect.TAINT); - spawnerMobs.put("Thaumcraft.TaintedChicken", Aspect.TAINT); - spawnerMobs.put("Thaumcraft.TaintedVillager", Aspect.TAINT); - //spawnerMobs.put("Taintacle", DarkAspects.LUST); - - } - } -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/DarkAspects.java b/src/com/spiteful/forbidden/DarkAspects.java deleted file mode 100644 index 0a5ab55..0000000 --- a/src/com/spiteful/forbidden/DarkAspects.java +++ /dev/null @@ -1,306 +0,0 @@ -package com.spiteful.forbidden; - -import com.spiteful.forbidden.items.ForbiddenItems; -import com.spiteful.forbidden.blocks.ForbiddenBlocks; - -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.AspectList; -import thaumcraft.api.ThaumcraftApi; -import thaumcraft.api.ThaumcraftApiHelper; -import thaumcraft.api.ItemApi; -import net.minecraft.util.ResourceLocation; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import java.util.Iterator; - -public class DarkAspects -{ - public static Aspect NETHER; - public static Aspect WRATH; - public static Aspect ENVY; - public static Aspect GLUTTONY; - public static Aspect PRIDE; - public static Aspect LUST; - public static Aspect SLOTH; - - public static void initAspects() - { - NETHER = new Aspect("infernus", 0xff0000, new Aspect[] {Aspect.FIRE, Aspect.MAGIC}, new ResourceLocation("forbidden", "textures/aspects/infernus.png"), 771); - if(!Config.noLust){ - LUST = new Aspect("luxuria", 0xffc1ce, new Aspect[] {Aspect.FLESH, Aspect.HUNGER}, new ResourceLocation("forbidden", "textures/aspects/luxuria.png"), 1); - } - PRIDE = new Aspect("superbia", 0x9639ff, new Aspect[] {Aspect.FLIGHT, Aspect.VOID}, new ResourceLocation("forbidden", "textures/aspects/superbia.png"), 1); - GLUTTONY = new Aspect("gula", 0xd59c46, new Aspect[] {Aspect.HUNGER, Aspect.HUNGER}, new ResourceLocation("forbidden", "textures/aspects/gula.png"), 1); - ENVY = new Aspect("invidia", 0x00ba00, new Aspect[] {Aspect.SENSES, Aspect.HUNGER}, new ResourceLocation("forbidden", "textures/aspects/invidia.png"), 1); - SLOTH = new Aspect("desidia", 0x6e6e6e, new Aspect[] {Aspect.TRAP, Aspect.SOUL}, new ResourceLocation("forbidden", "textures/aspects/desidia.png"), 771); - WRATH = new Aspect("ira", 0x870404, new Aspect[] {Aspect.WEAPON, Aspect.FIRE}, new ResourceLocation("forbidden", "textures/aspects/ira.png"), 771); - - } - - public static void addAspects() - { - AspectList list; - - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Block.netherrack)); - list.add(NETHER, 1); - ThaumcraftApi.registerObjectTag(Block.netherrack.blockID, -1, list); - - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Block.portal)); - list.add(NETHER, 4); - ThaumcraftApi.registerObjectTag(Block.portal.blockID, -1, list); - - //list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Block.oreNetherQuartz)); - //list.add(NETHER, 2); - //ThaumcraftApi.registerObjectTag(Block.oreNetherQuartz.blockID, -1, list); - ThaumcraftApi.registerObjectTag("oreQuartz", (new AspectList()).add(Aspect.STONE, 1).add(Aspect.CRYSTAL, 3).add(NETHER, 2)); - - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.netherStar)); - list.add(NETHER, 8).add(PRIDE, 8); - ThaumcraftApi.registerObjectTag(Item.netherStar.itemID, 0, list); - - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.netherStalkSeeds)); - list.add(NETHER, 1); - ThaumcraftApi.registerObjectTag(Item.netherStalkSeeds.itemID, 0, list); - - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.netherrackBrick)); - list.add(NETHER, 1); - ThaumcraftApi.registerObjectTag(Item.netherrackBrick.itemID, -1, list); - - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Block.netherBrick)); - list.add(NETHER, 2); - ThaumcraftApi.registerObjectTag(Block.netherBrick.blockID, 0, list); - - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.ghastTear)); - list.add(WRATH, 4); - ThaumcraftApi.registerObjectTag(Item.ghastTear.itemID, -1, list); - - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.skull.itemID, 1, 1)); - list.add(NETHER, 4); - ThaumcraftApi.registerObjectTag(Item.skull.itemID, 1, list); - - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.skull.itemID, 1, 4)); - list.add(WRATH, 2); - ThaumcraftApi.registerObjectTag(Item.skull.itemID, 4, list); - - //list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.enderPearl)); - //list.add(PRIDE, 1); - //ThaumcraftApi.registerObjectTag(Item.enderPearl.itemID, -1, list); - - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Block.tnt)); - list.add(WRATH, 2); - ThaumcraftApi.registerObjectTag(Block.tnt.blockID, 0, list); - - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.helmetGold)); - if(list != null){ - list.add(PRIDE, 2); - ThaumcraftApi.registerObjectTag(Item.helmetGold.itemID, -1, list); - } - - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.plateGold)); - if(list != null){ - list.add(PRIDE, 1); - ThaumcraftApi.registerObjectTag(Item.plateGold.itemID, -1, list); - } - - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.legsGold)); - if(list != null){ - list.add(PRIDE, 1); - ThaumcraftApi.registerObjectTag(Item.legsGold.itemID, -1, list); - } - - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.bootsGold)); - if(list != null){ - list.add(PRIDE, 1); - ThaumcraftApi.registerObjectTag(Item.bootsGold.itemID, -1, list); - } - - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.swordGold)); - if(list != null){ - list.add(PRIDE, 2); - ThaumcraftApi.registerObjectTag(Item.swordGold.itemID, -1, list); - } - - //list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.bed)); - //list.add(SLOTH, 4); - list = (new AspectList()).add(Aspect.CRAFT, 3).add(Aspect.CLOTH, 6).add(SLOTH, 4); - ThaumcraftApi.registerObjectTag(Item.bed.itemID, -1, list); - - //list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.eyeOfEnder)).copy(); - list = (new AspectList()).add(Aspect.SENSES, 4).add(Aspect.ELDRITCH, 4).add(Aspect.MAGIC, 3); - list.add(ENVY, 4); - ThaumcraftApi.registerObjectTag(Item.eyeOfEnder.itemID, 0, list); - //ThaumcraftApi.registerComplexObjectTag(Item.eyeOfEnder.itemID, 0, (new AspectList()).add(Aspect.SENSES, 4).add(ENVY, 86)); - - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.cake)); - list.add(GLUTTONY, 7); - ThaumcraftApi.registerObjectTag(Item.cake.itemID, 0, list); - - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.cookie)); - list.add(GLUTTONY, 1); - ThaumcraftApi.registerObjectTag(Item.cookie.itemID, -1, list); - - //list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.fireballCharge)); - list = new AspectList(); - list.add(Aspect.FIRE, 3).add(Aspect.ENTROPY, 1).add(Aspect.ENERGY, 1).add(WRATH, 1); - ThaumcraftApi.registerObjectTag(Item.fireballCharge.itemID, 0, list); - - //list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.comparator)).copy(); - //list.add(ENVY, 2); - list = (new AspectList()).add(Aspect.MECHANISM, 2).add(Aspect.ORDER, 2).add(ENVY, 2); - ThaumcraftApi.registerObjectTag(Item.comparator.itemID, -1, list); - //ThaumcraftApi.registerComplexObjectTag(Block.redstoneComparatorIdle.blockID, -1, (new AspectList()).merge(Aspect.MECHANISM, 2).merge(Aspect.ORDER, 2).merge(ENVY, 2)); - //ThaumcraftApi.registerComplexObjectTag(Block.redstoneComparatorActive.blockID, -1, (new AspectList()).merge(Aspect.MECHANISM, 2).merge(Aspect.ORDER, 2).merge(ENVY, 2)); - - list = (new AspectList()).add(Aspect.FLESH, 6).add(Aspect.LIFE, 6).add(Aspect.ENERGY, 6).add(Aspect.BEAST, 4).add(GLUTTONY, 6); - ThaumcraftApi.registerObjectTag("itemBacon", list); - - if(!Config.noLust) - { - list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.saddle)); - list.add(LUST, 2); - ThaumcraftApi.registerObjectTag(Item.saddle.itemID, -1, list); - - //list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.leash)); - list = (new AspectList()).add(Aspect.BEAST, 2).add(Aspect.CLOTH, 2).add(Aspect.SLIME, 1); - list.add(LUST, 2); - ThaumcraftApi.registerObjectTag(Item.leash.itemID, -1, list); - } - - Iterator mobCount = ThaumcraftApi.scanEntities.iterator(); - - while (mobCount.hasNext()) - { - ThaumcraftApi.EntityTags mobTag = (ThaumcraftApi.EntityTags)mobCount.next(); - - if (mobTag.entityName.equals("BrainyZombie")) - { - mobTag.aspects.add(WRATH, 3); - } - - else if (mobTag.entityName.equals("GiantBrainyZombie")) - { - mobTag.aspects.add(WRATH, 4); - } - - else if (mobTag.entityName.equals("Firebat")) - { - mobTag.aspects.add(WRATH, 1).add(NETHER, 2); - } - - else if (mobTag.entityName.equals("Skeleton") && mobTag.nbts.length > 0) - { - mobTag.aspects.add(NETHER, 3); - } - - else if (mobTag.entityName.equals("Creeper")) - { - if(mobTag.nbts.length > 0) - mobTag.aspects.add(WRATH, 4); - else - mobTag.aspects.add(WRATH, 2); - } - - else if (mobTag.entityName.equals("WitherBoss")) - { - mobTag.aspects.add(NETHER, 7).add(WRATH, 7); - } - - else if (mobTag.entityName.equals("Ozelot")) - { - mobTag.aspects.add(SLOTH, 3); - } - - else if (mobTag.entityName.equals("Enderman")) - { - mobTag.aspects.add(PRIDE, 4).add(ENVY, 4); - } - - else if (mobTag.entityName.equals("Ghast")) - { - mobTag.aspects.add(NETHER, 3).add(WRATH, 3); - } - - else if (mobTag.entityName.equals("PigZombie")) - { - mobTag.aspects.add(WRATH, 6); - } - - else if (mobTag.entityName.equals("EnderDragon")) - { - mobTag.aspects.add(PRIDE, 10); - } - - else if (!Config.noLust && mobTag.entityName.equals("Taintacle")) - { - mobTag.aspects.add(LUST, 3); - } - - else if (mobTag.entityName.equals("Pig")) - { - mobTag.aspects.add(GLUTTONY, 3); - } - - else if(mobTag.entityName.equals("LavaSlime")) - { - mobTag.aspects.add(NETHER, 1); - } - - else if(!Config.noLust && mobTag.entityName.equals("TwilightForest.Forest Bunny")) - { - mobTag.aspects.add(LUST, 5); - } - - else if(mobTag.entityName.equals("TwilightForest.Mini Ghast")) - { - mobTag.aspects.add(NETHER, 1).add(WRATH, 1); - } - - else if(mobTag.entityName.equals("TwilightForest.Tower Boss")) - { - mobTag.aspects.add(NETHER, 10).add(WRATH, 10); - } - - else if(mobTag.entityName.equals("TwilightForest.Tower Ghast")) - { - mobTag.aspects.add(NETHER, 3).add(WRATH, 3); - } - - else if(mobTag.entityName.equals("TwilightForest.Twilight Lich")) - { - mobTag.aspects.add(PRIDE, 10); - } - - else if(!Config.noLust && mobTag.entityName.equals("TwilightForest.Pinch Beetle")) - { - mobTag.aspects.add(LUST, 3); - } - - else if(mobTag.entityName.equals("TwilightForest.King Spider")) - { - mobTag.aspects.add(PRIDE, 4); - } - else if(mobTag.entityName.equals("witchery.demon")) - { - mobTag.aspects.add(NETHER, 8); - } - } - - ThaumcraftApi.registerObjectTag(ForbiddenItems.deadlyShards.itemID, 0, (new AspectList()).add(NETHER, 1).add(WRATH, 2).add(Aspect.CRYSTAL, 1)); - ThaumcraftApi.registerObjectTag(ForbiddenItems.deadlyShards.itemID, 1, (new AspectList()).add(NETHER, 1).add(ENVY, 2).add(Aspect.CRYSTAL, 1)); - ThaumcraftApi.registerObjectTag(ForbiddenItems.deadlyShards.itemID, 2, (new AspectList()).add(Aspect.TAINT, 3).add(Aspect.CRYSTAL, 1)); - ThaumcraftApi.registerObjectTag(ForbiddenItems.deadlyShards.itemID, 3, (new AspectList()).add(NETHER, 1).add(PRIDE, 2).add(Aspect.CRYSTAL, 1)); - if(!Config.noLust) - ThaumcraftApi.registerObjectTag(ForbiddenItems.deadlyShards.itemID, 4, (new AspectList()).add(NETHER, 1).add(LUST, 2).add(Aspect.CRYSTAL, 1)); - else - ThaumcraftApi.registerObjectTag(ForbiddenItems.deadlyShards.itemID, 4, (new AspectList()).add(Aspect.VOID, 1)); - ThaumcraftApi.registerObjectTag(ForbiddenItems.gluttonyShard.itemID, -1, (new AspectList()).add(NETHER, 1).add(GLUTTONY, 2).add(Aspect.CRYSTAL, 1)); - ThaumcraftApi.registerObjectTag(ForbiddenItems.deadlyShards.itemID, 5, (new AspectList()).add(NETHER, 1).add(SLOTH, 2).add(Aspect.CRYSTAL, 1)); - ThaumcraftApi.registerObjectTag(ForbiddenItems.deadlyShards.itemID, 6, (new AspectList()).add(NETHER, 1).add(Aspect.GREED, 2).add(Aspect.CRYSTAL, 1)); - ThaumcraftApi.registerObjectTag(ForbiddenItems.resource.itemID, 0, (new AspectList()).add(Aspect.CRYSTAL, 1)); - ThaumcraftApi.registerObjectTag(ForbiddenItems.resource.itemID, 1, (new AspectList()).add(Aspect.DARKNESS, 1)); - ThaumcraftApi.registerObjectTag(ForbiddenBlocks.blackFlower.blockID, -1, (new AspectList()).add(Aspect.PLANT, 1).add(Aspect.LIFE, 1).add(Aspect.SENSES, 1).add(Aspect.DARKNESS, 1)); - if(!Config.noLust) - ThaumcraftApi.registerObjectTag(ForbiddenItems.ridingCrop.itemID, -1, (new AspectList()).add(Aspect.TREE, 2).add(Aspect.CLOTH, 2).add(Aspect.BEAST, 1).add(LUST, 1).add(Aspect.WEAPON, 1)); - } -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/DarkResearchItem.java b/src/com/spiteful/forbidden/DarkResearchItem.java deleted file mode 100644 index a9298e4..0000000 --- a/src/com/spiteful/forbidden/DarkResearchItem.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.spiteful.forbidden; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.AspectList; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import thaumcraft.api.research.ResearchItem; - -public class DarkResearchItem extends ResearchItem -{ - String inter = null; - - public DarkResearchItem(String par1, String par2) - { - super(par1, par2); - } - - public DarkResearchItem(String par1, String par2, AspectList tags, int par3, int par4, int par5, ResourceLocation icon) - { - super(par1, par2, tags, par3, par4, par5, icon); - } - - public DarkResearchItem(String par1, String par2, AspectList tags, int par3, int par4, int par5, ItemStack icon) - { - super(par1, par2, tags, par3, par4, par5, icon); - } - - public DarkResearchItem(String par1, String par2, String mod, AspectList tags, int par3, int par4, int par5, ResourceLocation icon) - { - super(par1, par2, tags, par3, par4, par5, icon); - inter = mod; - } - - public DarkResearchItem(String par1, String par2, String mod, AspectList tags, int par3, int par4, int par5, ItemStack icon) - { - super(par1, par2, tags, par3, par4, par5, icon); - inter = mod; - } - - @SideOnly(Side.CLIENT) - public String getName() - { - return StatCollector.translateToLocal("forbidden.research_name." + key); - } - - @SideOnly(Side.CLIENT) - public String getText() - { - if(Config.tagResearch) - { - if(inter == null) - return "[FM] " + StatCollector.translateToLocal("forbidden.research_text." + key); - else - return "[FM] " + inter + " " + StatCollector.translateToLocal("forbidden.research_text." + key); - } - else - return StatCollector.translateToLocal("forbidden.research_text." + key); - } -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/FMEventHandler.java b/src/com/spiteful/forbidden/FMEventHandler.java deleted file mode 100644 index de4446b..0000000 --- a/src/com/spiteful/forbidden/FMEventHandler.java +++ /dev/null @@ -1,440 +0,0 @@ -package com.spiteful.forbidden; - -import com.spiteful.forbidden.items.ForbiddenItems; -import com.spiteful.forbidden.blocks.ForbiddenBlocks; -import com.spiteful.forbidden.blocks.BlockBlackFlower; -import com.spiteful.forbidden.enchantments.*; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.Random; -import net.minecraft.block.Block; -import net.minecraft.entity.EnumCreatureAttribute; -import net.minecraft.entity.EntityList; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.boss.IBossDisplayData; -import net.minecraft.entity.item.EntityXPOrb; -import net.minecraft.entity.monster.IMob; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityPigZombie; -import net.minecraft.entity.monster.EntitySilverfish; -import net.minecraft.entity.monster.EntitySkeleton; -import net.minecraft.entity.monster.EntitySpider; -import net.minecraft.entity.monster.EntityZombie; -import net.minecraft.entity.passive.EntityVillager; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemTool; -import net.minecraft.item.ItemSword; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagString; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraftforge.common.FakePlayer; -import net.minecraftforge.event.ForgeSubscribe; -import net.minecraftforge.event.entity.living.LivingAttackEvent; -import net.minecraftforge.event.entity.living.LivingDeathEvent; -import net.minecraftforge.event.entity.living.LivingDropsEvent; -import net.minecraftforge.event.entity.living.LivingHurtEvent; -import net.minecraftforge.event.entity.living.LivingSetAttackTargetEvent; -import net.minecraftforge.event.entity.living.LivingSpawnEvent; -import net.minecraftforge.event.entity.player.ItemTooltipEvent; -import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent; -import net.minecraftforge.event.Event.Result; -import net.minecraftforge.event.entity.player.BonemealEvent; -import thaumcraft.common.items.wands.ItemWandCasting; -import thaumcraft.common.lib.Utils; -import thaumcraft.api.aspects.Aspect; - -public class FMEventHandler -{ - Random randy = new Random(); - final Aspect[] primals = {Aspect.ENTROPY, Aspect.ORDER, Aspect.FIRE, Aspect.WATER, Aspect.EARTH, Aspect.AIR}; - - @ForgeSubscribe - public void onLivingDrops(LivingDropsEvent event) - { - if(Config.silverfishEmeralds && event.entityLiving instanceof EntitySilverfish){ - - if(event.entityLiving.worldObj.getBiomeGenForCoords((int)event.entityLiving.posX, (int)event.entityLiving.posZ).biomeID == - BiomeGenBase.extremeHills.biomeID){ - if(event.recentlyHit && event.source.getEntity() != null - && event.source.getEntity() instanceof EntityPlayer && randy.nextInt(30) <= (2 + event.lootingLevel * 2)) - addDrop(event, new ItemStack(ForbiddenItems.resource, 1, 0)); - } - else if(event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer - && !(event.source.getEntity() instanceof FakePlayer) && randy.nextInt(70) <= (1 + event.lootingLevel * 3)){ - - addDrop(event, new ItemStack(ForbiddenItems.resource, 1, 0)); - } - - } - - if(Config.greedyEnch && (event.entityLiving instanceof EntityVillager || event.entityLiving instanceof IMob) && - event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer)event.source.getEntity(); - ItemStack equip = player.getCurrentEquippedItem(); - if(equip != null && EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.greedy.effectId, equip) > 0 - && event.lootingLevel <= 0) - { - if(event.entityLiving instanceof EntityVillager) - addDrop(event, new ItemStack(Item.emerald, 1)); - else if(randy.nextInt(35) < 3) - addDrop(event, new ItemStack(ForbiddenItems.resource, 1, 0)); - } - } - - if (event.entityLiving.getClass() == EntitySkeleton.class && event.recentlyHit && event.source.getEntity() != null - && event.source.getEntity() instanceof EntityPlayer) - { - ItemStack weap = ((EntityPlayer)event.source.getEntity()).getCurrentEquippedItem(); - - if (weap != null && weap.itemID == ForbiddenItems.skullAxe.itemID && randy.nextInt(26) <= (3 + EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, weap))) - { - addDrop(event, new ItemStack(Item.skull.itemID, 1, ((EntitySkeleton)event.entityLiving).getSkeletonType())); - } - } - - if (event.entityLiving.getClass() == EntityZombie.class && event.recentlyHit && event.source.getEntity() != null - && event.source.getEntity() instanceof EntityPlayer) - { - ItemStack weap = ((EntityPlayer)event.source.getEntity()).getCurrentEquippedItem(); - - if (weap != null && weap.itemID == ForbiddenItems.skullAxe.itemID && randy.nextInt(26) <= (2 + 2 * EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, weap))) - { - addDrop(event, new ItemStack(Item.skull.itemID, 1, 2)); - } - } - - if (event.entityLiving.getClass() == EntityCreeper.class && event.recentlyHit && event.source.getEntity() != null - && event.source.getEntity() instanceof EntityPlayer) - { - ItemStack weap = ((EntityPlayer)event.source.getEntity()).getCurrentEquippedItem(); - - if (weap != null && weap.itemID == ForbiddenItems.skullAxe.itemID && randy.nextInt(26) <= (2 + 2 * EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, weap))) - { - addDrop(event, new ItemStack(Item.skull.itemID, 1, 4)); - } - } - - if (event.entityLiving instanceof EntityPlayer && event.recentlyHit && event.source.getEntity() != null - && event.source.getEntity() instanceof EntityPlayer) - { - ItemStack weap = ((EntityPlayer)event.source.getEntity()).getCurrentEquippedItem(); - - if (weap != null && weap.itemID == ForbiddenItems.skullAxe.itemID && randy.nextInt(11) <= (1 + EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, weap))) - { - ItemStack head = new ItemStack(Item.skull.itemID, 1, 3); - NBTTagCompound nametag = new NBTTagCompound(); - nametag.setString("SkullOwner", ((EntityPlayer)event.entityLiving).username); - head.setTagInfo("SkullOwner", nametag); - addDrop(event, head); - } - } - - if (event.entityLiving.worldObj.provider.dimensionId != -1) - return; - - if (!event.recentlyHit || event.source.getEntity() == null || !(event.source.getEntity() instanceof EntityPlayer) - || event.source.getEntity() instanceof FakePlayer) - { - if (randy.nextInt(30) < 4) - { - addDrop(event, new ItemStack(ForbiddenItems.deadlyShards, 1 + randy.nextInt(3), 5)); - } - } - - if (event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer - && !(event.source.getEntity() instanceof FakePlayer)) - { - if (event.entityLiving instanceof IMob) - { - int wrath = 2; - ItemStack heldItem = ((EntityPlayer)event.source.getEntity()).getCurrentEquippedItem(); - - if (heldItem != null) - { - if (heldItem.getItem() instanceof ItemTool) - { - wrath += (int)(((ItemTool)heldItem.getItem()).damageVsEntity); - } - else if (heldItem.getItem() instanceof ItemSword) - { - wrath += (int)(((ItemSword)heldItem.getItem()).func_82803_g() + 4.0F); - } - - wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.sharpness.effectId, heldItem); - wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, heldItem); - - if (!event.entityLiving.isImmuneToFire()) - { - wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, heldItem); - wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, heldItem); - } - - if (event.entityLiving.isEntityUndead()) - { - wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.smite.effectId, heldItem); - } - - if (event.entityLiving.getCreatureAttribute() == EnumCreatureAttribute.ARTHROPOD) - { - wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.baneOfArthropods.effectId, heldItem); - } - } - - if (randy.nextInt(61) <= wrath) - { - addDrop(event, new ItemStack(ForbiddenItems.deadlyShards, 1, 0)); - } - - if(event.entityLiving instanceof IBossDisplayData){ - addDrop(event, new ItemStack(ForbiddenItems.deadlyShards, 2 + randy.nextInt(1 + event.lootingLevel), 3)); - } - } - - if (event.entityLiving instanceof EntityPigZombie && !(event.source.getEntity() instanceof FakePlayer)) - { - if (event.entityLiving.getHeldItem() != null && event.entityLiving.getHeldItem().itemID == ForbiddenItems.deadlyShards.itemID - && event.entityLiving.getHeldItem().getItemDamage() == 1) - { - addDrop(event, new ItemStack(ForbiddenItems.deadlyShards, 1, 1)); - } - } - } - } - - public void addDrop(LivingDropsEvent event, ItemStack drop) - { - EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, drop); - entityitem.delayBeforeCanPickup = 10; - event.drops.add(entityitem); - } - - @ForgeSubscribe - public void onDeath(LivingDeathEvent event){ - if(event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer - && ((EntityPlayer)event.source.getEntity()).getCurrentEquippedItem() != null) - { - ItemStack equip = ((EntityPlayer)event.source.getEntity()).getCurrentEquippedItem(); - - if(equip.itemID == ForbiddenItems.fork.itemID){ - String name = null; - try { - name = EntityList.getEntityString(event.entityLiving); - } - catch(Exception e){ - try { - name = event.entityLiving.getEntityName(); - } - catch(Exception ee){ - return; - } - } - finally { - if(name == null) - return; - } - if(Config.spawnerMobs.containsKey(name) ||(Config.wrathCrazy && !(event.entityLiving instanceof IBossDisplayData))) - imprintCrystal((EntityPlayer)(event.source.getEntity()), name); - } - - if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.educational.effectId, equip) > 0 && event.entityLiving instanceof EntityLiving - && EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, equip) == 0) - { - int learning = 3 * ((EntityLiving)event.entityLiving).experienceValue * EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.educational.effectId, equip); - while(learning > 0) - { - int xp = EntityXPOrb.getXPSplit(learning); - learning -= xp; - event.entityLiving.worldObj.spawnEntityInWorld(new EntityXPOrb(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, xp)); - } - - } - } - } - - public void imprintCrystal(EntityPlayer player, String mob){ - for(int x = 0; x < player.inventory.getSizeInventory(); ++x) { - ItemStack item = player.inventory.getStackInSlot(x); - if(item != null && item.itemID == ForbiddenItems.mobCrystal.itemID - && (!item.hasTagCompound() || item.getTagCompound().getTag("mob") == null)){ - NBTTagString mobTag = new NBTTagString("mob", mob); - item.setTagInfo("mob", mobTag); - return; - } - } - } - - @ForgeSubscribe - public void onHarvest(HarvestDropsEvent event) - { - EntityPlayer player = event.harvester; - if(player != null && player.inventory.getCurrentItem() != null) - { - ItemStack equip = player.inventory.getCurrentItem(); - if(equip.itemID == ForbiddenItems.taintShovel.itemID - && event.block.blockMaterial == Config.taintMaterial && !(event.block.blockID == Config.thaumcraftTaintBlockID && event.blockMetadata == 2)) - { - int fortune = EnchantmentHelper.getFortuneModifier(player); - int chance = 1 + (2 * fortune); - if(event.isSilkTouching) - chance += 6; - - if(randy.nextInt(51) <= chance) { - event.drops.add(new ItemStack(ForbiddenItems.deadlyShards, 1, 2)); - } - } - if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.cluster.effectId, equip) > 0 && EnchantmentHelper.getFortuneModifier(player) == 0){ - if(event.drops != null && event.drops.size() > 0) { - int cluster = EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.cluster.effectId, equip); - float chance = 0.2F + (float)cluster * 0.075F; - - for(int a = 0; a < event.drops.size(); ++a) - { - ItemStack is = (ItemStack)event.drops.get(a); - ItemStack smr = Utils.findSpecialMiningResult(is, chance, event.world.rand); - if(!is.isItemEqual(smr)) - { - event.drops.set(a, smr); - if(!event.world.isRemote) - { - event.world.playSoundEffect((double)((float)event.x + 0.5F), (double)((float)event.y + 0.5F), (double)((float)event.z + 0.5F), "random.orb", 0.2F, 0.7F + event.world.rand.nextFloat() * 0.2F); - } - } - } - } - } - if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.consuming.effectId, equip) > 0) - { - for(int x = 0;x < event.drops.size();x++) - { - ItemStack drop = (ItemStack)event.drops.get(x); - if(drop != null && (drop.itemID == Block.cobblestone.blockID || drop.itemID == Block.dirt.blockID || drop.itemID == Block.netherrack.blockID - || drop.itemID == Block.gravel.blockID)) - event.drops.remove(x); - } - } - if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.corrupting.effectId, equip) > 0 && event.block.blockID == Config.thaumcraftOreID && randy.nextInt(3) == 1) - { - ArrayList moarDrops = new ArrayList(); - ArrayList deadDrops = new ArrayList(); - Iterator current = event.drops.iterator(); - while(current.hasNext()) - { - ItemStack curDrop = (ItemStack)current.next(); - if(curDrop != null && curDrop.itemID == Config.thaumcraftShardID) - { - int x = curDrop.stackSize; - for(int i = 0;i < x;i++) - { - moarDrops.add(getSinShard()); - } - deadDrops.add(curDrop); - } - } - current = deadDrops.iterator(); - while(current.hasNext()) - { - event.drops.remove((ItemStack)(current.next())); - } - current = moarDrops.iterator(); - while(current.hasNext()) - { - event.drops.add((ItemStack)(current.next())); - } - } - } - } - - public ItemStack getSinShard() - { - int x = randy.nextInt(7); - switch(x) - { - case 0: - case 1: - case 3: - case 5: - case 6: return new ItemStack(ForbiddenItems.deadlyShards, 1, x); - case 2: return new ItemStack(ForbiddenItems.gluttonyShard, 1, 0); - case 4: if(Config.noLust) - return getSinShard(); - else - return new ItemStack(ForbiddenItems.deadlyShards, 1, 4); - } - return null; - } - - @ForgeSubscribe - public void onBonemeal(BonemealEvent event){ - if(event.ID == ForbiddenBlocks.blackFlower.blockID){ - ((BlockBlackFlower)ForbiddenBlocks.blackFlower).spreadFlowers(event.world, event.X, event.Y, event.Z, randy); - event.setResult(Result.ALLOW); - } - } - - @ForgeSubscribe - public void onSpawn(LivingSpawnEvent event){ - if(event.entityLiving.worldObj.provider.dimensionId == -1 && event.entityLiving instanceof EntityPigZombie - && randy.nextInt(175) == 1) - event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(ForbiddenItems.deadlyShards, 1, 1)); - } - - @ForgeSubscribe - public void onGetHurt(LivingHurtEvent event){ - if(event.entityLiving instanceof EntityPlayer && ((EntityPlayer)event.entityLiving).getCurrentEquippedItem() != null - && ((EntityPlayer)event.entityLiving).getCurrentEquippedItem().getItem() instanceof ItemWandCasting){ - - ItemStack wand = ((EntityPlayer)event.entityLiving).getCurrentEquippedItem(); - if(event.source.getDamageType().equals("taint") && ((ItemWandCasting)wand.getItem()).getRod(wand).getTag().equals("tainted")){ - - for(int x = 0;x < 3;x++){ - ((ItemWandCasting)wand.getItem()).addVis(wand, primals[randy.nextInt(6)], 1, true); - } - - } - - if((event.source.getDamageType().equals("wither") || event.source.isFireDamage()) - && ((ItemWandCasting)wand.getItem()).getRod(wand).getTag().equals("infernal")){ - - event.setCanceled(true); - } - } - - if(event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) - { - ItemStack equip = ((EntityPlayer)event.source.getEntity()).getCurrentEquippedItem(); - if(equip != null && equip.getItem() instanceof ItemWandCasting) - { - if(((ItemWandCasting)equip.getItem()).getCap(equip).getTag().equals("alchemical") - && ((ItemWandCasting)equip.getItem()).getRod(equip).getTag().startsWith("blood")) - { - event.entityLiving.addPotionEffect(new PotionEffect(Potion.weakness.id, 60, 2)); - } - } - } - } - - @ForgeSubscribe - public void onTooltip(ItemTooltipEvent event) - { - if(event.itemStack.getItem() instanceof ItemWandCasting){ - if (((ItemWandCasting)event.itemStack.getItem()).getRod(event.itemStack).getTag().startsWith("blood") && !event.itemStack.stackTagCompound.getString("ownerName").equals("")) - { - event.toolTip.add("Current owner: " + event.itemStack.stackTagCompound.getString("ownerName")); - } - else if(((ItemWandCasting)event.itemStack.getItem()).getRod(event.itemStack).getTag().startsWith("neutronium")) - { - event.toolTip.add("Creative Only"); - } - } - } - -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/ForbiddenResearch.java b/src/com/spiteful/forbidden/ForbiddenResearch.java deleted file mode 100644 index c47abad..0000000 --- a/src/com/spiteful/forbidden/ForbiddenResearch.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.spiteful.forbidden; - -import com.spiteful.forbidden.items.ForbiddenItems; -import com.spiteful.forbidden.blocks.ForbiddenBlocks; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.nbt.NBTTagByte; -import net.minecraft.util.ResourceLocation; -import thaumcraft.api.ItemApi; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.AspectList; -import thaumcraft.api.crafting.CrucibleRecipe; -import thaumcraft.api.crafting.IArcaneRecipe; -import thaumcraft.api.crafting.InfusionEnchantmentRecipe; -import thaumcraft.api.crafting.InfusionRecipe; -import thaumcraft.api.nodes.NodeModifier; -import thaumcraft.api.nodes.NodeType; -import thaumcraft.api.research.ResearchCategories; -import thaumcraft.api.research.ResearchCategoryList; -import thaumcraft.api.research.ResearchItem; -import thaumcraft.api.research.ResearchPage; - -public class ForbiddenResearch -{ - public static HashMap recipes = new HashMap(); - - public static void addResearch() - { - ResearchCategories.registerCategory("FORBIDDEN", new ResourceLocation("forbidden", "textures/misc/forbidden.png"), new ResourceLocation("forbidden", "textures/misc/runecircle.png")); - - (new FauxResearchItem("INFAUXSION", "FORBIDDEN", "INFUSION", "ARTIFICE", -5, 0, ItemApi.getBlock("blockStoneDevice", 2))).registerResearchItem(); - if(ResearchCategories.researchCategories.containsKey("TT_ENCHANTING") - && ResearchCategories.researchCategories.get("TT_ENCHANTING").research.containsKey("INFUSIONENCHANTMENT")) - (new FauxResearchItem("INFAUXSIONENCHANTMENT", "FORBIDDEN", "INFUSIONENCHANTMENT", "TT_ENCHANTING", -3, 3, new ResourceLocation("thaumcraft", "textures/misc/r_enchant.png"))).setParents(new String[]{"INFAUXSION"}).registerResearchItem(); - else - (new FauxResearchItem("INFAUXSIONENCHANTMENT", "FORBIDDEN", "INFUSIONENCHANTMENT", "ARTIFICE", -3, 3, new ResourceLocation("thaumcraft", "textures/misc/r_enchant.png"))).setParents(new String[]{"INFAUXSION"}).registerResearchItem(); - - addInfernalism(); - addTaint(); - - if(Config.emeraldTrans) - (new DarkResearchItem("TRANSEMERALD", "FORBIDDEN", (new AspectList()).add(Aspect.CRYSTAL, 2).add(Aspect.EXCHANGE, 5).add(Aspect.GREED, 4), -6, 4, 3, new ItemStack(ForbiddenItems.resource, 1, 0))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.TRANSEMERALD.1"), new ResearchPage((CrucibleRecipe)recipes.get("TransEmerald"))}).setSecondary().setConcealed().setParents(new String[]{"TRANSGOLD"}).registerResearchItem(); - (new DarkResearchItem("BLACKFLOWER", "FORBIDDEN", (new AspectList()).add(Aspect.PLANT, 3).add(Aspect.SENSES, 2).add(Aspect.DARKNESS, 4), -7, 4, 1, new ItemStack(ForbiddenBlocks.blackFlower, 1, 0))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.BLACKFLOWER.1"), new ResearchPage((CrucibleRecipe)recipes.get("BlackFlower")), new ResearchPage((IRecipe)recipes.get("BlackInk"))}).setAspectTriggers(new Aspect[]{Aspect.SENSES}).registerResearchItem(); - - (new DarkResearchItem("CRYSTALWELL", "FORBIDDEN", (new AspectList()).add(Aspect.MIND, 3).add(Aspect.CRYSTAL, 2).add(Aspect.MAGIC, 1), -9, 4, 1, new ItemStack(ForbiddenItems.crystalwell, 1, 0))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.CRYSTALWELL.1"), new ResearchPage((IArcaneRecipe)recipes.get("Crystalwell"))}).setParents(new String[]{"RESEARCH"}).setAspectTriggers(new Aspect[]{Aspect.MIND}).setConcealed().registerResearchItem(); - - (new DarkResearchItem("CONSUMING", "FORBIDDEN", (new AspectList()).add(Aspect.VOID, 4).add(Aspect.ENTROPY, 3).add(Aspect.MAGIC, 2), -1, 2, 2, new ResourceLocation("forbidden", "textures/misc/consuming.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.CONSUMING.1"), new ResearchPage((InfusionEnchantmentRecipe)recipes.get("Consuming"))}).setParents(new String[]{"INFAUXSIONENCHANTMENT"}).setSecondary().setConcealed().registerResearchItem(); - (new DarkResearchItem("PIGBANE", "FORBIDDEN", (new AspectList()).add(Aspect.HUNGER, 3).add(Aspect.WEAPON, 4).add(Aspect.MAGIC, 2), -1, 3, 1, new ResourceLocation("forbidden", "textures/misc/pigbane.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.PIGBANE.1"), new ResearchPage((InfusionEnchantmentRecipe)recipes.get("Pigbane"))}).setParents(new String[]{"INFAUXSIONENCHANTMENT"}).setSecondary().setConcealed().registerResearchItem(); - (new DarkResearchItem("EDUCATIONAL", "FORBIDDEN", (new AspectList()).add(Aspect.MIND, 5).add(Aspect.WEAPON, 1).add(Aspect.MAGIC, 3), -1, 4, 2, new ResourceLocation("forbidden", "textures/misc/educational.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.EDUCATIONAL.1"), new ResearchPage((InfusionEnchantmentRecipe)recipes.get("Educational"))}).setParents(new String[]{"INFAUXSIONENCHANTMENT"}).setSecondary().setConcealed().registerResearchItem(); - - } - - public static void addInfernalism() - { - if(!Config.noLust) - (new DarkResearchItem("NETHERSHARDS", "FORBIDDEN", new AspectList(), -8, -2, 0, new ItemStack(ForbiddenItems.deadlyShards, 1, 0))).setPages(new ResearchPage[] {new ResearchPage("forbidden.research_page.NETHERSHARDS.1"), new ResearchPage("forbidden.research_page.NETHERSHARDS.2"), new ResearchPage("forbidden.research_page.NETHERSHARDS.3")}).setStub().setRound().setAutoUnlock().registerResearchItem(); - else - (new DarkResearchItem("NETHERSHARDS", "FORBIDDEN", new AspectList(), -8, -2, 0, new ItemStack(ForbiddenItems.deadlyShards, 1, 0))).setPages(new ResearchPage[] {new ResearchPage("forbidden.research_page.NETHERSHARDS.1"), new ResearchPage("forbidden.research_page.NETHERSHARDS.2b"), new ResearchPage("forbidden.research_page.NETHERSHARDS.3")}).setStub().setRound().setAutoUnlock().registerResearchItem(); - - (new DarkResearchItem("RIDINGCROP", "FORBIDDEN", new AspectList(), -8, -1, 0, new ItemStack(ForbiddenItems.ridingCrop))).setPages(new ResearchPage[] {new ResearchPage("forbidden.research_page.RIDINGCROP.1"), new ResearchPage((IRecipe)recipes.get("RidingCrop"))}).setStub().setRound().setAutoUnlock().registerResearchItem(); - (new DarkResearchItem("HELLFIRE", "FORBIDDEN", (new AspectList()).add(Aspect.FIRE, 3).add(DarkAspects.NETHER, 4).add(Aspect.TRAVEL, 2), -5, 2, 1, new ItemStack(Block.fire))).setPages(new ResearchPage[] {new ResearchPage("forbidden.research_page.HELLFIRE.1")}).setRound().registerResearchItem(); - - (new DarkResearchItem("SKULLAXE", "FORBIDDEN", (new AspectList()).add(Aspect.WEAPON, 3).add(DarkAspects.WRATH, 4).add(DarkAspects.NETHER, 1), -8, 1, 2, new ItemStack(ForbiddenItems.skullAxe))).setPages(new ResearchPage[] {new ResearchPage("forbidden.research_page.SKULLAXE.1"), new ResearchPage((InfusionRecipe)recipes.get("SkullAxe"))}).setParents(new String[] {"THAUMIUM", "INFAUXSION"}).setConcealed().registerResearchItem(); - (new DarkResearchItem("ARCANECAKE", "FORBIDDEN", (new AspectList()).add(DarkAspects.GLUTTONY, 4).add(Aspect.HUNGER, 3).add(Aspect.CRAFT, 2), -8, 2, 3, new ItemStack(ForbiddenItems.arcaneCakeItem))).setPages(new ResearchPage[] {new ResearchPage("forbidden.research_page.ARCANECAKE.1"), new ResearchPage((InfusionRecipe)recipes.get("ArcaneCake"))}).setParents(new String[] {"INFAUXSION"}).setAspectTriggers(new Aspect[]{DarkAspects.GLUTTONY}).registerResearchItem(); - (new DarkResearchItem("MORPHTOOLS", "FORBIDDEN", (new AspectList()).add(Aspect.TOOL, 2).add(DarkAspects.ENVY, 3).add(Aspect.EXCHANGE, 2), -5, 5, 4, new ItemStack(ForbiddenItems.morphPickaxe))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.MORPHTOOLS.1"), new ResearchPage((InfusionRecipe)recipes.get("MorphPick")), new ResearchPage((InfusionRecipe)recipes.get("MorphSword")), new ResearchPage((InfusionRecipe)recipes.get("MorphShovel")), new ResearchPage((InfusionRecipe)recipes.get("MorphAxe"))}).setParentsHidden(new String[]{"THAUMIUM", "INFUSIONENCHANTMENT"}).setParents(new String[]{"INFAUXSIONENCHANTMENT"}).setConcealed().registerResearchItem(); - (new DarkResearchItem("ROD_infernal", "FORBIDDEN", (new AspectList()).add(DarkAspects.NETHER, 4).add(Aspect.FIRE, 3).add(Aspect.TOOL, 1), -6, -3, 4, new ItemStack(ForbiddenItems.wandCore, 1, 1))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.ROD_infernal.1"), new ResearchPage((InfusionRecipe)recipes.get("WandRodInfernal")), new ResearchPage("forbidden.research_page.ROD_infernal.2")}).setParents(new String[]{"ROD_silverwood", "INFAUXSION"}).setConcealed().registerResearchItem(); - (new DarkResearchItem("CLUSTER", "FORBIDDEN", (new AspectList()).add(Aspect.METAL, 1).add(Aspect.FIRE, 4).add(DarkAspects.ENVY, 3), -7, 7, 3, new ResourceLocation("forbidden", "textures/misc/lucrative.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.CLUSTER.1"), new ResearchPage((InfusionEnchantmentRecipe)recipes.get("Cluster"))}).setParents(new String[]{"MORPHTOOLS", "ELEMENTALPICK"}).setSecondary().setConcealed().registerResearchItem(); - if(Config.greedyEnch) - (new DarkResearchItem("GREEDY", "FORBIDDEN", (new AspectList()).add(Aspect.MAGIC, 2).add(Aspect.WEAPON, 1).add(Aspect.GREED, 3), -1, 5, 4, new ResourceLocation("forbidden", "textures/misc/greedy.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.GREEDY.1"), new ResearchPage((InfusionEnchantmentRecipe)recipes.get("Greedy"))}).setParents(new String[]{"INFAUXSIONENCHANTMENT"}).setConcealed().registerResearchItem(); - (new DarkResearchItem("CORRUPTING", "FORBIDDEN", (new AspectList()).add(DarkAspects.NETHER, 5).add(Aspect.CRYSTAL, 2).add(Aspect.EXCHANGE, 1), -1, 6, 3, new ResourceLocation("forbidden", "textures/misc/corrupting.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.CORRUPTING.1"), new ResearchPage((InfusionEnchantmentRecipe)recipes.get("Corrupting"))}).setParents(new String[]{"INFAUXSIONENCHANTMENT"}).setConcealed().registerResearchItem(); - - if(Config.wrathCage){ - if(Config.wrathCost > 0) - (new DarkResearchItem("WRATHCAGE", "FORBIDDEN", (new AspectList()).add(DarkAspects.WRATH, 5).add(Aspect.MECHANISM, 3).add(Aspect.BEAST, 2), -2, 0, 6, new ItemStack(ForbiddenBlocks.wrathCage))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.WRATHCAGE.1"), new ResearchPage((InfusionRecipe)recipes.get("WrathCage")), new ResearchPage("forbidden.research_page.WRATHCAGE.2"), new ResearchPage("forbidden.research_page.WRATHCAGE.3"), new ResearchPage((CrucibleRecipe)recipes.get("MobCrystal"))}).setParents(new String[]{"INFAUXSION"}).setParentsHidden(new String[]{"THAUMIUM", "DISTILESSENTIA"}).setConcealed().setSiblings(new String[]{"FORK"}).registerResearchItem(); - else - (new DarkResearchItem("WRATHCAGE", "FORBIDDEN", (new AspectList()).add(DarkAspects.WRATH, 5).add(Aspect.MECHANISM, 3).add(Aspect.BEAST, 2), -2, 0, 6, new ItemStack(ForbiddenBlocks.wrathCage))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.WRATHCAGE.1"), new ResearchPage((InfusionRecipe)recipes.get("WrathCage")), new ResearchPage("forbidden.research_page.WRATHCAGE.3"), new ResearchPage((CrucibleRecipe)recipes.get("MobCrystal"))}).setParents(new String[]{"INFAUXSION"}).setParentsHidden(new String[]{"THAUMIUM", "DISTILESSENTIA"}).setConcealed().setSiblings(new String[]{"FORK"}).registerResearchItem(); - - } - - (new DarkResearchItem("FORK", "FORBIDDEN", (new AspectList()), 0, 0, 0, new ItemStack(ForbiddenItems.fork))).setPages(new ResearchPage[] {new ResearchPage("forbidden.research_page.FORK.1"), new ResearchPage((InfusionRecipe)recipes.get("Fork")), new ResearchPage("WRATHCAGE", "forbidden.research_page.FORK.wc")}).setStub().setHidden().registerResearchItem(); - - } - - public static void addTaint() - { - (new DarkResearchItem("TAINTSHOVEL", "FORBIDDEN", (new AspectList()).add(Aspect.CRYSTAL, 3).add(Aspect.TAINT, 2).add(Aspect.TOOL, 1), -7, 0, 3, new ItemStack(ForbiddenItems.taintShovel))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.TAINTSHOVEL.1"), new ResearchPage((InfusionRecipe)recipes.get("TaintShovel")), new ResearchPage("forbidden.research_page.TAINTSHOVEL.2")}).setParents(new String[]{"THAUMIUM", "INFAUXSION", "ETHEREALBLOOM"}).setConcealed().registerResearchItem(); - (new DarkResearchItem("TAINTPICK", "FORBIDDEN", (new AspectList()).add(Aspect.TOOL, 2).add(Aspect.TAINT, 4).add(Aspect.ENTROPY, 3), -8, 0, 2, new ItemStack(ForbiddenItems.taintPickaxe))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.TAINTPICK.1"), new ResearchPage((InfusionRecipe)recipes.get("TaintPick"))}).setParents(new String[]{"THAUMIUM", "INFAUXSION"}).setConcealed().registerResearchItem(); - (new DarkResearchItem("ROD_tainted", "FORBIDDEN", (new AspectList()).add(Aspect.MAGIC, 4).add(Aspect.TAINT, 5).add(Aspect.TOOL, 2), -7, -3, 4, new ItemStack(ForbiddenItems.wandCore, 1, 0))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.ROD_tainted.1"), new ResearchPage((InfusionRecipe)recipes.get("WandRodTainted"))}).setParents(new String[]{"ROD_silverwood", "TAINTSHOVEL", "INFAUXSION"}).setConcealed().registerResearchItem(); - } -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/ForbiddenTab.java b/src/com/spiteful/forbidden/ForbiddenTab.java deleted file mode 100644 index 7ea80ad..0000000 --- a/src/com/spiteful/forbidden/ForbiddenTab.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.spiteful.forbidden; - -import com.spiteful.forbidden.items.ForbiddenItems; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.creativetab.CreativeTabs; - -public final class ForbiddenTab extends CreativeTabs -{ - private boolean crystal = false; - - public ForbiddenTab(String tabName) - { - super(tabName); - } - - public ForbiddenTab(String tabName, boolean mobCrystal) - { - super(tabName); - crystal = mobCrystal; - } - - @SideOnly(Side.CLIENT) - public int getTabIconItemIndex() - { - if(!crystal) - return ForbiddenItems.fork.itemID; - else - return ForbiddenItems.mobCrystal.itemID; - } -} diff --git a/src/com/spiteful/forbidden/WandOverlord.java b/src/com/spiteful/forbidden/WandOverlord.java deleted file mode 100644 index 578f666..0000000 --- a/src/com/spiteful/forbidden/WandOverlord.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.spiteful.forbidden; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; -import thaumcraft.api.IVisDiscountGear; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.AspectList; -import thaumcraft.api.nodes.INode; -import thaumcraft.api.nodes.NodeModifier; -import thaumcraft.api.nodes.NodeType; -import thaumcraft.api.wands.IWandFocus; -import thaumcraft.api.wands.IWandTriggerManager; -import thaumcraft.common.lib.research.ResearchManager; -import thaumcraft.common.items.wands.ItemWandCasting; - -public class WandOverlord implements IWandTriggerManager -{ - public boolean performTrigger(World world, ItemStack wand, EntityPlayer player, int x, int y, int z, int side, int event) - { - if(event == 1 && side == 1) - return hellfire(world, wand, player, x, y, z, side); - return false; - } - - public boolean hellfire(World world, ItemStack wand, EntityPlayer player, int x, int y, int z, int side) - { - if(world.isRemote || wand == null || !(wand.getItem() instanceof ItemWandCasting) || ((ItemWandCasting)wand.getItem()).getFocus(wand) != null - || !ResearchManager.isResearchComplete(player.username, "HELLFIRE") || !player.canPlayerEdit(x, y, z, side, new ItemStack(Item.fireballCharge))) - return false; - - if(world.isAirBlock(x, y + 1, z) && ((ItemWandCasting)wand.getItem()).consumeVis(wand, player, Aspect.FIRE, 2)) - { - world.playSoundEffect((double)x + 0.5D, (double)y + 1.5D, (double)z + 0.5D, "fire.ignite", 1.0F, world.rand.nextFloat() * 0.4F + 0.8F); - world.setBlock(x, y + 1, z, Block.fire.blockID); - player.swingItem(); - return true; - } - else - return false; - } -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/blocks/BlockArcaneCake.java b/src/com/spiteful/forbidden/blocks/BlockArcaneCake.java deleted file mode 100644 index 58b1cc4..0000000 --- a/src/com/spiteful/forbidden/blocks/BlockArcaneCake.java +++ /dev/null @@ -1,232 +0,0 @@ -package com.spiteful.forbidden.blocks; - -import com.spiteful.forbidden.items.ForbiddenItems; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import java.util.Random; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.Icon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -public class BlockArcaneCake extends Block -{ - @SideOnly(Side.CLIENT) - private Icon cakeTopIcon; - @SideOnly(Side.CLIENT) - private Icon cakeBottomIcon; - @SideOnly(Side.CLIENT) - private Icon cakeInsideIcon; - - protected BlockArcaneCake(int par1) - { - super(par1, Material.cake); - this.setTickRandomly(true); - } - - /** - * Updates the blocks bounds based on its current state. Args: world, x, y, z - */ - public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) - { - int l = par1IBlockAccess.getBlockMetadata(par2, par3, par4); - float f = 0.0625F; - float f1 = (float)(1 + l) / 12.0F; - this.setBlockBounds(f1, 0.0F, f, 1.0F - f, 0.5F, 1.0F - f); - } - - /** - * Sets the block's bounds for rendering it as an item - */ - public void setBlockBoundsForItemRender() - { - float f = 0.0625F; - float f1 = 0.5F; - this.setBlockBounds(f, 0.0F, f, 1.0F - f, f1, 1.0F - f); - } - - /** - * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been - * cleared to be reused) - */ - public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) - { - int l = par1World.getBlockMetadata(par2, par3, par4); - float f = 0.0625F; - float f1 = (float)(1 + l) / 12.0F; - float f2 = 0.5F; - return AxisAlignedBB.getAABBPool().getAABB((double)((float)par2 + f1), (double)par3, (double)((float)par4 + f), (double)((float)(par2 + 1) - f), (double)((float)par3 + f2 - f), (double)((float)(par4 + 1) - f)); - } - - /** - * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) - */ - public boolean renderAsNormalBlock() - { - return false; - } - - @SideOnly(Side.CLIENT) - - /** - * Returns the bounding box of the wired rectangular prism to render. - */ - public AxisAlignedBB getSelectedBoundingBoxFromPool(World par1World, int par2, int par3, int par4) - { - int l = par1World.getBlockMetadata(par2, par3, par4); - float f = 0.0625F; - float f1 = (float)(1 + l) / 12.0F; - float f2 = 0.5F; - return AxisAlignedBB.getAABBPool().getAABB((double)((float)par2 + f1), (double)par3, (double)((float)par4 + f), (double)((float)(par2 + 1) - f), (double)((float)par3 + f2), (double)((float)(par4 + 1) - f)); - } - - @SideOnly(Side.CLIENT) - - /** - * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata - */ - public Icon getIcon(int par1, int par2) - { - return par1 == 1 ? this.cakeTopIcon : (par1 == 0 ? this.cakeBottomIcon : (par2 > 0 && par1 == 4 ? this.cakeInsideIcon : this.blockIcon)); - } - - @SideOnly(Side.CLIENT) - - /** - * When this method is called, your block should register all the icons it needs with the given IconRegister. This - * is the only chance you get to register icons. - */ - public void registerIcons(IconRegister par1IconRegister) - { - this.blockIcon = par1IconRegister.registerIcon("forbidden:cake_side"); - this.cakeInsideIcon = par1IconRegister.registerIcon("forbidden:cake_inner"); - this.cakeTopIcon = par1IconRegister.registerIcon("forbidden:cake_top"); - this.cakeBottomIcon = par1IconRegister.registerIcon("forbidden:cake_bottom"); - } - - /** - * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two - * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block. - */ - public boolean isOpaqueCube() - { - return false; - } - - /** - * Called upon block activation (right click on the block.) - */ - public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) - { - this.eatCakeSlice(par1World, par2, par3, par4, par5EntityPlayer); - return true; - } - - /** - * Called when the block is clicked by a player. Args: x, y, z, entityPlayer - */ - public void onBlockClicked(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer) - { - this.eatCakeSlice(par1World, par2, par3, par4, par5EntityPlayer); - } - - /** - * Heals the player and removes a slice from the cake. - */ - private void eatCakeSlice(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer) - { - if (par5EntityPlayer.canEat(false)) - { - par5EntityPlayer.getFoodStats().addStats(2, 1.0F); - int l = par1World.getBlockMetadata(par2, par3, par4) + 1; - - if (l >= 12) - { - par1World.setBlockToAir(par2, par3, par4); - } - else - { - par1World.setBlockMetadataWithNotify(par2, par3, par4, l, 2); - } - - } - } - - /** - * Ticks the block if it's been scheduled - */ - public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) - { - super.updateTick(par1World, par2, par3, par4, par5Random); - int l = par1World.getBlockMetadata(par2, par3, par4); - - if (l > 0) - { - //if (par5Random.nextInt((int)(25.0F / f) + 1) == 0) - //{ - --l; - par1World.setBlockMetadataWithNotify(par2, par3, par4, l, 2); - //} - } - } - - /** - * Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z - */ - public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) - { - return !super.canPlaceBlockAt(par1World, par2, par3, par4) ? false : this.canBlockStay(par1World, par2, par3, par4); - } - - /** - * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are - * their own) Args: x, y, z, neighbor blockID - */ - public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) - { - if (!this.canBlockStay(par1World, par2, par3, par4)) - { - par1World.setBlockToAir(par2, par3, par4); - } - } - - /** - * Can this block stay at this position. Similar to canPlaceBlockAt except gets checked often with plants. - */ - public boolean canBlockStay(World par1World, int par2, int par3, int par4) - { - return par1World.getBlockMaterial(par2, par3 - 1, par4).isSolid(); - } - - /** - * Returns the quantity of items to drop on block destruction. - */ - public int quantityDropped(Random par1Random) - { - return 0; - } - - /** - * Returns the ID of the items to drop on destruction. - */ - public int idDropped(int par1, Random par2Random, int par3) - { - return 0; - } - - @SideOnly(Side.CLIENT) - - /** - * only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative) - */ - public int idPicked(World par1World, int par2, int par3, int par4) - { - return ForbiddenItems.arcaneCakeItem.itemID; - } -} diff --git a/src/com/spiteful/forbidden/blocks/BlockBlackFlower.java b/src/com/spiteful/forbidden/blocks/BlockBlackFlower.java deleted file mode 100644 index 72b5ab3..0000000 --- a/src/com/spiteful/forbidden/blocks/BlockBlackFlower.java +++ /dev/null @@ -1,109 +0,0 @@ -package com.spiteful.forbidden.blocks; - -import com.spiteful.forbidden.Forbidden; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import java.util.Random; -import net.minecraft.block.Block; -import net.minecraft.block.BlockFlower; -import net.minecraft.block.material.Material; -import net.minecraft.world.World; - -import net.minecraftforge.common.ForgeDirection; - -public class BlockBlackFlower extends BlockFlower -{ - protected BlockBlackFlower(int par1) - { - super(par1); - float f = 0.2F; - this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 2.0F, 0.5F + f); - this.setTickRandomly(true); - this.setCreativeTab(Forbidden.tab); - } - - /** - * Ticks the block if it's been scheduled - */ - public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) - { - if (!par1World.isRemote && par5Random.nextInt(30) == 1) - spreadFlowers(par1World, par2, par3, par4, par5Random); - } - - public void spreadFlowers(World par1World, int par2, int par3, int par4, Random par5Random){ - int l = 10; - int i1; - int j1; - int k1; - - for (i1 = par2 - 2; i1 <= par2 + 2; ++i1) - { - for (j1 = par4 - 2; j1 <= par4 + 2; ++j1) - { - for (k1 = par3 - 1; k1 <= par3 + 1; ++k1) - { - if (par1World.getBlockId(i1, k1, j1) == this.blockID) - { - --l; - - if (l <= 0) - { - return; - } - } - } - } - } - - i1 = par2 + par5Random.nextInt(3) - 1; - j1 = par3 + par5Random.nextInt(2) - par5Random.nextInt(2); - k1 = par4 + par5Random.nextInt(3) - 1; - - for (int l1 = 0; l1 < 4; ++l1) - { - if (par1World.isAirBlock(i1, j1, k1) && this.canBlockStay(par1World, i1, j1, k1)) - { - par2 = i1; - par3 = j1; - par4 = k1; - } - - i1 = par2 + par5Random.nextInt(3) - 1; - j1 = par3 + par5Random.nextInt(2) - par5Random.nextInt(2); - k1 = par4 + par5Random.nextInt(3) - 1; - } - - if (par1World.isAirBlock(i1, j1, k1) && this.canBlockStay(par1World, i1, j1, k1)) - { - par1World.setBlock(i1, j1, k1, this.blockID, 0, 2); - } - } - - /** - * Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z - */ - public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) - { - return super.canPlaceBlockAt(par1World, par2, par3, par4) && this.canBlockStay(par1World, par2, par3, par4); - } - - /** - * Gets passed in the blockID of the block below and supposed to return true if its allowed to grow on the type of - * blockID passed in. Args: blockID - */ - protected boolean canThisPlantGrowOnThisBlockID(int par1) - { - return Block.opaqueCubeLookup[par1]; - } - - /** - * Can this block stay at this position. Similar to canPlaceBlockAt except gets checked often with plants. - */ - public boolean canBlockStay(World par1World, int par2, int par3, int par4) - { - int l = par1World.getBlockId(par2, par3 - 1, par4); - return (l == Block.dirt.blockID || l == Block.grass.blockID); - } -} diff --git a/src/com/spiteful/forbidden/blocks/BlockResource.java b/src/com/spiteful/forbidden/blocks/BlockResource.java deleted file mode 100644 index 83deb7f..0000000 --- a/src/com/spiteful/forbidden/blocks/BlockResource.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.spiteful.forbidden.blocks; - -import com.spiteful.forbidden.items.ForbiddenItems; -import com.spiteful.forbidden.*; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import java.util.Random; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.Icon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -public class BlockResource extends Block -{ - public BlockResource(int par1) - { - super(par1, Material.iron); - this.setCreativeTab(Forbidden.tab); - } - - /** - * Determines if this block can be used as the base of a beacon. - * - * @param world The current world - * @param x X Position - * @param y Y Position - * @param z Z position - * @param beaconX Beacons X Position - * @param beaconY Beacons Y Position - * @param beaconZ Beacons Z Position - * @return True, to support the beacon, and make it active with this block. - */ - public boolean isBeaconBase(World worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ) - { - return true; - } -} diff --git a/src/com/spiteful/forbidden/blocks/BlockWrathCage.java b/src/com/spiteful/forbidden/blocks/BlockWrathCage.java deleted file mode 100644 index a9cd5a9..0000000 --- a/src/com/spiteful/forbidden/blocks/BlockWrathCage.java +++ /dev/null @@ -1,150 +0,0 @@ -package com.spiteful.forbidden.blocks; - -import com.spiteful.forbidden.tiles.TileEntityWrathCage; -import com.spiteful.forbidden.items.ForbiddenItems; -import com.spiteful.forbidden.Forbidden; -import com.spiteful.forbidden.Config; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import java.util.Random; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagString; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityMobSpawner; -import net.minecraft.world.World; - -public class BlockWrathCage extends BlockContainer -{ - protected BlockWrathCage(int par1) - { - super(par1, Material.iron); - this.setCreativeTab(Forbidden.tab); - } - - /** - * Returns a new instance of a block's tile entity class. Called on placing the block. - */ - public TileEntity createNewTileEntity(World par1World) - { - return new TileEntityWrathCage(); - } - - /** - * Returns the ID of the items to drop on destruction. - */ - public int idDropped(int par1, Random par2Random, int par3) - { - return blockID; - } - - /** - * Returns the quantity of items to drop on block destruction. - */ - public int quantityDropped(Random par1Random) - { - return 1; - } - - /** - * Called upon block activation (right click on the block.) - */ - public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) - { - ItemStack held = player.getCurrentEquippedItem(); - if(held != null && held.itemID == ForbiddenItems.mobCrystal.itemID){ - NBTTagCompound nbttagcompound = held.getTagCompound(); - if(nbttagcompound == null) - return false; - NBTTagString nbttagstring = (NBTTagString)nbttagcompound.getTag("mob"); - - if (nbttagstring != null) - { - if(!par1World.isRemote){ - TileEntityWrathCage spawner = (TileEntityWrathCage)par1World.getBlockTileEntity(x, y, z); - String mob = null; - ItemStack crystal = null; - if(spawner.getSpawnerLogic().isMobSet()){ - mob = spawner.getSpawnerLogic().getEntityNameToSpawn(); - crystal = new ItemStack(ForbiddenItems.mobCrystal, 1); - NBTTagString mobTag = new NBTTagString("mob", mob); - crystal.setTagInfo("mob", mobTag); - } - spawner.getSpawnerLogic().setMobID(nbttagstring.toString()); - spawner.getSpawnerLogic().mobIsSet(true); - spawner.checkAspect(); - par1World.markBlockForUpdate(x, y, z); - player.setCurrentItemOrArmor(0, crystal); - } - player.swingItem(); - return true; - } - } - else if(held != null && held.itemID == ForbiddenItems.fork.itemID && Config.wrathCost > 0){ - TileEntityWrathCage spawner = (TileEntityWrathCage)par1World.getBlockTileEntity(x, y, z); - if(++spawner.mode > 2) - spawner.mode = 0; - player.swingItem(); - } - return false; - } - - /** - * Called on server worlds only when the block has been replaced by a different block ID, or the same block with a - * different metadata value, but before the new metadata value is set. Args: World, x, y, z, old block ID, old - * metadata - */ - public void breakBlock(World par1World, int x, int y, int z, int par5, int par6) - { - TileEntityWrathCage spawner = null; - - if(par1World.getBlockTileEntity(x, y, z) instanceof TileEntityWrathCage) - spawner = (TileEntityWrathCage)par1World.getBlockTileEntity(x, y, z); - - if (spawner != null && spawner.getSpawnerLogic().isMobSet()) - { - float f = par1World.rand.nextFloat() * 0.8F + 0.1F; - float f1 = par1World.rand.nextFloat() * 0.8F + 0.1F; - float f2 = par1World.rand.nextFloat() * 0.8F + 0.1F; - - ItemStack crystal = new ItemStack(ForbiddenItems.mobCrystal, 1); - String mob = spawner.getSpawnerLogic().getEntityNameToSpawn(); - NBTTagString mobTag = new NBTTagString("mob", mob); - crystal.setTagInfo("mob", mobTag); - - EntityItem entityitem = new EntityItem(par1World, (double)((float)x + f), (double)((float)y + f1), (double)((float)z + f2), crystal); - - entityitem.motionX = (double)((float)par1World.rand.nextGaussian() * 0.05F); - entityitem.motionY = (double)((float)par1World.rand.nextGaussian() * 0.05F + 0.2F); - entityitem.motionZ = (double)((float)par1World.rand.nextGaussian() * 0.05F); - par1World.spawnEntityInWorld(entityitem); - - } - - super.breakBlock(par1World, x, y, z, par5, par6); - } - - /** - * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two - * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block. - */ - public boolean isOpaqueCube() - { - return false; - } - - @SideOnly(Side.CLIENT) - - /** - * only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative) - */ - public int idPicked(World par1World, int par2, int par3, int par4) - { - return blockID; - } -} diff --git a/src/com/spiteful/forbidden/blocks/ForbiddenBlocks.java b/src/com/spiteful/forbidden/blocks/ForbiddenBlocks.java deleted file mode 100644 index c393775..0000000 --- a/src/com/spiteful/forbidden/blocks/ForbiddenBlocks.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.spiteful.forbidden.blocks; - -import com.spiteful.forbidden.*; -import com.spiteful.forbidden.tiles.*; - -import cpw.mods.fml.common.registry.GameRegistry; -import java.util.Arrays; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.oredict.OreDictionary; -import thaumcraft.api.ThaumcraftApi; -import thaumcraft.api.aspects.Aspect; - -public class ForbiddenBlocks -{ - public static Block arcaneCake; - public static Block blackFlower; - public static Block wrathCage; - public static Block starBlock; - - public static void addBlocks() - { - arcaneCake = new BlockArcaneCake(Config.arcaneCakeBlockID).setHardness(0.5F).setStepSound(Block.soundClothFootstep).setUnlocalizedName("ArcaneCake"); - GameRegistry.registerBlock(arcaneCake, "ArcaneCake"); - - wrathCage = new BlockWrathCage(Config.wrathCageID).setHardness(5.0F).setResistance(2000.0F).setStepSound(Block.soundMetalFootstep).setTextureName("forbidden:spirit_box").setUnlocalizedName("WrathCage"); - GameRegistry.registerBlock(wrathCage, "WrathCage"); - GameRegistry.registerTileEntity(TileEntityWrathCage.class, "WrathCage"); - - blackFlower = new BlockBlackFlower(Config.blackFlowerBlockID).setStepSound(Block.soundGrassFootstep).setTextureName("forbidden:flower_black").setUnlocalizedName("InkFlower"); - GameRegistry.registerBlock(blackFlower, "InkFlower"); - - starBlock = new BlockResource(Config.starBlockID).setHardness(5.0F).setStepSound(Block.soundMetalFootstep).setTextureName("forbidden:starblock").setUnlocalizedName("StarBlock"); - GameRegistry.registerBlock(starBlock, "StarBlock"); - OreDictionary.registerOre("blockNetherStar", new ItemStack(starBlock, 1, 0)); - } -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/enchantments/EnchantmentCluster.java b/src/com/spiteful/forbidden/enchantments/EnchantmentCluster.java deleted file mode 100644 index cc2f3cd..0000000 --- a/src/com/spiteful/forbidden/enchantments/EnchantmentCluster.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.spiteful.forbidden.enchantments; - -import com.spiteful.forbidden.*; -import com.spiteful.forbidden.items.ItemMorphPickaxe; - -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnumEnchantmentType; -import net.minecraft.item.ItemStack; - -public class EnchantmentCluster extends Enchantment -{ - public EnchantmentCluster(int id) - { - super(id, 0, EnumEnchantmentType.digger); - setName("cluster"); - } - - @Override - /** - * Returns the maximum level that the enchantment can have. - */ - public int getMaxLevel() - { - return 4; - } - - @Override - /** - * Determines if the enchantment passed can be applyied together with this enchantment. - */ - public boolean canApplyTogether(Enchantment ench) - { - return super.canApplyTogether(ench) && ench.effectId != Enchantment.fortune.effectId; - } - - @Override - public boolean canApply(ItemStack item) - { - if(item.getItem() instanceof ItemMorphPickaxe) - return true; - else - return false; - } - - @Override - /** - * This applies specifically to applying at the enchanting table. The other method {@link #canApply(ItemStack)} - * applies for all possible enchantments. - * @param stack - * @return - */ - public boolean canApplyAtEnchantingTable(ItemStack stack) - { - return false; - } - - -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/enchantments/EnchantmentConsuming.java b/src/com/spiteful/forbidden/enchantments/EnchantmentConsuming.java deleted file mode 100644 index e015675..0000000 --- a/src/com/spiteful/forbidden/enchantments/EnchantmentConsuming.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.spiteful.forbidden.enchantments; - -import com.spiteful.forbidden.*; - -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnumEnchantmentType; -import net.minecraft.item.ItemPickaxe; -import net.minecraft.item.ItemSpade; -import net.minecraft.item.ItemStack; - -public class EnchantmentConsuming extends Enchantment -{ - public EnchantmentConsuming(int id) - { - super(id, 0, EnumEnchantmentType.digger); - setName("consuming"); - } - - @Override - /** - * Returns the maximum level that the enchantment can have. - */ - public int getMaxLevel() - { - return 1; - } - - @Override - /** - * Determines if the enchantment passed can be applyied together with this enchantment. - */ - public boolean canApplyTogether(Enchantment ench) - { - return super.canApplyTogether(ench) && ench.effectId != Enchantment.silkTouch.effectId; - } - - @Override - public boolean canApply(ItemStack item) - { - if(item.getItem() instanceof ItemPickaxe || item.getItem() instanceof ItemSpade) - return true; - else - return false; - } - - @Override - /** - * This applies specifically to applying at the enchanting table. The other method {@link #canApply(ItemStack)} - * applies for all possible enchantments. - * @param stack - * @return - */ - public boolean canApplyAtEnchantingTable(ItemStack stack) - { - return false; - } - - -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/enchantments/EnchantmentCorrupting.java b/src/com/spiteful/forbidden/enchantments/EnchantmentCorrupting.java deleted file mode 100644 index 550c41d..0000000 --- a/src/com/spiteful/forbidden/enchantments/EnchantmentCorrupting.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.spiteful.forbidden.enchantments; - -import com.spiteful.forbidden.*; - -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.enchantment.EnumEnchantmentType; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemPickaxe; - -public class EnchantmentCorrupting extends Enchantment -{ - public EnchantmentCorrupting(int id) - { - super(id, 0, EnumEnchantmentType.digger); - setName("corrupting"); - } - - @Override - /** - * Returns the maximum level that the enchantment can have. - */ - public int getMaxLevel() - { - return 1; - } - - /** - * Returns the minimal value of enchantability needed on the enchantment level passed. - */ - public int getMinEnchantability(int par1) - { - return 20; - } - - /** - * Returns the maximum value of enchantability nedded on the enchantment level passed. - */ - public int getMaxEnchantability(int par1) - { - return super.getMinEnchantability(par1) + 50; - } - - @Override - public boolean canApply(ItemStack item) - { - if(item.getItem() instanceof ItemPickaxe) - return true; - else - return false; - } - - @Override - /** - * This applies specifically to applying at the enchanting table. The other method {@link #canApply(ItemStack)} - * applies for all possible enchantments. - * @param stack - * @return - */ - public boolean canApplyAtEnchantingTable(ItemStack stack) - { - return false; - } - - -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/enchantments/EnchantmentEducational.java b/src/com/spiteful/forbidden/enchantments/EnchantmentEducational.java deleted file mode 100644 index b4f09f1..0000000 --- a/src/com/spiteful/forbidden/enchantments/EnchantmentEducational.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.spiteful.forbidden.enchantments; - -import com.spiteful.forbidden.*; - -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.enchantment.EnumEnchantmentType; -import net.minecraft.item.ItemStack; - -public class EnchantmentEducational extends Enchantment -{ - public EnchantmentEducational(int id) - { - super(id, 0, EnumEnchantmentType.weapon); - setName("educational"); - } - - @Override - /** - * Returns the maximum level that the enchantment can have. - */ - public int getMaxLevel() - { - return 5; - } - - @Override - /** - * Determines if the enchantment passed can be applyied together with this enchantment. - */ - public boolean canApplyTogether(Enchantment ench) - { - return super.canApplyTogether(ench) && ench.effectId != Enchantment.looting.effectId && ench.effectId != DarkEnchantments.greedy.effectId; - } - - @Override - /** - * This applies specifically to applying at the enchanting table. The other method {@link #canApply(ItemStack)} - * applies for all possible enchantments. - * @param stack - * @return - */ - public boolean canApplyAtEnchantingTable(ItemStack stack) - { - return false; - } - - -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/enchantments/EnchantmentEternal.java b/src/com/spiteful/forbidden/enchantments/EnchantmentEternal.java deleted file mode 100644 index d7036b5..0000000 --- a/src/com/spiteful/forbidden/enchantments/EnchantmentEternal.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.spiteful.forbidden.enchantments; - -import com.spiteful.forbidden.*; -import com.spiteful.forbidden.items.*; - -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.enchantment.EnumEnchantmentType; -import net.minecraft.item.ItemStack; - -public class EnchantmentEternal extends Enchantment -{ - public EnchantmentEternal(int id) - { - super(id, 0, EnumEnchantmentType.digger); - setName("eternal"); - } - - @Override - /** - * Returns the maximum level that the enchantment can have. - */ - public int getMaxLevel() - { - return 1; - } - - /** - * Returns the minimal value of enchantability needed on the enchantment level passed. - */ - public int getMinEnchantability(int par1) - { - return 70; - } - - /** - * Returns the maximum value of enchantability nedded on the enchantment level passed. - */ - public int getMaxEnchantability(int par1) - { - return super.getMinEnchantability(par1) + 50; - } - - @Override - /** - * Determines if the enchantment passed can be applyied together with this enchantment. - */ - public boolean canApplyTogether(Enchantment ench) - { - return super.canApplyTogether(ench) && ench.effectId != Enchantment.unbreaking.effectId && ench.effectId != DarkEnchantments.educational.effectId; - } - - @Override - public boolean canApply(ItemStack item) - { - return (item.getItem() instanceof ItemMorphPickaxe || item.getItem() instanceof ItemMorphAxe || item.getItem() instanceof ItemMorphSword || item.getItem() instanceof ItemMorphShovel); - } - - @Override - /** - * This applies specifically to applying at the enchanting table. The other method {@link #canApply(ItemStack)} - * applies for all possible enchantments. - * @param stack - * @return - */ - public boolean canApplyAtEnchantingTable(ItemStack stack) - { - return false; - } - - -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/enchantments/EnchantmentGreedy.java b/src/com/spiteful/forbidden/enchantments/EnchantmentGreedy.java deleted file mode 100644 index ddc5d32..0000000 --- a/src/com/spiteful/forbidden/enchantments/EnchantmentGreedy.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.spiteful.forbidden.enchantments; - -import com.spiteful.forbidden.*; - -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.enchantment.EnumEnchantmentType; -import net.minecraft.item.ItemStack; - -public class EnchantmentGreedy extends Enchantment -{ - public EnchantmentGreedy(int id) - { - super(id, 0, EnumEnchantmentType.weapon); - setName("greedy"); - } - - @Override - /** - * Returns the maximum level that the enchantment can have. - */ - public int getMaxLevel() - { - return 1; - } - - /** - * Returns the minimal value of enchantability needed on the enchantment level passed. - */ - public int getMinEnchantability(int par1) - { - return 20; - } - - /** - * Returns the maximum value of enchantability nedded on the enchantment level passed. - */ - public int getMaxEnchantability(int par1) - { - return super.getMinEnchantability(par1) + 50; - } - - @Override - /** - * Determines if the enchantment passed can be applyied together with this enchantment. - */ - public boolean canApplyTogether(Enchantment ench) - { - return super.canApplyTogether(ench) && ench.effectId != Enchantment.looting.effectId && ench.effectId != DarkEnchantments.educational.effectId; - } - - @Override - /** - * This applies specifically to applying at the enchanting table. The other method {@link #canApply(ItemStack)} - * applies for all possible enchantments. - * @param stack - * @return - */ - public boolean canApplyAtEnchantingTable(ItemStack stack) - { - return false; - } - - -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/enchantments/EnchantmentPigBane.java b/src/com/spiteful/forbidden/enchantments/EnchantmentPigBane.java deleted file mode 100644 index 7c8b321..0000000 --- a/src/com/spiteful/forbidden/enchantments/EnchantmentPigBane.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.spiteful.forbidden.enchantments; - -import com.spiteful.forbidden.*; - -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnumEnchantmentType; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.monster.EntityPigZombie; -import net.minecraft.entity.passive.EntityPig; -import net.minecraft.item.ItemStack; - -public class EnchantmentPigBane extends Enchantment -{ - public EnchantmentPigBane(int id) - { - super(id, 0, EnumEnchantmentType.weapon); - setName("pigbane"); - } - - @Override - /** - * Returns the maximum level that the enchantment can have. - */ - public int getMaxLevel() - { - return 5; - } - - /** - * Returns the minimal value of enchantability needed on the enchantment level passed. - */ - public int getMinEnchantability(int par1) - { - return 1 + (par1 - 1) * 8; - } - - /** - * Returns the maximum value of enchantability nedded on the enchantment level passed. - */ - public int getMaxEnchantability(int par1) - { - return this.getMinEnchantability(par1) + 20; - } - - @Override - /** - * Determines if the enchantment passed can be applyied together with this enchantment. - */ - public boolean canApplyTogether(Enchantment ench) - { - return super.canApplyTogether(ench) && ench.effectId != Enchantment.sharpness.effectId && ench.effectId != Enchantment.smite.effectId && ench.effectId != Enchantment.baneOfArthropods.effectId; - } - - /** - * Calculates de (magic) damage done by the enchantment on a living entity based on level and entity passed. - */ - public float calcModifierLiving(int level, EntityLivingBase victim) - { - if(victim instanceof EntityPig || victim instanceof EntityPigZombie) - return (float)level * 4.0F; - else - return 0.0F; - } - - @Override - /** - * This applies specifically to applying at the enchanting table. The other method {@link #canApply(ItemStack)} - * applies for all possible enchantments. - * @param stack - * @return - */ - public boolean canApplyAtEnchantingTable(ItemStack stack) - { - return false; - } - - -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/items/ItemArcaneCake.java b/src/com/spiteful/forbidden/items/ItemArcaneCake.java deleted file mode 100644 index 0dd076d..0000000 --- a/src/com/spiteful/forbidden/items/ItemArcaneCake.java +++ /dev/null @@ -1,106 +0,0 @@ -package com.spiteful.forbidden.items; - -import com.spiteful.forbidden.blocks.ForbiddenBlocks; -import com.spiteful.forbidden.Forbidden; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; -import net.minecraft.client.renderer.texture.IconRegister; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class ItemArcaneCake extends Item -{ - public ItemArcaneCake(int par1) - { - super(par1); - this.setCreativeTab(Forbidden.tab); - } - - /** - * Callback for item usage. If the item does something special on right clicking, he will have one of those. Return - * True if something happen and false if it don't. This is for ITEMS, not BLOCKS - */ - public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) - { - int i1 = par3World.getBlockId(par4, par5, par6); - - if (i1 == Block.snow.blockID && (par3World.getBlockMetadata(par4, par5, par6) & 7) < 1) - { - par7 = 1; - } - else if (i1 != Block.vine.blockID && i1 != Block.tallGrass.blockID && i1 != Block.deadBush.blockID) - { - if (par7 == 0) - { - --par5; - } - - if (par7 == 1) - { - ++par5; - } - - if (par7 == 2) - { - --par6; - } - - if (par7 == 3) - { - ++par6; - } - - if (par7 == 4) - { - --par4; - } - - if (par7 == 5) - { - ++par4; - } - } - - if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack)) - { - return false; - } - else if (par1ItemStack.stackSize == 0) - { - return false; - } - else - { - if (par3World.canPlaceEntityOnSide(ForbiddenBlocks.arcaneCake.blockID, par4, par5, par6, false, par7, (Entity)null, par1ItemStack)) - { - Block block = Block.blocksList[ForbiddenBlocks.arcaneCake.blockID]; - int j1 = block.onBlockPlaced(par3World, par4, par5, par6, par7, par8, par9, par10, 0); - - if (par3World.setBlock(par4, par5, par6, ForbiddenBlocks.arcaneCake.blockID, j1, 3)) - { - if (par3World.getBlockId(par4, par5, par6) == ForbiddenBlocks.arcaneCake.blockID) - { - Block.blocksList[ForbiddenBlocks.arcaneCake.blockID].onBlockPlacedBy(par3World, par4, par5, par6, par2EntityPlayer, par1ItemStack); - Block.blocksList[ForbiddenBlocks.arcaneCake.blockID].onPostBlockPlaced(par3World, par4, par5, par6, j1); - } - - par3World.playSoundEffect((double)((float)par4 + 0.5F), (double)((float)par5 + 0.5F), (double)((float)par6 + 0.5F), block.stepSound.getPlaceSound(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F); - --par1ItemStack.stackSize; - } - } - - return true; - } - } - - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) - { - this.itemIcon = par1IconRegister.registerIcon("forbidden:cake"); - } -} diff --git a/src/com/spiteful/forbidden/items/ItemBloodwell.java b/src/com/spiteful/forbidden/items/ItemBloodwell.java deleted file mode 100644 index 4004acb..0000000 --- a/src/com/spiteful/forbidden/items/ItemBloodwell.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.spiteful.forbidden.items; - -import com.spiteful.forbidden.*; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.util.List; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; -import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; -import thaumcraft.api.IScribeTools; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; - -public class ItemBloodwell extends Item implements IScribeTools, IBindable { - - @SideOnly(Side.CLIENT) - public Icon icon; - - public ItemBloodwell(int id) { - super(id); - maxStackSize = 1; - canRepair = false; - setMaxDamage(5); - setCreativeTab(Forbidden.tab); - setHasSubtypes(false); - } - - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister ir) { - this.icon = ir.registerIcon("forbidden:bloodwell"); - } - - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int par1) { - return this.icon; - } - - /** - * Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and - * update it's contents. - */ - public void onUpdate(ItemStack stack, World world, Entity fauxplayer, int par4, boolean par5) - { - if(Compat.bm && stack.getItemDamage() > 0 && stack.hasTagCompound()) - { - EntityPlayer player = null; - if(fauxplayer instanceof EntityPlayer) - player = (EntityPlayer)fauxplayer; - else - return; - - try - { - if(player.capabilities.isCreativeMode) - stack.setItemDamage(0); - else if(SoulNetworkHandler.syphonFromNetwork(stack, 25) > 0) - stack.setItemDamage(stack.getItemDamage() - 1); - else if(player.getHealth() > 6) - { - player.setHealth(player.getHealth() - 2); - stack.setItemDamage(stack.getItemDamage() - 1); - } - } - catch(Throwable e){} - } - } - - @Override - public ItemStack onItemRightClick(ItemStack itemstack, World par2World, EntityPlayer player) - { - if(Compat.bm) - { - try - { - SoulNetworkHandler.checkAndSetItemOwner(itemstack, player); - } - catch (Throwable e){} - } - return itemstack; - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - if (par1ItemStack.hasTagCompound()) - { - par3List.add(""); - par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName")); - } - } - - /** - * Set the damage for this itemstack. Note, this method is responsible for zero checking. - * @param stack the stack - * @param damage the new damage value - */ - public void setDamage(ItemStack stack, int damage) - { - if(damage > 0){ - - try - { - if(SoulNetworkHandler.syphonFromNetwork(stack, 25 * damage) > 0) - super.setDamage(stack, 0); - else - super.setDamage(stack, damage); - } - catch(Throwable e) - { - super.setDamage(stack, damage); - } - } - else - super.setDamage(stack, damage); - } - -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/items/ItemBoundShears.java b/src/com/spiteful/forbidden/items/ItemBoundShears.java deleted file mode 100644 index 0f607f5..0000000 --- a/src/com/spiteful/forbidden/items/ItemBoundShears.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.spiteful.forbidden.items; - -import com.spiteful.forbidden.Forbidden; -import com.spiteful.forbidden.Config; - -import com.google.common.collect.Multimap; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumAction; -import net.minecraft.item.EnumToolMaterial; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemSword; -import net.minecraft.util.Icon; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; - -public class ItemBoundShears extends ItemSword implements IBindable { - - public Icon icon; - - public ItemBoundShears(int id, EnumToolMaterial mat){ - super(id, mat); - this.setCreativeTab(Forbidden.tab); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister ir) - { - this.icon = ir.registerIcon("forbidden:bound_shears"); - } - - @Override - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int par1) - { - return this.icon; - } - - @Override - /** - * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if - * sword - */ - public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) - { - return par2Block.blockID != Block.web.blockID && par2Block.blockID != Block.leaves.blockID ? (par2Block.blockID == Block.cloth.blockID ? 5.0F : super.getStrVsBlock(par1ItemStack, par2Block)) : 15.0F; - } - - @Override - /** - * returns the action that specifies what animation to play when the items is being used - */ - public EnumAction getItemUseAction(ItemStack par1ItemStack) - { - return EnumAction.none; - } - - @Override - /** - * How long it takes to use or consume an item - */ - public int getMaxItemUseDuration(ItemStack par1ItemStack) - { - return 0; - } - - @Override - /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer - */ - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - return par1ItemStack; - } - - @Override - /** - * Returns if the item (tool) can harvest results from the block type. - */ - public boolean canHarvestBlock(Block par1Block) - { - return par1Block.blockID == Block.web.blockID || par1Block.blockID == Block.redstoneWire.blockID || par1Block.blockID == Block.tripWire.blockID; - } -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/items/ItemCrystalwell.java b/src/com/spiteful/forbidden/items/ItemCrystalwell.java deleted file mode 100644 index ca68be2..0000000 --- a/src/com/spiteful/forbidden/items/ItemCrystalwell.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.spiteful.forbidden.items; - -import com.spiteful.forbidden.*; - -import java.util.List; -import java.util.Iterator; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; -import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; -import thaumcraft.api.IScribeTools; -import thaumcraft.api.ItemApi; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.common.Thaumcraft; -import thaumcraft.common.lib.PacketHandler; - -public class ItemCrystalwell extends Item implements IScribeTools { - - @SideOnly(Side.CLIENT) - public Icon icon; - - public ItemCrystalwell(int id) { - super(id); - maxStackSize = 1; - canRepair = false; - setMaxDamage(100); - setCreativeTab(Forbidden.tab); - setHasSubtypes(false); - - } - - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister ir) { - this.icon = ir.registerIcon("forbidden:crystalwell"); - } - - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int par1) { - return this.icon; - } - - @Override - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) - { - if(stack.getItemDamage() >= 100) - { - if(!world.isRemote) - { - Iterator count = Aspect.getPrimalAspects().iterator(); - - while(count.hasNext()) { - Aspect aspect = (Aspect)count.next(); - short amount = (short)(world.rand.nextInt(3) + 4); - Thaumcraft.proxy.playerKnowledge.addAspectPool(player.username, aspect, amount); - Thaumcraft.proxy.getResearchManager().updateAspectNBT(player); - PacketHandler.sendAspectPoolPacket(aspect.getTag(), amount, Thaumcraft.proxy.playerKnowledge.getAspectPoolFor(player.username, aspect), (EntityPlayerMP)player); - } - } - player.swingItem(); - return ItemApi.getItem("itemInkwell", 100); - } - else - return stack; - } - - /** - * Render Pass sensitive version of hasEffect() - */ - @SideOnly(Side.CLIENT) - public boolean hasEffect(ItemStack stack, int pass) - { - return stack.getItemDamage() >= 100; - } - -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/items/ItemDeadlyShard.java b/src/com/spiteful/forbidden/items/ItemDeadlyShard.java deleted file mode 100644 index ecb63e1..0000000 --- a/src/com/spiteful/forbidden/items/ItemDeadlyShard.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.spiteful.forbidden.items; - -import com.spiteful.forbidden.Forbidden; -import com.spiteful.forbidden.Config; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import java.util.List; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; -import net.minecraft.util.MathHelper; - -public class ItemDeadlyShard extends Item -{ - public static final String[] vices = new String[] {"wrath", "envy", "taint", "pride", "lust", "sloth", "greed"}; - - @SideOnly(Side.CLIENT) - public Icon[] icons; - - public ItemDeadlyShard(int par1) - { - super(par1); - this.setMaxStackSize(64); - this.setHasSubtypes(true); - this.setMaxDamage(0); - this.setCreativeTab(Forbidden.tab); - if(Config.noLust) - vices[4] = "despair"; - } - - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister ir) - { - icons = new Icon[7]; - - for (int x = 0; x < 7; x++) - { - icons[x] = ir.registerIcon("forbidden:" + vices[x] + "shard"); - } - } - - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int dam) - { - return this.icons[dam]; - } - - /** - * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have - * different names based on their damage or NBT. - */ - public String getUnlocalizedName(ItemStack par1ItemStack) - { - int i = MathHelper.clamp_int(par1ItemStack.getItemDamage(), 0, 6); - return super.getUnlocalizedName() + "." + vices[i]; - } - - @SideOnly(Side.CLIENT) - /** - * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) - */ - public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) - { - for (int j = 0; j < 7; ++j) - { - par3List.add(new ItemStack(par1, 1, j)); - } - } -} diff --git a/src/com/spiteful/forbidden/items/ItemDiabolistFork.java b/src/com/spiteful/forbidden/items/ItemDiabolistFork.java deleted file mode 100644 index 9669104..0000000 --- a/src/com/spiteful/forbidden/items/ItemDiabolistFork.java +++ /dev/null @@ -1,106 +0,0 @@ -package com.spiteful.forbidden.items; - -import com.spiteful.forbidden.Forbidden; -import com.spiteful.forbidden.Config; - -import com.google.common.collect.Multimap; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumAction; -import net.minecraft.item.EnumToolMaterial; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemSword; -import net.minecraft.util.Icon; -import net.minecraft.world.World; -import thaumcraft.api.IRepairable; - -public class ItemDiabolistFork extends ItemSword implements IRepairable { - - public Icon icon; - - public ItemDiabolistFork(int id, EnumToolMaterial mat){ - super(id, mat); - this.setCreativeTab(Forbidden.tab); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister ir) - { - if(Config.spork) - this.icon = ir.registerIcon("forbidden:spork"); - else - this.icon = ir.registerIcon("forbidden:fork"); - } - - @Override - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int par1) - { - return this.icon; - } - - @Override - /** - * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if - * sword - */ - public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) - { - return 1.0F; - } - - @Override - /** - * returns the action that specifies what animation to play when the items is being used - */ - public EnumAction getItemUseAction(ItemStack par1ItemStack) - { - return EnumAction.none; - } - - @Override - /** - * How long it takes to use or consume an item - */ - public int getMaxItemUseDuration(ItemStack par1ItemStack) - { - return 0; - } - - @Override - /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer - */ - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - return par1ItemStack; - } - - @Override - /** - * Return whether this item is repairable in an anvil. - */ - public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) - { - return par2ItemStack.itemID == Item.netherQuartz.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack); - } - - @Override - /** - * Returns if the item (tool) can harvest results from the block type. - */ - public boolean canHarvestBlock(Block par1Block) - { - return false; - } -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/items/ItemDivinewell.java b/src/com/spiteful/forbidden/items/ItemDivinewell.java deleted file mode 100644 index f8f55b5..0000000 --- a/src/com/spiteful/forbidden/items/ItemDivinewell.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.spiteful.forbidden.items; - -import com.spiteful.forbidden.*; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.util.List; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; -import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; -import thaumcraft.api.IScribeTools; - -public class ItemDivinewell extends Item implements IScribeTools { - - @SideOnly(Side.CLIENT) - public Icon icon; - - public ItemDivinewell(int id) { - super(id); - maxStackSize = 1; - canRepair = false; - setMaxDamage(100); - setCreativeTab(Forbidden.tab); - setHasSubtypes(false); - } - - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister ir) { - this.icon = ir.registerIcon("forbidden:divinewell"); - } - - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int par1) { - return this.icon; - } - -/* @Override - public ItemStack onItemRightClick(ItemStack itemstack, World par2World, EntityPlayer player) - { - if(Compat.bm) - { - try - { - SoulNetworkHandler.checkAndSetItemOwner(itemstack, player); - } - catch (Throwable e){} - } - return itemstack; - } */ - - /** - * Set the damage for this itemstack. Note, this method is responsible for zero checking. - * @param stack the stack - * @param damage the new damage value - */ - public void setDamage(ItemStack stack, int damage) - { - super.setDamage(stack, 0); - } - -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/items/ItemGluttonyShard.java b/src/com/spiteful/forbidden/items/ItemGluttonyShard.java deleted file mode 100644 index 88203cc..0000000 --- a/src/com/spiteful/forbidden/items/ItemGluttonyShard.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.spiteful.forbidden.items; - -import com.spiteful.forbidden.*; - -import net.minecraft.item.ItemFood; -import net.minecraft.util.Icon; -import net.minecraft.client.renderer.texture.IconRegister; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import java.util.List; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; - -public class ItemGluttonyShard extends ItemFood -{ - Icon icon; - - public ItemGluttonyShard(int id) - { - super(id, 2, 0.1F, false); - this.setCreativeTab(Forbidden.tab); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister ir) - { - this.icon = ir.registerIcon("forbidden:gluttonyshard"); - } - - @Override - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int par1) - { - return this.icon; - } -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/items/ItemMobCrystal.java b/src/com/spiteful/forbidden/items/ItemMobCrystal.java deleted file mode 100644 index 19c8811..0000000 --- a/src/com/spiteful/forbidden/items/ItemMobCrystal.java +++ /dev/null @@ -1,133 +0,0 @@ -package com.spiteful.forbidden.items; - -import com.spiteful.forbidden.*; - -import java.util.List; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagString; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import thaumcraft.api.aspects.Aspect; - -public class ItemMobCrystal extends Item { - - Icon[] icons; - - public ItemMobCrystal(int par1) { - super(par1); - this.setMaxStackSize(1); - //this.setHasSubtypes(true); - this.setMaxDamage(0); - this.setCreativeTab(Forbidden.crysTab); - } - - @SideOnly(Side.CLIENT) - /** - * allows items to add custom lines of information to the mouseover description - */ - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { - if (par1ItemStack.hasTagCompound()) - { - NBTTagCompound nbttagcompound = par1ItemStack.getTagCompound(); - NBTTagString nbttagstring = (NBTTagString)nbttagcompound.getTag("mob"); - - if (nbttagstring != null) - { - Aspect mobAspect = Config.spawnerMobs.get(nbttagstring.toString()); - if(mobAspect != null) - par3List.add(mobAspect.getName()); - } - } - } - - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister ir) - { - icons = new Icon[2]; - - icons[0] = ir.registerIcon("forbidden:emptycrystal"); - icons[1] = ir.registerIcon("forbidden:mobcrystal"); - } - - @SideOnly(Side.CLIENT) - /** - * Player, Render pass, and item usage sensitive version of getIconIndex. - * - * @param stack The item stack to get the icon for. (Usually this, and usingItem will be the same if usingItem is not null) - * @param renderPass The pass to get the icon for, 0 is default. - * @param player The player holding the item - * @param usingItem The item the player is actively using. Can be null if not using anything. - * @param useRemaining The ticks remaining for the active item. - * @return The icon index - */ - public Icon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { - if (stack.hasTagCompound()) - { - NBTTagCompound nbttagcompound = stack.getTagCompound(); - NBTTagString nbttagstring = (NBTTagString)(nbttagcompound.getTag("mob")); - - if(nbttagstring != null) - return icons[1]; - } - - return icons[0]; - } - - @SideOnly(Side.CLIENT) - /** - * Returns the icon index of the stack given as argument. - */ - public Icon getIconIndex(ItemStack par1ItemStack) - { - if (par1ItemStack.hasTagCompound()) - { - NBTTagCompound nbttagcompound = par1ItemStack.getTagCompound(); - NBTTagString nbttagstring = (NBTTagString)(nbttagcompound.getTag("mob")); - - if(nbttagstring != null) - return icons[1]; - } - - return icons[0]; - } - - @SideOnly(Side.CLIENT) - /** - * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) - */ - public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) - { - par3List.add(new ItemStack(par1, 1, 0)); - - for (String mob: Config.spawnerMobs.keySet()){ - ItemStack crystal = new ItemStack(par1, 1, 0); - NBTTagString mobTag = new NBTTagString("mob", mob); - crystal.setTagInfo("mob", mobTag); - par3List.add(crystal); - } - } - - public String getItemDisplayName(ItemStack par1ItemStack) - { - if (par1ItemStack.hasTagCompound()) - { - NBTTagCompound nbttagcompound = par1ItemStack.getTagCompound(); - NBTTagString nbttagstring = (NBTTagString)nbttagcompound.getTag("mob"); - - if(nbttagstring != null) - return ("" + StatCollector.translateToLocal("entity." + nbttagstring.toString() + ".name") + " " + StatCollector.translateToLocal("item.MobCrystal.name")).trim(); - } - - return ("" + StatCollector.translateToLocal("item.MobCrystalEmpty.name")).trim(); - } -} diff --git a/src/com/spiteful/forbidden/items/ItemResource.java b/src/com/spiteful/forbidden/items/ItemResource.java deleted file mode 100644 index ca52f5e..0000000 --- a/src/com/spiteful/forbidden/items/ItemResource.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.spiteful.forbidden.items; - -import com.spiteful.forbidden.Forbidden; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import java.util.List; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.passive.EntitySheep; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; -import net.minecraft.util.MathHelper; - -public class ItemResource extends Item -{ - @SideOnly(Side.CLIENT) - public Icon[] icons; - - public ItemResource(int par1) - { - super(par1); - this.setMaxStackSize(64); - this.setHasSubtypes(true); - this.setMaxDamage(0); - this.setCreativeTab(Forbidden.tab); - } - - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister ir) - { - icons = new Icon[3]; - - icons[0] = ir.registerIcon("forbidden:emerald_nugget"); - icons[1] = ir.registerIcon("forbidden:dye_powder_black"); - icons[2] = ir.registerIcon("forbidden:nuggetmanasteel"); - } - - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int dam) - { - return this.icons[dam]; - } - - /** - * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have - * different names based on their damage or NBT. - */ - public String getUnlocalizedName(ItemStack par1ItemStack) - { - int i = MathHelper.clamp_int(par1ItemStack.getItemDamage(), 0, 2); - return super.getUnlocalizedName() + "." + i; - } - - @SideOnly(Side.CLIENT) - /** - * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) - */ - public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) - { - for (int j = 0; j < 3; ++j) - { - par3List.add(new ItemStack(par1, 1, j)); - } - } - - @Override - /** - * Returns true if the item can be used on the given entity, e.g. shears on sheep. - */ - public boolean itemInteractionForEntity(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, EntityLivingBase par3EntityLivingBase) - { - if (par3EntityLivingBase instanceof EntitySheep && par1ItemStack.getItemDamage() == 1) - { - EntitySheep entitysheep = (EntitySheep)par3EntityLivingBase; - - if (!entitysheep.getSheared() && entitysheep.getFleeceColor() != 15) - { - entitysheep.setFleeceColor(15); - --par1ItemStack.stackSize; - } - - return true; - } - else - { - return false; - } - } -} diff --git a/src/com/spiteful/forbidden/items/ItemRidingCrop.java b/src/com/spiteful/forbidden/items/ItemRidingCrop.java deleted file mode 100644 index 51b3ab8..0000000 --- a/src/com/spiteful/forbidden/items/ItemRidingCrop.java +++ /dev/null @@ -1,142 +0,0 @@ -package com.spiteful.forbidden.items; - -import com.spiteful.forbidden.Forbidden; -import com.spiteful.forbidden.Config; - -import com.google.common.collect.Multimap; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.passive.EntityPig; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumAction; -import net.minecraft.item.EnumToolMaterial; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemSword; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.Icon; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; -import thaumcraft.api.IRepairable; - -public class ItemRidingCrop extends ItemSword { - - public Icon icon; - - public ItemRidingCrop(int id, EnumToolMaterial mat){ - super(id, mat); - this.setCreativeTab(Forbidden.tab); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister ir) - { - this.icon = ir.registerIcon("forbidden:crop"); - } - - /** - * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise - * the damage on the stack. - */ - public boolean hitEntity(ItemStack stack, EntityLivingBase victim, EntityLivingBase player) - { - stack.damageItem(1, player); - if(victim instanceof EntityHorse || victim instanceof EntityPig) - victim.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 175, 5)); - else if(victim instanceof EntityPlayer) - { - victim.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 75, 1)); - victim.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 75, 1)); - } - if(!player.worldObj.isRemote && !Config.noLust && player.worldObj.provider.dimensionId == -1 && player.worldObj.rand.nextInt(30) == 1) - { - EntityItem ent = victim.entityDropItem(new ItemStack(ForbiddenItems.deadlyShards, 1, 4), 1.0F); - ent.motionY += player.worldObj.rand.nextFloat() * 0.05F; - ent.motionX += (player.worldObj.rand.nextFloat() - player.worldObj.rand.nextFloat()) * 0.1F; - ent.motionZ += (player.worldObj.rand.nextFloat() - player.worldObj.rand.nextFloat()) * 0.1F; - } - return true; - } - - @Override - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int par1) - { - return this.icon; - } - - @Override - /** - * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if - * sword - */ - public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) - { - return 1.0F; - } - - @Override - /** - * returns the action that specifies what animation to play when the items is being used - */ - public EnumAction getItemUseAction(ItemStack par1ItemStack) - { - return EnumAction.none; - } - - @Override - /** - * How long it takes to use or consume an item - */ - public int getMaxItemUseDuration(ItemStack par1ItemStack) - { - return 0; - } - - @Override - /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer - */ - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) - { - if(player.ridingEntity != null && player.ridingEntity instanceof EntityLivingBase) - { - EntityLivingBase mount = (EntityLivingBase)player.ridingEntity; - stack.damageItem(1, player); - player.swingItem(); - //mount.attackEntityFrom(DamageSource.causePlayerDamage(player), 4.0F); - mount.attackEntityFrom(DamageSource.generic, 1.0F); - mount.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 175, 5)); - } - return stack; - } - - @Override - /** - * Return whether this item is repairable in an anvil. - */ - public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) - { - return par2ItemStack.itemID == Item.leather.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack); - } - - @Override - /** - * Returns if the item (tool) can harvest results from the block type. - */ - public boolean canHarvestBlock(Block par1Block) - { - return false; - } -} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/items/ItemSkullAxe.java b/src/com/spiteful/forbidden/items/ItemSkullAxe.java deleted file mode 100644 index 97a5387..0000000 --- a/src/com/spiteful/forbidden/items/ItemSkullAxe.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.spiteful.forbidden.items; - -import com.spiteful.forbidden.Forbidden; -import com.spiteful.forbidden.Config; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.EnumToolMaterial; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemSword; -import net.minecraft.block.Block; -import net.minecraft.util.Icon; -import thaumcraft.api.IRepairable; -import thaumcraft.api.ItemApi; - -public class ItemSkullAxe extends ItemSword implements IRepairable -{ - public Icon icon; - - public ItemSkullAxe(int i, EnumToolMaterial enumtoolmaterial) - { - super(i, enumtoolmaterial); - this.setCreativeTab(Forbidden.tab); - } - - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister ir) - { - this.icon = ir.registerIcon("forbidden:skullaxe"); - } - - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int par1) - { - return this.icon; - } - - public EnumRarity getRarity(ItemStack itemstack) - { - return EnumRarity.uncommon; - } - - @Override - /** - * Return whether this item is repairable in an anvil. - */ - public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) - { - return par2ItemStack.isItemEqual(new ItemStack(Config.thaumcraftResourceID, 1, 2)) ? true : super.getIsRepairable(par1ItemStack, par2ItemStack); - } - - @Override - /** - * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if - * sword - */ - public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) - { - return 1.0F; - } -} diff --git a/src/com/spiteful/forbidden/items/ItemTaintPickaxe.java b/src/com/spiteful/forbidden/items/ItemTaintPickaxe.java deleted file mode 100644 index ec482e6..0000000 --- a/src/com/spiteful/forbidden/items/ItemTaintPickaxe.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.spiteful.forbidden.items; - -import com.spiteful.forbidden.Forbidden; -import com.spiteful.forbidden.Config; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.EnumToolMaterial; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemPickaxe; -import net.minecraft.block.Block; -import net.minecraft.util.Icon; -import net.minecraft.world.World; -import thaumcraft.api.IRepairable; -import thaumcraft.api.ItemApi; -import net.minecraftforge.common.ForgeHooks; - -public class ItemTaintPickaxe extends ItemPickaxe implements IRepairable -{ - public Icon icon; - - public ItemTaintPickaxe(int i, EnumToolMaterial enumtoolmaterial) - { - super(i, enumtoolmaterial); - this.setCreativeTab(Forbidden.tab); - } - - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister ir) - { - this.icon = ir.registerIcon("forbidden:taintpickaxe"); - } - - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int par1) - { - return this.icon; - } - - public EnumRarity getRarity(ItemStack itemstack) - { - return EnumRarity.rare; - } - - public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) - { - return par2ItemStack.isItemEqual(new ItemStack(Config.thaumcraftResourceID, 1, 2)) ? true : super.getIsRepairable(par1ItemStack, par2ItemStack); - } - - @Override - public float getStrVsBlock(ItemStack stack, Block block, int meta) - { - if(block.blockHardness == 0.0F) - return 0.0F; - else if(block.blockHardness < 5.0F) - return 0.1F; - else if(block.blockHardness < 20.0F) - return block.blockHardness / 2.0F; - else - return 5.0F + block.blockHardness; - - } -} diff --git a/src/com/spiteful/forbidden/items/wands/ItemWandCores.java b/src/com/spiteful/forbidden/items/wands/ItemWandCores.java deleted file mode 100644 index 5221a75..0000000 --- a/src/com/spiteful/forbidden/items/wands/ItemWandCores.java +++ /dev/null @@ -1,116 +0,0 @@ -package com.spiteful.forbidden.items.wands; - -import com.spiteful.forbidden.Forbidden; -import com.spiteful.forbidden.Compat; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import java.util.List; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; -import thaumcraft.api.ItemApi; -import thaumcraft.api.wands.WandCap; -import thaumcraft.api.wands.WandRod; -import thaumcraft.common.items.wands.ItemWandCasting; - -public class ItemWandCores extends Item { - - public final String[] types = {"tainted", "infernal", "soul", "blood", "witchwood", "totem", "blood_inert", "livingwood", "livingwood_inert", "blood_staff", - "witchwood_staff"}; - public Icon[] icon; - - - public ItemWandCores(int par1) { - super(par1); - this.setMaxStackSize(64); - this.setHasSubtypes(true); - this.setMaxDamage(0); - this.setCreativeTab(Forbidden.tab); - } - - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister ir) { - icon = new Icon[types.length]; - for(int x = 0; x < types.length; x++) - this.icon[x] = ir.registerIcon("forbidden:wand_rod_" + types[x]); - } - - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int meta) { - return this.icon[meta]; - } - - @SideOnly(Side.CLIENT) - public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) { - for(int x = 0; x < types.length; x++){ - par3List.add(new ItemStack(this, 1, x)); - } - - ItemStack wand = ItemApi.getItem("itemWandCasting", 72); - ((ItemWandCasting)wand.getItem()).setCap(wand, (WandCap)WandCap.caps.get("thaumium")); - ((ItemWandCasting)wand.getItem()).setRod(wand, (WandRod)WandRod.rods.get("tainted")); - par3List.add(wand); - wand = ItemApi.getItem("itemWandCasting", 72); - ((ItemWandCasting)wand.getItem()).setCap(wand, (WandCap)WandCap.caps.get("thaumium")); - ((ItemWandCasting)wand.getItem()).setRod(wand, (WandRod)WandRod.rods.get("infernal")); - par3List.add(wand); - wand = ItemApi.getItem("itemWandCasting", 2000); - ((ItemWandCasting)wand.getItem()).setCap(wand, (WandCap)WandCap.caps.get("orichalcum")); - ((ItemWandCasting)wand.getItem()).setRod(wand, (WandRod)WandRod.rods.get("neutronium")); - par3List.add(wand); - wand = ItemApi.getItem("itemWandCasting", 2000); - ((ItemWandCasting)wand.getItem()).setCap(wand, (WandCap)WandCap.caps.get("orichalcum")); - ((ItemWandCasting)wand.getItem()).setRod(wand, (WandRod)WandRod.rods.get("neutronium_staff")); - par3List.add(wand); - if(Compat.pb) - { - wand = ItemApi.getItem("itemWandCasting", 84); - ((ItemWandCasting)wand.getItem()).setCap(wand, (WandCap)WandCap.caps.get("soul")); - ((ItemWandCasting)wand.getItem()).setRod(wand, (WandRod)WandRod.rods.get("soul")); - par3List.add(wand); - } - if(Compat.bm) - { - wand = ItemApi.getItem("itemWandCasting", 84); - ((ItemWandCasting)wand.getItem()).setCap(wand, (WandCap)WandCap.caps.get("alchemical")); - ((ItemWandCasting)wand.getItem()).setRod(wand, (WandRod)WandRod.rods.get("blood")); - par3List.add(wand); - wand = ItemApi.getItem("itemWandCasting", 168); - ((ItemWandCasting)wand.getItem()).setCap(wand, (WandCap)WandCap.caps.get("alchemical")); - ((ItemWandCasting)wand.getItem()).setRod(wand, (WandRod)WandRod.rods.get("blood_staff")); - par3List.add(wand); - } - if(Compat.am2) - { - wand = ItemApi.getItem("itemWandCasting", 72); - ((ItemWandCasting)wand.getItem()).setCap(wand, (WandCap)WandCap.caps.get("vinteum")); - ((ItemWandCasting)wand.getItem()).setRod(wand, (WandRod)WandRod.rods.get("witchwood")); - par3List.add(wand); - wand = ItemApi.getItem("itemWandCasting", 144); - ((ItemWandCasting)wand.getItem()).setCap(wand, (WandCap)WandCap.caps.get("vinteum")); - ((ItemWandCasting)wand.getItem()).setRod(wand, (WandRod)WandRod.rods.get("witchwood_staff")); - par3List.add(wand); - } - if(Compat.totes) - { - wand = ItemApi.getItem("itemWandCasting", 24); - ((ItemWandCasting)wand.getItem()).setCap(wand, (WandCap)WandCap.caps.get("thaumium")); - ((ItemWandCasting)wand.getItem()).setRod(wand, (WandRod)WandRod.rods.get("totem")); - par3List.add(wand); - } - if(Compat.botan) - { - wand = ItemApi.getItem("itemWandCasting", 84); - ((ItemWandCasting)wand.getItem()).setCap(wand, (WandCap)WandCap.caps.get("manasteel")); - ((ItemWandCasting)wand.getItem()).setRod(wand, (WandRod)WandRod.rods.get("livingwood")); - par3List.add(wand); - } - } - - public String getUnlocalizedName(ItemStack par1ItemStack) { - return super.getUnlocalizedName() + "." + types[par1ItemStack.getItemDamage()]; - } -} diff --git a/src/com/spiteful/forbidden/items/wands/TotemWandUpdate.java b/src/com/spiteful/forbidden/items/wands/TotemWandUpdate.java deleted file mode 100644 index 5416958..0000000 --- a/src/com/spiteful/forbidden/items/wands/TotemWandUpdate.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.spiteful.forbidden.items.wands; - -import com.spiteful.forbidden.Config; -import com.spiteful.forbidden.Compat; - -import java.util.ArrayList; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.wands.IWandRodOnUpdate; -import thaumcraft.common.items.wands.ItemWandCasting; - -public class TotemWandUpdate implements IWandRodOnUpdate { - - Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]); - - public void onUpdate(ItemStack itemstack, EntityPlayer player) - { - if(Compat.totes && Compat.fennCrystal != null && player.ticksExisted % 30 == 0) - { - try - { - ArrayList unfilled = new ArrayList(); - for(int x = 0;x < primals.length;x++) - { - if(((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]) < ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack)) - { - unfilled.add(primals[x]); - } - } - if(unfilled.size() > 0 && siphonPlant(player)) - ((ItemWandCasting)itemstack.getItem()).addVis(itemstack, (Aspect)(unfilled.get(player.worldObj.rand.nextInt(unfilled.size()))), 1, true); - - } - catch(Exception e) - { - return; - } - } - - } - - public boolean siphonPlant(EntityPlayer player) - { - for(int x = 0; x < player.inventory.getSizeInventory(); ++x) - { - ItemStack item = player.inventory.getStackInSlot(x); - if(item != null && item.itemID == Compat.fennCrystal.itemID) - { - if(item.getItemDamage() <= 995) - { - item.setItemDamage(item.getItemDamage() + 5); - return true; - } - } - } - return false; - } -} diff --git a/src/com/spiteful/forbidden/tiles/WrathSpawnerLogic.java b/src/com/spiteful/forbidden/tiles/WrathSpawnerLogic.java deleted file mode 100644 index e127971..0000000 --- a/src/com/spiteful/forbidden/tiles/WrathSpawnerLogic.java +++ /dev/null @@ -1,343 +0,0 @@ -package com.spiteful.forbidden.tiles; - -import com.spiteful.forbidden.*; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityList; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.EntityLivingData; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.nbt.NBTBase; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.network.packet.Packet; -import net.minecraft.network.packet.Packet132TileEntityData; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.WeightedRandom; -import net.minecraft.world.World; -import thaumcraft.api.aspects.Aspect; - -import thaumcraft.common.Thaumcraft; - -public class WrathSpawnerLogic -{ - /** The mob spawner we deal with */ - final TileEntityWrathCage mobSpawnerEntity; - - public boolean mobSet = false; - - /** The delay to spawn. */ - public int spawnDelay = 20; - private String mobID = "Pig"; - Aspect aspect = Aspect.GREED; - private boolean slothful = false; - private int fuel = 0; - - public double field_98287_c; - public double field_98284_d; - private int minSpawnDelay = 200; - private int maxSpawnDelay = 300; - - /** A counter for spawn tries. */ - private int spawnCount = 3; - private Entity renderEntity; - private int maxNearbyEntities = 6; - - /** The distance from which a player activates the spawner. */ - private int activatingRangeFromPlayer = 16; - - /** The range coefficient for spawning entities around. */ - private int spawnRange = 4; - - WrathSpawnerLogic(TileEntityWrathCage par1TileEntityMobSpawner) - { - this.mobSpawnerEntity = par1TileEntityMobSpawner; - } - - /** - * Gets the entity name that should be spawned. - */ - public String getEntityNameToSpawn() - { - return this.mobID; - } - - public Aspect getAspect() - { - return aspect; - } - - public void setMobID(String par1Str) - { - this.mobID = par1Str; - if(Config.spawnerMobs.containsKey(mobID)) - aspect = Config.spawnerMobs.get(mobID); - else - aspect = Aspect.GREED; - } - - public void mobIsSet(boolean inp){ - mobSet = inp; - } - - public boolean isMobSet() - { - return mobSet; - } - - public void updateSpawnerBlock(int par1) - { - this.mobSpawnerEntity.worldObj.addBlockEvent(this.mobSpawnerEntity.xCoord, this.mobSpawnerEntity.yCoord, this.mobSpawnerEntity.zCoord, Block.mobSpawner.blockID, par1, 0); - } - - public World getSpawnerWorld() - { - return this.mobSpawnerEntity.worldObj; - } - - public int getSpawnerX() - { - return this.mobSpawnerEntity.xCoord; - } - - public int getSpawnerY() - { - return this.mobSpawnerEntity.yCoord; - } - - public int getSpawnerZ() - { - return this.mobSpawnerEntity.zCoord; - } - - public void updateSpawner() - { - if(!mobSet) - return; - - double d0; - - if (this.getSpawnerWorld().isRemote && (fuel > 0 || Config.wrathCost <= 0)) - { - double d1 = (double)((float)this.getSpawnerX() + this.getSpawnerWorld().rand.nextFloat()); - double d2 = (double)((float)this.getSpawnerY() + this.getSpawnerWorld().rand.nextFloat()); - d0 = (double)((float)this.getSpawnerZ() + this.getSpawnerWorld().rand.nextFloat()); - //this.getSpawnerWorld().spawnParticle("smoke", d1, d2, d0, 0.0D, 0.0D, 0.0D); - //this.getSpawnerWorld().spawnParticle("flame", d1, d2, d0, 0.0D, 0.0D, 0.0D); - Thaumcraft.proxy.sparkle((float)d1, (float)d2, (float)d0, 0x870404); - - if (this.spawnDelay > 0) - { - --this.spawnDelay; - } - - this.field_98284_d = this.field_98287_c; - this.field_98287_c = (this.field_98287_c + (double)(1000.0F / ((float)this.spawnDelay + 200.0F))) % 360.0D; - } - else if(Config.wrathCage) - { - if(Config.wrathCost > 0 && fuel <= 0){ - if(mobSpawnerEntity.special >= Config.wrathCost){ - mobSpawnerEntity.special -= Config.wrathCost; - slothful = false; - fuel = Config.wrathEff; - mobSpawnerEntity.worldObj.markBlockForUpdate(getSpawnerX(), getSpawnerY(), getSpawnerZ()); - } - else if(mobSpawnerEntity.wrath >= Config.wrathCost){ - mobSpawnerEntity.wrath -= Config.wrathCost; - slothful = false; - fuel = Config.wrathEff; - mobSpawnerEntity.worldObj.markBlockForUpdate(getSpawnerX(), getSpawnerY(), getSpawnerZ()); - } - else if(mobSpawnerEntity.sloth >= Config.wrathCost){ - mobSpawnerEntity.sloth -= Config.wrathCost; - slothful = true; - fuel = Config.wrathEff; - mobSpawnerEntity.worldObj.markBlockForUpdate(getSpawnerX(), getSpawnerY(), getSpawnerZ()); - } - } - - if (this.spawnDelay == -1) - { - this.updateDelay(); - } - - if(fuel <= 0 && Config.wrathCost > 0) - return; - - if (this.spawnDelay > 0) - { - --this.spawnDelay; - return; - } - - for (int i = 0; i < this.spawnCount && (fuel > 0 || Config.wrathCost <= 0); ++i) - { - Entity entity = EntityList.createEntityByName(this.getEntityNameToSpawn(), this.getSpawnerWorld()); - - if (entity == null) - { - return; - } - - int j = this.getSpawnerWorld().getEntitiesWithinAABB(entity.getClass(), AxisAlignedBB.getAABBPool().getAABB((double)this.getSpawnerX(), (double)this.getSpawnerY(), (double)this.getSpawnerZ(), (double)(this.getSpawnerX() + 1), (double)(this.getSpawnerY() + 1), (double)(this.getSpawnerZ() + 1)).expand((double)(this.spawnRange * 2), 4.0D, (double)(this.spawnRange * 2))).size(); - - if (j >= this.maxNearbyEntities) - { - this.updateDelay(); - return; - } - - d0 = (double)this.getSpawnerX() + (this.getSpawnerWorld().rand.nextDouble() - this.getSpawnerWorld().rand.nextDouble()) * (double)this.spawnRange; - double d3 = (double)(this.getSpawnerY() + this.getSpawnerWorld().rand.nextInt(3) - 1); - double d4 = (double)this.getSpawnerZ() + (this.getSpawnerWorld().rand.nextDouble() - this.getSpawnerWorld().rand.nextDouble()) * (double)this.spawnRange; - EntityLiving entityliving = entity instanceof EntityLiving ? (EntityLiving)entity : null; - entity.setLocationAndAngles(d0, d3, d4, this.getSpawnerWorld().rand.nextFloat() * 360.0F, 0.0F); - - if ( - //entityliving == null || - entityCanSpawn(entityliving)) - //entityliving.getCanSpawnHere()) - { - this.spawnMob(entity); - this.getSpawnerWorld().playAuxSFX(2004, this.getSpawnerX(), this.getSpawnerY(), this.getSpawnerZ(), 0); - - if (entityliving != null) - { - entityliving.spawnExplosionParticle(); - fuel--; - } - - this.updateDelay(); - } - else if(entityliving != null) - entityliving.isDead = true; - } - - } - } - - /** - * Checks if the entity's current position is a valid location to spawn this entity. - */ - public boolean entityCanSpawn(EntityLiving entity) - { - return entity.worldObj.checkNoEntityCollision(entity.boundingBox) && entity.worldObj.getCollidingBoundingBoxes(entity, entity.boundingBox).isEmpty() && !entity.worldObj.isAnyLiquid(entity.boundingBox); - } - - private void updateDelay() - { - if (this.maxSpawnDelay <= this.minSpawnDelay) - { - this.spawnDelay = this.minSpawnDelay; - } - else - { - int i = this.maxSpawnDelay - this.minSpawnDelay; - this.spawnDelay = this.minSpawnDelay + this.getSpawnerWorld().rand.nextInt(i); - } - - if(slothful) - spawnDelay += 200; - - this.updateSpawnerBlock(1); - } - - public void readFromNBT(NBTTagCompound par1NBTTagCompound) - { - mobID = par1NBTTagCompound.getString("EntityId"); - if(Config.spawnerMobs.containsKey(mobID)) - aspect = Config.spawnerMobs.get(mobID); - else - aspect = Aspect.GREED; - mobSet = par1NBTTagCompound.getBoolean("MobSet"); - slothful = par1NBTTagCompound.getBoolean("Slothful"); - this.fuel = par1NBTTagCompound.getShort("Fuel"); - this.spawnDelay = par1NBTTagCompound.getShort("Delay"); - - //if (par1NBTTagCompound.hasKey("MinSpawnDelay")) - //{ - // this.minSpawnDelay = par1NBTTagCompound.getShort("MinSpawnDelay"); - // this.maxSpawnDelay = par1NBTTagCompound.getShort("MaxSpawnDelay"); - // this.spawnCount = par1NBTTagCompound.getShort("SpawnCount"); - //} - - if (par1NBTTagCompound.hasKey("MaxNearbyEntities")) - { - this.maxNearbyEntities = par1NBTTagCompound.getShort("MaxNearbyEntities"); - } - - if (par1NBTTagCompound.hasKey("SpawnRange")) - { - this.spawnRange = par1NBTTagCompound.getShort("SpawnRange"); - } - - if (this.getSpawnerWorld() != null && this.getSpawnerWorld().isRemote) - { - this.renderEntity = null; - } - } - - public void writeToNBT(NBTTagCompound par1NBTTagCompound) - { - par1NBTTagCompound.setString("EntityId", this.getEntityNameToSpawn()); - par1NBTTagCompound.setBoolean("MobSet", mobSet); - par1NBTTagCompound.setBoolean("Slothful", slothful); - par1NBTTagCompound.setShort("Fuel", (short)this.fuel); - par1NBTTagCompound.setShort("Delay", (short)this.spawnDelay); - //par1NBTTagCompound.setShort("MinSpawnDelay", (short)this.minSpawnDelay); - //par1NBTTagCompound.setShort("MaxSpawnDelay", (short)this.maxSpawnDelay); - //par1NBTTagCompound.setShort("SpawnCount", (short)this.spawnCount); - par1NBTTagCompound.setShort("MaxNearbyEntities", (short)this.maxNearbyEntities); - par1NBTTagCompound.setShort("SpawnRange", (short)this.spawnRange); - - } - - public Entity spawnMob(Entity par1Entity) - { - if (par1Entity instanceof EntityLivingBase && par1Entity.worldObj != null) - { - ((EntityLiving)par1Entity).onSpawnWithEgg((EntityLivingData)null); - this.getSpawnerWorld().spawnEntityInWorld(par1Entity); - } - - return par1Entity; - } - - /** - * Sets the delay to minDelay if parameter given is 1, else return false. - */ - public boolean setDelayToMin(int par1) - { - if (par1 == 1 && this.getSpawnerWorld().isRemote) - { - this.spawnDelay = this.minSpawnDelay; - return true; - } - else - { - return false; - } - } - - @SideOnly(Side.CLIENT) - public Entity getEntityForRender() - { - if (this.renderEntity == null) - { - Entity entity = EntityList.createEntityByName(this.getEntityNameToSpawn(), (World)null); - entity = this.spawnMob(entity); - this.renderEntity = entity; - } - - return this.renderEntity; - } - -} diff --git a/src/com/spiteful/forbidden/CommonProxy.java b/src/main/java/com/spiteful/forbidden/CommonProxy.java similarity index 100% rename from src/com/spiteful/forbidden/CommonProxy.java rename to src/main/java/com/spiteful/forbidden/CommonProxy.java diff --git a/src/main/java/com/spiteful/forbidden/Config.java b/src/main/java/com/spiteful/forbidden/Config.java new file mode 100644 index 0000000..af295e7 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/Config.java @@ -0,0 +1,138 @@ +package com.spiteful.forbidden; + +import java.io.File; +import java.util.HashMap; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.config.Configuration; + +import org.apache.logging.log4j.Level; + +import thaumcraft.api.ItemApi; +import thaumcraft.api.aspects.Aspect; + +public class Config { + public static HashMap spawnerMobs = new HashMap(); + + public static int clusterEnchID; + public static int pigBaneEnchID; + public static int greedyEnchID; + public static int consumingEnchID; + public static int educationalEnchID; + public static int corruptingEnchID; + public static int eternalEnchID; + + public static int thaumcraftTaintBiomeID; + public static int thaumcraftTaintPotionID; + public static ItemStack thaumcraftResource; + public static ItemStack thaumcraftTaintBlock; + public static ItemStack thaumcraftOre; + public static ItemStack thaumcraftShard; + + public static boolean noLust = false; + public static boolean silverfishEmeralds = true; + public static boolean tagResearch = true; + public static boolean wrathCage = true; + public static boolean spork = false; + public static boolean greedyEnch = true; + public static boolean emeraldTrans = true; + public static boolean wrathCrazy = false; + + public static int wrathCost = 5; + public static int wrathEff = 4; + + public static Material taintMaterial; + + public static void configurate(File targ) { + Configuration conf = new Configuration(targ); + + try { + conf.load(); + + int enchCount = 66; + clusterEnchID = conf.get("enchantments", "Fiery Core", enchCount++).getInt(); + pigBaneEnchID = conf.get("enchantments", "Porcivore", enchCount++).getInt(); + greedyEnchID = conf.get("enchantments", "Capitalist", enchCount++).getInt(); + consumingEnchID = conf.get("enchantments", "Consuming", enchCount++).getInt(); + educationalEnchID = conf.get("enchantments", "Educational", enchCount++).getInt(); + corruptingEnchID = conf.get("enchantments", "Corrupting", enchCount++).getInt(); + eternalEnchID = conf.get("enchantments", "Eternal", enchCount++).getInt(); + + noLust = conf.get("general", "No Lust", noLust, "Enable to remove Luxuria aspect and related items.").getBoolean(false); + silverfishEmeralds = conf.get("general", "Silverfish Drop Emerald Nuggets", silverfishEmeralds, "Disable to prevent Silverfish from dropping emerald nuggets.").getBoolean(true); + greedyEnch = conf.get("general", "Capitalist Enchantment", greedyEnch, "Disable to remove the recipe and effects of the Capitalist enchantment.").getBoolean(true); + emeraldTrans = conf.get("general", "Emerald Transmutation", emeraldTrans, "Disable to remove the Emerald Transmutation research and recipe.").getBoolean(true); + tagResearch = conf.get("general", "Tag Research Items", tagResearch, "Disable to get rid of the [FM] tags in the Thaumonomicon.").getBoolean(true); + wrathCage = conf.get("general", "Wrath Cage Enabled", wrathCage, "Disable if you don't want players using the Wrath Cage.").getBoolean(true); + wrathCost = conf.get("general", "Wrath Cage Fuel Cost", wrathCost, "Cost of essentia per round of spawns in the Wrath Cage. Raise to increase essentia costs. Defaults to 5. Set to 0 to remove the need to fuel the Wrath Cage. Setting the cost above 64 is not recommended.").getInt(5); + wrathEff = conf.get("general", "Wrath Cage Fuel Efficiency", wrathEff, "Number of spawns a Wrath Cage can get per fuel cost. Defaults to 4. Lower to make the cage less efficient and raise to make it more efficient.").getInt(4); + if (wrathEff < 0) + wrathEff = 4; + wrathCrazy = conf.get("general", "Wrath Cage Cries Havoc", wrathCrazy, "Enable to let the Wrath Cage imprint on ANY non-boss mob. May break your game or make your game Awesome.").getBoolean(false); + spork = conf.get("silly", "Spork of Doom", spork, "What is this? I don't even...").getBoolean(false); + } catch (Exception e) { + LogHandler.log(Level.ERROR, e, "Had a problem loading its configuration."); + } finally { + conf.save(); + } + + try { + thaumcraftResource = ItemApi.getItem("itemResource", 0); + thaumcraftShard = ItemApi.getItem("itemShard", 0); + thaumcraftTaintBlock = ItemApi.getBlock("blockTaint", 0); + thaumcraftOre = ItemApi.getBlock("blockCustomOre", 0); + taintMaterial = Block.getBlockFromItem(thaumcraftTaintBlock.getItem()).getMaterial(); + + thaumcraftTaintPotionID = Class.forName("thaumcraft.common.config.Config").getField("potionFluxTaintID").getInt(null); + thaumcraftTaintBiomeID = Class.forName("thaumcraft.common.config.Config").getField("biomeTaintID").getInt(null); + } catch (Exception e) { + LogHandler.log(Level.ERROR, e, "There was problem when retrieving information from Thaumcraft."); + e.printStackTrace(); + } + } + + public static void spawnilify() { + if (wrathCage) { + spawnerMobs.put("Zombie", Aspect.FLESH); + spawnerMobs.put("Skeleton", Aspect.DEATH); + spawnerMobs.put("Creeper", Aspect.FIRE); + spawnerMobs.put("EntityHorse", Aspect.BEAST); + spawnerMobs.put("Pig", Aspect.BEAST); + spawnerMobs.put("Sheep", Aspect.CLOTH); + spawnerMobs.put("Cow", Aspect.BEAST); + spawnerMobs.put("MushroomCow", Aspect.PLANT); + spawnerMobs.put("Ozelot", Aspect.BEAST); + spawnerMobs.put("Chicken", Aspect.FLIGHT); + spawnerMobs.put("Squid", Aspect.SENSES); + spawnerMobs.put("Wolf", Aspect.BEAST); + spawnerMobs.put("Bat", Aspect.FLIGHT); + spawnerMobs.put("Spider", Aspect.CLOTH); + spawnerMobs.put("Slime", Aspect.SLIME); + spawnerMobs.put("Ghast", DarkAspects.NETHER); + spawnerMobs.put("PigZombie", Aspect.GREED); + spawnerMobs.put("Enderman", Aspect.ELDRITCH); + spawnerMobs.put("CaveSpider", Aspect.POISON); + if (silverfishEmeralds) + spawnerMobs.put("Silverfish", Aspect.GREED); + else + spawnerMobs.put("Silverfish", Aspect.BEAST); + spawnerMobs.put("Blaze", Aspect.FIRE); + spawnerMobs.put("LavaSlime", Aspect.FIRE); + spawnerMobs.put("Witch", Aspect.MAGIC); + spawnerMobs.put("Thaumcraft.Firebat", Aspect.FIRE); + spawnerMobs.put("Thaumcraft.Wisp", Aspect.AURA); + spawnerMobs.put("Thaumcraft.ThaumSlime", Aspect.TAINT); + spawnerMobs.put("Thaumcraft.BrainyZombie", Aspect.MIND); + spawnerMobs.put("Thaumcraft.TaintSpider", Aspect.TAINT); + spawnerMobs.put("Thaumcraft.TaintSwarm", Aspect.TAINT); + spawnerMobs.put("Thaumcraft.TaintedPig", Aspect.TAINT); + spawnerMobs.put("Thaumcraft.TaintedSheep", Aspect.TAINT); + spawnerMobs.put("Thaumcraft.TaintedCow", Aspect.TAINT); + spawnerMobs.put("Thaumcraft.TaintedChicken", Aspect.TAINT); + spawnerMobs.put("Thaumcraft.TaintedVillager", Aspect.TAINT); + // spawnerMobs.put("Taintacle", DarkAspects.LUST); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/DarkAspects.java b/src/main/java/com/spiteful/forbidden/DarkAspects.java new file mode 100644 index 0000000..8096405 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/DarkAspects.java @@ -0,0 +1,249 @@ +package com.spiteful.forbidden; + +import java.util.Iterator; + +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.oredict.OreDictionary; +import thaumcraft.api.ThaumcraftApi; +import thaumcraft.api.ThaumcraftApiHelper; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; + +import com.spiteful.forbidden.blocks.ForbiddenBlocks; +import com.spiteful.forbidden.items.ForbiddenItems; + +public class DarkAspects { + public static Aspect NETHER; + public static Aspect WRATH; + public static Aspect ENVY; + public static Aspect GLUTTONY; + public static Aspect PRIDE; + public static Aspect LUST; + public static Aspect SLOTH; + + public static void initAspects() { + if (!Config.noLust) { + LUST = new Aspect("luxuria", 0xffc1ce, new Aspect[] { Aspect.FLESH, Aspect.HUNGER }, new ResourceLocation("forbidden", "textures/aspects/luxuria.png"), 1); + } + + NETHER = new Aspect("infernus", 0xff0000, new Aspect[] { Aspect.FIRE, Aspect.MAGIC }, new ResourceLocation("forbidden", "textures/aspects/infernus.png"), 771); + PRIDE = new Aspect("superbia", 0x9639ff, new Aspect[] { Aspect.FLIGHT, Aspect.VOID }, new ResourceLocation("forbidden", "textures/aspects/superbia.png"), 1); + GLUTTONY = new Aspect("gula", 0xd59c46, new Aspect[] { Aspect.HUNGER, Aspect.HUNGER }, new ResourceLocation("forbidden", "textures/aspects/gula.png"), 1); + ENVY = new Aspect("invidia", 0x00ba00, new Aspect[] { Aspect.SENSES, Aspect.HUNGER }, new ResourceLocation("forbidden", "textures/aspects/invidia.png"), 1); + SLOTH = new Aspect("desidia", 0x6e6e6e, new Aspect[] { Aspect.TRAP, Aspect.SOUL }, new ResourceLocation("forbidden", "textures/aspects/desidia.png"), 771); + WRATH = new Aspect("ira", 0x870404, new Aspect[] { Aspect.WEAPON, Aspect.FIRE }, new ResourceLocation("forbidden", "textures/aspects/ira.png"), 771); + + } + + private static AspectList getAspectList(ItemStack stack) { + AspectList list = ThaumcraftApiHelper.getObjectAspects(stack); + return list != null ? list : new AspectList(); + } + + public static void addAspects() { + AspectList list; + + list = getAspectList(new ItemStack(Blocks.netherrack)); + list.add(NETHER, 1); + ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.netherrack, 1, OreDictionary.WILDCARD_VALUE), list); + + list = getAspectList(new ItemStack(Blocks.portal)); + list.add(NETHER, 4); + ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.portal, 1, OreDictionary.WILDCARD_VALUE), list); + + // list = getAspectList(new ItemStack(Block.oreNetherQuartz)); + // list.add(NETHER, 2); + // ThaumcraftApi.registerObjectTag(Block.oreNetherQuartz.blockID, -1, + // list); + ThaumcraftApi.registerObjectTag("oreQuartz", (new AspectList()).add(Aspect.CRYSTAL, 3).add(NETHER, 2)); + + list = getAspectList(new ItemStack(Items.nether_star)); + list.add(NETHER, 8).add(PRIDE, 8); + ThaumcraftApi.registerObjectTag(new ItemStack(Items.nether_star, 1, 0), list); + + list = getAspectList(new ItemStack(Items.nether_wart)); + list.add(NETHER, 1); + ThaumcraftApi.registerObjectTag(new ItemStack(Items.nether_wart, 1, 0), list); + + list = getAspectList(new ItemStack(Items.netherbrick)); + list.add(NETHER, 1); + ThaumcraftApi.registerObjectTag(new ItemStack(Items.netherbrick, 1, OreDictionary.WILDCARD_VALUE), list); + + list = getAspectList(new ItemStack(Blocks.nether_brick)); + list.add(NETHER, 2); + ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.nether_brick, 1, 0), list); + + list = getAspectList(new ItemStack(Items.ghast_tear)); + list.add(WRATH, 4); + ThaumcraftApi.registerObjectTag(new ItemStack(Items.ghast_tear, 1, OreDictionary.WILDCARD_VALUE), list); + + list = getAspectList(new ItemStack(Items.skull, 1, 1)); + list.add(NETHER, 4); + ThaumcraftApi.registerObjectTag(new ItemStack(Items.skull, 1, 1), list); + + list = getAspectList(new ItemStack(Items.skull, 1, 4)); + list.add(WRATH, 2); + ThaumcraftApi.registerObjectTag(new ItemStack(Items.skull, 1, 4), list); + + // list = getAspectList(new ItemStack(Item.enderPearl)); + // list.add(PRIDE, 1); + // ThaumcraftApi.registerObjectTag(Item.enderPearl.itemID, -1, list); + + list = getAspectList(new ItemStack(Blocks.tnt)); + list.add(WRATH, 2); + ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.tnt, 1, 0), list); + + list = getAspectList(new ItemStack(Items.golden_helmet)); + if (list != null) { + list.add(PRIDE, 2); + ThaumcraftApi.registerObjectTag(new ItemStack(Items.golden_helmet, 1, OreDictionary.WILDCARD_VALUE), list); + } + + list = getAspectList(new ItemStack(Items.golden_chestplate)); + if (list != null) { + list.add(PRIDE, 1); + ThaumcraftApi.registerObjectTag(new ItemStack(Items.golden_chestplate, 1, OreDictionary.WILDCARD_VALUE), list); + } + + list = getAspectList(new ItemStack(Items.golden_leggings)); + if (list != null) { + list.add(PRIDE, 1); + ThaumcraftApi.registerObjectTag(new ItemStack(Items.golden_leggings, 1, OreDictionary.WILDCARD_VALUE), list); + } + + list = getAspectList(new ItemStack(Items.golden_boots)); + if (list != null) { + list.add(PRIDE, 1); + ThaumcraftApi.registerObjectTag(new ItemStack(Items.golden_boots, 1, OreDictionary.WILDCARD_VALUE), list); + } + + list = getAspectList(new ItemStack(Items.golden_sword)); + if (list != null) { + list.add(PRIDE, 2); + ThaumcraftApi.registerObjectTag(new ItemStack(Items.golden_sword, 1, OreDictionary.WILDCARD_VALUE), list); + } + + // list = getAspectList(new ItemStack(Item.bed)); + // list.add(SLOTH, 4); + list = (new AspectList()).add(Aspect.CRAFT, 3).add(Aspect.CLOTH, 6).add(SLOTH, 4); + ThaumcraftApi.registerObjectTag(new ItemStack(Items.bed, 1, OreDictionary.WILDCARD_VALUE), list); + + // list = getAspectList(new ItemStack(Item.eyeOfEnder)).copy(); + list = (new AspectList()).add(Aspect.SENSES, 4).add(Aspect.ELDRITCH, 4).add(Aspect.MAGIC, 3); + list.add(ENVY, 4); + ThaumcraftApi.registerObjectTag(new ItemStack(Items.ender_eye, 1, 0), list); + // ThaumcraftApi.registerComplexObjectTag(Item.eyeOfEnder.itemID, 0, + // (new AspectList()).add(Aspect.SENSES, 4).add(ENVY, 86)); + + list = getAspectList(new ItemStack(Items.cake)); + list.add(GLUTTONY, 7); + ThaumcraftApi.registerObjectTag(new ItemStack(Items.cake, 1, 0), list); + + list = getAspectList(new ItemStack(Items.cookie)); + list.add(GLUTTONY, 1); + ThaumcraftApi.registerObjectTag(new ItemStack(Items.cookie, 1, OreDictionary.WILDCARD_VALUE), list); + + list = getAspectList(new ItemStack(Items.fire_charge)); + list.add(WRATH, 1); + ThaumcraftApi.registerObjectTag(new ItemStack(Items.fire_charge, 1, 0), list); + + // list = getAspectList(new ItemStack(Item.comparator)).copy(); + // list.add(ENVY, 2); + list = (new AspectList()).add(Aspect.MECHANISM, 2).add(Aspect.ORDER, 2).add(ENVY, 2); + ThaumcraftApi.registerObjectTag(new ItemStack(Items.comparator, 1, OreDictionary.WILDCARD_VALUE), list); + // ThaumcraftApi.registerComplexObjectTag(Block.redstoneComparatorIdle.blockID, + // -1, (new AspectList()).merge(Aspect.MECHANISM, 2).merge(Aspect.ORDER, + // 2).merge(ENVY, 2)); + // ThaumcraftApi.registerComplexObjectTag(Block.redstoneComparatorActive.blockID, + // -1, (new AspectList()).merge(Aspect.MECHANISM, 2).merge(Aspect.ORDER, + // 2).merge(ENVY, 2)); + + list = (new AspectList()).add(Aspect.FLESH, 6).add(Aspect.LIFE, 6).add(Aspect.ENERGY, 6).add(Aspect.BEAST, 4).add(GLUTTONY, 6); + ThaumcraftApi.registerObjectTag("itemBacon", list); + + if (!Config.noLust) { + list = getAspectList(new ItemStack(Items.saddle)); + list.add(LUST, 2); + ThaumcraftApi.registerObjectTag(new ItemStack(Items.saddle, 1, OreDictionary.WILDCARD_VALUE), list); + + // list = getAspectList(new ItemStack(Item.leash)); + list = (new AspectList()).add(Aspect.BEAST, 2).add(Aspect.CLOTH, 2).add(Aspect.SLIME, 1); + list.add(LUST, 2); + ThaumcraftApi.registerObjectTag(new ItemStack(Items.lead, 1, OreDictionary.WILDCARD_VALUE), list); + } + + Iterator mobCount = ThaumcraftApi.scanEntities.iterator(); + + while (mobCount.hasNext()) { + ThaumcraftApi.EntityTags mobTag = (ThaumcraftApi.EntityTags) mobCount.next(); + if (mobTag.entityName.equals("BrainyZombie")) { + mobTag.aspects.add(WRATH, 3); + } else if (mobTag.entityName.equals("GiantBrainyZombie")) { + mobTag.aspects.add(WRATH, 4); + } else if (mobTag.entityName.equals("Firebat")) { + mobTag.aspects.add(WRATH, 1).add(NETHER, 2); + } else if (mobTag.entityName.equals("Skeleton") && mobTag.nbts.length > 0) { + mobTag.aspects.add(NETHER, 3); + } else if (mobTag.entityName.equals("Creeper")) { + if (mobTag.nbts.length > 0) + mobTag.aspects.add(WRATH, 4); + else + mobTag.aspects.add(WRATH, 2); + } else if (mobTag.entityName.equals("WitherBoss")) { + mobTag.aspects.add(NETHER, 7).add(WRATH, 7); + } else if (mobTag.entityName.equals("Ozelot")) { + mobTag.aspects.add(SLOTH, 3); + } else if (mobTag.entityName.equals("Enderman")) { + mobTag.aspects.add(PRIDE, 4).add(ENVY, 4); + } else if (mobTag.entityName.equals("Ghast")) { + mobTag.aspects.add(NETHER, 3).add(WRATH, 3); + } else if (mobTag.entityName.equals("PigZombie")) { + mobTag.aspects.add(WRATH, 6); + } else if (mobTag.entityName.equals("EnderDragon")) { + mobTag.aspects.add(PRIDE, 10); + } else if (!Config.noLust && mobTag.entityName.equals("Taintacle")) { + mobTag.aspects.add(LUST, 3); + } else if (mobTag.entityName.equals("Pig")) { + mobTag.aspects.add(GLUTTONY, 3); + } else if (mobTag.entityName.equals("LavaSlime")) { + mobTag.aspects.add(NETHER, 1); + } else if (!Config.noLust && mobTag.entityName.equals("TwilightForest.Forest Bunny")) { + mobTag.aspects.add(LUST, 5); + } else if (mobTag.entityName.equals("TwilightForest.Mini Ghast")) { + mobTag.aspects.add(NETHER, 1).add(WRATH, 1); + } else if (mobTag.entityName.equals("TwilightForest.Tower Boss")) { + mobTag.aspects.add(NETHER, 10).add(WRATH, 10); + } else if (mobTag.entityName.equals("TwilightForest.Tower Ghast")) { + mobTag.aspects.add(NETHER, 3).add(WRATH, 3); + } else if (mobTag.entityName.equals("TwilightForest.Twilight Lich")) { + mobTag.aspects.add(PRIDE, 10); + } else if (!Config.noLust && mobTag.entityName.equals("TwilightForest.Pinch Beetle")) { + mobTag.aspects.add(LUST, 3); + } else if (mobTag.entityName.equals("TwilightForest.King Spider")) { + mobTag.aspects.add(PRIDE, 4); + } else if (mobTag.entityName.equals("witchery.demon")) { + mobTag.aspects.add(NETHER, 8); + } + } + + ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.deadlyShards, 1, 0), (new AspectList()).add(NETHER, 1).add(WRATH, 2).add(Aspect.CRYSTAL, 1)); + ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.deadlyShards, 1, 1), (new AspectList()).add(NETHER, 1).add(ENVY, 2).add(Aspect.CRYSTAL, 1)); + ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.deadlyShards, 1, 2), (new AspectList()).add(Aspect.TAINT, 3).add(Aspect.CRYSTAL, 1)); + ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.deadlyShards, 1, 3), (new AspectList()).add(NETHER, 1).add(PRIDE, 2).add(Aspect.CRYSTAL, 1)); + if (!Config.noLust) + ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.deadlyShards, 1, 4), (new AspectList()).add(NETHER, 1).add(LUST, 2).add(Aspect.CRYSTAL, 1)); + else + ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.deadlyShards, 1, 4), (new AspectList()).add(Aspect.VOID, 1)); + ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.gluttonyShard, 1, OreDictionary.WILDCARD_VALUE), (new AspectList()).add(NETHER, 1).add(GLUTTONY, 2).add(Aspect.CRYSTAL, 1)); + ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.deadlyShards, 1, 5), (new AspectList()).add(NETHER, 1).add(SLOTH, 2).add(Aspect.CRYSTAL, 1)); + ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.deadlyShards, 1, 6), (new AspectList()).add(NETHER, 1).add(Aspect.GREED, 2).add(Aspect.CRYSTAL, 1)); + ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.resource, 1, 0), (new AspectList()).add(Aspect.CRYSTAL, 1)); + ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.resource, 1, 1), (new AspectList()).add(Aspect.DARKNESS, 1)); + ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenBlocks.blackFlower, 1, OreDictionary.WILDCARD_VALUE), (new AspectList()).add(Aspect.PLANT, 1).add(Aspect.LIFE, 1).add(Aspect.SENSES, 1).add(Aspect.DARKNESS, 1)); + if (!Config.noLust) + ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.ridingCrop, 1, OreDictionary.WILDCARD_VALUE), (new AspectList()).add(Aspect.TREE, 2).add(Aspect.CLOTH, 2).add(Aspect.BEAST, 1).add(LUST, 1).add(Aspect.WEAPON, 1)); + } +} \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/DarkResearchItem.java b/src/main/java/com/spiteful/forbidden/DarkResearchItem.java new file mode 100644 index 0000000..fd79f37 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/DarkResearchItem.java @@ -0,0 +1,51 @@ +package com.spiteful.forbidden; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; +import thaumcraft.api.aspects.AspectList; +import thaumcraft.api.research.ResearchItem; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class DarkResearchItem extends ResearchItem { + String inter = null; + + public DarkResearchItem(String par1, String x) { + super(par1, x); + } + + public DarkResearchItem(String par1, String x, AspectList tags, int y, int z, int par5, ResourceLocation icon) { + super(par1, x, tags, y, z, par5, icon); + } + + public DarkResearchItem(String par1, String x, AspectList tags, int y, int z, int par5, ItemStack icon) { + super(par1, x, tags, y, z, par5, icon); + } + + public DarkResearchItem(String par1, String x, String mod, AspectList tags, int y, int z, int par5, ResourceLocation icon) { + super(par1, x, tags, y, z, par5, icon); + inter = mod; + } + + public DarkResearchItem(String par1, String x, String mod, AspectList tags, int y, int z, int par5, ItemStack icon) { + super(par1, x, tags, y, z, par5, icon); + inter = mod; + } + + @SideOnly(Side.CLIENT) + public String getName() { + return StatCollector.translateToLocal("forbidden.research_name." + key); + } + + @SideOnly(Side.CLIENT) + public String getText() { + if (Config.tagResearch) { + if (inter == null) + return "[FM] " + StatCollector.translateToLocal("forbidden.research_text." + key); + else + return "[FM] " + inter + " " + StatCollector.translateToLocal("forbidden.research_text." + key); + } else + return StatCollector.translateToLocal("forbidden.research_text." + key); + } +} \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/FMEventHandler.java b/src/main/java/com/spiteful/forbidden/FMEventHandler.java new file mode 100644 index 0000000..982ef2f --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/FMEventHandler.java @@ -0,0 +1,398 @@ +package com.spiteful.forbidden; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.EntityList; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EnumCreatureAttribute; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.boss.IBossDisplayData; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.item.EntityXPOrb; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntityPigZombie; +import net.minecraft.entity.monster.EntitySilverfish; +import net.minecraft.entity.monster.EntitySkeleton; +import net.minecraft.entity.monster.EntityZombie; +import net.minecraft.entity.monster.IMob; +import net.minecraft.entity.passive.EntityVillager; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemSword; +import net.minecraft.item.ItemTool; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraftforge.common.util.FakePlayer; +import net.minecraftforge.event.entity.living.LivingDeathEvent; +import net.minecraftforge.event.entity.living.LivingDropsEvent; +import net.minecraftforge.event.entity.living.LivingHurtEvent; +import net.minecraftforge.event.entity.living.LivingSpawnEvent; +import net.minecraftforge.event.entity.player.BonemealEvent; +import net.minecraftforge.event.entity.player.ItemTooltipEvent; +import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed; +import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent; + +import org.apache.logging.log4j.Level; + +import thaumcraft.api.aspects.Aspect; +import thaumcraft.common.items.wands.ItemWandCasting; +import thaumcraft.common.lib.Utils; + +import com.google.common.collect.Multimap; +import com.spiteful.forbidden.blocks.BlockBlackFlower; +import com.spiteful.forbidden.blocks.ForbiddenBlocks; +import com.spiteful.forbidden.enchantments.DarkEnchantments; +import com.spiteful.forbidden.items.ForbiddenItems; +import com.spiteful.forbidden.items.ItemTaintPickaxe; + +import cpw.mods.fml.common.eventhandler.Event.Result; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + +public class FMEventHandler { + Random randy = new Random(); + final Aspect[] primals = { Aspect.ENTROPY, Aspect.ORDER, Aspect.FIRE, Aspect.WATER, Aspect.EARTH, Aspect.AIR }; + + @SubscribeEvent + public void onPlayerBreaking(BreakSpeed event) { + if (event.entityPlayer.getCurrentEquippedItem() != null) { + ItemStack stack = event.entityPlayer.getCurrentEquippedItem(); + if (stack.getItem() instanceof ItemTaintPickaxe) { + World world = event.entityPlayer.worldObj; + int x = event.x; + int y = event.y; + int z = event.z; + float hardness = world.getBlock(x, y, z).getBlockHardness(world, x, y, z); + if (hardness == 0.0F) + event.newSpeed = 0.0F; + else if (hardness < 5.0F) + event.newSpeed = 0.1F; + else if (hardness < 20.0F) + event.newSpeed = hardness / 2.0F; + else + event.newSpeed = 5.0F + hardness; + } + } + } + + @SubscribeEvent + public void onLivingDrops(LivingDropsEvent event) { + if (Config.silverfishEmeralds && event.entityLiving instanceof EntitySilverfish) { + if (event.entityLiving.worldObj.getBiomeGenForCoords((int) event.entityLiving.posX, (int) event.entityLiving.posZ).biomeID == BiomeGenBase.extremeHills.biomeID) { + if (event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer && randy.nextInt(30) <= (2 + event.lootingLevel * 2)) + addDrop(event, new ItemStack(ForbiddenItems.resource, 1, 0)); + } else if (event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer && !(event.source.getEntity() instanceof FakePlayer) && randy.nextInt(70) <= (1 + event.lootingLevel * 3)) { + addDrop(event, new ItemStack(ForbiddenItems.resource, 1, 0)); + } + + } + + if (Config.greedyEnch && (event.entityLiving instanceof EntityVillager || event.entityLiving instanceof IMob) && event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) { + EntityPlayer player = (EntityPlayer) event.source.getEntity(); + ItemStack equip = player.getCurrentEquippedItem(); + if (equip != null && EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.greedy.effectId, equip) > 0 && event.lootingLevel <= 0) { + if (event.entityLiving instanceof EntityVillager) + addDrop(event, new ItemStack(Items.emerald, 1)); + else if (randy.nextInt(35) < 3) + addDrop(event, new ItemStack(ForbiddenItems.resource, 1, 0)); + } + } + + if (event.entityLiving.getClass() == EntitySkeleton.class && event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) { + ItemStack weap = ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem(); + if (weap != null && weap.getItem() == ForbiddenItems.skullAxe && randy.nextInt(26) <= (3 + EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, weap))) { + addDrop(event, new ItemStack(Items.skull, 1, ((EntitySkeleton) event.entityLiving).getSkeletonType())); + } + } + + if (event.entityLiving.getClass() == EntityZombie.class && event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) { + ItemStack weap = ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem(); + if (weap != null && weap.getItem() == ForbiddenItems.skullAxe && randy.nextInt(26) <= (2 + 2 * EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, weap))) { + addDrop(event, new ItemStack(Items.skull, 1, 2)); + } + } + + if (event.entityLiving.getClass() == EntityCreeper.class && event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) { + ItemStack weap = ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem(); + if (weap != null && weap.getItem() == ForbiddenItems.skullAxe && randy.nextInt(26) <= (2 + 2 * EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, weap))) { + addDrop(event, new ItemStack(Items.skull, 1, 4)); + } + } + + if (event.entityLiving instanceof EntityPlayer && event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) { + ItemStack weap = ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem(); + if (weap != null && weap.getItem() == ForbiddenItems.skullAxe && randy.nextInt(11) <= (1 + EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, weap))) { + ItemStack head = new ItemStack(Items.skull, 1, 3); + NBTTagCompound nametag = new NBTTagCompound(); + nametag.setString("SkullOwner", ((EntityPlayer) event.entityLiving).getCommandSenderName()); + head.setTagInfo("SkullOwner", nametag); + addDrop(event, head); + } + } + + if (event.entityLiving.worldObj.provider.dimensionId != -1) + return; + + if (!event.recentlyHit || event.source.getEntity() == null || !(event.source.getEntity() instanceof EntityPlayer) || event.source.getEntity() instanceof FakePlayer) { + if (randy.nextInt(30) < 4) { + addDrop(event, new ItemStack(ForbiddenItems.deadlyShards, 1 + randy.nextInt(3), 5)); + } + } + + if (event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer && !(event.source.getEntity() instanceof FakePlayer)) { + if (event.entityLiving instanceof IMob) { + int wrath = 2; + ItemStack heldItem = ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem(); + if (heldItem != null) { + if (heldItem.getItem() instanceof ItemTool) { + Multimap map = heldItem.getItem().getAttributeModifiers(heldItem); + Collection collect = map.get(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName()); + if (collect instanceof AttributeModifier) { + wrath += (int) ((AttributeModifier) collect).getAmount(); + } + } else if (heldItem.getItem() instanceof ItemSword) { + wrath += (int) (((ItemSword) heldItem.getItem()).func_150931_i() + 4.0F); + } + + wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.sharpness.effectId, heldItem); + wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, heldItem); + + if (!event.entityLiving.isImmuneToFire()) { + wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, heldItem); + wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, heldItem); + } + + if (event.entityLiving.isEntityUndead()) { + wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.smite.effectId, heldItem); + } + + if (event.entityLiving.getCreatureAttribute() == EnumCreatureAttribute.ARTHROPOD) { + wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.baneOfArthropods.effectId, heldItem); + } + } + + if (randy.nextInt(61) <= wrath) { + addDrop(event, new ItemStack(ForbiddenItems.deadlyShards, 1, 0)); + } + + if (event.entityLiving instanceof IBossDisplayData) { + addDrop(event, new ItemStack(ForbiddenItems.deadlyShards, 2 + randy.nextInt(1 + event.lootingLevel), 3)); + } + } + + if (event.entityLiving instanceof EntityPigZombie && !(event.source.getEntity() instanceof FakePlayer)) { + if (event.entityLiving.getHeldItem() != null && event.entityLiving.getHeldItem().getItem() == ForbiddenItems.deadlyShards && event.entityLiving.getHeldItem().getItemDamage() == 1) { + addDrop(event, new ItemStack(ForbiddenItems.deadlyShards, 1, 1)); + } + } + } + } + + public void addDrop(LivingDropsEvent event, ItemStack drop) { + EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, drop); + entityitem.delayBeforeCanPickup = 10; + event.drops.add(entityitem); + } + + @SubscribeEvent + public void onDeath(LivingDeathEvent event) { + if (event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer && ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem() != null) { + ItemStack equip = ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem(); + if (equip.getItem() == ForbiddenItems.fork) { + String name = null; + try { + name = EntityList.getEntityString(event.entityLiving); + } catch (Exception e) { + try { + name = event.entityLiving.getCommandSenderName(); + } catch (Exception ee) { + return; + } + } finally { + if (name == null) + return; + } + + if (Config.spawnerMobs.containsKey(name) || (Config.wrathCrazy && !(event.entityLiving instanceof IBossDisplayData))) + imprintCrystal((EntityPlayer) (event.source.getEntity()), name); + } + + if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.educational.effectId, equip) > 0 && event.entityLiving instanceof EntityLiving && EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, equip) == 0) { + try { + int learning = 3 * XPReflectionHelper.getXP(((EntityLiving) event.entityLiving)) * EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.educational.effectId, equip); + while (learning > 0) { + int xp = EntityXPOrb.getXPSplit(learning); + learning -= xp; + event.entityLiving.worldObj.spawnEntityInWorld(new EntityXPOrb(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, xp)); + } + } catch (Exception e) { + LogHandler.log(Level.ERROR, "Failed to educate!"); + } + } + } + } + + public void imprintCrystal(EntityPlayer player, String mob) { + for (int x = 0; x < player.inventory.getSizeInventory(); ++x) { + ItemStack item = player.inventory.getStackInSlot(x); + if (item != null && item.getItem() == ForbiddenItems.mobCrystal && (!item.hasTagCompound() || !item.getTagCompound().hasKey("mob"))) { + if (!item.hasTagCompound()) + item.setTagCompound(new NBTTagCompound()); + item.stackTagCompound.setString("mob", mob); + return; + } + } + } + + @SubscribeEvent + public void onHarvest(HarvestDropsEvent event) { + EntityPlayer player = event.harvester; + if (player != null && player.inventory.getCurrentItem() != null) { + ItemStack equip = player.inventory.getCurrentItem(); + if (equip.getItem() == ForbiddenItems.taintShovel && event.block.getMaterial() == Config.taintMaterial && !(event.block == Block.getBlockFromItem(Config.thaumcraftTaintBlock.getItem()) && event.blockMetadata == 2)) { + int fortune = EnchantmentHelper.getFortuneModifier(player); + int chance = 1 + (2 * fortune); + if (event.isSilkTouching) + chance += 6; + + if (randy.nextInt(51) <= chance) { + event.drops.add(new ItemStack(ForbiddenItems.deadlyShards, 1, 2)); + } + } + if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.cluster.effectId, equip) > 0 && EnchantmentHelper.getFortuneModifier(player) == 0) { + if (event.drops != null && event.drops.size() > 0) { + int cluster = EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.cluster.effectId, equip); + float chance = 0.2F + (float) cluster * 0.075F; + + for (int a = 0; a < event.drops.size(); ++a) { + ItemStack is = (ItemStack) event.drops.get(a); + ItemStack smr = Utils.findSpecialMiningResult(is, chance, event.world.rand); + if (!is.isItemEqual(smr)) { + event.drops.set(a, smr); + if (!event.world.isRemote) { + event.world.playSoundEffect((double) ((float) event.x + 0.5F), (double) ((float) event.y + 0.5F), (double) ((float) event.z + 0.5F), "random.orb", 0.2F, 0.7F + event.world.rand.nextFloat() * 0.2F); + } + } + } + } + } + if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.consuming.effectId, equip) > 0) { + for (int x = 0; x < event.drops.size(); x++) { + ItemStack drop = (ItemStack) event.drops.get(x); + if (drop != null && (drop.getItem() == Item.getItemFromBlock(Blocks.cobblestone) || drop.getItem() == Item.getItemFromBlock(Blocks.dirt) || drop.getItem() == Item.getItemFromBlock(Blocks.netherrack) || drop.getItem() == Item.getItemFromBlock(Blocks.gravel))) + event.drops.remove(x); + } + } + if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.corrupting.effectId, equip) > 0 && event.block == Block.getBlockFromItem(Config.thaumcraftOre.getItem()) && randy.nextInt(3) == 1) { + ArrayList moarDrops = new ArrayList(); + ArrayList deadDrops = new ArrayList(); + Iterator current = event.drops.iterator(); + while (current.hasNext()) { + ItemStack curDrop = (ItemStack) current.next(); + if (curDrop != null && curDrop.getItem() == Config.thaumcraftShard.getItem()) { + int x = curDrop.stackSize; + for (int i = 0; i < x; i++) { + moarDrops.add(getSinShard()); + } + deadDrops.add(curDrop); + } + } + current = deadDrops.iterator(); + while (current.hasNext()) { + event.drops.remove((ItemStack) (current.next())); + } + current = moarDrops.iterator(); + while (current.hasNext()) { + event.drops.add((ItemStack) (current.next())); + } + } + } + } + + public ItemStack getSinShard() { + int x = randy.nextInt(7); + switch (x) { + case 0: + case 1: + case 3: + case 5: + case 6: + return new ItemStack(ForbiddenItems.deadlyShards, 1, x); + case 2: + return new ItemStack(ForbiddenItems.gluttonyShard, 1, 0); + case 4: + if (Config.noLust) + return getSinShard(); + else + return new ItemStack(ForbiddenItems.deadlyShards, 1, 4); + } + return null; + } + + @SubscribeEvent + public void onBonemeal(BonemealEvent event) { + if (event.block == ForbiddenBlocks.blackFlower) { + ((BlockBlackFlower) ForbiddenBlocks.blackFlower).spreadFlowers(event.world, event.x, event.y, event.z, randy); + event.setResult(Result.ALLOW); + } + } + + @SubscribeEvent + public void onSpawn(LivingSpawnEvent event) { + if (event.entityLiving.worldObj.provider.dimensionId == -1 && event.entityLiving instanceof EntityPigZombie && randy.nextInt(175) == 1) + event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(ForbiddenItems.deadlyShards, 1, 1)); + } + + @SubscribeEvent + public void onGetHurt(LivingHurtEvent event) { + if (event.entityLiving instanceof EntityPlayer && ((EntityPlayer) event.entityLiving).getCurrentEquippedItem() != null && ((EntityPlayer) event.entityLiving).getCurrentEquippedItem().getItem() instanceof ItemWandCasting) { + + ItemStack wand = ((EntityPlayer) event.entityLiving).getCurrentEquippedItem(); + if (event.source.getDamageType().equals("taint") && ((ItemWandCasting) wand.getItem()).getRod(wand).getTag().equals("tainted")) { + + for (int x = 0; x < 3; x++) { + ((ItemWandCasting) wand.getItem()).addVis(wand, primals[randy.nextInt(6)], 1, true); + } + + } + + if ((event.source.getDamageType().equals("wither") || event.source.isFireDamage()) && ((ItemWandCasting) wand.getItem()).getRod(wand).getTag().equals("infernal")) { + + event.setCanceled(true); + } + } + + if (event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) { + ItemStack equip = ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem(); + if (equip != null && equip.getItem() instanceof ItemWandCasting) { + if (((ItemWandCasting) equip.getItem()).getCap(equip).getTag().equals("alchemical") && ((ItemWandCasting) equip.getItem()).getRod(equip).getTag().startsWith("blood")) { + event.entityLiving.addPotionEffect(new PotionEffect(Potion.weakness.id, 60, 2)); + } + } + } + } + + @SubscribeEvent + public void onTooltip(ItemTooltipEvent event) { + if (event.itemStack.getItem() instanceof ItemWandCasting) { + if (((ItemWandCasting) event.itemStack.getItem()).getRod(event.itemStack).getTag().startsWith("blood") && !event.itemStack.stackTagCompound.getString("ownerName").equals("")) { + event.toolTip.add("Current owner: " + event.itemStack.stackTagCompound.getString("ownerName")); + } else if (((ItemWandCasting) event.itemStack.getItem()).getRod(event.itemStack).getTag().startsWith("neutronium")) { + event.toolTip.add("Creative Only"); + } + } + } + +} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/FauxResearchItem.java b/src/main/java/com/spiteful/forbidden/FauxResearchItem.java similarity index 51% rename from src/com/spiteful/forbidden/FauxResearchItem.java rename to src/main/java/com/spiteful/forbidden/FauxResearchItem.java index d54d28e..55dfb26 100644 --- a/src/com/spiteful/forbidden/FauxResearchItem.java +++ b/src/main/java/com/spiteful/forbidden/FauxResearchItem.java @@ -2,44 +2,40 @@ package com.spiteful.forbidden; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; -import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; -import thaumcraft.api.research.*; +import thaumcraft.api.research.ResearchCategories; +import thaumcraft.api.research.ResearchCategoryList; +import thaumcraft.api.research.ResearchItem; +import thaumcraft.api.research.ResearchPage; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class FauxResearchItem extends ResearchItem -{ +public class FauxResearchItem extends ResearchItem { public ResearchItem original; - public FauxResearchItem(String name, String cat, String origin, String originCategory, int x, int y, ResourceLocation icon) - { + public FauxResearchItem(String name, String cat, String origin, String originCategory, int x, int y, ResourceLocation icon) { super(name, cat, new AspectList(), x, y, 1, icon); - original = ((ResearchCategoryList)ResearchCategories.researchCategories.get(originCategory)).research.get(origin); + original = ((ResearchCategoryList) ResearchCategories.researchCategories.get(originCategory)).research.get(origin); bindToOriginal(); setStub(); setHidden(); } - - public FauxResearchItem(String name, String cat, String origin, String originCategory, int x, int y, ItemStack icon) - { + + public FauxResearchItem(String name, String cat, String origin, String originCategory, int x, int y, ItemStack icon) { super(name, cat, new AspectList(), x, y, 1, icon); - original = ((ResearchCategoryList)ResearchCategories.researchCategories.get(originCategory)).research.get(origin); + original = ((ResearchCategoryList) ResearchCategories.researchCategories.get(originCategory)).research.get(origin); bindToOriginal(); setStub(); setHidden(); } - - private void bindToOriginal() - { - if(original.siblings == null) - original.setSiblings(new String[]{key}); - else - { + + private void bindToOriginal() { + if (original.siblings == null) + original.setSiblings(new String[] { key }); + else { String[] family = original.siblings; String[] newFamily = new String[family.length + 1]; - for(int x = 0;x < family.length;x++){ + for (int x = 0; x < family.length; x++) { newFamily[x] = family[x]; } newFamily[family.length] = key; @@ -47,35 +43,29 @@ public class FauxResearchItem extends ResearchItem } } - public ResearchPage[] getPages() - { + public ResearchPage[] getPages() { return original.getPages(); } @SideOnly(Side.CLIENT) - public String getName() - { + public String getName() { return original.getName(); } @SideOnly(Side.CLIENT) - public String getText() - { + public String getText() { return original.getText(); } - public boolean isStub() - { + public boolean isStub() { return true; } - public boolean isHidden() - { + public boolean isHidden() { return true; } - public int getComplexity() - { + public int getComplexity() { return 1; } diff --git a/src/com/spiteful/forbidden/Forbidden.java b/src/main/java/com/spiteful/forbidden/Forbidden.java similarity index 54% rename from src/com/spiteful/forbidden/Forbidden.java rename to src/main/java/com/spiteful/forbidden/Forbidden.java index 92e0453..325b7e3 100644 --- a/src/com/spiteful/forbidden/Forbidden.java +++ b/src/main/java/com/spiteful/forbidden/Forbidden.java @@ -1,64 +1,37 @@ package com.spiteful.forbidden; -import com.spiteful.forbidden.items.ForbiddenItems; -import com.spiteful.forbidden.blocks.ForbiddenBlocks; -import com.spiteful.forbidden.enchantments.DarkEnchantments; -import com.spiteful.forbidden.client.ClientProxy; - +import net.minecraft.init.Blocks; import net.minecraftforge.common.MinecraftForge; -import net.minecraft.block.Block; -import cpw.mods.fml.common.FMLLog; +import thaumcraft.api.wands.WandTriggerRegistry; + +import com.spiteful.forbidden.blocks.ForbiddenBlocks; +import com.spiteful.forbidden.compat.Compat; +import com.spiteful.forbidden.enchantments.DarkEnchantments; +import com.spiteful.forbidden.items.ForbiddenItems; + import cpw.mods.fml.common.Mod; -import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.Mod.EventHandler; -import cpw.mods.fml.common.Mod.ServerStarting; import cpw.mods.fml.common.Mod.Instance; -import cpw.mods.fml.common.Mod.PostInit; -import cpw.mods.fml.common.Mod.PreInit; +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.FMLInterModComms.IMCMessage; -import cpw.mods.fml.common.event.FMLServerStartingEvent; -import cpw.mods.fml.common.network.NetworkMod; -import cpw.mods.fml.common.network.NetworkRegistry; -import cpw.mods.fml.common.registry.GameRegistry; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.wands.WandTriggerRegistry; -import java.util.logging.Level; -@Mod( - modid = "ForbiddenMagic", - name = "Forbidden Magic", - version = "0.35a", - dependencies = "required-after:Thaumcraft;after:ThaumicTinkerer" -) -@NetworkMod( - clientSideRequired = true, - serverSideRequired = false - //channels = {"forbiddenmagic"}, - //packetHandler = PacketHandler.class -) -public class Forbidden -{ +@Mod(modid = "ForbiddenMagic", name = "Forbidden Magic", dependencies = "required-after:Thaumcraft;after:ThaumicTinkerer;after:AWWayofTime") +public class Forbidden { @Instance("ForbiddenMagic") public static Forbidden instance; public static ForbiddenTab tab = new ForbiddenTab("forbidden"); public static ForbiddenTab crysTab; - @SidedProxy( - clientSide = "com.spiteful.forbidden.client.ClientProxy", - serverSide = "com.spiteful.forbidden.CommonProxy" - ) + @SidedProxy(clientSide = "com.spiteful.forbidden.client.ClientProxy", serverSide = "com.spiteful.forbidden.CommonProxy") public static CommonProxy proxy; public static WandOverlord wandLord; @EventHandler - public void prelude(FMLPreInitializationEvent event) - { + public void prelude(FMLPreInitializationEvent event) { instance = this; Config.configurate(event.getSuggestedConfigurationFile()); - if(Config.wrathCage) + if (Config.wrathCage) crysTab = new ForbiddenTab("mobcrystal", true); Compat.initiate(); DarkAspects.initAspects(); @@ -70,21 +43,19 @@ public class Forbidden } @EventHandler - public void crescendo(FMLInitializationEvent event) - { + public void crescendo(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new FMEventHandler()); } @EventHandler - public void outro(FMLPostInitializationEvent event) - { + public void outro(FMLPostInitializationEvent event) { DarkAspects.addAspects(); ForbiddenRecipes.addRecipes(); ForbiddenResearch.addResearch(); Compat.compatify(); - + wandLord = new WandOverlord(); - WandTriggerRegistry.registerWandBlockTrigger(wandLord, 1, Block.obsidian.blockID, -1); - WandTriggerRegistry.registerWandBlockTrigger(wandLord, 1, Block.netherrack.blockID, -1); + WandTriggerRegistry.registerWandBlockTrigger(wandLord, 1, Blocks.obsidian, 0); + WandTriggerRegistry.registerWandBlockTrigger(wandLord, 1, Blocks.netherrack, 0); } } \ No newline at end of file diff --git a/src/com/spiteful/forbidden/ForbiddenRecipes.java b/src/main/java/com/spiteful/forbidden/ForbiddenRecipes.java similarity index 56% rename from src/com/spiteful/forbidden/ForbiddenRecipes.java rename to src/main/java/com/spiteful/forbidden/ForbiddenRecipes.java index 74b335c..512793b 100644 --- a/src/com/spiteful/forbidden/ForbiddenRecipes.java +++ b/src/main/java/com/spiteful/forbidden/ForbiddenRecipes.java @@ -1,79 +1,64 @@ package com.spiteful.forbidden; -import com.spiteful.forbidden.items.ForbiddenItems; -import com.spiteful.forbidden.blocks.ForbiddenBlocks; -import com.spiteful.forbidden.enchantments.DarkEnchantments; - -import cpw.mods.fml.common.registry.GameRegistry; -import java.util.Arrays; import java.util.Iterator; -import net.minecraft.block.Block; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.item.Item; + +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.nbt.NBTTagByte; -import net.minecraftforge.oredict.ShapedOreRecipe; -import net.minecraftforge.oredict.ShapelessOreRecipe; -import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.ItemApi; +import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; -import thaumcraft.api.aspects.IEssentiaContainerItem; import thaumcraft.api.wands.WandCap; -import thaumcraft.api.wands.WandRod; -import thaumcraft.api.wands.WandTriggerRegistry; -import thaumcraft.api.crafting.InfusionRecipe; -import thaumcraft.common.items.wands.ItemWandCasting; -public class ForbiddenRecipes -{ - public static void addRecipes() - { - ForbiddenResearch.recipes.put("TaintShovel", ThaumcraftApi.addInfusionCraftingRecipe("TAINTSHOVEL", new ItemStack(ForbiddenItems.taintShovel), 5, (new AspectList()).add(Aspect.HEAL, 8).add(Aspect.CRYSTAL, 24).add(Aspect.MINE, 12), ItemApi.getItem("itemShovelThaumium", 0), new ItemStack[]{ItemApi.getItem("itemShard", 4), ItemApi.getItem("itemShard", 4), new ItemStack(Item.diamond), ItemApi.getBlock("blockMagicalLog", 1)})); - ForbiddenResearch.recipes.put("TaintPick", ThaumcraftApi.addInfusionCraftingRecipe("TAINTPICK", new ItemStack(ForbiddenItems.taintPickaxe), 1, (new AspectList()).add(Aspect.ENTROPY, 8).add(Aspect.MINE, 8).add(Aspect.TAINT, 12), ItemApi.getItem("itemPickThaumium", 0), new ItemStack[]{ItemApi.getItem("itemShard", 5), ItemApi.getItem("itemShard", 5), new ItemStack(Item.diamond), ItemApi.getBlock("blockMagicalLog", 0)})); - ForbiddenResearch.recipes.put("WandRodTainted", ThaumcraftApi.addInfusionCraftingRecipe("ROD_tainted", new ItemStack(ForbiddenItems.wandCore, 1, 0), 5, (new AspectList()).add(Aspect.TAINT, 24).add(Aspect.MAGIC, 12).add(Aspect.ENTROPY, 12), ItemApi.getItem("itemResource", 12), new ItemStack[]{ItemApi.getItem("itemResource", 14), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2)})); - - ForbiddenResearch.recipes.put("SkullAxe", ThaumcraftApi.addInfusionCraftingRecipe("SKULLAXE", new ItemStack(ForbiddenItems.skullAxe), 1, (new AspectList()).add(DarkAspects.WRATH, 8).add(Aspect.WEAPON, 8).add(DarkAspects.NETHER, 8), ItemApi.getItem("itemAxeThaumium", 0), new ItemStack[] {new ItemStack(ForbiddenItems.deadlyShards.itemID, 1, 0), new ItemStack(ForbiddenItems.deadlyShards.itemID, 1, 0), new ItemStack(Item.diamond), new ItemStack(Item.skull.itemID, 1, 1)})); - ForbiddenResearch.recipes.put("ArcaneCake", ThaumcraftApi.addInfusionCraftingRecipe("ARCANECAKE", new ItemStack(ForbiddenItems.arcaneCakeItem), 3, (new AspectList()).add(DarkAspects.GLUTTONY, 12).add(Aspect.HUNGER, 24).add(Aspect.CRAFT, 24), new ItemStack(Item.cake), new ItemStack[] {ItemApi.getItem("itemResource", 14), new ItemStack(Item.egg), new ItemStack(Item.bucketMilk), new ItemStack(Item.egg), new ItemStack(Item.sugar), new ItemStack(Item.sugar)})); - ForbiddenResearch.recipes.put("MorphPick", ThaumcraftApi.addInfusionCraftingRecipe("MORPHTOOLS", new ItemStack(ForbiddenItems.morphPickaxe), 6, (new AspectList()).add(Aspect.EXCHANGE, 32).add(DarkAspects.ENVY, 16).add(Aspect.TOOL, 16), ItemApi.getItem("itemPickThaumium", 0), new ItemStack[]{new ItemStack(ForbiddenItems.deadlyShards.itemID, 1, 1), new ItemStack(ForbiddenItems.deadlyShards.itemID, 1, 1), new ItemStack(Item.diamond), ItemApi.getItem("itemResource", 3), ItemApi.getBlock("blockMagicalLog", 1)})); - ForbiddenResearch.recipes.put("MorphSword", ThaumcraftApi.addInfusionCraftingRecipe("MORPHTOOLS", new ItemStack(ForbiddenItems.morphSword), 6, (new AspectList()).add(Aspect.EXCHANGE, 32).add(DarkAspects.ENVY, 16).add(Aspect.WEAPON, 16), ItemApi.getItem("itemSwordThaumium", 0), new ItemStack[]{new ItemStack(ForbiddenItems.deadlyShards.itemID, 1, 1), new ItemStack(ForbiddenItems.deadlyShards.itemID, 1, 1), new ItemStack(Item.diamond), ItemApi.getItem("itemResource", 3), ItemApi.getBlock("blockMagicalLog", 1)})); - ForbiddenResearch.recipes.put("MorphShovel", ThaumcraftApi.addInfusionCraftingRecipe("MORPHTOOLS", new ItemStack(ForbiddenItems.morphShovel), 6, (new AspectList()).add(Aspect.EXCHANGE, 32).add(DarkAspects.ENVY, 16).add(Aspect.TOOL, 16), ItemApi.getItem("itemShovelThaumium", 0), new ItemStack[]{new ItemStack(ForbiddenItems.deadlyShards.itemID, 1, 1), new ItemStack(ForbiddenItems.deadlyShards.itemID, 1, 1), new ItemStack(Item.diamond), ItemApi.getItem("itemResource", 3), ItemApi.getBlock("blockMagicalLog", 1)})); - ForbiddenResearch.recipes.put("MorphAxe", ThaumcraftApi.addInfusionCraftingRecipe("MORPHTOOLS", new ItemStack(ForbiddenItems.morphAxe), 6, (new AspectList()).add(Aspect.EXCHANGE, 32).add(DarkAspects.ENVY, 16).add(Aspect.TOOL, 16), ItemApi.getItem("itemAxeThaumium", 0), new ItemStack[]{new ItemStack(ForbiddenItems.deadlyShards.itemID, 1, 1), new ItemStack(ForbiddenItems.deadlyShards.itemID, 1, 1), new ItemStack(Item.diamond), ItemApi.getItem("itemResource", 3), ItemApi.getBlock("blockMagicalLog", 1)})); - ForbiddenResearch.recipes.put("WandRodInfernal", ThaumcraftApi.addInfusionCraftingRecipe("ROD_infernal", new ItemStack(ForbiddenItems.wandCore, 1, 1), 5, (new AspectList()).add(DarkAspects.NETHER, 32).add(Aspect.MAGIC, 12).add(DarkAspects.PRIDE, 12), new ItemStack(Item.blazeRod), new ItemStack[]{ItemApi.getItem("itemResource", 14), new ItemStack(ForbiddenItems.deadlyShards, 1, 3), new ItemStack(ForbiddenItems.deadlyShards, 1, 3), new ItemStack(Block.slowSand), new ItemStack(Item.skull.itemID, 1, 1), new ItemStack(Item.netherQuartz), new ItemStack(Item.blazePowder)})); - if(Config.wrathCage){ - ForbiddenResearch.recipes.put("WrathCage", ThaumcraftApi.addInfusionCraftingRecipe("WRATHCAGE", new ItemStack(ForbiddenBlocks.wrathCage, 1, 0), 10, (new AspectList()).add(DarkAspects.WRATH, 32).add(Aspect.MAGIC, 32).add(Aspect.BEAST, 32).add(Aspect.MECHANISM, 16), ItemApi.getBlock("blockCosmeticSolid", 4), new ItemStack[]{new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(Item.diamond, 1, 0), new ItemStack(Item.diamond, 1, 0), new ItemStack(Item.diamond, 1, 0), new ItemStack(Item.diamond, 1, 0), ItemApi.getBlock("blockJar", 0), ItemApi.getBlock("blockJar", 0), ItemApi.getBlock("blockJar", 0)})); - ForbiddenResearch.recipes.put("MobCrystal", ThaumcraftApi.addCrucibleRecipe("WRATHCAGE", new ItemStack(ForbiddenItems.mobCrystal, 1, 0), new ItemStack(Item.diamond, 1), (new AspectList()).merge(Aspect.MIND, 10).merge(Aspect.ENERGY, 10))); +import com.spiteful.forbidden.blocks.ForbiddenBlocks; +import com.spiteful.forbidden.enchantments.DarkEnchantments; +import com.spiteful.forbidden.items.ForbiddenItems; + +public class ForbiddenRecipes { + public static void addRecipes() { + ForbiddenResearch.recipes.put("TaintShovel", ThaumcraftApi.addInfusionCraftingRecipe("TAINTSHOVEL", new ItemStack(ForbiddenItems.taintShovel), 5, (new AspectList()).add(Aspect.HEAL, 8).add(Aspect.CRYSTAL, 24).add(Aspect.MINE, 12), ItemApi.getItem("itemShovelThaumium", 0), new ItemStack[] { ItemApi.getItem("itemShard", 4), ItemApi.getItem("itemShard", 4), new ItemStack(Items.diamond), ItemApi.getBlock("blockMagicalLog", 1) })); + ForbiddenResearch.recipes.put("TaintPick", ThaumcraftApi.addInfusionCraftingRecipe("TAINTPICK", new ItemStack(ForbiddenItems.taintPickaxe), 1, (new AspectList()).add(Aspect.ENTROPY, 8).add(Aspect.MINE, 8).add(Aspect.TAINT, 12), ItemApi.getItem("itemPickThaumium", 0), new ItemStack[] { ItemApi.getItem("itemShard", 5), ItemApi.getItem("itemShard", 5), new ItemStack(Items.diamond), ItemApi.getBlock("blockMagicalLog", 0) })); + ForbiddenResearch.recipes.put("WandRodTainted", ThaumcraftApi.addInfusionCraftingRecipe("ROD_tainted", new ItemStack(ForbiddenItems.wandCore, 1, 0), 5, (new AspectList()).add(Aspect.TAINT, 24).add(Aspect.MAGIC, 12).add(Aspect.ENTROPY, 12), ItemApi.getItem("itemResource", 12), new ItemStack[] { ItemApi.getItem("itemResource", 14), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2) })); + + ForbiddenResearch.recipes.put("SkullAxe", ThaumcraftApi.addInfusionCraftingRecipe("SKULLAXE", new ItemStack(ForbiddenItems.skullAxe), 1, (new AspectList()).add(DarkAspects.WRATH, 8).add(Aspect.WEAPON, 8).add(DarkAspects.NETHER, 8), ItemApi.getItem("itemAxeThaumium", 0), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(Items.diamond), new ItemStack(Items.skull, 1, 1) })); + ForbiddenResearch.recipes.put("ArcaneCake", ThaumcraftApi.addInfusionCraftingRecipe("ARCANECAKE", new ItemStack(ForbiddenItems.arcaneCakeItem), 3, (new AspectList()).add(DarkAspects.GLUTTONY, 12).add(Aspect.HUNGER, 24).add(Aspect.CRAFT, 24), new ItemStack(Items.cake), new ItemStack[] { ItemApi.getItem("itemResource", 14), new ItemStack(Items.egg), new ItemStack(Items.milk_bucket), new ItemStack(Items.egg), new ItemStack(Items.sugar), new ItemStack(Items.sugar) })); + ForbiddenResearch.recipes.put("MorphPick", ThaumcraftApi.addInfusionCraftingRecipe("MORPHTOOLS", new ItemStack(ForbiddenItems.morphPickaxe), 6, (new AspectList()).add(Aspect.EXCHANGE, 32).add(DarkAspects.ENVY, 16).add(Aspect.TOOL, 16), ItemApi.getItem("itemPickThaumium", 0), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(Items.diamond), ItemApi.getItem("itemResource", 3), ItemApi.getBlock("blockMagicalLog", 1) })); + ForbiddenResearch.recipes.put("MorphSword", ThaumcraftApi.addInfusionCraftingRecipe("MORPHTOOLS", new ItemStack(ForbiddenItems.morphSword), 6, (new AspectList()).add(Aspect.EXCHANGE, 32).add(DarkAspects.ENVY, 16).add(Aspect.WEAPON, 16), ItemApi.getItem("itemSwordThaumium", 0), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(Items.diamond), ItemApi.getItem("itemResource", 3), ItemApi.getBlock("blockMagicalLog", 1) })); + ForbiddenResearch.recipes.put("MorphShovel", ThaumcraftApi.addInfusionCraftingRecipe("MORPHTOOLS", new ItemStack(ForbiddenItems.morphShovel), 6, (new AspectList()).add(Aspect.EXCHANGE, 32).add(DarkAspects.ENVY, 16).add(Aspect.TOOL, 16), ItemApi.getItem("itemShovelThaumium", 0), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(Items.diamond), ItemApi.getItem("itemResource", 3), ItemApi.getBlock("blockMagicalLog", 1) })); + ForbiddenResearch.recipes.put("MorphAxe", ThaumcraftApi.addInfusionCraftingRecipe("MORPHTOOLS", new ItemStack(ForbiddenItems.morphAxe), 6, (new AspectList()).add(Aspect.EXCHANGE, 32).add(DarkAspects.ENVY, 16).add(Aspect.TOOL, 16), ItemApi.getItem("itemAxeThaumium", 0), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(Items.diamond), ItemApi.getItem("itemResource", 3), ItemApi.getBlock("blockMagicalLog", 1) })); + ForbiddenResearch.recipes.put("WandRodInfernal", ThaumcraftApi.addInfusionCraftingRecipe("ROD_infernal", new ItemStack(ForbiddenItems.wandCore, 1, 1), 5, (new AspectList()).add(DarkAspects.NETHER, 32).add(Aspect.MAGIC, 12).add(DarkAspects.PRIDE, 12), new ItemStack(Items.blaze_rod), new ItemStack[] { ItemApi.getItem("itemResource", 14), new ItemStack(ForbiddenItems.deadlyShards, 1, 3), new ItemStack(ForbiddenItems.deadlyShards, 1, 3), new ItemStack(Blocks.soul_sand), new ItemStack(Items.skull, 1, 1), new ItemStack(Items.quartz), new ItemStack(Items.blaze_powder) })); + if (Config.wrathCage) { + ForbiddenResearch.recipes.put("WrathCage", ThaumcraftApi.addInfusionCraftingRecipe("WRATHCAGE", new ItemStack(ForbiddenBlocks.wrathCage, 1, 0), 10, (new AspectList()).add(DarkAspects.WRATH, 32).add(Aspect.MAGIC, 32).add(Aspect.BEAST, 32).add(Aspect.MECHANISM, 16), ItemApi.getBlock("blockCosmeticSolid", 4), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(Items.diamond, 1, 0), new ItemStack(Items.diamond, 1, 0), new ItemStack(Items.diamond, 1, 0), new ItemStack(Items.diamond, 1, 0), ItemApi.getBlock("blockJar", 0), ItemApi.getBlock("blockJar", 0), ItemApi.getBlock("blockJar", 0) })); + ForbiddenResearch.recipes.put("MobCrystal", ThaumcraftApi.addCrucibleRecipe("WRATHCAGE", new ItemStack(ForbiddenItems.mobCrystal, 1, 0), new ItemStack(Items.diamond, 1), (new AspectList()).merge(Aspect.MIND, 10).merge(Aspect.ENERGY, 10))); } - - ForbiddenResearch.recipes.put("Fork", ThaumcraftApi.addInfusionCraftingRecipe("FORK", new ItemStack(ForbiddenItems.fork, 1, 0), 1, (new AspectList()).add(DarkAspects.NETHER, 8).add(Aspect.MECHANISM, 8).add(Aspect.ENERGY, 8), ItemApi.getItem("itemSwordThaumium", 0), new ItemStack[]{new ItemStack(Item.netherQuartz), new ItemStack(Item.netherQuartz), new ItemStack(Item.netherQuartz), new ItemStack(Item.redstone)})); - - if(Config.emeraldTrans) - ForbiddenResearch.recipes.put("TransEmerald", ThaumcraftApi.addCrucibleRecipe("TRANSEMERALD", new ItemStack(ForbiddenItems.resource, 4, 0), "nuggetEmerald", (new AspectList()).merge(Aspect.CRYSTAL, 2).merge(Aspect.GREED, 2))); - ForbiddenResearch.recipes.put("BlackFlower", ThaumcraftApi.addCrucibleRecipe("BLACKFLOWER", new ItemStack(ForbiddenBlocks.blackFlower, 1, 0), new ItemStack(Block.plantRed), (new AspectList()).merge(Aspect.DARKNESS, 5).merge(Aspect.LIFE, 5))); - ForbiddenResearch.recipes.put("BlackInk", CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.resource, 2, 1), new Object[]{"#", Character.valueOf('#'), new ItemStack(ForbiddenBlocks.blackFlower, 1, 0)})); - - ForbiddenResearch.recipes.put("Crystalwell", ThaumcraftApi.addShapelessArcaneCraftingRecipe("CRYSTALWELL", new ItemStack(ForbiddenItems.crystalwell, 1, 0), (new AspectList()).add(Aspect.EARTH, 2).add(Aspect.FIRE, 2).add(Aspect.AIR, 2).add(Aspect.WATER, 2).add(Aspect.ORDER, 2).add(Aspect.ENTROPY, 2), new Object[]{ItemApi.getItem("itemInkwell", 32767), "dyeBlack", ItemApi.getItem("itemShard", 32767), ItemApi.getItem("itemShard", 32767)})); - - ForbiddenResearch.recipes.put("Cluster", ThaumcraftApi.addInfusionEnchantmentRecipe("CLUSTER", DarkEnchantments.cluster, 3, (new AspectList()).add(Aspect.FIRE, 4).add(Aspect.METAL, 4).add(Aspect.GREED, 4), new ItemStack[]{ItemApi.getItem("itemPickElemental", 0), ItemApi.getItem("itemResource", 14)})); - if(Config.greedyEnch) - ForbiddenResearch.recipes.put("Greedy", ThaumcraftApi.addInfusionEnchantmentRecipe("GREEDY", DarkEnchantments.greedy, 4, (new AspectList()).add(DarkAspects.NETHER, 16).add(Aspect.WEAPON, 8).add(Aspect.GREED, 16), new ItemStack[]{new ItemStack(Item.swordGold), new ItemStack(Item.diamond), new ItemStack(Block.blockGold), ItemApi.getItem("itemResource", 14)})); - ForbiddenResearch.recipes.put("Consuming", ThaumcraftApi.addInfusionEnchantmentRecipe("CONSUMING", DarkEnchantments.consuming, 3, (new AspectList()).add(Aspect.VOID, 8).add(Aspect.TOOL, 8).add(Aspect.HUNGER, 8), new ItemStack[]{new ItemStack(Item.pickaxeIron), new ItemStack(Item.bucketLava), ItemApi.getItem("itemResource", 14)})); - ForbiddenResearch.recipes.put("Pigbane", ThaumcraftApi.addInfusionEnchantmentRecipe("PIGBANE", DarkEnchantments.pigBane, 1, (new AspectList()).add(Aspect.HUNGER, 4).add(Aspect.WEAPON, 4).add(Aspect.BEAST, 4), new ItemStack[]{new ItemStack(Item.swordIron), new ItemStack(Item.porkRaw), ItemApi.getItem("itemResource", 14)})); - ForbiddenResearch.recipes.put("Educational", ThaumcraftApi.addInfusionEnchantmentRecipe("EDUCATIONAL", DarkEnchantments.educational, 3, (new AspectList()).add(Aspect.MAGIC, 4).add(Aspect.WEAPON, 4).add(Aspect.MIND, 8), new ItemStack[]{ItemApi.getItem("itemResource", 5), new ItemStack(Item.book), ItemApi.getItem("itemResource", 14)})); - ForbiddenResearch.recipes.put("Corrupting", ThaumcraftApi.addInfusionEnchantmentRecipe("CORRUPTING", DarkEnchantments.corrupting, 4, (new AspectList()).add(DarkAspects.NETHER, 16).add(Aspect.EXCHANGE, 16).add(Aspect.CRYSTAL, 8), new ItemStack[]{new ItemStack(Item.netherStalkSeeds), new ItemStack(Block.slowSand), ItemApi.getItem("itemResource", 14)})); - - CraftingManager.getInstance().addRecipe(new ItemStack(Item.emerald, 1, 0), new Object[]{"###", "###", "###", Character.valueOf('#'), new ItemStack(ForbiddenItems.resource, 1, 0)}); - CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.resource, 9, 0), new Object[]{"#", Character.valueOf('#'), new ItemStack(Item.emerald, 1, 0)}); - CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenBlocks.starBlock, 1, 0), new Object[]{"###", "###", "###", Character.valueOf('#'), new ItemStack(Item.netherStar, 1, 0)}); - CraftingManager.getInstance().addRecipe(new ItemStack(Item.netherStar, 9, 0), new Object[]{"#", Character.valueOf('#'), new ItemStack(ForbiddenBlocks.starBlock, 1, 0)}); - ForbiddenResearch.recipes.put("RidingCrop", CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.ridingCrop, 1, 0), new Object[]{"X", "#", "#", Character.valueOf('#'), Item.stick, Character.valueOf('X'), Item.leather})); - ThaumcraftApi.addSmeltingBonus(new ItemStack(Item.emerald), new ItemStack(ForbiddenItems.resource, 0, 0)); - - Iterator i$ = WandCap.caps.keySet().iterator(); + ForbiddenResearch.recipes.put("Fork", ThaumcraftApi.addInfusionCraftingRecipe("FORK", new ItemStack(ForbiddenItems.fork, 1, 0), 1, (new AspectList()).add(DarkAspects.NETHER, 8).add(Aspect.MECHANISM, 8).add(Aspect.ENERGY, 8), ItemApi.getItem("itemSwordThaumium", 0), new ItemStack[] { new ItemStack(Items.quartz), new ItemStack(Items.quartz), new ItemStack(Items.quartz), new ItemStack(Items.redstone) })); + + if (Config.emeraldTrans) + ForbiddenResearch.recipes.put("TransEmerald", ThaumcraftApi.addCrucibleRecipe("TRANSEMERALD", new ItemStack(ForbiddenItems.resource, 4, 0), "nuggetEmerald", (new AspectList()).merge(Aspect.CRYSTAL, 2).merge(Aspect.GREED, 2))); + ForbiddenResearch.recipes.put("BlackFlower", ThaumcraftApi.addCrucibleRecipe("BLACKFLOWER", new ItemStack(ForbiddenBlocks.blackFlower, 1, 0), new ItemStack(Blocks.red_flower), (new AspectList()).merge(Aspect.DARKNESS, 5).merge(Aspect.LIFE, 5))); + ForbiddenResearch.recipes.put("BlackInk", CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.resource, 2, 1), new Object[] { "#", Character.valueOf('#'), new ItemStack(ForbiddenBlocks.blackFlower, 1, 0) })); + + ForbiddenResearch.recipes.put("Crystalwell", ThaumcraftApi.addShapelessArcaneCraftingRecipe("CRYSTALWELL", new ItemStack(ForbiddenItems.crystalwell, 1, 0), (new AspectList()).add(Aspect.EARTH, 2).add(Aspect.FIRE, 2).add(Aspect.AIR, 2).add(Aspect.WATER, 2).add(Aspect.ORDER, 2).add(Aspect.ENTROPY, 2), new Object[] { ItemApi.getItem("itemInkwell", 32767), "dyeBlack", ItemApi.getItem("itemShard", 32767), ItemApi.getItem("itemShard", 32767) })); + + ForbiddenResearch.recipes.put("Cluster", ThaumcraftApi.addInfusionEnchantmentRecipe("CLUSTER", DarkEnchantments.cluster, 3, (new AspectList()).add(Aspect.FIRE, 4).add(Aspect.METAL, 4).add(Aspect.GREED, 4), new ItemStack[] { ItemApi.getItem("itemPickElemental", 0), ItemApi.getItem("itemResource", 14) })); + if (Config.greedyEnch) + ForbiddenResearch.recipes.put("Greedy", ThaumcraftApi.addInfusionEnchantmentRecipe("GREEDY", DarkEnchantments.greedy, 4, (new AspectList()).add(DarkAspects.NETHER, 16).add(Aspect.WEAPON, 8).add(Aspect.GREED, 16), new ItemStack[] { new ItemStack(Items.golden_sword), new ItemStack(Items.diamond), new ItemStack(Blocks.gold_block), ItemApi.getItem("itemResource", 14) })); + ForbiddenResearch.recipes.put("Consuming", ThaumcraftApi.addInfusionEnchantmentRecipe("CONSUMING", DarkEnchantments.consuming, 3, (new AspectList()).add(Aspect.VOID, 8).add(Aspect.TOOL, 8).add(Aspect.HUNGER, 8), new ItemStack[] { new ItemStack(Items.iron_pickaxe), new ItemStack(Items.lava_bucket), ItemApi.getItem("itemResource", 14) })); + ForbiddenResearch.recipes.put("Pigbane", ThaumcraftApi.addInfusionEnchantmentRecipe("PIGBANE", DarkEnchantments.pigBane, 1, (new AspectList()).add(Aspect.HUNGER, 4).add(Aspect.WEAPON, 4).add(Aspect.BEAST, 4), new ItemStack[] { new ItemStack(Items.iron_sword), new ItemStack(Items.porkchop), ItemApi.getItem("itemResource", 14) })); + ForbiddenResearch.recipes.put("Educational", ThaumcraftApi.addInfusionEnchantmentRecipe("EDUCATIONAL", DarkEnchantments.educational, 3, (new AspectList()).add(Aspect.MAGIC, 4).add(Aspect.WEAPON, 4).add(Aspect.MIND, 8), new ItemStack[] { ItemApi.getItem("itemResource", 5), new ItemStack(Items.book), ItemApi.getItem("itemResource", 14) })); + ForbiddenResearch.recipes.put("Corrupting", ThaumcraftApi.addInfusionEnchantmentRecipe("CORRUPTING", DarkEnchantments.corrupting, 4, (new AspectList()).add(DarkAspects.NETHER, 16).add(Aspect.EXCHANGE, 16).add(Aspect.CRYSTAL, 8), new ItemStack[] { new ItemStack(Items.nether_wart), new ItemStack(Blocks.soul_sand), ItemApi.getItem("itemResource", 14) })); + + CraftingManager.getInstance().addRecipe(new ItemStack(Items.emerald, 1, 0), new Object[] { "###", "###", "###", Character.valueOf('#'), new ItemStack(ForbiddenItems.resource, 1, 0) }); + CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.resource, 9, 0), new Object[] { "#", Character.valueOf('#'), new ItemStack(Items.emerald, 1, 0) }); + CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenBlocks.starBlock, 1, 0), new Object[] { "###", "###", "###", Character.valueOf('#'), new ItemStack(Items.nether_star, 1, 0) }); + CraftingManager.getInstance().addRecipe(new ItemStack(Items.nether_star, 9, 0), new Object[] { "#", Character.valueOf('#'), new ItemStack(ForbiddenBlocks.starBlock, 1, 0) }); + ForbiddenResearch.recipes.put("RidingCrop", CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.ridingCrop, 1, 0), new Object[] { "X", "#", "#", Character.valueOf('#'), Items.stick, Character.valueOf('X'), Items.leather })); + ThaumcraftApi.addSmeltingBonus(new ItemStack(Items.emerald), new ItemStack(ForbiddenItems.resource, 0, 0)); + + Iterator i$ = WandCap.caps.keySet().iterator(); //while(i$.hasNext()) { // String captag = (String)i$.next(); // Iterator i$1 = WandRod.rods.keySet().iterator(); @@ -107,6 +92,5 @@ public class ForbiddenRecipes // } // } //} - } } \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/ForbiddenResearch.java b/src/main/java/com/spiteful/forbidden/ForbiddenResearch.java new file mode 100644 index 0000000..fe1ba1f --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/ForbiddenResearch.java @@ -0,0 +1,84 @@ +package com.spiteful.forbidden; + +import java.util.HashMap; + +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.ResourceLocation; +import thaumcraft.api.ItemApi; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; +import thaumcraft.api.crafting.CrucibleRecipe; +import thaumcraft.api.crafting.IArcaneRecipe; +import thaumcraft.api.crafting.InfusionEnchantmentRecipe; +import thaumcraft.api.crafting.InfusionRecipe; +import thaumcraft.api.research.ResearchCategories; +import thaumcraft.api.research.ResearchPage; + +import com.spiteful.forbidden.blocks.ForbiddenBlocks; +import com.spiteful.forbidden.items.ForbiddenItems; + +public class ForbiddenResearch { + public static HashMap recipes = new HashMap(); + + public static void addResearch() { + ResearchCategories.registerCategory("FORBIDDEN", new ResourceLocation("forbidden", "textures/misc/forbidden.png"), new ResourceLocation("forbidden", "textures/misc/runecircle.png")); + + (new FauxResearchItem("INFAUXSION", "FORBIDDEN", "INFUSION", "ARTIFICE", -5, 0, ItemApi.getBlock("blockStoneDevice", 2))).registerResearchItem(); + if (ResearchCategories.researchCategories.containsKey("TT_ENCHANTING") && ResearchCategories.researchCategories.get("TT_ENCHANTING").research.containsKey("INFUSIONENCHANTMENT")) + (new FauxResearchItem("INFAUXSIONENCHANTMENT", "FORBIDDEN", "INFUSIONENCHANTMENT", "TT_ENCHANTING", -3, 3, new ResourceLocation("thaumcraft", "textures/misc/r_enchant.png"))).setParents(new String[] { "INFAUXSION" }).registerResearchItem(); + else + (new FauxResearchItem("INFAUXSIONENCHANTMENT", "FORBIDDEN", "INFUSIONENCHANTMENT", "ARTIFICE", -3, 3, new ResourceLocation("thaumcraft", "textures/misc/r_enchant.png"))).setParents(new String[] { "INFAUXSION" }).registerResearchItem(); + + addInfernalism(); + addTaint(); + + if (Config.emeraldTrans) + (new DarkResearchItem("TRANSEMERALD", "FORBIDDEN", (new AspectList()).add(Aspect.CRYSTAL, 2).add(Aspect.EXCHANGE, 5).add(Aspect.GREED, 4), -6, 4, 3, new ItemStack(ForbiddenItems.resource, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.TRANSEMERALD.1"), new ResearchPage((CrucibleRecipe) recipes.get("TransEmerald")) }).setSecondary().setConcealed().setParents(new String[] { "TRANSGOLD" }).registerResearchItem(); + (new DarkResearchItem("BLACKFLOWER", "FORBIDDEN", (new AspectList()).add(Aspect.PLANT, 3).add(Aspect.SENSES, 2).add(Aspect.DARKNESS, 4), -7, 4, 1, new ItemStack(ForbiddenBlocks.blackFlower, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.BLACKFLOWER.1"), new ResearchPage((CrucibleRecipe) recipes.get("BlackFlower")), new ResearchPage((IRecipe) recipes.get("BlackInk")) }).setAspectTriggers(new Aspect[] { Aspect.SENSES }).registerResearchItem(); + + (new DarkResearchItem("CRYSTALWELL", "FORBIDDEN", (new AspectList()).add(Aspect.MIND, 3).add(Aspect.CRYSTAL, 2).add(Aspect.MAGIC, 1), -9, 4, 1, new ItemStack(ForbiddenItems.crystalwell, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.CRYSTALWELL.1"), new ResearchPage((IArcaneRecipe) recipes.get("Crystalwell")) }).setParents(new String[] { "RESEARCH" }).setAspectTriggers(new Aspect[] { Aspect.MIND }).setConcealed().registerResearchItem(); + + (new DarkResearchItem("CONSUMING", "FORBIDDEN", (new AspectList()).add(Aspect.VOID, 4).add(Aspect.ENTROPY, 3).add(Aspect.MAGIC, 2), -1, 2, 2, new ResourceLocation("forbidden", "textures/misc/consuming.png"))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.CONSUMING.1"), new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Consuming")) }).setParents(new String[] { "INFAUXSIONENCHANTMENT" }).setSecondary().setConcealed().registerResearchItem(); + (new DarkResearchItem("PIGBANE", "FORBIDDEN", (new AspectList()).add(Aspect.HUNGER, 3).add(Aspect.WEAPON, 4).add(Aspect.MAGIC, 2), -1, 3, 1, new ResourceLocation("forbidden", "textures/misc/pigbane.png"))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.PIGBANE.1"), new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Pigbane")) }).setParents(new String[] { "INFAUXSIONENCHANTMENT" }).setSecondary().setConcealed().registerResearchItem(); + (new DarkResearchItem("EDUCATIONAL", "FORBIDDEN", (new AspectList()).add(Aspect.MIND, 5).add(Aspect.WEAPON, 1).add(Aspect.MAGIC, 3), -1, 4, 2, new ResourceLocation("forbidden", "textures/misc/educational.png"))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.EDUCATIONAL.1"), new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Educational")) }).setParents(new String[] { "INFAUXSIONENCHANTMENT" }).setSecondary().setConcealed().registerResearchItem(); + + } + + public static void addInfernalism() { + if (!Config.noLust) + (new DarkResearchItem("NETHERSHARDS", "FORBIDDEN", new AspectList(), -8, -2, 0, new ItemStack(ForbiddenItems.deadlyShards, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.NETHERSHARDS.1"), new ResearchPage("forbidden.research_page.NETHERSHARDS.2"), new ResearchPage("forbidden.research_page.NETHERSHARDS.3") }).setStub().setRound().setAutoUnlock().registerResearchItem(); + else + (new DarkResearchItem("NETHERSHARDS", "FORBIDDEN", new AspectList(), -8, -2, 0, new ItemStack(ForbiddenItems.deadlyShards, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.NETHERSHARDS.1"), new ResearchPage("forbidden.research_page.NETHERSHARDS.2b"), new ResearchPage("forbidden.research_page.NETHERSHARDS.3") }).setStub().setRound().setAutoUnlock().registerResearchItem(); + + (new DarkResearchItem("RIDINGCROP", "FORBIDDEN", new AspectList(), -8, -1, 0, new ItemStack(ForbiddenItems.ridingCrop))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.RIDINGCROP.1"), new ResearchPage((IRecipe) recipes.get("RidingCrop")) }).setStub().setRound().setAutoUnlock().registerResearchItem(); + (new DarkResearchItem("HELLFIRE", "FORBIDDEN", (new AspectList()).add(Aspect.FIRE, 3).add(DarkAspects.NETHER, 4).add(Aspect.TRAVEL, 2), -5, 2, 1, new ItemStack(Blocks.fire))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.HELLFIRE.1") }).setRound().registerResearchItem(); + + (new DarkResearchItem("SKULLAXE", "FORBIDDEN", (new AspectList()).add(Aspect.WEAPON, 3).add(DarkAspects.WRATH, 4).add(DarkAspects.NETHER, 1), -8, 1, 2, new ItemStack(ForbiddenItems.skullAxe))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.SKULLAXE.1"), new ResearchPage((InfusionRecipe) recipes.get("SkullAxe")) }).setParents(new String[] { "THAUMIUM", "INFAUXSION" }).setConcealed().registerResearchItem(); + (new DarkResearchItem("ARCANECAKE", "FORBIDDEN", (new AspectList()).add(DarkAspects.GLUTTONY, 4).add(Aspect.HUNGER, 3).add(Aspect.CRAFT, 2), -8, 2, 3, new ItemStack(ForbiddenItems.arcaneCakeItem))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.ARCANECAKE.1"), new ResearchPage((InfusionRecipe) recipes.get("ArcaneCake")) }).setParents(new String[] { "INFAUXSION" }).setAspectTriggers(new Aspect[] { DarkAspects.GLUTTONY }).registerResearchItem(); + (new DarkResearchItem("MORPHTOOLS", "FORBIDDEN", (new AspectList()).add(Aspect.TOOL, 2).add(DarkAspects.ENVY, 3).add(Aspect.EXCHANGE, 2), -5, 5, 4, new ItemStack(ForbiddenItems.morphPickaxe))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.MORPHTOOLS.1"), new ResearchPage((InfusionRecipe) recipes.get("MorphPick")), new ResearchPage((InfusionRecipe) recipes.get("MorphSword")), new ResearchPage((InfusionRecipe) recipes.get("MorphShovel")), new ResearchPage((InfusionRecipe) recipes.get("MorphAxe")) }).setParentsHidden(new String[] { "THAUMIUM", "INFUSIONENCHANTMENT" }).setParents(new String[] { "INFAUXSIONENCHANTMENT" }).setConcealed().registerResearchItem(); + (new DarkResearchItem("ROD_infernal", "FORBIDDEN", (new AspectList()).add(DarkAspects.NETHER, 4).add(Aspect.FIRE, 3).add(Aspect.TOOL, 1), -6, -3, 4, new ItemStack(ForbiddenItems.wandCore, 1, 1))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.ROD_infernal.1"), new ResearchPage((InfusionRecipe) recipes.get("WandRodInfernal")), new ResearchPage("forbidden.research_page.ROD_infernal.2") }).setParents(new String[] { "ROD_silverwood", "INFAUXSION" }).setConcealed().registerResearchItem(); + (new DarkResearchItem("CLUSTER", "FORBIDDEN", (new AspectList()).add(Aspect.METAL, 1).add(Aspect.FIRE, 4).add(DarkAspects.ENVY, 3), -7, 7, 3, new ResourceLocation("forbidden", "textures/misc/lucrative.png"))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.CLUSTER.1"), new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Cluster")) }).setParents(new String[] { "MORPHTOOLS", "ELEMENTALPICK" }).setSecondary().setConcealed().registerResearchItem(); + if (Config.greedyEnch) + (new DarkResearchItem("GREEDY", "FORBIDDEN", (new AspectList()).add(Aspect.MAGIC, 2).add(Aspect.WEAPON, 1).add(Aspect.GREED, 3), -1, 5, 4, new ResourceLocation("forbidden", "textures/misc/greedy.png"))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.GREEDY.1"), new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Greedy")) }).setParents(new String[] { "INFAUXSIONENCHANTMENT" }).setConcealed().registerResearchItem(); + (new DarkResearchItem("CORRUPTING", "FORBIDDEN", (new AspectList()).add(DarkAspects.NETHER, 5).add(Aspect.CRYSTAL, 2).add(Aspect.EXCHANGE, 1), -1, 6, 3, new ResourceLocation("forbidden", "textures/misc/corrupting.png"))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.CORRUPTING.1"), new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Corrupting")) }).setParents(new String[] { "INFAUXSIONENCHANTMENT" }).setConcealed().registerResearchItem(); + + if (Config.wrathCage) { + if (Config.wrathCost > 0) + (new DarkResearchItem("WRATHCAGE", "FORBIDDEN", (new AspectList()).add(DarkAspects.WRATH, 5).add(Aspect.MECHANISM, 3).add(Aspect.BEAST, 2), -2, 0, 6, new ItemStack(ForbiddenBlocks.wrathCage))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.WRATHCAGE.1"), new ResearchPage((InfusionRecipe) recipes.get("WrathCage")), new ResearchPage("forbidden.research_page.WRATHCAGE.2"), new ResearchPage("forbidden.research_page.WRATHCAGE.3"), new ResearchPage((CrucibleRecipe) recipes.get("MobCrystal")) }).setParents(new String[] { "INFAUXSION" }).setParentsHidden(new String[] { "THAUMIUM", "DISTILESSENTIA" }).setConcealed().setSiblings(new String[] { "FORK" }).registerResearchItem(); + else + (new DarkResearchItem("WRATHCAGE", "FORBIDDEN", (new AspectList()).add(DarkAspects.WRATH, 5).add(Aspect.MECHANISM, 3).add(Aspect.BEAST, 2), -2, 0, 6, new ItemStack(ForbiddenBlocks.wrathCage))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.WRATHCAGE.1"), new ResearchPage((InfusionRecipe) recipes.get("WrathCage")), new ResearchPage("forbidden.research_page.WRATHCAGE.3"), new ResearchPage((CrucibleRecipe) recipes.get("MobCrystal")) }).setParents(new String[] { "INFAUXSION" }).setParentsHidden(new String[] { "THAUMIUM", "DISTILESSENTIA" }).setConcealed().setSiblings(new String[] { "FORK" }).registerResearchItem(); + + } + + (new DarkResearchItem("FORK", "FORBIDDEN", (new AspectList()), 0, 0, 0, new ItemStack(ForbiddenItems.fork))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.FORK.1"), new ResearchPage((InfusionRecipe) recipes.get("Fork")), new ResearchPage("WRATHCAGE", "forbidden.research_page.FORK.wc") }).setStub().setHidden().registerResearchItem(); + + } + + public static void addTaint() { + (new DarkResearchItem("TAINTSHOVEL", "FORBIDDEN", (new AspectList()).add(Aspect.CRYSTAL, 3).add(Aspect.TAINT, 2).add(Aspect.TOOL, 1), -7, 0, 3, new ItemStack(ForbiddenItems.taintShovel))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.TAINTSHOVEL.1"), new ResearchPage((InfusionRecipe) recipes.get("TaintShovel")), new ResearchPage("forbidden.research_page.TAINTSHOVEL.2") }).setParents(new String[] { "THAUMIUM", "INFAUXSION", "ETHEREALBLOOM" }).setConcealed().registerResearchItem(); + (new DarkResearchItem("TAINTPICK", "FORBIDDEN", (new AspectList()).add(Aspect.TOOL, 2).add(Aspect.TAINT, 4).add(Aspect.ENTROPY, 3), -8, 0, 2, new ItemStack(ForbiddenItems.taintPickaxe))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.TAINTPICK.1"), new ResearchPage((InfusionRecipe) recipes.get("TaintPick")) }).setParents(new String[] { "THAUMIUM", "INFAUXSION" }).setConcealed().registerResearchItem(); + (new DarkResearchItem("ROD_tainted", "FORBIDDEN", (new AspectList()).add(Aspect.MAGIC, 4).add(Aspect.TAINT, 5).add(Aspect.TOOL, 2), -7, -3, 4, new ItemStack(ForbiddenItems.wandCore, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.ROD_tainted.1"), new ResearchPage((InfusionRecipe) recipes.get("WandRodTainted")) }).setParents(new String[] { "ROD_silverwood", "TAINTSHOVEL", "INFAUXSION" }).setConcealed().registerResearchItem(); + } +} \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/ForbiddenTab.java b/src/main/java/com/spiteful/forbidden/ForbiddenTab.java new file mode 100644 index 0000000..67d33a4 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/ForbiddenTab.java @@ -0,0 +1,27 @@ +package com.spiteful.forbidden; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; + +import com.spiteful.forbidden.items.ForbiddenItems; + +public final class ForbiddenTab extends CreativeTabs { + private boolean crystal = false; + + public ForbiddenTab(String tabName) { + super(tabName); + } + + public ForbiddenTab(String tabName, boolean mobCrystal) { + super(tabName); + crystal = mobCrystal; + } + + @Override + public Item getTabIconItem() { + if (!crystal) + return ForbiddenItems.fork; + else + return ForbiddenItems.mobCrystal; + } +} diff --git a/src/main/java/com/spiteful/forbidden/LogHandler.java b/src/main/java/com/spiteful/forbidden/LogHandler.java new file mode 100644 index 0000000..9ea0648 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/LogHandler.java @@ -0,0 +1,18 @@ +package com.spiteful.forbidden; + +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +public class LogHandler { + public static final Logger logger = LogManager.getLogger("Forbidden Magic"); + + public static void log(Level level, Throwable e, String message) { + log(level, message); + e.printStackTrace(); + } + + public static void log(Level level, String message) { + logger.log(level, message); + } +} diff --git a/src/main/java/com/spiteful/forbidden/WandOverlord.java b/src/main/java/com/spiteful/forbidden/WandOverlord.java new file mode 100644 index 0000000..bf60169 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/WandOverlord.java @@ -0,0 +1,33 @@ +package com.spiteful.forbidden; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.wands.IWandTriggerManager; +import thaumcraft.common.items.wands.ItemWandCasting; +import thaumcraft.common.lib.research.ResearchManager; + +public class WandOverlord implements IWandTriggerManager { + @Override + public boolean performTrigger(World world, ItemStack wand, EntityPlayer player, int x, int y, int z, int side, int event) { + if (event == 1 && side == 1) + return hellfire(world, wand, player, x, y, z, side); + return false; + } + + public boolean hellfire(World world, ItemStack wand, EntityPlayer player, int x, int y, int z, int side) { + if (world.isRemote || wand == null || !(wand.getItem() instanceof ItemWandCasting) || ((ItemWandCasting) wand.getItem()).getFocus(wand) != null || !ResearchManager.isResearchComplete(player.getCommandSenderName(), "HELLFIRE") || !player.canPlayerEdit(x, y, z, side, new ItemStack(Items.fire_charge))) + return false; + + if (world.isAirBlock(x, y + 1, z) && ((ItemWandCasting) wand.getItem()).consumeVis(wand, player, Aspect.FIRE, 2, false)) { + world.playSoundEffect((double) x + 0.5D, (double) y + 1.5D, (double) z + 0.5D, "fire.ignite", 1.0F, world.rand.nextFloat() * 0.4F + 0.8F); + world.setBlock(x, y + 1, z, Blocks.fire); + player.swingItem(); + return true; + } else + return false; + } +} \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/XPReflectionHelper.java b/src/main/java/com/spiteful/forbidden/XPReflectionHelper.java new file mode 100644 index 0000000..1b8b8bf --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/XPReflectionHelper.java @@ -0,0 +1,40 @@ +package com.spiteful.forbidden; + +import java.lang.reflect.Field; + +import net.minecraft.entity.EntityLiving; + +public class XPReflectionHelper { + private static Field getField(Class clazz, String field) throws NoSuchFieldException { + try { + return clazz.getDeclaredField(field); + } catch (NoSuchFieldException e) { + Class superClass = clazz.getSuperclass(); + if (superClass == null) { + throw e; + } else { + return getField(superClass, field); + } + } + } + + public static int getXP(EntityLiving entityLiving) { + try { + Field f = getField(entityLiving.getClass(), "experienceValue"); + f.setAccessible(true); + return (Integer) f.get(entityLiving); + } catch (NoSuchFieldException e) { + try { + Field f = getField(entityLiving.getClass(), "field_70728_aV"); + f.setAccessible(true); + return (Integer) f.get(entityLiving); + } catch (Exception e2) { + return 0; + } + } catch (Exception e) { + e.printStackTrace(); + } + + return 0; + } +} diff --git a/src/main/java/com/spiteful/forbidden/blocks/BlockArcaneCake.java b/src/main/java/com/spiteful/forbidden/blocks/BlockArcaneCake.java new file mode 100644 index 0000000..68bfd35 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/blocks/BlockArcaneCake.java @@ -0,0 +1,162 @@ +package com.spiteful.forbidden.blocks; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.IIcon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockArcaneCake extends Block { + @SideOnly(Side.CLIENT) + private IIcon cakeTopIcon; + @SideOnly(Side.CLIENT) + private IIcon cakeBottomIcon; + @SideOnly(Side.CLIENT) + private IIcon cakeInsideIcon; + + protected BlockArcaneCake() { + super(Material.cake); + this.setTickRandomly(true); + } + + @Override + public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) { + int l = world.getBlockMetadata(x, y, z); + float f = 0.0625F; + float f1 = (float) (1 + l) / 12.0F; + this.setBlockBounds(f1, 0.0F, f, 1.0F - f, 0.5F, 1.0F - f); + } + + @Override + public void setBlockBoundsForItemRender() { + float f = 0.0625F; + float f1 = 0.5F; + this.setBlockBounds(f, 0.0F, f, 1.0F - f, f1, 1.0F - f); + } + + @Override + public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) { + int l = world.getBlockMetadata(x, y, z); + float f = 0.0625F; + float f1 = (float) (1 + l) / 12.0F; + float f2 = 0.5F; + return AxisAlignedBB.getAABBPool().getAABB((double) ((float) x + f1), (double) y, (double) ((float) z + f), (double) ((float) (x + 1) - f), (double) ((float) y + f2 - f), (double) ((float) (z + 1) - f)); + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @SideOnly(Side.CLIENT) + @Override + public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) { + int l = world.getBlockMetadata(x, y, z); + float f = 0.0625F; + float f1 = (float) (1 + l) / 12.0F; + float f2 = 0.5F; + return AxisAlignedBB.getAABBPool().getAABB((double) ((float) x + f1), (double) y, (double) ((float) z + f), (double) ((float) (x + 1) - f), (double) ((float) y + f2), (double) ((float) (z + 1) - f)); + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIcon(int par1, int x) { + return par1 == 1 ? this.cakeTopIcon : (par1 == 0 ? this.cakeBottomIcon : (x > 0 && par1 == 4 ? this.cakeInsideIcon : this.blockIcon)); + } + + @SideOnly(Side.CLIENT) + @Override + public void registerBlockIcons(IIconRegister ir) { + this.blockIcon = ir.registerIcon("forbidden:cake_side"); + this.cakeInsideIcon = ir.registerIcon("forbidden:cake_inner"); + this.cakeTopIcon = ir.registerIcon("forbidden:cake_top"); + this.cakeBottomIcon = ir.registerIcon("forbidden:cake_bottom"); + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { + this.eatCakeSlice(world, x, y, z, player); + return true; + } + + @Override + public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player) { + this.eatCakeSlice(world, x, y, z, player); + } + + private void eatCakeSlice(World world, int x, int y, int z, EntityPlayer player) { + if (player.canEat(false)) { + player.getFoodStats().addStats(2, 1.0F); + int l = world.getBlockMetadata(x, y, z) + 1; + + if (l >= 12) { + world.setBlockToAir(x, y, z); + } else { + world.setBlockMetadataWithNotify(x, y, z, l, 2); + } + + } + } + + @Override + public void updateTick(World world, int x, int y, int z, Random par5Random) { + super.updateTick(world, x, y, z, par5Random); + int l = world.getBlockMetadata(x, y, z); + + if (l > 0) { + // if (par5Random.nextInt((int)(25.0F / f) + 1) == 0) + // { + --l; + world.setBlockMetadataWithNotify(x, y, z, l, 2); + // } + } + } + + @Override + public boolean canPlaceBlockAt(World world, int x, int y, int z) { + return !super.canPlaceBlockAt(world, x, y, z) ? false : this.canBlockStay(world, x, y, z); + } + + @Override + public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { + if (!this.canBlockStay(world, x, y, z)) { + world.setBlockToAir(x, y, z); + } + } + + @Override + public boolean canBlockStay(World world, int x, int y, int z) { + return world.getBlock(x, y - 1, z).getMaterial().isSolid(); + } + + @Override + public int quantityDropped(Random par1Random) { + return 0; + } + + @Override + public Item getItem(World world, int x, int y, int z) { + return null; + } + + @SideOnly(Side.CLIENT) + @Override + public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) { + return new ItemStack(this); + } +} diff --git a/src/main/java/com/spiteful/forbidden/blocks/BlockBlackFlower.java b/src/main/java/com/spiteful/forbidden/blocks/BlockBlackFlower.java new file mode 100644 index 0000000..927a2ec --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/blocks/BlockBlackFlower.java @@ -0,0 +1,105 @@ +package com.spiteful.forbidden.blocks; + +import java.util.List; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFlower; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +import com.spiteful.forbidden.Forbidden; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockBlackFlower extends BlockFlower { + protected BlockBlackFlower() { + super(1); + float f = 0.2F; + this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 2.0F, 0.5F + f); + this.setTickRandomly(true); + this.setCreativeTab(Forbidden.tab); + } + + @Override + public void updateTick(World world, int x, int y, int z, Random rand) { + if (!world.isRemote && rand.nextInt(25) == 1) + spreadFlowers(world, x, y, z, rand); + } + + public void spreadFlowers(World world, int x, int y, int z, Random rand) { + int l = 10; + int i1; + int j1; + int k1; + + for (i1 = x - 2; i1 <= x + 2; ++i1) { + for (j1 = z - 2; j1 <= z + 2; ++j1) { + for (k1 = y - 1; k1 <= y + 1; ++k1) { + if (world.getBlock(i1, k1, j1) == this) { + --l; + + if (l <= 0) { + return; + } + } + } + } + } + + i1 = x + rand.nextInt(3) - 1; + j1 = y + rand.nextInt(2) - rand.nextInt(2); + k1 = z + rand.nextInt(3) - 1; + + for (int l1 = 0; l1 < 4; ++l1) { + if (world.isAirBlock(i1, j1, k1) && this.canBlockStay(world, i1, j1, k1)) { + x = i1; + y = j1; + z = k1; + } + + i1 = x + rand.nextInt(3) - 1; + j1 = y + rand.nextInt(2) - rand.nextInt(2); + k1 = z + rand.nextInt(3) - 1; + } + + if (world.isAirBlock(i1, j1, k1) && this.canBlockStay(world, i1, j1, k1)) { + world.setBlock(i1, j1, k1, this, 0, 2); + } + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIcon(int p_149691_1_, int p_149691_2_) { + return this.blockIcon; + } + + @Override + public boolean canPlaceBlockAt(World world, int x, int y, int z) { + return super.canPlaceBlockAt(world, x, y, z) && this.canBlockStay(world, x, y, z); + } + + @Override + public boolean canBlockStay(World world, int x, int y, int z) { + Block block = world.getBlock(x, y - 1, z); + return (block == Blocks.dirt || block == Blocks.grass); + } + + @SideOnly(Side.CLIENT) + @Override + public void getSubBlocks(Item item, CreativeTabs tab, List list) { + list.add(new ItemStack(item, 1, 0)); + } + + @SideOnly(Side.CLIENT) + @Override + public void registerBlockIcons(IIconRegister ir) { + this.blockIcon = ir.registerIcon(this.getTextureName()); + } +} diff --git a/src/main/java/com/spiteful/forbidden/blocks/BlockResource.java b/src/main/java/com/spiteful/forbidden/blocks/BlockResource.java new file mode 100644 index 0000000..2579676 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/blocks/BlockResource.java @@ -0,0 +1,19 @@ +package com.spiteful.forbidden.blocks; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.world.IBlockAccess; + +import com.spiteful.forbidden.Forbidden; + +public class BlockResource extends Block { + public BlockResource() { + super(Material.iron); + this.setCreativeTab(Forbidden.tab); + } + + @Override + public boolean isBeaconBase(IBlockAccess worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ) { + return true; + } +} diff --git a/src/main/java/com/spiteful/forbidden/blocks/BlockWrathCage.java b/src/main/java/com/spiteful/forbidden/blocks/BlockWrathCage.java new file mode 100644 index 0000000..85859f3 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/blocks/BlockWrathCage.java @@ -0,0 +1,119 @@ +package com.spiteful.forbidden.blocks; + +import java.util.Random; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagString; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +import com.spiteful.forbidden.Config; +import com.spiteful.forbidden.Forbidden; +import com.spiteful.forbidden.items.ForbiddenItems; +import com.spiteful.forbidden.tiles.TileEntityWrathCage; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockWrathCage extends BlockContainer { + protected BlockWrathCage() { + super(Material.iron); + this.setCreativeTab(Forbidden.tab); + } + + @Override + public TileEntity createNewTileEntity(World world, int meta) { + return new TileEntityWrathCage(); + } + + @Override + public Item getItem(World world, int x, int y, int z) { + return Item.getItemFromBlock(ForbiddenBlocks.wrathCage); + } + + @Override + public int quantityDropped(Random rand) { + return 1; + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { + ItemStack held = player.getCurrentEquippedItem(); + if (held != null && held.getItem() == ForbiddenItems.mobCrystal) { + NBTTagCompound nbttagcompound = held.getTagCompound(); + if (nbttagcompound == null) + return false; + String string = nbttagcompound.getString("mob"); + if (string != null) { + if (!world.isRemote) { + TileEntityWrathCage spawner = (TileEntityWrathCage) world.getTileEntity(x, y, z); + String mob = null; + ItemStack crystal = null; + if (spawner.getSpawnerLogic().isMobSet()) { + mob = spawner.getSpawnerLogic().getEntityNameToSpawn(); + crystal = new ItemStack(ForbiddenItems.mobCrystal, 1); + NBTTagString mobTag = new NBTTagString(mob); + crystal.setTagInfo("mob", mobTag); + } + spawner.getSpawnerLogic().setMobID(string); + spawner.getSpawnerLogic().mobIsSet(true); + spawner.checkAspect(); + world.markBlockForUpdate(x, y, z); + player.setCurrentItemOrArmor(0, crystal); + } + player.swingItem(); + return true; + } + } else if (held != null && held.getItem() == ForbiddenItems.fork && Config.wrathCost > 0) { + TileEntityWrathCage spawner = (TileEntityWrathCage) world.getTileEntity(x, y, z); + if (++spawner.mode > 2) + spawner.mode = 0; + player.swingItem(); + } + return false; + } + + @Override + public void onBlockPreDestroy(World world, int x, int y, int z, int side) { + TileEntityWrathCage spawner = (TileEntityWrathCage) world.getTileEntity(x, y, z); + + if (spawner != null && spawner.getSpawnerLogic().isMobSet()) { + float f = world.rand.nextFloat() * 0.8F + 0.1F; + float f1 = world.rand.nextFloat() * 0.8F + 0.1F; + float f2 = world.rand.nextFloat() * 0.8F + 0.1F; + + ItemStack crystal = new ItemStack(ForbiddenItems.mobCrystal); + crystal.setTagCompound(new NBTTagCompound()); + String mob = spawner.getSpawnerLogic().getEntityNameToSpawn(); + crystal.stackTagCompound.setString("mob", mob); + + EntityItem entityitem = new EntityItem(world, (double) ((float) x + f), (double) ((float) y + f1), (double) ((float) z + f2), crystal); + + entityitem.motionX = (double) ((float) world.rand.nextGaussian() * 0.05F); + entityitem.motionY = (double) ((float) world.rand.nextGaussian() * 0.05F + 0.2F); + entityitem.motionZ = (double) ((float) world.rand.nextGaussian() * 0.05F); + world.spawnEntityInWorld(entityitem); + + } + + super.onBlockPreDestroy(world, x, y, z, side); + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @SideOnly(Side.CLIENT) + @Override + public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) { + return new ItemStack(getItem(null, x, y, z)); + } +} diff --git a/src/main/java/com/spiteful/forbidden/blocks/ForbiddenBlocks.java b/src/main/java/com/spiteful/forbidden/blocks/ForbiddenBlocks.java new file mode 100644 index 0000000..6959915 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/blocks/ForbiddenBlocks.java @@ -0,0 +1,32 @@ +package com.spiteful.forbidden.blocks; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +import com.spiteful.forbidden.tiles.TileEntityWrathCage; + +import cpw.mods.fml.common.registry.GameRegistry; + +public class ForbiddenBlocks { + public static Block arcaneCake; + public static Block blackFlower; + public static Block wrathCage; + public static Block starBlock; + + public static void addBlocks() { + arcaneCake = new BlockArcaneCake().setHardness(0.5F).setStepSound(Block.soundTypeCloth).setBlockName("ArcaneCake"); + GameRegistry.registerBlock(arcaneCake, "ArcaneCake"); + + wrathCage = new BlockWrathCage().setHardness(5.0F).setResistance(2000.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName("forbidden:spirit_box").setBlockName("WrathCage"); + GameRegistry.registerBlock(wrathCage, "WrathCage"); + GameRegistry.registerTileEntity(TileEntityWrathCage.class, "WrathCage"); + + blackFlower = new BlockBlackFlower().setStepSound(Block.soundTypeGrass).setBlockTextureName("forbidden:flower_black").setBlockName("InkFlower"); + GameRegistry.registerBlock(blackFlower, "InkFlower"); + + starBlock = new BlockResource().setHardness(5.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName("forbidden:starblock").setBlockName("StarBlock"); + GameRegistry.registerBlock(starBlock, "StarBlock"); + OreDictionary.registerOre("blockNetherStar", new ItemStack(starBlock, 1, 0)); + } +} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/client/ClientProxy.java b/src/main/java/com/spiteful/forbidden/client/ClientProxy.java similarity index 50% rename from src/com/spiteful/forbidden/client/ClientProxy.java rename to src/main/java/com/spiteful/forbidden/client/ClientProxy.java index 8f1c8b9..b88048e 100644 --- a/src/com/spiteful/forbidden/client/ClientProxy.java +++ b/src/main/java/com/spiteful/forbidden/client/ClientProxy.java @@ -1,17 +1,14 @@ package com.spiteful.forbidden.client; -import com.spiteful.forbidden.*; -import com.spiteful.forbidden.tiles.*; +import com.spiteful.forbidden.CommonProxy; +import com.spiteful.forbidden.tiles.TileEntityWrathCage; import cpw.mods.fml.client.registry.ClientRegistry; -import cpw.mods.fml.client.registry.RenderingRegistry; -import net.minecraftforge.client.MinecraftForgeClient; -import net.minecraftforge.common.MinecraftForge; public class ClientProxy extends CommonProxy { @Override - public void registerRenderInfo(){ + public void registerRenderInfo() { ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWrathCage.class, new TileEntityWrathCageRenderer()); } diff --git a/src/com/spiteful/forbidden/client/TileEntityWrathCageRenderer.java b/src/main/java/com/spiteful/forbidden/client/TileEntityWrathCageRenderer.java similarity index 53% rename from src/com/spiteful/forbidden/client/TileEntityWrathCageRenderer.java rename to src/main/java/com/spiteful/forbidden/client/TileEntityWrathCageRenderer.java index b6398fa..9dbf621 100644 --- a/src/com/spiteful/forbidden/client/TileEntityWrathCageRenderer.java +++ b/src/main/java/com/spiteful/forbidden/client/TileEntityWrathCageRenderer.java @@ -1,56 +1,53 @@ package com.spiteful.forbidden.client; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.tileentity.TileEntity; + +import org.lwjgl.opengl.GL11; + import com.spiteful.forbidden.tiles.TileEntityWrathCage; import com.spiteful.forbidden.tiles.WrathSpawnerLogic; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.tileentity.TileEntity; -import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) -public class TileEntityWrathCageRenderer extends TileEntitySpecialRenderer -{ - public void renderTileEntityWrathCage(TileEntityWrathCage wrathCage, double par2, double par4, double par6, float par8) - { - if(!wrathCage.getSpawnerLogic().isMobSet()) +public class TileEntityWrathCageRenderer extends TileEntitySpecialRenderer { + public void renderTileEntityWrathCage(TileEntityWrathCage wrathCage, double x, double z, double par6, float par8) { + if (!wrathCage.getSpawnerLogic().isMobSet()) return; GL11.glPushMatrix(); - GL11.glTranslatef((float)par2 + 0.5F, (float)par4, (float)par6 + 0.5F); - renderMob(wrathCage.getSpawnerLogic(), par2, par4, par6, par8); + GL11.glTranslatef((float) x + 0.5F, (float) z, (float) par6 + 0.5F); + renderMob(wrathCage.getSpawnerLogic(), x, z, par6, par8); GL11.glPopMatrix(); } - public static void renderMob(WrathSpawnerLogic spawnLogic, double par1, double par3, double par5, float par7) - { + public static void renderMob(WrathSpawnerLogic spawnLogic, double par1, double y, double par5, float par7) { Entity entity = spawnLogic.getEntityForRender(); - if (entity != null) - { + if (entity != null) { entity.setWorld(spawnLogic.getSpawnerWorld()); float f1 = 0.4375F; - if(spawnLogic.getEntityNameToSpawn().equals("Ghast")) + if (spawnLogic.getEntityNameToSpawn().equals("Ghast")) f1 = 0.1F; - else if(spawnLogic.getEntityNameToSpawn().equals("Slime") || spawnLogic.getEntityNameToSpawn().equals("ThaumSlime")) + else if (spawnLogic.getEntityNameToSpawn().equals("Slime") || spawnLogic.getEntityNameToSpawn().equals("ThaumSlime")) f1 = 0.4F; - else if(spawnLogic.getEntityNameToSpawn().equals("Enderman")) + else if (spawnLogic.getEntityNameToSpawn().equals("Enderman")) f1 = 0.3F; GL11.glTranslatef(0.0F, 0.4F, 0.0F); - if(!spawnLogic.getSpawnerWorld().isBlockIndirectlyGettingPowered(spawnLogic.getSpawnerX(), spawnLogic.getSpawnerY(), spawnLogic.getSpawnerZ())) - GL11.glRotatef((float)(spawnLogic.field_98284_d + (spawnLogic.field_98287_c - spawnLogic.field_98284_d) * (double)par7) * 10.0F, 0.0F, 1.0F, 0.0F); + if (!spawnLogic.getSpawnerWorld().isBlockIndirectlyGettingPowered(spawnLogic.getSpawnerX(), spawnLogic.getSpawnerY(), spawnLogic.getSpawnerZ())) + GL11.glRotatef((float) (spawnLogic.field_98284_d + (spawnLogic.field_98287_c - spawnLogic.field_98284_d) * (double) par7) * 10.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F); GL11.glTranslatef(0.0F, -0.4F, 0.0F); GL11.glScalef(f1, f1, f1); - entity.setLocationAndAngles(par1, par3, par5, 0.0F, 0.0F); + entity.setLocationAndAngles(par1, y, par5, 0.0F, 0.0F); RenderManager.instance.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, par7); } } - public void renderTileEntityAt(TileEntity par1TileEntity, double par2, double par4, double par6, float par8) - { - this.renderTileEntityWrathCage((TileEntityWrathCage)par1TileEntity, par2, par4, par6, par8); + public void renderTileEntityAt(TileEntity par1TileEntity, double x, double z, double par6, float par8) { + this.renderTileEntityWrathCage((TileEntityWrathCage) par1TileEntity, x, z, par6, par8); } } diff --git a/src/main/java/com/spiteful/forbidden/compat/BloodMagic.java b/src/main/java/com/spiteful/forbidden/compat/BloodMagic.java new file mode 100644 index 0000000..27cb970 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/compat/BloodMagic.java @@ -0,0 +1,152 @@ +package com.spiteful.forbidden.compat; + +import static com.spiteful.forbidden.compat.Compat.bm; +import static com.spiteful.forbidden.compat.Compat.kami; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +import org.apache.logging.log4j.Level; + +import thaumcraft.api.ItemApi; +import thaumcraft.api.ThaumcraftApi; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; +import thaumcraft.api.crafting.IArcaneRecipe; +import thaumcraft.api.crafting.InfusionRecipe; +import thaumcraft.api.research.ResearchPage; +import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; + +import com.spiteful.forbidden.DarkAspects; +import com.spiteful.forbidden.DarkResearchItem; +import com.spiteful.forbidden.LogHandler; +import com.spiteful.forbidden.items.ForbiddenItems; + +import cpw.mods.fml.common.FMLLog; +import cpw.mods.fml.common.registry.GameRegistry; + +public class BloodMagic { + public static void stab() { + try { + ItemStack i; + AspectList list; + Item masterOrb = GameRegistry.findItem("AWWayofTime", "masterBloodOrb"); + Item archmasterOrb = GameRegistry.findItem("AWWayofTime", "archmageBloodOrb"); + Item imbuedSlate = GameRegistry.findItem("AWWayofTime", "imbuedSlate"); + Item magicales = GameRegistry.findItem("AWWayofTime", "magicales"); + Item aether = GameRegistry.findItem("AWWayofTime", "aether"); + Item terrae = GameRegistry.findItem("AWWayofTime", "terrae"); + Item aquasalus = GameRegistry.findItem("AWWayofTime", "aquasalus"); + Item incendium = GameRegistry.findItem("AWWayofTime", "incendium"); + Item sanctus = GameRegistry.findItem("AWWayofTime", "sanctus"); + Item tennebrae = GameRegistry.findItem("AWWayofTime", "tennebrae"); + Item crapOrb = GameRegistry.findItem("AWWayofTime", "weakBloodOrb"); + Item demonShard = GameRegistry.findItem("AWWayofTime", "demonBloodShard"); + Item bloodBucket = GameRegistry.findItem("AWWayofTime", "bucketLife"); + + AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ForbiddenItems.wandCore, 1, 3), new ItemStack(ForbiddenItems.wandCore, 1, 6), 4, 20000, 15, 20, false); + + InfusionRecipe blood_recipe = ThaumcraftApi.addInfusionCraftingRecipe("ROD_blood", new ItemStack(ForbiddenItems.wandCore, 1, 6), 2, (new AspectList()).add(Aspect.LIFE, 32).add(Aspect.MAGIC, 12).add(Aspect.WATER, 16), new ItemStack(masterOrb), new ItemStack[] { new ItemStack(magicales), new ItemStack(imbuedSlate), new ItemStack(imbuedSlate), new ItemStack(tennebrae), new ItemStack(sanctus), new ItemStack(aquasalus), new ItemStack(incendium), new ItemStack(terrae), new ItemStack(aether) }); + (new DarkResearchItem("ROD_blood", "FORBIDDEN", "[BM]", (new AspectList()).add(Aspect.LIFE, 5).add(Aspect.WATER, 4).add(Aspect.WEAPON, 3), -5, -3, 3, new ItemStack(ForbiddenItems.wandCore, 1, 3))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.ROD_blood.1"), new ResearchPage(blood_recipe), new ResearchPage("forbidden.research_page.ROD_blood.2") }).setParents(new String[] { "ROD_silverwood", "INFAUXSION" }).setAspectTriggers(new Aspect[] { Aspect.LIFE }).setConcealed().registerResearchItem(); + + InfusionRecipe alchemical_recipe = ThaumcraftApi.addInfusionCraftingRecipe("CAP_alchemical", new ItemStack(ForbiddenItems.wandCap, 1, 0), 3, (new AspectList()).add(Aspect.LIFE, 12).add(Aspect.WATER, 6), ItemApi.getItem("itemWandCap", 1), new ItemStack[] { new ItemStack(magicales), new ItemStack(magicales), new ItemStack(magicales) }); + (new DarkResearchItem("CAP_alchemical", "FORBIDDEN", "[BM]", (new AspectList()).add(Aspect.LIFE, 4).add(Aspect.TOOL, 1).add(Aspect.WATER, 3), -5, -5, 2, new ItemStack(ForbiddenItems.wandCap, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.CAP_alchemical.1"), new ResearchPage(alchemical_recipe) }).setParents(new String[] { "ROD_blood", "CAP_gold" }).setSecondary().setConcealed().registerResearchItem(); + + IArcaneRecipe bloodwell_recipe = ThaumcraftApi.addShapelessArcaneCraftingRecipe("BLOODWELL", new ItemStack(ForbiddenItems.bloodwell, 1, 0), (new AspectList()).add(Aspect.WATER, 10).add(Aspect.EARTH, 10), new Object[] { new ItemStack(Items.feather, 1, 0), new ItemStack(bloodBucket, 1, 0), new ItemStack(Items.glass_bottle, 1, 0), new ItemStack(crapOrb, 1, 0) }); + (new DarkResearchItem("BLOODWELL", "FORBIDDEN", "[BM]", (new AspectList()).add(Aspect.LIFE, 5).add(Aspect.MIND, 4).add(Aspect.SENSES, 3), -10, 4, 1, new ItemStack(ForbiddenItems.bloodwell, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.BLOODWELL.1"), new ResearchPage(bloodwell_recipe) }).setParents(new String[] { "RESEARCH" }).setAspectTriggers(new Aspect[] { Aspect.LIFE }).setConcealed().registerResearchItem(); + + IArcaneRecipe blood_staff = ThaumcraftApi.addArcaneCraftingRecipe("ROD_blood_staff", new ItemStack(ForbiddenItems.wandCore, 1, 9), (new AspectList()).add(Aspect.ENTROPY, 26).add(Aspect.FIRE, 26).add(Aspect.WATER, 26).add(Aspect.AIR, 26).add(Aspect.EARTH, 26).add(Aspect.ORDER, 26), new Object[] { "__D", "_B_", "B__", Character.valueOf('B'), new ItemStack(ForbiddenItems.wandCore, 1, 3), Character.valueOf('D'), new ItemStack(demonShard) }); + (new DarkResearchItem("ROD_blood_staff", "FORBIDDEN", "[BM]", (new AspectList()).add(Aspect.LIFE, 8).add(Aspect.WATER, 7).add(Aspect.WEAPON, 6), -5, -7, 5, new ItemStack(ForbiddenItems.wandCore, 1, 9))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.ROD_blood_staff.1"), new ResearchPage(blood_staff) }).setParents(new String[] { "ROD_silverwood_staff", "ROD_blood" }).setSpecial().setConcealed().registerResearchItem(); + + if (kami) { + try { + + Item kamiResource = (Item) (Class.forName("vazkii.tinkerer.common.item.ModItems").getField("kamiResource").get(null)); + InfusionRecipe divine_orb = ThaumcraftApi.addInfusionCraftingRecipe("DIVINEORB", new ItemStack(ForbiddenItems.bloodOrb, 1, 0), 12, (new AspectList()).add(Aspect.LIFE, 64).add(Aspect.MAGIC, 48).add(Aspect.WATER, 32).add(Aspect.VOID, 64), new ItemStack(archmasterOrb), new ItemStack[] { new ItemStack(kamiResource, 1, 0), new ItemStack(kamiResource, 1, 0), new ItemStack(kamiResource, 1, 0), new ItemStack(kamiResource, 1, 2), new ItemStack(kamiResource, 1, 2), new ItemStack(kamiResource, 1, 1), new ItemStack(kamiResource, 1, 6), new ItemStack(kamiResource, 1, 7), new ItemStack(ForbiddenItems.gluttonyShard) }); + (new DarkResearchItem("DIVINEORB", "FORBIDDEN", "[BM] [TTKami]", (new AspectList()).add(Aspect.LIFE, 32).add(Aspect.VOID, 24).add(Aspect.CRYSTAL, 24).add(Aspect.MAGIC, 12), -9, 6, 6, new ItemStack(ForbiddenItems.bloodOrb, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.DIVINEORB.1"), new ResearchPage(divine_orb) }).setParents(new String[] { "ICHOR", "INFAUXSION", "ICHOR_CLOTH", "ICHORIUM" }).setAspectTriggers(new Aspect[] { Aspect.LIFE }).setConcealed().setSpecial().registerResearchItem(); + + } catch (Exception e) { + FMLLog.log(Level.INFO, e, "Forbidden Magic doesn't have Thaumic Tinkerer's nose."); + e.printStackTrace(); + } + + } + + list = (new AspectList()).add(Aspect.LIFE, 2).add(Aspect.MAGIC, 2).add(Aspect.CRYSTAL, 4); + ThaumcraftApi.registerObjectTag(new ItemStack(crapOrb, 1, OreDictionary.WILDCARD_VALUE), list); + + list = (new AspectList()).add(Aspect.LIFE, 4).add(Aspect.MAGIC, 4).add(Aspect.CRYSTAL, 4); + aspectBloodItem("apprenticeBloodOrb", -1, list); + + list = (new AspectList()).add(Aspect.LIFE, 6).add(Aspect.MAGIC, 6).add(Aspect.CRYSTAL, 4); + aspectBloodItem("magicianBloodOrb", -1, list); + + list = (new AspectList()).add(Aspect.LIFE, 16).add(Aspect.MAGIC, 8).add(Aspect.CRYSTAL, 4); + ThaumcraftApi.registerObjectTag(new ItemStack(masterOrb, 1, OreDictionary.WILDCARD_VALUE), list); + + list = (new AspectList()).add(Aspect.LIFE, 16).add(DarkAspects.NETHER, 8).add(Aspect.CRYSTAL, 4).add(Aspect.FIRE, 1).add(Aspect.WATER, 1).add(Aspect.AIR, 1).add(Aspect.EARTH, 1).add(Aspect.LIGHT, 1).add(Aspect.DARKNESS, 1); + ThaumcraftApi.registerObjectTag(new ItemStack(demonShard, 1, OreDictionary.WILDCARD_VALUE), list); + + list = (new AspectList()).add(Aspect.LIFE, 32).add(DarkAspects.NETHER, 4).add(Aspect.MAGIC, 8).add(Aspect.CRYSTAL, 4); + aspectBloodItem("archmageBloodOrb", -1, list); + + list = (new AspectList()).add(Aspect.ELDRITCH, 5).add(Aspect.WEAPON, 5).add(DarkAspects.WRATH, 5).add(Aspect.POISON, 1); + aspectBloodItem("energySword", -1, list); + + list = (new AspectList()).add(Aspect.ELDRITCH, 5).add(Aspect.WEAPON, 6).add(DarkAspects.WRATH, 6).add(Aspect.POISON, 1); + aspectBloodItem("energyBlaster", -1, list); + + list = (new AspectList()).add(Aspect.ELDRITCH, 6).add(Aspect.MINE, 5).add(DarkAspects.WRATH, 4).add(Aspect.TRAP, 4); + aspectBloodItem("boundPickaxe", -1, list); + + list = (new AspectList()).add(Aspect.ELDRITCH, 4).add(Aspect.TOOL, 5).add(DarkAspects.WRATH, 2).add(Aspect.TRAP, 2); + aspectBloodItem("boundShovel", -1, list); + + list = (new AspectList()).add(Aspect.ELDRITCH, 6).add(Aspect.TOOL, 5).add(DarkAspects.WRATH, 4).add(Aspect.TRAP, 4); + aspectBloodItem("boundAxe", -1, list); + + list = (new AspectList()).add(Aspect.METAL, 8).add(Aspect.VOID, 1).add(Aspect.LIFE, 4); + ThaumcraftApi.registerObjectTag(new ItemStack(bloodBucket, 1, OreDictionary.WILDCARD_VALUE), list); + + list = (new AspectList()).add(Aspect.LIGHT, 6).add(Aspect.ENERGY, 3); + ThaumcraftApi.registerObjectTag(new ItemStack(sanctus, 1, OreDictionary.WILDCARD_VALUE), list); + + list = (new AspectList()).add(Aspect.DARKNESS, 6).add(Aspect.ENERGY, 3); + ThaumcraftApi.registerObjectTag(new ItemStack(tennebrae, 1, OreDictionary.WILDCARD_VALUE), list); + + list = (new AspectList()).add(Aspect.MAGIC, 6).add(Aspect.ENERGY, 3); + ThaumcraftApi.registerObjectTag(new ItemStack(magicales, 1, OreDictionary.WILDCARD_VALUE), list); + + list = (new AspectList()).add(Aspect.AIR, 6).add(Aspect.ENERGY, 3); + ThaumcraftApi.registerObjectTag(new ItemStack(aether, 1, OreDictionary.WILDCARD_VALUE), list); + + list = (new AspectList()).add(Aspect.EARTH, 6).add(Aspect.ENERGY, 3); + ThaumcraftApi.registerObjectTag(new ItemStack(terrae, 1, OreDictionary.WILDCARD_VALUE), list); + + list = (new AspectList()).add(Aspect.WATER, 6).add(Aspect.ENERGY, 3); + ThaumcraftApi.registerObjectTag(new ItemStack(aquasalus, 1, OreDictionary.WILDCARD_VALUE), list); + + list = (new AspectList()).add(Aspect.FIRE, 6).add(Aspect.ENERGY, 3); + ThaumcraftApi.registerObjectTag(new ItemStack(incendium, 1, OreDictionary.WILDCARD_VALUE), list); + + list = (new AspectList()).add(Aspect.COLD, 6).add(Aspect.ENERGY, 3); + aspectBloodItem("crystallos", -1, list); + + list = (new AspectList()).add(Aspect.ENTROPY, 6).add(Aspect.ENERGY, 3); + aspectBloodItem("crepitous", -1, list); + } catch (Throwable e) { + LogHandler.log(Level.INFO, e, "Forbidden Magic tried to do some Blood Magic, but bled out."); + bm = false; + } + } + + private static void aspectBloodItem(String target, int damage, AspectList list) { + try { + Item item = GameRegistry.findItem("AWWayofTime", target); + ThaumcraftApi.registerObjectTag(new ItemStack(item, 1, damage), list); + } catch (Exception e) { + FMLLog.log(Level.INFO, e, "Forbidden Magic was unable to add aspects to " + target); + } + } +} diff --git a/src/main/java/com/spiteful/forbidden/compat/Compat.java b/src/main/java/com/spiteful/forbidden/compat/Compat.java new file mode 100644 index 0000000..8896f63 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/compat/Compat.java @@ -0,0 +1,306 @@ +package com.spiteful.forbidden.compat; + +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.oredict.OreDictionary; + +import org.apache.logging.log4j.Level; + +import thaumcraft.api.ItemApi; +import thaumcraft.api.ThaumcraftApi; +import thaumcraft.api.ThaumcraftApiHelper; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; +import thaumcraft.api.crafting.IArcaneRecipe; +import thaumcraft.api.crafting.InfusionEnchantmentRecipe; +import thaumcraft.api.crafting.InfusionRecipe; +import thaumcraft.api.research.ResearchPage; +import vazkii.botania.api.BotaniaAPI; + +import com.spiteful.forbidden.DarkAspects; +import com.spiteful.forbidden.DarkResearchItem; +import com.spiteful.forbidden.LogHandler; +import com.spiteful.forbidden.enchantments.DarkEnchantments; +import com.spiteful.forbidden.items.ForbiddenItems; + +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.registry.GameRegistry; + +public class Compat { + public static boolean tt = false; + public static boolean kami = false; + public static boolean tx = false; + public static boolean natura = false; + public static boolean pb = false; + public static boolean bm = false; + public static boolean am2 = false; + public static boolean totes = false; + public static boolean botan = false; + + public static Item fennCrystal; + + public static void initiate() { + if (Loader.isModLoaded("ThaumicTinkerer")) + tt = true; + if (tt && Loader.isModLoaded("ThaumicTinkererKami")) + kami = true; + if (Loader.isModLoaded("ThaumicExploration")) + tx = true; + if (Loader.isModLoaded("Natura")) + natura = true; + if (Loader.isModLoaded("PlayerBeacons")) + pb = true; + if (Loader.isModLoaded("AWWayofTime")) + bm = true; + if (Loader.isModLoaded("arsmagica2")) + am2 = true; + if (Loader.isModLoaded("totemic")) + totes = true; + if (Loader.isModLoaded("Botania")) + botan = true; + } + + public static void compatify() { + ItemStack i; + AspectList list; + + if (tt) { + if (!kami) { + try { + kami = Class.forName("vazkii.tinkerer.common.core.handler.ConfigHandler").getField("enableKami").getBoolean(null); + } catch (Exception e) { + } + } + + if (kami) { + try { + Item kamiResource = GameRegistry.findItem("ThaumicTinkerer", "ttinkerer:kamiResource"); + list = new AspectList().add(DarkAspects.NETHER, 2).add(Aspect.MAGIC, 1).add(Aspect.CRYSTAL, 1); + ThaumcraftApi.registerObjectTag(new ItemStack(kamiResource, 1, 6), list); + list = new AspectList().add(Aspect.ELDRITCH, 2).add(Aspect.MAGIC, 1).add(Aspect.CRYSTAL, 1); + ThaumcraftApi.registerObjectTag(new ItemStack(kamiResource, 1, 7), list); + + InfusionEnchantmentRecipe eternal = ThaumcraftApi.addInfusionEnchantmentRecipe("ETERNAL", DarkEnchantments.eternal, 12, (new AspectList()).add(Aspect.CRAFT, 32).add(Aspect.TOOL, 64).add(DarkAspects.ENVY, 76).add(Aspect.MAGIC, 64), new ItemStack[] { new ItemStack(kamiResource, 1, 0), new ItemStack(kamiResource, 1, 2), new ItemStack(kamiResource, 1, 2), new ItemStack(kamiResource, 1, 2), new ItemStack(kamiResource, 1, 6), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1) }); + (new DarkResearchItem("ETERNAL", "FORBIDDEN", "[TTKami]", (new AspectList()).add(Aspect.MAGIC, 16).add(Aspect.TOOL, 10).add(Aspect.CRAFT, 8).add(DarkAspects.ENVY, 32), -5, 7, 6, new ResourceLocation("forbidden", "textures/misc/eternal.png"))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.ETERNAL.1"), new ResearchPage(eternal) }).setParents(new String[] { "MORPHTOOLS", "ICHOR_TOOLS" }).setConcealed().registerResearchItem(); + + InfusionRecipe thoth = ThaumcraftApi.addInfusionCraftingRecipe("DIVINEWELL", new ItemStack(ForbiddenItems.divinewell, 1, 0), 5, (new AspectList()).add(Aspect.MIND, 32).add(Aspect.BEAST, 12).add(Aspect.EARTH, 16), ItemApi.getItem("itemInkwell", 0), new ItemStack[] { new ItemStack(kamiResource, 1, 2), new ItemStack(kamiResource, 1, 0), new ItemStack(kamiResource, 1, 0), new ItemStack(Blocks.bookshelf), new ItemStack(Blocks.bookshelf), new ItemStack(Blocks.bookshelf), ItemApi.getItem("itemResource", 5), ItemApi.getItem("itemResource", 5), ItemApi.getItem("itemResource", 5) }); + (new DarkResearchItem("DIVINEWELL", "FORBIDDEN", "[TTKami]", (new AspectList()).add(Aspect.MIND, 6).add(Aspect.EARTH, 3).add(Aspect.MAGIC, 5), -11, 4, 3, new ItemStack(ForbiddenItems.divinewell, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.DIVINEWELL.1"), new ResearchPage(thoth) }).setParents(new String[] { "ICHORIUM" }).setConcealed().registerResearchItem(); + } catch (Exception e) { + LogHandler.log(Level.INFO, e, "We don't have Thaumic Tinkerer's nose."); + } + + } + } + + if (natura) { + try { + list = (new AspectList()).add(Aspect.BEAST, 2).add(DarkAspects.NETHER, 4).add(DarkAspects.SLOTH, 2); + ThaumcraftApi.registerEntityTag("Natura.Imp", list); + list = (new AspectList()).add(Aspect.BEAST, 3).add(Aspect.FIRE, 3).add(DarkAspects.NETHER, 2); + ThaumcraftApi.registerEntityTag("Natura.HeatscarSpider", list); + ThaumcraftApi.registerEntityTag("Natura.FlameSpider", list); + list = (new AspectList()).add(Aspect.BEAST, 1).add(Aspect.FIRE, 2).add(DarkAspects.NETHER, 1); + ThaumcraftApi.registerEntityTag("Natura.BabyHeatscarSpider", list); + ThaumcraftApi.registerEntityTag("Natura.FlameSpiderBaby", list); + list = (new AspectList()).add(Aspect.BEAST, 2).add(Aspect.FIRE, 4).add(DarkAspects.NETHER, 2).add(Aspect.ENTROPY, 4); + ThaumcraftApi.registerEntityTag("Natura.NitroCreeper", list); + + i = GameRegistry.findItemStack("Natura", "Dark Tree", 1); + if (i != null) { + list = (new AspectList()).add(Aspect.TREE, 3).add(DarkAspects.WRATH, 2); + ThaumcraftApi.registerObjectTag(new ItemStack(i.getItem(), 1, 1), list); + list = (new AspectList()).add(Aspect.TREE, 3).add(Aspect.DARKNESS, 2); + ThaumcraftApi.registerObjectTag(new ItemStack(i.getItem(), 1, 0), list); + } + + i = GameRegistry.findItemStack("Natura", "soil.tainted", 1); + if (i != null) { + list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(i.getItem(), 1, 0)); + list.add(DarkAspects.NETHER, 1); + ThaumcraftApi.registerObjectTag(new ItemStack(i.getItem(), 1, OreDictionary.WILDCARD_VALUE), list); + } + + i = GameRegistry.findItemStack("Natura", "heatsand", 1); + if (i != null) { + list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(i.getItem(), 1, 0)); + list.add(DarkAspects.NETHER, 1); + ThaumcraftApi.registerObjectTag(new ItemStack(i.getItem(), 1, OreDictionary.WILDCARD_VALUE), list); + } + + i = GameRegistry.findItemStack("Natura", "rawImphide", 1); + if (i != null) { + list = (new AspectList()).add(Aspect.FLESH, 4).add(Aspect.HUNGER, 1).add(DarkAspects.NETHER, 1); + ThaumcraftApi.registerObjectTag(new ItemStack(i.getItem(), 1, 0), list); + list = (new AspectList()).add(Aspect.FLESH, 4).add(Aspect.POISON, 2).add(Aspect.FIRE, 2).add(DarkAspects.NETHER, 1); + ThaumcraftApi.registerObjectTag(new ItemStack(i.getItem(), 1, 1), list); + } + } catch (Exception e) { + LogHandler.log(Level.INFO, e, "Forbidden Magic had an allergic reaction to Natura."); + } + } + + // TODO: Readd Player Beacons Support + /* + * if (pb) { try { if (PlayerBeacons.config.enableThaumcraft) { + * InfusionRecipe soul_recipe = + * ThaumcraftApi.addInfusionCraftingRecipe("ROD_soul", new + * ItemStack(ForbiddenItems.wandCore, 1, 2), 5, (new + * AspectList()).add(Aspect.ELDRITCH, 32).add(Aspect.MAGIC, + * 12).add(Aspect.SOUL, 16), new + * ItemStack(PlayerBeacons.defiledSoulPylonBlock), new ItemStack[] { + * ItemApi.getItem("itemResource", 14), new + * ItemStack(PlayerBeacons.defiledSoulConductorBlock), new + * ItemStack(PlayerBeacons.defiledSoulConductorBlock), new + * ItemStack(PlayerBeacons.defiledSoulConductorBlock), new + * ItemStack(PlayerBeacons.defiledSoulConductorBlock), new + * ItemStack(Items.ender_eye), new ItemStack(Items.ender_eye) }); (new + * DarkResearchItem("ROD_soul", "FORBIDDEN", "[PB]", (new + * AspectList()).add(Aspect.ELDRITCH, 4).add(Aspect.SOUL, + * 3).add(Aspect.TOOL, 2), -3, -3, 5, new + * ItemStack(ForbiddenItems.wandCore, 1, 2))).setPages(new + * ResearchPage[] { new + * ResearchPage("forbidden.research_page.ROD_soul.1"), new + * ResearchPage(soul_recipe) }).setParents(new String[] { + * "ROD_silverwood", "PB_CRYSTAL", "INFAUXSION" + * }).setConcealed().registerResearchItem(); + * + * IArcaneRecipe soul_cap = + * ThaumcraftApi.addArcaneCraftingRecipe("CAP_soul", new + * ItemStack(ForbiddenItems.wandCap, 1, 2), (new + * AspectList()).add(Aspect.ENTROPY, 20).add(Aspect.FIRE, + * 5).add(Aspect.WATER, 5).add(Aspect.AIR, 5).add(Aspect.EARTH, 5), new + * Object[] { "NXN", "N N", Character.valueOf('N'), Items.ender_pearl, + * Character.valueOf('X'), PlayerBeacons.crystalItem }); (new + * DarkResearchItem("CAP_soul", "FORBIDDEN", "[PB]", (new + * AspectList()).add(Aspect.ELDRITCH, 3).add(Aspect.MAGIC, + * 2).add(Aspect.ENTROPY, 4), -3, -5, 3, new + * ItemStack(ForbiddenItems.wandCap, 1, 2))).setPages(new ResearchPage[] + * { new ResearchPage("forbidden.research_page.CAP_soul.1"), new + * ResearchPage(soul_cap) }).setParents(new String[] { "ROD_soul" + * }).setSecondary().setConcealed().registerResearchItem(); } + * + * } catch (Throwable e) { LogHandler.log(Level.INFO, e, + * "Player Beacons showed Forbidden Magic who the Alpha Fox is."); pb = + * false; } } + */ + + if (bm) { + BloodMagic.stab(); + } + + // TODO: Readd ArsMagica2 Support when it's updated + /* + * if (am2) { try { Class amItems = + * Class.forName("am2.items.ItemsCommonProxy"); Class amBlocks = + * Class.forName("am2.blocks.BlocksCommonProxy"); Item essence = (Item) + * (amItems.getField("essence").get(null)); Item amOre = (Item) + * (amItems.getField("itemOre").get(null)); Block witchwood = (Block) + * (amBlocks.getField("witchwoodLog").get(null)); + * + * InfusionRecipe witchwood_recipe = + * ThaumcraftApi.addInfusionCraftingRecipe("ROD_witchwood", new + * ItemStack(ForbiddenItems.wandCore, 1, 4), 5, (new + * AspectList()).add(Aspect.MAGIC, 16).add(Aspect.EARTH, + * 9).add(Aspect.WATER, 9).add(Aspect.FIRE, 9).add(Aspect.AIR, 9), new + * ItemStack(witchwood), new ItemStack[] { new ItemStack(essence, 1, 0), + * new ItemStack(amOre, 1, 3), new ItemStack(essence, 1, 1), new + * ItemStack(essence, 1, 2), new ItemStack(essence, 1, 3), new + * ItemStack(essence, 1, 4), new ItemStack(amOre, 1, 6), new + * ItemStack(amOre, 1, 7), new ItemStack(amOre, 1, 2) }); (new + * DarkResearchItem("ROD_witchwood", "FORBIDDEN", "[AM2]", (new + * AspectList()).add(Aspect.MAGIC, 6).add(Aspect.TREE, + * 5).add(Aspect.MIND, 4), -4, -3, 3, new + * ItemStack(ForbiddenItems.wandCore, 1, 4))).setPages(new + * ResearchPage[] { new + * ResearchPage("forbidden.research_page.ROD_witchwood.1"), new + * ResearchPage(witchwood_recipe) }).setParents(new String[] { + * "ROD_silverwood", "INFAUXSION" + * }).setConcealed().registerResearchItem(); + * + * InfusionRecipe vinteum_recipe = + * ThaumcraftApi.addInfusionCraftingRecipe("CAP_vinteum", new + * ItemStack(ForbiddenItems.wandCap, 1, 1), 5, (new + * AspectList()).add(Aspect.ENERGY, 12).add(Aspect.MAGIC, 6), + * ItemApi.getItem("itemWandCap", 6), new ItemStack[] { new + * ItemStack(amOre, 1, 0), new ItemStack(amOre, 1, 0), new + * ItemStack(amOre, 1, 0) }); (new DarkResearchItem("CAP_vinteum", + * "FORBIDDEN", "[AM2]", (new AspectList()).add(Aspect.MAGIC, + * 4).add(Aspect.TOOL, 1).add(Aspect.ENERGY, 2), -4, -5, 1, new + * ItemStack(ForbiddenItems.wandCap, 1, 1))).setPages(new ResearchPage[] + * { new ResearchPage("forbidden.research_page.CAP_vinteum.1"), new + * ResearchPage(vinteum_recipe) }).setParents(new String[] { + * "ROD_witchwood", "CAP_thaumium" + * }).setSecondary().setConcealed().registerResearchItem(); + * + * IArcaneRecipe witchwood_staff = + * ThaumcraftApi.addArcaneCraftingRecipe("ROD_witchwood_staff", new + * ItemStack(ForbiddenItems.wandCore, 1, 10), (new + * AspectList()).add(Aspect.ENTROPY, 26).add(Aspect.FIRE, + * 26).add(Aspect.WATER, 26).add(Aspect.AIR, 26).add(Aspect.EARTH, + * 26).add(Aspect.ORDER, 26), new Object[] { "__D", "_B_", "B__", + * Character.valueOf('B'), new ItemStack(ForbiddenItems.wandCore, 1, 4), + * Character.valueOf('D'), new ItemStack(essence, 1, 10) }); (new + * DarkResearchItem("ROD_witchwood_staff", "FORBIDDEN", "[AM2]", (new + * AspectList()).add(Aspect.MAGIC, 8).add(Aspect.MIND, + * 7).add(Aspect.TOOL, 6), -4, -7, 5, new + * ItemStack(ForbiddenItems.wandCore, 1, 10))).setPages(new + * ResearchPage[] { new + * ResearchPage("forbidden.research_page.ROD_witchwood_staff.1"), new + * ResearchPage(witchwood_staff) }).setParents(new String[] { + * "ROD_silverwood_staff", "ROD_witchwood" + * }).setSpecial().setConcealed().registerResearchItem(); } catch + * (Exception e) { LogHandler.log(Level.INFO, e, + * "Forbidden Magic was slain by a Hecate."); am2 = false; } } + * + * if (totes) { try { Class totems = + * Class.forName("totemic_commons.pokefenn.ModItems"); fennCrystal = + * (Item) (totems.getField("chlorophyllCrystal").get(null)); Item + * subItems = (Item) (totems.getField("subItems").get(null)); + * + * IArcaneRecipe totem_rod = + * ThaumcraftApi.addArcaneCraftingRecipe("ROD_totem", new + * ItemStack(ForbiddenItems.wandCore, 1, 5), (new + * AspectList()).add(Aspect.ENTROPY, 12).add(Aspect.FIRE, + * 12).add(Aspect.WATER, 12).add(Aspect.AIR, 12).add(Aspect.EARTH, + * 12).add(Aspect.ORDER, 12), new Object[] { "PF", "FP", + * Character.valueOf('F'), new ItemStack(subItems, 1, 2) }); (new + * DarkResearchItem("ROD_totem", "FORBIDDEN", "[T]", (new + * AspectList()).add(Aspect.TREE, 8).add(Aspect.MAGIC, + * 3).add(Aspect.PLANT, 6), -2, -3, 1, new + * ItemStack(ForbiddenItems.wandCore, 1, 5))).setPages(new + * ResearchPage[] { new + * ResearchPage("forbidden.research_page.ROD_totem.1"), new + * ResearchPage(totem_rod) }).setParents(new String[] { "ROD_greatwood" + * }).setConcealed().registerResearchItem(); + * + * } catch (Exception e) { LogHandler.log(Level.INFO, e, + * "Forbidden Magic tried to catch Totemic with a pokeball, but didn't weaken it enough." + * ); totes = false; } } + */ + + if (botan) { + try { + Item rune = GameRegistry.findItem("Botania", "rune"); + Item resource = GameRegistry.findItem("Botania", "manaResource"); + Item livingLog = GameRegistry.findItem("Botania", "livingwood"); + + CraftingManager.getInstance().addRecipe(new ItemStack(resource, 1, 0), new Object[] { "###", "###", "###", Character.valueOf('#'), new ItemStack(ForbiddenItems.resource, 1, 2) }); + CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.resource, 9, 2), new Object[] { "#", Character.valueOf('#'), new ItemStack(resource, 1, 0) }); + + InfusionRecipe livingwood_rod = ThaumcraftApi.addInfusionCraftingRecipe("ROD_livingwood", new ItemStack(ForbiddenItems.wandCore, 1, 8), 3, (new AspectList()).add(Aspect.MAGIC, 16).add(Aspect.TREE, 32).add(Aspect.LIFE, 16).add(Aspect.SENSES, 8).add(Aspect.PLANT, 8), new ItemStack(livingLog), new ItemStack[] { new ItemStack(resource, 1, 2), new ItemStack(rune, 1, 8), new ItemStack(rune, 1, 0), new ItemStack(rune, 1, 1), new ItemStack(rune, 1, 2), new ItemStack(rune, 1, 3), new ItemStack(rune, 1, 4), new ItemStack(rune, 1, 5), new ItemStack(rune, 1, 6), new ItemStack(rune, 1, 7) }); + (new DarkResearchItem("ROD_livingwood", "FORBIDDEN", "[B]", (new AspectList()).add(Aspect.TREE, 8).add(Aspect.MAGIC, 4).add(Aspect.PLANT, 6), -1, -3, 3, new ItemStack(ForbiddenItems.wandCore, 1, 7))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.ROD_livingwood.1"), new ResearchPage(livingwood_rod) }).setParents(new String[] { "ROD_silverwood", "INFAUXSION" }).setConcealed().registerResearchItem(); + BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ForbiddenItems.wandCore, 1, 7), new ItemStack(ForbiddenItems.wandCore, 1, 8), 10000); + + IArcaneRecipe manasteel_cap = ThaumcraftApi.addArcaneCraftingRecipe("CAP_manasteel", new ItemStack(ForbiddenItems.wandCap, 1, 4), (new AspectList()).add(Aspect.ENTROPY, 6).add(Aspect.FIRE, 6).add(Aspect.WATER, 6).add(Aspect.AIR, 6).add(Aspect.EARTH, 6).add(Aspect.ORDER, 6), new Object[] { "NNN", "N N", Character.valueOf('N'), new ItemStack(ForbiddenItems.resource, 1, 2) }); + (new DarkResearchItem("CAP_manasteel", "FORBIDDEN", "[B]", (new AspectList()).add(Aspect.ELDRITCH, 3).add(Aspect.MAGIC, 2).add(Aspect.ENTROPY, 4), -1, -5, 2, new ItemStack(ForbiddenItems.wandCap, 1, 3))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.CAP_manasteel.1"), new ResearchPage(manasteel_cap) }).setParents(new String[] { "ROD_livingwood" }).setSecondary().setConcealed().registerResearchItem(); + BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ForbiddenItems.wandCap, 1, 3), new ItemStack(ForbiddenItems.wandCap, 1, 4), 1000); + } catch (Throwable e) { + LogHandler.log(Level.INFO, e, "Forbidden Magic: Botania? Do you wanna build a snowman?"); + botan = false; + } + } + } +} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/enchantments/DarkEnchantments.java b/src/main/java/com/spiteful/forbidden/enchantments/DarkEnchantments.java similarity index 88% rename from src/com/spiteful/forbidden/enchantments/DarkEnchantments.java rename to src/main/java/com/spiteful/forbidden/enchantments/DarkEnchantments.java index 919abbb..4763a70 100644 --- a/src/com/spiteful/forbidden/enchantments/DarkEnchantments.java +++ b/src/main/java/com/spiteful/forbidden/enchantments/DarkEnchantments.java @@ -1,15 +1,14 @@ package com.spiteful.forbidden.enchantments; -import com.spiteful.forbidden.*; - import net.minecraft.enchantment.Enchantment; -import net.minecraftforge.common.MinecraftForge; -import vazkii.tinkerer.common.enchantment.core.*; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; +import vazkii.tinkerer.common.enchantment.core.EnchantmentManager; -public class DarkEnchantments -{ +import com.spiteful.forbidden.Config; +import com.spiteful.forbidden.compat.Compat; + +public class DarkEnchantments { public static Enchantment cluster; public static Enchantment pigBane; public static Enchantment greedy; @@ -17,9 +16,8 @@ public class DarkEnchantments public static Enchantment educational; public static Enchantment corrupting; public static Enchantment eternal; - - public static void hex() - { + + public static void hex() { cluster = new EnchantmentCluster(Config.clusterEnchID); pigBane = new EnchantmentPigBane(Config.pigBaneEnchID); greedy = new EnchantmentGreedy(Config.greedyEnchID); @@ -27,19 +25,17 @@ public class DarkEnchantments educational = new EnchantmentEducational(Config.educationalEnchID); corrupting = new EnchantmentCorrupting(Config.corruptingEnchID); eternal = new EnchantmentEternal(Config.eternalEnchID); - - if(Compat.tt) - { - try - { + + if (Compat.tt) { + try { EnchantmentManager.registerExponentialCostData(pigBane, "forbidden:textures/misc/pigbane.png", false, (new AspectList()).add(Aspect.FIRE, 1).add(Aspect.ENTROPY, 1), "PIGBANE"); EnchantmentManager.registerExponentialCostData(cluster, "forbidden:textures/misc/lucrative.png", false, (new AspectList()).add(Aspect.FIRE, 5).add(Aspect.EARTH, 5).add(Aspect.ORDER, 5), "CLUSTER"); EnchantmentManager.registerExponentialCostData(greedy, "forbidden:textures/misc/greedy.png", false, (new AspectList()).add(Aspect.ENTROPY, 50).add(Aspect.EARTH, 30).add(Aspect.ORDER, 20), "GREEDY"); EnchantmentManager.registerExponentialCostData(educational, "forbidden:textures/misc/educational.png", false, new AspectList().add(Aspect.AIR, 10).add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.EARTH, 10).add(Aspect.ORDER, 15).add(Aspect.ENTROPY, 15), "EDUCATIONAL"); EnchantmentManager.registerExponentialCostData(consuming, "forbidden:textures/misc/consuming.png", false, (new AspectList()).add(Aspect.ENTROPY, 10), "CONSUMING"); EnchantmentManager.registerExponentialCostData(corrupting, "forbidden:textures/misc/corrupting.png", false, (new AspectList()).add(Aspect.ENTROPY, 20).add(Aspect.FIRE, 15).add(Aspect.EARTH, 10), "CORRUPTING"); + } catch (Throwable e) { } - catch(Throwable e){} } } diff --git a/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentCluster.java b/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentCluster.java new file mode 100644 index 0000000..6f75fa3 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentCluster.java @@ -0,0 +1,37 @@ +package com.spiteful.forbidden.enchantments; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnumEnchantmentType; +import net.minecraft.item.ItemStack; + +import com.spiteful.forbidden.items.ItemMorphPickaxe; + +public class EnchantmentCluster extends Enchantment { + public EnchantmentCluster(int id) { + super(id, 0, EnumEnchantmentType.digger); + setName("cluster"); + } + + @Override + public int getMaxLevel() { + return 4; + } + + @Override + public boolean canApplyTogether(Enchantment ench) { + return super.canApplyTogether(ench) && ench.effectId != Enchantment.fortune.effectId; + } + + @Override + public boolean canApply(ItemStack item) { + if (item.getItem() instanceof ItemMorphPickaxe) + return true; + else + return false; + } + + @Override + public boolean canApplyAtEnchantingTable(ItemStack stack) { + return false; + } +} \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentConsuming.java b/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentConsuming.java new file mode 100644 index 0000000..3a8cdb1 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentConsuming.java @@ -0,0 +1,37 @@ +package com.spiteful.forbidden.enchantments; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnumEnchantmentType; +import net.minecraft.item.ItemPickaxe; +import net.minecraft.item.ItemSpade; +import net.minecraft.item.ItemStack; + +public class EnchantmentConsuming extends Enchantment { + public EnchantmentConsuming(int id) { + super(id, 0, EnumEnchantmentType.digger); + setName("consuming"); + } + + @Override + public int getMaxLevel() { + return 1; + } + + @Override + public boolean canApplyTogether(Enchantment ench) { + return super.canApplyTogether(ench) && ench.effectId != Enchantment.silkTouch.effectId; + } + + @Override + public boolean canApply(ItemStack item) { + if (item.getItem() instanceof ItemPickaxe || item.getItem() instanceof ItemSpade) + return true; + else + return false; + } + + @Override + public boolean canApplyAtEnchantingTable(ItemStack stack) { + return false; + } +} \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentCorrupting.java b/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentCorrupting.java new file mode 100644 index 0000000..b73e180 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentCorrupting.java @@ -0,0 +1,41 @@ +package com.spiteful.forbidden.enchantments; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnumEnchantmentType; +import net.minecraft.item.ItemPickaxe; +import net.minecraft.item.ItemStack; + +public class EnchantmentCorrupting extends Enchantment { + public EnchantmentCorrupting(int id) { + super(id, 0, EnumEnchantmentType.digger); + setName("corrupting"); + } + + @Override + public int getMaxLevel() { + return 1; + } + + @Override + public int getMinEnchantability(int par1) { + return 20; + } + + @Override + public int getMaxEnchantability(int par1) { + return super.getMinEnchantability(par1) + 50; + } + + @Override + public boolean canApply(ItemStack item) { + if (item.getItem() instanceof ItemPickaxe) + return true; + else + return false; + } + + @Override + public boolean canApplyAtEnchantingTable(ItemStack stack) { + return false; + } +} \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentEducational.java b/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentEducational.java new file mode 100644 index 0000000..fe33ebc --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentEducational.java @@ -0,0 +1,27 @@ +package com.spiteful.forbidden.enchantments; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnumEnchantmentType; +import net.minecraft.item.ItemStack; + +public class EnchantmentEducational extends Enchantment { + public EnchantmentEducational(int id) { + super(id, 0, EnumEnchantmentType.weapon); + setName("educational"); + } + + @Override + public int getMaxLevel() { + return 5; + } + + @Override + public boolean canApplyTogether(Enchantment ench) { + return super.canApplyTogether(ench) && ench.effectId != Enchantment.looting.effectId && ench.effectId != DarkEnchantments.greedy.effectId; + } + + @Override + public boolean canApplyAtEnchantingTable(ItemStack stack) { + return false; + } +} \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentEternal.java b/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentEternal.java new file mode 100644 index 0000000..f8d467b --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentEternal.java @@ -0,0 +1,47 @@ +package com.spiteful.forbidden.enchantments; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnumEnchantmentType; +import net.minecraft.item.ItemStack; + +import com.spiteful.forbidden.items.ItemMorphAxe; +import com.spiteful.forbidden.items.ItemMorphPickaxe; +import com.spiteful.forbidden.items.ItemMorphShovel; +import com.spiteful.forbidden.items.ItemMorphSword; + +public class EnchantmentEternal extends Enchantment { + public EnchantmentEternal(int id) { + super(id, 0, EnumEnchantmentType.digger); + setName("eternal"); + } + + @Override + public int getMaxLevel() { + return 1; + } + + @Override + public int getMinEnchantability(int par1) { + return 70; + } + + @Override + public int getMaxEnchantability(int par1) { + return super.getMinEnchantability(par1) + 50; + } + + @Override + public boolean canApplyTogether(Enchantment ench) { + return super.canApplyTogether(ench) && ench.effectId != Enchantment.unbreaking.effectId && ench.effectId != DarkEnchantments.educational.effectId; + } + + @Override + public boolean canApply(ItemStack item) { + return (item.getItem() instanceof ItemMorphPickaxe || item.getItem() instanceof ItemMorphAxe || item.getItem() instanceof ItemMorphSword || item.getItem() instanceof ItemMorphShovel); + } + + @Override + public boolean canApplyAtEnchantingTable(ItemStack stack) { + return false; + } +} \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentGreedy.java b/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentGreedy.java new file mode 100644 index 0000000..43d824a --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentGreedy.java @@ -0,0 +1,37 @@ +package com.spiteful.forbidden.enchantments; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnumEnchantmentType; +import net.minecraft.item.ItemStack; + +public class EnchantmentGreedy extends Enchantment { + public EnchantmentGreedy(int id) { + super(id, 0, EnumEnchantmentType.weapon); + setName("greedy"); + } + + @Override + public int getMaxLevel() { + return 1; + } + + @Override + public int getMinEnchantability(int par1) { + return 20; + } + + @Override + public int getMaxEnchantability(int par1) { + return super.getMinEnchantability(par1) + 50; + } + + @Override + public boolean canApplyTogether(Enchantment ench) { + return super.canApplyTogether(ench) && ench.effectId != Enchantment.looting.effectId && ench.effectId != DarkEnchantments.educational.effectId; + } + + @Override + public boolean canApplyAtEnchantingTable(ItemStack stack) { + return false; + } +} \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentPigBane.java b/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentPigBane.java new file mode 100644 index 0000000..0b2ab92 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/enchantments/EnchantmentPigBane.java @@ -0,0 +1,47 @@ +package com.spiteful.forbidden.enchantments; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnumEnchantmentType; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.EntityPigZombie; +import net.minecraft.entity.passive.EntityPig; +import net.minecraft.item.ItemStack; + +public class EnchantmentPigBane extends Enchantment { + public EnchantmentPigBane(int id) { + super(id, 0, EnumEnchantmentType.weapon); + setName("pigbane"); + } + + @Override + public int getMaxLevel() { + return 5; + } + + @Override + public int getMinEnchantability(int par1) { + return 1 + (par1 - 1) * 8; + } + + @Override + public int getMaxEnchantability(int par1) { + return this.getMinEnchantability(par1) + 20; + } + + @Override + public boolean canApplyTogether(Enchantment ench) { + return super.canApplyTogether(ench) && ench.effectId != Enchantment.sharpness.effectId && ench.effectId != Enchantment.smite.effectId && ench.effectId != Enchantment.baneOfArthropods.effectId; + } + + public float calcModifierLiving(int level, EntityLivingBase victim) { + if (victim instanceof EntityPig || victim instanceof EntityPigZombie) + return (float) level * 4.0F; + else + return 0.0F; + } + + @Override + public boolean canApplyAtEnchantingTable(ItemStack stack) { + return false; + } +} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/items/ForbiddenItems.java b/src/main/java/com/spiteful/forbidden/items/ForbiddenItems.java similarity index 62% rename from src/com/spiteful/forbidden/items/ForbiddenItems.java rename to src/main/java/com/spiteful/forbidden/items/ForbiddenItems.java index 84f34f1..a282526 100644 --- a/src/com/spiteful/forbidden/items/ForbiddenItems.java +++ b/src/main/java/com/spiteful/forbidden/items/ForbiddenItems.java @@ -1,26 +1,38 @@ package com.spiteful.forbidden.items; -import com.spiteful.forbidden.*; -import com.spiteful.forbidden.items.wands.*; - -import cpw.mods.fml.common.registry.GameRegistry; import java.util.Arrays; -import net.minecraft.block.Block; -import net.minecraft.item.EnumToolMaterial; + +import net.minecraft.init.Blocks; import net.minecraft.item.Item; +import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.EnumHelper; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.oredict.OreDictionary; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.oredict.OreDictionary; import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.wands.StaffRod; import thaumcraft.api.wands.WandCap; import thaumcraft.api.wands.WandRod; -import thaumcraft.api.wands.StaffRod; -public class ForbiddenItems -{ +import com.spiteful.forbidden.Config; +import com.spiteful.forbidden.compat.Compat; +import com.spiteful.forbidden.items.wands.BloodStaffUpdate; +import com.spiteful.forbidden.items.wands.BloodWandUpdate; +import com.spiteful.forbidden.items.wands.CreativeWandUpdate; +import com.spiteful.forbidden.items.wands.DarkWandCap; +import com.spiteful.forbidden.items.wands.InfernalWandUpdate; +import com.spiteful.forbidden.items.wands.ItemWandCaps; +import com.spiteful.forbidden.items.wands.ItemWandCores; +import com.spiteful.forbidden.items.wands.ManaStaffUpdate; +import com.spiteful.forbidden.items.wands.ManaWandUpdate; +import com.spiteful.forbidden.items.wands.SoulWandUpdate; +import com.spiteful.forbidden.items.wands.TaintedWandUpdate; +import com.spiteful.forbidden.items.wands.TotemWandUpdate; +import com.spiteful.forbidden.items.wands.YandereWandUpdate; + +import cpw.mods.fml.common.registry.GameRegistry; + +public class ForbiddenItems { public static Item deadlyShards; public static Item gluttonyShard; public static Item skullAxe; @@ -40,10 +52,10 @@ public class ForbiddenItems public static Item ridingCrop; public static Item divinewell; public static Item boundShears; - + public static Item bloodwell; public static Item bloodOrb; - + public static WandRod WAND_ROD_TAINTED; public static WandRod WAND_ROD_INFERNAL; public static WandRod WAND_ROD_NEUTRONIUM; @@ -61,69 +73,62 @@ public class ForbiddenItems public static WandCap WAND_CAP_SOUL; public static WandCap WAND_CAP_MANASTEEL; - public static void addItems() - { - deadlyShards = new ItemDeadlyShard(Config.shardID).setUnlocalizedName("NetherShard"); + public static void addItems() { + deadlyShards = new ItemDeadlyShard().setUnlocalizedName("NetherShard"); GameRegistry.registerItem(deadlyShards, "NetherShard"); OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 0)); OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 1)); OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 3)); - if(!Config.noLust) + if (!Config.noLust) OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 4)); OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 5)); OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 6)); - - gluttonyShard = new ItemGluttonyShard(Config.gluttonyShardID).setUnlocalizedName("GluttonyShard"); + + gluttonyShard = new ItemGluttonyShard().setUnlocalizedName("GluttonyShard"); GameRegistry.registerItem(gluttonyShard, "GluttonyShard"); OreDictionary.registerOre("shardNether", new ItemStack(gluttonyShard, 1, 0)); - - taintShovel = new ItemTaintShovel(Config.taintShovelID, ThaumcraftApi.toolMatElemental).setUnlocalizedName("TaintShovel"); + + taintShovel = new ItemTaintShovel(ThaumcraftApi.toolMatElemental).setUnlocalizedName("TaintShovel"); GameRegistry.registerItem(taintShovel, "TaintShovel"); - MinecraftForge.setToolClass(taintShovel, "shovel", 3); - - taintPickaxe = new ItemTaintPickaxe(Config.taintPickaxeID, ThaumcraftApi.toolMatElemental).setUnlocalizedName("TaintPickaxe"); + + taintPickaxe = new ItemTaintPickaxe(ThaumcraftApi.toolMatElemental).setUnlocalizedName("TaintPickaxe"); GameRegistry.registerItem(taintPickaxe, "TaintPickaxe"); - MinecraftForge.setToolClass(taintPickaxe, "pickaxe", 5); - - arcaneCakeItem = new ItemArcaneCake(Config.arcaneCakeItemID).setUnlocalizedName("ArcaneCake"); + + arcaneCakeItem = new ItemArcaneCake().setUnlocalizedName("ArcaneCake"); GameRegistry.registerItem(arcaneCakeItem, "ArcaneCakeItem"); - - skullAxe = new ItemSkullAxe(Config.skullAxeID, ThaumcraftApi.toolMatElemental).setUnlocalizedName("SkullAxe"); + + skullAxe = new ItemSkullAxe(ThaumcraftApi.toolMatElemental).setUnlocalizedName("SkullAxe"); GameRegistry.registerItem(skullAxe, "SkullAxe"); - - morphPickaxe = new ItemMorphPickaxe(Config.morphPickaxeID, ThaumcraftApi.toolMatElemental).setUnlocalizedName("MorphPickaxe"); + + morphPickaxe = new ItemMorphPickaxe(ThaumcraftApi.toolMatElemental).setUnlocalizedName("MorphPickaxe"); GameRegistry.registerItem(morphPickaxe, "MorphPickaxe"); - MinecraftForge.setToolClass(morphPickaxe, "pickaxe", 4); - - morphSword = new ItemMorphSword(Config.morphSwordID, ThaumcraftApi.toolMatElemental).setUnlocalizedName("MorphSword"); + + morphSword = new ItemMorphSword(ThaumcraftApi.toolMatElemental).setUnlocalizedName("MorphSword"); GameRegistry.registerItem(morphSword, "MorphSword"); - - morphShovel = new ItemMorphShovel(Config.morphShovelID, ThaumcraftApi.toolMatElemental).setUnlocalizedName("MorphShovel"); + + morphShovel = new ItemMorphShovel(ThaumcraftApi.toolMatElemental).setUnlocalizedName("MorphShovel"); GameRegistry.registerItem(morphShovel, "MorphShovel"); - MinecraftForge.setToolClass(morphShovel, "shovel", 4); - - morphAxe = new ItemMorphAxe(Config.morphAxeID, ThaumcraftApi.toolMatElemental).setUnlocalizedName("MorphAxe"); + + morphAxe = new ItemMorphAxe(ThaumcraftApi.toolMatElemental).setUnlocalizedName("MorphAxe"); GameRegistry.registerItem(morphAxe, "MorphAxe"); - MinecraftForge.setToolClass(morphAxe, "axe", 4); - - if(Config.wrathCage) - { - mobCrystal = new ItemMobCrystal(Config.mobCrystalID).setUnlocalizedName("MobCrystal"); + + if (Config.wrathCage) { + mobCrystal = new ItemMobCrystal().setUnlocalizedName("MobCrystal"); GameRegistry.registerItem(mobCrystal, "MobCrystal"); } - - fork = new ItemDiabolistFork(Config.forkID, ThaumcraftApi.toolMatThaumium).setUnlocalizedName("DiabolistFork"); - if(Config.spork) + + fork = new ItemDiabolistFork(ThaumcraftApi.toolMatThaumium).setUnlocalizedName("DiabolistFork"); + if (Config.spork) fork.setUnlocalizedName("DiabolistSpork"); GameRegistry.registerItem(fork, "DiabolistFork"); - - wandCore = new ItemWandCores(Config.wandCoreID).setUnlocalizedName("WandCores"); + + wandCore = new ItemWandCores().setUnlocalizedName("WandCores"); GameRegistry.registerItem(wandCore, "WandCores"); - wandCap = new ItemWandCaps(Config.wandCapID).setUnlocalizedName("WandCaps"); + wandCap = new ItemWandCaps().setUnlocalizedName("WandCaps"); GameRegistry.registerItem(wandCap, "WandCaps"); WAND_ROD_TAINTED = new WandRod("tainted", 150, new ItemStack(wandCore, 1, 0), 12, new TaintedWandUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_tainted.png")); WAND_ROD_INFERNAL = new WandRod("infernal", 150, new ItemStack(wandCore, 1, 1), 12, new InfernalWandUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_infernal.png")); - WAND_ROD_NEUTRONIUM = new WandRod("neutronium", 9001, new ItemStack(Block.bedrock, 1), 1000, new CreativeWandUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_neutronium.png")); + WAND_ROD_NEUTRONIUM = new WandRod("neutronium", 9001, new ItemStack(Blocks.bedrock, 1), 1000, new CreativeWandUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_neutronium.png")); WAND_ROD_NEUTRONIUM.setGlowing(true); WAND_ROD_SOUL = new WandRod("soul", 100, new ItemStack(wandCore, 1, 2), 12, new SoulWandUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_soul.png")); WAND_ROD_SOUL.setGlowing(true); @@ -132,47 +137,43 @@ public class ForbiddenItems WAND_ROD_TOTEM = new WandRod("totem", 50, new ItemStack(wandCore, 1, 5), 4, new TotemWandUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_totem.png")); WAND_ROD_LIVINGWOOD = new WandRod("livingwood", 100, new ItemStack(wandCore, 1, 7), 12, new YandereWandUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_livingwood.png")); STAFF_ROD_BLOOD = new StaffRod("blood", 50, new ItemStack(wandCore, 1, 9), 24, new BloodStaffUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_blood.png")); - STAFF_ROD_NEUTRONIUM = new StaffRod("neutronium", 9002, new ItemStack(Block.bedrock, 1), 1000, new CreativeWandUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_neutronium.png")); + STAFF_ROD_NEUTRONIUM = new StaffRod("neutronium", 9002, new ItemStack(Blocks.bedrock, 1), 1000, new CreativeWandUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_neutronium.png")); STAFF_ROD_NEUTRONIUM.setGlowing(true); STAFF_ROD_WITCHWOOD = new StaffRod("witchwood", 50, new ItemStack(wandCore, 1, 10), 24, new ManaStaffUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_witchwood.png")); - WAND_CAP_ORICHALCUM = new DarkWandCap("orichalcum", 0.0F, new ItemStack(Block.commandBlock, 1), 1000, new ResourceLocation("forbidden", "textures/models/wand_cap_orichalcum.png")); - WAND_CAP_ALCHEMICAL = new DarkWandCap("alchemical", 0.9F, Arrays.asList(new Aspect[]{Aspect.WATER}), 0.8F, new ItemStack(wandCap, 1, 0), 7, new ResourceLocation("forbidden", "textures/models/wand_cap_alchemical.png")); + WAND_CAP_ORICHALCUM = new DarkWandCap("orichalcum", 0.0F, new ItemStack(Blocks.command_block, 1), 1000, new ResourceLocation("forbidden", "textures/models/wand_cap_orichalcum.png")); + WAND_CAP_ALCHEMICAL = new DarkWandCap("alchemical", 0.9F, Arrays.asList(new Aspect[] { Aspect.WATER }), 0.8F, new ItemStack(wandCap, 1, 0), 7, new ResourceLocation("forbidden", "textures/models/wand_cap_alchemical.png")); WAND_CAP_VINTEUM = new DarkWandCap("vinteum", 0.9F, new ItemStack(wandCap, 1, 1), 6, new ResourceLocation("forbidden", "textures/models/wand_cap_vinteum.png")); - WAND_CAP_SOUL = new DarkWandCap("soul", 0.9F, Arrays.asList(new Aspect[]{Aspect.ENTROPY}), 0.8F, new ItemStack(wandCap, 1, 2), 7, new ResourceLocation("forbidden", "textures/models/wand_cap_soul.png")); + WAND_CAP_SOUL = new DarkWandCap("soul", 0.9F, Arrays.asList(new Aspect[] { Aspect.ENTROPY }), 0.8F, new ItemStack(wandCap, 1, 2), 7, new ResourceLocation("forbidden", "textures/models/wand_cap_soul.png")); WAND_CAP_MANASTEEL = new DarkWandCap("manasteel", 0.9F, new ItemStack(wandCap, 1, 3), 6, new ResourceLocation("forbidden", "textures/models/wand_cap_manasteel.png")); - - resource = new ItemResource(Config.resourceID).setUnlocalizedName("FMResource"); + + resource = new ItemResource().setUnlocalizedName("FMResource"); GameRegistry.registerItem(resource, "FMResource"); OreDictionary.registerOre("nuggetEmerald", new ItemStack(resource, 1, 0)); OreDictionary.registerOre("dyeBlack", new ItemStack(resource, 1, 1)); - - if(Compat.bm) - { - try - { - bloodwell = new ItemBloodwell(Config.bloodwellID).setUnlocalizedName("Bloodwell"); + + if (Compat.bm) { + try { + bloodwell = new ItemBloodwell().setUnlocalizedName("Bloodwell"); GameRegistry.registerItem(bloodwell, "Bloodwell"); - - bloodOrb = new ItemDivineOrb(Config.bloodOrbID).setUnlocalizedName("DivineOrb"); + + bloodOrb = new ItemDivineOrb().setUnlocalizedName("DivineOrb"); GameRegistry.registerItem(bloodOrb, "DivineOrb"); - } - catch(Throwable e) - { + } catch (Throwable e) { e.printStackTrace(); } } - - crystalwell = new ItemCrystalwell(Config.crystalwellID).setUnlocalizedName("Crystalwell"); + + crystalwell = new ItemCrystalwell().setUnlocalizedName("Crystalwell"); GameRegistry.registerItem(crystalwell, "Crystalwell"); - - ridingCrop = new ItemRidingCrop(Config.ridingCropID, EnumToolMaterial.WOOD).setUnlocalizedName("RidingCrop"); + + ridingCrop = new ItemRidingCrop(ToolMaterial.WOOD).setUnlocalizedName("RidingCrop"); GameRegistry.registerItem(ridingCrop, "RidingCrop"); - - divinewell = new ItemDivinewell(Config.divinewellID).setUnlocalizedName("Divinewell"); + + divinewell = new ItemDivinewell().setUnlocalizedName("Divinewell"); GameRegistry.registerItem(divinewell, "Divinewell"); - - //boundShears = new ItemBoundShears(Config.boundShearsID, ThaumcraftApi.toolMatThaumium).setUnlocalizedName("BoundShears"); - //GameRegistry.registerItem(boundShears, "BoundSHears"); - + + // boundShears = new ItemBoundShears(Config.boundShearsID, + // ThaumcraftApi.toolMatThaumium).setUnlocalizedName("BoundShears"); + // GameRegistry.registerItem(boundShears, "BoundSHears"); } } \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/items/ItemArcaneCake.java b/src/main/java/com/spiteful/forbidden/items/ItemArcaneCake.java new file mode 100644 index 0000000..0ac3fce --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/items/ItemArcaneCake.java @@ -0,0 +1,84 @@ +package com.spiteful.forbidden.items; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import com.spiteful.forbidden.Forbidden; +import com.spiteful.forbidden.blocks.ForbiddenBlocks; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemArcaneCake extends Item { + public ItemArcaneCake() { + this.setCreativeTab(Forbidden.tab); + } + + @Override + public boolean onItemUse(ItemStack stack, EntityPlayer player, World yWorld, int z, int par5, int par6, int par7, float par8, float par9, float par10) { + Block block = yWorld.getBlock(z, par5, par6); + + if (block == Blocks.snow_layer && (yWorld.getBlockMetadata(z, par5, par6) & 7) < 1) { + par7 = 1; + } else if (block != Blocks.vine && block != Blocks.tallgrass && block != Blocks.deadbush) { + if (par7 == 0) { + --par5; + } + + if (par7 == 1) { + ++par5; + } + + if (par7 == 2) { + --par6; + } + + if (par7 == 3) { + ++par6; + } + + if (par7 == 4) { + --z; + } + + if (par7 == 5) { + ++z; + } + } + + if (!player.canPlayerEdit(z, par5, par6, par7, stack)) { + return false; + } else if (stack.stackSize == 0) { + return false; + } else { + Block cake = ForbiddenBlocks.arcaneCake; + if (yWorld.canPlaceEntityOnSide(cake, z, par5, par6, false, par7, (Entity) null, stack)) { + int j1 = cake.onBlockPlaced(yWorld, z, par5, par6, par7, par8, par9, par10, 0); + + if (yWorld.setBlock(z, par5, par6, cake, j1, 3)) { + if (yWorld.getBlock(z, par5, par6) == cake) { + cake.onBlockPlacedBy(yWorld, z, par5, par6, player, stack); + cake.onPostBlockPlaced(yWorld, z, par5, par6, j1); + } + + yWorld.playSoundEffect((double) ((float) z + 0.5F), (double) ((float) par5 + 0.5F), (double) ((float) par6 + 0.5F), block.stepSound.soundName, (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F); + --stack.stackSize; + } + } + + return true; + } + } + + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister ir) { + this.itemIcon = ir.registerIcon("forbidden:cake"); + } +} diff --git a/src/main/java/com/spiteful/forbidden/items/ItemBloodwell.java b/src/main/java/com/spiteful/forbidden/items/ItemBloodwell.java new file mode 100644 index 0000000..5098814 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/items/ItemBloodwell.java @@ -0,0 +1,104 @@ +package com.spiteful.forbidden.items; + +import java.util.List; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import thaumcraft.api.IScribeTools; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; + +import com.spiteful.forbidden.Forbidden; +import com.spiteful.forbidden.compat.Compat; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemBloodwell extends Item implements IScribeTools, IBindable { + + @SideOnly(Side.CLIENT) + public IIcon icon; + + public ItemBloodwell() { + maxStackSize = 1; + canRepair = false; + setMaxDamage(5); + setCreativeTab(Forbidden.tab); + setHasSubtypes(false); + } + + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister ir) { + this.icon = ir.registerIcon("forbidden:bloodwell"); + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIconFromDamage(int par1) { + return this.icon; + } + + @Override + public void onUpdate(ItemStack stack, World world, Entity fauxplayer, int z, boolean par5) { + if (Compat.bm && stack.getItemDamage() > 0 && stack.hasTagCompound()) { + EntityPlayer player = null; + if (fauxplayer instanceof EntityPlayer) + player = (EntityPlayer) fauxplayer; + else + return; + + try { + if (player.capabilities.isCreativeMode) + stack.setItemDamage(0); + else if (SoulNetworkHandler.syphonFromNetwork(stack, 25) > 0) + stack.setItemDamage(stack.getItemDamage() - 1); + else if (player.getHealth() > 6) { + player.setHealth(player.getHealth() - 2); + stack.setItemDamage(stack.getItemDamage() - 1); + } + } catch (Throwable e) { + } + } + } + + @Override + public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { + if (Compat.bm) { + try { + SoulNetworkHandler.checkAndSetItemOwner(itemstack, player); + } catch (Throwable e) { + } + } + return itemstack; + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean z) { + if (stack.hasTagCompound()) { + list.add(""); + list.add("Current owner: " + stack.stackTagCompound.getString("ownerName")); + } + } + + @Override + public void setDamage(ItemStack stack, int damage) { + if (damage > 0) { + + try { + if (SoulNetworkHandler.syphonFromNetwork(stack, 25 * damage) > 0) + super.setDamage(stack, 0); + else + super.setDamage(stack, damage); + } catch (Throwable e) { + super.setDamage(stack, damage); + } + } else + super.setDamage(stack, damage); + } +} \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/items/ItemBoundShears.java b/src/main/java/com/spiteful/forbidden/items/ItemBoundShears.java new file mode 100644 index 0000000..f144672 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/items/ItemBoundShears.java @@ -0,0 +1,64 @@ +package com.spiteful.forbidden.items; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.EnumAction; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemSword; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; + +import com.spiteful.forbidden.Forbidden; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemBoundShears extends ItemSword implements IBindable { + + public IIcon icon; + + public ItemBoundShears(ToolMaterial mat) { + super(mat); + this.setCreativeTab(Forbidden.tab); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister ir) { + this.icon = ir.registerIcon("forbidden:bound_shears"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int meta) { + return this.icon; + } + + @Override + public float getDigSpeed(ItemStack stack, Block block, int meta) { + return block != Blocks.web && block != Blocks.leaves && block != Blocks.leaves2 ? (block == Blocks.wool ? 5.0F : super.func_150893_a(stack, block)) : 15.0F; + } + + @Override + public EnumAction getItemUseAction(ItemStack stack) { + return EnumAction.none; + } + + @Override + public int getMaxItemUseDuration(ItemStack stack) { + return 0; + } + + @Override + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { + return stack; + } + + @Override + public boolean canHarvestBlock(Block block, ItemStack stack) { + return block == Blocks.web || block == Blocks.redstone_wire || block == Blocks.tripwire; + } +} \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/items/ItemCrystalwell.java b/src/main/java/com/spiteful/forbidden/items/ItemCrystalwell.java new file mode 100644 index 0000000..62185d9 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/items/ItemCrystalwell.java @@ -0,0 +1,77 @@ +package com.spiteful.forbidden.items; + +import java.util.Iterator; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import thaumcraft.api.IScribeTools; +import thaumcraft.api.ItemApi; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.common.Thaumcraft; +import thaumcraft.common.lib.network.playerdata.PacketAspectPool; + +import com.spiteful.forbidden.Forbidden; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemCrystalwell extends Item implements IScribeTools { + + @SideOnly(Side.CLIENT) + public IIcon icon; + + public ItemCrystalwell() { + maxStackSize = 1; + canRepair = false; + setMaxDamage(100); + setCreativeTab(Forbidden.tab); + setHasSubtypes(false); + + } + + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister ir) { + this.icon = ir.registerIcon("forbidden:crystalwell"); + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIconFromDamage(int par1) { + return this.icon; + } + + @Override + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { + if (stack.getItemDamage() >= 100) { + if (!world.isRemote) { + Iterator count = Aspect.getPrimalAspects().iterator(); + + while (count.hasNext()) { + Aspect aspect = (Aspect) count.next(); + short amount = (short) (world.rand.nextInt(3) + 4); + Thaumcraft.proxy.playerKnowledge.addAspectPool(player.getDisplayName(), aspect, amount); + Thaumcraft.packetPipeline.sendTo(new PacketAspectPool(aspect.getTag(), Short.valueOf((short) amount), Short.valueOf(Thaumcraft.proxy.getPlayerKnowledge().getAspectPoolFor(player.getCommandSenderName(), aspect))), (EntityPlayerMP) player); + } + } + player.swingItem(); + return ItemApi.getItem("itemInkwell", 100); + } else + return stack; + } + + /** + * Render Pass sensitive version of hasEffect() + */ + @SideOnly(Side.CLIENT) + @Override + public boolean hasEffect(ItemStack stack, int pass) { + return stack.getItemDamage() >= 100; + } + +} \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/items/ItemDeadlyShard.java b/src/main/java/com/spiteful/forbidden/items/ItemDeadlyShard.java new file mode 100644 index 0000000..b0458c7 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/items/ItemDeadlyShard.java @@ -0,0 +1,60 @@ +package com.spiteful.forbidden.items; + +import java.util.List; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; + +import com.spiteful.forbidden.Config; +import com.spiteful.forbidden.Forbidden; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemDeadlyShard extends Item { + public static final String[] vices = new String[] { "wrath", "envy", "taint", "pride", "lust", "sloth", "greed" }; + + @SideOnly(Side.CLIENT) + public IIcon[] icons; + + public ItemDeadlyShard() { + this.setMaxStackSize(64); + this.setHasSubtypes(true); + this.setMaxDamage(0); + this.setCreativeTab(Forbidden.tab); + if (Config.noLust) + vices[4] = "despair"; + } + + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister ir) { + icons = new IIcon[7]; + + for (int x = 0; x < 7; x++) { + icons[x] = ir.registerIcon("forbidden:" + vices[x] + "shard"); + } + } + + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int dam) { + return this.icons[dam]; + } + + @Override + public String getUnlocalizedName(ItemStack stack) { + int i = MathHelper.clamp_int(stack.getItemDamage(), 0, 6); + return super.getUnlocalizedName() + "." + vices[i]; + } + + @SideOnly(Side.CLIENT) + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int j = 0; j < 7; ++j) { + list.add(new ItemStack(item, 1, j)); + } + } +} diff --git a/src/main/java/com/spiteful/forbidden/items/ItemDiabolistFork.java b/src/main/java/com/spiteful/forbidden/items/ItemDiabolistFork.java new file mode 100644 index 0000000..0ca50a6 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/items/ItemDiabolistFork.java @@ -0,0 +1,73 @@ +package com.spiteful.forbidden.items; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.EnumAction; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemSword; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import thaumcraft.api.IRepairable; + +import com.spiteful.forbidden.Config; +import com.spiteful.forbidden.Forbidden; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemDiabolistFork extends ItemSword implements IRepairable { + + public IIcon icon; + + public ItemDiabolistFork(ToolMaterial mat) { + super(mat); + this.setCreativeTab(Forbidden.tab); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister ir) { + if (Config.spork) + this.icon = ir.registerIcon("forbidden:spork"); + else + this.icon = ir.registerIcon("forbidden:fork"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int meta) { + return this.icon; + } + + @Override + public float getDigSpeed(ItemStack stack, Block block, int meta) { + return 1.0F; + } + + @Override + public EnumAction getItemUseAction(ItemStack stack) { + return EnumAction.none; + } + + @Override + public int getMaxItemUseDuration(ItemStack stack) { + return 0; + } + + @Override + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { + return stack; + } + + @Override + public boolean getIsRepairable(ItemStack stack, ItemStack stack2) { + return stack2.getItem() == Items.quartz ? true : super.getIsRepairable(stack, stack2); + } + + @Override + public boolean canHarvestBlock(Block block, ItemStack itemStack) { + return false; + } +} \ No newline at end of file diff --git a/src/com/spiteful/forbidden/items/ItemDivineOrb.java b/src/main/java/com/spiteful/forbidden/items/ItemDivineOrb.java similarity index 52% rename from src/com/spiteful/forbidden/items/ItemDivineOrb.java rename to src/main/java/com/spiteful/forbidden/items/ItemDivineOrb.java index 1785274..05842bb 100644 --- a/src/com/spiteful/forbidden/items/ItemDivineOrb.java +++ b/src/main/java/com/spiteful/forbidden/items/ItemDivineOrb.java @@ -1,87 +1,80 @@ package com.spiteful.forbidden.items; -import com.spiteful.forbidden.*; - import java.util.List; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; + +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -public class ItemDivineOrb extends Item implements IBloodOrb, IBindable -{ - public ItemDivineOrb(int id) - { - super(id); +import com.spiteful.forbidden.Forbidden; +import com.spiteful.forbidden.compat.Compat; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemDivineOrb extends Item implements IBloodOrb, IBindable { + public ItemDivineOrb() { setCreativeTab(Forbidden.tab); - AltarRecipeRegistry.registerAltarOrbRecipe(new ItemStack(this),5,140); + AltarRecipeRegistry.registerAltarOrbRecipe(new ItemStack(this), 5, 140); } @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) - { + public void registerIcons(IIconRegister iconRegister) { this.itemIcon = iconRegister.registerIcon("forbidden:divineorb"); } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add("Stores raw Life Essence"); - if (!(par1ItemStack.stackTagCompound == null)) - { - par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName")); - } - - } - @Override - public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) - { - if(Compat.bm) + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { + list.add("Stores raw Life Essence"); + + if (!(stack.stackTagCompound == null)) { + list.add("Current owner: " + stack.stackTagCompound.getString("ownerName")); + } + + } + + @Override + public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { + if (Compat.bm) SoulNetworkHandler.checkAndSetItemOwner(itemstack, player); - - if (world != null) - { - double posX = player.posX; - double posY = player.posY; - double posZ = player.posZ; - world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - } - if(!world.isRemote) - { + + if (world != null) { + double posX = player.posX; + double posY = player.posY; + double posZ = player.posZ; + world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); + } + if (!world.isRemote) { return itemstack; } - + NBTTagCompound itemTag = itemstack.stackTagCompound; - if (itemTag == null || itemTag.getString("ownerName").equals("")) - { - return itemstack; - } - + if (itemTag == null || itemTag.getString("ownerName").equals("")) { + return itemstack; + } + player.setHealth(player.getHealth() - 1); SoulNetworkHandler.addCurrentEssenceToMaximum(itemTag.getString("ownerName"), 200, 700000000); - + return itemstack; } - - public int getMaxEssence() - { + + @Override + public int getMaxEssence() { return 70000000; } - public int getOrbLevel() - { + @Override + public int getOrbLevel() { return 5; } } \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/items/ItemDivinewell.java b/src/main/java/com/spiteful/forbidden/items/ItemDivinewell.java new file mode 100644 index 0000000..d39eb13 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/items/ItemDivinewell.java @@ -0,0 +1,55 @@ +package com.spiteful.forbidden.items; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import thaumcraft.api.IScribeTools; + +import com.spiteful.forbidden.Forbidden; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemDivinewell extends Item implements IScribeTools { + + @SideOnly(Side.CLIENT) + public IIcon icon; + + public ItemDivinewell() { + maxStackSize = 1; + canRepair = false; + setMaxDamage(100); + setCreativeTab(Forbidden.tab); + setHasSubtypes(false); + } + + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister ir) { + this.icon = ir.registerIcon("forbidden:divinewell"); + } + + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) { + return this.icon; + } + +/* @Override + public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) + { + if(Compat.bm) + { + try + { + SoulNetworkHandler.checkAndSetItemOwner(itemstack, player); + } + catch (Throwable e){} + } + return itemstack; + } */ + + @Override + public void setDamage(ItemStack stack, int damage) { + super.setDamage(stack, 0); + } +} \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/items/ItemGluttonyShard.java b/src/main/java/com/spiteful/forbidden/items/ItemGluttonyShard.java new file mode 100644 index 0000000..f6d534d --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/items/ItemGluttonyShard.java @@ -0,0 +1,31 @@ +package com.spiteful.forbidden.items; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.ItemFood; +import net.minecraft.util.IIcon; + +import com.spiteful.forbidden.Forbidden; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemGluttonyShard extends ItemFood { + IIcon icon; + + public ItemGluttonyShard() { + super(2, 0.1F, false); + this.setCreativeTab(Forbidden.tab); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister ir) { + this.icon = ir.registerIcon("forbidden:gluttonyshard"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) { + return this.icon; + } +} \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/items/ItemMobCrystal.java b/src/main/java/com/spiteful/forbidden/items/ItemMobCrystal.java new file mode 100644 index 0000000..5ee120d --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/items/ItemMobCrystal.java @@ -0,0 +1,109 @@ +package com.spiteful.forbidden.items; + +import java.util.List; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.IIcon; +import net.minecraft.util.StatCollector; +import thaumcraft.api.aspects.Aspect; + +import com.spiteful.forbidden.Config; +import com.spiteful.forbidden.Forbidden; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemMobCrystal extends Item { + + IIcon[] icons; + + public ItemMobCrystal() { + this.setMaxStackSize(1); + // this.setHasSubtypes(true); + this.setMaxDamage(0); + this.setCreativeTab(Forbidden.crysTab); + } + + @SideOnly(Side.CLIENT) + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean z) { + if (stack.hasTagCompound()) { + NBTTagCompound nbttagcompound = stack.getTagCompound(); + String string = nbttagcompound.getString("mob"); + + if (string != null) { + Aspect mobAspect = Config.spawnerMobs.get(string); + if (mobAspect != null) + list.add(mobAspect.getName()); + } + } + } + + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister ir) { + icons = new IIcon[2]; + + icons[0] = ir.registerIcon("forbidden:emptycrystal"); + icons[1] = ir.registerIcon("forbidden:mobcrystal"); + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { + if (stack.hasTagCompound()) { + NBTTagCompound nbttagcompound = stack.getTagCompound(); + String string = nbttagcompound.getString("mob"); + + if (string != null) + return icons[1]; + } + + return icons[0]; + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIconIndex(ItemStack stack) { + if (stack.hasTagCompound()) { + NBTTagCompound nbttagcompound = stack.getTagCompound(); + String string = nbttagcompound.getString("mob"); + + if (string != null) + return icons[1]; + } + + return icons[0]; + } + + @SideOnly(Side.CLIENT) + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + list.add(new ItemStack(item, 1, 0)); + + for (String mob : Config.spawnerMobs.keySet()) { + ItemStack crystal = new ItemStack(item, 1, 0); + crystal.setTagCompound(new NBTTagCompound()); + crystal.stackTagCompound.setString("mob", mob); + list.add(crystal); + } + } + + @Override + public String getItemStackDisplayName(ItemStack stack) { + if (stack.hasTagCompound()) { + NBTTagCompound nbttagcompound = stack.getTagCompound(); + String string = nbttagcompound.getString("mob"); + + if (string != null) + return ("" + StatCollector.translateToLocal("entity." + string + ".name") + " " + StatCollector.translateToLocal("item.MobCrystal.name")).trim(); + } + + return ("" + StatCollector.translateToLocal("item.MobCrystalEmpty.name")).trim(); + } +} diff --git a/src/com/spiteful/forbidden/items/ItemMorphAxe.java b/src/main/java/com/spiteful/forbidden/items/ItemMorphAxe.java similarity index 54% rename from src/com/spiteful/forbidden/items/ItemMorphAxe.java rename to src/main/java/com/spiteful/forbidden/items/ItemMorphAxe.java index 20bbe6c..d174013 100644 --- a/src/com/spiteful/forbidden/items/ItemMorphAxe.java +++ b/src/main/java/com/spiteful/forbidden/items/ItemMorphAxe.java @@ -1,145 +1,122 @@ package com.spiteful.forbidden.items; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemAxe; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import thaumcraft.api.IRepairable; + import com.spiteful.forbidden.Forbidden; -import com.spiteful.forbidden.Config; import com.spiteful.forbidden.enchantments.DarkEnchantments; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.EnumToolMaterial; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemAxe; -import net.minecraft.block.Block; -import net.minecraft.nbt.*; -import net.minecraft.util.Icon; -import net.minecraft.world.World; -import thaumcraft.api.IRepairable; -import thaumcraft.api.ItemApi; -import net.minecraftforge.common.ForgeHooks; -public class ItemMorphAxe extends ItemAxe implements IRepairable -{ - public Icon[] icon; +public class ItemMorphAxe extends ItemAxe implements IRepairable { + public IIcon[] icon; - public ItemMorphAxe(int i, EnumToolMaterial enumtoolmaterial) - { - super(i, enumtoolmaterial); + public ItemMorphAxe(ToolMaterial enumtoolmaterial) { + super(enumtoolmaterial); this.setCreativeTab(Forbidden.tab); + this.setHarvestLevel("axe", 4); } @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister ir) - { - icon = new Icon[2]; + public void registerIcons(IIconRegister ir) { + icon = new IIcon[2]; this.icon[0] = ir.registerIcon("forbidden:chameleonaxe"); this.icon[1] = ir.registerIcon("forbidden:eyeaxe"); } @SideOnly(Side.CLIENT) - public Icon getIconFromDamageForRenderPass(int par1, int renderPass) { - return renderPass != 1?icon[0]:icon[1]; + public IIcon getIconFromDamageForRenderPass(int par1, int renderPass) { + return renderPass != 1 ? icon[0] : icon[1]; } - public EnumRarity getRarity(ItemStack itemstack) - { + public EnumRarity getRarity(ItemStack itemstack) { return EnumRarity.epic; } - public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) - { - return par2ItemStack.isItemEqual(new ItemStack(ForbiddenItems.deadlyShards, 1, 1)) ? true : super.getIsRepairable(par1ItemStack, par2ItemStack); + public boolean getIsRepairable(ItemStack stack, ItemStack stack2) { + return stack2.isItemEqual(new ItemStack(ForbiddenItems.deadlyShards, 1, 1)) ? true : super.getIsRepairable(stack, stack2); } @Override - /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer - */ - public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) - { - if(player.isSneaking() && itemstack.hasTagCompound() && getMaxDamage() - itemstack.getItemDamage() > 5){ + public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { + if (player.isSneaking() && itemstack.hasTagCompound() && getMaxDamage() - itemstack.getItemDamage() > 5) { NBTTagCompound tags = itemstack.getTagCompound(); byte phase = tags.getByte("phase"); NBTTagList enchants = itemstack.getEnchantmentTagList(); - if(enchants != null) + if (enchants != null) tags.setTag("enchants" + phase, enchants); else tags.removeTag("enchants" + phase); - if(tags.hasKey("display")) - { + if (tags.hasKey("display")) { String name = tags.getCompoundTag("display").getString("Name"); - if(name != null && !name.equals("")) + if (name != null && !name.equals("")) tags.getCompoundTag("display").setString("Name" + phase, name); else tags.getCompoundTag("display").removeTag("Name" + phase); } - if(++phase > 2) + if (++phase > 2) phase = 0; tags.setByte("phase", phase); - enchants = (NBTTagList)(tags.getTag("enchants" + phase)); - if(enchants == null) + enchants = (NBTTagList) (tags.getTag("enchants" + phase)); + if (enchants == null) tags.removeTag("ench"); else tags.setTag("ench", enchants); - - if(tags.hasKey("display")) - { + + if (tags.hasKey("display")) { String name = tags.getCompoundTag("display").getString("Name" + phase); - if(name != null && !name.equals("")) + if (name != null && !name.equals("")) tags.getCompoundTag("display").setString("Name", name); else tags.getCompoundTag("display").removeTag("Name"); } - + itemstack.setTagCompound(tags); itemstack.damageItem(5, player); player.swingItem(); world.playSoundEffect(player.posX, player.posY, player.posZ, "thaumcraft:wandfail", 0.2F, 0.2F + world.rand.nextFloat() * 0.2F); - } + } return itemstack; } - + @Override @SideOnly(Side.CLIENT) - public int getColorFromItemStack(ItemStack itemstack, int renderpass) - { - if(renderpass != 1) + public int getColorFromItemStack(ItemStack itemstack, int renderpass) { + if (renderpass != 1) return 16777215; - else - { - if(!itemstack.hasTagCompound()) + else { + if (!itemstack.hasTagCompound()) return 0x980000; byte phase = itemstack.getTagCompound().getByte("phase"); - if(phase == 1) + if (phase == 1) return 0x0010CC; - else if(phase == 2) + else if (phase == 2) return 0xE5DA00; else return 0x980000; } } - + @SideOnly(Side.CLIENT) public boolean requiresMultipleRenderPasses() { return true; } - - /** - * Set the damage for this itemstack. Note, this method is responsible for zero checking. - * @param stack the stack - * @param damage the new damage value - */ - public void setDamage(ItemStack stack, int damage) - { - if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.eternal.effectId, stack) > 0) + + public void setDamage(ItemStack stack, int damage) { + if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.eternal.effectId, stack) > 0) super.setDamage(stack, 0); else super.setDamage(stack, damage); - } - + } + } diff --git a/src/com/spiteful/forbidden/items/ItemMorphPickaxe.java b/src/main/java/com/spiteful/forbidden/items/ItemMorphPickaxe.java similarity index 53% rename from src/com/spiteful/forbidden/items/ItemMorphPickaxe.java rename to src/main/java/com/spiteful/forbidden/items/ItemMorphPickaxe.java index 5a0c34f..9a661e1 100644 --- a/src/com/spiteful/forbidden/items/ItemMorphPickaxe.java +++ b/src/main/java/com/spiteful/forbidden/items/ItemMorphPickaxe.java @@ -1,145 +1,127 @@ package com.spiteful.forbidden.items; -import com.spiteful.forbidden.Forbidden; -import com.spiteful.forbidden.Config; -import com.spiteful.forbidden.enchantments.DarkEnchantments; - -import java.lang.reflect.Field; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; -import net.minecraft.item.EnumToolMaterial; -import net.minecraft.item.ItemStack; import net.minecraft.item.ItemPickaxe; -import net.minecraft.block.Block; -import net.minecraft.nbt.*; -import net.minecraft.util.Icon; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.IIcon; import net.minecraft.world.World; import thaumcraft.api.IRepairable; -import thaumcraft.api.ItemApi; -import net.minecraftforge.common.ForgeHooks; -public class ItemMorphPickaxe extends ItemPickaxe implements IRepairable -{ - public Icon[] icon; +import com.spiteful.forbidden.Forbidden; +import com.spiteful.forbidden.enchantments.DarkEnchantments; - public ItemMorphPickaxe(int i, EnumToolMaterial enumtoolmaterial) - { - super(i, enumtoolmaterial); +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemMorphPickaxe extends ItemPickaxe implements IRepairable { + public IIcon[] icon; + + public ItemMorphPickaxe(ToolMaterial enumtoolmaterial) { + super(enumtoolmaterial); this.setCreativeTab(Forbidden.tab); + this.setHarvestLevel("pickaxe", 4); } @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister ir) - { - icon = new Icon[2]; + @Override + public void registerIcons(IIconRegister ir) { + icon = new IIcon[2]; this.icon[0] = ir.registerIcon("forbidden:chameleonpick"); this.icon[1] = ir.registerIcon("forbidden:eyepick"); } @SideOnly(Side.CLIENT) - public Icon getIconFromDamageForRenderPass(int par1, int renderPass) { - return renderPass != 1?icon[0]:icon[1]; - } - - public EnumRarity getRarity(ItemStack itemstack) - { - return EnumRarity.epic; - } - - public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) - { - return par2ItemStack.isItemEqual(new ItemStack(ForbiddenItems.deadlyShards, 1, 1)) ? true : super.getIsRepairable(par1ItemStack, par2ItemStack); + @Override + public IIcon getIconFromDamageForRenderPass(int par1, int renderPass) { + return renderPass != 1 ? icon[0] : icon[1]; } @Override - /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer - */ - public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) - { - if(player.isSneaking() && itemstack.hasTagCompound() && getMaxDamage() - itemstack.getItemDamage() > 5){ + public EnumRarity getRarity(ItemStack itemstack) { + return EnumRarity.epic; + } + + @Override + public boolean getIsRepairable(ItemStack stack, ItemStack stack2) { + return stack2.isItemEqual(new ItemStack(ForbiddenItems.deadlyShards, 1, 1)) ? true : super.getIsRepairable(stack, stack2); + } + + @Override + public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { + if (player.isSneaking() && itemstack.hasTagCompound() && getMaxDamage() - itemstack.getItemDamage() > 5) { NBTTagCompound tags = itemstack.getTagCompound(); byte phase = tags.getByte("phase"); NBTTagList enchants = itemstack.getEnchantmentTagList(); - if(enchants != null) + if (enchants != null) tags.setTag("enchants" + phase, enchants); else tags.removeTag("enchants" + phase); - if(tags.hasKey("display")) - { + if (tags.hasKey("display")) { String name = tags.getCompoundTag("display").getString("Name"); - if(name != null && !name.equals("")) + if (name != null && !name.equals("")) tags.getCompoundTag("display").setString("Name" + phase, name); else tags.getCompoundTag("display").removeTag("Name" + phase); } - if(++phase > 2) + if (++phase > 2) phase = 0; tags.setByte("phase", phase); - enchants = (NBTTagList)(tags.getTag("enchants" + phase)); - if(enchants == null) + enchants = (NBTTagList) (tags.getTag("enchants" + phase)); + if (enchants == null) tags.removeTag("ench"); else tags.setTag("ench", enchants); - - if(tags.hasKey("display")) - { + + if (tags.hasKey("display")) { String name = tags.getCompoundTag("display").getString("Name" + phase); - if(name != null && !name.equals("")) + if (name != null && !name.equals("")) tags.getCompoundTag("display").setString("Name", name); else tags.getCompoundTag("display").removeTag("Name"); } - + itemstack.setTagCompound(tags); itemstack.damageItem(5, player); player.swingItem(); world.playSoundEffect(player.posX, player.posY, player.posZ, "thaumcraft:wandfail", 0.2F, 0.2F + world.rand.nextFloat() * 0.2F); - } + } return itemstack; } - - @Override + @SideOnly(Side.CLIENT) - public int getColorFromItemStack(ItemStack itemstack, int renderpass) - { - if(renderpass != 1) + @Override + public int getColorFromItemStack(ItemStack itemstack, int renderpass) { + if (renderpass != 1) return 16777215; - else - { - if(!itemstack.hasTagCompound()) + else { + if (!itemstack.hasTagCompound()) return 0x980000; byte phase = itemstack.getTagCompound().getByte("phase"); - if(phase == 1) + if (phase == 1) return 0x0010CC; - else if(phase == 2) + else if (phase == 2) return 0xE5DA00; else return 0x980000; } } - + @SideOnly(Side.CLIENT) + @Override public boolean requiresMultipleRenderPasses() { return true; } - - /** - * Set the damage for this itemstack. Note, this method is responsible for zero checking. - * @param stack the stack - * @param damage the new damage value - */ - public void setDamage(ItemStack stack, int damage) - { - if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.eternal.effectId, stack) > 0) + + @Override + public void setDamage(ItemStack stack, int damage) { + if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.eternal.effectId, stack) > 0) super.setDamage(stack, 0); else super.setDamage(stack, damage); - } + } } diff --git a/src/com/spiteful/forbidden/items/ItemMorphShovel.java b/src/main/java/com/spiteful/forbidden/items/ItemMorphShovel.java similarity index 54% rename from src/com/spiteful/forbidden/items/ItemMorphShovel.java rename to src/main/java/com/spiteful/forbidden/items/ItemMorphShovel.java index fe31a40..5e6b44b 100644 --- a/src/com/spiteful/forbidden/items/ItemMorphShovel.java +++ b/src/main/java/com/spiteful/forbidden/items/ItemMorphShovel.java @@ -1,145 +1,123 @@ package com.spiteful.forbidden.items; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemSpade; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import thaumcraft.api.IRepairable; + import com.spiteful.forbidden.Forbidden; -import com.spiteful.forbidden.Config; import com.spiteful.forbidden.enchantments.DarkEnchantments; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.EnumToolMaterial; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemSpade; -import net.minecraft.block.Block; -import net.minecraft.nbt.*; -import net.minecraft.util.Icon; -import net.minecraft.world.World; -import thaumcraft.api.IRepairable; -import thaumcraft.api.ItemApi; -import net.minecraftforge.common.ForgeHooks; -public class ItemMorphShovel extends ItemSpade implements IRepairable -{ - public Icon[] icon; +public class ItemMorphShovel extends ItemSpade implements IRepairable { + public IIcon[] icon; - public ItemMorphShovel(int i, EnumToolMaterial enumtoolmaterial) - { - super(i, enumtoolmaterial); + public ItemMorphShovel(ToolMaterial enumtoolmaterial) { + super(enumtoolmaterial); this.setCreativeTab(Forbidden.tab); + this.setHarvestLevel("shovel", 4); } @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister ir) - { - icon = new Icon[2]; + public void registerIcons(IIconRegister ir) { + icon = new IIcon[2]; this.icon[0] = ir.registerIcon("forbidden:chameleonshovel"); this.icon[1] = ir.registerIcon("forbidden:eyeshovel"); } @SideOnly(Side.CLIENT) - public Icon getIconFromDamageForRenderPass(int par1, int renderPass) { - return renderPass != 1?icon[0]:icon[1]; + public IIcon getIconFromDamageForRenderPass(int par1, int renderPass) { + return renderPass != 1 ? icon[0] : icon[1]; } - public EnumRarity getRarity(ItemStack itemstack) - { + public EnumRarity getRarity(ItemStack itemstack) { return EnumRarity.epic; } - public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) - { - return par2ItemStack.isItemEqual(new ItemStack(ForbiddenItems.deadlyShards, 1, 1)) ? true : super.getIsRepairable(par1ItemStack, par2ItemStack); + public boolean getIsRepairable(ItemStack stack, ItemStack stack2) { + return stack2.isItemEqual(new ItemStack(ForbiddenItems.deadlyShards, 1, 1)) ? true : super.getIsRepairable(stack, stack2); } @Override - /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer - */ - public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) - { - if(player.isSneaking() && itemstack.hasTagCompound() && getMaxDamage() - itemstack.getItemDamage() > 5){ + public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { + if (player.isSneaking() && itemstack.hasTagCompound() && getMaxDamage() - itemstack.getItemDamage() > 5) { NBTTagCompound tags = itemstack.getTagCompound(); byte phase = tags.getByte("phase"); NBTTagList enchants = itemstack.getEnchantmentTagList(); - if(enchants != null) + if (enchants != null) tags.setTag("enchants" + phase, enchants); else tags.removeTag("enchants" + phase); - if(tags.hasKey("display")) - { + if (tags.hasKey("display")) { String name = tags.getCompoundTag("display").getString("Name"); - if(name != null && !name.equals("")) + if (name != null && !name.equals("")) tags.getCompoundTag("display").setString("Name" + phase, name); else tags.getCompoundTag("display").removeTag("Name" + phase); } - if(++phase > 2) + if (++phase > 2) phase = 0; tags.setByte("phase", phase); - enchants = (NBTTagList)(tags.getTag("enchants" + phase)); - if(enchants == null) + enchants = (NBTTagList) (tags.getTag("enchants" + phase)); + if (enchants == null) tags.removeTag("ench"); else tags.setTag("ench", enchants); - - if(tags.hasKey("display")) - { + + if (tags.hasKey("display")) { String name = tags.getCompoundTag("display").getString("Name" + phase); - if(name != null && !name.equals("")) + if (name != null && !name.equals("")) tags.getCompoundTag("display").setString("Name", name); else tags.getCompoundTag("display").removeTag("Name"); } - + itemstack.setTagCompound(tags); itemstack.damageItem(5, player); player.swingItem(); world.playSoundEffect(player.posX, player.posY, player.posZ, "thaumcraft:wandfail", 0.2F, 0.2F + world.rand.nextFloat() * 0.2F); - } + } return itemstack; } - + @Override @SideOnly(Side.CLIENT) - public int getColorFromItemStack(ItemStack itemstack, int renderpass) - { - if(renderpass != 1) + public int getColorFromItemStack(ItemStack itemstack, int renderpass) { + if (renderpass != 1) return 16777215; - else - { - if(!itemstack.hasTagCompound()) + else { + if (!itemstack.hasTagCompound()) return 0x980000; byte phase = itemstack.getTagCompound().getByte("phase"); - if(phase == 1) + if (phase == 1) return 0x0010CC; - else if(phase == 2) + else if (phase == 2) return 0xE5DA00; else return 0x980000; } } - + @SideOnly(Side.CLIENT) public boolean requiresMultipleRenderPasses() { return true; } - - /** - * Set the damage for this itemstack. Note, this method is responsible for zero checking. - * @param stack the stack - * @param damage the new damage value - */ - public void setDamage(ItemStack stack, int damage) - { - if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.eternal.effectId, stack) > 0) + + @Override + public void setDamage(ItemStack stack, int damage) { + if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.eternal.effectId, stack) > 0) super.setDamage(stack, 0); else super.setDamage(stack, damage); - } - + } + } diff --git a/src/com/spiteful/forbidden/items/ItemMorphSword.java b/src/main/java/com/spiteful/forbidden/items/ItemMorphSword.java similarity index 54% rename from src/com/spiteful/forbidden/items/ItemMorphSword.java rename to src/main/java/com/spiteful/forbidden/items/ItemMorphSword.java index 86511c1..b2f6526 100644 --- a/src/com/spiteful/forbidden/items/ItemMorphSword.java +++ b/src/main/java/com/spiteful/forbidden/items/ItemMorphSword.java @@ -1,145 +1,123 @@ package com.spiteful.forbidden.items; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemSword; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import thaumcraft.api.IRepairable; + import com.spiteful.forbidden.Forbidden; -import com.spiteful.forbidden.Config; import com.spiteful.forbidden.enchantments.DarkEnchantments; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.EnumToolMaterial; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemSword; -import net.minecraft.block.Block; -import net.minecraft.nbt.*; -import net.minecraft.util.Icon; -import net.minecraft.world.World; -import thaumcraft.api.IRepairable; -import thaumcraft.api.ItemApi; -import net.minecraftforge.common.ForgeHooks; -public class ItemMorphSword extends ItemSword implements IRepairable -{ - public Icon[] icon; +public class ItemMorphSword extends ItemSword implements IRepairable { + public IIcon[] icon; - public ItemMorphSword(int i, EnumToolMaterial enumtoolmaterial) - { - super(i, enumtoolmaterial); + public ItemMorphSword(ToolMaterial enumtoolmaterial) { + super(enumtoolmaterial); this.setCreativeTab(Forbidden.tab); } @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister ir) - { - icon = new Icon[2]; + public void registerIcons(IIconRegister ir) { + icon = new IIcon[2]; this.icon[0] = ir.registerIcon("forbidden:chameleonsword"); this.icon[1] = ir.registerIcon("forbidden:eyesword"); } @SideOnly(Side.CLIENT) - public Icon getIconFromDamageForRenderPass(int par1, int renderPass) { - return renderPass != 1?icon[0]:icon[1]; - } - - public EnumRarity getRarity(ItemStack itemstack) - { - return EnumRarity.epic; - } - - public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) - { - return par2ItemStack.isItemEqual(new ItemStack(ForbiddenItems.deadlyShards, 1, 1)) ? true : super.getIsRepairable(par1ItemStack, par2ItemStack); + public IIcon getIconFromDamageForRenderPass(int par1, int renderPass) { + return renderPass != 1 ? icon[0] : icon[1]; } @Override - /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer - */ - public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) - { - if(player.isSneaking() && itemstack.hasTagCompound() && getMaxDamage() - itemstack.getItemDamage() > 5){ + public EnumRarity getRarity(ItemStack itemstack) { + return EnumRarity.epic; + } + + @Override + public boolean getIsRepairable(ItemStack stack, ItemStack stack2) { + return stack2.isItemEqual(new ItemStack(ForbiddenItems.deadlyShards, 1, 1)) ? true : super.getIsRepairable(stack, stack2); + } + + @Override + public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { + if (player.isSneaking() && itemstack.hasTagCompound() && getMaxDamage() - itemstack.getItemDamage() > 5) { NBTTagCompound tags = itemstack.getTagCompound(); byte phase = tags.getByte("phase"); NBTTagList enchants = itemstack.getEnchantmentTagList(); - if(enchants != null) + if (enchants != null) tags.setTag("enchants" + phase, enchants); else tags.removeTag("enchants" + phase); - if(tags.hasKey("display")) - { + if (tags.hasKey("display")) { String name = tags.getCompoundTag("display").getString("Name"); - if(name != null && !name.equals("")) + if (name != null && !name.equals("")) tags.getCompoundTag("display").setString("Name" + phase, name); else tags.getCompoundTag("display").removeTag("Name" + phase); } - if(++phase > 2) + if (++phase > 2) phase = 0; tags.setByte("phase", phase); - enchants = (NBTTagList)(tags.getTag("enchants" + phase)); - if(enchants == null) + enchants = (NBTTagList) (tags.getTag("enchants" + phase)); + if (enchants == null) tags.removeTag("ench"); else tags.setTag("ench", enchants); - - if(tags.hasKey("display")) - { + + if (tags.hasKey("display")) { String name = tags.getCompoundTag("display").getString("Name" + phase); - if(name != null && !name.equals("")) + if (name != null && !name.equals("")) tags.getCompoundTag("display").setString("Name", name); else tags.getCompoundTag("display").removeTag("Name"); } - + itemstack.setTagCompound(tags); itemstack.damageItem(5, player); player.swingItem(); world.playSoundEffect(player.posX, player.posY, player.posZ, "thaumcraft:wandfail", 0.2F, 0.2F + world.rand.nextFloat() * 0.2F); - } + } return itemstack; } - + @Override @SideOnly(Side.CLIENT) - public int getColorFromItemStack(ItemStack itemstack, int renderpass) - { - if(renderpass != 1) + public int getColorFromItemStack(ItemStack itemstack, int renderpass) { + if (renderpass != 1) return 16777215; - else - { - if(!itemstack.hasTagCompound()) + else { + if (!itemstack.hasTagCompound()) return 0x980000; byte phase = itemstack.getTagCompound().getByte("phase"); - if(phase == 1) + if (phase == 1) return 0x0010CC; - else if(phase == 2) + else if (phase == 2) return 0xE5DA00; else return 0x980000; } } - + @SideOnly(Side.CLIENT) public boolean requiresMultipleRenderPasses() { return true; } - - /** - * Set the damage for this itemstack. Note, this method is responsible for zero checking. - * @param stack the stack - * @param damage the new damage value - */ - public void setDamage(ItemStack stack, int damage) - { - if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.eternal.effectId, stack) > 0) + + @Override + public void setDamage(ItemStack stack, int damage) { + if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.eternal.effectId, stack) > 0) super.setDamage(stack, 0); else super.setDamage(stack, damage); - } - + } } diff --git a/src/main/java/com/spiteful/forbidden/items/ItemResource.java b/src/main/java/com/spiteful/forbidden/items/ItemResource.java new file mode 100644 index 0000000..cc362e1 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/items/ItemResource.java @@ -0,0 +1,76 @@ +package com.spiteful.forbidden.items; + +import java.util.List; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.passive.EntitySheep; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; + +import com.spiteful.forbidden.Forbidden; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemResource extends Item { + @SideOnly(Side.CLIENT) + public IIcon[] icons; + + public ItemResource() { + this.setMaxStackSize(64); + this.setHasSubtypes(true); + this.setMaxDamage(0); + this.setCreativeTab(Forbidden.tab); + } + + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister ir) { + icons = new IIcon[3]; + + icons[0] = ir.registerIcon("forbidden:emerald_nugget"); + icons[1] = ir.registerIcon("forbidden:dye_powder_black"); + icons[2] = ir.registerIcon("forbidden:nuggetmanasteel"); + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIconFromDamage(int dam) { + return this.icons[dam]; + } + + @Override + public String getUnlocalizedName(ItemStack stack) { + int i = MathHelper.clamp_int(stack.getItemDamage(), 0, 2); + return super.getUnlocalizedName() + "." + i; + } + + @SideOnly(Side.CLIENT) + @Override + public void getSubItems(Item par1, CreativeTabs xCreativeTabs, List list) { + for (int j = 0; j < 3; ++j) { + list.add(new ItemStack(par1, 1, j)); + } + } + + @Override + public boolean itemInteractionForEntity(ItemStack stack, EntityPlayer player, EntityLivingBase yEntityLivingBase) { + if (yEntityLivingBase instanceof EntitySheep && stack.getItemDamage() == 1) { + EntitySheep entitysheep = (EntitySheep) yEntityLivingBase; + + if (!entitysheep.getSheared() && entitysheep.getFleeceColor() != 15) { + entitysheep.setFleeceColor(15); + --stack.stackSize; + } + + return true; + } else { + return false; + } + } +} diff --git a/src/main/java/com/spiteful/forbidden/items/ItemRidingCrop.java b/src/main/java/com/spiteful/forbidden/items/ItemRidingCrop.java new file mode 100644 index 0000000..7c3e637 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/items/ItemRidingCrop.java @@ -0,0 +1,103 @@ +package com.spiteful.forbidden.items; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.passive.EntityPig; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.EnumAction; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemSword; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.DamageSource; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +import com.spiteful.forbidden.Config; +import com.spiteful.forbidden.Forbidden; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemRidingCrop extends ItemSword { + + public IIcon icon; + + public ItemRidingCrop(ToolMaterial mat) { + super(mat); + this.setCreativeTab(Forbidden.tab); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister ir) { + this.icon = ir.registerIcon("forbidden:crop"); + } + + @Override + public boolean hitEntity(ItemStack stack, EntityLivingBase victim, EntityLivingBase player) { + stack.damageItem(1, player); + if (victim instanceof EntityHorse || victim instanceof EntityPig) + victim.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 175, 5)); + else if (victim instanceof EntityPlayer) { + victim.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 75, 1)); + victim.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 75, 1)); + } + if (!player.worldObj.isRemote && !Config.noLust && player.worldObj.provider.dimensionId == -1 && player.worldObj.rand.nextInt(30) == 1) { + EntityItem ent = victim.entityDropItem(new ItemStack(ForbiddenItems.deadlyShards, 1, 4), 1.0F); + ent.motionY += player.worldObj.rand.nextFloat() * 0.05F; + ent.motionX += (player.worldObj.rand.nextFloat() - player.worldObj.rand.nextFloat()) * 0.1F; + ent.motionZ += (player.worldObj.rand.nextFloat() - player.worldObj.rand.nextFloat()) * 0.1F; + } + return true; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) { + return this.icon; + } + + @Override + public float getDigSpeed(ItemStack stack, Block block, int meta) { + return 1.0F; + } + + @Override + public EnumAction getItemUseAction(ItemStack stack) { + return EnumAction.none; + } + + @Override + public int getMaxItemUseDuration(ItemStack stack) { + return 0; + } + + @Override + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { + if (player.ridingEntity != null && player.ridingEntity instanceof EntityLivingBase) { + EntityLivingBase mount = (EntityLivingBase) player.ridingEntity; + stack.damageItem(1, player); + player.swingItem(); + // mount.attackEntityFrom(DamageSource.causePlayerDamage(player), + // 4.0F); + mount.attackEntityFrom(DamageSource.generic, 1.0F); + mount.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 175, 5)); + } + return stack; + } + + @Override + public boolean getIsRepairable(ItemStack stack, ItemStack stack2) { + return stack2.getItem() == Items.leather ? true : super.getIsRepairable(stack, stack2); + } + + @Override + public boolean canHarvestBlock(Block block, ItemStack itemStack) { + return false; + } +} \ No newline at end of file diff --git a/src/main/java/com/spiteful/forbidden/items/ItemSkullAxe.java b/src/main/java/com/spiteful/forbidden/items/ItemSkullAxe.java new file mode 100644 index 0000000..9207ab3 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/items/ItemSkullAxe.java @@ -0,0 +1,51 @@ +package com.spiteful.forbidden.items; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemSword; +import net.minecraft.util.IIcon; +import thaumcraft.api.IRepairable; + +import com.spiteful.forbidden.Config; +import com.spiteful.forbidden.Forbidden; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemSkullAxe extends ItemSword implements IRepairable { + public IIcon icon; + + public ItemSkullAxe(ToolMaterial enumtoolmaterial) { + super(enumtoolmaterial); + this.setCreativeTab(Forbidden.tab); + } + + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister ir) { + this.icon = ir.registerIcon("forbidden:skullaxe"); + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIconFromDamage(int par1) { + return this.icon; + } + + @Override + public EnumRarity getRarity(ItemStack itemstack) { + return EnumRarity.uncommon; + } + + @Override + public boolean getIsRepairable(ItemStack stack, ItemStack stack2) { + return stack2.isItemEqual(new ItemStack(Config.thaumcraftResource.getItem(), 1, 2)) ? true : super.getIsRepairable(stack, stack2); + } + + @Override + public float getDigSpeed(ItemStack stack, Block block, int meta) { + return 1.0F; + } +} diff --git a/src/main/java/com/spiteful/forbidden/items/ItemTaintPickaxe.java b/src/main/java/com/spiteful/forbidden/items/ItemTaintPickaxe.java new file mode 100644 index 0000000..fb66c35 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/items/ItemTaintPickaxe.java @@ -0,0 +1,44 @@ +package com.spiteful.forbidden.items; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemPickaxe; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import thaumcraft.api.IRepairable; + +import com.spiteful.forbidden.Config; +import com.spiteful.forbidden.Forbidden; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemTaintPickaxe extends ItemPickaxe implements IRepairable { + public IIcon icon; + + public ItemTaintPickaxe(ToolMaterial enumtoolmaterial) { + super(enumtoolmaterial); + this.setCreativeTab(Forbidden.tab); + this.setHarvestLevel("pickaxe", 5); + } + + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister ir) { + this.icon = ir.registerIcon("forbidden:taintpickaxe"); + } + + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) { + return this.icon; + } + + @Override + public EnumRarity getRarity(ItemStack itemstack) { + return EnumRarity.rare; + } + + @Override + public boolean getIsRepairable(ItemStack stack, ItemStack stack2) { + return stack2.isItemEqual(new ItemStack(Config.thaumcraftResource.getItem(), 1, 2)) ? true : super.getIsRepairable(stack, stack2); + } +} diff --git a/src/com/spiteful/forbidden/items/ItemTaintShovel.java b/src/main/java/com/spiteful/forbidden/items/ItemTaintShovel.java similarity index 67% rename from src/com/spiteful/forbidden/items/ItemTaintShovel.java rename to src/main/java/com/spiteful/forbidden/items/ItemTaintShovel.java index ae21de8..8419612 100644 --- a/src/com/spiteful/forbidden/items/ItemTaintShovel.java +++ b/src/main/java/com/spiteful/forbidden/items/ItemTaintShovel.java @@ -1,41 +1,41 @@ package com.spiteful.forbidden.items; -import com.spiteful.forbidden.Forbidden; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemSpade; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.common.ForgeHooks; +import thaumcraft.api.IRepairable; + import com.spiteful.forbidden.Config; +import com.spiteful.forbidden.Forbidden; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.EnumToolMaterial; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemSpade; -import net.minecraft.block.Block; -import net.minecraft.util.Icon; -import net.minecraft.world.World; -import thaumcraft.api.IRepairable; -import thaumcraft.api.ItemApi; -import net.minecraftforge.common.ForgeHooks; public class ItemTaintShovel extends ItemSpade implements IRepairable { - public Icon icon; + public IIcon icon; - public ItemTaintShovel(int i, EnumToolMaterial enumtoolmaterial) + public ItemTaintShovel(ToolMaterial enumtoolmaterial) { - super(i, enumtoolmaterial); + super(enumtoolmaterial); this.setCreativeTab(Forbidden.tab); + this.setHarvestLevel("shovel", 3); } @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister ir) + public void registerIcons(IIconRegister ir) { this.icon = ir.registerIcon("forbidden:taintshovel"); } @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int par1) + public IIcon getIconFromDamage(int par1) { return this.icon; } @@ -45,20 +45,20 @@ public class ItemTaintShovel extends ItemSpade implements IRepairable return EnumRarity.rare; } - public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) + public boolean getIsRepairable(ItemStack stack, ItemStack stack2) { - return par2ItemStack.isItemEqual(new ItemStack(Config.thaumcraftResourceID, 1, 2)) ? true : super.getIsRepairable(par1ItemStack, par2ItemStack); + return stack2.isItemEqual(new ItemStack(Config.thaumcraftResource.getItem(), 1, 2)) ? true : super.getIsRepairable(stack, stack2); } @Override - public float getStrVsBlock(ItemStack stack, Block block, int meta) + public float getDigSpeed(ItemStack stack, Block block, int meta) { - if (ForgeHooks.isToolEffective(stack, block, meta) || block.blockMaterial == Config.taintMaterial) + if (ForgeHooks.isToolEffective(stack, block, meta) || block.getMaterial() == Config.taintMaterial) { return efficiencyOnProperMaterial; } - return getStrVsBlock(stack, block); + return func_150893_a(stack, block); } @Override diff --git a/src/com/spiteful/forbidden/items/wands/BloodStaffUpdate.java b/src/main/java/com/spiteful/forbidden/items/wands/BloodStaffUpdate.java similarity index 93% rename from src/com/spiteful/forbidden/items/wands/BloodStaffUpdate.java rename to src/main/java/com/spiteful/forbidden/items/wands/BloodStaffUpdate.java index 6cf4171..3f6538b 100644 --- a/src/com/spiteful/forbidden/items/wands/BloodStaffUpdate.java +++ b/src/main/java/com/spiteful/forbidden/items/wands/BloodStaffUpdate.java @@ -1,17 +1,14 @@ package com.spiteful.forbidden.items.wands; -import com.spiteful.forbidden.Config; -import com.spiteful.forbidden.Compat; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.wands.IWandRodOnUpdate; import thaumcraft.common.items.wands.ItemWandCasting; -import java.lang.reflect.Field; -import java.lang.reflect.Method; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import com.spiteful.forbidden.compat.Compat; + public class BloodStaffUpdate implements IWandRodOnUpdate { Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]); diff --git a/src/com/spiteful/forbidden/items/wands/BloodWandUpdate.java b/src/main/java/com/spiteful/forbidden/items/wands/BloodWandUpdate.java similarity index 92% rename from src/com/spiteful/forbidden/items/wands/BloodWandUpdate.java rename to src/main/java/com/spiteful/forbidden/items/wands/BloodWandUpdate.java index 5815880..0407340 100644 --- a/src/com/spiteful/forbidden/items/wands/BloodWandUpdate.java +++ b/src/main/java/com/spiteful/forbidden/items/wands/BloodWandUpdate.java @@ -1,17 +1,14 @@ package com.spiteful.forbidden.items.wands; -import com.spiteful.forbidden.Config; -import com.spiteful.forbidden.Compat; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.wands.IWandRodOnUpdate; import thaumcraft.common.items.wands.ItemWandCasting; -import java.lang.reflect.Field; -import java.lang.reflect.Method; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import com.spiteful.forbidden.compat.Compat; + public class BloodWandUpdate implements IWandRodOnUpdate { Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]); diff --git a/src/com/spiteful/forbidden/items/wands/CreativeWandUpdate.java b/src/main/java/com/spiteful/forbidden/items/wands/CreativeWandUpdate.java similarity index 52% rename from src/com/spiteful/forbidden/items/wands/CreativeWandUpdate.java rename to src/main/java/com/spiteful/forbidden/items/wands/CreativeWandUpdate.java index 92733cc..f2916c5 100644 --- a/src/com/spiteful/forbidden/items/wands/CreativeWandUpdate.java +++ b/src/main/java/com/spiteful/forbidden/items/wands/CreativeWandUpdate.java @@ -1,7 +1,5 @@ package com.spiteful.forbidden.items.wands; -import com.spiteful.forbidden.Config; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import thaumcraft.api.aspects.Aspect; @@ -13,10 +11,9 @@ public class CreativeWandUpdate implements IWandRodOnUpdate { Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]); public void onUpdate(ItemStack itemstack, EntityPlayer player) { - for(int x = 0;x < primals.length;x++){ - if(((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]) < ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack)) { - ((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], - ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack) - ((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]), true); + for (int x = 0; x < primals.length; x++) { + if (((ItemWandCasting) itemstack.getItem()).getVis(itemstack, primals[x]) < ((ItemWandCasting) itemstack.getItem()).getMaxVis(itemstack)) { + ((ItemWandCasting) itemstack.getItem()).addVis(itemstack, primals[x], ((ItemWandCasting) itemstack.getItem()).getMaxVis(itemstack) - ((ItemWandCasting) itemstack.getItem()).getVis(itemstack, primals[x]), true); } } } diff --git a/src/com/spiteful/forbidden/items/wands/DarkWandCap.java b/src/main/java/com/spiteful/forbidden/items/wands/DarkWandCap.java similarity index 75% rename from src/com/spiteful/forbidden/items/wands/DarkWandCap.java rename to src/main/java/com/spiteful/forbidden/items/wands/DarkWandCap.java index 7237acc..b11a7d4 100644 --- a/src/com/spiteful/forbidden/items/wands/DarkWandCap.java +++ b/src/main/java/com/spiteful/forbidden/items/wands/DarkWandCap.java @@ -1,6 +1,5 @@ package com.spiteful.forbidden.items.wands; -import java.util.LinkedHashMap; import java.util.List; import net.minecraft.item.ItemStack; @@ -9,21 +8,19 @@ import thaumcraft.api.aspects.Aspect; import thaumcraft.api.wands.WandCap; /** - * This class is used to keep the material information for the various caps. - * It is also used to generate the wand recipes ingame. + * This class is used to keep the material information for the various caps. It + * is also used to generate the wand recipes ingame. + * * @author Azanor - * + * */ -public class DarkWandCap extends WandCap -{ - public DarkWandCap(String tag, float discount, ItemStack item, int craftCost, ResourceLocation skin) - { +public class DarkWandCap extends WandCap { + public DarkWandCap(String tag, float discount, ItemStack item, int craftCost, ResourceLocation skin) { super(tag, discount, item, craftCost); setTexture(skin); } - public DarkWandCap(String tag, float discount, List specialAspects, float discountSpecial, ItemStack item, int craftCost, ResourceLocation skin) - { + public DarkWandCap(String tag, float discount, List specialAspects, float discountSpecial, ItemStack item, int craftCost, ResourceLocation skin) { super(tag, discount, specialAspects, discountSpecial, item, craftCost); setTexture(skin); } diff --git a/src/com/spiteful/forbidden/items/wands/InfernalWandUpdate.java b/src/main/java/com/spiteful/forbidden/items/wands/InfernalWandUpdate.java similarity index 97% rename from src/com/spiteful/forbidden/items/wands/InfernalWandUpdate.java rename to src/main/java/com/spiteful/forbidden/items/wands/InfernalWandUpdate.java index 22c8fc6..861ac13 100644 --- a/src/com/spiteful/forbidden/items/wands/InfernalWandUpdate.java +++ b/src/main/java/com/spiteful/forbidden/items/wands/InfernalWandUpdate.java @@ -1,7 +1,5 @@ package com.spiteful.forbidden.items.wands; -import com.spiteful.forbidden.Config; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; diff --git a/src/com/spiteful/forbidden/items/wands/ItemWandCaps.java b/src/main/java/com/spiteful/forbidden/items/wands/ItemWandCaps.java similarity index 52% rename from src/com/spiteful/forbidden/items/wands/ItemWandCaps.java rename to src/main/java/com/spiteful/forbidden/items/wands/ItemWandCaps.java index 0433f9e..5ca0a80 100644 --- a/src/com/spiteful/forbidden/items/wands/ItemWandCaps.java +++ b/src/main/java/com/spiteful/forbidden/items/wands/ItemWandCaps.java @@ -1,29 +1,24 @@ package com.spiteful.forbidden.items.wands; -import com.spiteful.forbidden.Forbidden; -import com.spiteful.forbidden.Compat; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.List; -import net.minecraft.client.renderer.texture.IconRegister; + +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; -import thaumcraft.api.ItemApi; -import thaumcraft.api.wands.WandCap; -import thaumcraft.api.wands.WandRod; -import thaumcraft.common.items.wands.ItemWandCasting; +import net.minecraft.util.IIcon; + +import com.spiteful.forbidden.Forbidden; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class ItemWandCaps extends Item { public final String[] types = {"alchemical", "vinteum", "soul", "manasteel", "manasteel_inert"}; - public Icon[] icon; + public IIcon[] icon; - - public ItemWandCaps(int par1) { - super(par1); + public ItemWandCaps() { this.setMaxStackSize(64); this.setHasSubtypes(true); this.setMaxDamage(0); @@ -31,25 +26,29 @@ public class ItemWandCaps extends Item { } @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister ir) { - icon = new Icon[types.length]; + @Override + public void registerIcons(IIconRegister ir) { + icon = new IIcon[types.length]; for(int x = 0; x < types.length; x++) this.icon[x] = ir.registerIcon("forbidden:wand_cap_" + types[x]); } @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int meta) { + @Override + public IIcon getIconFromDamage(int meta) { return this.icon[meta]; } @SideOnly(Side.CLIENT) - public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) { + @Override + public void getSubItems(Item item, CreativeTabs xCreativeTabs, List list) { for(int x = 0; x < types.length; x++){ - par3List.add(new ItemStack(this, 1, x)); + list.add(new ItemStack(this, 1, x)); } } - public String getUnlocalizedName(ItemStack par1ItemStack) { - return super.getUnlocalizedName() + "." + types[par1ItemStack.getItemDamage()]; + @Override + public String getUnlocalizedName(ItemStack stack) { + return super.getUnlocalizedName() + "." + types[stack.getItemDamage()]; } } diff --git a/src/main/java/com/spiteful/forbidden/items/wands/ItemWandCores.java b/src/main/java/com/spiteful/forbidden/items/wands/ItemWandCores.java new file mode 100644 index 0000000..f9a1499 --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/items/wands/ItemWandCores.java @@ -0,0 +1,114 @@ +package com.spiteful.forbidden.items.wands; + +import java.util.List; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import thaumcraft.api.ItemApi; +import thaumcraft.api.wands.WandCap; +import thaumcraft.api.wands.WandRod; +import thaumcraft.common.items.wands.ItemWandCasting; + +import com.spiteful.forbidden.Forbidden; +import com.spiteful.forbidden.compat.Compat; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemWandCores extends Item { + + public final String[] types = { "tainted", "infernal", "soul", "blood", "witchwood", "totem", "blood_inert", "livingwood", "livingwood_inert", "blood_staff", "witchwood_staff" }; + public IIcon[] icon; + + public ItemWandCores() { + this.setMaxStackSize(64); + this.setHasSubtypes(true); + this.setMaxDamage(0); + this.setCreativeTab(Forbidden.tab); + } + + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister ir) { + icon = new IIcon[types.length]; + for (int x = 0; x < types.length; x++) + this.icon[x] = ir.registerIcon("forbidden:wand_rod_" + types[x]); + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIconFromDamage(int meta) { + return this.icon[meta]; + } + + @SideOnly(Side.CLIENT) + @Override + public void getSubItems(Item item, CreativeTabs xCreativeTabs, List list) { + for (int x = 0; x < types.length; x++) { + list.add(new ItemStack(this, 1, x)); + } + + ItemStack wand = ItemApi.getItem("itemWandCasting", 72); + ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("thaumium")); + ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("tainted")); + list.add(wand); + wand = ItemApi.getItem("itemWandCasting", 72); + ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("thaumium")); + ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("infernal")); + list.add(wand); + wand = ItemApi.getItem("itemWandCasting", 2000); + ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("orichalcum")); + ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("neutronium")); + list.add(wand); + wand = ItemApi.getItem("itemWandCasting", 2000); + ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("orichalcum")); + ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("neutronium_staff")); + list.add(wand); + if (Compat.pb) { + wand = ItemApi.getItem("itemWandCasting", 84); + ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("soul")); + ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("soul")); + list.add(wand); + } + if (Compat.bm) { + wand = ItemApi.getItem("itemWandCasting", 84); + ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("alchemical")); + ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("blood")); + list.add(wand); + wand = ItemApi.getItem("itemWandCasting", 168); + ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("alchemical")); + ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("blood_staff")); + list.add(wand); + } + if (Compat.am2) { + wand = ItemApi.getItem("itemWandCasting", 72); + ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("vinteum")); + ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("witchwood")); + list.add(wand); + wand = ItemApi.getItem("itemWandCasting", 144); + ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("vinteum")); + ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("witchwood_staff")); + list.add(wand); + } + if (Compat.totes) { + wand = ItemApi.getItem("itemWandCasting", 24); + ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("thaumium")); + ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("totem")); + list.add(wand); + } + if (Compat.botan) { + wand = ItemApi.getItem("itemWandCasting", 84); + ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("manasteel")); + ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("livingwood")); + list.add(wand); + } + } + + @Override + public String getUnlocalizedName(ItemStack stack) { + return super.getUnlocalizedName() + "." + types[stack.getItemDamage()]; + } +} diff --git a/src/com/spiteful/forbidden/items/wands/ManaStaffUpdate.java b/src/main/java/com/spiteful/forbidden/items/wands/ManaStaffUpdate.java similarity index 79% rename from src/com/spiteful/forbidden/items/wands/ManaStaffUpdate.java rename to src/main/java/com/spiteful/forbidden/items/wands/ManaStaffUpdate.java index e6aa552..6de3c4b 100644 --- a/src/com/spiteful/forbidden/items/wands/ManaStaffUpdate.java +++ b/src/main/java/com/spiteful/forbidden/items/wands/ManaStaffUpdate.java @@ -1,15 +1,11 @@ package com.spiteful.forbidden.items.wands; -import com.spiteful.forbidden.Config; -import com.spiteful.forbidden.Compat; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.wands.IWandRodOnUpdate; -import thaumcraft.common.items.wands.ItemWandCasting; -import am2.api.ArsMagicaApi; -import am2.api.IExtendedProperties; + +import com.spiteful.forbidden.compat.Compat; public class ManaStaffUpdate implements IWandRodOnUpdate { @@ -20,9 +16,10 @@ public class ManaStaffUpdate implements IWandRodOnUpdate { { if(player.ticksExisted % 40 == 0){ + //TODO: Readd ArsMagica Support try - { - IExtendedProperties prop = ArsMagicaApi.instance.getExtendedProperties(player); + { + /* IExtendedProperties prop = ArsMagicaApi.instance.getExtendedProperties(player); float cost; if(((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("vinteum")) @@ -42,8 +39,8 @@ public class ManaStaffUpdate implements IWandRodOnUpdate { ((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true); } } - } - } + }*/ + } catch(Throwable e){} } diff --git a/src/com/spiteful/forbidden/items/wands/ManaWandUpdate.java b/src/main/java/com/spiteful/forbidden/items/wands/ManaWandUpdate.java similarity index 80% rename from src/com/spiteful/forbidden/items/wands/ManaWandUpdate.java rename to src/main/java/com/spiteful/forbidden/items/wands/ManaWandUpdate.java index 0e354fe..ca9c375 100644 --- a/src/com/spiteful/forbidden/items/wands/ManaWandUpdate.java +++ b/src/main/java/com/spiteful/forbidden/items/wands/ManaWandUpdate.java @@ -1,15 +1,11 @@ package com.spiteful.forbidden.items.wands; -import com.spiteful.forbidden.Config; -import com.spiteful.forbidden.Compat; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.wands.IWandRodOnUpdate; -import thaumcraft.common.items.wands.ItemWandCasting; -import am2.api.ArsMagicaApi; -import am2.api.IExtendedProperties; + +import com.spiteful.forbidden.compat.Compat; public class ManaWandUpdate implements IWandRodOnUpdate { @@ -22,7 +18,8 @@ public class ManaWandUpdate implements IWandRodOnUpdate { try { - IExtendedProperties prop = ArsMagicaApi.instance.getExtendedProperties(player); + //TODO: Readd Ars Magica + /* IExtendedProperties prop = ArsMagicaApi.instance.getExtendedProperties(player); float cost; if(((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("vinteum")) @@ -42,7 +39,7 @@ public class ManaWandUpdate implements IWandRodOnUpdate { ((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true); } } - } + } */ } catch(Throwable e){} } diff --git a/src/com/spiteful/forbidden/items/wands/SoulWandUpdate.java b/src/main/java/com/spiteful/forbidden/items/wands/SoulWandUpdate.java similarity index 68% rename from src/com/spiteful/forbidden/items/wands/SoulWandUpdate.java rename to src/main/java/com/spiteful/forbidden/items/wands/SoulWandUpdate.java index 2d08edc..0d95f2e 100644 --- a/src/com/spiteful/forbidden/items/wands/SoulWandUpdate.java +++ b/src/main/java/com/spiteful/forbidden/items/wands/SoulWandUpdate.java @@ -1,17 +1,11 @@ package com.spiteful.forbidden.items.wands; -import com.spiteful.forbidden.Config; -import com.spiteful.forbidden.Compat; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntitySkull; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.wands.IWandRodOnUpdate; -import thaumcraft.common.items.wands.ItemWandCasting; -import kihira.playerbeacons.common.PlayerBeacons; -import kihira.playerbeacons.tileentity.TileEntityPlayerBeacon; + +import com.spiteful.forbidden.compat.Compat; public class SoulWandUpdate implements IWandRodOnUpdate { @@ -23,17 +17,8 @@ public class SoulWandUpdate implements IWandRodOnUpdate { { try { - NBTTagCompound info = null; - info = PlayerBeacons.beaconData.loadBeaconInformation(player.worldObj, player.username); - - if(info == null) - return; - - int x = info.getInteger("x"); - int y = info.getInteger("y"); - int z = info.getInteger("z"); - - TileEntityPlayerBeacon bacon = (TileEntityPlayerBeacon) player.worldObj.getBlockTileEntity(x, y, z); + //TODO: Readd Player Beacons Support + /* TileEntityPlayerBeacon bacon = BeaconDataHelper.getBeaconForDim(player, player.worldObj.provider.dimensionId); if(bacon != null && bacon.hasSkull()) { @@ -63,8 +48,8 @@ public class SoulWandUpdate implements IWandRodOnUpdate { if(player.worldObj.rand.nextInt(100) < charge) bacon.doCorruption(true); - } - } + }*/ + } catch(Exception e) { return; diff --git a/src/com/spiteful/forbidden/items/wands/TaintedWandUpdate.java b/src/main/java/com/spiteful/forbidden/items/wands/TaintedWandUpdate.java similarity index 100% rename from src/com/spiteful/forbidden/items/wands/TaintedWandUpdate.java rename to src/main/java/com/spiteful/forbidden/items/wands/TaintedWandUpdate.java index 8d45e14..5fbeb0c 100644 --- a/src/com/spiteful/forbidden/items/wands/TaintedWandUpdate.java +++ b/src/main/java/com/spiteful/forbidden/items/wands/TaintedWandUpdate.java @@ -1,13 +1,13 @@ package com.spiteful.forbidden.items.wands; -import com.spiteful.forbidden.Config; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.wands.IWandRodOnUpdate; import thaumcraft.common.items.wands.ItemWandCasting; +import com.spiteful.forbidden.Config; + public class TaintedWandUpdate implements IWandRodOnUpdate { Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]); diff --git a/src/main/java/com/spiteful/forbidden/items/wands/TotemWandUpdate.java b/src/main/java/com/spiteful/forbidden/items/wands/TotemWandUpdate.java new file mode 100644 index 0000000..3b27ccc --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/items/wands/TotemWandUpdate.java @@ -0,0 +1,49 @@ +package com.spiteful.forbidden.items.wands; + +import java.util.ArrayList; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.wands.IWandRodOnUpdate; +import thaumcraft.common.items.wands.ItemWandCasting; + +import com.spiteful.forbidden.compat.Compat; + +public class TotemWandUpdate implements IWandRodOnUpdate { + + Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]); + + @Override + public void onUpdate(ItemStack itemstack, EntityPlayer player) { + if (Compat.totes && Compat.fennCrystal != null && player.ticksExisted % 30 == 0) { + try { + ArrayList unfilled = new ArrayList(); + for (int x = 0; x < primals.length; x++) { + if (((ItemWandCasting) itemstack.getItem()).getVis(itemstack, primals[x]) < ((ItemWandCasting) itemstack.getItem()).getMaxVis(itemstack)) { + unfilled.add(primals[x]); + } + } + if (unfilled.size() > 0 && siphonPlant(player)) + ((ItemWandCasting) itemstack.getItem()).addVis(itemstack, (Aspect) (unfilled.get(player.worldObj.rand.nextInt(unfilled.size()))), 1, true); + + } catch (Exception e) { + return; + } + } + + } + + public boolean siphonPlant(EntityPlayer player) { + for (int x = 0; x < player.inventory.getSizeInventory(); ++x) { + ItemStack item = player.inventory.getStackInSlot(x); + if (item != null && item.getItem() == Compat.fennCrystal) { + if (item.getItemDamage() <= 995) { + item.setItemDamage(item.getItemDamage() + 5); + return true; + } + } + } + return false; + } +} diff --git a/src/com/spiteful/forbidden/items/wands/YandereWandUpdate.java b/src/main/java/com/spiteful/forbidden/items/wands/YandereWandUpdate.java similarity index 91% rename from src/com/spiteful/forbidden/items/wands/YandereWandUpdate.java rename to src/main/java/com/spiteful/forbidden/items/wands/YandereWandUpdate.java index 93663d0..121d978 100644 --- a/src/com/spiteful/forbidden/items/wands/YandereWandUpdate.java +++ b/src/main/java/com/spiteful/forbidden/items/wands/YandereWandUpdate.java @@ -1,9 +1,5 @@ package com.spiteful.forbidden.items.wands; -import com.spiteful.forbidden.Config; -import com.spiteful.forbidden.Compat; - -import java.util.ArrayList; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import thaumcraft.api.aspects.Aspect; @@ -11,6 +7,8 @@ import thaumcraft.api.wands.IWandRodOnUpdate; import thaumcraft.common.items.wands.ItemWandCasting; import vazkii.botania.api.mana.ManaItemHandler; +import com.spiteful.forbidden.compat.Compat; + public class YandereWandUpdate implements IWandRodOnUpdate { Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]); diff --git a/src/com/spiteful/forbidden/tiles/TileEntityWrathCage.java b/src/main/java/com/spiteful/forbidden/tiles/TileEntityWrathCage.java similarity index 89% rename from src/com/spiteful/forbidden/tiles/TileEntityWrathCage.java rename to src/main/java/com/spiteful/forbidden/tiles/TileEntityWrathCage.java index a81566e..77292c3 100644 --- a/src/com/spiteful/forbidden/tiles/TileEntityWrathCage.java +++ b/src/main/java/com/spiteful/forbidden/tiles/TileEntityWrathCage.java @@ -1,29 +1,20 @@ package com.spiteful.forbidden.tiles; -import com.spiteful.forbidden.DarkAspects; -import com.spiteful.forbidden.Config; - -import net.minecraft.tileentity.MobSpawnerBaseLogic; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityMobSpawner; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.packet.Packet; -import net.minecraft.network.packet.Packet250CustomPayload; -import net.minecraft.network.INetworkManager; -import net.minecraft.network.packet.Packet132TileEntityData; -import cpw.mods.fml.common.network.PacketDispatcher; -import net.minecraftforge.common.ForgeDirection; -import java.io.ByteArrayOutputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import java.util.logging.Level; -import cpw.mods.fml.common.FMLLog; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; import thaumcraft.api.ThaumcraftApiHelper; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.api.aspects.IAspectContainer; import thaumcraft.api.aspects.IEssentiaTransport; +import com.spiteful.forbidden.Config; +import com.spiteful.forbidden.DarkAspects; + public class TileEntityWrathCage extends TileEntity implements IAspectContainer, IEssentiaTransport { @@ -64,22 +55,23 @@ public class TileEntityWrathCage extends TileEntity implements IAspectContainer, } @Override - public void onDataPacket(INetworkManager net, Packet132TileEntityData pkt) { - readFromNBT(pkt.data); + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + readFromNBT(pkt.func_148857_g()); worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - } - + } + @Override - public Packet getDescriptionPacket() { - NBTTagCompound tag = new NBTTagCompound(); - writeToNBT(tag); - return new Packet132TileEntityData(xCoord, yCoord, zCoord, 0, tag); - } + public Packet getDescriptionPacket() { + NBTTagCompound nbttagcompound = new NBTTagCompound(); + this.writeToNBT(nbttagcompound); + return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, nbttagcompound); + } /** * Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count * ticks and creates a new spawn inside its implementation. */ + @Override public void updateEntity() { if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){ @@ -99,20 +91,20 @@ public class TileEntityWrathCage extends TileEntity implements IAspectContainer, TileEntity te = ThaumcraftApiHelper.getConnectableTile(worldObj, xCoord, yCoord, zCoord, current); if(te != null) { IEssentiaTransport ic = (IEssentiaTransport)te; - if(ic.canOutputTo(current.getOpposite()) && special < 64 - && ic.getEssentiaType(current.getOpposite()) == aspect && ic.getEssentiaAmount(current.getOpposite()) > 0 && ic.takeVis(aspect, 1) == 1) { + if(ic.canOutputTo(current.getOpposite()) && special < 64 //THE DIRECTION HERE MAY BE WRONG SPITEFULFOXY SO CHECK IT + && ic.getEssentiaType(current.getOpposite()) == aspect && ic.getEssentiaAmount(current.getOpposite()) > 0 && ic.takeEssentia(aspect, 1, current.getOpposite()) == 1) { special++; worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); return; } else if(ic.canOutputTo(current.getOpposite()) && wrath < 64 && special < Config.wrathCost - && ic.getEssentiaType(current.getOpposite()) == DarkAspects.WRATH && ic.getEssentiaAmount(current.getOpposite()) > 0 && ic.takeVis(DarkAspects.WRATH, 1) == 1) { + && ic.getEssentiaType(current.getOpposite()) == DarkAspects.WRATH && ic.getEssentiaAmount(current.getOpposite()) > 0 && ic.takeEssentia(DarkAspects.WRATH, 1, current.getOpposite()) == 1) { wrath++; worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); return; } else if(ic.canOutputTo(current.getOpposite()) && sloth < 64 && special < Config.wrathCost && wrath < Config.wrathCost - && ic.getEssentiaType(current.getOpposite()) == DarkAspects.SLOTH && ic.getEssentiaAmount(current.getOpposite()) > 0 && ic.takeVis(DarkAspects.SLOTH, 1) == 1) { + && ic.getEssentiaType(current.getOpposite()) == DarkAspects.SLOTH && ic.getEssentiaAmount(current.getOpposite()) > 0 && ic.takeEssentia(DarkAspects.SLOTH, 1, current.getOpposite()) == 1) { sloth++; worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); return; @@ -130,9 +122,9 @@ public class TileEntityWrathCage extends TileEntity implements IAspectContainer, /** * Called when a client event is received with the event number and argument, see World.sendClientEvent */ - public boolean receiveClientEvent(int par1, int par2) + public boolean receiveClientEvent(int par1, int x) { - return this.spawnLogic.setDelayToMin(par1) ? true : super.receiveClientEvent(par1, par2); + return this.spawnLogic.setDelayToMin(par1) ? true : super.receiveClientEvent(par1, x); } /** @@ -375,7 +367,7 @@ public class TileEntityWrathCage extends TileEntity implements IAspectContainer, * @param suction * @return how much was actually taken */ - public int takeVis(Aspect aspect, int amount) + public int takeEssentia(Aspect aspect, int amount, ForgeDirection dir) { return 0; } @@ -384,7 +376,7 @@ public class TileEntityWrathCage extends TileEntity implements IAspectContainer, * add the specified amount of vis to this transport tile * @return how much was actually added */ - public int addVis(Aspect inp, int amount) + public int addEssentia(Aspect inp, int amount, ForgeDirection dir) { if(inp == aspect) { diff --git a/src/main/java/com/spiteful/forbidden/tiles/WrathSpawnerLogic.java b/src/main/java/com/spiteful/forbidden/tiles/WrathSpawnerLogic.java new file mode 100644 index 0000000..b96067e --- /dev/null +++ b/src/main/java/com/spiteful/forbidden/tiles/WrathSpawnerLogic.java @@ -0,0 +1,296 @@ +package com.spiteful.forbidden.tiles; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityList; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.IEntityLivingData; +import net.minecraft.init.Blocks; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.common.Thaumcraft; + +import com.spiteful.forbidden.Config; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class WrathSpawnerLogic { + /** The mob spawner we deal with */ + final TileEntityWrathCage mobSpawnerEntity; + + public boolean mobSet = false; + + /** The delay to spawn. */ + public int spawnDelay = 20; + private String mobID = "Pig"; + Aspect aspect = Aspect.GREED; + private boolean slothful = false; + private int fuel = 0; + + public double field_98287_c; + public double field_98284_d; + private int minSpawnDelay = 200; + private int maxSpawnDelay = 300; + + /** A counter for spawn tries. */ + private int spawnCount = 3; + private Entity renderEntity; + private int maxNearbyEntities = 6; + + /** The distance from which a player activates the spawner. */ + private int activatingRangeFromPlayer = 16; + + /** The range coefficient for spawning entities around. */ + private int spawnRange = 4; + + WrathSpawnerLogic(TileEntityWrathCage par1TileEntityMobSpawner) { + this.mobSpawnerEntity = par1TileEntityMobSpawner; + } + + /** + * Gets the entity name that should be spawned. + */ + public String getEntityNameToSpawn() { + return this.mobID; + } + + public Aspect getAspect() { + return aspect; + } + + public void setMobID(String par1Str) { + this.mobID = par1Str; + if (Config.spawnerMobs.containsKey(mobID)) + aspect = Config.spawnerMobs.get(mobID); + else + aspect = Aspect.GREED; + } + + public void mobIsSet(boolean inp) { + mobSet = inp; + } + + public boolean isMobSet() { + return mobSet; + } + + public void updateSpawnerBlock(int par1) { + this.mobSpawnerEntity.getWorldObj().addBlockEvent(this.mobSpawnerEntity.xCoord, this.mobSpawnerEntity.yCoord, this.mobSpawnerEntity.zCoord, Blocks.mob_spawner, par1, 0); + } + + public World getSpawnerWorld() { + return this.mobSpawnerEntity.getWorldObj(); + } + + public int getSpawnerX() { + return this.mobSpawnerEntity.xCoord; + } + + public int getSpawnerY() { + return this.mobSpawnerEntity.yCoord; + } + + public int getSpawnerZ() { + return this.mobSpawnerEntity.zCoord; + } + + public void updateSpawner() { + if (!mobSet) + return; + + double d0; + + if (this.getSpawnerWorld().isRemote && (fuel > 0 || Config.wrathCost <= 0)) { + double d1 = (double) ((float) this.getSpawnerX() + this.getSpawnerWorld().rand.nextFloat()); + double d2 = (double) ((float) this.getSpawnerY() + this.getSpawnerWorld().rand.nextFloat()); + d0 = (double) ((float) this.getSpawnerZ() + this.getSpawnerWorld().rand.nextFloat()); + // this.getSpawnerWorld().spawnParticle("smoke", d1, d2, d0, 0.0D, + // 0.0D, 0.0D); + // this.getSpawnerWorld().spawnParticle("flame", d1, d2, d0, 0.0D, + // 0.0D, 0.0D); + Thaumcraft.proxy.sparkle((float) d1, (float) d2, (float) d0, 0x870404); + + if (this.spawnDelay > 0) { + --this.spawnDelay; + } + + this.field_98284_d = this.field_98287_c; + this.field_98287_c = (this.field_98287_c + (double) (1000.0F / ((float) this.spawnDelay + 200.0F))) % 360.0D; + } else if (Config.wrathCage) { + if (Config.wrathCost > 0 && fuel <= 0) { + if (mobSpawnerEntity.special >= Config.wrathCost) { + mobSpawnerEntity.special -= Config.wrathCost; + slothful = false; + fuel = Config.wrathEff; + mobSpawnerEntity.getWorldObj().markBlockForUpdate(getSpawnerX(), getSpawnerY(), getSpawnerZ()); + } else if (mobSpawnerEntity.wrath >= Config.wrathCost) { + mobSpawnerEntity.wrath -= Config.wrathCost; + slothful = false; + fuel = Config.wrathEff; + mobSpawnerEntity.getWorldObj().markBlockForUpdate(getSpawnerX(), getSpawnerY(), getSpawnerZ()); + } else if (mobSpawnerEntity.sloth >= Config.wrathCost) { + mobSpawnerEntity.sloth -= Config.wrathCost; + slothful = true; + fuel = Config.wrathEff; + mobSpawnerEntity.getWorldObj().markBlockForUpdate(getSpawnerX(), getSpawnerY(), getSpawnerZ()); + } + } + + if (this.spawnDelay == -1) { + this.updateDelay(); + } + + if (fuel <= 0 && Config.wrathCost > 0) + return; + + if (this.spawnDelay > 0) { + --this.spawnDelay; + return; + } + + for (int i = 0; i < this.spawnCount && (fuel > 0 || Config.wrathCost <= 0); ++i) { + Entity entity = EntityList.createEntityByName(this.getEntityNameToSpawn(), this.getSpawnerWorld()); + + if (entity == null) { + return; + } + + int j = this.getSpawnerWorld().getEntitiesWithinAABB(entity.getClass(), AxisAlignedBB.getAABBPool().getAABB((double) this.getSpawnerX(), (double) this.getSpawnerY(), (double) this.getSpawnerZ(), (double) (this.getSpawnerX() + 1), (double) (this.getSpawnerY() + 1), (double) (this.getSpawnerZ() + 1)).expand((double) (this.spawnRange * 2), 4.0D, (double) (this.spawnRange * 2))).size(); + + if (j >= this.maxNearbyEntities) { + this.updateDelay(); + return; + } + + d0 = (double) this.getSpawnerX() + (this.getSpawnerWorld().rand.nextDouble() - this.getSpawnerWorld().rand.nextDouble()) * (double) this.spawnRange; + double d3 = (double) (this.getSpawnerY() + this.getSpawnerWorld().rand.nextInt(3) - 1); + double d4 = (double) this.getSpawnerZ() + (this.getSpawnerWorld().rand.nextDouble() - this.getSpawnerWorld().rand.nextDouble()) * (double) this.spawnRange; + EntityLiving entityliving = entity instanceof EntityLiving ? (EntityLiving) entity : null; + entity.setLocationAndAngles(d0, d3, d4, this.getSpawnerWorld().rand.nextFloat() * 360.0F, 0.0F); + + if ( + // entityliving == null || + entityCanSpawn(entityliving)) + // entityliving.getCanSpawnHere()) + { + this.spawnMob(entity); + this.getSpawnerWorld().playAuxSFX(2004, this.getSpawnerX(), this.getSpawnerY(), this.getSpawnerZ(), 0); + + if (entityliving != null) { + entityliving.spawnExplosionParticle(); + fuel--; + } + + this.updateDelay(); + } else if (entityliving != null) + entityliving.isDead = true; + } + + } + } + + /** + * Checks if the entity's current position is a valid location to spawn this + * entity. + */ + public boolean entityCanSpawn(EntityLiving entity) { + return entity.worldObj.checkNoEntityCollision(entity.boundingBox) && entity.worldObj.getCollidingBoundingBoxes(entity, entity.boundingBox).isEmpty() && !entity.worldObj.isAnyLiquid(entity.boundingBox); + } + + private void updateDelay() { + if (this.maxSpawnDelay <= this.minSpawnDelay) { + this.spawnDelay = this.minSpawnDelay; + } else { + int i = this.maxSpawnDelay - this.minSpawnDelay; + this.spawnDelay = this.minSpawnDelay + this.getSpawnerWorld().rand.nextInt(i); + } + + if (slothful) + spawnDelay += 200; + + this.updateSpawnerBlock(1); + } + + public void readFromNBT(NBTTagCompound par1NBTTagCompound) { + mobID = par1NBTTagCompound.getString("EntityId"); + if (Config.spawnerMobs.containsKey(mobID)) + aspect = Config.spawnerMobs.get(mobID); + else + aspect = Aspect.GREED; + mobSet = par1NBTTagCompound.getBoolean("MobSet"); + slothful = par1NBTTagCompound.getBoolean("Slothful"); + this.fuel = par1NBTTagCompound.getShort("Fuel"); + this.spawnDelay = par1NBTTagCompound.getShort("Delay"); + + // if (par1NBTTagCompound.hasKey("MinSpawnDelay")) + // { + // this.minSpawnDelay = par1NBTTagCompound.getShort("MinSpawnDelay"); + // this.maxSpawnDelay = par1NBTTagCompound.getShort("MaxSpawnDelay"); + // this.spawnCount = par1NBTTagCompound.getShort("SpawnCount"); + // } + + if (par1NBTTagCompound.hasKey("MaxNearbyEntities")) { + this.maxNearbyEntities = par1NBTTagCompound.getShort("MaxNearbyEntities"); + } + + if (par1NBTTagCompound.hasKey("SpawnRange")) { + this.spawnRange = par1NBTTagCompound.getShort("SpawnRange"); + } + + if (this.getSpawnerWorld() != null && this.getSpawnerWorld().isRemote) { + this.renderEntity = null; + } + } + + public void writeToNBT(NBTTagCompound par1NBTTagCompound) { + par1NBTTagCompound.setString("EntityId", this.getEntityNameToSpawn()); + par1NBTTagCompound.setBoolean("MobSet", mobSet); + par1NBTTagCompound.setBoolean("Slothful", slothful); + par1NBTTagCompound.setShort("Fuel", (short) this.fuel); + par1NBTTagCompound.setShort("Delay", (short) this.spawnDelay); + // par1NBTTagCompound.setShort("MinSpawnDelay", + // (short)this.minSpawnDelay); + // par1NBTTagCompound.setShort("MaxSpawnDelay", + // (short)this.maxSpawnDelay); + // par1NBTTagCompound.setShort("SpawnCount", (short)this.spawnCount); + par1NBTTagCompound.setShort("MaxNearbyEntities", (short) this.maxNearbyEntities); + par1NBTTagCompound.setShort("SpawnRange", (short) this.spawnRange); + + } + + public Entity spawnMob(Entity par1Entity) { + if (par1Entity instanceof EntityLivingBase && par1Entity.worldObj != null) { + ((EntityLiving) par1Entity).onSpawnWithEgg((IEntityLivingData) null); + this.getSpawnerWorld().spawnEntityInWorld(par1Entity); + } + + return par1Entity; + } + + /** + * Sets the delay to minDelay if parameter given is 1, else return false. + */ + public boolean setDelayToMin(int par1) { + if (par1 == 1 && this.getSpawnerWorld().isRemote) { + this.spawnDelay = this.minSpawnDelay; + return true; + } else { + return false; + } + } + + @SideOnly(Side.CLIENT) + public Entity getEntityForRender() { + if (this.renderEntity == null) { + Entity entity = EntityList.createEntityByName(this.getEntityNameToSpawn(), (World) null); + entity = this.spawnMob(entity); + this.renderEntity = entity; + } + + return this.renderEntity; + } + +} diff --git a/assets/forbidden/lang/en_US.lang b/src/main/resources/assets/forbidden/lang/en_US.lang similarity index 99% rename from assets/forbidden/lang/en_US.lang rename to src/main/resources/assets/forbidden/lang/en_US.lang index 886589b..8f621ac 100644 --- a/assets/forbidden/lang/en_US.lang +++ b/src/main/resources/assets/forbidden/lang/en_US.lang @@ -250,4 +250,4 @@ forbidden.research_page.HELLFIRE.1=Getting stranded in the Nether is the worst. forbidden.research_name.DIVINEWELL=Scribing Tools of Thoth forbidden.research_text.DIVINEWELL=Mightier Than The Sword forbidden.research_page.DIVINEWELL.1=After researching every last shred of knowledge in the entire cosmos, you've finally uncovered the secret to never refilling your inkwell.

The Scribing Tools of Thoth will never run out of ink.

You sure wish you could've discovered this earlier... -# \ No newline at end of file +# diff --git a/assets/forbidden/lang/zh_CN.lang b/src/main/resources/assets/forbidden/lang/zh_CN.lang similarity index 97% rename from assets/forbidden/lang/zh_CN.lang rename to src/main/resources/assets/forbidden/lang/zh_CN.lang index 14b168d..f1155a2 100644 --- a/assets/forbidden/lang/zh_CN.lang +++ b/src/main/resources/assets/forbidden/lang/zh_CN.lang @@ -1,254 +1,248 @@ -# -# Aspects -tc.aspect.infernus=下界,恶魔,地狱火 -tc.aspect.ira=暴怒,恼怒,怒火 -tc.aspect.gula=饕餮,挥霍,放纵 -tc.aspect.invidia=妒忌,嫉妒,不安 -tc.aspect.superbia=傲慢,自大,轻蔑 -tc.aspect.desidia=怠惰,懒散,拖延 -tc.aspect.luxuria=欲望,欲念,无度 -# -# Items -item.NetherShard.wrath.name=暴怒碎片 -item.NetherShard.envy.name=妒忌碎片 -item.NetherShard.gluttony.name=饕餮碎片 -item.NetherShard.pride.name=傲慢碎片 -item.NetherShard.lust.name=欲望碎片 -item.NetherShard.sloth.name=怠惰碎片 -item.NetherShard.greed.name=贪婪碎片 -item.NetherShard.taint.name=腐化碎片 -item.NetherShard.despair.name=绝望碎片 -item.SkullAxe.name=啄颅斧 -item.ArcaneCake.name=奥法蛋糕 -item.TaintShovel.name=净化铲 -item.TaintPickaxe.name=畸变镐 -item.MorphPickaxe.name=避役镐 -item.MorphSword.name=避役剑 -item.MorphShovel.name=避役铲 -item.MorphAxe.name=避役斧 -item.FMResource.0.name=绿宝石碎片 -item.FMResource.1.name=暗影墨水 -item.FMResource.2.name=魔钢粒 -item.MobCrystalEmpty.name=空白留影水晶 -item.MobCrystal.name=留影水晶 -item.DiabolistFork.name=妖魔之叉 -item.DiabolistSpork.name=劫难叉勺 -item.GluttonyShard.name=饕餮碎片 -item.Bloodwell.name=血腥之笔与墨 -item.DivineOrb.name=超凡血珠 -item.Crystalwell.name=水晶笔与墨 -item.RidingCrop.name=马鞭 -item.Divinewell.name=图特之笔 -item.BoundShears.name=绑定剪刀 -# -# Wand components -item.Wand.tainted.rod=腐化 -item.Wand.infernal.rod=炼狱 -item.Wand.neutronium.rod=宇宙中子 -item.Wand.soul.rod=恐怖 -item.Wand.blood.rod=血腥 -item.Wand.witchwood.rod=巫魂木 -item.Wand.totem.rod=图腾 -item.Wand.livingwood.rod=活木 -item.Wand.orichalcum.cap=镶嵌奥利哈康杖端 -item.Wand.alchemical.cap=炼金纹饰杖端 -item.Wand.vinteum.cap=温特姆杖端 -item.Wand.soul.cap=末影覆层杖端 -item.Wand.manasteel.cap=魔钢缠绕杖端 -item.WandCores.tainted.name=腐化杖柄 -item.WandCores.infernal.name=炼狱杖柄 -item.WandCores.soul.name=异域杖柄 -item.WandCores.blood.name=血腥杖柄 -item.WandCores.witchwood.name=巫魂木杖柄 -item.WandCores.totem.name=图腾杖柄 -item.WandCores.blood_inert.name=惰性血腥杖柄 -item.WandCores.livingwood.name=活木杖柄 -item.WandCores.livingwood_inert.name=休眠活木杖柄 -item.WandCores.blood_staff.name=血腥杖芯 -item.WandCores.witchwood_staff.name=巫魂木杖芯 -item.WandCaps.alchemical.name=炼金杖端 -item.WandCaps.vinteum.name=温特姆杖端 -item.WandCaps.soul.name=末影杖端 -item.WandCaps.manasteel.name=魔钢杖端 -item.WandCaps.manasteel_inert.name=惰性温特姆杖端 -# -# Blocks -tile.ArcaneCake.name=奥法蛋糕 -tile.InkFlower.name=暗影玫瑰 -tile.WrathCage.name=暴怒之笼 -tile.StarBlock.name=下界之星方块 -# -# Enchantments -enchantment.cluster=炽心 -enchantment.pigbane=猪猡克星 -enchantment.greedy=剥削 -enchantment.consuming=挥霍 -enchantment.educational=教育 -enchantment.corrupting=堕落 -enchantment.eternal=不朽 -# -# Misc -itemGroup.forbidden=禁忌魔法 -itemGroup.mobcrystal=留影水晶 -tc.research_category.FORBIDDEN=伪经 -tc.research_category.TAINT=咒波学 -# -# Research -forbidden.research_name.NETHERSHARDS=下界之星 -forbidden.research_text.NETHERSHARDS=为了为所欲为. -forbidden.research_page.NETHERSHARDS.1=诡异的能量流打着漩儿贯穿着下界.有时候,正如我们所知,当某些共鸣事件发生之际,这些能量流会凝结成一些水晶碎片. -forbidden.research_page.NETHERSHARDS.2=这些水晶内充斥着世间诸罪,对那些更肆无忌惮的神秘使来说用途广泛.
目前有7种记录在案的下界碎片,分别与不同的"死罪"相谐。

forbidden:textures/misc/research.png:0:0:111:16:1
-forbidden.research_page.NETHERSHARDS.2b=这些水晶内充斥着世间诸罪,对那些更加百无禁忌的神秘使来说用途广泛.
目前有6种记录在案的下界碎片,分别与不同的"死罪"相谐。

forbidden:textures/misc/research.png:0:16:95:16:1
-forbidden.research_page.NETHERSHARDS.3=暴怒碎片凝结了各种暴力行径.逞凶滥武越肆无忌惮之地越可能出现暴怒碎片.

怠倦碎片会在人们妄想毫不付出,仅仅靠假手他人或投机倒把就能收集到资源的时候凝固成形.

妒忌碎片会被那些觊觎者从拥有它们的人手里夺走.

傲慢碎片会在那些真正强大的生物颜面扫地时具现.

随着时间的推移还将会冒出更多的共鸣事件! -# -forbidden.research_name.SKULLAXE=啄颅斧 -forbidden.research_text.SKULLAXE=砍掉他们的脑袋! -forbidden.research_page.SKULLAXE.1=某些怪物就是那么能让你热血沸腾.骷髅!老是咔咔作响,拿你当练箭的靶子.他们就那样来回转悠,扫荡一切彷佛主宰着这片土地.你真希望你可以一股劲儿剁掉他们自鸣得意的脑袋,将它们插在矛尖上.

幸运的是,你真发现一个能让你实现设想的好东西.啄颅斧有一定几率会砍掉用它杀死的怪物的头颅.在杀人的时候甚至也能发挥这效果!不幸的是,注入的魔力为了使得这柄斧头足以能割草无双,让它过于嗜血了. -# -forbidden.research_name.ARCANECAKE=奥法蛋糕 -forbidden.research_text.ARCANECAKE=让他们吃掉蛋糕. -forbidden.research_page.ARCANECAKE.1=若问有哪样事物为你所钟爱,那必定是指蛋糕了.愿意的话你可以一整天品尝它的美味,但也总有吃光的时候.

为了补救这种遗憾,你开发出一种新的配方,将长寿魔法注入到蛋糕之中.奥法蛋糕明显比普通蛋糕耐吃,且只要剩下一点点,就能随着时间推移自己复原.然而这种附魔并不稳定,放下后的蛋糕将无法用寻常手段移除. -# -forbidden.research_name.TAINTSHOVEL=净化铲 -forbidden.research_text.TAINTSHOVEL=犹如火热的刀子划过真正的黄油 -forbidden.research_page.TAINTSHOVEL.1=有时,清楚腐化区域的最简单途径无非直接挖走它们.

使用银树和秩序碎片强化神秘铲,你制造出这柄能够对抗腐化的工具.净化铲能够像挖开普通泥土那样捣稀泥一般地挖开腐化后的大地.拿在手里按下右键,这柄铲子能消耗耐久为你治疗咒波污染. -forbidden.research_page.TAINTSHOVEL.2=用这柄铲子挖开腐化的大地有几率释放出的扭曲能量,会结晶成腐化碎片.不像其余的腐化材料,水晶的形态让这种碎片稳定到能够随身携带. -# -forbidden.research_name.TAINTPICK=畸变镐 -forbidden.research_text.TAINTPICK=黑曜石粉碎机 -forbidden.research_page.TAINTPICK.1=向神秘镐中注入腐化的力量,你制造出一柄能凿开坚固材料的工具.

畸变镐能用腐化的力量侵染材料以削弱它们.材料越坚固,镐子挖走它们的效率最高.不幸的是,腐化的力量对那些较为柔软的材料影响微乎其微,换言之用它来挖软和的东西还不如徒手快. -# -forbidden.research_name.ROD_tainted=腐化杖柄 -forbidden.research_text.ROD_tainted=扭曲地存储魔力 -forbidden.research_page.ROD_tainted.1=腐化的大地对那些知道如何开发它们的神秘使来说是既了不起又糟透了的地方.

腐化法杖核心能够存储每种魔力50 vis,且身处腐化区域时还能自动将每种要素回复到10%的水平.这种法杖被攥在手里时,还能从穿透静脉的咒波污染中汲取能量,在每次承受咒波污染伤害时随机回复魔力. -# -forbidden.research_name.ROD_infernal=炼狱杖柄 -forbidden.research_text.ROD_infernal=恶魔式存储魔力 -forbidden.research_page.ROD_infernal.1=像您这般伟大而强力的神秘使,值得拥有一柄与身份相衬且炫酷强力的法杖.那些嬉皮的银树法杖根本无法胜任.您需要的法杖,必须要能够作为彰显权威的节杖.

你研究出一种注入下界之力制造法杖的方法.炼狱法杖核心能够容纳150 vis的魔力,并且能够自动回复Ignis要素到20%的水平.当身处下界,其他要素魔力也能自动回复到10%的水平. -forbidden.research_page.ROD_infernal.2=这柄法杖还附加一些针对下界危险的防护法术.只要它留在物品栏内,就不仅能自动帮你扑灭身上的火焰,还能帮助你豁免凋灵效果.手持这柄法杖时,能够完全免疫所有灼烧伤害. -# -forbidden.research_name.ROD_soul=异域杖柄 -forbidden.research_text.ROD_soul=堕落式存储魔力 -forbidden.research_page.ROD_soul.1=你研究出一种从玩家信标中抽取能量转换为魔力的技术.只要相绑定的玩家信标同你处于同一位面,那么异域法杖核心就能缓慢能恢复所有的魔力,她最大能容纳每种要素魔力100 vis.

然而,引导如此巨大的能量流贯穿灵魂会付出一些代价.每一点的魔力都深深腐蚀了你的灵魂.因此最好不要过分依赖它的自动充能效果了…… -# -forbidden.research_name.ROD_blood=血腥杖柄 -forbidden.research_text.ROD_blood=炼金学储存魔力 -forbidden.research_page.ROD_blood.1=在神秘学和炼金术之间你构筑出一座桥梁.血腥法杖能够容纳100 vis的魔力,并且可以消耗生命点来补充自己.

这柄法杖会和第一个拿起它来的人绑定.如果没有足够的生命点作为燃料,这柄法杖还会试图抽取拿着它的人的生命力,但这种转换的效率并不高.若手持法杖的人血量下降到三颗心一下,并非多余生命可供抽取,法杖将会停止为自己充能. -forbidden.research_page.ROD_blood.2=单独的注魔过程不足以完成一柄血腥法杖.注魔制作的惰性血腥法杖需要在血腥祭坛内注入生命精华才能激活. -# -forbidden.research_name.ROD_blood_staff=血腥杖芯 -forbidden.research_text.ROD_blood_staff=血法师之杖 -forbidden.research_page.ROD_blood_staff.1=血腥法杖有用,但充能太慢了.是时候做一柄适合用于持久战斗的魔法工具了.

不像多数手杖,血腥手杖只能容纳50 vis的魔力,而非其法杖形式的100 vis容量.它真正的亮点在于能够快速回复魔力.只要将血腥手杖放置在快捷栏内,它就能以4倍于血腥法杖的速度从其主人的生命点系统中抽取能量充能.不像法杖,如若没有足够的生命点它将会而且也愿意杀死持有它的家伙. -# -forbidden.research_name.ROD_witchwood=巫魂木杖柄 -forbidden.research_text.ROD_witchwood=魔力转换 -forbidden.research_page.ROD_witchwood.1=使用巫魂木制作出这柄法杖后,你研究出一种能够将AM魔力转换成TC魔力的方法.巫魂木杖柄能容纳100 vis魔力且能以140 mana换取1 vis的效率回复魔力.

进一步的研究会帮助你找到降低转换损耗之策. -# -forbidden.research_name.ROD_witchwood_staff=巫魂木杖芯 -forbidden.research_text.ROD_witchwood_staff=巫师之杖 -forbidden.research_page.ROD_witchwood_staff.1=巫魂木法杖要吞噬掉太多的AM魔力,充能又慢得远远不适合用于持久战斗.是时候做点能稍微高效点儿地引导奥术能量的玩意儿了.不像多数手杖,巫魂木手杖只能容纳50 vis的魔力.它真正的优势在于快速的充能效率—达到巫魂木法杖的2倍.不仅如此,相比巫魂木法杖,若没有合适的杖端,巫魂木手杖还能节约可观的AM魔力,只需要100点就能换取1 vis的TC魔力. -# -forbidden.research_name.ROD_totem=图腾杖柄 -forbidden.research_text.ROD_totem=叶绿存储魔力 -forbidden.research_page.ROD_totem.1=为了魔力而狩猎节点有时候相当令人痛苦.也许还存在其他能让你获得魔力的规则……

向一段注魔的枝干中嵌入一枚法杖核心,你制作出一柄能够从植物中抽取魔力的法杖.图腾法杖核心能够容纳50 vis的魔力,并能够从物品栏中的叶绿水晶中抽取魔力为自己充能. -# -forbidden.research_name.ROD_livingwood=活木杖柄 -forbidden.research_text.ROD_livingwood=植物存储魔力 -forbidden.research_page.ROD_livingwood.1=活木在操纵AM魔力的性能上得天独厚.当其与合适的药剂相融合,甚至可以将AM魔力转换为TC魔力.

活木法杖能从物品栏存储的物品中抽取AM魔力为自己充能.

不幸的是,注魔的过程会使活木陷入休眠,注魔后杖端需要在血池中进行充能才能重新激活. -# -forbidden.research_name.CAP_alchemical=炼金纹饰杖端 -forbidden.research_text.CAP_alchemical=当神秘学不够血腥时 -forbidden.research_page.CAP_alchemical.1=将神秘学与炼金巫术相结合,你开发出一种新型杖端.炼金纹饰杖端在引导Aqua要素时非常高效,与平常相比仅仅需要80%的魔力消耗量.但对其余类型的要素,效率只有90%.

若安装在血腥杖柄上,炼金纹饰杖端将提高生命点转换成魔力的效率,每vis只需900生命点.这种杖端还能让所有的血腥法杖发出的攻击附带虚弱效果. -# -forbidden.research_name.CAP_vinteum=温特姆杖端 -forbidden.research_text.CAP_vinteum=魔法杖端 -forbidden.research_page.CAP_vinteum.1=将神秘杖端与温特姆相融,你制作出一种杖端,能够安装在巫魂木杖柄上,使得其只需要消耗80点AM魔力就能转换一点TC魔力.

看起来神秘杖端和温特姆相得益彰,还保留着90%的魔力使用效率. -# -forbidden.research_name.CAP_soul=末影杖端 -forbidden.research_text.CAP_soul=灵魂防护 -forbidden.research_page.CAP_soul.1=你已经制造出一种杖端,能够安全引导末地毁灭性的能量.末影杖端引导Perditio要素时只有80%的效率,但对其他要素有90%的效率.

安装在异域杖柄上的话,末影杖端能够削减引导从末地引导来的能量对灵魂的腐蚀. -# -forbidden.research_name.CAP_manasteel=魔钢杖端 -forbidden.research_text.CAP_manasteel=魔力之秘 -forbidden.research_page.CAP_manasteel.1=魔钢在操纵AM魔力的特性方面得天独厚.用它来制作的杖端只有90%的魔力效率.安装在活木杖柄上后,它能够让AM魔力转换成vis的效率更高.

为了用于制作法杖,惰性魔钢杖端需要在血池中激活. -# -forbidden.research_name.TRANSEMERALD=嬗变术:绿宝石 -forbidden.research_text.TRANSEMERALD=将贵重物品转换为绿宝石 -forbidden.research_page.TRANSEMERALD.1=你研究出一种将绿宝石碎片浸泡在从其他物质中提取出的lucrum源质中,以增殖绿宝石的方法. -# -forbidden.research_name.BLACKFLOWER=暗影玫瑰 -forbidden.research_text.BLACKFLOWER=救救乌贼! -forbidden.research_page.BLACKFLOWER.1=没有比一个湿漉漉的神秘使还要更令人悲戚的画面了.尽管你掌控着伟大而神奇的魔力,但每次需要补充墨水的时候,你仍然不得不跳进最近的湖里去猎杀乌贼.

你杀乌贼真的杀得腻歪透了.向玫瑰注入tenebrae和victus要素,你创造出一种茎叶如杂草,花瓣可以磨浆成墨汁的花. -# -forbidden.research_name.WRATHCAGE=暴怒之笼 -forbidden.research_text.WRATHCAGE=战无止境 -forbidden.research_page.WRATHCAGE.1=有时候,小打小杀就是不够.诚然,杀掉一只孤零零的怪物相当令人身通体便,但想象一下屠戮掉一大波可憎小蠢蛋的画面吧.

为了实现这一目标,你研究出一种方法,能够重新制造出古代废墟中的怪物.不像天然的刷怪笼,暴怒之笼由红石信号控制,因而无需感应是否有人类出现,而且这种笼子可以比刷怪笼这种古代设备运行得更快速. -forbidden.research_page.WRATHCAGE.2=然而,你无法复制天然刷怪笼无限刷怪的特性.每诞下一只生物都会让暴怒笼子消耗一点点用管道导入其内的源质.依据对应生物的不同,暴怒之笼需要不同类型的源质.抑或你可以导入Ira源质来作为燃料.也可以使用Desidia来实现另外一些功能.

拿着妖魔之叉右键暴怒之笼,能够循环切换其使用的燃料类型,切换它抽取哪一种要素源质. -forbidden.research_page.WRATHCAGE.3=要使暴怒之笼与某种指定生物绑定,可以使用留影水晶右击笼子.携带空白留影水晶用妖魔之叉杀死生物能够将生物的信息烙印到水晶之中. -# -forbidden.research_name.FORK=妖魔之叉 -forbidden.research_text.FORK=神秘匠人之工具 -forbidden.research_page.FORK.1=你制造出一柄工具用以捣鼓数种炼狱装置.石英支撑的叉尖让妖魔之叉能够同奥术能量相谐振.

除了能用以调整设备,妖魔之叉用来做实用武器亦不错.

当你解锁了更多研究后下面几页会出现更重要的信息. -forbidden.research_page.FORK.wc=如果用妖魔之叉杀死支持的生物类型时物品栏内有空白留影水晶,那么这种生物就会被烙印到水晶中.留影水晶可以用于暴怒之笼,以绑定某种怪物.

这柄叉子还能用来设置暴怒之笼使用哪种源质作为燃料.只需拿着妖魔之叉右键暴怒之笼,就能在三种不同的燃料类型中切换. -# -forbidden.research_name.MORPHTOOLS=避役工具 -forbidden.research_text.MORPHTOOLS=这里有一项能用上的附魔… -forbidden.research_page.MORPHTOOLS.1=避役工具是种三合一的工具.当第一次附魔后,手持这柄工具潜行状态下按下右键能够将其切换成没有经过附魔的状态,这使得它可以再次进行完全不同的附魔.没一柄工具有三种可以独立附魔的状态,都能使用潜行下按住右键来切换.

但这种工具一经附魔便无法抹去效果,因此应利用好每一次附魔机会! -# -forbidden.research_name.CLUSTER=附魔:炽心 -forbidden.research_text.CLUSTER=核心之避役 -forbidden.research_page.CLUSTER.1=你研究出一种能让避役镐模仿炽心镐效果的附魔.进行炽心附魔后的避役镐在采掘某种矿石时有几率掉落原矿簇.原矿簇是一种比天然矿石纯度更高的矿藏,冶炼时相比普通矿石能够翻倍得到产物.炽心附魔等级越高掉落原矿簇几率越大. -# -forbidden.research_name.GREEDY=附魔:剥削 -forbidden.research_text.GREEDY=无控的附魔 -forbidden.research_page.GREEDY.1=你已经研究出一种武器附魔,能让你从生物那里榨取好处.每次使用附魔了剥削的武器杀死一只敌对生物,就有几率掉落出一枚绿宝石碎片.若用它杀死村民,可能的掉落物则代之以村民的绿宝石. -# -forbidden.research_name.CONSUMING=附魔:挥霍 -forbidden.research_text.CONSUMING=垃圾处理 -forbidden.research_page.CONSUMING.1=烦透了要手动清空口袋里无用的垃圾,你设计出一种附魔,能够让工具自动毁掉那些寻常的不需要的材料.被挥霍工具挖掉的所有圆石,泥土或下界岩都会被销毁,而非掉落到地上. -# -forbidden.research_name.PIGBANE=附魔:猪猡克星 -forbidden.research_text.PIGBANE=告诉这些僵尸猪人谁才占据食物链的顶端! -forbidden.research_page.PIGBANE.1=僵尸主人自鸣得意.他们老是成群结队在无辜的旅者面前踏步巡行.是时候让他们停下来了.

附魔了猪猡克星的武器对猪或者僵尸猪人效果拔群. -# -forbidden.research_name.EDUCATIONAL=附魔:教育 -forbidden.research_text.EDUCATIONAL=你会学到的! -forbidden.research_page.EDUCATIONAL.1=你创造出一种附魔,能将知识和学习的精髓注入武器.依这项附魔的等级不同,教育武器能够将好学精神捶入怪物的脑门,让它们死后比平常掉落出更多经验. -# -forbidden.research_name.CORRUPTING=附魔:堕落 -forbidden.research_text.CORRUPTING=对碎片的坏影响 -forbidden.research_page.CORRUPTING.1=下界无与伦比,但它毕竟是一个地狱之坑.

堕落附魔让你无须前往下界就能收获到下界碎片.堕落附魔的镐能随机腐化挖出的元素碎片,将其转换为下界碎片.晶化的碎片只是看起来容易感染,因此腐化晶簇不会有效果. -# -forbidden.research_name.ETERNAL=附魔:不朽 -forbidden.research_text.ETERNAL=避役之神 -forbidden.research_page.ETERNAL.1=灵宝工具相当了不起.你确定避役工具可以与它们更加相似.也许它们可以吧……

天域附魔让避役工具如同灵宝工具那样永不磨损. -# -forbidden.research_name.TAINTBASICS=腐化的大地 -forbidden.research_text.TAINTBASICS=深紫色 -forbidden.research_page.TAINTBASICS.1=有时候,神秘学会变得糟糕可怖.奇迹变成了扭曲的灾难以及大片丑陋的景观.腐化的大地是被魔法设备排出的扭曲魔力咒波污染了的地方.当地的花花草草会发生扭曲的变异,动物也会从普通的野兽转变成敌对的怪物.污染极端严重的腐化区域还会感染那些践踏它脉动的须根的家伙. -forbidden.research_page.TAINTBASICS.2=腐化大地天然分布于世界的某些角落.但有时也会因为粗枝大叶的神秘使让咒波粘浆淤塞了过长时间而人为形成.它们很容易通过那些深紫色的须根和亮紫色的藤梗辨识.如若放置不管,腐化大地一般会将它的触手向外蔓延,感染周围越来越多的土地.树木或其他天然植渐渐会被覆盖上一层纤维状的物质,而泥土会变成稠密发紫的腐化泥土,变得结构松垮,随时可能坍塌或融化成咒波粘浆. -# -forbidden.research_name.BLOODWELL=血腥之笔与墨 -forbidden.research_text.BLOODWELL="如若它杀了我,我便能完成这项研究!" -forbidden.research_page.BLOODWELL.1=没有比研究到一半却需要补充墨水更令人沮丧的事情了.有时候,你宁可使用自己的血来代替墨水也不愿意中断研究去找墨水.

血腥之笔与墨将能够使用生命点来补充墨水,每25个生命点补充一点墨水.但这项能力需要用体温激活,因此填充墨水时需要你从研究台中取出这个工具,但却实际上不会因此中断研究. -# -forbidden.research_name.DIVINEORB=超凡血珠 -forbidden.research_text.DIVINEORB=血神阿莫科的宝珠 -forbidden.research_page.DIVINEORB.1=在一些神秘使圈子里灵液确实就是神灵之血的流言甚嚣尘上.你难以辨别其真假,但灵液确乎对更加高级的炼金材料具有亲和力.

超凡血珠是你将最高深的神秘学与可用的炼金巫术相结合研究出的东西.这种融合极大增强了血珠的容纳能力,能够让它容纳高达70,000,000生命点.难道你还会需要更多的生命点吗? -# -forbidden.research_name.CRYSTALWELL=水晶笔与墨 -forbidden.research_text.CRYSTALWELL=奥术研究授权 -forbidden.research_page.CRYSTALWELL.1=将元素碎片与你的魔瓶融合会出现有趣的效果.看起来,用水晶笔与墨书写的时候会吸收到知识.当墨水耗尽时,你可以拿起水晶笔与墨右键,吸收到的这些知识就会转变成一些研究点供你使用.遗憾的是,这会耗尽这个小玩意儿上附带的魔力,使得它又变回普通的笔与墨. -# -forbidden.research_name.RIDINGCROP=马鞭 -forbidden.research_text.RIDINGCROP=鞭策之痛 -forbidden.research_page.RIDINGCROP.1=马鞭,顾名思义,是一种让坐骑跑得更快的工具.手持马鞭骑着马匹或其他坐骑时右击,会让坐骑感到一阵疼痛,鞭策它加速奔跑一阵儿.

当然你也可以用这个鞭子抽打其他生物,但到底你被什么念头占据了身体才会那样子啊? -# -forbidden.research_name.HELLFIRE=地狱火领主 -forbidden.research_text.HELLFIRE=从此势不可挡 -forbidden.research_page.HELLFIRE.1=身陷下界是最糟糕的体验.当你克服到你需要克服的重重困难,终于就要能回到家园的时候,一些愚蠢的幽魂却打算耀武扬威地对你轰炸一通,以至于传送门都被关掉了.当然,若随身携带着打火石再重新修好也并不费事,但谁会一直随身带这些玩意儿?

你研究出一种利用法杖魔力点燃某些材料的方法.手持卸掉核心的法杖右击地狱岩或者黑曜石的上方,会从法杖中消耗掉一些Ignis要素并点燃一团火焰. -# -forbidden.research_name.DIVINEWELL=图特之笔 -forbidden.research_text.DIVINEWELL=笔诛胜于剑伐 -forbidden.research_page.DIVINEWELL.1=在研究了全宇宙每一点零碎的知识后,你终于揭开了让墨水用之不竭的秘密.

图特之笔从不会耗光墨水.

你真希望能早点研究出来这个... -# +# +# Aspects +tc.aspect.infernus=下界,恶魔,地狱火 +tc.aspect.ira=暴怒,恼怒,怒火 +tc.aspect.gula=饕餮,挥霍,放纵 +tc.aspect.invidia=妒忌,嫉妒,不安 +tc.aspect.superbia=傲慢,自大,轻蔑 +tc.aspect.desidia=怠惰,懒散,拖延 +tc.aspect.luxuria=欲望,欲念,无度 +# +# Items +item.NetherShard.wrath.name=暴怒碎片 +item.NetherShard.envy.name=妒忌碎片 +item.NetherShard.gluttony.name=饕餮碎片 +item.NetherShard.pride.name=傲慢碎片 +item.NetherShard.lust.name=欲望碎片 +item.NetherShard.sloth.name=怠惰碎片 +item.NetherShard.greed.name=贪婪碎片 +item.NetherShard.taint.name=腐化碎片 +item.NetherShard.despair.name=绝望碎片 +item.SkullAxe.name=啄颅斧 +item.ArcaneCake.name=奥法蛋糕 +item.TaintShovel.name=净化铲 +item.TaintPickaxe.name=畸变镐 +item.MorphPickaxe.name=避役镐 +item.MorphSword.name=避役剑 +item.MorphShovel.name=避役铲 +item.MorphAxe.name=避役斧 +item.FMResource.0.name=绿宝石碎片 +item.FMResource.1.name=暗影墨水 +item.FMResource.2.name=魔钢粒 +item.MobCrystalEmpty.name=空白留影水晶 +item.MobCrystal.name=留影水晶 +item.DiabolistFork.name=妖魔之叉 +item.DiabolistSpork.name=劫难叉勺 +item.GluttonyShard.name=饕餮碎片 +item.Bloodwell.name=血腥之笔与墨 +item.DivineOrb.name=超凡血珠 +item.Crystalwell.name=水晶笔与墨 +item.RidingCrop.name=马鞭 +# +# Wand components +item.Wand.tainted.rod=腐化 +item.Wand.infernal.rod=炼狱 +item.Wand.neutronium.rod=宇宙中子 +item.Wand.soul.rod=恐怖 +item.Wand.blood.rod=血腥 +item.Wand.witchwood.rod=巫魂木 +item.Wand.totem.rod=图腾 +item.Wand.livingwood.rod=活木 +item.Wand.orichalcum.cap=镶嵌奥利哈康杖端 +item.Wand.alchemical.cap=炼金纹饰杖端 +item.Wand.vinteum.cap=温特姆杖端 +item.Wand.soul.cap=末影覆层杖端 +item.Wand.manasteel.cap=魔钢缠绕杖端 +item.WandCores.tainted.name=腐化杖柄 +item.WandCores.infernal.name=炼狱杖柄 +item.WandCores.soul.name=异域杖柄 +item.WandCores.blood.name=血腥杖柄 +item.WandCores.witchwood.name=巫魂木杖柄 +item.WandCores.totem.name=图腾杖柄 +item.WandCores.blood_inert.name=惰性血腥杖柄 +item.WandCores.livingwood.name=活木杖柄 +item.WandCores.livingwood_inert.name=休眠活木杖柄 +item.WandCores.blood_staff.name=血腥杖芯 +item.WandCores.witchwood_staff.name=巫魂木杖芯 +item.WandCaps.alchemical.name=炼金杖端 +item.WandCaps.vinteum.name=温特姆杖端 +item.WandCaps.soul.name=末影杖端 +item.WandCaps.manasteel.name=魔钢杖端 +item.WandCaps.manasteel_inert.name=惰性温特姆杖端 +# +# Blocks +tile.ArcaneCake.name=奥法蛋糕 +tile.InkFlower.name=暗影玫瑰 +tile.WrathCage.name=暴怒之笼 +tile.StarBlock.name=下界之星方块 +# +# Enchantments +enchantment.cluster=炽心 +enchantment.pigbane=猪猡克星 +enchantment.greedy=剥削 +enchantment.consuming=挥霍 +enchantment.educational=教育 +enchantment.corrupting=堕落 +enchantment.eternal=不朽 +# +# Misc +itemGroup.forbidden=禁忌魔法 +itemGroup.mobcrystal=留影水晶 +tc.research_category.FORBIDDEN=伪经 +tc.research_category.TAINT=咒波学 +# +# Research +forbidden.research_name.NETHERSHARDS=下界之星 +forbidden.research_text.NETHERSHARDS=为了为所欲为. +forbidden.research_page.NETHERSHARDS.1=诡异的能量流打着漩儿贯穿着下界.有时候,正如我们所知,当某些共鸣事件发生之际,这些能量流会凝结成一些水晶碎片. +forbidden.research_page.NETHERSHARDS.2=这些水晶内充斥着世间诸罪,对那些更肆无忌惮的神秘使来说用途广泛.
目前有7种记录在案的下界碎片,分别与不同的"死罪"相谐。

forbidden:textures/misc/research.png:0:0:111:16:1
+forbidden.research_page.NETHERSHARDS.2b=这些水晶内充斥着世间诸罪,对那些更加百无禁忌的神秘使来说用途广泛.
目前有6种记录在案的下界碎片,分别与不同的"死罪"相谐。

forbidden:textures/misc/research.png:0:16:95:16:1
+forbidden.research_page.NETHERSHARDS.3=暴怒碎片凝结了各种暴力行径.逞凶滥武越肆无忌惮之地越可能出现暴怒碎片.

怠倦碎片会在人们妄想毫不付出,仅仅靠假手他人或投机倒把就能收集到资源的时候凝固成形.

妒忌碎片会被那些觊觎者从拥有它们的人手里夺走.

傲慢碎片会在那些真正强大的生物颜面扫地时具现.

随着时间的推移还将会冒出更多的共鸣事件! +# +forbidden.research_name.SKULLAXE=啄颅斧 +forbidden.research_text.SKULLAXE=砍掉他们的脑袋! +forbidden.research_page.SKULLAXE.1=某些怪物就是那么能让你热血沸腾.骷髅!老是咔咔作响,拿你当练箭的靶子.他们就那样来回转悠,扫荡一切彷佛主宰着这片土地.你真希望你可以一股劲儿剁掉他们自鸣得意的脑袋,将它们插在矛尖上.

幸运的是,你真发现一个能让你实现设想的好东西.啄颅斧有一定几率会砍掉用它杀死的怪物的头颅.在杀人的时候甚至也能发挥这效果!不幸的是,注入的魔力为了使得这柄斧头足以能割草无双,让它过于嗜血了. +# +forbidden.research_name.ARCANECAKE=奥法蛋糕 +forbidden.research_text.ARCANECAKE=让他们吃掉蛋糕. +forbidden.research_page.ARCANECAKE.1=若问有哪样事物为你所钟爱,那必定是指蛋糕了.愿意的话你可以一整天品尝它的美味,但也总有吃光的时候.

为了补救这种遗憾,你开发出一种新的配方,将长寿魔法注入到蛋糕之中.奥法蛋糕明显比普通蛋糕耐吃,且只要剩下一点点,就能随着时间推移自己复原.然而这种附魔并不稳定,放下后的蛋糕将无法用寻常手段移除. +# +forbidden.research_name.TAINTSHOVEL=净化铲 +forbidden.research_text.TAINTSHOVEL=犹如火热的刀子划过真正的黄油 +forbidden.research_page.TAINTSHOVEL.1=有时,清楚腐化区域的最简单途径无非直接挖走它们.

使用银树和秩序碎片强化神秘铲,你制造出这柄能够对抗腐化的工具.净化铲能够像挖开普通泥土那样捣稀泥一般地挖开腐化后的大地.拿在手里按下右键,这柄铲子能消耗耐久为你治疗咒波污染. +forbidden.research_page.TAINTSHOVEL.2=用这柄铲子挖开腐化的大地有几率释放出的扭曲能量,会结晶成腐化碎片.不像其余的腐化材料,水晶的形态让这种碎片稳定到能够随身携带. +# +forbidden.research_name.TAINTPICK=畸变镐 +forbidden.research_text.TAINTPICK=黑曜石粉碎机 +forbidden.research_page.TAINTPICK.1=向神秘镐中注入腐化的力量,你制造出一柄能凿开坚固材料的工具.

畸变镐能用腐化的力量侵染材料以削弱它们.材料越坚固,镐子挖走它们的效率最高.不幸的是,腐化的力量对那些较为柔软的材料影响微乎其微,换言之用它来挖软和的东西还不如徒手快. +# +forbidden.research_name.ROD_tainted=腐化杖柄 +forbidden.research_text.ROD_tainted=扭曲地存储魔力 +forbidden.research_page.ROD_tainted.1=腐化的大地对那些知道如何开发它们的神秘使来说是既了不起又糟透了的地方.

腐化法杖核心能够存储每种魔力50 vis,且身处腐化区域时还能自动将每种要素回复到10%的水平.这种法杖被攥在手里时,还能从穿透静脉的咒波污染中汲取能量,在每次承受咒波污染伤害时随机回复魔力. +# +forbidden.research_name.ROD_infernal=炼狱杖柄 +forbidden.research_text.ROD_infernal=恶魔式存储魔力 +forbidden.research_page.ROD_infernal.1=像您这般伟大而强力的神秘使,值得拥有一柄与身份相衬且炫酷强力的法杖.那些嬉皮的银树法杖根本无法胜任.您需要的法杖,必须要能够作为彰显权威的节杖.

你研究出一种注入下界之力制造法杖的方法.炼狱法杖核心能够容纳150 vis的魔力,并且能够自动回复Ignis要素到20%的水平.当身处下界,其他要素魔力也能自动回复到10%的水平. +forbidden.research_page.ROD_infernal.2=这柄法杖还附加一些针对下界危险的防护法术.只要它留在物品栏内,就不仅能自动帮你扑灭身上的火焰,还能帮助你豁免凋灵效果.手持这柄法杖时,能够完全免疫所有灼烧伤害. +# +forbidden.research_name.ROD_soul=异域杖柄 +forbidden.research_text.ROD_soul=堕落式存储魔力 +forbidden.research_page.ROD_soul.1=你研究出一种从玩家信标中抽取能量转换为魔力的技术.只要相绑定的玩家信标同你处于同一位面,那么异域法杖核心就能缓慢能恢复所有的魔力,她最大能容纳每种要素魔力100 vis.

然而,引导如此巨大的能量流贯穿灵魂会付出一些代价.每一点的魔力都深深腐蚀了你的灵魂.因此最好不要过分依赖它的自动充能效果了…… +# +forbidden.research_name.ROD_blood=血腥杖柄 +forbidden.research_text.ROD_blood=炼金学储存魔力 +forbidden.research_page.ROD_blood.1=在神秘学和炼金术之间你构筑出一座桥梁.血腥法杖能够容纳100 vis的魔力,并且可以消耗生命点来补充自己.

这柄法杖会和第一个拿起它来的人绑定.如果没有足够的生命点作为燃料,这柄法杖还会试图抽取拿着它的人的生命力,但这种转换的效率并不高.若手持法杖的人血量下降到三颗心一下,并非多余生命可供抽取,法杖将会停止为自己充能. +forbidden.research_page.ROD_blood.2=单独的注魔过程不足以完成一柄血腥法杖.注魔制作的惰性血腥法杖需要在血腥祭坛内注入生命精华才能激活. +# +forbidden.research_name.ROD_blood_staff=血腥杖芯 +forbidden.research_text.ROD_blood_staff=血法师之杖 +forbidden.research_page.ROD_blood_staff.1=血腥法杖有用,但充能太慢了.是时候做一柄适合用于持久战斗的魔法工具了.

不像多数手杖,血腥手杖只能容纳50 vis的魔力,而非其法杖形式的100 vis容量.它真正的亮点在于能够快速回复魔力.只要将血腥手杖放置在快捷栏内,它就能以4倍于血腥法杖的速度从其主人的生命点系统中抽取能量充能.不像法杖,如若没有足够的生命点它将会而且也愿意杀死持有它的家伙. +# +forbidden.research_name.ROD_witchwood=巫魂木杖柄 +forbidden.research_text.ROD_witchwood=魔力转换 +forbidden.research_page.ROD_witchwood.1=使用巫魂木制作出这柄法杖后,你研究出一种能够将AM魔力转换成TC魔力的方法.巫魂木杖柄能容纳100 vis魔力且能以140 mana换取1 vis的效率回复魔力.

进一步的研究会帮助你找到降低转换损耗之策. +# +forbidden.research_name.ROD_witchwood_staff=巫魂木杖芯 +forbidden.research_text.ROD_witchwood_staff=巫师之杖 +forbidden.research_page.ROD_witchwood_staff.1=巫魂木法杖要吞噬掉太多的AM魔力,充能又慢得远远不适合用于持久战斗.是时候做点能稍微高效点儿地引导奥术能量的玩意儿了.不像多数手杖,巫魂木手杖只能容纳50 vis的魔力.它真正的优势在于快速的充能效率—达到巫魂木法杖的2倍.不仅如此,相比巫魂木法杖,若没有合适的杖端,巫魂木手杖还能节约可观的AM魔力,只需要100点就能换取1 vis的TC魔力. +# +forbidden.research_name.ROD_totem=图腾杖柄 +forbidden.research_text.ROD_totem=叶绿存储魔力 +forbidden.research_page.ROD_totem.1=为了魔力而狩猎节点有时候相当令人痛苦.也许还存在其他能让你获得魔力的规则……

向一段注魔的枝干中嵌入一枚法杖核心,你制作出一柄能够从植物中抽取魔力的法杖.图腾法杖核心能够容纳50 vis的魔力,并能够从物品栏中的叶绿水晶中抽取魔力为自己充能. +# +forbidden.research_name.ROD_livingwood=活木杖柄 +forbidden.research_text.ROD_livingwood=植物存储魔力 +forbidden.research_page.ROD_livingwood.1=活木在操纵AM魔力的性能上得天独厚.当其与合适的药剂相融合,甚至可以将AM魔力转换为TC魔力.

活木法杖能从物品栏存储的物品中抽取AM魔力为自己充能.

不幸的是,注魔的过程会使活木陷入休眠,注魔后杖端需要在血池中进行充能才能重新激活. +# +forbidden.research_name.CAP_alchemical=炼金纹饰杖端 +forbidden.research_text.CAP_alchemical=当神秘学不够血腥时 +forbidden.research_page.CAP_alchemical.1=将神秘学与炼金巫术相结合,你开发出一种新型杖端.炼金纹饰杖端在引导Aqua要素时非常高效,与平常相比仅仅需要80%的魔力消耗量.但对其余类型的要素,效率只有90%.

若安装在血腥杖柄上,炼金纹饰杖端将提高生命点转换成魔力的效率,每vis只需900生命点.这种杖端还能让所有的血腥法杖发出的攻击附带虚弱效果. +# +forbidden.research_name.CAP_vinteum=温特姆杖端 +forbidden.research_text.CAP_vinteum=魔法杖端 +forbidden.research_page.CAP_vinteum.1=将神秘杖端与温特姆相融,你制作出一种杖端,能够安装在巫魂木杖柄上,使得其只需要消耗80点AM魔力就能转换一点TC魔力.

看起来神秘杖端和温特姆相得益彰,还保留着90%的魔力使用效率. +# +forbidden.research_name.CAP_soul=末影杖端 +forbidden.research_text.CAP_soul=灵魂防护 +forbidden.research_page.CAP_soul.1=你已经制造出一种杖端,能够安全引导末地毁灭性的能量.末影杖端引导Perditio要素时只有80%的效率,但对其他要素有90%的效率.

安装在异域杖柄上的话,末影杖端能够削减引导从末地引导来的能量对灵魂的腐蚀. +# +forbidden.research_name.CAP_manasteel=魔钢杖端 +forbidden.research_text.CAP_manasteel=魔力之秘 +forbidden.research_page.CAP_manasteel.1=魔钢在操纵AM魔力的特性方面得天独厚.用它来制作的杖端只有90%的魔力效率.安装在活木杖柄上后,它能够让AM魔力转换成vis的效率更高.

为了用于制作法杖,惰性魔钢杖端需要在血池中激活. +# +forbidden.research_name.TRANSEMERALD=嬗变术:绿宝石 +forbidden.research_text.TRANSEMERALD=将贵重物品转换为绿宝石 +forbidden.research_page.TRANSEMERALD.1=你研究出一种将绿宝石碎片浸泡在从其他物质中提取出的lucrum源质中,以增殖绿宝石的方法. +# +forbidden.research_name.BLACKFLOWER=暗影玫瑰 +forbidden.research_text.BLACKFLOWER=救救乌贼! +forbidden.research_page.BLACKFLOWER.1=没有比一个湿漉漉的神秘使还要更令人悲戚的画面了.尽管你掌控着伟大而神奇的魔力,但每次需要补充墨水的时候,你仍然不得不跳进最近的湖里去猎杀乌贼.

你杀乌贼真的杀得腻歪透了.向玫瑰注入tenebrae和victus要素,你创造出一种茎叶如杂草,花瓣可以磨浆成墨汁的花. +# +forbidden.research_name.WRATHCAGE=暴怒之笼 +forbidden.research_text.WRATHCAGE=战无止境 +forbidden.research_page.WRATHCAGE.1=有时候,小打小杀就是不够.诚然,杀掉一只孤零零的怪物相当令人身通体便,但想象一下屠戮掉一大波可憎小蠢蛋的画面吧.

为了实现这一目标,你研究出一种方法,能够重新制造出古代废墟中的怪物.不像天然的刷怪笼,暴怒之笼由红石信号控制,因而无需感应是否有人类出现,而且这种笼子可以比刷怪笼这种古代设备运行得更快速. +forbidden.research_page.WRATHCAGE.2=然而,你无法复制天然刷怪笼无限刷怪的特性.每诞下一只生物都会让暴怒笼子消耗一点点用管道导入其内的源质.依据对应生物的不同,暴怒之笼需要不同类型的源质.抑或你可以导入Ira源质来作为燃料.也可以使用Desidia来实现另外一些功能.

拿着妖魔之叉右键暴怒之笼,能够循环切换其使用的燃料类型,切换它抽取哪一种要素源质. +forbidden.research_page.WRATHCAGE.3=要使暴怒之笼与某种指定生物绑定,可以使用留影水晶右击笼子.携带空白留影水晶用妖魔之叉杀死生物能够将生物的信息烙印到水晶之中. +# +forbidden.research_name.FORK=妖魔之叉 +forbidden.research_text.FORK=神秘匠人之工具 +forbidden.research_page.FORK.1=你制造出一柄工具用以捣鼓数种炼狱装置.石英支撑的叉尖让妖魔之叉能够同奥术能量相谐振.

除了能用以调整设备,妖魔之叉用来做实用武器亦不错.

当你解锁了更多研究后下面几页会出现更重要的信息. +forbidden.research_page.FORK.wc=如果用妖魔之叉杀死支持的生物类型时物品栏内有空白留影水晶,那么这种生物就会被烙印到水晶中.留影水晶可以用于暴怒之笼,以绑定某种怪物.

这柄叉子还能用来设置暴怒之笼使用哪种源质作为燃料.只需拿着妖魔之叉右键暴怒之笼,就能在三种不同的燃料类型中切换. +# +forbidden.research_name.MORPHTOOLS=避役工具 +forbidden.research_text.MORPHTOOLS=这里有一项能用上的附魔… +forbidden.research_page.MORPHTOOLS.1=避役工具是种三合一的工具.当第一次附魔后,手持这柄工具潜行状态下按下右键能够将其切换成没有经过附魔的状态,这使得它可以再次进行完全不同的附魔.没一柄工具有三种可以独立附魔的状态,都能使用潜行下按住右键来切换.

但这种工具一经附魔便无法抹去效果,因此应利用好每一次附魔机会! +# +forbidden.research_name.CLUSTER=附魔:炽心 +forbidden.research_text.CLUSTER=核心之避役 +forbidden.research_page.CLUSTER.1=你研究出一种能让避役镐模仿炽心镐效果的附魔.进行炽心附魔后的避役镐在采掘某种矿石时有几率掉落原矿簇.原矿簇是一种比天然矿石纯度更高的矿藏,冶炼时相比普通矿石能够翻倍得到产物.炽心附魔等级越高掉落原矿簇几率越大. +# +forbidden.research_name.GREEDY=附魔:剥削 +forbidden.research_text.GREEDY=无控的附魔 +forbidden.research_page.GREEDY.1=你已经研究出一种武器附魔,能让你从生物那里榨取好处.每次使用附魔了剥削的武器杀死一只敌对生物,就有几率掉落出一枚绿宝石碎片.若用它杀死村民,可能的掉落物则代之以村民的绿宝石. +# +forbidden.research_name.CONSUMING=附魔:挥霍 +forbidden.research_text.CONSUMING=垃圾处理 +forbidden.research_page.CONSUMING.1=烦透了要手动清空口袋里无用的垃圾,你设计出一种附魔,能够让工具自动毁掉那些寻常的不需要的材料.被挥霍工具挖掉的所有圆石,泥土或下界岩都会被销毁,而非掉落到地上. +# +forbidden.research_name.PIGBANE=附魔:猪猡克星 +forbidden.research_text.PIGBANE=告诉这些僵尸猪人谁才占据食物链的顶端! +forbidden.research_page.PIGBANE.1=僵尸主人自鸣得意.他们老是成群结队在无辜的旅者面前踏步巡行.是时候让他们停下来了.

附魔了猪猡克星的武器对猪或者僵尸猪人效果拔群. +# +forbidden.research_name.EDUCATIONAL=附魔:教育 +forbidden.research_text.EDUCATIONAL=你会学到的! +forbidden.research_page.EDUCATIONAL.1=你创造出一种附魔,能将知识和学习的精髓注入武器.依这项附魔的等级不同,教育武器能够将好学精神捶入怪物的脑门,让它们死后比平常掉落出更多经验. +# +forbidden.research_name.CORRUPTING=附魔:堕落 +forbidden.research_text.CORRUPTING=对碎片的坏影响 +forbidden.research_page.CORRUPTING.1=下界无与伦比,但它毕竟是一个地狱之坑.

堕落附魔让你无须前往下界就能收获到下界碎片.堕落附魔的镐能随机腐化挖出的元素碎片,将其转换为下界碎片.晶化的碎片只是看起来容易感染,因此腐化晶簇不会有效果. +# +forbidden.research_name.ETERNAL=附魔:不朽 +forbidden.research_text.ETERNAL=避役之神 +forbidden.research_page.ETERNAL.1=灵宝工具相当了不起.你确定避役工具可以与它们更加相似.也许它们可以吧……

天域附魔让避役工具如同灵宝工具那样永不磨损. +# +forbidden.research_name.TAINTBASICS=腐化的大地 +forbidden.research_text.TAINTBASICS=深紫色 +forbidden.research_page.TAINTBASICS.1=有时候,神秘学会变得糟糕可怖.奇迹变成了扭曲的灾难以及大片丑陋的景观.腐化的大地是被魔法设备排出的扭曲魔力咒波污染了的地方.当地的花花草草会发生扭曲的变异,动物也会从普通的野兽转变成敌对的怪物.污染极端严重的腐化区域还会感染那些践踏它脉动的须根的家伙. +forbidden.research_page.TAINTBASICS.2=腐化大地天然分布于世界的某些角落.但有时也会因为粗枝大叶的神秘使让咒波粘浆淤塞了过长时间而人为形成.它们很容易通过那些深紫色的须根和亮紫色的藤梗辨识.如若放置不管,腐化大地一般会将它的触手向外蔓延,感染周围越来越多的土地.树木或其他天然植渐渐会被覆盖上一层纤维状的物质,而泥土会变成稠密发紫的腐化泥土,变得结构松垮,随时可能坍塌或融化成咒波粘浆. +# +forbidden.research_name.BLOODWELL=血腥之笔与墨 +forbidden.research_text.BLOODWELL="如若它杀了我,我便能完成这项研究!" +forbidden.research_page.BLOODWELL.1=没有比研究到一半却需要补充墨水更令人沮丧的事情了.有时候,你宁可使用自己的血来代替墨水也不愿意中断研究去找墨水.

血腥之笔与墨将能够使用生命点来补充墨水,每25个生命点补充一点墨水.但这项能力需要用体温激活,因此填充墨水时需要你从研究台中取出这个工具,但却实际上不会因此中断研究. +# +forbidden.research_name.DIVINEORB=超凡血珠 +forbidden.research_text.DIVINEORB=血神阿莫科的宝珠 +forbidden.research_page.DIVINEORB.1=在一些神秘使圈子里灵液确实就是神灵之血的流言甚嚣尘上.你难以辨别其真假,但灵液确乎对更加高级的炼金材料具有亲和力.

超凡血珠是你将最高深的神秘学与可用的炼金巫术相结合研究出的东西.这种融合极大增强了血珠的容纳能力,能够让它容纳高达70,000,000生命点.难道你还会需要更多的生命点吗? +# +forbidden.research_name.CRYSTALWELL=水晶笔与墨 +forbidden.research_text.CRYSTALWELL=奥术研究授权 +forbidden.research_page.CRYSTALWELL.1=将元素碎片与你的魔瓶融合会出现有趣的效果.看起来,用水晶笔与墨书写的时候会吸收到知识.当墨水耗尽时,你可以拿起水晶笔与墨右键,吸收到的这些知识就会转变成一些研究点供你使用.遗憾的是,这会耗尽这个小玩意儿上附带的魔力,使得它又变回普通的笔与墨. +# +forbidden.research_name.RIDINGCROP=马鞭 +forbidden.research_text.RIDINGCROP=鞭策之痛 +forbidden.research_page.RIDINGCROP.1=马鞭,顾名思义,是一种让坐骑跑得更快的工具.手持马鞭骑着马匹或其他坐骑时右击,会让坐骑感到一阵疼痛,鞭策它加速奔跑一阵儿.

当然你也可以用这个鞭子抽打其他生物,但到底你被什么念头占据了身体才会那样子啊? +# +forbidden.research_name.HELLFIRE=地狱火领主 +forbidden.research_text.HELLFIRE=从此势不可挡 +forbidden.research_page.HELLFIRE.1=身陷下界是最糟糕的体验.当你克服到你需要克服的重重困难,终于就要能回到家园的时候,一些愚蠢的幽魂却打算耀武扬威地对你轰炸一通,以至于传送门都被关掉了.当然,若随身携带着打火石再重新修好也并不费事,但谁会一直随身带这些玩意儿?

你研究出一种利用法杖魔力点燃某些材料的方法.手持卸掉核心的法杖右击地狱岩或者黑曜石的上方,会从法杖中消耗掉一些Ignis要素并点燃一团火焰. +# diff --git a/assets/forbidden/textures/aspects/desidia.png b/src/main/resources/assets/forbidden/textures/aspects/desidia.png similarity index 100% rename from assets/forbidden/textures/aspects/desidia.png rename to src/main/resources/assets/forbidden/textures/aspects/desidia.png diff --git a/assets/forbidden/textures/aspects/gula.png b/src/main/resources/assets/forbidden/textures/aspects/gula.png similarity index 100% rename from assets/forbidden/textures/aspects/gula.png rename to src/main/resources/assets/forbidden/textures/aspects/gula.png diff --git a/assets/forbidden/textures/aspects/infernus.png b/src/main/resources/assets/forbidden/textures/aspects/infernus.png similarity index 100% rename from assets/forbidden/textures/aspects/infernus.png rename to src/main/resources/assets/forbidden/textures/aspects/infernus.png diff --git a/assets/forbidden/textures/aspects/invidia.png b/src/main/resources/assets/forbidden/textures/aspects/invidia.png similarity index 100% rename from assets/forbidden/textures/aspects/invidia.png rename to src/main/resources/assets/forbidden/textures/aspects/invidia.png diff --git a/assets/forbidden/textures/aspects/ira.png b/src/main/resources/assets/forbidden/textures/aspects/ira.png similarity index 100% rename from assets/forbidden/textures/aspects/ira.png rename to src/main/resources/assets/forbidden/textures/aspects/ira.png diff --git a/assets/forbidden/textures/aspects/luxuria.png b/src/main/resources/assets/forbidden/textures/aspects/luxuria.png similarity index 100% rename from assets/forbidden/textures/aspects/luxuria.png rename to src/main/resources/assets/forbidden/textures/aspects/luxuria.png diff --git a/assets/forbidden/textures/aspects/superbia.png b/src/main/resources/assets/forbidden/textures/aspects/superbia.png similarity index 100% rename from assets/forbidden/textures/aspects/superbia.png rename to src/main/resources/assets/forbidden/textures/aspects/superbia.png diff --git a/assets/forbidden/textures/blocks/arcanewoodblock.png b/src/main/resources/assets/forbidden/textures/blocks/arcanewoodblock.png similarity index 100% rename from assets/forbidden/textures/blocks/arcanewoodblock.png rename to src/main/resources/assets/forbidden/textures/blocks/arcanewoodblock.png diff --git a/assets/forbidden/textures/blocks/cake_bottom.png b/src/main/resources/assets/forbidden/textures/blocks/cake_bottom.png similarity index 100% rename from assets/forbidden/textures/blocks/cake_bottom.png rename to src/main/resources/assets/forbidden/textures/blocks/cake_bottom.png diff --git a/assets/forbidden/textures/blocks/cake_inner.png b/src/main/resources/assets/forbidden/textures/blocks/cake_inner.png similarity index 100% rename from assets/forbidden/textures/blocks/cake_inner.png rename to src/main/resources/assets/forbidden/textures/blocks/cake_inner.png diff --git a/assets/forbidden/textures/blocks/cake_side.png b/src/main/resources/assets/forbidden/textures/blocks/cake_side.png similarity index 100% rename from assets/forbidden/textures/blocks/cake_side.png rename to src/main/resources/assets/forbidden/textures/blocks/cake_side.png diff --git a/assets/forbidden/textures/blocks/cake_top.png b/src/main/resources/assets/forbidden/textures/blocks/cake_top.png similarity index 100% rename from assets/forbidden/textures/blocks/cake_top.png rename to src/main/resources/assets/forbidden/textures/blocks/cake_top.png diff --git a/assets/forbidden/textures/blocks/flower_black.png b/src/main/resources/assets/forbidden/textures/blocks/flower_black.png similarity index 100% rename from assets/forbidden/textures/blocks/flower_black.png rename to src/main/resources/assets/forbidden/textures/blocks/flower_black.png diff --git a/assets/forbidden/textures/blocks/spirit_box.png b/src/main/resources/assets/forbidden/textures/blocks/spirit_box.png similarity index 100% rename from assets/forbidden/textures/blocks/spirit_box.png rename to src/main/resources/assets/forbidden/textures/blocks/spirit_box.png diff --git a/assets/forbidden/textures/blocks/starblock.png b/src/main/resources/assets/forbidden/textures/blocks/starblock.png similarity index 100% rename from assets/forbidden/textures/blocks/starblock.png rename to src/main/resources/assets/forbidden/textures/blocks/starblock.png diff --git a/assets/forbidden/textures/blocks/taint_bricks.png b/src/main/resources/assets/forbidden/textures/blocks/taint_bricks.png similarity index 100% rename from assets/forbidden/textures/blocks/taint_bricks.png rename to src/main/resources/assets/forbidden/textures/blocks/taint_bricks.png diff --git a/assets/forbidden/textures/blocks/taint_log_bottom.png b/src/main/resources/assets/forbidden/textures/blocks/taint_log_bottom.png similarity index 100% rename from assets/forbidden/textures/blocks/taint_log_bottom.png rename to src/main/resources/assets/forbidden/textures/blocks/taint_log_bottom.png diff --git a/assets/forbidden/textures/blocks/taint_log_side.png b/src/main/resources/assets/forbidden/textures/blocks/taint_log_side.png similarity index 100% rename from assets/forbidden/textures/blocks/taint_log_side.png rename to src/main/resources/assets/forbidden/textures/blocks/taint_log_side.png diff --git a/assets/forbidden/textures/blocks/taint_plank.png b/src/main/resources/assets/forbidden/textures/blocks/taint_plank.png similarity index 100% rename from assets/forbidden/textures/blocks/taint_plank.png rename to src/main/resources/assets/forbidden/textures/blocks/taint_plank.png diff --git a/assets/forbidden/textures/blocks/taint_plank_fancy.png b/src/main/resources/assets/forbidden/textures/blocks/taint_plank_fancy.png similarity index 100% rename from assets/forbidden/textures/blocks/taint_plank_fancy.png rename to src/main/resources/assets/forbidden/textures/blocks/taint_plank_fancy.png diff --git a/assets/forbidden/textures/blocks/taint_stone.png b/src/main/resources/assets/forbidden/textures/blocks/taint_stone.png similarity index 100% rename from assets/forbidden/textures/blocks/taint_stone.png rename to src/main/resources/assets/forbidden/textures/blocks/taint_stone.png diff --git a/assets/forbidden/textures/items/bloodwell.png b/src/main/resources/assets/forbidden/textures/items/bloodwell.png similarity index 100% rename from assets/forbidden/textures/items/bloodwell.png rename to src/main/resources/assets/forbidden/textures/items/bloodwell.png diff --git a/assets/forbidden/textures/items/bound_shears.png b/src/main/resources/assets/forbidden/textures/items/bound_shears.png similarity index 100% rename from assets/forbidden/textures/items/bound_shears.png rename to src/main/resources/assets/forbidden/textures/items/bound_shears.png diff --git a/assets/forbidden/textures/items/cake.png b/src/main/resources/assets/forbidden/textures/items/cake.png similarity index 100% rename from assets/forbidden/textures/items/cake.png rename to src/main/resources/assets/forbidden/textures/items/cake.png diff --git a/assets/forbidden/textures/items/chameleonaxe.png b/src/main/resources/assets/forbidden/textures/items/chameleonaxe.png similarity index 100% rename from assets/forbidden/textures/items/chameleonaxe.png rename to src/main/resources/assets/forbidden/textures/items/chameleonaxe.png diff --git a/assets/forbidden/textures/items/chameleonpick.png b/src/main/resources/assets/forbidden/textures/items/chameleonpick.png similarity index 100% rename from assets/forbidden/textures/items/chameleonpick.png rename to src/main/resources/assets/forbidden/textures/items/chameleonpick.png diff --git a/assets/forbidden/textures/items/chameleonshovel.png b/src/main/resources/assets/forbidden/textures/items/chameleonshovel.png similarity index 100% rename from assets/forbidden/textures/items/chameleonshovel.png rename to src/main/resources/assets/forbidden/textures/items/chameleonshovel.png diff --git a/assets/forbidden/textures/items/chameleonsword.png b/src/main/resources/assets/forbidden/textures/items/chameleonsword.png similarity index 100% rename from assets/forbidden/textures/items/chameleonsword.png rename to src/main/resources/assets/forbidden/textures/items/chameleonsword.png diff --git a/assets/forbidden/textures/items/crop.png b/src/main/resources/assets/forbidden/textures/items/crop.png similarity index 100% rename from assets/forbidden/textures/items/crop.png rename to src/main/resources/assets/forbidden/textures/items/crop.png diff --git a/assets/forbidden/textures/items/crop_black.png b/src/main/resources/assets/forbidden/textures/items/crop_black.png similarity index 100% rename from assets/forbidden/textures/items/crop_black.png rename to src/main/resources/assets/forbidden/textures/items/crop_black.png diff --git a/assets/forbidden/textures/items/crystalwell.png b/src/main/resources/assets/forbidden/textures/items/crystalwell.png similarity index 100% rename from assets/forbidden/textures/items/crystalwell.png rename to src/main/resources/assets/forbidden/textures/items/crystalwell.png diff --git a/assets/forbidden/textures/items/despairshard.png b/src/main/resources/assets/forbidden/textures/items/despairshard.png similarity index 100% rename from assets/forbidden/textures/items/despairshard.png rename to src/main/resources/assets/forbidden/textures/items/despairshard.png diff --git a/assets/forbidden/textures/items/divineorb.png b/src/main/resources/assets/forbidden/textures/items/divineorb.png similarity index 100% rename from assets/forbidden/textures/items/divineorb.png rename to src/main/resources/assets/forbidden/textures/items/divineorb.png diff --git a/assets/forbidden/textures/items/divinewell.png b/src/main/resources/assets/forbidden/textures/items/divinewell.png similarity index 100% rename from assets/forbidden/textures/items/divinewell.png rename to src/main/resources/assets/forbidden/textures/items/divinewell.png diff --git a/assets/forbidden/textures/items/dye_powder_black.png b/src/main/resources/assets/forbidden/textures/items/dye_powder_black.png similarity index 100% rename from assets/forbidden/textures/items/dye_powder_black.png rename to src/main/resources/assets/forbidden/textures/items/dye_powder_black.png diff --git a/assets/forbidden/textures/items/emerald_nugget.png b/src/main/resources/assets/forbidden/textures/items/emerald_nugget.png similarity index 100% rename from assets/forbidden/textures/items/emerald_nugget.png rename to src/main/resources/assets/forbidden/textures/items/emerald_nugget.png diff --git a/assets/forbidden/textures/items/emptycrystal.png b/src/main/resources/assets/forbidden/textures/items/emptycrystal.png similarity index 100% rename from assets/forbidden/textures/items/emptycrystal.png rename to src/main/resources/assets/forbidden/textures/items/emptycrystal.png diff --git a/assets/forbidden/textures/items/envyshard.png b/src/main/resources/assets/forbidden/textures/items/envyshard.png similarity index 100% rename from assets/forbidden/textures/items/envyshard.png rename to src/main/resources/assets/forbidden/textures/items/envyshard.png diff --git a/assets/forbidden/textures/items/eyeaxe.png b/src/main/resources/assets/forbidden/textures/items/eyeaxe.png similarity index 100% rename from assets/forbidden/textures/items/eyeaxe.png rename to src/main/resources/assets/forbidden/textures/items/eyeaxe.png diff --git a/assets/forbidden/textures/items/eyepick.png b/src/main/resources/assets/forbidden/textures/items/eyepick.png similarity index 100% rename from assets/forbidden/textures/items/eyepick.png rename to src/main/resources/assets/forbidden/textures/items/eyepick.png diff --git a/assets/forbidden/textures/items/eyeshovel.png b/src/main/resources/assets/forbidden/textures/items/eyeshovel.png similarity index 100% rename from assets/forbidden/textures/items/eyeshovel.png rename to src/main/resources/assets/forbidden/textures/items/eyeshovel.png diff --git a/assets/forbidden/textures/items/eyesword.png b/src/main/resources/assets/forbidden/textures/items/eyesword.png similarity index 100% rename from assets/forbidden/textures/items/eyesword.png rename to src/main/resources/assets/forbidden/textures/items/eyesword.png diff --git a/assets/forbidden/textures/items/focus_wrath.png b/src/main/resources/assets/forbidden/textures/items/focus_wrath.png similarity index 100% rename from assets/forbidden/textures/items/focus_wrath.png rename to src/main/resources/assets/forbidden/textures/items/focus_wrath.png diff --git a/assets/forbidden/textures/items/fork.png b/src/main/resources/assets/forbidden/textures/items/fork.png similarity index 100% rename from assets/forbidden/textures/items/fork.png rename to src/main/resources/assets/forbidden/textures/items/fork.png diff --git a/assets/forbidden/textures/items/gluttonyshard.png b/src/main/resources/assets/forbidden/textures/items/gluttonyshard.png similarity index 100% rename from assets/forbidden/textures/items/gluttonyshard.png rename to src/main/resources/assets/forbidden/textures/items/gluttonyshard.png diff --git a/assets/forbidden/textures/items/greedshard.png b/src/main/resources/assets/forbidden/textures/items/greedshard.png similarity index 100% rename from assets/forbidden/textures/items/greedshard.png rename to src/main/resources/assets/forbidden/textures/items/greedshard.png diff --git a/assets/forbidden/textures/items/hexiteingot.png b/src/main/resources/assets/forbidden/textures/items/hexiteingot.png similarity index 100% rename from assets/forbidden/textures/items/hexiteingot.png rename to src/main/resources/assets/forbidden/textures/items/hexiteingot.png diff --git a/assets/forbidden/textures/items/lustshard.png b/src/main/resources/assets/forbidden/textures/items/lustshard.png similarity index 100% rename from assets/forbidden/textures/items/lustshard.png rename to src/main/resources/assets/forbidden/textures/items/lustshard.png diff --git a/assets/forbidden/textures/items/mobcrystal.png b/src/main/resources/assets/forbidden/textures/items/mobcrystal.png similarity index 100% rename from assets/forbidden/textures/items/mobcrystal.png rename to src/main/resources/assets/forbidden/textures/items/mobcrystal.png diff --git a/assets/forbidden/textures/items/nuggetmanasteel.png b/src/main/resources/assets/forbidden/textures/items/nuggetmanasteel.png similarity index 100% rename from assets/forbidden/textures/items/nuggetmanasteel.png rename to src/main/resources/assets/forbidden/textures/items/nuggetmanasteel.png diff --git a/assets/forbidden/textures/items/prideshard.png b/src/main/resources/assets/forbidden/textures/items/prideshard.png similarity index 100% rename from assets/forbidden/textures/items/prideshard.png rename to src/main/resources/assets/forbidden/textures/items/prideshard.png diff --git a/assets/forbidden/textures/items/skullaxe.png b/src/main/resources/assets/forbidden/textures/items/skullaxe.png similarity index 100% rename from assets/forbidden/textures/items/skullaxe.png rename to src/main/resources/assets/forbidden/textures/items/skullaxe.png diff --git a/assets/forbidden/textures/items/slothshard.png b/src/main/resources/assets/forbidden/textures/items/slothshard.png similarity index 100% rename from assets/forbidden/textures/items/slothshard.png rename to src/main/resources/assets/forbidden/textures/items/slothshard.png diff --git a/assets/forbidden/textures/items/spork.png b/src/main/resources/assets/forbidden/textures/items/spork.png similarity index 100% rename from assets/forbidden/textures/items/spork.png rename to src/main/resources/assets/forbidden/textures/items/spork.png diff --git a/assets/forbidden/textures/items/taintfruit.png b/src/main/resources/assets/forbidden/textures/items/taintfruit.png similarity index 100% rename from assets/forbidden/textures/items/taintfruit.png rename to src/main/resources/assets/forbidden/textures/items/taintfruit.png diff --git a/assets/forbidden/textures/items/taintpickaxe.png b/src/main/resources/assets/forbidden/textures/items/taintpickaxe.png similarity index 100% rename from assets/forbidden/textures/items/taintpickaxe.png rename to src/main/resources/assets/forbidden/textures/items/taintpickaxe.png diff --git a/assets/forbidden/textures/items/taintshard.png b/src/main/resources/assets/forbidden/textures/items/taintshard.png similarity index 100% rename from assets/forbidden/textures/items/taintshard.png rename to src/main/resources/assets/forbidden/textures/items/taintshard.png diff --git a/assets/forbidden/textures/items/taintshard.png.mcmeta b/src/main/resources/assets/forbidden/textures/items/taintshard.png.mcmeta similarity index 100% rename from assets/forbidden/textures/items/taintshard.png.mcmeta rename to src/main/resources/assets/forbidden/textures/items/taintshard.png.mcmeta diff --git a/assets/forbidden/textures/items/taintshovel.png b/src/main/resources/assets/forbidden/textures/items/taintshovel.png similarity index 100% rename from assets/forbidden/textures/items/taintshovel.png rename to src/main/resources/assets/forbidden/textures/items/taintshovel.png diff --git a/assets/forbidden/textures/items/wand_cap_alchemical.png b/src/main/resources/assets/forbidden/textures/items/wand_cap_alchemical.png similarity index 100% rename from assets/forbidden/textures/items/wand_cap_alchemical.png rename to src/main/resources/assets/forbidden/textures/items/wand_cap_alchemical.png diff --git a/assets/forbidden/textures/items/wand_cap_alchemical.png.mcmeta b/src/main/resources/assets/forbidden/textures/items/wand_cap_alchemical.png.mcmeta similarity index 100% rename from assets/forbidden/textures/items/wand_cap_alchemical.png.mcmeta rename to src/main/resources/assets/forbidden/textures/items/wand_cap_alchemical.png.mcmeta diff --git a/assets/forbidden/textures/items/wand_cap_manasteel.png b/src/main/resources/assets/forbidden/textures/items/wand_cap_manasteel.png similarity index 100% rename from assets/forbidden/textures/items/wand_cap_manasteel.png rename to src/main/resources/assets/forbidden/textures/items/wand_cap_manasteel.png diff --git a/assets/forbidden/textures/items/wand_cap_manasteel.png.mcmeta b/src/main/resources/assets/forbidden/textures/items/wand_cap_manasteel.png.mcmeta similarity index 100% rename from assets/forbidden/textures/items/wand_cap_manasteel.png.mcmeta rename to src/main/resources/assets/forbidden/textures/items/wand_cap_manasteel.png.mcmeta diff --git a/assets/forbidden/textures/items/wand_cap_manasteel_inert.png b/src/main/resources/assets/forbidden/textures/items/wand_cap_manasteel_inert.png similarity index 100% rename from assets/forbidden/textures/items/wand_cap_manasteel_inert.png rename to src/main/resources/assets/forbidden/textures/items/wand_cap_manasteel_inert.png diff --git a/assets/forbidden/textures/items/wand_cap_soul.png b/src/main/resources/assets/forbidden/textures/items/wand_cap_soul.png similarity index 100% rename from assets/forbidden/textures/items/wand_cap_soul.png rename to src/main/resources/assets/forbidden/textures/items/wand_cap_soul.png diff --git a/assets/forbidden/textures/items/wand_cap_soul.png.mcmeta b/src/main/resources/assets/forbidden/textures/items/wand_cap_soul.png.mcmeta similarity index 100% rename from assets/forbidden/textures/items/wand_cap_soul.png.mcmeta rename to src/main/resources/assets/forbidden/textures/items/wand_cap_soul.png.mcmeta diff --git a/assets/forbidden/textures/items/wand_cap_vinteum.png b/src/main/resources/assets/forbidden/textures/items/wand_cap_vinteum.png similarity index 100% rename from assets/forbidden/textures/items/wand_cap_vinteum.png rename to src/main/resources/assets/forbidden/textures/items/wand_cap_vinteum.png diff --git a/assets/forbidden/textures/items/wand_cap_vinteum.png.mcmeta b/src/main/resources/assets/forbidden/textures/items/wand_cap_vinteum.png.mcmeta similarity index 100% rename from assets/forbidden/textures/items/wand_cap_vinteum.png.mcmeta rename to src/main/resources/assets/forbidden/textures/items/wand_cap_vinteum.png.mcmeta diff --git a/assets/forbidden/textures/items/wand_rod_blood.png b/src/main/resources/assets/forbidden/textures/items/wand_rod_blood.png similarity index 100% rename from assets/forbidden/textures/items/wand_rod_blood.png rename to src/main/resources/assets/forbidden/textures/items/wand_rod_blood.png diff --git a/assets/forbidden/textures/items/wand_rod_blood_inert.png b/src/main/resources/assets/forbidden/textures/items/wand_rod_blood_inert.png similarity index 100% rename from assets/forbidden/textures/items/wand_rod_blood_inert.png rename to src/main/resources/assets/forbidden/textures/items/wand_rod_blood_inert.png diff --git a/assets/forbidden/textures/items/wand_rod_blood_staff.png b/src/main/resources/assets/forbidden/textures/items/wand_rod_blood_staff.png similarity index 100% rename from assets/forbidden/textures/items/wand_rod_blood_staff.png rename to src/main/resources/assets/forbidden/textures/items/wand_rod_blood_staff.png diff --git a/assets/forbidden/textures/items/wand_rod_infernal.png b/src/main/resources/assets/forbidden/textures/items/wand_rod_infernal.png similarity index 100% rename from assets/forbidden/textures/items/wand_rod_infernal.png rename to src/main/resources/assets/forbidden/textures/items/wand_rod_infernal.png diff --git a/assets/forbidden/textures/items/wand_rod_livingwood.png b/src/main/resources/assets/forbidden/textures/items/wand_rod_livingwood.png similarity index 100% rename from assets/forbidden/textures/items/wand_rod_livingwood.png rename to src/main/resources/assets/forbidden/textures/items/wand_rod_livingwood.png diff --git a/assets/forbidden/textures/items/wand_rod_livingwood_inert.png b/src/main/resources/assets/forbidden/textures/items/wand_rod_livingwood_inert.png similarity index 100% rename from assets/forbidden/textures/items/wand_rod_livingwood_inert.png rename to src/main/resources/assets/forbidden/textures/items/wand_rod_livingwood_inert.png diff --git a/assets/forbidden/textures/items/wand_rod_soul.png b/src/main/resources/assets/forbidden/textures/items/wand_rod_soul.png similarity index 100% rename from assets/forbidden/textures/items/wand_rod_soul.png rename to src/main/resources/assets/forbidden/textures/items/wand_rod_soul.png diff --git a/assets/forbidden/textures/items/wand_rod_tainted.png b/src/main/resources/assets/forbidden/textures/items/wand_rod_tainted.png similarity index 100% rename from assets/forbidden/textures/items/wand_rod_tainted.png rename to src/main/resources/assets/forbidden/textures/items/wand_rod_tainted.png diff --git a/assets/forbidden/textures/items/wand_rod_totem.png b/src/main/resources/assets/forbidden/textures/items/wand_rod_totem.png similarity index 100% rename from assets/forbidden/textures/items/wand_rod_totem.png rename to src/main/resources/assets/forbidden/textures/items/wand_rod_totem.png diff --git a/src/main/resources/assets/forbidden/textures/items/wand_rod_witchwood.png b/src/main/resources/assets/forbidden/textures/items/wand_rod_witchwood.png new file mode 100644 index 0000000..f36bf41 Binary files /dev/null and b/src/main/resources/assets/forbidden/textures/items/wand_rod_witchwood.png differ diff --git a/src/main/resources/assets/forbidden/textures/items/wand_rod_witchwood_staff.png b/src/main/resources/assets/forbidden/textures/items/wand_rod_witchwood_staff.png new file mode 100644 index 0000000..7444695 Binary files /dev/null and b/src/main/resources/assets/forbidden/textures/items/wand_rod_witchwood_staff.png differ diff --git a/assets/forbidden/textures/items/wrathshard.png b/src/main/resources/assets/forbidden/textures/items/wrathshard.png similarity index 100% rename from assets/forbidden/textures/items/wrathshard.png rename to src/main/resources/assets/forbidden/textures/items/wrathshard.png diff --git a/assets/forbidden/textures/items/wrathshard.png.mcmeta b/src/main/resources/assets/forbidden/textures/items/wrathshard.png.mcmeta similarity index 100% rename from assets/forbidden/textures/items/wrathshard.png.mcmeta rename to src/main/resources/assets/forbidden/textures/items/wrathshard.png.mcmeta diff --git a/assets/forbidden/textures/misc/consuming.png b/src/main/resources/assets/forbidden/textures/misc/consuming.png similarity index 100% rename from assets/forbidden/textures/misc/consuming.png rename to src/main/resources/assets/forbidden/textures/misc/consuming.png diff --git a/assets/forbidden/textures/misc/corrupting.png b/src/main/resources/assets/forbidden/textures/misc/corrupting.png similarity index 100% rename from assets/forbidden/textures/misc/corrupting.png rename to src/main/resources/assets/forbidden/textures/misc/corrupting.png diff --git a/assets/forbidden/textures/misc/educational.png b/src/main/resources/assets/forbidden/textures/misc/educational.png similarity index 100% rename from assets/forbidden/textures/misc/educational.png rename to src/main/resources/assets/forbidden/textures/misc/educational.png diff --git a/assets/forbidden/textures/misc/eternal.png b/src/main/resources/assets/forbidden/textures/misc/eternal.png similarity index 100% rename from assets/forbidden/textures/misc/eternal.png rename to src/main/resources/assets/forbidden/textures/misc/eternal.png diff --git a/assets/forbidden/textures/misc/forbidden.png b/src/main/resources/assets/forbidden/textures/misc/forbidden.png similarity index 100% rename from assets/forbidden/textures/misc/forbidden.png rename to src/main/resources/assets/forbidden/textures/misc/forbidden.png diff --git a/assets/forbidden/textures/misc/greedy.png b/src/main/resources/assets/forbidden/textures/misc/greedy.png similarity index 100% rename from assets/forbidden/textures/misc/greedy.png rename to src/main/resources/assets/forbidden/textures/misc/greedy.png diff --git a/assets/forbidden/textures/misc/lucrative.png b/src/main/resources/assets/forbidden/textures/misc/lucrative.png similarity index 100% rename from assets/forbidden/textures/misc/lucrative.png rename to src/main/resources/assets/forbidden/textures/misc/lucrative.png diff --git a/assets/forbidden/textures/misc/pigbane.png b/src/main/resources/assets/forbidden/textures/misc/pigbane.png similarity index 100% rename from assets/forbidden/textures/misc/pigbane.png rename to src/main/resources/assets/forbidden/textures/misc/pigbane.png diff --git a/assets/forbidden/textures/misc/research.png b/src/main/resources/assets/forbidden/textures/misc/research.png similarity index 100% rename from assets/forbidden/textures/misc/research.png rename to src/main/resources/assets/forbidden/textures/misc/research.png diff --git a/assets/forbidden/textures/misc/runecircle.png b/src/main/resources/assets/forbidden/textures/misc/runecircle.png similarity index 100% rename from assets/forbidden/textures/misc/runecircle.png rename to src/main/resources/assets/forbidden/textures/misc/runecircle.png diff --git a/assets/forbidden/textures/models/wand_cap_alchemical.png b/src/main/resources/assets/forbidden/textures/models/wand_cap_alchemical.png similarity index 100% rename from assets/forbidden/textures/models/wand_cap_alchemical.png rename to src/main/resources/assets/forbidden/textures/models/wand_cap_alchemical.png diff --git a/assets/forbidden/textures/models/wand_cap_manasteel.png b/src/main/resources/assets/forbidden/textures/models/wand_cap_manasteel.png similarity index 100% rename from assets/forbidden/textures/models/wand_cap_manasteel.png rename to src/main/resources/assets/forbidden/textures/models/wand_cap_manasteel.png diff --git a/assets/forbidden/textures/models/wand_cap_orichalcum.png b/src/main/resources/assets/forbidden/textures/models/wand_cap_orichalcum.png similarity index 100% rename from assets/forbidden/textures/models/wand_cap_orichalcum.png rename to src/main/resources/assets/forbidden/textures/models/wand_cap_orichalcum.png diff --git a/assets/forbidden/textures/models/wand_cap_soul.png b/src/main/resources/assets/forbidden/textures/models/wand_cap_soul.png similarity index 100% rename from assets/forbidden/textures/models/wand_cap_soul.png rename to src/main/resources/assets/forbidden/textures/models/wand_cap_soul.png diff --git a/assets/forbidden/textures/models/wand_cap_vinteum.png b/src/main/resources/assets/forbidden/textures/models/wand_cap_vinteum.png similarity index 100% rename from assets/forbidden/textures/models/wand_cap_vinteum.png rename to src/main/resources/assets/forbidden/textures/models/wand_cap_vinteum.png diff --git a/assets/forbidden/textures/models/wand_rod_blood.png b/src/main/resources/assets/forbidden/textures/models/wand_rod_blood.png similarity index 100% rename from assets/forbidden/textures/models/wand_rod_blood.png rename to src/main/resources/assets/forbidden/textures/models/wand_rod_blood.png diff --git a/assets/forbidden/textures/models/wand_rod_infernal.png b/src/main/resources/assets/forbidden/textures/models/wand_rod_infernal.png similarity index 100% rename from assets/forbidden/textures/models/wand_rod_infernal.png rename to src/main/resources/assets/forbidden/textures/models/wand_rod_infernal.png diff --git a/assets/forbidden/textures/models/wand_rod_livingwood.png b/src/main/resources/assets/forbidden/textures/models/wand_rod_livingwood.png similarity index 100% rename from assets/forbidden/textures/models/wand_rod_livingwood.png rename to src/main/resources/assets/forbidden/textures/models/wand_rod_livingwood.png diff --git a/assets/forbidden/textures/models/wand_rod_neutronium.png b/src/main/resources/assets/forbidden/textures/models/wand_rod_neutronium.png similarity index 100% rename from assets/forbidden/textures/models/wand_rod_neutronium.png rename to src/main/resources/assets/forbidden/textures/models/wand_rod_neutronium.png diff --git a/assets/forbidden/textures/models/wand_rod_soul.png b/src/main/resources/assets/forbidden/textures/models/wand_rod_soul.png similarity index 100% rename from assets/forbidden/textures/models/wand_rod_soul.png rename to src/main/resources/assets/forbidden/textures/models/wand_rod_soul.png diff --git a/assets/forbidden/textures/models/wand_rod_tainted.png b/src/main/resources/assets/forbidden/textures/models/wand_rod_tainted.png similarity index 100% rename from assets/forbidden/textures/models/wand_rod_tainted.png rename to src/main/resources/assets/forbidden/textures/models/wand_rod_tainted.png diff --git a/assets/forbidden/textures/models/wand_rod_totem.png b/src/main/resources/assets/forbidden/textures/models/wand_rod_totem.png similarity index 100% rename from assets/forbidden/textures/models/wand_rod_totem.png rename to src/main/resources/assets/forbidden/textures/models/wand_rod_totem.png diff --git a/src/main/resources/assets/forbidden/textures/models/wand_rod_witchwood.png b/src/main/resources/assets/forbidden/textures/models/wand_rod_witchwood.png new file mode 100644 index 0000000..acf2e4c Binary files /dev/null and b/src/main/resources/assets/forbidden/textures/models/wand_rod_witchwood.png differ diff --git a/assets/pack.mcmeta b/src/main/resources/assets/pack.mcmeta similarity index 100% rename from assets/pack.mcmeta rename to src/main/resources/assets/pack.mcmeta diff --git a/src/mcmod.info b/src/main/resources/mcmod.info similarity index 64% rename from src/mcmod.info rename to src/main/resources/mcmod.info index 316b7e8..55c9a43 100644 --- a/src/mcmod.info +++ b/src/main/resources/mcmod.info @@ -2,9 +2,10 @@ { "modid" : "ForbiddenMagic", "name" : "Forbidden Magic", - "version" : "v0.35a", + "version" : "${mod_version}", + "mcversion": "${minecraft_version}", "url" : "http://www.minecraftforum.net/topic/2305054-/", - "credits" : "Azanor, joshiejack, Flaxbeard, Killajoke, LycaonX, Nieue, Succubism, Vazkii, Dylan4ever, Nekosune, Kihira", + "credits" : "Azanor, Flaxbeard, Killajoke, LycaonX, Nieue, Succubism, Vazkii, Dylan4ever, Nekosune, Kihira", "authors": [ "SpitefulFox" ],